	.file	"extr_if_usb.c_if_usb_send_fw_pkt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"totalbytes = %d\n"
.LC1:
	.string	"Data length = %d\n"
.LC2:
	.string	"There are data to follow\n"
.LC3:
	.string	"seqnum = %d totalbytes = %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"Host has finished FW downloading\n"
	.section	.rodata.str1.1
.LC5:
	.string	"Donwloading FW JUMP BLOCK\n"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"Firmware download done; size %d\n"
	.text
	.p2align 4
	.type	if_usb_send_fw_pkt, @function
if_usb_send_fw_pkt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rax, QWORD PTR 48[rdi]
	mov	rbp, QWORD PTR 32[rdi]
	mov	edi, DWORD PTR LBTF_DEB_FW[rip]
	mov	r12, QWORD PTR [rax]
	call	lbtf_deb_enter@PLT
	mov	ecx, DWORD PTR 40[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	eax, DWORD PTR 4[rbx]
	test	ecx, ecx
	jne	.L2
	sub	DWORD PTR 24[rbx], 1
	mov	edx, eax
	mov	DWORD PTR [rbx], eax
.L2:
	mov	rdi, QWORD PTR 16[rbx]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	lbtf_deb_usb2@PLT
	movsx	rax, DWORD PTR [rbx]
	mov	edx, 4
	mov	rdi, rbp
	lea	rsi, [r12+rax*4]
	call	memcpy@PLT
	mov	eax, DWORD PTR [rbx]
	mov	edi, DWORD PTR 4[rbp]
	mov	DWORD PTR 4[rbx], eax
	add	eax, 4
	mov	DWORD PTR [rbx], eax
	call	le32_to_cpu@PLT
	mov	rdi, QWORD PTR 16[rbp]
	mov	edx, eax
	movsx	rax, DWORD PTR [rbx]
	lea	rsi, [r12+rax*4]
	call	memcpy@PLT
	mov	edi, DWORD PTR 4[rbp]
	call	le32_to_cpu@PLT
	mov	rdi, QWORD PTR 16[rbx]
	lea	rsi, .LC1[rip]
	mov	edx, eax
	xor	eax, eax
	call	lbtf_deb_usb2@PLT
	mov	eax, DWORD PTR 24[rbx]
	lea	edi, 1[rax]
	mov	DWORD PTR 24[rbx], edi
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	DWORD PTR 8[rbp], eax
	call	le32_to_cpu@PLT
	add	DWORD PTR [rbx], eax
	mov	edi, DWORD PTR 4[rbp]
	call	le32_to_cpu@PLT
	mov	rsi, QWORD PTR 32[rbx]
	xor	ecx, ecx
	mov	rdi, rbx
	lea	edx, 24[rax]
	call	usb_tx_block@PLT
	mov	edi, DWORD PTR FW_HAS_DATA_TO_RECV[rip]
	mov	r12d, DWORD PTR 0[rbp]
	call	cpu_to_le32@PLT
	cmp	r12d, eax
	je	.L7
	mov	edi, DWORD PTR FW_HAS_LAST_BLOCK[rip]
	mov	ebp, DWORD PTR 0[rbp]
	call	cpu_to_le32@PLT
	cmp	ebp, eax
	je	.L8
.L4:
	mov	rdi, QWORD PTR 16[rbx]
	mov	edx, DWORD PTR [rbx]
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	lbtf_deb_usb2@PLT
	mov	edi, DWORD PTR LBTF_DEB_FW[rip]
	call	lbtf_deb_leave@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rbx]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	lbtf_deb_usb2@PLT
	mov	edx, DWORD PTR 24[rbx]
	mov	rdi, QWORD PTR 16[rbx]
	xor	eax, eax
	mov	ecx, DWORD PTR [rbx]
	lea	rsi, .LC3[rip]
	call	lbtf_deb_usb2@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR 16[rbx]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	lbtf_deb_usb2@PLT
	mov	rdi, QWORD PTR 16[rbx]
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	lbtf_deb_usb2@PLT
	mov	DWORD PTR 8[rbx], 1
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	if_usb_send_fw_pkt, .-if_usb_send_fw_pkt
	.comm	LBTF_DEB_FW,4,4
	.comm	FW_HAS_LAST_BLOCK,4,4
	.comm	FW_HAS_DATA_TO_RECV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_if_usb.c_if_usb_send_fw_pkt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"totalbytes = %d\012\000"
	.align	2
