	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function go7007_usb_send_firmware
_go7007_usb_send_firmware:              ## @go7007_usb_send_firmware
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	callq	_pr_debug
	movq	8(%rbx), %rax
	movq	_GO7007_USB_EZUSB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	andl	(%rax), %ecx
	sete	%sil
	movl	(%rbx), %edi
	orl	$2, %esi
	callq	_usb_sndbulkpipe
	movl	(%rbx), %edi
	leaq	-28(%rbp), %r8
	movl	%eax, %esi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	movl	$500, %r9d                      ## imm = 0x1F4
	callq	_usb_bulk_msg
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DownloadBuffer sending %d bytes\n"

	.comm	_GO7007_USB_EZUSB,4,2           ## @GO7007_USB_EZUSB
	.no_dead_strip	_go7007_usb_send_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function go7007_usb_send_firmware
_go7007_usb_send_firmware:              ; @go7007_usb_send_firmware
	.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
	ldr	x21, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	bl	_pr_debug
	ldr	x8, [x21, #8]
Lloh2:
	adrp	x9, _GO7007_USB_EZUSB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GO7007_USB_EZUSB@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh4:
	ldr	w9, [x9]
	ldr	w0, [x21]
	tst	w9, w8
	mov	w8, #2
	cinc	w1, w8, eq
	bl	_usb_sndbulkpipe
	mov	x1, x0
	ldr	w0, [x21]
	add	x4, sp, #12
	mov	x2, x20
	mov	x3, x19
	mov	w5, #500
	bl	_usb_bulk_msg
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DownloadBuffer sending %d bytes\n"

	.comm	_GO7007_USB_EZUSB,4,2           ; @GO7007_USB_EZUSB
	.no_dead_strip	_go7007_usb_send_firmware
.subsections_via_symbols
