	.file	"783963.c"
	.intel_syntax noprefix
	.text
	.globl	reflect
	.type	reflect, @function
reflect:
.LFB6:
	.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	eax, esi
	mov	BYTE PTR -28[rbp], al
	mov	QWORD PTR -8[rbp], 0
	mov	BYTE PTR -9[rbp], 0
	jmp	.L2
.L4:
	mov	rax, QWORD PTR -24[rbp]
	and	eax, 1
	test	rax, rax
	je	.L3
	movzx	eax, BYTE PTR -28[rbp]
	sub	eax, 1
	movzx	edx, BYTE PTR -9[rbp]
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	cdqe
	or	QWORD PTR -8[rbp], rax
.L3:
	shr	QWORD PTR -24[rbp]
	add	BYTE PTR -9[rbp], 1
.L2:
	movzx	eax, BYTE PTR -9[rbp]
	cmp	al, BYTE PTR -28[rbp]
	jb	.L4
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	reflect, .-reflect
	.globl	crcSlow
	.type	crcSlow, @function
crcSlow:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], -1
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, 8
	mov	rdi, rax
	call	reflect
	movzx	eax, al
	sal	eax, 24
	xor	DWORD PTR -8[rbp], eax
	mov	BYTE PTR -9[rbp], 8
	jmp	.L8
.L11:
	mov	eax, DWORD PTR -8[rbp]
	test	eax, eax
	jns	.L9
	mov	eax, DWORD PTR -8[rbp]
	add	eax, eax
	xor	eax, 79764919
	mov	DWORD PTR -8[rbp], eax
	jmp	.L10
.L9:
	sal	DWORD PTR -8[rbp]
.L10:
	sub	BYTE PTR -9[rbp], 1
.L8:
	cmp	BYTE PTR -9[rbp], 0
	jne	.L11
	add	DWORD PTR -4[rbp], 1
.L7:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L12
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	reflect
	not	eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	crcSlow, .-crcSlow
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"Usage: %s <infile> [outfile]\n"
.LC1:
	.string	"open"
.LC2:
	.string	"error"
.LC3:
	.string	"Image is %u bytes\n"
.LC4:
	.string	"malloc"
.LC5:
	.string	"read"
.LC6:
	.string	"Found WS-30 firmware image:"
.LC7:
	.string	"    Total size: %u\n"
.LC8:
	.string	"    Gold: 0x%08x\n"
.LC9:
	.string	"    Version: %u\n"
.LC10:
	.string	"    Kinetis address: 0x%x\n"
.LC11:
	.string	"    Kinetis size: %u\n"
.LC12:
	.string	"    Kinetis CRC: 0x%08x\n"
.LC13:
	.string	"    WiFi address: 0x%x\n"
.LC14:
	.string	"    WiFi size: %u\n"
.LC15:
	.string	"    Bluetooth address: 0x%x\n"
.LC16:
	.string	"    Bluetooth size: %u\n"
.LC17:
	.string	"    Image CRC: 0x%08x\n"
	.align 8
.LC18:
	.string	"\nCalculated image CRC: 0x%08x\n"
	.align 8
.LC19:
	.string	"Calculated Kinetis CRC: 0x%08x\n"
	.align 8
.LC20:
	.string	"\nPatched Kinetis CRC, recalculating image CRC..."
.LC21:
	.string	"Calculated image CRC: 0x%08x\n"
.LC22:
	.string	"Patched image CRC"
.LC23:
	.string	"write"
	.align 8
.LC24:
	.string	"Didn't write out the entire file, try again."
.LC25:
	.string	"\nWrote %d bytes to %s\n"
	.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
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 2
	je	.L16
	cmp	DWORD PTR -68[rbp], 3
	je	.L16
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L30
.L16:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L18
	lea	rdi, .LC1[rip]
	call	error
