	.file	"892550.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-f"
.LC1:
	.string	"-u"
.LC2:
	.string	"flash_otp_info"
	.align 8
.LC3:
	.string	"Usage: %s [ -f | -u ] <device>\n"
.LC4:
	.string	"OTPSELECT"
.LC5:
	.string	"OTPGETREGIONCOUNT"
.LC6:
	.string	"factory"
.LC7:
	.string	"user"
	.align 8
.LC8:
	.string	"Number of OTP %s blocks on %s: %d\n"
.LC9:
	.string	"[locked]"
.LC10:
	.string	"[unlocked]"
	.align 8
.LC11:
	.string	"block %2d:  offset = 0x%04x  size = %2d bytes  %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -100[rbp], 3
	jne	.L2
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L3
.L2:
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 22
	jmp	.L21
.L3:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jns	.L5
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L21
.L5:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 102
	jne	.L6
	mov	eax, 1
	jmp	.L7
.L6:
	mov	eax, 2
.L7:
	mov	DWORD PTR -88[rbp], eax
	lea	rdx, -88[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, 2147765517
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L8
	lea	rdi, .LC4[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L21
.L8:
	lea	rdx, -88[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, 1074023694
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L9
	lea	rdi, .LC5[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L21
.L9:
	mov	ecx, DWORD PTR -88[rbp]
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 102
	jne	.L10
	lea	rax, .LC6[rip]
	jmp	.L11
.L10:
	lea	rax, .LC7[rip]
.L11:
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -88[rbp]
	test	eax, eax
	jle	.L12
	mov	rax, rsp
	mov	rbx, rax
	mov	ecx, DWORD PTR -88[rbp]
	movsx	rax, ecx
	sub	rax, 1
	mov	QWORD PTR -72[rbp], rax
	movsx	rax, ecx
	mov	r14, rax
	mov	r15d, 0
	imul	rdx, r15, 96
	imul	rax, r14, 0
	lea	rsi, [rdx+rax]
	mov	eax, 96
	mul	r14
	add	rsi, rdx
	mov	rdx, rsi
	movsx	rdx, ecx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	movsx	rax, ecx
	mov	r12, rax
	mov	r13d, 0
	imul	rdx, r13, 96
	imul	rax, r12, 0
	lea	rsi, [rdx+rax]
	mov	eax, 96
	mul	r12
	add	rsi, rdx
	mov	rdx, rsi
	movsx	rdx, ecx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L13:
	cmp	rsp, rdx
	je	.L14
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L13
.L14:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L15
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L15:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, 1074547983
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L16
	lea	rdi, .LC5[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rsp, rbx
	jmp	.L21
.L16:
	mov	DWORD PTR -84[rbp], 0
	jmp	.L17
.L20:
	mov	rcx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 8
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L18
	lea	rdx, .LC9[rip]
	jmp	.L19
.L18:
	lea	rdx, .LC10[rip]
.L19:
	mov	rsi, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -84[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	add	rax, 4
	mov	ecx, DWORD PTR [rax]
	mov	rdi, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -84[rbp]
	movsx	rsi, eax
	mov	rax, rsi
	add	rax, rax
	add	rax, rsi
	sal	rax, 2
	add	rax, rdi
	mov	esi, DWORD PTR [rax]
	mov	eax, DWORD PTR -84[rbp]
	mov	r8, rdx
	mov	edx, esi
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -84[rbp], 1
.L17:
	mov	eax, DWORD PTR -88[rbp]
	cmp	DWORD PTR -84[rbp], eax
	jl	.L20
	mov	rsp, rbx
.L12:
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L21:
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"892550.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-f\000"
	.align	2
.LC1:
	.ascii	"-u\000"
	.align	2
.LC2:
	.ascii	"flash_otp_info\000"
	.align	2
.LC3:
	.ascii	"Usage: %s [ -f | -u ] <device>\012\000"
	.align	2
.LC4:
	.ascii	"OTPSELECT\000"
	.align	2
.LC5:
	.ascii	"OTPGETREGIONCOUNT\000"
	.align	2
.LC6:
	.ascii	"factory\000"
	.align	2
.LC7:
	.ascii	"user\000"
	.align	2
.LC8:
	.ascii	"Number of OTP %s blocks on %s: %d\012\000"
	.align	2
.LC9:
	.ascii	"[locked]\000"
	.align	2
.LC10:
	.ascii	"[unlocked]\000"
	.align	2
.LC11:
	.ascii	"block %2d:  offset = 0x%04x  size = %2d bytes  %s\012"
	.ascii	"\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #52
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	bne	.L2
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L20+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L20+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
.L2:
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+16
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	mov	r3, #22
	b	.L18
.L3:
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L5
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L18
.L5:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #102
	bne	.L6
	mov	r3, #1
	b	.L7
.L6:
	mov	r3, #2
.L7:
	str	r3, [fp, #-56]
	sub	r3, fp, #56
	mov	r2, r3
	ldr	r1, .L20+24
	ldr	r0, [fp, #-48]
	bl	ioctl
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L20+28
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L18
.L8:
	sub	r3, fp, #56
	mov	r2, r3
	ldr	r1, .L20+32
	ldr	r0, [fp, #-48]
	bl	ioctl
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L20+36
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L18
.L9:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #102
	bne	.L10
	ldr	r1, .L20+40
	b	.L11
.L10:
	ldr	r1, .L20+44
.L11:
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r2, [r3]
	ldr	r3, [fp, #-56]
	ldr	r0, .L20+48
	bl	printf
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	ble	.L12
	mov	r3, sp
	mov	r8, r3
	ldr	ip, [fp, #-56]
	sub	r3, ip, #1
	str	r3, [fp, #-40]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, r0
	mov	r3, r1
	adds	r6, r2, r2
	adc	r7, r3, r3
	mov	r2, r6
	mov	r3, r7
	adds	r2, r2, r0
	adc	r3, r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #5
	orr	r1, r1, r2, lsr #27
	lsl	r0, r2, #5
	mov	r2, r0
	mov	r3, r1
	mov	r2, ip
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, r0
	mov	r3, r1
	adds	r4, r2, r2
	adc	r5, r3, r3
	mov	r2, r4
	mov	r3, r5
	adds	r2, r2, r0
	adc	r3, r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #5
	orr	r1, r1, r2, lsr #27
	lsl	r0, r2, #5
	mov	r2, r0
	mov	r3, r1
	mov	r2, ip
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-36]
	ldr	r1, .L20+52
	ldr	r0, [fp, #-48]
	bl	ioctl
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L20+36
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	sp, r8
	b	.L18
.L13:
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L14
.L17:
	ldr	r1, [fp, #-36]
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r0, [r3]
	ldr	r1, [fp, #-36]
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	ip, [r3]
	ldr	r1, [fp, #-36]
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L20+56
	b	.L16
.L15:
	ldr	r3, .L20+60
.L16:
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r1, [fp, #-52]
	ldr	r0, .L20+64
	bl	printf
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L14:
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	blt	.L17
	mov	sp, r8
.L12:
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	-2147201779
	.word	.LC4
	.word	1074023694
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	1074547983
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
