	.file	"extr_bxe_elink.c_elink_84833_cmd_hdlr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"FW cmd failed.\n"
.LC1:
	.string	"FW cmd: FW not ready.\n"
	.text
	.p2align 4
	.type	elink_84833_cmd_hdlr, @function
elink_84833_cmd_hdlr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r9d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	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, 56
	.cfi_def_cfa_offset 112
	mov	r12, QWORD PTR [rsi]
	mov	QWORD PTR 16[rsp], rdx
	mov	DWORD PTR 28[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR ELINK_STATUS_OK[rip]
	cmp	DWORD PTR PHY84833_MB_PROCESS2[rip], r9d
	mov	QWORD PTR 8[rsp], rax
	je	.L44
.L2:
	mov	edx, DWORD PTR PHY848xx_CMDHDLR_WAIT[rip]
	test	edx, edx
	jle	.L6
	xor	ebx, ebx
	lea	r13, 32[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L45:
	mov	edi, 1000
	add	ebx, 1
	call	DELAY@PLT
	cmp	DWORD PTR PHY848xx_CMDHDLR_WAIT[rip], ebx
	jle	.L6
.L5:
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_STATUS[rip]
	mov	r8, r13
	mov	rsi, rbp
	mov	rdi, r12
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	call	elink_cl45_read@PLT
	mov	rax, QWORD PTR PHY84833_STATUS_CMD_OPEN_FOR_CMDS[rip]
	cmp	QWORD PTR 32[rsp], rax
	jne	.L45
	cmp	DWORD PTR PHY848xx_CMDHDLR_WAIT[rip], ebx
	jle	.L6
	cmp	DWORD PTR PHY84833_MB_PROCESS1[rip], r15d
	je	.L14
	cmp	DWORD PTR PHY84833_MB_PROCESS2[rip], r15d
	je	.L14
.L15:
	mov	r8, QWORD PTR 16[rsp]
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	mov	rsi, rbp
	xor	ebx, ebx
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_COMMAND[rip]
	mov	rdi, r12
	call	elink_cl45_write@PLT
	mov	eax, DWORD PTR PHY848xx_CMDHDLR_WAIT[rip]
	test	eax, eax
	jg	.L12
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L46:
	cmp	rax, QWORD PTR PHY84833_STATUS_CMD_COMPLETE_ERROR[rip]
	je	.L18
	mov	edi, 1000
	add	ebx, 1
	call	DELAY@PLT
	cmp	DWORD PTR PHY848xx_CMDHDLR_WAIT[rip], ebx
	jle	.L18
.L12:
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_STATUS[rip]
	mov	r8, r13
	mov	rsi, rbp
	mov	rdi, r12
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	call	elink_cl45_read@PLT
	mov	rax, QWORD PTR 32[rsp]
	cmp	rax, QWORD PTR PHY84833_STATUS_CMD_COMPLETE_PASS[rip]
	jne	.L46
	cmp	DWORD PTR PHY848xx_CMDHDLR_WAIT[rip], ebx
	jle	.L18
	cmp	rax, QWORD PTR PHY84833_STATUS_CMD_COMPLETE_ERROR[rip]
	je	.L18
	cmp	r15d, DWORD PTR PHY84833_MB_PROCESS3[rip]
	je	.L47
.L23:
	mov	r8, QWORD PTR PHY84833_STATUS_CMD_CLEAR_COMPLETE[rip]
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_STATUS[rip]
	mov	rsi, rbp
	mov	rdi, r12
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	call	elink_cl45_write@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L48
	mov	rax, QWORD PTR 8[rsp]
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR 28[rsp]
	xor	ebx, ebx
	lea	esi, -1[rax]
	mov	QWORD PTR [rsp], rsi
	test	eax, eax
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r8, QWORD PTR [r14+rbx*8]
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	mov	rsi, rbp
	mov	rdi, r12
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_DATA1[rip]
	add	rcx, rbx
	call	elink_cl45_write@PLT
	mov	rax, rbx
	add	rbx, 1
	cmp	rax, QWORD PTR [rsp]
	jne	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	ELINK_DEBUG_P0@PLT
	mov	rax, QWORD PTR ELINK_STATUS_ERROR[rip]
	cmp	DWORD PTR PHY84833_MB_PROCESS3[rip], r15d
	mov	QWORD PTR 8[rsp], rax
	je	.L49
.L21:
	mov	rax, QWORD PTR 32[rsp]
	cmp	rax, QWORD PTR PHY84833_STATUS_CMD_COMPLETE_ERROR[rip]
	je	.L23
.L27:
	cmp	QWORD PTR PHY84833_STATUS_CMD_COMPLETE_PASS[rip], rax
	jne	.L1
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L6:
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	ELINK_DEBUG_P0@PLT
	mov	rax, QWORD PTR 32[rsp]
	cmp	rax, QWORD PTR PHY84833_STATUS_CMD_COMPLETE_PASS[rip]
	je	.L25
	cmp	rax, QWORD PTR PHY84833_STATUS_CMD_COMPLETE_ERROR[rip]
	je	.L25
.L8:
	mov	rax, QWORD PTR ELINK_STATUS_ERROR[rip]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L44:
	mov	r8, QWORD PTR PHY84833_STATUS_CMD_OPEN_OVERRIDE[rip]
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_STATUS[rip]
	mov	rsi, rdi
	mov	rdi, r12
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	call	elink_cl45_write@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r8, QWORD PTR PHY84833_STATUS_CMD_CLEAR_COMPLETE[rip]
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_STATUS[rip]
	mov	rsi, rbp
	mov	rdi, r12
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	call	elink_cl45_write@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L49:
	cmp	QWORD PTR ELINK_STATUS_OK[rip], rax
	jne	.L21
.L28:
	mov	eax, DWORD PTR 28[rsp]
	test	eax, eax
	jle	.L21
	lea	r13d, -1[rax]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rcx, QWORD PTR MDIO_848xx_CMD_HDLR_DATA1[rip]
	mov	r8, r14
	mov	rsi, rbp
	mov	rdi, r12
	mov	edx, DWORD PTR MDIO_CTL_DEVAD[rip]
	add	r14, 8
	add	rcx, rbx
	call	elink_cl45_read@PLT
	mov	rax, rbx
	add	rbx, 1
	cmp	r13, rax
	jne	.L22
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L47:
	mov	rsi, QWORD PTR 8[rsp]
	cmp	rsi, QWORD PTR ELINK_STATUS_OK[rip]
	jne	.L27
	jmp	.L28
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	elink_84833_cmd_hdlr, .-elink_84833_cmd_hdlr
	.comm	PHY848xx_CMDHDLR_WAIT,4,4
	.comm	PHY84833_STATUS_CMD_OPEN_OVERRIDE,8,8
	.comm	PHY84833_STATUS_CMD_OPEN_FOR_CMDS,8,8
	.comm	PHY84833_STATUS_CMD_COMPLETE_PASS,8,8
	.comm	PHY84833_STATUS_CMD_COMPLETE_ERROR,8,8
	.comm	PHY84833_STATUS_CMD_CLEAR_COMPLETE,8,8
	.comm	PHY84833_MB_PROCESS3,4,4
	.comm	PHY84833_MB_PROCESS2,4,4
	.comm	PHY84833_MB_PROCESS1,4,4
	.comm	MDIO_CTL_DEVAD,4,4
	.comm	MDIO_848xx_CMD_HDLR_STATUS,8,8
	.comm	MDIO_848xx_CMD_HDLR_DATA1,8,8
	.comm	MDIO_848xx_CMD_HDLR_COMMAND,8,8
	.comm	ELINK_STATUS_OK,8,8
	.comm	ELINK_STATUS_ERROR,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_bxe_elink.c_elink_84833_cmd_hdlr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FW cmd failed.\012\000"
	.align	2
.LC1:
	.ascii	"FW cmd: FW not ready.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	elink_84833_cmd_hdlr, %function
elink_84833_cmd_hdlr:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #36
	str	r3, [sp, #16]
	ldr	r3, .L49
	ldr	fp, .L49+4
	str	r2, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r3, .L49+8
	ldr	ip, [fp]
	ldr	lr, [sp, #76]
	ldr	r3, [r3]
	cmp	ip, lr
	mov	r4, r0
	ldr	r5, [r1]
	str	r3, [sp, #8]
	beq	.L43
.L2:
	ldr	r8, .L49+12
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L6
	mov	r7, #0
	ldr	r9, .L49+16
	ldr	r6, .L49+20
	ldr	r10, .L49+24
	b	.L5
.L44:
	mov	r0, #1000
	bl	DELAY
	ldr	r3, [r8]
	add	r7, r7, #1
	cmp	r3, r7
	ble	.L6
.L5:
	add	r3, sp, #24
	str	r3, [sp]
	ldr	r3, [r9]
	ldr	r2, [r6]
	mov	r1, r4
	mov	r0, r5
	bl	elink_cl45_read
	ldr	r2, [sp, #24]
	ldr	r3, [r10]
	cmp	r2, r3
	bne	.L44
	ldr	r3, [r8]
	cmp	r3, r7
	ble	.L6
	ldr	r3, .L49+28
	ldr	r2, [sp, #76]
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L14
	ldr	r3, [fp]
	ldr	r2, [sp, #76]
	cmp	r3, r2
	beq	.L14
.L15:
	ldr	r2, [sp, #12]
	ldr	r3, .L49+32
	str	r2, [sp]
	ldr	r3, [r3]
	mov	r1, r4
	mov	r0, r5
	ldr	r2, [r6]
	bl	elink_cl45_write
	ldr	r3, [r8]
	cmp	r3, #0
	ldrle	fp, .L49+36
	ble	.L18
	mov	r7, #0
	ldr	fp, .L49+36
	ldr	r10, .L49+40
	b	.L12
.L45:
	ldr	r2, [fp]
	cmp	r3, r2
	beq	.L18
	mov	r0, #1000
	bl	DELAY
	ldr	r3, [r8]
	add	r7, r7, #1
	cmp	r3, r7
	ble	.L18
.L12:
	add	r3, sp, #24
	str	r3, [sp]
	ldr	r3, [r9]
	ldr	r2, [r6]
	mov	r1, r4
	mov	r0, r5
	bl	elink_cl45_read
	ldr	r3, [sp, #24]
	ldr	r2, [r10]
	cmp	r3, r2
	bne	.L45
	ldr	r2, [r8]
	cmp	r2, r7
	ble	.L18
	ldr	r2, [fp]
	cmp	r3, r2
	beq	.L18
	ldr	r2, .L49+44
	ldr	r1, [sp, #76]
	ldr	r2, [r2]
	cmp	r1, r2
	beq	.L46
.L23:
	ldr	r2, .L49+48
	ldr	r3, [r9]
	ldr	ip, [r2]
	mov	r1, r4
	mov	r0, r5
	ldr	r2, [r6]
	str	ip, [sp]
	bl	elink_cl45_write
.L1:
	ldr	r3, .L49
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L47
	ldr	r0, [sp, #8]
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, [sp, #72]
	cmp	r3, #0
	ble	.L15
	mov	r7, #0
	ldr	r10, .L49+52
	ldr	r3, [sp, #16]
	str	r9, [sp, #20]
	mov	r9, r4
	mov	r4, r10
	ldr	r10, [sp, #72]
	sub	fp, r3, #4
.L16:
	ldr	r3, [r4]
	ldr	r2, [fp, #4]!
	add	r3, r7, r3
	str	r2, [sp]
	mov	r1, r9
	mov	r0, r5
	ldr	r2, [r6]
	add	r7, r7, #1
	bl	elink_cl45_write
	cmp	r10, r7
	bne	.L16
	mov	r4, r9
	ldr	r9, [sp, #20]
	b	.L15
.L18:
	mov	r0, r5
	ldr	r1, .L49+56
	bl	ELINK_DEBUG_P0
	ldr	r2, .L49+60
	ldr	r3, .L49+44
	ldr	r2, [r2]
	ldr	r3, [r3]
	str	r2, [sp, #8]
	ldr	r2, [sp, #76]
	cmp	r3, r2
	beq	.L48
.L21:
	ldr	r2, [fp]
	ldr	r3, [sp, #24]
	cmp	r3, r2
	beq	.L23
	ldr	r10, .L49+40
.L27:
	ldr	r2, [r10]
	cmp	r3, r2
	bne	.L1
	b	.L23
.L6:
	mov	r0, r5
	ldr	r1, .L49+64
	bl	ELINK_DEBUG_P0
	ldr	r2, .L49+40
	ldr	r3, [sp, #24]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L25
	ldr	r2, .L49+36
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L25
.L8:
	ldr	r3, .L49+60
	ldr	r3, [r3]
	str	r3, [sp, #8]
	b	.L1
.L43:
	ldr	r3, .L49+68
	ldr	r9, .L49+16
	ldr	r3, [r3]
	ldr	r6, .L49+20
	str	r3, [sp]
	mov	r1, r0
	ldr	r3, [r9]
	mov	r0, r5
	ldr	r2, [r6]
	bl	elink_cl45_write
	b	.L2
.L25:
	ldr	r2, .L49+48
	ldr	r3, .L49+16
	ldr	ip, [r2]
	ldr	r2, .L49+20
	str	ip, [sp]
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	elink_cl45_write
	b	.L8
.L48:
	ldr	r3, .L49+8
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	cmp	r3, r2
	bne	.L21
.L28:
	ldr	r3, [sp, #72]
	cmp	r3, #0
	ble	.L21
	ldr	r10, .L49+52
	str	r9, [sp, #12]
	mov	r7, #0
	mov	r9, r4
	mov	r4, r10
	mov	r10, r3
	ldr	r8, [sp, #16]
.L22:
	ldr	r3, [r4]
	mov	r1, r9
	str	r8, [sp]
	add	r3, r7, r3
	mov	r0, r5
	ldr	r2, [r6]
	add	r7, r7, #1
	bl	elink_cl45_read
	cmp	r10, r7
	add	r8, r8, #4
	bne	.L22
	mov	r4, r9
	ldr	r9, [sp, #12]
	b	.L21
.L46:
	ldr	r2, .L49+8
	ldr	r1, [sp, #8]
	ldr	r2, [r2]
	cmp	r2, r1
	bne	.L27
	b	.L28
.L47:
	bl	__stack_chk_fail
.L50:
	.align	2
.L49:
	.word	.LC2
	.word	PHY84833_MB_PROCESS2
	.word	ELINK_STATUS_OK
	.word	PHY848xx_CMDHDLR_WAIT
	.word	MDIO_848xx_CMD_HDLR_STATUS
	.word	MDIO_CTL_DEVAD
	.word	PHY84833_STATUS_CMD_OPEN_FOR_CMDS
	.word	PHY84833_MB_PROCESS1
	.word	MDIO_848xx_CMD_HDLR_COMMAND
	.word	PHY84833_STATUS_CMD_COMPLETE_ERROR
	.word	PHY84833_STATUS_CMD_COMPLETE_PASS
	.word	PHY84833_MB_PROCESS3
	.word	PHY84833_STATUS_CMD_CLEAR_COMPLETE
	.word	MDIO_848xx_CMD_HDLR_DATA1
	.word	.LC0
	.word	ELINK_STATUS_ERROR
	.word	.LC1
	.word	PHY84833_STATUS_CMD_OPEN_OVERRIDE
	.size	elink_84833_cmd_hdlr, .-elink_84833_cmd_hdlr
	.comm	PHY848xx_CMDHDLR_WAIT,4,4
	.comm	PHY84833_STATUS_CMD_OPEN_OVERRIDE,4,4
	.comm	PHY84833_STATUS_CMD_OPEN_FOR_CMDS,4,4
	.comm	PHY84833_STATUS_CMD_COMPLETE_PASS,4,4
	.comm	PHY84833_STATUS_CMD_COMPLETE_ERROR,4,4
	.comm	PHY84833_STATUS_CMD_CLEAR_COMPLETE,4,4
	.comm	PHY84833_MB_PROCESS3,4,4
	.comm	PHY84833_MB_PROCESS2,4,4
	.comm	PHY84833_MB_PROCESS1,4,4
	.comm	MDIO_CTL_DEVAD,4,4
	.comm	MDIO_848xx_CMD_HDLR_STATUS,4,4
	.comm	MDIO_848xx_CMD_HDLR_DATA1,4,4
	.comm	MDIO_848xx_CMD_HDLR_COMMAND,4,4
	.comm	ELINK_STATUS_OK,4,4
	.comm	ELINK_STATUS_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
