	.file	"extr_init.c_ath6kl_upload_testscript.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"writing testscript to 0x%x (%zd B)\n"
	.align 8
.LC1:
	.string	"Failed to write testscript file: %d\n"
	.text
	.p2align 4
	.type	ath6kl_upload_testscript, @function
ath6kl_upload_testscript:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	cmp	DWORD PTR [rdi], 2
	jne	.L1
	cmp	QWORD PTR 24[rdi], 0
	mov	rbp, rdi
	je	.L1
	mov	r13d, DWORD PTR 32[rdi]
	mov	ecx, DWORD PTR 16[rdi]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR ATH6KL_DBG_BOOT[rip]
	mov	edx, r13d
	call	ath6kl_dbg@PLT
	mov	ecx, DWORD PTR 16[rbp]
	mov	rdx, QWORD PTR 24[rbp]
	mov	esi, r13d
	mov	rdi, rbp
	call	ath6kl_bmi_write@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	mov	esi, DWORD PTR hi_ota_testscript[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	ath6kl_bmi_write_hi32@PLT
	mov	rax, QWORD PTR 8[rbp]
	cmp	rax, QWORD PTR AR6004_HW_1_3_VERSION[rip]
	je	.L4
	cmp	rax, QWORD PTR AR6004_HW_3_0_VERSION[rip]
	je	.L4
	mov	esi, DWORD PTR hi_end_ram_reserve_sz[rip]
	mov	edx, 4096
	mov	rdi, rbp
	call	ath6kl_bmi_write_hi32@PLT
.L4:
	mov	esi, DWORD PTR hi_test_apps_related[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	ath6kl_bmi_write_hi32@PLT
.L1:
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	esi, eax
	lea	rdi, .LC1[rip]
	call	ath6kl_err@PLT
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ath6kl_upload_testscript, .-ath6kl_upload_testscript
	.comm	hi_test_apps_related,4,4
	.comm	hi_ota_testscript,4,4
	.comm	hi_end_ram_reserve_sz,4,4
	.comm	ATH6KL_DBG_BOOT,4,4
	.comm	AR6004_HW_3_0_VERSION,8,8
	.comm	AR6004_HW_1_3_VERSION,8,8
	.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_init.c_ath6kl_upload_testscript.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"writing testscript to 0x%x (%zd B)\012\000"
	.align	2
.LC1:
	.ascii	"Failed to write testscript file: %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath6kl_upload_testscript, %function
ath6kl_upload_testscript:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	cmp	r3, #2
	movne	r5, #0
	bne	.L1
	ldr	r5, [r0, #12]
	mov	r4, r0
	cmp	r5, #0
	beq	.L1
	ldr	r6, [r0, #16]
	ldr	r3, .L10
	mov	r2, r6
	ldr	r0, [r3]
	ldr	r1, .L10+4
	ldr	r3, [r4, #8]
	bl	ath6kl_dbg
	mov	r1, r6
	mov	r0, r4
	ldr	r3, [r4, #8]
	ldr	r2, [r4, #12]
	bl	ath6kl_bmi_write
	subs	r5, r0, #0
	bne	.L9
	ldr	r3, .L10+8
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	bl	ath6kl_bmi_write_hi32
	ldr	r2, .L10+12
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L10+16
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r3, .L10+20
	mov	r2, #4096
	mov	r0, r4
	ldr	r1, [r3]
	bl	ath6kl_bmi_write_hi32
.L4:
	ldr	r3, .L10+24
	mov	r0, r4
	mov	r2, #1
	ldr	r1, [r3]
	bl	ath6kl_bmi_write_hi32
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L9:
	mov	r1, r5
	ldr	r0, .L10+28
	bl	ath6kl_err
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L11:
	.align	2
.L10:
	.word	ATH6KL_DBG_BOOT
	.word	.LC0
	.word	hi_ota_testscript
	.word	AR6004_HW_1_3_VERSION
	.word	AR6004_HW_3_0_VERSION
	.word	hi_end_ram_reserve_sz
	.word	hi_test_apps_related
	.word	.LC1
	.size	ath6kl_upload_testscript, .-ath6kl_upload_testscript
	.comm	hi_test_apps_related,4,4
	.comm	hi_ota_testscript,4,4
	.comm	hi_end_ram_reserve_sz,4,4
	.comm	ATH6KL_DBG_BOOT,4,4
	.comm	AR6004_HW_3_0_VERSION,4,4
	.comm	AR6004_HW_1_3_VERSION,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
