	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxva2_frames_init
_dxva2_frames_init:                     ## @dxva2_frames_init
	.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, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rcx
	movq	_DXVA2_VideoDecoderRenderTarget@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_2
## %bb.1:
	movq	_DXVA2_VideoProcessorRenderTarget@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_2
## %bb.6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	xorl	%r15d, %r15d
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_dxva2_init_pool
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	%r14d, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DXVA2_VideoDecoderRenderTarget,8,3 ## @DXVA2_VideoDecoderRenderTarget
	.comm	_DXVA2_VideoProcessorRenderTarget,8,3 ## @DXVA2_VideoProcessorRenderTarget
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown surface type: %lu\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INVALID_HANDLE_VALUE,4,2       ## @INVALID_HANDLE_VALUE
L_.str.1:                               ## @.str.1
	.asciz	"Error creating an internal frame pool\n"

	.no_dead_strip	_dxva2_frames_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxva2_frames_init
_dxva2_frames_init:                     ; @dxva2_frames_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _DXVA2_VideoDecoderRenderTarget@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DXVA2_VideoDecoderRenderTarget@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _DXVA2_VideoProcessorRenderTarget@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DXVA2_VideoProcessorRenderTarget@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x8]
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_dxva2_init_pool
	tbnz	w0, #31, LBB0_6
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
Lloh9:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_AVERROR
LBB0_6:
	mov	x20, x0
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DXVA2_VideoDecoderRenderTarget,8,3 ; @DXVA2_VideoDecoderRenderTarget
	.comm	_DXVA2_VideoProcessorRenderTarget,8,3 ; @DXVA2_VideoProcessorRenderTarget
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown surface type: %lu\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INVALID_HANDLE_VALUE,4,2       ; @INVALID_HANDLE_VALUE
l_.str.1:                               ; @.str.1
	.asciz	"Error creating an internal frame pool\n"

	.no_dead_strip	_dxva2_frames_init
.subsections_via_symbols
