	.file	"851538.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s <rom file>\n"
	.text
	.type	usage, @function
usage:
.LFB6:
	.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	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.section	.rodata
.LC1:
	.string	"fseek() error!\n"
	.text
	.type	FseekEnd, @function
FseekEnd:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	je	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	FseekEnd, .-FseekEnd
	.section	.rodata
.LC2:
	.string	"Dumping firmware at -0x%lx..."
.LC3:
	.string	"checksum ok"
.LC4:
	.string	"checksum fail"
	.text
	.globl	dump_fw
	.type	dump_fw, @function
dump_fw:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -56[rbp], 0
	jle	.L6
	sub	QWORD PTR -56[rbp], 16777216
.L6:
	mov	rax, QWORD PTR -56[rbp]
	neg	rax
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	FseekEnd
	mov	WORD PTR -18[rbp], 0
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -22[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fread@PLT
	movzx	eax, WORD PTR -22[rbp]
	movzx	eax, ax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, buf.1[rip]
	call	fread@PLT
	mov	QWORD PTR -16[rbp], 0
	jmp	.L7
.L8:
	lea	rdx, buf.1[rip]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	WORD PTR -18[rbp], ax
	add	QWORD PTR -16[rbp], 1
.L7:
	movzx	eax, WORD PTR -22[rbp]
	movzx	eax, ax
	cmp	QWORD PTR -16[rbp], rax
	jb	.L8
	movzx	eax, WORD PTR -20[rbp]
	cmp	WORD PTR -18[rbp], ax
	jne	.L9
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -22[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	movzx	eax, WORD PTR -22[rbp]
	movzx	eax, ax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, buf.1[rip]
	call	fwrite@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	jmp	.L12
.L9:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dump_fw, .-dump_fw
	.section	.rodata
.LC5:
	.string	"rb"
.LC6:
	.string	"Error opening file!"
.LC7:
	.string	"wb"
.LC8:
	.string	"size of %s: 0x%lx\n"
	.align 8
.LC9:
	.string	"The ROM size must be multiple of 0x100"
.LC10:
	.string	"the_stack_data/851538.c"
.LC11:
	.string	"offs[0] + offs[2] == 0xff"
.LC12:
	.string	"offs[1] + offs[3] == 0xff"
.LC13:
	.string	"offs[4] + offs[6] == 0xff"
.LC14:
	.string	"offs[5] + offs[7] == 0xff"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 168
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	cmp	DWORD PTR -164[rbp], 2
	je	.L14
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
.L14:
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L15
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -144[rbp], rax
	jmp	.L17
.L16:
	add	QWORD PTR -144[rbp], 1
.L17:
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -156[rbp], eax
	mov	eax, DWORD PTR -156[rbp]
	add	eax, 5
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -136[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -192[rbp], rdx
	mov	QWORD PTR -184[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -208[rbp], rdx
	mov	QWORD PTR -200[rbp], 0
	cdqe
	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
.L18:
	cmp	rsp, rdx
	je	.L19
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L18
.L19:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L20
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L20:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -128[rbp], rax
	mov	eax, DWORD PTR -156[rbp]
	add	eax, 5
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -120[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L21:
	cmp	rsp, rdx
	je	.L22
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L21
.L22:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L23
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L23:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -112[rbp], rax
	mov	rdx, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 829908526
	mov	BYTE PTR 4[rax], 0
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -112[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 846685742
	mov	BYTE PTR 4[rax], 0
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	mov	rsi, -1
	mov	rdi, rax
	call	FseekEnd
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	ftell@PLT
	add	rax, 1
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -88[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, al
	test	rax, rax
	je	.L24
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	mov	rax, QWORD PTR -152[rbp]
	mov	rsi, -256
	mov	rdi, rax
	call	FseekEnd
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fread@PLT
	movzx	eax, BYTE PTR -64[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -62[rbp]
	movzx	eax, al
	add	eax, edx
	cmp	eax, 255
	je	.L25
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 110
	lea	rsi, .LC10[rip]
	lea	rdi, .LC11[rip]
	call	__assert_fail@PLT
.L25:
	movzx	eax, BYTE PTR -63[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -61[rbp]
	movzx	eax, al
	add	eax, edx
	cmp	eax, 255
	je	.L26
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 111
	lea	rsi, .LC10[rip]
	lea	rdi, .LC12[rip]
	call	__assert_fail@PLT
.L26:
	movzx	eax, BYTE PTR -60[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -58[rbp]
	movzx	eax, al
	add	eax, edx
	cmp	eax, 255
	je	.L27
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 112
	lea	rsi, .LC10[rip]
	lea	rdi, .LC13[rip]
	call	__assert_fail@PLT
.L27:
	movzx	eax, BYTE PTR -59[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -57[rbp]
	movzx	eax, al
	add	eax, edx
	cmp	eax, 255
	je	.L28
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 113
	lea	rsi, .LC10[rip]
	lea	rdi, .LC14[rip]
	call	__assert_fail@PLT
.L28:
	movzx	eax, BYTE PTR -64[rbp]
	movzx	eax, al
	sal	eax, 16
	mov	edx, eax
	movzx	eax, BYTE PTR -63[rbp]
	movzx	eax, al
	sal	eax, 8
	or	eax, edx
	cdqe
	mov	QWORD PTR -80[rbp], rax
	movzx	eax, BYTE PTR -60[rbp]
	movzx	eax, al
	sal	eax, 16
	mov	edx, eax
	movzx	eax, BYTE PTR -59[rbp]
	movzx	eax, al
	sal	eax, 8
	or	eax, edx
	cdqe
	mov	QWORD PTR -72[rbp], rax
	mov	rdx, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dump_fw
	mov	rdx, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dump_fw
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.local	buf.1
	.comm	buf.1,65536,32
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"main"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"851538.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s <rom file>\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L2
	bl	printf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"fseek() error!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FseekEnd, %function
FseekEnd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r2, #2
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L7
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	FseekEnd, .-FseekEnd
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Dumping firmware at -0x%lx...\000"
	.align	2
.LC3:
	.ascii	"checksum ok\000"
	.align	2
.LC4:
	.ascii	"checksum fail\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dump_fw
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_fw, %function
dump_fw:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	ble	.L10
	ldr	r3, [fp, #-32]
	add	r3, r3, #-16777216
	str	r3, [fp, #-32]
.L10:
	ldr	r3, [fp, #-32]
	rsb	r3, r3, #0
	mov	r1, r3
	ldr	r0, .L17+4
	bl	printf
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	FseekEnd
	mov	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	sub	r0, fp, #18
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	sub	r0, fp, #16
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	ldrh	r3, [fp, #-18]
	mov	r1, r3
	ldr	r3, [fp, #-28]
	mov	r2, #1
	ldr	r0, .L17+8
	bl	fread
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L11
.L12:
	ldr	r2, .L17+8
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-14]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L11:
	ldrh	r3, [fp, #-18]
	mov	r2, r3
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	bcc	.L12
	ldrh	r3, [fp, #-16]
	ldrh	r2, [fp, #-14]
	cmp	r2, r3
	bne	.L13
	ldr	r0, .L17+12
	bl	puts
	sub	r0, fp, #18
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	sub	r0, fp, #16
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	ldrh	r3, [fp, #-18]
	mov	r1, r3
	ldr	r3, [fp, #-24]
	mov	r2, #1
	ldr	r0, .L17+8
	bl	fwrite
	nop
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	b	.L16
.L13:
	ldr	r0, .L17+16
	bl	puts
	mov	r0, #1
	bl	exit
.L16:
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC5
	.word	.LC2
	.word	buf.5321
	.word	.LC3
	.word	.LC4
	.size	dump_fw, .-dump_fw
	.section	.rodata
	.align	2
.LC6:
	.ascii	"rb\000"
	.align	2
.LC7:
	.ascii	"Error opening file!\000"
	.align	2
.LC8:
	.ascii	".fw1\000"
	.align	2
.LC9:
	.ascii	".fw2\000"
	.align	2
.LC10:
	.ascii	"wb\000"
	.align	2
.LC11:
	.ascii	"size of %s: 0x%lx\012\000"
	.align	2
.LC12:
	.ascii	"The ROM size must be multiple of 0x100\000"
	.align	2
.LC13:
	.ascii	"the_stack_data/851538.c\000"
	.align	2
.LC14:
	.ascii	"offs[0] + offs[2] == 0xff\000"
	.align	2
.LC15:
	.ascii	"offs[1] + offs[3] == 0xff\000"
	.align	2
.LC16:
	.ascii	"offs[4] + offs[6] == 0xff\000"
	.align	2
.LC17:
	.ascii	"offs[5] + offs[7] == 0xff\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-80]
	cmp	r3, #2
	beq	.L20
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
.L20:
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L31+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L21
	ldr	r0, .L31+8
	bl	puts
	mov	r0, #1
	bl	exit
.L21:
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #47
	mov	r0, r3
	bl	strrchr
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-84]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-68]
	b	.L23
.L22:
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L23:
	ldr	r0, [fp, #-68]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-64]
	add	ip, r3, #5
	sub	r3, ip, #1
	str	r3, [fp, #-60]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-64]
	add	ip, r3, #5
	sub	r3, ip, #1
	str	r3, [fp, #-52]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-48]
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-56]
	bl	strcpy
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-48]
	bl	strcpy
	ldr	r0, [fp, #-56]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r2, .L31+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
	ldr	r0, [fp, #-48]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	ldr	r2, .L31+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
	ldr	r1, .L31+20
	ldr	r0, [fp, #-56]
	bl	fopen
	str	r0, [fp, #-44]
	ldr	r1, .L31+20
	ldr	r0, [fp, #-48]
	bl	fopen
	str	r0, [fp, #-40]
	mvn	r1, #0
	ldr	r0, [fp, #-72]
	bl	FseekEnd
	ldr	r0, [fp, #-72]
	bl	ftell
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L31+24
	bl	printf
	ldr	r3, [fp, #-36]
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L24
	ldr	r0, .L31+28
	bl	puts
	mov	r0, #1
	bl	exit
.L24:
	mvn	r1, #255
	ldr	r0, [fp, #-72]
	bl	FseekEnd
	sub	r0, fp, #24
	ldr	r3, [fp, #-72]
	mov	r2, #1
	mov	r1, #8
	bl	fread
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	add	r3, r2, r3
	cmp	r3, #255
	beq	.L25
	ldr	r3, .L31+32
	mov	r2, #110
	ldr	r1, .L31+36
	ldr	r0, .L31+40
	bl	__assert_fail
.L25:
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	add	r3, r2, r3
	cmp	r3, #255
	beq	.L26
	ldr	r3, .L31+32
	mov	r2, #111
	ldr	r1, .L31+36
	ldr	r0, .L31+44
	bl	__assert_fail
.L26:
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-18]	@ zero_extendqisi2
	add	r3, r2, r3
	cmp	r3, #255
	beq	.L27
	ldr	r3, .L31+32
	mov	r2, #112
	ldr	r1, .L31+36
	ldr	r0, .L31+48
	bl	__assert_fail
.L27:
	ldrb	r3, [fp, #-19]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	add	r3, r2, r3
	cmp	r3, #255
	beq	.L28
	ldr	r3, .L31+32
	mov	r2, #113
	ldr	r1, .L31+36
	ldr	r0, .L31+52
	bl	__assert_fail
.L28:
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	lsl	r2, r3, #16
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r2, r3
	str	r3, [fp, #-32]
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	lsl	r2, r3, #16
	ldrb	r3, [fp, #-19]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-44]
	bl	dump_fw
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-40]
	bl	dump_fw
	ldr	r0, [fp, #-72]
	bl	fclose
	ldr	r0, [fp, #-44]
	bl	fclose
	ldr	r0, [fp, #-40]
	bl	fclose
	mov	r3, #0
	mov	sp, r4
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC18
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	__PRETTY_FUNCTION__.5342
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.local	buf.5321
	.comm	buf.5321,65536,4
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5342, %object
	.size	__PRETTY_FUNCTION__.5342, 5
__PRETTY_FUNCTION__.5342:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
