	.file	"57951102.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Must specify input file"
.LC1:
	.string	"rb"
.LC2:
	.string	"Couldn't open %s\n"
.LC3:
	.string	"Couldn't read 8 bytes"
.LC4:
	.string	"RIFF"
.LC5:
	.string	"End of wave data. Finished."
.LC6:
	.string	"Out of memory"
.LC7:
	.string	"fx%d.wav"
.LC8:
	.string	"%s : %ld bytes\n"
.LC9:
	.string	"wb"
.LC10:
	.string	"Can't open output file %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	cmp	DWORD PTR -100[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L11
.L10:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L6
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L11
.L6:
	lea	rax, -40[rbp]
	mov	edx, 4
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L7
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L11
.L7:
	movzx	eax, BYTE PTR -36[rbp]
	movzx	eax, al
	mov	QWORD PTR -64[rbp], rax
	movzx	eax, BYTE PTR -35[rbp]
	movzx	eax, al
	sal	rax, 8
	add	QWORD PTR -64[rbp], rax
	movzx	eax, BYTE PTR -34[rbp]
	movzx	eax, al
	sal	rax, 16
	add	QWORD PTR -64[rbp], rax
	movzx	eax, BYTE PTR -33[rbp]
	movzx	eax, al
	sal	rax, 24
	add	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L8
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L11
.L8:
	mov	edx, DWORD PTR -84[rbp]
	lea	rax, -32[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rdx, QWORD PTR -64[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -84[rbp], 1
	lea	rax, -32[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L9
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L11
.L9:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	QWORD PTR -64[rbp], 8
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	and	eax, 4294967280
	add	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	and	eax, 15
	mov	edx, 16
	mov	rsi, rdx
	sub	rsi, rax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
.L5:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L10
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"57951102.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Must specify input file\000"
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"Couldn't open %s\012\000"
	.align	2
.LC3:
	.ascii	"Couldn't read 8 bytes\000"
	.align	2
.LC4:
	.ascii	"RIFF\000"
	.align	2
.LC5:
	.ascii	"End of wave data. Finished.\000"
	.align	2
.LC6:
	.ascii	"Out of memory\000"
	.align	2
.LC7:
	.ascii	"fx%d.wav\000"
	.align	2
.LC8:
	.ascii	"%s : %ld bytes\012\000"
	.align	2
.LC9:
	.ascii	"wb\000"
	.align	2
.LC10:
	.ascii	"Can't open output file %s\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L13+4
	bl	puts
	mov	r3, #1
	b	.L11
.L2:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L13+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+12
	bl	printf
	mov	r3, #1
	b	.L11
.L10:
	sub	r0, fp, #32
	ldr	r3, [fp, #-48]
	mov	r2, #1
	mov	r1, #8
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L6
	ldr	r0, .L13+16
	bl	puts
	mov	r3, #1
	b	.L11
.L6:
	sub	r3, fp, #32
	mov	r2, #4
	ldr	r1, .L13+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L13+24
	bl	puts
	mov	r3, #0
	b	.L11
.L7:
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	str	r3, [fp, #-44]
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	str	r3, [fp, #-44]
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	lsl	r3, r3, #16
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	str	r3, [fp, #-44]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	lsl	r3, r3, #24
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L13+28
	bl	puts
	mov	r3, #1
	b	.L11
.L8:
	sub	r3, fp, #24
	ldr	r2, [fp, #-56]
	ldr	r1, .L13+32
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #24
	ldr	r2, [fp, #-44]
	mov	r1, r3
	ldr	r0, .L13+36
	bl	printf
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
	sub	r3, fp, #24
	ldr	r1, .L13+40
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L9
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L13+44
	bl	printf
	mov	r3, #1
	b	.L11
.L9:
	ldr	r3, [fp, #-48]
	mov	r2, #1
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	fread
	sub	r0, fp, #32
	ldr	r3, [fp, #-36]
	mov	r2, #1
	mov	r1, #8
	bl	fwrite
	ldr	r3, [fp, #-36]
	mov	r2, #1
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	fwrite
	ldr	r0, [fp, #-36]
	bl	fclose
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	bic	r3, r3, #15
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-44]
	and	r3, r3, #15
	rsb	r1, r3, #16
	ldr	r3, [fp, #-48]
	mov	r2, #1
	ldr	r0, [fp, #-40]
	bl	fread
	ldr	r0, [fp, #-40]
	bl	free
.L5:
	ldr	r0, [fp, #-48]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