.L18:
	lea	rcx, -52[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L19
	lea	rdi, .LC2[rip]
	call	error
.L19:
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	eax, eax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L20
	lea	rdi, .LC4[rip]
	call	error
.L20:
	mov	DWORD PTR -48[rbp], 0
	jmp	.L21
.L23:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L22
	lea	rdi, .LC5[rip]
	call	error
.L22:
	mov	eax, DWORD PTR -36[rbp]
	add	DWORD PTR -48[rbp], eax
.L21:
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, DWORD PTR -48[rbp]
	sub	eax, edx
	mov	edx, eax
	mov	eax, DWORD PTR -48[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 24[rax]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 28[rax]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 36[rax]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	eax, eax
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 4
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	crcSlow
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	esi, edx
	mov	rdi, rax
	call	crcSlow
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L24
	mov	eax, 0
	jmp	.L30
.L24:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 20[rax]
	cmp	DWORD PTR -32[rbp], eax
	je	.L25
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	DWORD PTR 20[rax], edx
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 4
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	crcSlow
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 438
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L26
	lea	rdi, .LC1[rip]
	call	error
.L26:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	eax, eax
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	je	.L27
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	eax, eax
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR [rdx], eax
	lea	rdi, .LC22[rip]
	call	puts@PLT
.L27:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, eax
	mov	rcx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L28
	lea	rdi, .LC23[rip]
	call	error
	jmp	.L29
.L28:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cmp	edx, eax
	je	.L29
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L30
.L29:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L30:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	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	"783963.c"
	.text
	.align	2
	.global	reflect
	.syntax unified
	.arm
	.fpu softvfp
	.type	reflect, %function
reflect:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-17]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	strb	r3, [fp, #-9]
	b	.L2
.L4:
	ldr	r3, [fp, #-16]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L3
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	sub	r2, r3, #1
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r2, r3
	mov	r2, #1
	lsl	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #1
	str	r3, [fp, #-16]
	ldrb	r3, [fp, #-9]
	add	r3, r3, #1
	strb	r3, [fp, #-9]
.L2:
	ldrb	r2, [fp, #-9]	@ zero_extendqisi2
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L4
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	reflect, .-reflect
	.align	2
	.global	crcSlow
	.syntax unified
	.arm
	.fpu softvfp
	.type	crcSlow, %function
crcSlow:
	@ 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, #-24]
	str	r1, [fp, #-28]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L12:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, #8
	mov	r0, r3
	bl	reflect
	mov	r3, r0
	and	r3, r3, #255
	lsl	r3, r3, #24
	mov	r2, r3
	ldr	r3, [fp, #-12]
	eor	r3, r3, r2
	str	r3, [fp, #-12]
	mov	r3, #8
	strb	r3, [fp, #-13]
	b	.L8
.L11:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L9
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #1
	ldr	r3, .L14
	eor	r3, r3, r2
	str	r3, [fp, #-12]
	b	.L10
.L9:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldrb	r3, [fp, #-13]
	sub	r3, r3, #1
	strb	r3, [fp, #-13]
.L8:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L12
	mov	r1, #32
	ldr	r0, [fp, #-12]
	bl	reflect
	mov	r3, r0
	mvn	r3, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	79764919
	.size	crcSlow, .-crcSlow
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ 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	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <infile> [outfile]\012\000"
	.align	2
.LC1:
	.ascii	"open\000"
	.align	2
.LC2:
	.ascii	"error\000"
	.align	2
.LC3:
	.ascii	"Image is %u bytes\012\000"
	.align	2
.LC4:
	.ascii	"malloc\000"
	.align	2
.LC5:
	.ascii	"read\000"
	.align	2
.LC6:
	.ascii	"Found WS-30 firmware image:\000"
	.align	2
.LC7:
	.ascii	"    Total size: %u\012\000"
	.align	2
.LC8:
	.ascii	"    Gold: 0x%08x\012\000"
	.align	2
.LC9:
	.ascii	"    Version: %u\012\000"
	.align	2
.LC10:
	.ascii	"    Kinetis address: 0x%x\012\000"
	.align	2
.LC11:
	.ascii	"    Kinetis size: %u\012\000"
	.align	2
.LC12:
	.ascii	"    Kinetis CRC: 0x%08x\012\000"
	.align	2
.LC13:
	.ascii	"    WiFi address: 0x%x\012\000"
	.align	2
.LC14:
	.ascii	"    WiFi size: %u\012\000"
	.align	2
.LC15:
	.ascii	"    Bluetooth address: 0x%x\012\000"
	.align	2
.LC16:
	.ascii	"    Bluetooth size: %u\012\000"
	.align	2
.LC17:
	.ascii	"    Image CRC: 0x%08x\012\000"
	.align	2
.LC18:
	.ascii	"\012Calculated image CRC: 0x%08x\012\000"
	.align	2
.LC19:
	.ascii	"Calculated Kinetis CRC: 0x%08x\012\000"
	.align	2
.LC20:
	.ascii	"\012Patched Kinetis CRC, recalculating image CRC..."
	.ascii	"\000"
	.align	2
.LC21:
	.ascii	"Calculated image CRC: 0x%08x\012\000"
	.align	2
.LC22:
	.ascii	"Patched image CRC\000"
	.align	2
.LC23:
	.ascii	"write\000"
	.align	2
.LC24:
	.ascii	"Didn't write out the entire file, try again.\000"
	.align	2
.LC25:
	.ascii	"\012Wrote %d bytes to %s\012\000"
	.align	2
.LC26:
	.word	__stack_chk_guard
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	beq	.L18
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	beq	.L18
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+4
	bl	printf
	mvn	r3, #0
	b	.L32
.L18:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L34+8
	bl	error
.L20:
	sub	r3, fp, #44
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L34+12
	bl	error
.L21:
	ldr	r3, [fp, #-44]
	mov	r1, r3
	ldr	r0, .L34+16
	bl	printf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	lseek
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L22
	ldr	r0, .L34+20
	bl	error
.L22:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L23
.L25:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L24
	ldr	r0, .L34+24
	bl	error
.L24:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-40]
.L23:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-24]
	add	r1, r2, r3
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	ldr	r0, .L34+28
	bl	puts
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+32
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L34+36
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L34+40
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, .L34+44
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L34+48
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r0, .L34+52
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #24]
	mov	r1, r3
	ldr	r0, .L34+56
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #28]
	mov	r1, r3
	ldr	r0, .L34+60
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #32]
	mov	r1, r3
	ldr	r0, .L34+64
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #36]
	mov	r1, r3
	ldr	r0, .L34+68
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+72
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	crcSlow
	str	r0, [fp, #-36]
	ldr	r1, [fp, #-36]
	ldr	r0, .L34+76
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #16]
	mov	r1, r3
	mov	r0, r2
	bl	crcSlow
	str	r0, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L34+80
	bl	printf
	ldr	r0, [fp, #-32]
	bl	close
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
	b	.L32
.L26:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #20]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	beq	.L27
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #20]
	ldr	r0, .L34+84
	bl	puts
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	crcSlow
	str	r0, [fp, #-36]
	ldr	r1, [fp, #-36]
	ldr	r0, .L34+88
	bl	printf
.L27:
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L34+92
	mov	r0, r3
	bl	creat
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L28
	ldr	r0, .L34+8
	bl	error
.L28:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	beq	.L29
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	str	r2, [r3]
	ldr	r0, .L34+96
	bl	puts
.L29:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	write
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L30
	ldr	r0, .L34+100
	bl	error
	b	.L31
.L30:
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L31
	ldr	r0, .L34+104
	bl	puts
	mvn	r3, #0
	b	.L32
.L31:
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, .L34+108
	bl	printf
	ldr	r0, [fp, #-12]
	bl	close
	mov	r3, #0
.L32:
	ldr	r2, .L34
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC26
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	438
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