.LC1:
	.ascii	"Data length = %d\012\000"
	.align	2
.LC2:
	.ascii	"There are data to follow\012\000"
	.align	2
.LC3:
	.ascii	"seqnum = %d totalbytes = %d\012\000"
	.align	2
.LC4:
	.ascii	"Host has finished FW downloading\012\000"
	.align	2
.LC5:
	.ascii	"Donwloading FW JUMP BLOCK\012\000"
	.align	2
.LC6:
	.ascii	"Firmware download done; size %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	if_usb_send_fw_pkt, %function
if_usb_send_fw_pkt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r7, .L9
	ldr	r3, [r0, #28]
	ldr	r0, [r7]
	ldr	r5, [r4, #20]
	ldr	r6, [r3]
	bl	lbtf_deb_enter
	ldr	r3, [r4, #24]
	ldr	r1, [r4, #4]
	cmp	r3, #0
	ldreq	r3, [r4, #16]
	ldr	r2, [r4]
	subeq	r3, r3, #1
	moveq	r2, r1
	streq	r1, [r4]
	streq	r3, [r4, #16]
	ldr	r1, .L9+4
	ldr	r0, [r4, #12]
	bl	lbtf_deb_usb2
	ldr	r1, [r4]
	mov	r2, #4
	add	r1, r6, r1, lsl #2
	mov	r0, r5
	bl	memcpy
	ldr	r3, [r4]
	ldr	r8, [r5, #12]
	add	r1, r3, #4
	stm	r4, {r1, r3}
	ldr	r0, [r5, #4]
	add	r6, r6, r1, lsl #2
	bl	le32_to_cpu
	mov	r1, r6
	mov	r2, r0
	mov	r0, r8
	bl	memcpy
	ldr	r0, [r5, #4]
	ldr	r6, [r4, #12]
	bl	le32_to_cpu
	ldr	r1, .L9+8
	mov	r2, r0
	mov	r0, r6
	bl	lbtf_deb_usb2
	ldr	r0, [r4, #16]
	add	r0, r0, #1
	str	r0, [r4, #16]
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r0, [r5, #4]
	str	r3, [r5, #8]
	bl	le32_to_cpu
	mov	r2, r0
	ldr	r3, [r4]
	ldr	r0, [r5, #4]
	add	r3, r3, r2
	str	r3, [r4]
	ldr	r6, [r4, #20]
	bl	le32_to_cpu
	mov	r1, r6
	add	r2, r0, #16
	mov	r3, #0
	mov	r0, r4
	bl	usb_tx_block
	ldr	r3, .L9+12
	ldr	r6, [r5]
	ldr	r0, [r3]
	bl	cpu_to_le32
	cmp	r6, r0
	beq	.L7
	ldr	r3, .L9+16
	ldr	r5, [r5]
	ldr	r0, [r3]
	bl	cpu_to_le32
	cmp	r5, r0
	beq	.L8
.L4:
	ldr	r2, [r4]
	ldr	r1, .L9+20
	ldr	r0, [r4, #12]
	bl	lbtf_deb_usb2
	ldr	r0, [r7]
	bl	lbtf_deb_leave
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r1, .L9+24
	ldr	r0, [r4, #12]
	bl	lbtf_deb_usb2
	ldr	r3, [r4]
	ldr	r2, [r4, #16]
	ldr	r1, .L9+28
	ldr	r0, [r4, #12]
	bl	lbtf_deb_usb2
	b	.L4
.L8:
	ldr	r1, .L9+32
	ldr	r0, [r4, #12]
	bl	lbtf_deb_usb2
	ldr	r1, .L9+36
	ldr	r0, [r4, #12]
	bl	lbtf_deb_usb2
	mov	r3, #1
	str	r3, [r4, #8]
	b	.L4
.L10:
	.align	2
.L9:
	.word	LBTF_DEB_FW
	.word	.LC0
	.word	.LC1
	.word	FW_HAS_DATA_TO_RECV
	.word	FW_HAS_LAST_BLOCK
	.word	.LC6
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	if_usb_send_fw_pkt, .-if_usb_send_fw_pkt
	.comm	LBTF_DEB_FW,4,4
	.comm	FW_HAS_LAST_BLOCK,4,4
	.comm	FW_HAS_DATA_TO_RECV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
