	.file	"extr_iwl-eeprom-read.c_iwl_find_otp_image.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"OTP blocks %d addr 0x%x\n"
.LC1:
	.string	"OTP has no valid blocks\n"
	.text
	.p2align 4
	.type	iwl_find_otp_image, @function
iwl_find_otp_image:
.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
	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, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], 0
	call	iwl_set_otp_access_absolute@PLT
	mov	rdi, rbp
	call	iwl_is_otp_empty@PLT
	test	rax, rax
	jne	.L10
	mov	rdi, QWORD PTR 16[rsp]
	xor	r15d, r15d
	xor	ebx, ebx
	lea	r14, 16[rsp]
	lea	r13, .LC0[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR 16[rsp]
	test	rdi, rdi
	je	.L12
	mov	rax, QWORD PTR 8[rbp]
	add	r15d, 1
	mov	rax, QWORD PTR [rax]
	cmp	DWORD PTR [rax], r15d
	jl	.L13
.L6:
	call	le16_to_cpu@PLT
	mov	r12d, ebx
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r15d
	lea	ebx, 0[0+rax*4]
	mov	rsi, r13
	xor	eax, eax
	mov	ecx, ebx
	call	IWL_DEBUG_EEPROM@PLT
	mov	rdx, r14
	mov	esi, ebx
	mov	rdi, rbp
	call	iwl_read_otp_word@PLT
	test	rax, rax
	je	.L4
.L10:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L14
	add	rsp, 40
	.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
.L12:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rsp]
	add	r12d, 2
	mov	DWORD PTR [rax], r12d
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	IWL_DEBUG_EEPROM@PLT
	jmp	.L10
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	iwl_find_otp_image, .-iwl_find_otp_image
	.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_iwl-eeprom-read.c_iwl_find_otp_image.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"OTP blocks %d addr 0x%x\012\000"
	.align	2
.LC1:
	.ascii	"OTP has no valid blocks\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	iwl_find_otp_image, %function
iwl_find_otp_image:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r3, #0
	mov	r6, r0
	ldr	r2, .L15
	sub	sp, sp, #12
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	mov	r9, r1
	str	r3, [sp]
	bl	iwl_set_otp_access_absolute
	mov	r0, r6
	bl	iwl_is_otp_empty
	subs	r4, r0, #0
	bne	.L10
	mov	r5, r4
	ldr	r0, [sp]
	ldr	r8, .L15+4
	b	.L6
.L4:
	ldr	r0, [sp]
	cmp	r0, #0
	beq	.L12
	ldr	r3, [r6, #4]
	add	r5, r5, #1
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, r5
	blt	.L13
.L6:
	bl	le16_to_cpu
	mov	r7, r4
	lsl	r4, r0, #2
	mov	r3, r4
	mov	r2, r5
	mov	r1, r8
	ldr	r0, [r6]
	bl	IWL_DEBUG_EEPROM
	mov	r2, sp
	mov	r1, r4
	mov	r0, r6
	bl	iwl_read_otp_word
	cmp	r0, #0
	beq	.L4
.L10:
	ldr	r3, .L15+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	add	r7, r7, #2
	str	r7, [r9]
	b	.L1
.L13:
	ldr	r0, [r6]
	ldr	r1, .L15+12
	bl	IWL_DEBUG_EEPROM
	b	.L10
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.size	iwl_find_otp_image, .-iwl_find_otp_image
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
