	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_hwdevice_ctx_alloc          ## -- Begin function av_hwdevice_ctx_alloc
	.p2align	4, 0x90
_av_hwdevice_ctx_alloc:                 ## @av_hwdevice_ctx_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_hw_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.1:
	movl	%edi, %r12d
	addq	$8, %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r12d, (%rbx)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rcx), %rbx
	addq	$8, %rcx
	testq	%rbx, %rbx
	jne	LBB0_3
	jmp	LBB0_17
LBB0_4:
	movl	$48, %edi
	callq	_av_mallocz
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:
	movq	%rax, %r14
	movl	$48, %edi
	callq	_av_mallocz
	leaq	16(%r14), %r15
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movl	4(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.7:
	callq	_av_mallocz
	movq	%rax, %rcx
	movq	(%r15), %rax
	movq	%rcx, 24(%rax)
	testq	%rcx, %rcx
	je	LBB0_14
LBB0_8:
	movl	8(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_10
## %bb.9:
	callq	_av_mallocz
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_12
LBB0_10:
	movq	_hwdevice_ctx_free@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AV_BUFFER_FLAG_READONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	$48, %esi
	xorl	%ecx, %ecx
	callq	_av_buffer_create
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	%r12d, (%r14)
	movq	_hwdevice_ctx_class@GOTPCREL(%rip), %rcx
	movq	%rcx, 40(%r14)
	movq	16(%r14), %rcx
	movq	%rbx, 32(%rcx)
	jmp	LBB0_17
LBB0_12:
	movq	(%r15), %rax
LBB0_13:
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	addq	$24, %rax
	movq	%rax, %rdi
	callq	_av_freep
LBB0_15:
	movq	%r15, %rdi
	callq	_av_freep
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_av_freep
	leaq	-40(%rbp), %rdi
	callq	_av_freep
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hw_table,8,3                   ## @hw_table
	.comm	_hwdevice_ctx_free,4,2          ## @hwdevice_ctx_free
	.comm	_AV_BUFFER_FLAG_READONLY,4,2    ## @AV_BUFFER_FLAG_READONLY
	.comm	_hwdevice_ctx_class,4,2         ## @hwdevice_ctx_class
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_hwdevice_ctx_alloc          ; -- Begin function av_hwdevice_ctx_alloc
	.p2align	2
_av_hwdevice_ctx_alloc:                 ; @av_hwdevice_ctx_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _hw_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hw_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x22, [x8]
	cbz	x22, LBB0_16
; %bb.1:
	mov	x19, x0
	add	x8, x8, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22]
	cmp	w9, w19
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x22, [x8], #8
	cbnz	x22, LBB0_2
	b	LBB0_16
LBB0_4:
	mov	w0, #48
	bl	_av_mallocz
	str	x0, [sp, #8]
	cbz	x0, LBB0_17
; %bb.5:
	mov	x20, x0
	mov	w0, #48
	bl	_av_mallocz
	mov	x21, x20
	str	x0, [x21, #16]!
	cbz	x0, LBB0_13
; %bb.6:
	ldr	w0, [x22, #4]
	cbz	w0, LBB0_8
; %bb.7:
	bl	_av_mallocz
	mov	x8, x0
	ldr	x0, [x21]
	str	x8, [x0, #24]
	cbz	x8, LBB0_14
LBB0_8:
	ldr	w0, [x22, #8]
	cbz	w0, LBB0_10
; %bb.9:
	bl	_av_mallocz
	str	x0, [x20, #8]
	cbz	x0, LBB0_12
LBB0_10:
Lloh3:
	adrp	x8, _hwdevice_ctx_free@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hwdevice_ctx_free@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _AV_BUFFER_FLAG_READONLY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_BUFFER_FLAG_READONLY@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w1, #48
	mov	x3, #0
	bl	_av_buffer_create
	cbz	x0, LBB0_12
; %bb.11:
	str	w19, [x20]
Lloh9:
	adrp	x8, _hwdevice_ctx_class@GOTPAGE
Lloh10:
	ldr	x8, [x8, _hwdevice_ctx_class@GOTPAGEOFF]
	str	x8, [x20, #40]
	ldr	x8, [x20, #16]
	str	x22, [x8, #32]
	b	LBB0_17
LBB0_12:
	ldr	x0, [x21]
LBB0_13:
	cbz	x0, LBB0_15
LBB0_14:
	add	x0, x0, #24
	bl	_av_freep
LBB0_15:
	mov	x0, x21
	bl	_av_freep
	add	x0, x20, #8
	bl	_av_freep
	add	x0, sp, #8
	bl	_av_freep
LBB0_16:
	mov	x0, #0
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_hw_table,8,3                   ; @hw_table
	.comm	_hwdevice_ctx_free,4,2          ; @hwdevice_ctx_free
	.comm	_AV_BUFFER_FLAG_READONLY,4,2    ; @AV_BUFFER_FLAG_READONLY
	.comm	_hwdevice_ctx_class,4,2         ; @hwdevice_ctx_class
.subsections_via_symbols
