	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function go7007_usb_onboard_write_interrupt
_go7007_usb_onboard_write_interrupt:    ## @go7007_usb_onboard_write_interrupt
	.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, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movzbl	%bl, %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	sarl	$8, %ebx
	movl	%ebx, 4(%rcx)
	movzbl	%r14b, %eax
	movl	%eax, 8(%rcx)
	sarl	$8, %r14d
	movl	%r14d, 12(%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rcx)
	movl	(%r12), %ebx
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_usb_sndctrlpipe
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rdx
	movq	_USB_RECIP_ENDPOINT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	subq	$8, %rsp
	xorl	%r14d, %r14d
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$21930, %r8d                    ## imm = 0x55AA
	movl	$61680, %r9d                    ## imm = 0xF0F0
	pushq	$500                            ## imm = 0x1F4
	pushq	$8
	pushq	(%r15)
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	8(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%ebx, %r14d
LBB0_2:
	movl	%r14d, %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	"WriteInterrupt: %04x %04x\n"

	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_ENDPOINT,4,2         ## @USB_RECIP_ENDPOINT
L_.str.1:                               ## @.str.1
	.asciz	"error in WriteInterrupt: %d\n"

	.no_dead_strip	_go7007_usb_onboard_write_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function go7007_usb_onboard_write_interrupt
_go7007_usb_onboard_write_interrupt:    ; @go7007_usb_onboard_write_interrupt
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	and	w8, w20, #0xff
	ldr	x9, [x19]
	asr	w10, w20, #8
	stp	w8, w10, [x9]
	and	w8, w21, #0xff
	asr	w10, w21, #8
	stp	w8, w10, [x9, #8]
	stp	xzr, xzr, [x9, #16]
	ldr	w20, [x22]
	mov	x0, x20
	mov	w1, #2
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh2:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _USB_RECIP_ENDPOINT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USB_RECIP_ENDPOINT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w3, w9, w8
	ldr	x6, [x19]
	mov	w8, #500
	str	w8, [sp]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #21930
	mov	w5, #61680
	mov	w7, #8
	bl	_usb_control_msg
	mov	x20, x0
	mov	w0, #0
	tbz	w20, #31, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	x0, x20
LBB0_2:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WriteInterrupt: %04x %04x\n"

	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_ENDPOINT,4,2         ; @USB_RECIP_ENDPOINT
l_.str.1:                               ; @.str.1
	.asciz	"error in WriteInterrupt: %d\n"

	.no_dead_strip	_go7007_usb_onboard_write_interrupt
.subsections_via_symbols
