	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbvision_write_reg_irq
_usbvision_write_reg_irq:               ## @usbvision_write_reg_irq
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	_DBG_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpl	$9, %r14d
	jl	LBB0_2
## %bb.1:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	cmpl	$0, (%r12)
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movl	$1, (%r12)
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_USB_RECIP_ENDPOINT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	leaq	16(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, 16(%r12)
	movq	_USBVISION_OP_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	$0, 40(%r12)
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movq	%rax, 32(%r12)
	movl	%r14d, %edi
	callq	_cpu_to_le16
	movq	%rax, 24(%r12)
	movl	4(%r12), %r13d
	movl	56(%r12), %ebx
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_usb_sndctrlpipe
	movq	8(%r12), %r8
	movq	_usbvision_ctrl_urb_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, %r9d
	pushq	%r12
	pushq	%r10
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movq	8(%r12), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movl	4(%r12), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movl	$0, (%r12)
LBB0_6:
	movq	_DBG_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_PDEBUG
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_IRQ,4,2                    ## @DBG_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_ENDPOINT,4,2         ## @USB_RECIP_ENDPOINT
	.comm	_USBVISION_OP_CODE,4,2          ## @USBVISION_OP_CODE
	.comm	_usbvision_ctrl_urb_complete,4,2 ## @usbvision_ctrl_urb_complete
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"submit %d byte: error %d"

	.no_dead_strip	_usbvision_write_reg_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbvision_write_reg_irq
_usbvision_write_reg_irq:               ; @usbvision_write_reg_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x25, _DBG_IRQ@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DBG_IRQ@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	cmp	w19, #9
	b.lt	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.3:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	mov	w8, #1
	str	w8, [x20]
Lloh8:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _USB_RECIP_ENDPOINT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _USB_RECIP_ENDPOINT@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh16:
	ldr	w9, [x10]
	orr	w8, w8, w9
	mov	x23, x20
	str	w8, [x23, #16]!
Lloh17:
	adrp	x8, _USBVISION_OP_CODE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _USBVISION_OP_CODE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	str	xzr, [x20, #40]
	mov	x0, x22
	bl	_cpu_to_le16
	str	x0, [x20, #32]
	mov	x0, x19
	bl	_cpu_to_le16
	str	x0, [x20, #24]
	ldr	w22, [x20, #4]
	ldr	w24, [x20, #56]
	mov	x0, x24
	mov	w1, #1
	bl	_usb_sndctrlpipe
	mov	x2, x0
	ldr	x4, [x20, #8]
Lloh20:
	adrp	x8, _usbvision_ctrl_urb_complete@GOTPAGE
Lloh21:
	ldr	x8, [x8, _usbvision_ctrl_urb_complete@GOTPAGEOFF]
Lloh22:
	ldr	w6, [x8]
	mov	x0, x22
	mov	x1, x24
	mov	x3, x23
	mov	x5, x19
	mov	x7, x20
	bl	_usb_fill_control_urb
	ldr	x0, [x20, #8]
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	w0, [x20, #4]
Lloh23:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	mov	x21, x0
	tbz	w0, #31, LBB0_8
; %bb.7:
	str	wzr, [x20]
LBB0_8:
	ldr	w0, [x25]
	stp	x19, x21, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
	b	LBB0_5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_IRQ,4,2                    ; @DBG_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_ENDPOINT,4,2         ; @USB_RECIP_ENDPOINT
	.comm	_USBVISION_OP_CODE,4,2          ; @USBVISION_OP_CODE
	.comm	_usbvision_ctrl_urb_complete,4,2 ; @usbvision_ctrl_urb_complete
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"submit %d byte: error %d"

	.no_dead_strip	_usbvision_write_reg_irq
.subsections_via_symbols
