	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_hwframe_ctx
_set_hwframe_ctx:                       ## @set_hwframe_ctx
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_av_hwframe_ctx_alloc
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_AV_PIX_FMT_VAAPI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	_AV_PIX_FMT_NV12@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	_width@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	_height@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movl	$20, (%rax)
	movq	%rbx, %rdi
	callq	_av_hwframe_ctx_init
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_av_buffer_ref
	movl	%eax, (%r14)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	jmp	LBB0_6
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_av_err2str
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_6:
	leaq	-32(%rbp), %rdi
	callq	_av_buffer_unref
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create VAAPI frame context.\n"

	.comm	_AV_PIX_FMT_VAAPI,4,2           ## @AV_PIX_FMT_VAAPI
	.comm	_AV_PIX_FMT_NV12,4,2            ## @AV_PIX_FMT_NV12
	.comm	_width,4,2                      ## @width
	.comm	_height,4,2                     ## @height
L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize VAAPI frame context.Error code: %s\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_set_hwframe_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_hwframe_ctx
_set_hwframe_ctx:                       ; @set_hwframe_ctx
	.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, x0
	mov	x0, x1
	bl	_av_hwframe_ctx_alloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AV_PIX_FMT_VAAPI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_VAAPI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8, #16]
Lloh3:
	adrp	x9, _AV_PIX_FMT_NV12@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PIX_FMT_NV12@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _width@GOTPAGE
Lloh7:
	ldr	x10, [x10, _width@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #8]
Lloh9:
	adrp	x9, _height@GOTPAGE
Lloh10:
	ldr	x9, [x9, _height@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	w10, #20
	stp	w10, w9, [x8]
	bl	_av_hwframe_ctx_init
	mov	x19, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x0, x21
	bl	_av_buffer_ref
	str	w0, [x20]
	cbnz	w0, LBB0_6
; %bb.3:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x19, x0
	b	LBB0_6
LBB0_4:
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w19, #-1
	b	LBB0_7
LBB0_5:
Lloh20:
	adrp	x8, _stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_av_err2str
	str	x0, [sp]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fprintf
LBB0_6:
	add	x0, sp, #8
	bl	_av_buffer_unref
LBB0_7:
	mov	x0, x19
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create VAAPI frame context.\n"

	.comm	_AV_PIX_FMT_VAAPI,4,2           ; @AV_PIX_FMT_VAAPI
	.comm	_AV_PIX_FMT_NV12,4,2            ; @AV_PIX_FMT_NV12
	.comm	_width,4,2                      ; @width
	.comm	_height,4,2                     ; @height
l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize VAAPI frame context.Error code: %s\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_set_hwframe_ctx
.subsections_via_symbols
