	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hwmap_get_buffer
_hwmap_get_buffer:                      ## @hwmap_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	8(%rdi), %r12
	movq	(%r12), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.1:
	cmpl	$0, (%rdi)
	je	LBB0_2
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_default_get_video_buffer    ## TAILCALL
LBB0_2:
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	callq	_ff_get_video_buffer
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movl	(%rbx), %edx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_av_hwframe_map
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	leaq	-40(%rbp), %rdi
	callq	_av_frame_free
	leaq	-48(%rbp), %rdi
	jmp	LBB0_9
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_10
LBB0_5:
	leaq	-40(%rbp), %rdi
	callq	_av_frame_free
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_8:
	leaq	-40(%rbp), %rdi
LBB0_9:
	callq	_av_frame_free
LBB0_10:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate source frame for software mapping.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to map frame to software: %d.\n"

	.no_dead_strip	_hwmap_get_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hwmap_get_buffer
_hwmap_get_buffer:                      ; @hwmap_get_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x19, [x0, #8]
	ldr	x22, [x19]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x0]
	cbz	w8, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ff_default_get_video_buffer
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_ff_get_video_buffer
	str	x0, [sp, #24]
	cbz	x0, LBB0_7
; %bb.4:
	mov	x21, x0
	bl	_av_frame_alloc
	mov	x20, x0
	str	x0, [sp, #16]
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_av_hwframe_map
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.6:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	add	x0, sp, #24
	bl	_av_frame_free
	add	x0, sp, #16
	bl	_av_frame_free
	mov	x20, #0
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	x20, #0
	b	LBB0_9
LBB0_8:
	add	x0, sp, #24
	bl	_av_frame_free
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate source frame for software mapping.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to map frame to software: %d.\n"

	.no_dead_strip	_hwmap_get_buffer
.subsections_via_symbols
