	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_hwframe_get_buffer          ## -- Begin function av_hwframe_get_buffer
	.p2align	4, 0x90
_av_hwframe_get_buffer:                 ## @av_hwframe_get_buffer
	.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	%rsi, %r14
	movq	(%rdi), %r12
	movq	(%r12), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_10
## %bb.1:
	movl	12(%r12), %eax
	movl	%eax, 8(%r14)
	callq	_av_buffer_ref
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	movq	(%r12), %rax
	movq	16(%rax), %rdi
	movq	%rbx, %rsi
	callq	_av_hwframe_get_buffer
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movq	(%r12), %rax
	movl	8(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_av_hwframe_map
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	callq	_av_log
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	jmp	LBB0_19
LBB0_10:
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.13:
	cmpl	$0, 8(%r12)
	je	LBB0_14
## %bb.15:
	callq	_av_buffer_ref
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	(%r12), %rax
	movq	(%rax), %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*(%rax)
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jns	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_av_buffer_unref
	movl	%ebx, %r15d
	jmp	LBB0_19
LBB0_11:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movl	%eax, %r15d
LBB0_6:
	leaq	-40(%rbp), %rdi
	callq	_av_frame_free
	jmp	LBB0_19
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	leaq	-40(%rbp), %rdi
	callq	_av_frame_free
	xorl	%r15d, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map frame into derived frame context: %d.\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_hwframe_get_buffer          ; -- Begin function av_hwframe_get_buffer
	.p2align	2
_av_hwframe_get_buffer:                 ; @av_hwframe_get_buffer
	.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
	mov	x20, x1
	ldr	x19, [x0]
	ldr	x8, [x19]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_7
; %bb.1:
	ldr	w8, [x19, #12]
	str	w8, [x20, #8]
	bl	_av_buffer_ref
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.2:
	bl	_av_frame_alloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_6
; %bb.3:
	mov	x22, x0
	ldr	x8, [x19]
	ldr	x0, [x8, #16]
	mov	x1, x22
	bl	_av_hwframe_get_buffer
	tbnz	w0, #31, LBB0_13
; %bb.4:
	ldr	x8, [x19]
	ldr	w2, [x8, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_av_hwframe_map
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.5:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_av_log
	b	LBB0_14
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	b	LBB0_15
LBB0_7:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_16
; %bb.9:
	bl	_av_buffer_ref
	str	x0, [x20]
	cbz	x0, LBB0_17
; %bb.10:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	tbnz	w0, #31, LBB0_19
; %bb.11:
	mov	w21, #0
	b	LBB0_15
LBB0_12:
Lloh8:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_18
LBB0_13:
	mov	x21, x0
LBB0_14:
	add	x0, sp, #8
	bl	_av_frame_free
LBB0_15:
	mov	x0, x21
	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
LBB0_16:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_19:
	mov	x21, x0
	mov	x0, x20
	bl	_av_buffer_unref
	b	LBB0_15
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map frame into derived frame context: %d.\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
