	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d11va_device_init
_d3d11va_device_init:                   ## @d3d11va_device_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	cmpq	$0, 32(%rbx)
	jne	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_CreateMutex
	movq	%rax, (%rbx)
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movq	_d3d11va_default_lock@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_d3d11va_default_unlock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
LBB0_3:
	leaq	12(%rbx), %r14
	cmpl	$0, 12(%rbx)
	jne	LBB0_5
## %bb.4:
	movl	20(%rbx), %edi
	movq	%r14, %rsi
	callq	_ID3D11Device_GetImmediateContext
	cmpl	$0, 12(%rbx)
	je	LBB0_9
LBB0_5:
	cmpl	$0, 16(%rbx)
	jne	LBB0_7
## %bb.6:
	leaq	16(%rbx), %rdx
	movl	20(%rbx), %edi
	movq	_IID_ID3D11VideoDevice@GOTPCREL(%rip), %rsi
	callq	_ID3D11DeviceContext_QueryInterface
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_9
LBB0_7:
	xorl	%eax, %eax
	cmpl	$0, 8(%rbx)
	jne	LBB0_10
## %bb.8:
	addq	$8, %rbx
	movl	(%r14), %edi
	movq	_IID_ID3D11VideoContext@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdx
	callq	_ID3D11DeviceContext_QueryInterface
	movl	%eax, %edi
	callq	_FAILED
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_10
LBB0_9:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create a mutex\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_d3d11va_default_lock,8,3       ## @d3d11va_default_lock
	.comm	_d3d11va_default_unlock,4,2     ## @d3d11va_default_unlock
	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_IID_ID3D11VideoDevice,4,2      ## @IID_ID3D11VideoDevice
	.comm	_IID_ID3D11VideoContext,4,2     ## @IID_ID3D11VideoContext
	.no_dead_strip	_d3d11va_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d11va_device_init
_d3d11va_device_init:                   ; @d3d11va_device_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_4
; %bb.1:
	mov	x0, #0
	mov	w1, #0
	mov	x2, #0
	bl	_CreateMutex
	str	x0, [x19]
Lloh0:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_3:
Lloh11:
	adrp	x8, _d3d11va_default_lock@GOTPAGE
Lloh12:
	ldr	x8, [x8, _d3d11va_default_lock@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x19, #32]
Lloh14:
	adrp	x8, _d3d11va_default_unlock@GOTPAGE
Lloh15:
	ldr	x8, [x8, _d3d11va_default_unlock@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #24]
LBB0_4:
	mov	x20, x19
	ldr	w8, [x20, #12]!
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	w0, [x19, #20]
	mov	x1, x20
	bl	_ID3D11Device_GetImmediateContext
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_8
LBB0_6:
	mov	x2, x19
	ldr	w8, [x2, #16]!
	cbnz	w8, LBB0_9
; %bb.7:
	ldr	w0, [x19, #20]
Lloh17:
	adrp	x1, _IID_ID3D11VideoDevice@GOTPAGE
Lloh18:
	ldr	x1, [x1, _IID_ID3D11VideoDevice@GOTPAGEOFF]
	bl	_ID3D11DeviceContext_QueryInterface
	bl	_FAILED
	cbz	x0, LBB0_9
LBB0_8:
Lloh19:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_9:
	ldr	w8, [x19, #8]!
	cbz	w8, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	ldr	w0, [x20]
Lloh22:
	adrp	x1, _IID_ID3D11VideoContext@GOTPAGE
Lloh23:
	ldr	x1, [x1, _IID_ID3D11VideoContext@GOTPAGEOFF]
	mov	x2, x19
	bl	_ID3D11DeviceContext_QueryInterface
	bl	_FAILED
Lloh24:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create a mutex\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_d3d11va_default_lock,8,3       ; @d3d11va_default_lock
	.comm	_d3d11va_default_unlock,4,2     ; @d3d11va_default_unlock
	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_IID_ID3D11VideoDevice,4,2      ; @IID_ID3D11VideoDevice
	.comm	_IID_ID3D11VideoContext,4,2     ; @IID_ID3D11VideoContext
	.no_dead_strip	_d3d11va_device_init
.subsections_via_symbols
