	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_init_child_ctx
_qsv_init_child_ctx:                    ## @qsv_init_child_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	40(%rdi), %rax
	movq	48(%rdi), %rcx
	movq	(%rcx), %r15
	movq	(%rax), %rax
	movq	(%rax), %r13
	movq	$0, -48(%rbp)
	cmpq	$0, 8(%r13)
	je	LBB0_1
## %bb.2:
	movl	16(%r13), %edi
	callq	_av_hwdevice_ctx_alloc
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_av_hwdevice_ctx_init
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_av_hwframe_ctx_alloc
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	movq	(%rax), %rbx
	movl	(%r13), %eax
	movl	%eax, 36(%rbx)
	movl	32(%r12), %eax
	movl	%eax, 32(%rbx)
	movl	(%r12), %eax
	movl	%eax, (%rbx)
	movq	24(%r12), %rdi
	movl	$16, %esi
	callq	_FFALIGN
	movq	%rax, 24(%rbx)
	movq	16(%r12), %rdi
	movl	$16, %esi
	callq	_FFALIGN
	movq	%rax, 16(%rbx)
	movq	%r15, %rdi
	callq	_av_hwframe_ctx_init
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_10
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	$0, -48(%rbp)
	jmp	LBB0_13
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	jmp	LBB0_13
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_11:
	movq	%r12, %rdi
	callq	_av_log
LBB0_13:
	leaq	-64(%rbp), %rdi
	callq	_av_buffer_unref
	leaq	-48(%rbp), %rdi
	callq	_av_buffer_unref
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	"Cannot create a non-opaque internal surface pool without a hardware handle\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Error initializing a child device context\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error initializing a child frames context\n"

	.comm	_AV_HWDEVICE_TYPE_DXVA2,8,3     ## @AV_HWDEVICE_TYPE_DXVA2
	.comm	_AV_HWDEVICE_TYPE_VAAPI,8,3     ## @AV_HWDEVICE_TYPE_VAAPI
	.comm	_DXVA2_VideoDecoderRenderTarget,8,3 ## @DXVA2_VideoDecoderRenderTarget
	.comm	_DXVA2_VideoProcessorRenderTarget,8,3 ## @DXVA2_VideoProcessorRenderTarget
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET,8,3 ## @MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET,4,2 ## @MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET
	.no_dead_strip	_qsv_init_child_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_init_child_ctx
_qsv_init_child_ctx:                    ; @qsv_init_child_ctx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldp	x9, x8, [x0, #40]
	ldr	x22, [x8]
	ldr	x8, [x9]
	ldr	x23, [x8]
	str	xzr, [sp]
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w0, [x23, #16]
	bl	_av_hwdevice_ctx_alloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	bl	_av_hwdevice_ctx_init
	tbnz	w0, #31, LBB0_9
; %bb.3:
	mov	x0, x21
	bl	_av_hwframe_ctx_alloc
	str	x0, [sp]
	cbz	x0, LBB0_10
; %bb.4:
	mov	x21, x0
	ldr	x20, [x0]
	ldr	w8, [x23]
	str	w8, [x20, #36]
	ldr	w8, [x19, #32]
	str	w8, [x20, #32]
	ldr	w8, [x19]
	str	w8, [x20]
	ldr	x0, [x19, #24]
	mov	w1, #16
	bl	_FFALIGN
	str	x0, [x20, #24]
	ldr	x0, [x19, #16]
	mov	w1, #16
	bl	_FFALIGN
	str	x0, [x20, #16]
	mov	x0, x21
	bl	_av_hwframe_ctx_init
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.5:
	str	x21, [x22]
	str	xzr, [sp]
	b	LBB0_13
LBB0_6:
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
	bl	_av_log
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_9:
	mov	x20, x0
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_13
LBB0_11:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_av_log
LBB0_13:
	add	x0, sp, #8
	bl	_av_buffer_unref
	mov	x0, sp
	bl	_av_buffer_unref
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot create a non-opaque internal surface pool without a hardware handle\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Error initializing a child device context\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error initializing a child frames context\n"

	.comm	_AV_HWDEVICE_TYPE_DXVA2,8,3     ; @AV_HWDEVICE_TYPE_DXVA2
	.comm	_AV_HWDEVICE_TYPE_VAAPI,8,3     ; @AV_HWDEVICE_TYPE_VAAPI
	.comm	_DXVA2_VideoDecoderRenderTarget,8,3 ; @DXVA2_VideoDecoderRenderTarget
	.comm	_DXVA2_VideoProcessorRenderTarget,8,3 ; @DXVA2_VideoProcessorRenderTarget
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET,8,3 ; @MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET,4,2 ; @MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET
	.no_dead_strip	_qsv_init_child_ctx
.subsections_via_symbols
