	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_usb_send_fw_pkt
_if_usb_send_fw_pkt:                    ## @if_usb_send_fw_pkt
	.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
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movq	48(%rdi), %rax
	movq	(%rax), %r12
	movq	_LBTF_DEB_FW@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_lbtf_deb_enter
	cmpl	$0, 40(%rbx)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edx
	jmp	LBB0_3
LBB0_2:
	movl	4(%rbx), %edx
	movl	%edx, (%rbx)
	decl	24(%rbx)
LBB0_3:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	movslq	(%rbx), %rax
	leaq	(%r12,%rax,4), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	(%rbx), %eax
	movl	%eax, 4(%rbx)
	addl	$4, %eax
	movl	%eax, (%rbx)
	movq	16(%r14), %r15
	cltq
	leaq	(%r12,%rax,4), %r12
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movq	16(%rbx), %r15
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	movl	24(%rbx), %edi
	incl	%edi
	movl	%edi, 24(%rbx)
	callq	_cpu_to_le32
	movl	%eax, 8(%r14)
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	addl	%eax, (%rbx)
	movq	32(%rbx), %r15
	movl	4(%r14), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	leal	24(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_usb_tx_block
	movl	(%r14), %r15d
	movq	_FW_HAS_DATA_TO_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	cmpl	%eax, %r15d
	jne	LBB0_5
## %bb.4:
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	movq	16(%rbx), %rdi
	movl	24(%rbx), %edx
	movl	(%rbx), %ecx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	jmp	LBB0_7
LBB0_5:
	movl	(%r14), %r14d
	movq	_FW_HAS_LAST_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	cmpl	%eax, %r14d
	jne	LBB0_7
## %bb.6:
	movq	16(%rbx), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	movq	16(%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	movl	$1, 8(%rbx)
LBB0_7:
	movq	16(%rbx), %rdi
	movl	(%rbx), %edx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_lbtf_deb_usb2
	movl	(%r13), %edi
	callq	_lbtf_deb_leave
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LBTF_DEB_FW,4,2                ## @LBTF_DEB_FW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"totalbytes = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Data length = %d\n"

	.comm	_FW_HAS_DATA_TO_RECV,4,2        ## @FW_HAS_DATA_TO_RECV
L_.str.2:                               ## @.str.2
	.asciz	"There are data to follow\n"

L_.str.3:                               ## @.str.3
	.asciz	"seqnum = %d totalbytes = %d\n"

	.comm	_FW_HAS_LAST_BLOCK,4,2          ## @FW_HAS_LAST_BLOCK
L_.str.4:                               ## @.str.4
	.asciz	"Host has finished FW downloading\n"

L_.str.5:                               ## @.str.5
	.asciz	"Downloading FW JUMP BLOCK\n"

L_.str.6:                               ## @.str.6
	.asciz	"Firmware download done; size %d\n"

	.no_dead_strip	_if_usb_send_fw_pkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function if_usb_send_fw_pkt
_if_usb_send_fw_pkt:                    ; @if_usb_send_fw_pkt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	x8, [x0, #48]
	ldr	x22, [x8]
Lloh0:
	adrp	x23, _LBTF_DEB_FW@GOTPAGE
Lloh1:
	ldr	x23, [x23, _LBTF_DEB_FW@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_lbtf_deb_enter
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19, #4]
	str	w8, [x19]
	ldr	w9, [x19, #24]
	sub	w9, w9, #1
	str	w9, [x19, #24]
LBB0_3:
	ldr	x0, [x19, #16]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_lbtf_deb_usb2
	ldrsw	x8, [x19]
	add	x1, x22, x8, lsl #2
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x19]
	add	w9, w8, #4
	stp	w9, w8, [x19]
	ldr	x21, [x20, #16]
	add	x22, x22, w9, sxtw #2
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_memcpy
	ldr	x21, [x19, #16]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_lbtf_deb_usb2
	ldr	w8, [x19, #24]
	add	w0, w8, #1
	str	w0, [x19, #24]
	bl	_cpu_to_le32
	str	w0, [x20, #8]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	ldr	x21, [x19, #32]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	add	w2, w0, #24
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_usb_tx_block
	ldr	w21, [x20]
Lloh6:
	adrp	x8, _FW_HAS_DATA_TO_RECV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FW_HAS_DATA_TO_RECV@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	cmp	w21, w0
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x19, #16]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_lbtf_deb_usb2
	ldr	x0, [x19, #16]
	ldr	w8, [x19, #24]
	ldr	w9, [x19]
	stp	x8, x9, [sp]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_lbtf_deb_usb2
	b	LBB0_7
LBB0_5:
	ldr	w20, [x20]
Lloh13:
	adrp	x8, _FW_HAS_LAST_BLOCK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FW_HAS_LAST_BLOCK@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	cmp	w20, w0
	b.ne	LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_lbtf_deb_usb2
	ldr	x0, [x19, #16]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_lbtf_deb_usb2
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_7:
	ldr	x0, [x19, #16]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_lbtf_deb_usb2
	ldr	w0, [x23]
	bl	_lbtf_deb_leave
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_LBTF_DEB_FW,4,2                ; @LBTF_DEB_FW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"totalbytes = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Data length = %d\n"

	.comm	_FW_HAS_DATA_TO_RECV,4,2        ; @FW_HAS_DATA_TO_RECV
l_.str.2:                               ; @.str.2
	.asciz	"There are data to follow\n"

l_.str.3:                               ; @.str.3
	.asciz	"seqnum = %d totalbytes = %d\n"

	.comm	_FW_HAS_LAST_BLOCK,4,2          ; @FW_HAS_LAST_BLOCK
l_.str.4:                               ; @.str.4
	.asciz	"Host has finished FW downloading\n"

l_.str.5:                               ; @.str.5
	.asciz	"Downloading FW JUMP BLOCK\n"

l_.str.6:                               ; @.str.6
	.asciz	"Firmware download done; size %d\n"

	.no_dead_strip	_if_usb_send_fw_pkt
.subsections_via_symbols
