	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reg_r
_reg_r:                                 ## @reg_r
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	20(%rbx), %r12d
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_BCL_OV518@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rdx
	xorl	%esi, %esi
	cmpq	(%rcx), %rdx
	setne	%sil
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rdx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	leal	(%rsi,%rsi), %edx
	incl	%edx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	pushq	$1000                           ## imm = 0x3E8
	pushq	$1
	pushq	8(%rbx)
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	8(%rbx), %rax
	movl	(%rax), %r12d
	movzbl	%r15b, %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$5, %edi
	movl	%r12d, %ecx
	callq	_PDEBUG
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %r12d
	movq	_urb_errlist@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_symbolic
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_err
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCL_OV518,8,3                  ## @BCL_OV518
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg read: error %d: %s"

	.comm	_urb_errlist,4,2                ## @urb_errlist
L_.str.1:                               ## @.str.1
	.asciz	"0x%02X:0x%02X"

	.no_dead_strip	_reg_r
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reg_r
_reg_r:                                 ; @reg_r
	.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, x1
	mov	x21, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	ldr	w22, [x21, #20]
	mov	x0, x22
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh0:
	adrp	x8, _BCL_OV518@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCL_OV518@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
	ldp	x10, x6, [x21]
	cmp	x10, x8
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	w8, #3
	csinc	w2, w8, wzr, ne
	mov	w8, #1000
	str	w8, [sp]
	mov	x0, x22
	mov	w4, #0
	mov	x5, x20
	mov	w7, #1
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	w22, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #5
	mov	x2, x20
	mov	x3, x22
	bl	_PDEBUG
	b	LBB0_3
LBB0_2:
	mov	x22, x0
Lloh14:
	adrp	x8, _urb_errlist@GOTPAGE
Lloh15:
	ldr	x8, [x8, _urb_errlist@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_symbolic
	mov	x2, x0
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_err
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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 AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BCL_OV518,8,3                  ; @BCL_OV518
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg read: error %d: %s"

	.comm	_urb_errlist,4,2                ; @urb_errlist
l_.str.1:                               ; @.str.1
	.asciz	"0x%02X:0x%02X"

	.no_dead_strip	_reg_r
.subsections_via_symbols
