	.file	"23479.c"
	.intel_syntax noprefix
	.text
	.globl	mtd
	.bss
	.align 32
	.type	mtd, @object
	.size	mtd, 32
mtd:
	.zero	32
	.globl	filestat
	.align 32
	.type	filestat, @object
	.size	filestat, 144
filestat:
	.zero	144
	.globl	erase
	.align 8
	.type	erase, @object
	.size	erase, 8
erase:
	.zero	8
	.text
	.type	log_printf, @function
log_printf:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -228[rbp], 1
	jne	.L3
	mov	rax, QWORD PTR stdout[rip]
	jmp	.L4
.L3:
	mov	rax, QWORD PTR stderr[rip]
.L4:
	mov	QWORD PTR -216[rbp], rax
	mov	DWORD PTR -208[rbp], 16
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -240[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	fflush@PLT
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	log_printf, .-log_printf
	.section	.rodata
	.align 8
.LC0:
	.string	"While trying to get the filestatus of %s\n"
	.align 8
.LC1:
	.string	"%s won't fit into SPI NOR partition!\n"
	.text
	.type	validate_input_file, @function
validate_input_file:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -20[rbp]
	lea	rsi, filestat[rip]
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	jns	.L7
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -4[rbp], -1
.L7:
	mov	rax, QWORD PTR filestat[rip+48]
	mov	edx, eax
	mov	eax, DWORD PTR mtd[rip+8]
	cmp	edx, eax
	jbe	.L8
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -4[rbp], -1
.L8:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	validate_input_file, .-validate_input_file
	.section	.rodata
	.align 8
.LC2:
	.string	"offset:0x%x not with-in range of mtd partition size:0x%x\n"
	.align 8
.LC3:
	.string	"offset:0x%x is not a sector boundary\nIt needs to be multiples of erasesize:0x%x\n"
	.text
	.type	validate_input_offset, @function
validate_input_offset:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR mtd[rip+8]
	mov	eax, eax
	cmp	QWORD PTR -24[rbp], rax
	jbe	.L11
	mov	edx, DWORD PTR mtd[rip+8]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, edx
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -4[rbp], -1
.L11:
	mov	eax, DWORD PTR mtd[rip+12]
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	div	rcx
	mov	rax, rdx
	test	rax, rax
	je	.L12
	mov	edx, DWORD PTR mtd[rip+12]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, edx
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -4[rbp], -1
.L12:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	validate_input_offset, .-validate_input_offset
	.section	.rodata
.LC4:
	.string	"\rErasing blocks: %d/%d (%d%%)"
	.align 8
.LC5:
	.string	"Error While erasing blocks 0x%.8x-0x%.8x: %m\n"
	.align 8
.LC6:
	.string	"\rErasing blocks: %d/%d (100%%)\n"
	.text
	.type	flash_erase, @function
flash_erase:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR erase[rip], eax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	sub	rax, 1
	mov	edx, DWORD PTR mtd[rip+12]
	mov	ecx, edx
	mov	edx, 0
	div	rcx
	mov	DWORD PTR erase[rip+4], eax
	mov	edx, DWORD PTR erase[rip+4]
	mov	eax, DWORD PTR mtd[rip+12]
	imul	eax, edx
	mov	DWORD PTR erase[rip+4], eax
	mov	eax, DWORD PTR erase[rip+4]
	mov	esi, DWORD PTR mtd[rip+12]
	mov	edx, 0
	div	esi
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	DWORD PTR erase[rip+4], eax
	mov	DWORD PTR -8[rbp], 1
	jmp	.L15
.L18:
	mov	eax, DWORD PTR -8[rbp]
	imul	eax, eax, 100
	cdq
	idiv	DWORD PTR -4[rbp]
	mov	ecx, eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, erase[rip]
	mov	esi, 1074285826
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L16
	mov	edx, DWORD PTR erase[rip]
	mov	eax, DWORD PTR erase[rip+4]
	add	edx, eax
	mov	eax, DWORD PTR erase[rip]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC5[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	eax, -1
	jmp	.L17
.L16:
	mov	edx, DWORD PTR erase[rip]
	mov	eax, DWORD PTR mtd[rip+12]
	add	eax, edx
	mov	DWORD PTR erase[rip], eax
	add	DWORD PTR -8[rbp], 1
.L15:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jle	.L18
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC6[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	eax, 0
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	flash_erase, .-flash_erase
	.section	.rodata
.LC7:
	.string	"Failed to open the file: %s\n"
	.text
	.type	flash_open, @function
flash_open:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], -1
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 420
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	lea	rsi, .LC7[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
.L20:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	flash_open, .-flash_open
	.section	.rodata
	.align 8
.LC8:
	.string	"While reading data from%s: %m\n"
	.align 8
.LC9:
	.string	"Short read count returned while readingfrom %s\n"
	.text
	.type	flash_read, @function
flash_read:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	DWORD PTR -12[rbp], 0
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	je	.L23
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -8[rbp]
	test	eax, eax
	jns	.L24
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	lea	rsi, .LC8[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -12[rbp], -1
.L24:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	lea	rsi, .LC9[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -12[rbp], -1
.L23:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	flash_read, .-flash_read
	.section	.rodata
	.align 8
.LC10:
	.string	"While seeking to start of %s: %m\n"
	.text
	.type	flash_rewind, @function
flash_rewind:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L27
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	lea	rsi, .LC10[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	eax, -1
	jmp	.L28
.L27:
	mov	eax, 0
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	flash_rewind, .-flash_rewind
	.section	.rodata
.LC11:
	.string	"Writing data: 0k/%luk (0%%)"
	.align 8
.LC12:
	.string	"\rWriting data: %dk/%luk (%lu%%)"
	.align 8
.LC13:
	.string	"While writing data to0x%.8x-0x%.8x on %s: %m\n"
	.align 8
.LC14:
	.string	"Short write count returned whilewriting to x%.8x-0x%.8x on %s: %d/%lu bytes written to flash\n"
	.align 8
.LC15:
	.string	"\rWriting data: %luk/%luk (100%%)\n"
	.text
	.type	flash_write, @function
flash_write:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 2144
	mov	DWORD PTR -10308[rbp], edi
	mov	DWORD PTR -10312[rbp], esi
	mov	QWORD PTR -10320[rbp], rdx
	mov	QWORD PTR -10328[rbp], rcx
	mov	QWORD PTR -10336[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -10284[rbp], 0
	mov	DWORD PTR -10288[rbp], 0
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rdx, rax
	lea	rsi, .LC11[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	rax, QWORD PTR filestat[rip+48]
	mov	QWORD PTR -10280[rbp], rax
	mov	DWORD PTR -10292[rbp], 10240
	mov	QWORD PTR -10272[rbp], 0
	cmp	QWORD PTR -10320[rbp], 0
	je	.L32
	mov	rdx, QWORD PTR -10336[rbp]
	mov	rcx, QWORD PTR -10320[rbp]
	mov	eax, DWORD PTR -10308[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	flash_rewind
	mov	DWORD PTR -10284[rbp], eax
	cmp	DWORD PTR -10284[rbp], 0
	jns	.L32
	mov	DWORD PTR -10288[rbp], -1
	jmp	.L31
.L37:
	cmp	QWORD PTR -10280[rbp], 10239
	jg	.L33
	mov	rax, QWORD PTR -10280[rbp]
	mov	DWORD PTR -10292[rbp], eax
.L33:
	mov	eax, DWORD PTR -10292[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -10272[rbp]
	add	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdi, QWORD PTR filestat[rip+48]
	cqo
	idiv	rdi
	mov	rsi, rax
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rcx, rax
	mov	eax, DWORD PTR -10292[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -10272[rbp]
	add	rax, rdx
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	r8, rsi
	mov	rdx, rax
	lea	rsi, .LC12[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	eax, DWORD PTR -10292[rbp]
	movsx	rcx, eax
	lea	rdx, -10256[rbp]
	mov	rsi, QWORD PTR -10328[rbp]
	mov	eax, DWORD PTR -10312[rbp]
	mov	edi, eax
	call	flash_read
	mov	DWORD PTR -10284[rbp], eax
	cmp	DWORD PTR -10284[rbp], 0
	jns	.L34
	mov	DWORD PTR -10288[rbp], -1
	jmp	.L31
.L34:
	mov	eax, DWORD PTR -10292[rbp]
	movsx	rdx, eax
	lea	rcx, -10256[rbp]
	mov	eax, DWORD PTR -10308[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -10264[rbp], rax
	mov	eax, DWORD PTR -10292[rbp]
	cdqe
	cmp	QWORD PTR -10264[rbp], rax
	je	.L35
	mov	edi, 10
	call	putchar@PLT
	cmp	QWORD PTR -10264[rbp], 0
	jns	.L36
	mov	eax, DWORD PTR -10292[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -10272[rbp]
	add	rdx, rax
	mov	rcx, QWORD PTR -10336[rbp]
	mov	rax, QWORD PTR -10272[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC13[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -10288[rbp], -1
	jmp	.L31
.L36:
	mov	rcx, QWORD PTR filestat[rip+48]
	mov	rdx, QWORD PTR -10272[rbp]
	mov	rax, QWORD PTR -10264[rbp]
	lea	rdi, [rdx+rax]
	mov	eax, DWORD PTR -10292[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -10272[rbp]
	add	rdx, rax
	mov	rsi, QWORD PTR -10336[rbp]
	mov	rax, QWORD PTR -10272[rbp]
	sub	rsp, 8
	push	rcx
	mov	r9, rdi
	mov	r8, rsi
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC14[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	add	rsp, 16
	mov	DWORD PTR -10288[rbp], -1
	jmp	.L31
.L35:
	mov	eax, DWORD PTR -10292[rbp]
	cdqe
	add	QWORD PTR -10272[rbp], rax
	mov	eax, DWORD PTR -10292[rbp]
	cdqe
	sub	QWORD PTR -10280[rbp], rax
.L32:
	cmp	QWORD PTR -10280[rbp], 0
	jne	.L37
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rcx, rax
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rdx, rax
	lea	rsi, .LC15[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
.L31:
	mov	eax, DWORD PTR -10288[rbp]
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	flash_write, .-flash_write
	.section	.rodata
.LC16:
	.string	"Verifying data: 0k/%luk (0%%)"
	.align 8
.LC17:
	.string	"\rVerifying data: %dk/%luk (%lu%%)"
	.align 8
.LC18:
	.string	"File does not seem to matchflash data. First mismatch at 0x%.8x-0x%.8x\n"
	.align 8
.LC19:
	.string	"\rVerifying data: %luk/%luk (100%%)\n"
	.align 8
.LC20:
	.string	"Verified flash content %lu bytes, Success.\n"
	.text
	.type	flash_verify, @function
flash_verify:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -20480[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 80
	mov	DWORD PTR -20532[rbp], edi
	mov	DWORD PTR -20536[rbp], esi
	mov	QWORD PTR -20544[rbp], rdx
	mov	QWORD PTR -20552[rbp], rcx
	mov	QWORD PTR -20560[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20516[rbp], 0
	mov	DWORD PTR -20520[rbp], 0
	mov	rdx, QWORD PTR -20552[rbp]
	mov	eax, DWORD PTR -20536[rbp]
	mov	esi, 0
	mov	edi, eax
	call	flash_rewind
	mov	DWORD PTR -20516[rbp], eax
	cmp	DWORD PTR -20516[rbp], 0
	jns	.L41
	mov	DWORD PTR -20520[rbp], -1
	jmp	.L42
.L41:
	mov	rdx, QWORD PTR -20560[rbp]
	mov	rcx, QWORD PTR -20544[rbp]
	mov	eax, DWORD PTR -20532[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	flash_rewind
	mov	DWORD PTR -20516[rbp], eax
	cmp	DWORD PTR -20516[rbp], 0
	jns	.L43
	mov	DWORD PTR -20520[rbp], -1
	jmp	.L42
.L43:
	mov	rax, QWORD PTR filestat[rip+48]
	mov	QWORD PTR -20512[rbp], rax
	mov	DWORD PTR -20524[rbp], 10240
	mov	QWORD PTR -20504[rbp], 0
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rdx, rax
	lea	rsi, .LC16[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	jmp	.L44
.L49:
	cmp	QWORD PTR -20512[rbp], 10239
	jg	.L45
	mov	rax, QWORD PTR -20512[rbp]
	mov	DWORD PTR -20524[rbp], eax
.L45:
	mov	eax, DWORD PTR -20524[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -20504[rbp]
	add	rdx, rax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdi, QWORD PTR filestat[rip+48]
	cqo
	idiv	rdi
	mov	rsi, rax
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rcx, rax
	mov	eax, DWORD PTR -20524[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -20504[rbp]
	add	rax, rdx
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	r8, rsi
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	eax, DWORD PTR -20524[rbp]
	movsx	rcx, eax
	lea	rdx, -20496[rbp]
	mov	rsi, QWORD PTR -20552[rbp]
	mov	eax, DWORD PTR -20536[rbp]
	mov	edi, eax
	call	flash_read
	mov	DWORD PTR -20516[rbp], eax
	cmp	DWORD PTR -20516[rbp], 0
	jns	.L46
	mov	DWORD PTR -20520[rbp], -1
	jmp	.L42
.L46:
	mov	eax, DWORD PTR -20524[rbp]
	movsx	rcx, eax
	lea	rdx, -10256[rbp]
	mov	rsi, QWORD PTR -20560[rbp]
	mov	eax, DWORD PTR -20532[rbp]
	mov	edi, eax
	call	flash_read
	mov	DWORD PTR -20516[rbp], eax
	cmp	DWORD PTR -20516[rbp], 0
	jns	.L47
	mov	DWORD PTR -20520[rbp], -1
	jmp	.L42
.L47:
	mov	eax, DWORD PTR -20524[rbp]
	movsx	rdx, eax
	lea	rcx, -10256[rbp]
	lea	rax, -20496[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcmp@PLT
	test	eax, eax
	je	.L48
	mov	eax, DWORD PTR -20524[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -20504[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -20504[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC18[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -20520[rbp], -1
	jmp	.L42
.L48:
	mov	eax, DWORD PTR -20524[rbp]
	cdqe
	add	QWORD PTR -20504[rbp], rax
	mov	eax, DWORD PTR -20524[rbp]
	cdqe
	sub	QWORD PTR -20512[rbp], rax
.L44:
	cmp	QWORD PTR -20512[rbp], 0
	jne	.L49
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rcx, rax
	mov	rax, QWORD PTR filestat[rip+48]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	rdx, rax
	lea	rsi, .LC19[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	rax, QWORD PTR filestat[rip+48]
	mov	rdx, rax
	lea	rsi, .LC20[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
.L42:
	mov	eax, DWORD PTR -20520[rbp]
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	flash_verify, .-flash_verify
	.type	crc16, @function
crc16:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L53
.L58:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	xor	DWORD PTR -8[rbp], eax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L54
.L57:
	mov	eax, DWORD PTR -8[rbp]
	and	eax, 32768
	test	eax, eax
	je	.L55
	mov	eax, DWORD PTR -8[rbp]
	add	eax, eax
	xor	eax, 4129
	mov	DWORD PTR -8[rbp], eax
	jmp	.L56
.L55:
	sal	DWORD PTR -8[rbp]
.L56:
	add	DWORD PTR -4[rbp], 1
.L54:
	cmp	DWORD PTR -4[rbp], 7
	jle	.L57
.L53:
	sub	DWORD PTR -28[rbp], 1
	cmp	DWORD PTR -28[rbp], 0
	jns	.L58
	mov	eax, DWORD PTR -8[rbp]
	movzx	eax, ax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	crc16, .-crc16
	.type	nvparam_get, @function
nvparam_get:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -4[rbp], -1
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	flash_rewind
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L61
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L62
.L61:
	mov	eax, DWORD PTR mtd[rip+12]
	mov	ecx, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 0
	mov	edi, eax
	call	flash_read
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
.L62:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	nvparam_get, .-nvparam_get
	.section	.rodata
	.align 8
.LC21:
	.ascii	"%s -f <file> -o <SPI offset>: Write binary <file> to host SP"
	.ascii	"I NOR at offset <SPI offset>.\n\t<file> is NVPARAM blob gene"
	.ascii	"rated by NV-parameter generator.\n%s -s <value> -o <SPI offs"
	.ascii	"et>: Set a single NVPARAM at host SPI NOR offset <SPI offset"
	.ascii	"> to <value>\n%s -r -o <SPI offset>: Read a single NVPARAM a"
	.ascii	"t host SPI NOR offset <SPI offset> and display\n%s -c -o <NV"
	.ascii	"PARAM base SPI offset>: Clear NVPARAM partition at <NVPARAM "
	.ascii	"base SPI offset>\n%s -d <file> -o <NVPARAM base SPI offset>:"
	.ascii	" Dump a NVPARAM partition at <NVPARAM base SPI offset> to bi"
	.string	"nary file <file>\n%s -l -o <NVPARAM base SPI offset>: \n\tList out all the valid nvparam settings on a NVPARAM partition at <NVPARAM base SPI offset>\n%s -e -o <SPI offset>: Erase a particular NVPARAM at host SPI NOR offset <SPI offset>\n%s -h: Print this help\n"
	.text
	.type	help, @function
help:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rsi, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -8[rbp]
	push	QWORD PTR -8[rbp]
	push	QWORD PTR -8[rbp]
	push	QWORD PTR -8[rbp]
	push	QWORD PTR -8[rbp]
	mov	r9, rsi
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC21[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	add	rsp, 32
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	help, .-help
	.section	.rodata
.LC22:
	.string	"Option -%c: malloc failure\n"
.LC23:
	.string	"Option -o: malloc failure\n"
.LC24:
	.string	"Option -s: malloc failure\n"
.LC25:
	.string	"cd:ef:hlo:rs:"
.LC26:
	.string	"SPI offset must be specified\n"
	.align 8
.LC27:
	.string	"Options -c, -d, -f, -r, -s, -l, -e can't be mixed together.\n"
.LC28:
	.string	"Input %s is %s\n"
.LC29:
	.string	"r"
.LC30:
	.string	"/proc/mtd"
	.align 8
.LC31:
	.string	"Unable to open %s to get MTD info...\n"
.LC32:
	.string	"\"pnor\""
.LC33:
	.string	":"
	.align 8
.LC34:
	.string	"Error in finding the BIOS Partition \n"
	.align 8
.LC35:
	.string	"Unable to find HOST SPI / PNOR  MTD partition...\n"
.LC36:
	.string	"/dev/mtd%d"
.LC37:
	.string	"Buffer Overflow.\n"
.LC38:
	.string	"Failed to erase\n"
.LC39:
	.string	"Failed to read NVPARAM\n"
	.align 8
.LC40:
	.string	"Failed to write NVPARAM to file\n"
	.align 8
.LC41:
	.string	"NVPARAM at 0x%x: 0x%08x (ACL_RD:0x%x - ACL_WR:0x%x)\n"
	.align 8
.LC42:
	.string	"Found total %d valid record(s) from Offset: %x\n"
	.align 8
.LC43:
	.string	"NVPARAM at 0x%x:\n\tParam: 0x%08x\n\tACL_RD: 0x%02x\n\tACL_WR: 0x%02x\n\tValid: %d\n\tCRC16: %x"
	.align 8
.LC44:
	.string	" (Mismatch! Calculated CRC16: %x)\n"
.LC45:
	.string	"\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB19:
	.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	r12
	push	rbx
	sub	rsp, 576
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	DWORD PTR -452[rbp], edi
	mov	QWORD PTR -464[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -432[rbp], 0
	mov	DWORD PTR -436[rbp], -1
	mov	QWORD PTR -360[rbp], -1
	mov	QWORD PTR -368[rbp], -1
	mov	DWORD PTR -164[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	mov	DWORD PTR -176[rbp], 0
	mov	QWORD PTR -376[rbp], 0
	mov	QWORD PTR -384[rbp], 0
	mov	QWORD PTR -392[rbp], 0
	cmp	DWORD PTR -452[rbp], 1
	jne	.L67
	mov	rax, QWORD PTR -464[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	help
	jmp	.L66
.L86:
	mov	eax, DWORD PTR -428[rbp]
	sub	eax, 99
	cmp	eax, 16
	ja	.L68
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L70[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rdx, eax
	lea	rax, .L70[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L70:
	.long	.L77-.L70
	.long	.L75-.L70
	.long	.L76-.L70
	.long	.L75-.L70
	.long	.L68-.L70
	.long	.L74-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L73-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L72-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L71-.L70
	.long	.L69-.L70
	.text
.L77:
	mov	DWORD PTR -208[rbp], 1
	jmp	.L67
.L75:
	cmp	DWORD PTR -428[rbp], 100
	jne	.L78
	mov	DWORD PTR -204[rbp], 1
	jmp	.L79
.L78:
	mov	DWORD PTR -200[rbp], 1
.L79:
	cmp	QWORD PTR -376[rbp], 0
	je	.L80
	mov	rax, QWORD PTR -376[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -376[rbp], 0
.L80:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -376[rbp], rax
	cmp	QWORD PTR -376[rbp], 0
	jne	.L67
	mov	eax, DWORD PTR -428[rbp]
	mov	edx, eax
	lea	rsi, .LC22[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L72:
	mov	DWORD PTR -192[rbp], 1
	cmp	QWORD PTR -384[rbp], 0
	je	.L82
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -384[rbp], 0
.L82:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -384[rbp], rax
	cmp	QWORD PTR -384[rbp], 0
	jne	.L67
	lea	rsi, .LC23[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L71:
	mov	DWORD PTR -188[rbp], 1
	jmp	.L67
.L69:
	mov	DWORD PTR -184[rbp], 1
	cmp	QWORD PTR -392[rbp], 0
	je	.L84
	mov	rax, QWORD PTR -392[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -392[rbp], 0
.L84:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -392[rbp], rax
	cmp	QWORD PTR -392[rbp], 0
	jne	.L67
	lea	rsi, .LC24[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L73:
	mov	DWORD PTR -176[rbp], 1
	jmp	.L67
.L76:
	mov	DWORD PTR -180[rbp], 1
	jmp	.L67
.L74:
	mov	DWORD PTR -196[rbp], 1
.L68:
	mov	rax, QWORD PTR -464[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	help
	jmp	.L66
.L67:
	mov	rcx, QWORD PTR -464[rbp]
	mov	eax, DWORD PTR -452[rbp]
	lea	rdx, .LC25[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -428[rbp], eax
	cmp	DWORD PTR -428[rbp], -1
	jne	.L86
	mov	eax, DWORD PTR -192[rbp]
	test	eax, eax
	jne	.L87
	lea	rsi, .LC26[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	rax, QWORD PTR -464[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	help
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L87:
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L88
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	jne	.L89
.L88:
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L90
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	jne	.L89
.L90:
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L91
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	jne	.L89
.L91:
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L92
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	jne	.L89
.L92:
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L93
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	jne	.L89
.L93:
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L94
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	jne	.L89
.L94:
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	je	.L95
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	jne	.L89
.L95:
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	je	.L96
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	jne	.L89
.L96:
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	je	.L97
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	jne	.L89
.L97:
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	je	.L98
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	jne	.L89
.L98:
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	je	.L99
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	jne	.L89
.L99:
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	je	.L100
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	jne	.L89
.L100:
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	je	.L101
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	jne	.L89
.L101:
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	je	.L102
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	jne	.L89
.L102:
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	je	.L103
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	jne	.L89
.L103:
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	je	.L104
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	jne	.L89
.L104:
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	je	.L105
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	jne	.L89
.L105:
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	je	.L106
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	jne	.L89
.L106:
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	je	.L107
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	jne	.L89
.L107:
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	je	.L108
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	jne	.L89
.L108:
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	je	.L109
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	je	.L109
.L89:
	lea	rsi, .LC27[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	rax, QWORD PTR -464[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	help
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L109:
	cmp	QWORD PTR -384[rbp], 0
	je	.L110
	mov	rax, QWORD PTR -384[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -360[rbp], rax
	cmp	QWORD PTR -360[rbp], -1
	jne	.L110
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	jne	.L110
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -384[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC28[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L110:
	cmp	QWORD PTR -392[rbp], 0
	je	.L111
	mov	rax, QWORD PTR -392[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -368[rbp], rax
	cmp	QWORD PTR -368[rbp], -1
	jne	.L111
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	jne	.L111
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -384[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC28[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L66
.L111:
	lea	rsi, .LC29[rip]
	lea	rdi, .LC30[rip]
	call	fopen@PLT
	mov	QWORD PTR -352[rbp], rax
	cmp	QWORD PTR -352[rbp], 0
	jne	.L114
	lea	rdx, .LC30[rip]
	lea	rsi, .LC31[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	jmp	.L113
.L117:
	lea	rax, -128[rbp]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L114
	lea	rax, -128[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -344[rbp], rax
	cmp	QWORD PTR -344[rbp], 0
	jne	.L115
	lea	rsi, .LC34[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	rax, QWORD PTR -352[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L113
.L115:
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -3[rax]
	mov	rax, QWORD PTR -344[rbp]
	lea	rcx, 3[rax]
	lea	rax, -164[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	lea	rax, -164[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -436[rbp], eax
	jmp	.L116
.L114:
	mov	rax, QWORD PTR -352[rbp]
	lea	rcx, -128[rbp]
	mov	rdx, rax
	mov	esi, 80
	mov	rdi, rcx
	call	fgets@PLT
	test	rax, rax
	jne	.L117
.L116:
	mov	rax, QWORD PTR -352[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -436[rbp], -1
	jne	.L118
	lea	rsi, .LC35[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	jmp	.L113
.L118:
	mov	eax, DWORD PTR -436[rbp]
	lea	rdi, -160[rbp]
	mov	ecx, eax
	lea	rdx, .LC36[rip]
	mov	esi, 20
	mov	eax, 0
	call	snprintf@PLT
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], 19
	jg	.L119
	cmp	DWORD PTR -432[rbp], 0
	jns	.L120
.L119:
	lea	rsi, .LC37[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	jmp	.L113
.L120:
	lea	rax, -160[rbp]
	mov	QWORD PTR -336[rbp], rax
	mov	rax, QWORD PTR -336[rbp]
	mov	esi, 1052674
	mov	rdi, rax
	call	flash_open
	mov	DWORD PTR dev_fd.1[rip], eax
	mov	eax, DWORD PTR dev_fd.1[rip]
	test	eax, eax
	jns	.L121
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L121:
	mov	eax, DWORD PTR dev_fd.1[rip]
	lea	rdx, mtd[rip]
	mov	esi, 2149600513
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], 0
	js	.L177
	mov	eax, DWORD PTR -208[rbp]
	test	eax, eax
	je	.L123
	mov	rax, QWORD PTR -360[rbp]
	mov	rdi, rax
	call	validate_input_offset
	test	eax, eax
	jns	.L124
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L124:
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 65536
	mov	rsi, rax
	mov	edi, ecx
	call	flash_erase
	test	eax, eax
	jns	.L123
	lea	rsi, .LC38[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L123:
	mov	eax, DWORD PTR -204[rbp]
	test	eax, eax
	je	.L125
	mov	rax, rsp
	mov	r12, rax
	mov	eax, DWORD PTR mtd[rip+12]
	shr	eax, 3
	mov	ebx, eax
	mov	rax, rbx
	sub	rax, 1
	mov	QWORD PTR -328[rbp], rax
	mov	r14, rbx
	mov	r15d, 0
	mov	QWORD PTR -480[rbp], rbx
	mov	QWORD PTR -472[rbp], 0
	lea	rdx, 0[0+rbx*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rdx, rax, 16
	mov	rax, rdx
	and	rax, -4096
	mov	rcx, rsp
	sub	rcx, rax
.L126:
	cmp	rsp, rcx
	je	.L127
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L126
.L127:
	mov	rax, rdx
	and	eax, 4095
	sub	rsp, rax
	mov	rax, rdx
	and	eax, 4095
	test	rax, rax
	je	.L128
	mov	rax, rdx
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L128:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -320[rbp], rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	esi, eax
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 0
	div	rsi
	mov	rdx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	eax, eax
	imul	rax, rdx
	mov	QWORD PTR -312[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	mov	rdi, rax
	call	validate_input_offset
	test	eax, eax
	jns	.L129
	mov	DWORD PTR -432[rbp], 1
	jmp	.L130
.L129:
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rdx, QWORD PTR -320[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	nvparam_get
	test	eax, eax
	jns	.L131
	lea	rsi, .LC39[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L130
.L131:
	mov	rax, QWORD PTR -376[rbp]
	mov	esi, 65
	mov	rdi, rax
	call	flash_open
	mov	DWORD PTR fil_fd.0[rip], eax
	mov	eax, DWORD PTR fil_fd.0[rip]
	test	eax, eax
	jns	.L132
	mov	DWORD PTR -432[rbp], 1
	jmp	.L130
.L132:
	lea	rdx, 0[0+rbx*8]
	mov	ecx, DWORD PTR fil_fd.0[rip]
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	write@PLT
	test	rax, rax
	jns	.L133
	lea	rsi, .LC40[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L130
.L133:
	mov	rsp, r12
	jmp	.L125
.L130:
	mov	rsp, r12
	jmp	.L113
.L125:
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	je	.L134
	mov	rax, QWORD PTR -376[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	flash_open
	mov	DWORD PTR fil_fd.0[rip], eax
	mov	eax, DWORD PTR fil_fd.0[rip]
	test	eax, eax
	jns	.L135
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L135:
	mov	edx, DWORD PTR fil_fd.0[rip]
	mov	rax, QWORD PTR -376[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	validate_input_file
	test	eax, eax
	jns	.L136
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L136:
	mov	rax, QWORD PTR -360[rbp]
	mov	rdi, rax
	call	validate_input_offset
	test	eax, eax
	jns	.L137
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L137:
	mov	rax, QWORD PTR filestat[rip+48]
	mov	rdx, rax
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rax, QWORD PTR -360[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	flash_erase
	test	eax, eax
	jns	.L138
	lea	rsi, .LC38[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L138:
	mov	esi, DWORD PTR fil_fd.0[rip]
	mov	edi, DWORD PTR dev_fd.1[rip]
	mov	rcx, QWORD PTR -384[rbp]
	mov	rdx, QWORD PTR -376[rbp]
	mov	rax, QWORD PTR -360[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, rax
	call	flash_write
	test	eax, eax
	jns	.L139
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L139:
	mov	esi, DWORD PTR fil_fd.0[rip]
	mov	edi, DWORD PTR dev_fd.1[rip]
	mov	rcx, QWORD PTR -384[rbp]
	mov	rdx, QWORD PTR -376[rbp]
	mov	rax, QWORD PTR -360[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, rax
	call	flash_verify
	test	eax, eax
	jns	.L134
	mov	DWORD PTR -432[rbp], 1
	jmp	.L113
.L134:
	mov	eax, DWORD PTR -184[rbp]
	test	eax, eax
	je	.L140
	mov	rax, rsp
	mov	r12, rax
	mov	eax, DWORD PTR mtd[rip+12]
	shr	eax, 3
	mov	ebx, eax
	mov	rax, rbx
	sub	rax, 1
	mov	QWORD PTR -304[rbp], rax
	mov	QWORD PTR -496[rbp], rbx
	mov	QWORD PTR -488[rbp], 0
	mov	QWORD PTR -512[rbp], rbx
	mov	QWORD PTR -504[rbp], 0
	lea	rdx, 0[0+rbx*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rdx, rax, 16
	mov	rax, rdx
	and	rax, -4096
	mov	rcx, rsp
	sub	rcx, rax
.L141:
	cmp	rsp, rcx
	je	.L142
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L141
.L142:
	mov	rax, rdx
	and	eax, 4095
	sub	rsp, rax
	mov	rax, rdx
	and	eax, 4095
	test	rax, rax
	je	.L143
	mov	rax, rdx
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L143:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -296[rbp], rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	ecx, eax
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 0
	div	rcx
	mov	rdx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	eax, eax
	imul	rax, rdx
	mov	QWORD PTR -288[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	sub	rax, QWORD PTR -288[rbp]
	shr	rax, 3
	mov	DWORD PTR -424[rbp], eax
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rdx, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR -288[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	nvparam_get
	test	eax, eax
	jns	.L144
	lea	rsi, .LC39[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L145
.L144:
	mov	rax, QWORD PTR -368[rbp]
	mov	ecx, eax
	mov	rdx, QWORD PTR -296[rbp]
	mov	eax, DWORD PTR -424[rbp]
	mov	DWORD PTR [rdx+rax*8], ecx
	mov	rdx, QWORD PTR -296[rbp]
	mov	eax, DWORD PTR -424[rbp]
	mov	BYTE PTR 4[rdx+rax*8], -1
	mov	rcx, QWORD PTR -296[rbp]
	mov	edx, DWORD PTR -424[rbp]
	movzx	eax, BYTE PTR 5[rcx+rdx*8]
	or	eax, 127
	mov	BYTE PTR 5[rcx+rdx*8], al
	mov	rcx, QWORD PTR -296[rbp]
	mov	edx, DWORD PTR -424[rbp]
	movzx	eax, BYTE PTR 5[rcx+rdx*8]
	or	eax, -128
	mov	BYTE PTR 5[rcx+rdx*8], al
	mov	rcx, QWORD PTR -296[rbp]
	mov	edx, DWORD PTR -424[rbp]
	movzx	eax, BYTE PTR 6[rcx+rdx*8]
	and	eax, 0
	mov	BYTE PTR 6[rcx+rdx*8], al
	movzx	eax, BYTE PTR 7[rcx+rdx*8]
	and	eax, 0
	mov	BYTE PTR 7[rcx+rdx*8], al
	mov	eax, DWORD PTR -424[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -296[rbp]
	add	rax, rdx
	mov	esi, 8
	mov	rdi, rax
	call	crc16
	mov	edi, eax
	mov	rcx, QWORD PTR -296[rbp]
	mov	edx, DWORD PTR -424[rbp]
	movzx	eax, di
	movzx	esi, al
	movzx	eax, BYTE PTR 6[rcx+rdx*8]
	and	eax, 0
	or	eax, esi
	mov	BYTE PTR 6[rcx+rdx*8], al
	mov	eax, edi
	shr	ax, 8
	movzx	esi, ax
	movzx	eax, BYTE PTR 7[rcx+rdx*8]
	and	eax, 0
	or	eax, esi
	mov	BYTE PTR 7[rcx+rdx*8], al
	lea	rdx, 0[0+rbx*8]
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rax, QWORD PTR -288[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	flash_erase
	test	eax, eax
	jns	.L146
	lea	rsi, .LC38[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L145
.L146:
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rax, QWORD PTR -288[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, ecx
	call	flash_rewind
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], 0
	jns	.L147
	mov	DWORD PTR -432[rbp], 1
	jmp	.L145
.L147:
	lea	rdx, 0[0+rbx*8]
	mov	ecx, DWORD PTR dev_fd.1[rip]
	mov	rax, QWORD PTR -296[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	write@PLT
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], 0
	jns	.L148
	mov	DWORD PTR -432[rbp], 1
	jmp	.L145
.L148:
	mov	rsp, r12
	jmp	.L140
.L145:
	mov	rsp, r12
	jmp	.L113
.L140:
	mov	eax, DWORD PTR -180[rbp]
	test	eax, eax
	je	.L149
	mov	rax, rsp
	mov	r12, rax
	mov	eax, DWORD PTR mtd[rip+12]
	shr	eax, 3
	mov	ebx, eax
	mov	rax, rbx
	sub	rax, 1
	mov	QWORD PTR -280[rbp], rax
	mov	QWORD PTR -528[rbp], rbx
	mov	QWORD PTR -520[rbp], 0
	mov	QWORD PTR -544[rbp], rbx
	mov	QWORD PTR -536[rbp], 0
	lea	rax, 0[0+rbx*8]
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L150:
	cmp	rsp, rdx
	je	.L151
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L150
.L151:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L152
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L152:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -272[rbp], rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	esi, eax
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 0
	div	rsi
	mov	rdx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	eax, eax
	imul	rax, rdx
	mov	QWORD PTR -264[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	sub	rax, QWORD PTR -264[rbp]
	shr	rax, 3
	mov	DWORD PTR -420[rbp], eax
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	rdx, QWORD PTR -272[rbp]
	mov	rcx, QWORD PTR -264[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	nvparam_get
	test	eax, eax
	jns	.L153
	lea	rsi, .LC39[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L154
.L153:
	mov	eax, DWORD PTR -420[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -272[rbp]
	add	rax, rdx
	mov	edx, 8
	mov	esi, 255
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, 0[0+rbx*8]
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	rcx, QWORD PTR -264[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	flash_erase
	test	eax, eax
	jns	.L155
	lea	rsi, .LC38[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	jmp	.L154
.L155:
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	rcx, QWORD PTR -264[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	flash_rewind
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], 0
	jns	.L156
	mov	DWORD PTR -432[rbp], 1
	jmp	.L154
.L156:
	lea	rdx, 0[0+rbx*8]
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	rcx, QWORD PTR -272[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -432[rbp], eax
	cmp	DWORD PTR -432[rbp], 0
	jns	.L157
	mov	DWORD PTR -432[rbp], 1
	jmp	.L154
.L157:
	mov	rsp, r12
	jmp	.L149
.L154:
	mov	rsp, r12
	jmp	.L113
.L149:
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	je	.L158
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	shr	eax, 3
	mov	eax, eax
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -256[rbp], rdx
	mov	QWORD PTR -560[rbp], rax
	mov	QWORD PTR -552[rbp], 0
	mov	QWORD PTR -576[rbp], rax
	mov	QWORD PTR -568[rbp], 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L159:
	cmp	rsp, rdx
	je	.L160
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L159
.L160:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L161
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L161:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -248[rbp], rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	esi, eax
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 0
	div	rsi
	mov	rdx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	eax, eax
	imul	rax, rdx
	mov	QWORD PTR -240[rbp], rax
	mov	DWORD PTR -416[rbp], 0
	mov	DWORD PTR -440[rbp], 0
	mov	eax, DWORD PTR mtd[rip+12]
	shr	eax, 3
	mov	DWORD PTR -412[rbp], eax
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	rdx, QWORD PTR -248[rbp]
	mov	rcx, QWORD PTR -240[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	nvparam_get
	test	eax, eax
	jns	.L162
	lea	rsi, .LC39[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	mov	rsp, rbx
	jmp	.L113
.L162:
	mov	DWORD PTR -444[rbp], 0
	jmp	.L163
.L165:
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -444[rbp]
	movzx	eax, WORD PTR 6[rax+rdx*8]
	movzx	eax, ax
	mov	DWORD PTR -408[rbp], eax
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -444[rbp]
	movzx	ecx, BYTE PTR 6[rax+rdx*8]
	and	ecx, 0
	mov	BYTE PTR 6[rax+rdx*8], cl
	movzx	ecx, BYTE PTR 7[rax+rdx*8]
	and	ecx, 0
	mov	BYTE PTR 7[rax+rdx*8], cl
	mov	eax, DWORD PTR -444[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -248[rbp]
	add	rax, rdx
	mov	esi, 8
	mov	rdi, rax
	call	crc16
	mov	DWORD PTR -416[rbp], eax
	mov	eax, DWORD PTR -408[rbp]
	cmp	eax, DWORD PTR -416[rbp]
	jne	.L164
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -444[rbp]
	movzx	eax, BYTE PTR 5[rax+rdx*8]
	and	eax, 127
	movzx	esi, al
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -444[rbp]
	movzx	eax, BYTE PTR 4[rax+rdx*8]
	movzx	ecx, al
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -444[rbp]
	mov	eax, DWORD PTR [rax+rdx*8]
	mov	edx, DWORD PTR -444[rbp]
	lea	rdi, 0[0+rdx*8]
	mov	rdx, QWORD PTR -240[rbp]
	add	rdx, rdi
	mov	r9d, esi
	mov	r8d, ecx
	mov	ecx, eax
	lea	rsi, .LC41[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	add	DWORD PTR -440[rbp], 1
.L164:
	add	DWORD PTR -444[rbp], 1
.L163:
	mov	eax, DWORD PTR -444[rbp]
	cmp	eax, DWORD PTR -412[rbp]
	jb	.L165
	mov	rdx, QWORD PTR -360[rbp]
	mov	eax, DWORD PTR -440[rbp]
	mov	rcx, rdx
	mov	edx, eax
	lea	rsi, .LC42[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	mov	rsp, rbx
.L158:
	mov	eax, DWORD PTR -188[rbp]
	test	eax, eax
	je	.L178
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	shr	eax, 3
	mov	eax, eax
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -232[rbp], rdx
	mov	QWORD PTR -592[rbp], rax
	mov	QWORD PTR -584[rbp], 0
	mov	QWORD PTR -608[rbp], rax
	mov	QWORD PTR -600[rbp], 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L166:
	cmp	rsp, rdx
	je	.L167
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L166
.L167:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L168
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L168:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -224[rbp], rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	esi, eax
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 0
	div	rsi
	mov	rdx, rax
	mov	eax, DWORD PTR mtd[rip+12]
	mov	eax, eax
	imul	rax, rdx
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	sub	rax, QWORD PTR -216[rbp]
	shr	rax, 3
	mov	DWORD PTR -404[rbp], eax
	mov	DWORD PTR -400[rbp], 0
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	rdx, QWORD PTR -224[rbp]
	mov	rcx, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	nvparam_get
	test	eax, eax
	jns	.L169
	lea	rsi, .LC39[rip]
	mov	edi, 2
	mov	eax, 0
	call	log_printf
	mov	DWORD PTR -432[rbp], 1
	mov	rsp, rbx
	jmp	.L113
.L169:
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	movzx	eax, WORD PTR 6[rax+rdx*8]
	movzx	esi, ax
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	movzx	eax, BYTE PTR 5[rax+rdx*8]
	shr	al, 7
	movzx	ecx, al
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	movzx	eax, BYTE PTR 5[rax+rdx*8]
	and	eax, 127
	movzx	r8d, al
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	movzx	eax, BYTE PTR 4[rax+rdx*8]
	movzx	edi, al
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	mov	edx, DWORD PTR [rax+rdx*8]
	mov	rax, QWORD PTR -360[rbp]
	push	rsi
	push	rcx
	mov	r9d, r8d
	mov	r8d, edi
	mov	ecx, edx
	mov	rdx, rax
	lea	rsi, .LC43[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	add	rsp, 16
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	movzx	eax, WORD PTR 6[rax+rdx*8]
	movzx	eax, ax
	mov	DWORD PTR -396[rbp], eax
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR -404[rbp]
	movzx	ecx, BYTE PTR 6[rax+rdx*8]
	and	ecx, 0
	mov	BYTE PTR 6[rax+rdx*8], cl
	movzx	ecx, BYTE PTR 7[rax+rdx*8]
	and	ecx, 0
	mov	BYTE PTR 7[rax+rdx*8], cl
	mov	eax, DWORD PTR -404[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -224[rbp]
	add	rax, rdx
	mov	esi, 8
	mov	rdi, rax
	call	crc16
	mov	DWORD PTR -400[rbp], eax
	mov	eax, DWORD PTR -396[rbp]
	cmp	eax, DWORD PTR -400[rbp]
	je	.L170
	mov	eax, DWORD PTR -400[rbp]
	mov	edx, eax
	lea	rsi, .LC44[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
	jmp	.L171
.L170:
	lea	rsi, .LC45[rip]
	mov	edi, 1
	mov	eax, 0
	call	log_printf
.L171:
	mov	rsp, rbx
	jmp	.L113
.L177:
	nop
	jmp	.L113
.L178:
	nop
.L113:
	mov	eax, DWORD PTR dev_fd.1[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fil_fd.0[rip]
	mov	edi, eax
	call	close@PLT
.L66:
	cmp	QWORD PTR -376[rbp], 0
	je	.L172
	mov	rax, QWORD PTR -376[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -376[rbp], 0
.L172:
	cmp	QWORD PTR -384[rbp], 0
	je	.L173
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -384[rbp], 0
.L173:
	cmp	QWORD PTR -392[rbp], 0
	je	.L174
	mov	rax, QWORD PTR -392[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -392[rbp], 0
.L174:
	mov	eax, DWORD PTR -432[rbp]
	mov	rbx, QWORD PTR -40[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L176
	call	__stack_chk_fail@PLT
.L176:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	main, .-main
	.data
	.align 4
	.type	dev_fd.1, @object
	.size	dev_fd.1, 4
dev_fd.1:
	.long	-1
	.align 4
	.type	fil_fd.0, @object
	.size	fil_fd.0, 4
fil_fd.0:
	.long	-1
	.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	"23479.c"
	.text
	.comm	mtd,32,8
	.comm	filestat,88,8
	.comm	erase,8,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	log_printf, %function
log_printf:
	@ args = 4, pretend = 12, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #28
	str	r0, [fp, #-28]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-32]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bne	.L2
	ldr	r3, .L5+4
	ldr	r3, [r3]
	b	.L3
.L2:
	ldr	r3, .L5+8
	ldr	r3, [r3]
.L3:
	str	r3, [fp, #-16]
	add	r3, fp, #8
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-16]
	bl	vfprintf
	ldr	r0, [fp, #-16]
	bl	fflush
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #12
	bx	lr
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	stdout
	.word	stderr
	.size	log_printf, .-log_printf
	.section	.rodata
	.align	2
.LC1:
	.ascii	"While trying to get the filestatus of %s\012\000"
	.align	2
.LC2:
	.ascii	"%s won't fit into SPI NOR partition!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	validate_input_file, %function
validate_input_file:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L11
	ldr	r0, [fp, #-16]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r2, [fp, #-20]
	ldr	r1, .L11+4
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	str	r3, [fp, #-8]
.L8:
	ldr	r3, .L11
	ldr	r3, [r3, #44]
	mov	r2, r3
	ldr	r3, .L11+8
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bls	.L9
	ldr	r2, [fp, #-20]
	ldr	r1, .L11+12
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	filestat
	.word	.LC1
	.word	mtd
	.word	.LC2
	.size	validate_input_file, .-validate_input_file
	.section	.rodata
	.align	2
.LC3:
	.ascii	"offset:0x%x not with-in range of mtd partition size"
	.ascii	":0x%x\012\000"
	.global	__aeabi_uidivmod
	.align	2
.LC4:
	.ascii	"offset:0x%x is not a sector boundary\012It needs to"
	.ascii	" be multiples of erasesize:0x%x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	validate_input_offset, %function
validate_input_offset:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, .L17
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bls	.L14
	ldr	r3, .L17
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	ldr	r1, .L17+4
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	str	r3, [fp, #-8]
.L14:
	ldr	r3, .L17
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L17
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-16]
	ldr	r1, .L17+8
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	mtd
	.word	.LC3
	.word	.LC4
	.size	validate_input_offset, .-validate_input_offset
	.global	__aeabi_uidiv
	.global	__aeabi_idiv
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\015Erasing blocks: %d/%d (%d%%)\000"
	.align	2
.LC6:
	.ascii	"Error While erasing blocks 0x%.8x-0x%.8x: %m\012\000"
	.align	2
.LC7:
	.ascii	"\015Erasing blocks: %d/%d (100%%)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flash_erase, %function
flash_erase:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, .L24
	ldr	r3, [fp, #-20]
	str	r3, [r2]
	ldr	r3, .L24+4
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, .L24+4
	ldr	r2, [r2, #12]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L24
	str	r2, [r3, #4]
	ldr	r3, .L24
	ldr	r3, [r3, #4]
	ldr	r2, .L24+4
	ldr	r2, [r2, #12]
	mul	r3, r2, r3
	ldr	r2, .L24
	str	r3, [r2, #4]
	ldr	r3, .L24
	ldr	r3, [r3, #4]
	ldr	r2, .L24+4
	ldr	r2, [r2, #12]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L24+4
	ldr	r3, [r3, #12]
	ldr	r2, .L24
	str	r3, [r2, #4]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L20
.L23:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, .L24+8
	mov	r0, #1
	bl	log_printf
	ldr	r2, .L24
	ldr	r1, .L24+12
	ldr	r0, [fp, #-16]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L21
	ldr	r3, .L24
	ldr	r1, [r3]
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, .L24
	ldr	r3, [r3, #4]
	add	r3, r2, r3
	mov	r2, r1
	ldr	r1, .L24+16
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	b	.L22
.L21:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, .L24+4
	ldr	r3, [r3, #12]
	add	r3, r2, r3
	ldr	r2, .L24
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L20:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	ble	.L23
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, .L24+20
	mov	r0, #1
	bl	log_printf
	mov	r3, #0
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	erase
	.word	mtd
	.word	.LC5
	.word	1074285826
	.word	.LC6
	.word	.LC7
	.size	flash_erase, .-flash_erase
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Failed to open the file: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flash_open, %function
flash_open:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-8]
	mov	r2, #420
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L27
	ldr	r2, [fp, #-16]
	ldr	r1, .L29
	mov	r0, #2
	bl	log_printf
.L27:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC8
	.size	flash_open, .-flash_open
	.section	.rodata
	.align	2
.LC9:
	.ascii	"While reading data from%s: %m\012\000"
	.align	2
.LC10:
	.ascii	"Short read count returned while readingfrom %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flash_read, %function
flash_read:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	beq	.L32
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L33
	ldr	r2, [fp, #-20]
	ldr	r1, .L35
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	str	r3, [fp, #-12]
.L33:
	ldr	r2, [fp, #-20]
	ldr	r1, .L35+4
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	str	r3, [fp, #-12]
.L32:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC9
	.word	.LC10
	.size	flash_read, .-flash_read
	.section	.rodata
	.align	2
.LC11:
	.ascii	"While seeking to start of %s: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flash_rewind, %function
flash_rewind:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L38
	ldr	r2, [fp, #-16]
	ldr	r1, .L40
	mov	r0, #2
	bl	log_printf
	mvn	r3, #0
	b	.L39
.L38:
	mov	r3, #0
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC11
	.size	flash_rewind, .-flash_rewind
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Writing data: 0k/%luk (0%%)\000"
	.align	2
.LC13:
	.ascii	"\015Writing data: %dk/%luk (%lu%%)\000"
	.align	2
.LC14:
	.ascii	"While writing data to0x%.8x-0x%.8x on %s: %m\012\000"
	.align	2
.LC15:
	.ascii	"Short write count returned whilewriting to x%.8x-0x"
	.ascii	"%.8x on %s: %d/%lu bytes written to flash\012\000"
	.align	2
.LC16:
	.ascii	"\015Writing data: %luk/%luk (100%%)\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flash_write, %function
flash_write:
	@ args = 4, pretend = 0, frame = 10296
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #10304
	sub	sp, sp, #8
	sub	ip, fp, #8192
	sub	ip, ip, #12
	str	r0, [ip, #-2084]
	sub	r0, fp, #8192
	sub	r0, r0, #12
	str	r1, [r0, #-2088]
	sub	r1, fp, #8192
	sub	r1, r1, #12
	str	r2, [r1, #-2092]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-2096]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, [fp, #4]
	str	r3, [r2, #-2100]
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2060]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2064]
	ldr	r3, .L53+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r2, r3
	ldr	r1, .L53+8
	mov	r0, #1
	bl	log_printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L53+4
	ldr	r3, [r3, #44]
	str	r3, [r2, #-2076]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #10240
	str	r3, [r2, #-2068]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2072]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2092]
	cmp	r3, #0
	beq	.L45
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2100]
	ldr	r1, [r1, #-2092]
	ldr	r0, [r3, #-2084]
	bl	flash_rewind
	str	r0, [r4, #-2060]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2060]
	cmp	r3, #0
	bge	.L45
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-2064]
	b	.L44
.L50:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2076]
	cmp	r3, #10240
	bge	.L46
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2076]
	str	r3, [r2, #-2068]
.L46:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2072]
	ldr	r3, [r3, #-2068]
	add	r3, r2, r3
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r4, r3
	ldr	r3, .L53+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r5, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2072]
	ldr	r3, [r3, #-2068]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, .L53+4
	ldr	r3, [r3, #44]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r5
	mov	r2, r4
	ldr	r1, .L53+12
	mov	r0, #1
	bl	log_printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2068]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	sub	r2, fp, #10240
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r1, fp, #8192
	sub	r1, r1, #12
	sub	r0, fp, #8192
	sub	r0, r0, #12
	ldr	r1, [r1, #-2096]
	ldr	r0, [r0, #-2088]
	bl	flash_read
	str	r0, [r4, #-2060]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2060]
	cmp	r3, #0
	bge	.L47
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-2064]
	b	.L44
.L47:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-2068]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #10240
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #8192
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-2084]
	bl	write
	str	r0, [r4, #-2056]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2068]
	ldr	r3, [r3, #-2056]
	cmp	r2, r3
	beq	.L48
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2056]
	cmp	r3, #0
	bge	.L49
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2072]
	ldr	r3, [r3, #-2068]
	add	r2, r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2100]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [r1, #-2072]
	ldr	r1, .L53+16
	mov	r0, #2
	bl	log_printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-2064]
	b	.L44
.L49:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2072]
	ldr	r3, [r3, #-2068]
	add	r1, r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2072]
	ldr	r3, [r3, #-2056]
	add	r3, r2, r3
	ldr	r2, .L53+4
	ldr	r2, [r2, #44]
	sub	r0, fp, #8192
	sub	r0, r0, #12
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2100]
	str	r3, [sp]
	mov	r3, r1
	ldr	r2, [r0, #-2072]
	ldr	r1, .L53+20
	mov	r0, #2
	bl	log_printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-2064]
	b	.L44
.L48:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2072]
	ldr	r3, [r3, #-2068]
	add	r3, r2, r3
	str	r3, [r1, #-2072]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-2076]
	ldr	r3, [r3, #-2068]
	sub	r3, r2, r3
	str	r3, [r1, #-2076]
.L45:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2076]
	cmp	r3, #0
	bne	.L50
	ldr	r3, .L53+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r1, r3
	ldr	r3, .L53+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r2, r1
	ldr	r1, .L53+24
	mov	r0, #1
	bl	log_printf
.L44:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-2064]
	ldr	r2, .L53
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L52
	bl	__stack_chk_fail
.L52:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC17
	.word	filestat
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	flash_write, .-flash_write
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Verifying data: 0k/%luk (0%%)\000"
	.align	2
.LC19:
	.ascii	"\015Verifying data: %dk/%luk (%lu%%)\000"
	.align	2
.LC20:
	.ascii	"File does not seem to matchflash data. First mismat"
	.ascii	"ch at 0x%.8x-0x%.8x\012\000"
	.align	2
.LC21:
	.ascii	"\015Verifying data: %luk/%luk (100%%)\012\000"
	.align	2
.LC22:
	.ascii	"Verified flash content %lu bytes, Success.\012\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	flash_verify, %function
flash_verify:
	@ args = 4, pretend = 0, frame = 20528
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #20480
	sub	sp, sp, #56
	sub	ip, fp, #20480
	sub	ip, ip, #12
	str	r0, [ip, #-28]
	sub	r0, fp, #20480
	sub	r0, r0, #12
	str	r1, [r0, #-32]
	sub	r1, fp, #20480
	sub	r1, r1, #12
	str	r2, [r1, #-36]
	sub	r2, fp, #20480
	sub	r2, r2, #12
	str	r3, [r2, #-40]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, [fp, #4]
	str	r3, [r2, #-44]
	ldr	r3, .L67
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-8]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-12]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-40]
	mov	r1, #0
	ldr	r0, [r3, #-32]
	bl	flash_rewind
	str	r0, [r4, #-8]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L56
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-12]
	b	.L57
.L56:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-44]
	ldr	r1, [r1, #-36]
	ldr	r0, [r3, #-28]
	bl	flash_rewind
	str	r0, [r4, #-8]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L58
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-12]
	b	.L57
.L58:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	str	r3, [r2, #-24]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #10240
	str	r3, [r2, #-16]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-20]
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r2, r3
	ldr	r1, .L67+8
	mov	r0, #1
	bl	log_printf
	b	.L59
.L64:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #10240
	bge	.L60
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	str	r3, [r2, #-16]
.L60:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-20]
	ldr	r3, [r3, #-16]
	add	r3, r2, r3
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r4, r3
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r5, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-20]
	ldr	r3, [r3, #-16]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r5
	mov	r2, r4
	ldr	r1, .L67+12
	mov	r0, #1
	bl	log_printf
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	sub	r2, fp, #20480
	sub	r2, r2, #12
	mov	r4, r2
	sub	r2, fp, #20480
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r1, fp, #20480
	sub	r1, r1, #12
	sub	r0, fp, #20480
	sub	r0, r0, #12
	ldr	r1, [r1, #-40]
	ldr	r0, [r0, #-32]
	bl	flash_read
	str	r0, [r4, #-8]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L61
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-12]
	b	.L57
.L61:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	sub	r2, fp, #20480
	sub	r2, r2, #12
	mov	r4, r2
	sub	r2, fp, #10240
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r1, fp, #20480
	sub	r1, r1, #12
	sub	r0, fp, #20480
	sub	r0, r0, #12
	ldr	r1, [r1, #-44]
	ldr	r0, [r0, #-28]
	bl	flash_read
	str	r0, [r4, #-8]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L62
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-12]
	b	.L57
.L62:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r3, #-16]
	sub	r1, fp, #10240
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #20480
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L63
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-20]
	ldr	r3, [r3, #-16]
	add	r3, r2, r3
	sub	r2, fp, #20480
	sub	r2, r2, #12
	ldr	r2, [r2, #-20]
	ldr	r1, .L67+16
	mov	r0, #2
	bl	log_printf
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-12]
	b	.L57
.L63:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-20]
	ldr	r3, [r3, #-16]
	add	r3, r2, r3
	str	r3, [r1, #-20]
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r2, [r2, #-24]
	ldr	r3, [r3, #-16]
	sub	r3, r2, r3
	str	r3, [r1, #-24]
.L59:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	bne	.L64
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r1, r3
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r2, r1
	ldr	r1, .L67+20
	mov	r0, #1
	bl	log_printf
	ldr	r3, .L67+4
	ldr	r3, [r3, #44]
	mov	r2, r3
	ldr	r1, .L67+24
	mov	r0, #1
	bl	log_printf
.L57:
	sub	r3, fp, #20480
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	ldr	r2, .L67
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L66
	bl	__stack_chk_fail
.L66:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L68:
	.align	2
.L67:
	.word	.LC23
	.word	filestat
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	flash_verify, .-flash_verify
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	crc16, %function
crc16:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L70
.L75:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldr	r2, [fp, #-12]
	eor	r3, r3, r2
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L71
.L74:
	ldr	r3, [fp, #-12]
	and	r3, r3, #32768
	cmp	r3, #0
	beq	.L72
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	eor	r3, r3, #4096
	eor	r3, r3, #33
	str	r3, [fp, #-12]
	b	.L73
.L72:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
.L73:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L71:
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	ble	.L74
.L70:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L75
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	crc16, .-crc16
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvparam_get, %function
nvparam_get:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-8]
	mov	r2, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	flash_rewind
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L78
	ldr	r3, [fp, #-8]
	b	.L79
.L78:
	ldr	r3, .L80
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-24]
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	flash_read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
.L79:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L81:
	.align	2
.L80:
	.word	mtd
	.size	nvparam_get, .-nvparam_get
	.section	.rodata
	.align	2
.LC24:
	.ascii	"%s -f <file> -o <SPI offset>: Write binary <file> t"
	.ascii	"o host SPI NOR at offset <SPI offset>.\012\011<file"
	.ascii	"> is NVPARAM blob generated by NV-parameter generat"
	.ascii	"or.\012%s -s <value> -o <SPI offset>: Set a single "
	.ascii	"NVPARAM at host SPI NOR offset <SPI offset> to <val"
	.ascii	"ue>\012%s -r -o <SPI offset>: Read a single NVPARAM"
	.ascii	" at host SPI NOR offset <SPI offset> and display\012"
	.ascii	"%s -c -o <NVPARAM base SPI offset>: Clear NVPARAM p"
	.ascii	"artition at <NVPARAM base SPI offset>\012%s -d <fil"
	.ascii	"e> -o <NVPARAM base SPI offset>: Dump a NVPARAM par"
	.ascii	"tition at <NVPARAM base SPI offset> to binary file "
	.ascii	"<file>\012%s -l -o <NVPARAM base SPI offset>: \012\011"
	.ascii	"List out all the valid nvparam settings on a NVPARA"
	.ascii	"M partition at <NVPARAM base SPI offset>\012%s -e -"
	.ascii	"o <SPI offset>: Erase a particular NVPARAM at host "
	.ascii	"SPI NOR offset <SPI offset>\012%s -h: Print this he"
	.ascii	"lp\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	help, %function
help:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	str	r3, [sp, #20]
	ldr	r3, [fp, #-8]
	str	r3, [sp, #16]
	ldr	r3, [fp, #-8]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-8]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-8]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-8]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, .L83
	mov	r0, #1
	bl	log_printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L84:
	.align	2
.L83:
	.word	.LC24
	.size	help, .-help
	.section	.rodata
	.align	2
.LC25:
	.ascii	"Option -%c: malloc failure\012\000"
	.align	2
.LC26:
	.ascii	"Option -o: malloc failure\012\000"
	.align	2
.LC27:
	.ascii	"Option -s: malloc failure\012\000"
	.align	2
.LC28:
	.ascii	"cd:ef:hlo:rs:\000"
	.align	2
.LC29:
	.ascii	"SPI offset must be specified\012\000"
	.align	2
.LC30:
	.ascii	"Options -c, -d, -f, -r, -s, -l, -e can't be mixed t"
	.ascii	"ogether.\012\000"
	.align	2
.LC31:
	.ascii	"Input %s is %s\012\000"
	.align	2
.LC32:
	.ascii	"r\000"
	.align	2
.LC33:
	.ascii	"/proc/mtd\000"
	.align	2
.LC34:
	.ascii	"Unable to open %s to get MTD info...\012\000"
	.align	2
.LC35:
	.ascii	"\"pnor\"\000"
	.align	2
.LC36:
	.ascii	":\000"
	.align	2
.LC37:
	.ascii	"Error in finding the BIOS Partition \012\000"
	.align	2
.LC38:
	.ascii	"Unable to find HOST SPI / PNOR  MTD partition...\012"
	.ascii	"\000"
	.align	2
.LC39:
	.ascii	"/dev/mtd%d\000"
	.align	2
.LC40:
	.ascii	"Buffer Overflow.\012\000"
	.align	2
.LC41:
	.ascii	"Failed to erase\012\000"
	.align	2
.LC42:
	.ascii	"Failed to read NVPARAM\012\000"
	.align	2
.LC43:
	.ascii	"Failed to write NVPARAM to file\012\000"
	.align	2
.LC44:
	.ascii	"NVPARAM at 0x%x: 0x%08x (ACL_RD:0x%x - ACL_WR:0x%x)"
	.ascii	"\012\000"
	.align	2
.LC45:
	.ascii	"Found total %d valid record(s) from Offset: %x\012\000"
	.align	2
.LC46:
	.ascii	"NVPARAM at 0x%x:\012\011Param: 0x%08x\012\011ACL_RD"
	.ascii	": 0x%02x\012\011ACL_WR: 0x%02x\012\011Valid: %d\012"
	.ascii	"\011CRC16: %x\000"
	.align	2
.LC47:
	.ascii	" (Mismatch! Calculated CRC16: %x)\012\000"
	.align	2
.LC48:
	.ascii	"\012\000"
	.align	2
.LC49:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 296
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #316
	str	r0, [fp, #-312]
	str	r1, [fp, #-316]
	ldr	r3, .L185+124
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-276]
	mvn	r3, #0
	str	r3, [fp, #-280]
	mvn	r3, #0
	str	r3, [fp, #-284]
	mvn	r3, #0
	str	r3, [fp, #-288]
	mov	r3, #0
	str	r3, [fp, #-128]
	sub	r3, fp, #164
	mov	r2, #36
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-292]
	mov	r3, #0
	str	r3, [fp, #-296]
	mov	r3, #0
	str	r3, [fp, #-300]
	ldr	r3, [fp, #-312]
	cmp	r3, #1
	bne	.L88
	ldr	r3, [fp, #-316]
	ldr	r3, [r3]
	mov	r0, r3
	bl	help
	b	.L87
.L107:
	ldr	r3, [fp, #-272]
	sub	r3, r3, #99
	cmp	r3, #16
	ldrls	pc, [pc, r3, asl #2]
	b	.L89
.L91:
	.word	.L98
	.word	.L96
	.word	.L97
	.word	.L96
	.word	.L89
	.word	.L95
	.word	.L89
	.word	.L89
	.word	.L89
	.word	.L94
	.word	.L89
	.word	.L89
	.word	.L93
	.word	.L89
	.word	.L89
	.word	.L92
	.word	.L90
.L98:
	mov	r3, #1
	str	r3, [fp, #-164]
	b	.L88
.L96:
	ldr	r3, [fp, #-272]
	cmp	r3, #100
	bne	.L99
	mov	r3, #1
	str	r3, [fp, #-160]
	b	.L100
.L99:
	mov	r3, #1
	str	r3, [fp, #-156]
.L100:
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	beq	.L101
	ldr	r0, [fp, #-292]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-292]
.L101:
	ldr	r3, .L185
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	bne	.L88
	ldr	r2, [fp, #-272]
	ldr	r1, .L185+4
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L93:
	mov	r3, #1
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L103
	ldr	r0, [fp, #-296]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-296]
.L103:
	ldr	r3, .L185
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	bne	.L88
	ldr	r1, .L185+8
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L92:
	mov	r3, #1
	str	r3, [fp, #-144]
	b	.L88
.L90:
	mov	r3, #1
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	beq	.L105
	ldr	r0, [fp, #-300]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-300]
.L105:
	ldr	r3, .L185
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	bne	.L88
	ldr	r1, .L185+12
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L94:
	mov	r3, #1
	str	r3, [fp, #-132]
	b	.L88
.L97:
	mov	r3, #1
	str	r3, [fp, #-136]
	b	.L88
.L95:
	mov	r3, #1
	str	r3, [fp, #-152]
.L89:
	ldr	r3, [fp, #-316]
	ldr	r3, [r3]
	mov	r0, r3
	bl	help
	b	.L87
.L88:
	ldr	r2, .L185+16
	ldr	r1, [fp, #-316]
	ldr	r0, [fp, #-312]
	bl	getopt
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmn	r3, #1
	bne	.L107
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L108
	ldr	r1, .L185+20
	mov	r0, #2
	bl	log_printf
	ldr	r3, [fp, #-316]
	ldr	r3, [r3]
	mov	r0, r3
	bl	help
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L108:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L109
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bne	.L110
.L109:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L111
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L110
.L111:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L112
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bne	.L110
.L112:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L113
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L110
.L113:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L114
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L110
.L114:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L115
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L110
.L115:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L116
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bne	.L110
.L116:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L117
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L110
.L117:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L118
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L110
.L118:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L119
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L110
.L119:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L120
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L110
.L120:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L121
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L110
.L121:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L122
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bne	.L110
.L122:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L123
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L110
.L123:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L124
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L110
.L124:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	beq	.L125
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bne	.L110
.L125:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	beq	.L126
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L110
.L126:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	beq	.L127
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L110
.L127:
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	beq	.L128
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L110
.L128:
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	beq	.L129
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L110
.L129:
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	beq	.L130
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	beq	.L130
.L110:
	ldr	r1, .L185+24
	mov	r0, #2
	bl	log_printf
	ldr	r3, [fp, #-316]
	ldr	r3, [r3]
	mov	r0, r3
	bl	help
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L130:
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L131
	mov	r2, #16
	mov	r1, #0
	ldr	r0, [fp, #-296]
	bl	strtoul
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmn	r3, #1
	bne	.L131
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	bne	.L131
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-296]
	ldr	r1, .L185+28
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L131:
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	beq	.L132
	mov	r2, #16
	mov	r1, #0
	ldr	r0, [fp, #-300]
	bl	strtoul
	str	r0, [fp, #-288]
	ldr	r3, [fp, #-288]
	cmn	r3, #1
	bne	.L132
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	bne	.L132
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-296]
	ldr	r1, .L185+28
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L87
.L132:
	ldr	r1, .L185+32
	ldr	r0, .L185+36
	bl	fopen
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L135
	ldr	r2, .L185+36
	ldr	r1, .L185+40
	mov	r0, #2
	bl	log_printf
	b	.L134
.L138:
	sub	r3, fp, #104
	ldr	r1, .L185+44
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L135
	sub	r3, fp, #104
	ldr	r1, .L185+48
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-264]
	ldr	r3, [fp, #-264]
	cmp	r3, #0
	bne	.L136
	ldr	r1, .L185+52
	mov	r0, #2
	bl	log_printf
	ldr	r0, [fp, #-268]
	bl	fclose
	b	.L134
.L136:
	ldr	r3, [fp, #-264]
	add	r4, r3, #3
	ldr	r0, [fp, #-264]
	bl	strlen
	mov	r3, r0
	sub	r2, r3, #3
	sub	r3, fp, #128
	mov	r1, r4
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #128
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-280]
	b	.L137
.L135:
	sub	r3, fp, #104
	ldr	r2, [fp, #-268]
	mov	r1, #80
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L138
.L137:
	ldr	r0, [fp, #-268]
	bl	fclose
	ldr	r3, [fp, #-280]
	cmn	r3, #1
	bne	.L139
	ldr	r1, .L185+56
	mov	r0, #2
	bl	log_printf
	b	.L134
.L139:
	sub	r0, fp, #124
	ldr	r3, [fp, #-280]
	ldr	r2, .L185+60
	mov	r1, #20
	bl	snprintf
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #19
	bgt	.L140
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bge	.L141
.L140:
	ldr	r1, .L185+64
	mov	r0, #2
	bl	log_printf
	b	.L134
.L141:
	sub	r3, fp, #124
	str	r3, [fp, #-260]
	ldr	r1, .L185+68
	ldr	r0, [fp, #-260]
	bl	flash_open
	mov	r3, r0
	ldr	r2, .L185+116
	str	r3, [r2]
	ldr	r3, .L185+116
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L142
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L142:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, .L185+96
	ldr	r1, .L185+72
	mov	r0, r3
	bl	ioctl
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	blt	.L183
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L144
	ldr	r0, [fp, #-284]
	bl	validate_input_offset
	mov	r3, r0
	cmp	r3, #0
	bge	.L145
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L145:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	mov	r2, #65536
	ldr	r1, [fp, #-284]
	mov	r0, r3
	bl	flash_erase
	mov	r3, r0
	cmp	r3, #0
	bge	.L144
	ldr	r1, .L185+76
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L144:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L146
	mov	r3, sp
	mov	r5, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	lsr	r4, r3, #3
	mov	r3, r4
	sub	r3, r3, #1
	str	r3, [fp, #-256]
	mov	r0, r4
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r0, r4
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	lsl	r3, r4, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #16
	add	r3, r3, #0
	str	r3, [fp, #-252]
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mul	r3, r2, r3
	str	r3, [fp, #-248]
	ldr	r0, [fp, #-284]
	bl	validate_input_offset
	mov	r3, r0
	cmp	r3, #0
	bge	.L147
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L148
.L147:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	ldr	r1, [fp, #-248]
	mov	r0, r3
	bl	nvparam_get
	mov	r3, r0
	cmp	r3, #0
	bge	.L149
	ldr	r1, .L185+100
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L148
.L149:
	mov	r1, #65
	ldr	r0, [fp, #-292]
	bl	flash_open
	mov	r3, r0
	ldr	r2, .L185+120
	str	r3, [r2]
	ldr	r3, .L185+120
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L150
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L148
.L150:
	ldr	r3, .L185+120
	ldr	r3, [r3]
	lsl	r2, r4, #3
	ldr	r1, [fp, #-252]
	mov	r0, r3
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L151
	ldr	r1, .L185+80
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L148
.L151:
	mov	sp, r5
	b	.L146
.L148:
	mov	sp, r5
	b	.L134
.L146:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	beq	.L152
	mov	r1, #0
	ldr	r0, [fp, #-292]
	bl	flash_open
	mov	r3, r0
	ldr	r2, .L185+120
	str	r3, [r2]
	ldr	r3, .L185+120
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L153
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L153:
	ldr	r3, .L185+120
	ldr	r3, [r3]
	ldr	r1, [fp, #-292]
	mov	r0, r3
	bl	validate_input_file
	mov	r3, r0
	cmp	r3, #0
	bge	.L154
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L154:
	ldr	r0, [fp, #-284]
	bl	validate_input_offset
	mov	r3, r0
	cmp	r3, #0
	bge	.L155
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L155:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, .L185+84
	ldr	r2, [r2, #44]
	ldr	r1, [fp, #-284]
	mov	r0, r3
	bl	flash_erase
	mov	r3, r0
	cmp	r3, #0
	bge	.L156
	ldr	r1, .L185+76
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L156:
	ldr	r3, .L185+116
	ldr	r0, [r3]
	ldr	r3, .L185+120
	ldr	r1, [r3]
	ldr	r3, [fp, #-296]
	str	r3, [sp]
	ldr	r3, [fp, #-292]
	ldr	r2, [fp, #-284]
	bl	flash_write
	mov	r3, r0
	cmp	r3, #0
	bge	.L157
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L157:
	ldr	r3, .L185+116
	ldr	r0, [r3]
	ldr	r3, .L185+120
	ldr	r1, [r3]
	ldr	r3, [fp, #-296]
	str	r3, [sp]
	ldr	r3, [fp, #-292]
	ldr	r2, [fp, #-284]
	bl	flash_verify
	mov	r3, r0
	cmp	r3, #0
	bge	.L152
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L134
.L152:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L158
	mov	r3, sp
	mov	r5, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	lsr	r4, r3, #3
	mov	r3, r4
	sub	r3, r3, #1
	str	r3, [fp, #-244]
	mov	r0, r4
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r0, r4
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	lsl	r3, r4, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #16
	add	r3, r3, #0
	str	r3, [fp, #-240]
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mul	r3, r2, r3
	str	r3, [fp, #-236]
	ldr	r2, [fp, #-284]
	ldr	r3, [fp, #-236]
	sub	r3, r2, r3
	lsr	r3, r3, #3
	str	r3, [fp, #-232]
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, [fp, #-240]
	ldr	r1, [fp, #-236]
	mov	r0, r3
	bl	nvparam_get
	mov	r3, r0
	cmp	r3, #0
	bge	.L159
	ldr	r1, .L185+100
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L160
.L159:
	ldr	r3, [fp, #-240]
	ldr	r2, [fp, #-232]
	ldrb	r1, [fp, #-288]	@ zero_extendqisi2
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, r2, lsl #3]
	ldrb	r0, [fp, #-287]	@ zero_extendqisi2
	lsl	r1, r2, #3
	add	r1, r3, r1
	mov	ip, #0
	orr	r0, ip, r0
	strb	r0, [r1, #1]
	ldrb	r0, [fp, #-286]	@ zero_extendqisi2
	lsl	r1, r2, #3
	add	r1, r3, r1
	mov	ip, #0
	orr	r0, ip, r0
	strb	r0, [r1, #2]
	ldrb	r0, [fp, #-285]	@ zero_extendqisi2
	lsl	r2, r2, #3
	add	r2, r3, r2
	mov	r3, #0
	mov	r1, r3
	mov	r3, r0
	orr	r3, r1, r3
	strb	r3, [r2, #3]
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3, #4]
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r2, [r3, #5]
	orr	r2, r2, #127
	strb	r2, [r3, #5]
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r2, [r3, #5]
	orr	r2, r2, #128
	strb	r2, [r3, #5]
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #6]
	mov	r2, #0
	strb	r2, [r3, #7]
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-240]
	add	r3, r2, r3
	mov	r1, #8
	mov	r0, r3
	bl	crc16
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-240]
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	add	r3, r1, r3
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #6]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #7]
	ldr	r3, .L185+116
	ldr	r3, [r3]
	lsl	r2, r4, #3
	ldr	r1, [fp, #-236]
	mov	r0, r3
	bl	flash_erase
	mov	r3, r0
	cmp	r3, #0
	bge	.L161
	ldr	r1, .L185+76
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L160
.L161:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, [fp, #-236]
	mov	r0, r3
	bl	flash_rewind
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bge	.L162
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L160
.L162:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	lsl	r2, r4, #3
	ldr	r1, [fp, #-240]
	mov	r0, r3
	bl	write
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bge	.L163
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L160
.L163:
	mov	sp, r5
	b	.L158
.L160:
	mov	sp, r5
	b	.L134
.L158:
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	beq	.L164
	mov	r3, sp
	mov	r5, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	lsr	r4, r3, #3
	mov	r3, r4
	sub	r3, r3, #1
	str	r3, [fp, #-228]
	mov	r0, r4
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r0, r4
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	lsl	r3, r4, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #16
	add	r3, r3, #0
	str	r3, [fp, #-224]
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mul	r3, r2, r3
	str	r3, [fp, #-220]
	ldr	r2, [fp, #-284]
	ldr	r3, [fp, #-220]
	sub	r3, r2, r3
	lsr	r3, r3, #3
	str	r3, [fp, #-216]
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, [fp, #-224]
	ldr	r1, [fp, #-220]
	mov	r0, r3
	bl	nvparam_get
	mov	r3, r0
	cmp	r3, #0
	bge	.L165
	ldr	r1, .L185+100
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L166
.L165:
	ldr	r3, [fp, #-216]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-224]
	add	r3, r2, r3
	mov	r2, #8
	mov	r1, #255
	mov	r0, r3
	bl	memset
	ldr	r3, .L185+116
	ldr	r3, [r3]
	lsl	r2, r4, #3
	ldr	r1, [fp, #-220]
	mov	r0, r3
	bl	flash_erase
	mov	r3, r0
	cmp	r3, #0
	bge	.L167
	ldr	r1, .L185+76
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L166
.L167:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, [fp, #-220]
	mov	r0, r3
	bl	flash_rewind
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bge	.L168
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L166
.L168:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	lsl	r2, r4, #3
	ldr	r1, [fp, #-224]
	mov	r0, r3
	bl	write
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bge	.L169
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L166
.L169:
	mov	sp, r5
	b	.L164
.L166:
	mov	sp, r5
	b	.L134
.L186:
	.align	2
.L185:
	.word	optarg
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	1052674
	.word	-2145366783
	.word	.LC41
	.word	.LC43
	.word	filestat
	.word	.LC44
	.word	.LC45
	.word	mtd
	.word	.LC42
	.word	.LC46
	.word	.LC47
	.word	.LC48
	.word	dev_fd.6429
	.word	fil_fd.6430
	.word	.LC49
.L164:
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	beq	.L170
	mov	r3, sp
	mov	r4, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	lsr	ip, r3, #3
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-212]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	lsl	r3, ip, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #16
	add	r3, r3, #0
	str	r3, [fp, #-208]
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mul	r3, r2, r3
	str	r3, [fp, #-204]
	mov	r3, #0
	str	r3, [fp, #-200]
	mov	r3, #0
	str	r3, [fp, #-304]
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	lsr	r3, r3, #3
	str	r3, [fp, #-196]
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, [fp, #-208]
	ldr	r1, [fp, #-204]
	mov	r0, r3
	bl	nvparam_get
	mov	r3, r0
	cmp	r3, #0
	bge	.L171
	ldr	r1, .L185+100
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	mov	sp, r4
	b	.L134
.L171:
	mov	r3, #0
	str	r3, [fp, #-308]
	b	.L172
.L174:
	ldr	r2, [fp, #-208]
	ldr	r1, [fp, #-308]
	lsl	r3, r1, #3
	add	r3, r2, r3
	ldrb	r0, [r3, #6]	@ zero_extendqisi2
	lsl	r3, r1, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #7]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [fp, #-192]
	ldr	r2, [fp, #-208]
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #6]
	mov	r2, #0
	strb	r2, [r3, #7]
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-208]
	add	r3, r2, r3
	mov	r1, #8
	mov	r0, r3
	bl	crc16
	str	r0, [fp, #-200]
	ldr	r2, [fp, #-192]
	ldr	r3, [fp, #-200]
	cmp	r2, r3
	bne	.L173
	ldr	r3, [fp, #-308]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-204]
	add	ip, r2, r3
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-308]
	ldrb	r0, [r3, r2, lsl #3]	@ zero_extendqisi2
	lsl	r1, r2, #3
	add	r1, r3, r1
	ldrb	r1, [r1, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r0, r1, r0
	lsl	r1, r2, #3
	add	r1, r3, r1
	ldrb	r1, [r1, #2]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r1, r1, r0
	lsl	r2, r2, #3
	add	r2, r3, r2
	ldrb	r3, [r2, #3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	orr	r3, r3, r1
	mov	r0, r3
	ldr	r2, [fp, #-208]
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r2, [fp, #-208]
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #5]
	and	r3, r3, #127
	and	r3, r3, #255
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, r0
	mov	r2, ip
	ldr	r1, .L185+88
	mov	r0, #1
	bl	log_printf
	ldr	r3, [fp, #-304]
	add	r3, r3, #1
	str	r3, [fp, #-304]
.L173:
	ldr	r3, [fp, #-308]
	add	r3, r3, #1
	str	r3, [fp, #-308]
.L172:
	ldr	r2, [fp, #-308]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	bcc	.L174
	ldr	r3, [fp, #-284]
	ldr	r2, [fp, #-304]
	ldr	r1, .L185+92
	mov	r0, #1
	bl	log_printf
	mov	sp, r4
.L170:
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	beq	.L184
	mov	r3, sp
	mov	r4, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	lsr	ip, r3, #3
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-188]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	lsl	r3, ip, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #16
	add	r3, r3, #0
	str	r3, [fp, #-184]
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L185+96
	ldr	r3, [r3, #12]
	mul	r3, r2, r3
	str	r3, [fp, #-180]
	ldr	r2, [fp, #-284]
	ldr	r3, [fp, #-180]
	sub	r3, r2, r3
	lsr	r3, r3, #3
	str	r3, [fp, #-176]
	mov	r3, #0
	str	r3, [fp, #-172]
	ldr	r3, .L185+116
	ldr	r3, [r3]
	ldr	r2, [fp, #-184]
	ldr	r1, [fp, #-180]
	mov	r0, r3
	bl	nvparam_get
	mov	r3, r0
	cmp	r3, #0
	bge	.L175
	ldr	r1, .L185+100
	mov	r0, #2
	bl	log_printf
	mov	r3, #1
	str	r3, [fp, #-276]
	mov	sp, r4
	b	.L134
.L175:
	ldr	r3, [fp, #-184]
	ldr	r2, [fp, #-176]
	ldrb	r0, [r3, r2, lsl #3]	@ zero_extendqisi2
	lsl	r1, r2, #3
	add	r1, r3, r1
	ldrb	r1, [r1, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r0, r1, r0
	lsl	r1, r2, #3
	add	r1, r3, r1
	ldrb	r1, [r1, #2]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r1, r1, r0
	lsl	r2, r2, #3
	add	r2, r3, r2
	ldrb	r3, [r2, #3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	orr	r3, r3, r1
	mov	r6, r3
	ldr	r2, [fp, #-184]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r2, [fp, #-184]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #5]
	and	r3, r3, #127
	and	r3, r3, #255
	mov	lr, r3
	ldr	r2, [fp, #-184]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	lsr	r3, r3, #7
	and	r3, r3, #255
	mov	r5, r3
	ldr	r2, [fp, #-184]
	ldr	r1, [fp, #-176]
	lsl	r3, r1, #3
	add	r3, r2, r3
	ldrb	r0, [r3, #6]	@ zero_extendqisi2
	lsl	r3, r1, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #7]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [sp, #12]
	str	r5, [sp, #8]
	str	lr, [sp, #4]
	str	ip, [sp]
	mov	r3, r6
	ldr	r2, [fp, #-284]
	ldr	r1, .L185+104
	mov	r0, #1
	bl	log_printf
	ldr	r2, [fp, #-184]
	ldr	r1, [fp, #-176]
	lsl	r3, r1, #3
	add	r3, r2, r3
	ldrb	r0, [r3, #6]	@ zero_extendqisi2
	lsl	r3, r1, #3
	add	r3, r2, r3
	ldrb	r3, [r3, #7]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [fp, #-168]
	ldr	r2, [fp, #-184]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #6]
	mov	r2, #0
	strb	r2, [r3, #7]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-184]
	add	r3, r2, r3
	mov	r1, #8
	mov	r0, r3
	bl	crc16
	str	r0, [fp, #-172]
	ldr	r2, [fp, #-168]
	ldr	r3, [fp, #-172]
	cmp	r2, r3
	beq	.L176
	ldr	r2, [fp, #-172]
	ldr	r1, .L185+108
	mov	r0, #1
	bl	log_printf
	b	.L177
.L176:
	ldr	r1, .L185+112
	mov	r0, #1
	bl	log_printf
.L177:
	mov	sp, r4
	b	.L134
.L183:
	nop
	b	.L134
.L184:
	nop
.L134:
	ldr	r3, .L185+116
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L185+120
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L87:
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	beq	.L178
	ldr	r0, [fp, #-292]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-292]
.L178:
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L179
	ldr	r0, [fp, #-296]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-296]
.L179:
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	beq	.L180
	ldr	r0, [fp, #-300]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-300]
.L180:
	ldr	r3, [fp, #-276]
	ldr	r2, .L185+124
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L182
	bl	__stack_chk_fail
.L182:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
	.size	main, .-main
	.data
	.align	2
	.type	dev_fd.6429, %object
	.size	dev_fd.6429, 4
dev_fd.6429:
	.word	-1
	.align	2
	.type	fil_fd.6430, %object
	.size	fil_fd.6430, 4
fil_fd.6430:
	.word	-1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
