	.file	"extr_t4_hw.c_t4_load_phy_fw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"PHY Firmware already up-to-date, version %#x\n"
	.align 8
.LC1:
	.string	"PHY Firmware did not update: version on adapter %#x, version flashed %#x\n"
	.text
	.p2align 4
	.globl	t4_load_phy_fw
	.type	t4_load_phy_fw, @function
t4_load_phy_fw:
.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
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r9
	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
	mov	rbx, rcx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	DWORD PTR [rsp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 52[rsp], 0
	test	rcx, rcx
	je	.L9
	mov	rdi, r8
	mov	rsi, r9
	call	rcx
	lea	rsi, 52[rsp]
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], eax
	mov	r15d, eax
	call	t4_phy_fw_ver@PLT
	mov	r8d, eax
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR 52[rsp]
	cmp	edx, r15d
	jge	.L12
.L2:
	mov	edi, DWORD PTR FW_PARAMS_MNEM_DEV[rip]
	call	FW_PARAMS_MNEM_V@PLT
	mov	edi, DWORD PTR FW_PARAMS_PARAM_DEV_PHYFW[rip]
	mov	r15d, eax
	call	FW_PARAMS_PARAM_X_V@PLT
	mov	edi, DWORD PTR 8[rbp]
	or	r15d, eax
	call	FW_PARAMS_PARAM_Y_V@PLT
	mov	edi, DWORD PTR FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD[rip]
	or	r15d, eax
	call	FW_PARAMS_PARAM_Z_V@PLT
	mov	DWORD PTR 48[rsp], r12d
	mov	esi, DWORD PTR 4[rbp]
	xor	ecx, ecx
	or	r15d, eax
	mov	edx, DWORD PTR 0[rbp]
	mov	r8d, 1
	mov	rdi, rbp
	mov	DWORD PTR 44[rsp], r15d
	lea	r15, 44[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	push	1
	.cfi_def_cfa_offset 144
	mov	r9, r15
	push	1
	.cfi_def_cfa_offset 152
	lea	rax, 72[rsp]
	mov	QWORD PTR 32[rsp], rax
	push	rax
	.cfi_def_cfa_offset 160
	call	t4_query_params_rw@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 128
	mov	r8d, eax
	test	eax, eax
	js	.L1
	mov	ecx, DWORD PTR 48[rsp]
	mov	edx, ecx
	sal	ecx, 16
	sar	edx, 8
	and	ecx, 16711680
	movsx	rdx, edx
	test	r14, r14
	je	.L4
	mov	rdi, r14
	mov	QWORD PTR 24[rsp], rcx
	mov	QWORD PTR 16[rsp], rdx
	call	spin_lock_bh@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	r8, r12
	mov	r9, r13
	mov	eax, DWORD PTR T4_MEMORY_WRITE[rip]
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 144
	mov	rcx, QWORD PTR 40[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	mov	esi, DWORD PTR 16[rsp]
	call	t4_memory_rw@PLT
	mov	rdi, r14
	mov	DWORD PTR 16[rsp], eax
	call	spin_unlock_bh@PLT
	pop	rdi
	.cfi_def_cfa_offset 136
	pop	r8
	.cfi_def_cfa_offset 128
	mov	r8d, DWORD PTR [rsp]
.L7:
	test	r8d, r8d
	jne	.L1
	mov	edi, DWORD PTR FW_PARAMS_MNEM_DEV[rip]
	call	FW_PARAMS_MNEM_V@PLT
	mov	edi, DWORD PTR FW_PARAMS_PARAM_DEV_PHYFW[rip]
	mov	r12d, eax
	call	FW_PARAMS_PARAM_X_V@PLT
	mov	edi, DWORD PTR 8[rbp]
	or	r12d, eax
	call	FW_PARAMS_PARAM_Y_V@PLT
	mov	edi, DWORD PTR FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD[rip]
	or	r12d, eax
	call	FW_PARAMS_PARAM_Z_V@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	xor	ecx, ecx
	or	r12d, eax
	mov	r9, r15
	mov	r8d, 1
	mov	rdi, rbp
	mov	DWORD PTR 44[rsp], r12d
	push	30000
	.cfi_def_cfa_offset 136
	push	QWORD PTR 16[rsp]
	.cfi_def_cfa_offset 144
	call	t4_set_params_timeout@PLT
	pop	rcx
	.cfi_def_cfa_offset 136
	pop	rsi
	.cfi_def_cfa_offset 128
	test	rbx, rbx
	je	.L6
	lea	rsi, 52[rsp]
	mov	rdi, rbp
	call	t4_phy_fw_ver@PLT
	mov	r8d, eax
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR 52[rsp]
	cmp	edx, DWORD PTR 4[rsp]
	jne	.L13
.L6:
	mov	r8d, 1
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L4:
	.cfi_restore_state
	mov	eax, DWORD PTR T4_MEMORY_WRITE[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	r8, r12
	mov	r9, r13
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 144
	mov	esi, DWORD PTR 16[rsp]
	call	t4_memory_rw@PLT
	mov	r8d, eax
	pop	rax
	.cfi_def_cfa_offset 136
	pop	rdx
	.cfi_def_cfa_offset 128
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	CH_WARN@PLT
	xor	r8d, r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	DWORD PTR 4[rsp], 0
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	mov	ecx, DWORD PTR 4[rsp]
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	CH_WARN@PLT
	mov	r8d, DWORD PTR ENXIO[rip]
	neg	r8d
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	t4_load_phy_fw, .-t4_load_phy_fw
	.comm	T4_MEMORY_WRITE,4,4
	.comm	FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD,4,4
	.comm	FW_PARAMS_PARAM_DEV_PHYFW,4,4
	.comm	FW_PARAMS_MNEM_DEV,4,4
	.comm	ENXIO,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_t4_hw.c_t4_load_phy_fw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"PHY Firmware already up-to-date, version %#x\012\000"
	.align	2
.LC1:
	.ascii	"PHY Firmware did not update: version on adapter %#x"
	.ascii	", version flashed %#x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	t4_load_phy_fw
	.syntax unified
	.arm
	.fpu softvfp
	.type	t4_load_phy_fw, %function
t4_load_phy_fw:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, #0
	subs	r5, r3, #0
	ldr	r3, .L15
	sub	sp, sp, #52
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	mov	r4, r0
	mov	r7, r1
	mov	r6, r2
	ldr	r10, [sp, #88]
	ldr	r9, [sp, #92]
	str	fp, [sp, #40]
	beq	.L9
	mov	r1, r9
	mov	r0, r10
	blx	r5
	add	r1, sp, #40
	mov	r8, r0
	mov	r0, r4
	bl	t4_phy_fw_ver
	subs	r3, r0, #0
	blt	.L1
	ldr	r2, [sp, #40]
	cmp	r2, r8
	bge	.L12
.L2:
	ldr	fp, .L15+4
	ldr	r0, [fp]
	bl	FW_PARAMS_MNEM_V
	mov	r3, r0
	ldr	r2, .L15+8
	str	r3, [sp, #24]
	ldr	r0, [r2]
	bl	FW_PARAMS_PARAM_X_V
	mov	ip, r0
	ldr	r3, [sp, #24]
	ldr	r0, [r4, #8]
	orr	r3, r3, ip
	str	r3, [sp, #24]
	bl	FW_PARAMS_PARAM_Y_V
	ldr	r3, [sp, #24]
	orr	r3, r3, r0
	str	r3, [sp, #24]
	ldr	r3, .L15+12
	ldr	r0, [r3]
	bl	FW_PARAMS_PARAM_Z_V
	mov	r2, #1
	ldr	r3, [sp, #24]
	str	r2, [sp, #16]
	orr	ip, r3, r0
	add	r3, sp, #36
	str	r3, [sp, #8]
	add	r3, sp, #32
	str	r3, [sp, #4]
	str	r2, [sp, #12]
	str	r2, [sp]
	mov	r3, #0
	mov	r0, r4
	ldr	r2, [r4]
	ldr	r1, [r4, #4]
	str	ip, [sp, #32]
	str	r9, [sp, #36]
	bl	t4_query_params_rw
	subs	r3, r0, #0
	blt	.L1
	ldr	r2, [sp, #36]
	cmp	r6, #0
	lsl	r3, r2, #16
	and	r3, r3, #16711680
	asr	r2, r2, #8
	beq	.L4
	mov	r0, r6
	str	r3, [sp, #28]
	str	r2, [sp, #24]
	bl	spin_lock_bh
	ldr	r1, .L15+16
	str	r10, [sp, #4]
	ldr	r0, [r1]
	ldr	r3, [sp, #28]
	mov	r1, r7
	ldr	r2, [sp, #24]
	str	r0, [sp, #8]
	str	r9, [sp]
	mov	r0, r4
	bl	t4_memory_rw
	mov	r3, r0
	mov	r0, r6
	str	r3, [sp, #24]
	bl	spin_unlock_bh
	ldr	r3, [sp, #24]
.L7:
	cmp	r3, #0
	bne	.L1
	ldr	r0, [fp]
	str	r3, [sp, #24]
	bl	FW_PARAMS_MNEM_V
	ldr	r3, .L15+8
	mov	r6, r0
	ldr	r0, [r3]
	bl	FW_PARAMS_PARAM_X_V
	mov	ip, r0
	ldr	r0, [r4, #8]
	orr	r6, r6, ip
	bl	FW_PARAMS_PARAM_Y_V
	mov	ip, r0
	ldr	r3, .L15+12
	orr	r6, r6, ip
	ldr	r0, [r3]
	bl	FW_PARAMS_PARAM_Z_V
	mov	r1, #1
	ldr	r2, .L15+20
	add	r3, sp, #36
	str	r3, [sp, #8]
	add	r3, sp, #32
	str	r3, [sp, #4]
	str	r1, [sp]
	str	r2, [sp, #12]
	orr	ip, r6, r0
	ldr	r3, [sp, #24]
	mov	r0, r4
	ldr	r2, [r4]
	ldr	r1, [r4, #4]
	str	ip, [sp, #32]
	bl	t4_set_params_timeout
	cmp	r5, #0
	beq	.L6
	mov	r0, r4
	add	r1, sp, #40
	bl	t4_phy_fw_ver
	subs	r3, r0, #0
	blt	.L1
	ldr	r2, [sp, #40]
	cmp	r2, r8
	bne	.L13
.L6:
	mov	r3, #1
.L1:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [sp, #44]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L14
	mov	r0, r3
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r1, .L15+16
	str	r10, [sp, #4]
	ldr	r0, [r1]
	mov	r1, r7
	str	r0, [sp, #8]
	str	r9, [sp]
	mov	r0, r4
	bl	t4_memory_rw
	mov	r3, r0
	b	.L7
.L12:
	mov	r0, r4
	ldr	r1, .L15+24
	str	fp, [sp, #24]
	bl	CH_WARN
	ldr	r3, [sp, #24]
	b	.L1
.L9:
	mov	r8, r5
	b	.L2
.L13:
	mov	r3, r8
	mov	r0, r4
	ldr	r1, .L15+28
	bl	CH_WARN
	ldr	r3, .L15+32
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	FW_PARAMS_MNEM_DEV
	.word	FW_PARAMS_PARAM_DEV_PHYFW
	.word	FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD
	.word	T4_MEMORY_WRITE
	.word	30000
	.word	.LC0
	.word	.LC1
	.word	ENXIO
	.size	t4_load_phy_fw, .-t4_load_phy_fw
	.comm	T4_MEMORY_WRITE,4,4
	.comm	FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD,4,4
	.comm	FW_PARAMS_PARAM_DEV_PHYFW,4,4
	.comm	FW_PARAMS_MNEM_DEV,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
