	.file	"918576.c"
	.intel_syntax noprefix
	.text
	.local	wav_file
	.comm	wav_file,8,8
	.local	wav_sample_rate
	.comm	wav_sample_rate,4,4
	.section	.rodata
.LC0:
	.string	"%s(): Can't write header\n"
	.text
	.globl	WAV_FileEnd
	.type	WAV_FileEnd, @function
WAV_FileEnd:
.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR wav_file[rip]
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR wav_file[rip]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR wav_file[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	DWORD PTR -64[rbp], 1179011410
	mov	rax, QWORD PTR -72[rbp]
	sub	eax, 8
	mov	DWORD PTR -60[rbp], eax
	mov	DWORD PTR -56[rbp], 1163280727
	mov	DWORD PTR -52[rbp], 544501094
	mov	DWORD PTR -48[rbp], 16
	mov	WORD PTR -44[rbp], 1
	mov	WORD PTR -42[rbp], 2
	mov	eax, DWORD PTR wav_sample_rate[rip]
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR wav_sample_rate[rip]
	sal	eax, 4
	shr	eax, 3
	mov	DWORD PTR -36[rbp], eax
	mov	WORD PTR -32[rbp], 2
	mov	WORD PTR -30[rbp], 8
	mov	DWORD PTR -28[rbp], 1635017060
	mov	rax, QWORD PTR -72[rbp]
	sub	eax, 44
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR wav_file[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR wav_file[rip]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 44
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 1
	je	.L4
	lea	rsi, __func__.2[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	rax, QWORD PTR wav_file[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR wav_file[rip], 0
	jmp	.L1
.L6:
	nop
.L1:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	WAV_FileEnd, .-WAV_FileEnd
	.section	.rodata
.LC1:
	.string	"audio.wav"
.LC2:
	.string	"wb"
	.align 8
.LC3:
	.string	"%s(): Can't open file for writing: %s\n"
	.align 8
.LC4:
	.string	"%s(): Can't allocate space for header\n"
	.text
	.globl	WAV_FileStart
	.type	WAV_FileStart, @function
WAV_FileStart:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L8
	lea	rax, .LC1[rip]
	mov	QWORD PTR -72[rbp], rax
.L8:
	mov	rax, QWORD PTR wav_file[rip]
	test	rax, rax
	je	.L9
	call	WAV_FileEnd
.L9:
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR wav_file[rip], rax
	mov	rax, QWORD PTR wav_file[rip]
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, rax
	lea	rsi, __func__.1[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L10:
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	rdx, QWORD PTR wav_file[rip]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 44
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 1
	je	.L12
	lea	rsi, __func__.1[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR wav_sample_rate[rip], eax
	lea	rdi, WAV_FileEnd[rip]
	call	atexit@PLT
.L7:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	WAV_FileStart, .-WAV_FileStart
	.globl	WAV_FileIsOpen
	.type	WAV_FileIsOpen, @function
WAV_FileIsOpen:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR wav_file[rip]
	test	rax, rax
	jne	.L16
	mov	eax, 0
	jmp	.L17
.L16:
	mov	eax, 1
.L17:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	WAV_FileIsOpen, .-WAV_FileIsOpen
	.section	.rodata
.LC5:
	.string	"%s(): Failed to write data\n"
	.text
	.globl	WAV_FileStream
	.type	WAV_FileStream, @function
WAV_FileStream:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR wav_file[rip]
	test	rax, rax
	je	.L21
	mov	rdx, QWORD PTR wav_file[rip]
	mov	rsi, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 1
	je	.L18
	lea	rsi, __func__.0[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L21:
	nop
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	WAV_FileStream, .-WAV_FileStream
	.section	.rodata
	.align 8
	.type	__func__.2, @object
	.size	__func__.2, 12
__func__.2:
	.string	"WAV_FileEnd"
	.align 8
	.type	__func__.1, @object
	.size	__func__.1, 14
__func__.1:
	.string	"WAV_FileStart"
	.align 8
	.type	__func__.0, @object
	.size	__func__.0, 15
__func__.0:
	.string	"WAV_FileStream"
	.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	"918576.c"
	.text
	.local	wav_file
	.comm	wav_file,4,4
	.local	wav_sample_rate
	.comm	wav_sample_rate,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s(): Can't write header\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WAV_FileEnd
	.syntax unified
	.arm
	.fpu softvfp
	.type	WAV_FileEnd, %function
WAV_FileEnd:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L7+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r2, #2
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	str	r0, [fp, #-56]
	ldr	r3, .L7+8
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #8
	str	r3, [fp, #-48]
	ldr	r3, .L7+12
	str	r3, [fp, #-44]
	ldr	r3, .L7+16
	str	r3, [fp, #-40]
	mov	r3, #16
	str	r3, [fp, #-36]
	mov	r3, #1
	strh	r3, [fp, #-32]	@ movhi
	mov	r3, #2
	strh	r3, [fp, #-30]	@ movhi
	ldr	r3, .L7+20
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	ldr	r3, .L7+20
	ldr	r3, [r3]
	lsl	r3, r3, #4
	lsr	r3, r3, #3
	str	r3, [fp, #-24]
	mov	r3, #2
	strh	r3, [fp, #-20]	@ movhi
	mov	r3, #8
	strh	r3, [fp, #-18]	@ movhi
	ldr	r3, .L7+24
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #44
	str	r3, [fp, #-12]
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L7+4
	ldr	r3, [r3]
	sub	r0, fp, #52
	mov	r2, #1
	mov	r1, #44
	bl	fwrite
	mov	r3, r0
	cmp	r3, #1
	beq	.L4
	ldr	r1, .L7+28
	ldr	r0, .L7+32
	bl	printf
.L4:
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L7+4
	mov	r2, #0
	str	r2, [r3]
	b	.L1
.L6:
	nop
.L1:
	ldr	r3, .L7
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.word	wav_file
	.word	1179011410
	.word	1163280727
	.word	544501094
	.word	wav_sample_rate
	.word	1635017060
	.word	__func__.5161
	.word	.LC0
	.size	WAV_FileEnd, .-WAV_FileEnd
	.section	.rodata
	.align	2
.LC2:
	.ascii	"audio.wav\000"
	.align	2
.LC3:
	.ascii	"wb\000"
	.align	2
.LC4:
	.ascii	"%s(): Can't open file for writing: %s\012\000"
	.align	2
.LC5:
	.ascii	"%s(): Can't allocate space for header\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WAV_FileStart
	.syntax unified
	.arm
	.fpu softvfp
	.type	WAV_FileStart, %function
WAV_FileStart:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L17+4
	str	r3, [fp, #-56]
.L10:
	ldr	r3, .L17+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	bl	WAV_FileEnd
.L11:
	ldr	r1, .L17+12
	ldr	r0, [fp, #-56]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L17+8
	str	r3, [r2]
	ldr	r3, .L17+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	ldr	r2, [fp, #-56]
	ldr	r1, .L17+16
	ldr	r0, .L17+20
	bl	printf
	b	.L9
.L12:
	sub	r3, fp, #52
	mov	r2, #44
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L17+8
	ldr	r3, [r3]
	sub	r0, fp, #52
	mov	r2, #1
	mov	r1, #44
	bl	fwrite
	mov	r3, r0
	cmp	r3, #1
	beq	.L14
	ldr	r1, .L17+16
	ldr	r0, .L17+24
	bl	printf
	b	.L9
.L14:
	ldr	r2, .L17+28
	ldr	r3, [fp, #-60]
	str	r3, [r2]
	ldr	r0, .L17+32
	bl	atexit
.L9:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC6
	.word	.LC2
	.word	wav_file
	.word	.LC3
	.word	__func__.5166
	.word	.LC4
	.word	.LC5
	.word	wav_sample_rate
	.word	WAV_FileEnd
	.size	WAV_FileStart, .-WAV_FileStart
	.align	2
	.global	WAV_FileIsOpen
	.syntax unified
	.arm
	.fpu softvfp
	.type	WAV_FileIsOpen, %function
WAV_FileIsOpen:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L22
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	mov	r3, #0
	b	.L21
.L20:
	mov	r3, #1
.L21:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L23:
	.align	2
.L22:
	.word	wav_file
	.size	WAV_FileIsOpen, .-WAV_FileIsOpen
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%s(): Failed to write data\012\000"
	.text
	.align	2
	.global	WAV_FileStream
	.syntax unified
	.arm
	.fpu softvfp
	.type	WAV_FileStream, %function
WAV_FileStream:
	@ 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]
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r3, .L28
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	fwrite
	mov	r3, r0
	cmp	r3, #1
	beq	.L24
	ldr	r1, .L28+4
	ldr	r0, .L28+8
	bl	printf
	b	.L24
.L27:
	nop
.L24:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	wav_file
	.word	__func__.5175
	.word	.LC7
	.size	WAV_FileStream, .-WAV_FileStream
	.section	.rodata
	.align	2
	.type	__func__.5161, %object
	.size	__func__.5161, 12
__func__.5161:
	.ascii	"WAV_FileEnd\000"
	.align	2
	.type	__func__.5166, %object
	.size	__func__.5166, 14
__func__.5166:
	.ascii	"WAV_FileStart\000"
	.align	2
	.type	__func__.5175, %object
	.size	__func__.5175, 15
__func__.5175:
	.ascii	"WAV_FileStream\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
