	.file	"732920.c"
	.intel_syntax noprefix
	.text
	.local	crc32
	.comm	crc32,1024,32
	.section	.rodata
.LC0:
	.string	"3700"
	.section	.data.rel.local,"aw"
	.align 8
	.type	magic, @object
	.size	magic, 8
magic:
	.quad	.LC0
	.text
	.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]
	not	eax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	crc32buf, .-crc32buf
	.section	.rodata
.LC1:
	.string	"Error: %s\n"
	.align 8
.LC2:
	.string	"Usage: wndr3700 input_file output_file [magic]\n"
	.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 47
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	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
.LC3:
	.string	"wrong number of arguments"
.LC4:
	.string	"Invalid magic: '%s'\n"
.LC5:
	.string	"Error loading file %s: %s\n"
.LC6:
	.string	"Error storing file %s: %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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -132[rbp], 2
	jg	.L14
	lea	rdi, .LC3[rip]
	call	usage
.L14:
	cmp	DWORD PTR -132[rbp], 3
	jle	.L15
	mov	rax, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR magic[rip], rax
.L15:
	mov	rax, QWORD PTR magic[rip]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 4
	je	.L16
	mov	rdx, QWORD PTR magic[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], 0
	js	.L17
	mov	eax, DWORD PTR -116[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -112[rbp], rax
	cmp	QWORD PTR -112[rbp], 0
	js	.L17
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, DWORD PTR -116[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 -104[rbp], rax
	cmp	QWORD PTR -104[rbp], -1
	je	.L17
	mov	eax, DWORD PTR -116[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 -144[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	rax, QWORD PTR -112[rbp]
	mov	QWORD PTR -96[rbp], rax
	mov	eax, 0
	call	init_crc32
	mov	rcx, QWORD PTR -104[rbp]
	lea	rax, -80[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR magic[rip]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -80[rbp], eax
	mov	DWORD PTR -76[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -88[rbp], rax
	mov	rdx, QWORD PTR -112[rbp]
	mov	rcx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	lea	rax, -80[rbp]
	mov	esi, 64
	mov	rdi, rax
	call	crc32buf
	mov	edi, eax
	call	htonl@PLT
	mov	DWORD PTR -76[rbp], eax
	lea	rcx, -80[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], 0
	js	.L19
	mov	rdx, QWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	QWORD PTR -96[rbp], rax
	jne	.L19
	mov	eax, DWORD PTR -116[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	jns	.L20
.L19:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L20:
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"732920.c"
	.text
	.local	crc32
	.comm	crc32,1024,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"3700\000"
	.data
	.align	2
	.type	magic, %object
	.size	magic, 4
magic:
	.word	.LC0
	.text
	.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]
	mvn	r3, r3
	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
.LC1:
	.ascii	"Error: %s\012\000"
	.align	2
.LC2:
	.ascii	"Usage: wndr3700 input_file output_file [magic]\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	r3, .L17
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L17+4
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r2, #47
	mov	r1, #1
	ldr	r0, .L17+8
	bl	fwrite
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L18:
	.align	2
.L17:
	.word	stderr
	.word	.LC1
	.word	.LC2
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC3:
	.ascii	"wrong number of arguments\000"
	.align	2
.LC4:
	.ascii	"Invalid magic: '%s'\012\000"
	.align	2
.LC5:
	.ascii	"Error loading file %s: %s\012\000"
	.align	2
.LC6:
	.ascii	"Error storing file %s: %s\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-104]
	cmp	r3, #2
	bgt	.L20
	ldr	r0, .L29+4
	bl	usage
.L20:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L21
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #12]
	ldr	r2, .L29+8
	str	r3, [r2]
.L21:
	ldr	r3, .L29+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #4
	beq	.L22
	ldr	r3, .L29+12
	ldr	r3, [r3]
	ldr	r2, .L29+8
	ldr	r2, [r2]
	ldr	r1, .L29+16
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L22:
	ldr	r3, [fp, #-108]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	blt	.L23
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-100]
	bl	lseek
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	blt	.L23
	ldr	r1, [fp, #-96]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-100]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	beq	.L23
	ldr	r0, [fp, #-100]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
.L23:
	ldr	r3, .L29+12
	ldr	r4, [r3]
	ldr	r3, [fp, #-108]
	add	r3, r3, #4
	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, .L29+20
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L24:
	ldr	r3, [fp, #-96]
	str	r3, [fp, #-88]
	bl	init_crc32
	sub	r3, fp, #80
	mov	r2, #64
	ldr	r1, [fp, #-92]
	mov	r0, r3
	bl	memcpy
	ldr	r3, .L29+8
	ldr	r2, [r3]
	sub	r3, fp, #80
	mov	r1, r2
	mov	r2, #4
	mov	r0, r3
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-88]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-96]
	mov	r2, r3
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-84]
	bl	memcpy
	sub	r3, fp, #80
	mov	r1, #64
	mov	r0, r3
	bl	crc32buf
	mov	r3, r0
	mov	r0, r3
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-76]
	sub	r3, fp, #80
	mov	r2, #64
	mov	r1, r3
	ldr	r0, [fp, #-84]
	bl	memcpy
	ldr	r3, [fp, #-108]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #420
	ldr	r1, .L29+24
	mov	r0, r3
	bl	open
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	blt	.L25
	ldr	r3, [fp, #-88]
	mov	r2, r3
	ldr	r1, [fp, #-84]
	ldr	r0, [fp, #-100]
	bl	write
	mov	r2, r0
	ldr	r3, [fp, #-88]
	cmp	r3, r2
	bne	.L25
	ldr	r0, [fp, #-100]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L26
.L25:
	ldr	r3, .L29+12
	ldr	r4, [r3]
	ldr	r3, [fp, #-108]
	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, .L29+28
	mov	r0, r4
	bl	fprintf
	mov	r0, #2
	bl	exit
.L26:
	ldr	r0, [fp, #-84]
	bl	free
	ldr	r3, [fp, #-96]
	mov	r1, r3
	ldr	r0, [fp, #-92]
	bl	munmap
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC7
	.word	.LC3
	.word	magic
	.word	stderr
	.word	.LC4
	.word	.LC5
	.word	577
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
