	.file	"736304.c"
	.intel_syntax noprefix
	.text
	.local	crc32
	.comm	crc32,1024,32
	.type	init_crc32, @function
init_crc32:
.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	edi, 545503469
	call	ntohl@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L3
.L6:
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 1
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR -12[rbp]
	shr	eax
	xor	eax, DWORD PTR -4[rbp]
	jmp	.L5
.L4:
	mov	eax, DWORD PTR -12[rbp]
	shr	eax
.L5:
	mov	DWORD PTR -12[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L3:
	cmp	DWORD PTR -8[rbp], 7
	jle	.L6
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, crc32[rip]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -16[rbp], 1
.L2:
	cmp	DWORD PTR -16[rbp], 255
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	init_crc32, .-init_crc32
	.type	crc32buf, @function
crc32buf:
.LFB7:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], -1
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	eax, edx
	movzx	eax, al
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, crc32[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 8
	xor	eax, edx
	mov	DWORD PTR -4[rbp], eax
	sub	QWORD PTR -32[rbp], 1
	add	QWORD PTR -24[rbp], 1
.L9:
	cmp	QWORD PTR -32[rbp], 0
	jne	.L10
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	crc32buf, .-crc32buf
	.section	.rodata
.LC0:
	.string	"WR850G"
.LC1:
	.string	"WA840G"
.LC2:
	.string	"WE800G"
	.section	.data.rel.ro.local,"aw"
	.align 32
	.type	models, @object
	.size	models, 96
models:
	.byte	49
	.zero	7
	.quad	.LC0
	.long	274165840
	.zero	4
	.byte	50
	.zero	7
	.quad	.LC1
	.long	274165824
	.zero	4
	.byte	51
	.zero	7
	.quad	.LC2
	.long	274165760
	.zero	4
	.byte	0
	.zero	7
	.quad	0
	.long	0
	.zero	4
	.section	.rodata
.LC3:
	.string	"Error: %s\n"
	.align 8
.LC4:
	.string	"Usage: motorola-bin -device|--strip infile outfile\n"
.LC5:
	.string	"Known devices: "
.LC6:
	.string	" %c - %s"
	.text
	.type	usage, @function
usage:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 51
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	lea	rax, models[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	QWORD PTR -8[rbp], 24
.L13:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	usage, .-usage
	.section	.rodata
.LC7:
	.string	"wrong number of arguments"
.LC8:
	.string	"Error loading file %s: %s\n"
.LC9:
	.string	"--strip"
.LC10:
	.string	"input file too short"
.LC11:
	.string	"Invalid CRC"
.LC12:
	.string	"unrecognized flags field"
.LC13:
	.string	"Firmware for Motorola %s\n"
.LC14:
	.string	"%s\n"
.LC15:
	.string	"Error storing file %s: %s\n"
	.align 8
.LC16:
	.string	"first argument must start with -"
.LC17:
	.string	"unrecognized device specified"
	.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	rbx
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	cmp	DWORD PTR -84[rbp], 4
	je	.L16
	lea	rdi, .LC7[rip]
	call	usage
.L16:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	js	.L17
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	js	.L17
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -80[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], -1
	je	.L17
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	jns	.L18
.L17:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	eax, 0
	call	init_crc32
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L19
	mov	QWORD PTR -72[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, 7
	ja	.L20
	lea	rax, .LC10[rip]
	mov	QWORD PTR -72[rbp], rax
	jmp	.L21
.L20:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	crc32buf
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rdx]
	cmp	eax, edx
	je	.L22
	lea	rax, .LC11[rip]
	mov	QWORD PTR -72[rbp], rax
.L22:
	lea	rax, models[rip]
	mov	QWORD PTR -64[rbp], rax
.L26:
	mov	rax, QWORD PTR -64[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L23
	cmp	QWORD PTR -72[rbp], 0
	jne	.L42
	lea	rax, .LC12[rip]
	mov	QWORD PTR -72[rbp], rax
	jmp	.L42
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	ebx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	htonl@PLT
	cmp	ebx, eax
	jne	.L25
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L21
.L25:
	add	QWORD PTR -64[rbp], 24
	jmp	.L26
.L42:
	nop
.L21:
	cmp	QWORD PTR -72[rbp], 0
	je	.L27
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 3
	call	exit@PLT
.L27:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	js	.L28
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, 8[rax]
	mov	eax, DWORD PTR -80[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, 8
	cmp	rdx, rax
	jne	.L28
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	jns	.L29
.L28:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	je	.L30
	lea	rdi, .LC16[rip]
	call	usage
.L30:
	add	QWORD PTR -48[rbp], 1
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L31
	add	QWORD PTR -48[rbp], 1
.L31:
	lea	rax, models[rip]
	mov	QWORD PTR -56[rbp], rax
.L37:
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L32
	lea	rdi, .LC17[rip]
	call	usage
.L32:
	mov	rax, QWORD PTR -48[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L33
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L34
.L33:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L35
.L34:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR -76[rbp], eax
	nop
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	crc32buf
	mov	edi, eax
	call	htonl@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	js	.L38
	jmp	.L41
.L35:
	add	QWORD PTR -56[rbp], 24
	jmp	.L37
.L41:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 8[rax]
	mov	rcx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	cmp	rdx, rax
	jne	.L38
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	jns	.L39
.L38:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L39:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
.L29:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"736304.c"
	.text
	.local	crc32
	.comm	crc32,1024,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_crc32, %function
init_crc32:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r0, .L8
	bl	ntohl
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L7:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L3
.L6:
	ldr	r3, [fp, #-16]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-16]
	lsr	r2, r3, #1
	ldr	r3, [fp, #-8]
	eor	r3, r3, r2
	b	.L5
.L4:
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #1
.L5:
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #7
	ble	.L6
	ldr	r1, .L8+4
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r3, [fp, #-20]
	cmp	r3, #255
	ble	.L7
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	545503469
	.word	crc32
	.size	init_crc32, .-init_crc32
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	crc32buf, %function
crc32buf:
	@ 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]
	mvn	r3, #0
	str	r3, [fp, #-8]
	b	.L11
.L12:
	ldr	r3, [fp, #-8]
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L14
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #8
	eor	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L15:
	.align	2
.L14:
	.word	crc32
	.size	crc32buf, .-crc32buf
	.section	.rodata
	.align	2
.LC0:
	.ascii	"WR850G\000"
	.align	2
.LC1:
	.ascii	"WA840G\000"
	.align	2
.LC2:
	.ascii	"WE800G\000"
	.align	2
	.type	models, %object
	.size	models, 48
models:
	.byte	49
	.space	3
	.word	.LC0
	.word	274165840
	.byte	50
	.space	3
	.word	.LC1
	.word	274165824
	.byte	51
	.space	3
	.word	.LC2
	.word	274165760
	.byte	0
	.space	3
	.word	0
	.word	0
	.align	2
.LC3:
	.ascii	"Error: %s\012\000"
	.align	2
.LC4:
	.ascii	"Usage: motorola-bin -device|--strip infile outfile\012"
	.ascii	"\000"
	.align	2
.LC5:
	.ascii	"Known devices: \000"
	.align	2
.LC6:
	.ascii	" %c - %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ 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]
	ldr	r3, .L19
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L19+4
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r2, #51
	mov	r1, #1
	ldr	r0, .L19+8
	bl	fwrite
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L19+12
	bl	fwrite
	ldr	r3, .L19+16
	str	r3, [fp, #-8]
	b	.L17
.L18:
	ldr	r3, .L19
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, .L19+20
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	str	r3, [fp, #-8]
.L17:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L20:
	.align	2
.L19:
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	models
	.word	.LC6
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC7:
	.ascii	"wrong number of arguments\000"
	.align	2
.LC8:
	.ascii	"Error loading file %s: %s\012\000"
	.align	2
.LC9:
	.ascii	"--strip\000"
	.align	2
.LC10:
	.ascii	"input file too short\000"
	.align	2
.LC11:
	.ascii	"Invalid CRC\000"
	.align	2
.LC12:
	.ascii	"unrecognized flags field\000"
	.align	2
.LC13:
	.ascii	"Firmware for Motorola %s\012\000"
	.align	2
.LC14:
	.ascii	"%s\012\000"
	.align	2
.LC15:
	.ascii	"Error storing file %s: %s\012\000"
	.align	2
.LC16:
	.ascii	"first argument must start with -\000"
	.align	2
.LC17:
	.ascii	"unrecognized device specified\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, [fp, #-56]
	cmp	r3, #4
	beq	.L22
	ldr	r0, .L49
	bl	usage
.L22:
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L23
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	lseek
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L23
	ldr	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-32]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	beq	.L23
	ldr	r0, [fp, #-32]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
.L23:
	ldr	r3, .L49+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L49+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L24:
	bl	init_crc32
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L49+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-28]
	cmp	r3, #7
	bhi	.L26
	ldr	r3, .L49+16
	str	r3, [fp, #-48]
	b	.L27
.L26:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r2, r3, #4
	ldr	r3, [fp, #-28]
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	crc32buf
	mov	r3, r0
	mov	r0, r3
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L28
	ldr	r3, .L49+20
	str	r3, [fp, #-48]
.L28:
	ldr	r3, .L49+24
	str	r3, [fp, #-44]
.L32:
	ldr	r3, [fp, #-44]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L29
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L48
	ldr	r3, .L49+28
	str	r3, [fp, #-48]
	b	.L48
.L29:
	ldr	r3, [fp, #-16]
	ldr	r4, [r3, #4]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	htonl
	mov	r3, r0
	cmp	r4, r3
	bne	.L31
	ldr	r3, .L49+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L49+32
	bl	fprintf
	b	.L27
.L31:
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	str	r3, [fp, #-44]
	b	.L32
.L48:
	nop
.L27:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	ldr	r1, .L49+36
	mov	r0, r3
	bl	fprintf
	mov	r0, #3
	bl	exit
.L33:
	ldr	r3, [fp, #-60]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, #420
	ldr	r1, .L49+40
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L34
	ldr	r3, [fp, #-24]
	add	r1, r3, #8
	ldr	r3, [fp, #-28]
	sub	r3, r3, #8
	mov	r2, r3
	ldr	r0, [fp, #-32]
	bl	write
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-28]
	sub	r3, r3, #8
	cmp	r2, r3
	bne	.L34
	ldr	r0, [fp, #-32]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L35
.L34:
	ldr	r3, .L49+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #12
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L49+44
	mov	r0, r4
	bl	fprintf
	mov	r0, #2
	bl	exit
.L25:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	beq	.L36
	ldr	r0, .L49+48
	bl	usage
.L36:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L37
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L37:
	ldr	r3, .L49+24
	str	r3, [fp, #-40]
.L43:
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L38
	ldr	r0, .L49+52
	bl	usage
.L38:
	ldr	r3, [fp, #-36]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L39
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L40
.L39:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L41
.L40:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	nop
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	memcpy
	ldr	r0, [fp, #-20]
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	crc32buf
	mov	r3, r0
	mov	r0, r3
	bl	htonl
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, #420
	ldr	r1, .L49+40
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L44
	b	.L47
.L41:
	ldr	r3, [fp, #-40]
	add	r3, r3, #12
	str	r3, [fp, #-40]
	b	.L43
.L47:
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-32]
	bl	write
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	cmp	r2, r3
	bne	.L44
	ldr	r0, [fp, #-32]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L45
.L44:
	ldr	r3, .L49+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #12
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L49+44
	mov	r0, r4
	bl	fprintf
	mov	r0, #2
	bl	exit
.L45:
	ldr	r0, [fp, #-16]
	bl	free
.L35:
	ldr	r3, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	munmap
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	models
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	577
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
