	.file	"extr_btusb.c_btusb_setup_qca_load_rampatch.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"qca/rampatch_usb_%08x.bin"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"failed to request rampatch file: %s (%d)"
	.section	.rodata.str1.1
.LC2:
	.string	"using rampatch file: %s"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"QCA: patch rome 0x%x build 0x%x, firmware rome 0x%x build 0x%x"
	.align 8
.LC4:
	.string	"rampatch file version did not match with firmware"
	.text
	.p2align 4
	.type	btusb_setup_qca_load_rampatch, @function
btusb_setup_qca_load_rampatch:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	edi, DWORD PTR 4[rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	lea	r15, 16[rsp]
	call	le32_to_cpu@PLT
	mov	edi, DWORD PTR [r12]
	mov	ebx, eax
	call	le32_to_cpu@PLT
	mov	esi, 64
	mov	rdi, r15
	mov	ecx, ebx
	lea	rdx, .LC0[rip]
	mov	r14d, eax
	call	snprintf@PLT
	lea	rdi, 8[rsp]
	mov	rdx, rbp
	mov	rsi, r15
	call	request_firmware@PLT
	test	eax, eax
	jne	.L11
	mov	rdx, r15
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	bt_dev_info@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	r15, QWORD PTR 8[r13]
	add	r15, QWORD PTR [rax]
	mov	edi, DWORD PTR 4[r15]
	call	le16_to_cpu@PLT
	mov	edi, DWORD PTR [r15]
	mov	r12d, eax
	call	le16_to_cpu@PLT
	mov	r9d, r14d
	mov	r8d, ebx
	mov	edx, r12d
	mov	r15d, eax
	mov	ecx, eax
	lea	rsi, .LC3[rip]
	xor	eax, eax
	mov	rdi, rbp
	call	bt_dev_info@PLT
	cmp	ebx, r12d
	jne	.L8
	cmp	r14d, r15d
	jge	.L8
	mov	edx, DWORD PTR 0[r13]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, rbp
	call	btusb_setup_qca_download_fw@PLT
	mov	r12d, eax
.L6:
	mov	rdi, QWORD PTR 8[rsp]
	call	release_firmware@PLT
.L1:
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	bt_dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r12d, eax
	mov	ecx, eax
	mov	rdx, r15
	mov	rdi, rbp
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	bt_dev_err@PLT
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	btusb_setup_qca_load_rampatch, .-btusb_setup_qca_load_rampatch
	.comm	EINVAL,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_btusb.c_btusb_setup_qca_load_rampatch.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"qca/rampatch_usb_%08x.bin\000"
	.align	2
.LC1:
	.ascii	"failed to request rampatch file: %s (%d)\000"
	.align	2
.LC2:
	.ascii	"using rampatch file: %s\000"
	.align	2
.LC3:
	.ascii	"QCA: patch rome 0x%x build 0x%x, firmware rome 0x%x"
	.ascii	" build 0x%x\000"
	.align	2
.LC4:
	.ascii	"rampatch file version did not match with firmware\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	btusb_setup_qca_load_rampatch, %function
btusb_setup_qca_load_rampatch:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L12
	sub	sp, sp, #80
	mov	r6, r0
	ldr	r0, [r1, #4]
	mov	r4, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #76]
	mov	r3,#0
	bl	le32_to_cpu
	mov	r8, r0
	ldr	r0, [r4]
	bl	le32_to_cpu
	mov	r3, r8
	mov	r1, #64
	ldr	r2, .L12+4
	mov	r5, r0
	add	r0, sp, #12
	bl	snprintf
	mov	r2, r6
	add	r1, sp, #12
	add	r0, sp, #8
	bl	request_firmware
	subs	r4, r0, #0
	add	r2, sp, #12
	bne	.L9
	ldr	r1, .L12+8
	mov	r0, r6
	bl	bt_dev_info
	ldr	r3, [sp, #8]
	ldr	r9, [r7, #4]
	ldr	r10, [r3]
	add	r3, r10, r9
	ldr	r0, [r3, #4]
	bl	le16_to_cpu
	mov	r4, r0
	ldr	r0, [r10, r9]
	bl	le16_to_cpu
	mov	r9, r0
	str	r5, [sp, #4]
	mov	r3, r0
	mov	r2, r4
	mov	r0, r6
	ldr	r1, .L12+12
	str	r8, [sp]
	bl	bt_dev_info
	cmp	r5, r9
	movlt	r5, #0
	movge	r5, #1
	cmp	r8, r4
	orrne	r5, r5, #1
	cmp	r5, #0
	bne	.L10
	mov	r0, r6
	ldr	r2, [r7]
	ldr	r1, [sp, #8]
	bl	btusb_setup_qca_download_fw
	mov	r4, r0
.L5:
	ldr	r0, [sp, #8]
	bl	release_firmware
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #76]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r4
	add	sp, sp, #80
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r0, r6
	ldr	r1, .L12+16
	bl	bt_dev_err
	ldr	r3, .L12+20
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L5
.L9:
	mov	r0, r6
	mov	r3, r4
	ldr	r1, .L12+24
	bl	bt_dev_err
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	EINVAL
	.word	.LC1
	.size	btusb_setup_qca_load_rampatch, .-btusb_setup_qca_load_rampatch
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
