	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reg_w
_reg_w:                                 ## @reg_w
	.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	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$5, %edi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_PDEBUG
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movb	%r12b, (%rax)
	movl	20(%rbx), %r12d
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	8(%rbx), %rcx
	movq	_BCL_OV518@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpq	(%rdx), %rcx
	sete	%sil
	movl	$2, %edx
	subl	%esi, %edx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	movl	%r14d, %r9d
	pushq	$1000                           ## imm = 0x3E8
	pushq	$1
	pushq	(%rbx)
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jns	LBB0_2
## %bb.1:
	movq	_urb_errlist@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_symbolic
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_err
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%02X:0x%02X"

	.comm	_BCL_OV518,8,3                  ## @BCL_OV518
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"reg write: error %d: %s"

	.comm	_urb_errlist,4,2                ## @urb_errlist
	.no_dead_strip	_reg_w
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reg_w
_reg_w:                                 ; @reg_w
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #5
	mov	x2, x20
	mov	x3, x19
	bl	_PDEBUG
	add	x22, x21, #16
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x21]
	strb	w19, [x8]
	ldr	w19, [x21, #20]
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh2:
	adrp	x8, _BCL_OV518@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCL_OV518@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldp	x6, x9, [x21]
	cmp	x9, x8
	mov	w8, #1
Lloh5:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
	cinc	w2, w8, ne
Lloh7:
	ldr	w8, [x9]
Lloh8:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w8, #1000
	str	w8, [sp]
	mov	x0, x19
	mov	w4, #0
	mov	x5, x20
	mov	w7, #1
	bl	_usb_control_msg
	mov	x19, x0
	mov	x0, x22
	bl	_mutex_unlock
	tbz	w19, #31, LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _urb_errlist@GOTPAGE
Lloh12:
	ldr	x8, [x8, _urb_errlist@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_symbolic
	mov	x2, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_err
LBB0_2:
	mov	x0, x19
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%02X:0x%02X"

	.comm	_BCL_OV518,8,3                  ; @BCL_OV518
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"reg write: error %d: %s"

	.comm	_urb_errlist,4,2                ; @urb_errlist
	.no_dead_strip	_reg_w
.subsections_via_symbols
