	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function hdpvr_device_init
LCPI0_0:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_hdpvr_device_init:                     ## @hdpvr_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_device_authorization
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EACCES@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	callq	_hdpvr_set_options
	leaq	12(%r15), %rdi
	movq	%rdi, %rbx
	callq	_mutex_lock
	movq	(%r15), %rax
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [3,3,0,0]
	movups	%xmm0, (%rax)
	movq	%rax, %r13
	movl	20(%r15), %r12d
	xorl	%r14d, %r14d
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_CTRL_LOW_PASS_FILTER_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_CTRL_DEFAULT_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	$1, %edx
	movl	$56, %ecx
	pushq	$1000                           ## imm = 0x3E8
	pushq	$4
	pushq	%r13
	callq	_usb_control_msg
	addq	$32, %rsp
	movq	_MSG_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_hdpvr_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	16(%r15), %r12
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdx
	movl	%eax, %r8d
	callq	_v4l2_dbg
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r13, %rbx
	movl	$1, (%r13)
	movl	20(%r15), %r13d
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	subq	$8, %rsp
	movl	%r13d, %edi
	movl	%eax, %esi
	movl	$212, %edx
	movl	$56, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$1000                           ## imm = 0x3E8
	pushq	$1
	pushq	%rbx
	callq	_usb_control_msg
	addq	$32, %rsp
	movq	_MSG_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_hdpvr_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdx
	leaq	L_.str(%rip), %rcx
	movl	%eax, %r8d
	callq	_v4l2_dbg
	movq	_boost_audio@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %r13
	movl	20(%r15), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$213, %edx
	movl	$56, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$1000                           ## imm = 0x3E8
	pushq	$1
	pushq	%r13
	callq	_usb_control_msg
	addq	$32, %rsp
	movq	_MSG_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_hdpvr_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdx
	leaq	L_.str(%rip), %rcx
	movl	%eax, %r8d
	callq	_v4l2_dbg
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_STATUS_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_CTRL_LOW_PASS_FILTER_VALUE,4,2 ## @CTRL_LOW_PASS_FILTER_VALUE
	.comm	_CTRL_DEFAULT_INDEX,4,2         ## @CTRL_DEFAULT_INDEX
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.comm	_hdpvr_debug,4,2                ## @hdpvr_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"control request returned %d\n"

	.comm	_boost_audio,4,2                ## @boost_audio
	.comm	_STATUS_IDLE,4,2                ## @STATUS_IDLE
	.no_dead_strip	_hdpvr_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hdpvr_device_init
lCPI0_0:
	.long	3                               ; 0x3
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_hdpvr_device_init:                     ; @hdpvr_device_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_device_authorization
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EACCES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_hdpvr_set_options
	add	x20, x19, #12
	mov	x0, x20
	bl	_mutex_lock
	ldr	x21, [x19]
	mov	w8, #3
	str	w8, [x21]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x21, #4]
	str	wzr, [x21, #12]
	ldr	w22, [x19, #20]
	mov	x0, x22
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh5:
	adrp	x8, _CTRL_LOW_PASS_FILTER_VALUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTRL_LOW_PASS_FILTER_VALUE@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
Lloh8:
	adrp	x8, _CTRL_DEFAULT_INDEX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CTRL_DEFAULT_INDEX@GOTPAGEOFF]
Lloh10:
	ldr	w5, [x8]
	mov	w25, #1000
	str	w25, [sp]
	mov	w24, #1
	mov	x0, x22
	mov	w2, #1
	mov	w3, #56
	mov	x6, x21
	mov	w7, #4
	bl	_usb_control_msg
	mov	x4, x0
Lloh11:
	adrp	x26, _MSG_INFO@GOTPAGE
Lloh12:
	ldr	x26, [x26, _MSG_INFO@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh13:
	adrp	x27, _hdpvr_debug@GOTPAGE
Lloh14:
	ldr	x27, [x27, _hdpvr_debug@GOTPAGEOFF]
	ldr	w1, [x27]
	add	x22, x19, #16
Lloh15:
	adrp	x23, l_.str@PAGE
Lloh16:
	add	x23, x23, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x23
	bl	_v4l2_dbg
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x20
	bl	_mutex_lock
	str	w24, [x21]
	ldr	w24, [x19, #20]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	str	w25, [sp]
	mov	x0, x24
	mov	w2, #212
	mov	w3, #56
	mov	w4, #0
	mov	w5, #0
	mov	x6, x21
	mov	w7, #1
	bl	_usb_control_msg
	mov	x4, x0
	ldr	w0, [x26]
	ldr	w1, [x27]
	mov	x2, x22
	mov	x3, x23
	bl	_v4l2_dbg
Lloh17:
	adrp	x8, _boost_audio@GOTPAGE
Lloh18:
	ldr	x8, [x8, _boost_audio@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x21]
	ldr	w24, [x19, #20]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
	str	w25, [sp]
	mov	x0, x24
	mov	w2, #213
	mov	w3, #56
	mov	w4, #0
	mov	w5, #0
	mov	x6, x21
	mov	w7, #1
	bl	_usb_control_msg
	mov	x4, x0
	ldr	w0, [x26]
	ldr	w1, [x27]
	mov	x2, x22
	mov	x3, x23
	bl	_v4l2_dbg
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
Lloh20:
	adrp	x8, _STATUS_IDLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _STATUS_IDLE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_CTRL_LOW_PASS_FILTER_VALUE,4,2 ; @CTRL_LOW_PASS_FILTER_VALUE
	.comm	_CTRL_DEFAULT_INDEX,4,2         ; @CTRL_DEFAULT_INDEX
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.comm	_hdpvr_debug,4,2                ; @hdpvr_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"control request returned %d\n"

	.comm	_boost_audio,4,2                ; @boost_audio
	.comm	_STATUS_IDLE,4,2                ; @STATUS_IDLE
	.no_dead_strip	_hdpvr_device_init
.subsections_via_symbols
