	.file	"extr_lan78xx.c_lan78xx_read_raw_otp.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"timeout on OTP_PWR_DN"
.LC1:
	.string	"timeout on OTP_STATUS"
	.text
	.p2align 4
	.type	lan78xx_read_raw_otp, @function
lan78xx_read_raw_otp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edx
	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
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR OTP_PWR_DN[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rbp, 4[rsp]
	mov	rdx, rbp
	call	lan78xx_read_reg@PLT
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR OTP_PWR_DN_PWRDN_N_[rip], eax
	jne	.L19
.L2:
	test	r15d, r15d
	jle	.L6
	add	r15d, r13d
.L9:
	mov	esi, DWORD PTR OTP_ADDR1[rip]
	mov	edx, r13d
	mov	rdi, rbx
	sar	edx, 8
	and	edx, DWORD PTR OTP_ADDR1_15_11[rip]
	call	lan78xx_write_reg@PLT
	mov	edx, DWORD PTR OTP_ADDR2_10_3[rip]
	mov	esi, DWORD PTR OTP_ADDR2[rip]
	mov	rdi, rbx
	and	edx, r13d
	call	lan78xx_write_reg@PLT
	mov	edx, DWORD PTR OTP_FUNC_CMD_READ_[rip]
	mov	esi, DWORD PTR OTP_FUNC_CMD[rip]
	mov	rdi, rbx
	call	lan78xx_write_reg@PLT
	mov	edx, DWORD PTR OTP_CMD_GO_GO_[rip]
	mov	esi, DWORD PTR OTP_CMD_GO[rip]
	mov	rdi, rbx
	call	lan78xx_write_reg@PLT
	mov	r12, QWORD PTR HZ[rip]
	add	r12, QWORD PTR jiffies[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR OTP_STATUS_BUSY_[rip], eax
	je	.L20
.L8:
	mov	edi, 1
	call	udelay@PLT
	mov	esi, DWORD PTR OTP_STATUS[rip]
	mov	rdi, rbx
	mov	rdx, rbp
	call	lan78xx_read_reg@PLT
	mov	rdi, QWORD PTR jiffies[rip]
	mov	rsi, r12
	call	time_after@PLT
	test	rax, rax
	je	.L7
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	call	netdev_warn@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L21
	add	rsp, 24
	.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
.L20:
	.cfi_restore_state
	mov	esi, DWORD PTR OTP_RD_DATA[rip]
	mov	rdx, rbp
	mov	rdi, rbx
	add	r13d, 1
	add	r14, 8
	call	lan78xx_read_reg@PLT
	movzx	eax, BYTE PTR 4[rsp]
	mov	QWORD PTR -8[r14], rax
	cmp	r13d, r15d
	jne	.L9
.L6:
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR OTP_PWR_DN[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	lan78xx_write_reg@PLT
	mov	r12, QWORD PTR HZ[rip]
	add	r12, QWORD PTR jiffies[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR OTP_PWR_DN_PWRDN_N_[rip], eax
	je	.L2
.L5:
	mov	esi, 10
	mov	edi, 1
	call	usleep_range@PLT
	mov	esi, DWORD PTR OTP_PWR_DN[rip]
	mov	rdi, rbx
	mov	rdx, rbp
	call	lan78xx_read_reg@PLT
	mov	rdi, QWORD PTR jiffies[rip]
	mov	rsi, r12
	call	time_after@PLT
	test	rax, rax
	je	.L3
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	netdev_warn@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lan78xx_read_raw_otp, .-lan78xx_read_raw_otp
	.comm	jiffies,8,8
	.comm	OTP_STATUS_BUSY_,4,4
	.comm	OTP_STATUS,4,4
	.comm	OTP_RD_DATA,4,4
	.comm	OTP_PWR_DN_PWRDN_N_,4,4
	.comm	OTP_PWR_DN,4,4
	.comm	OTP_FUNC_CMD_READ_,4,4
	.comm	OTP_FUNC_CMD,4,4
	.comm	OTP_CMD_GO_GO_,4,4
	.comm	OTP_CMD_GO,4,4
	.comm	OTP_ADDR2_10_3,4,4
	.comm	OTP_ADDR2,4,4
	.comm	OTP_ADDR1_15_11,4,4
	.comm	OTP_ADDR1,4,4
	.comm	HZ,8,8
	.comm	EIO,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_lan78xx.c_lan78xx_read_raw_otp.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"timeout on OTP_PWR_DN\000"
	.align	2
.LC1:
	.ascii	"timeout on OTP_STATUS\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lan78xx_read_raw_otp, %function
lan78xx_read_raw_otp:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, .L22
	sub	sp, sp, #20
	mov	r10, r3
	ldr	r7, .L22+4
	ldr	r3, .L22+8
	mov	r8, r1
	mov	r9, r2
	ldr	r1, [r6]
	add	r2, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	bl	lan78xx_read_reg
	ldr	r3, [r7]
	ldr	r2, [sp, #8]
	tst	r2, r3
	bne	.L19
.L2:
	cmp	r9, #0
	ble	.L6
	add	r3, r9, r8
	ldr	r5, .L22+12
	ldr	fp, .L22+16
	ldr	r6, .L22+20
	ldr	r7, .L22+24
	str	r3, [sp, #4]
	sub	r10, r10, #4
.L9:
	ldr	r3, .L22+28
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r3, .L22+32
	and	r2, r2, r8, asr #8
	ldr	r1, [r3]
	bl	lan78xx_write_reg
	ldr	r3, .L22+36
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r3, .L22+40
	and	r2, r2, r8
	ldr	r1, [r3]
	bl	lan78xx_write_reg
	ldr	r3, .L22+44
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r3, .L22+48
	ldr	r1, [r3]
	bl	lan78xx_write_reg
	ldr	r3, .L22+52
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r3, .L22+56
	ldr	r1, [r3]
	bl	lan78xx_write_reg
	ldr	r9, [r5]
	ldr	r3, [fp]
	add	r9, r9, r3
	b	.L8
.L7:
	ldr	r2, [sp, #8]
	ldr	r3, [r7]
	tst	r2, r3
	beq	.L20
.L8:
	mov	r0, #1
	bl	udelay
	ldr	r1, [r6]
	add	r2, sp, #8
	mov	r0, r4
	bl	lan78xx_read_reg
	mov	r1, r9
	ldr	r0, [r5]
	bl	time_after
	cmp	r0, #0
	beq	.L7
	ldr	r0, [r4]
	ldr	r1, .L22+60
	bl	netdev_warn
	ldr	r3, .L22+64
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L22+8
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r3, .L22+68
	add	r2, sp, #8
	ldr	r1, [r3]
	mov	r0, r4
	bl	lan78xx_read_reg
	ldr	r2, [sp, #4]
	ldrb	r3, [sp, #8]	@ zero_extendqisi2
	add	r8, r8, #1
	cmp	r8, r2
	str	r3, [r10, #4]!
	bne	.L9
.L6:
	mov	r0, #0
	b	.L1
.L19:
	ldr	fp, .L22+16
	ldr	r5, .L22+12
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r6]
	bl	lan78xx_write_reg
	ldr	r2, [r5]
	ldr	r3, [fp]
	add	fp, r2, r3
	b	.L5
.L3:
	ldr	r2, [sp, #8]
	ldr	r3, [r7]
	tst	r2, r3
	beq	.L2
.L5:
	mov	r1, #10
	mov	r0, #1
	bl	usleep_range
	ldr	r1, [r6]
	add	r2, sp, #8
	mov	r0, r4
	bl	lan78xx_read_reg
	mov	r1, fp
	ldr	r0, [r5]
	bl	time_after
	cmp	r0, #0
	beq	.L3
	ldr	r0, [r4]
	ldr	r1, .L22+72
	bl	netdev_warn
	ldr	r3, .L22+64
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	OTP_PWR_DN
	.word	OTP_PWR_DN_PWRDN_N_
	.word	.LC2
	.word	jiffies
	.word	HZ
	.word	OTP_STATUS
	.word	OTP_STATUS_BUSY_
	.word	OTP_ADDR1_15_11
	.word	OTP_ADDR1
	.word	OTP_ADDR2_10_3
	.word	OTP_ADDR2
	.word	OTP_FUNC_CMD_READ_
	.word	OTP_FUNC_CMD
	.word	OTP_CMD_GO_GO_
	.word	OTP_CMD_GO
	.word	.LC1
	.word	EIO
	.word	OTP_RD_DATA
	.word	.LC0
	.size	lan78xx_read_raw_otp, .-lan78xx_read_raw_otp
	.comm	jiffies,4,4
	.comm	OTP_STATUS_BUSY_,4,4
	.comm	OTP_STATUS,4,4
	.comm	OTP_RD_DATA,4,4
	.comm	OTP_PWR_DN_PWRDN_N_,4,4
	.comm	OTP_PWR_DN,4,4
	.comm	OTP_FUNC_CMD_READ_,4,4
	.comm	OTP_FUNC_CMD,4,4
	.comm	OTP_CMD_GO_GO_,4,4
	.comm	OTP_CMD_GO,4,4
	.comm	OTP_ADDR2_10_3,4,4
	.comm	OTP_ADDR2,4,4
	.comm	OTP_ADDR1_15_11,4,4
	.comm	OTP_ADDR1,4,4
	.comm	HZ,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
