	.file	"259188.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"read error at 0x%lx\n"
	.text
	.type	get8, @function
get8:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -9[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L2
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	movzx	eax, BYTE PTR -9[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get8, .-get8
	.type	read16, @function
read16:
.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	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L6
.L7:
	sal	DWORD PTR -8[rbp], 8
	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
	or	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 1
.L6:
	cmp	DWORD PTR -4[rbp], 1
	jle	.L7
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read16, .-read16
	.type	get16, @function
get16:
.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 fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -10[rbp]
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 2
	je	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rax, -10[rbp]
	mov	rdi, rax
	call	read16
	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
.LFE8:
	.size	get16, .-get16
	.type	read32, @function
read32:
.LFB9:
	.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	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L14
.L15:
	sal	DWORD PTR -8[rbp], 8
	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
	or	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 1
.L14:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L15
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	read32, .-read32
	.type	get32, @function
get32:
.LFB10:
	.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 fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -12[rbp]
	mov	rcx, rdx
	mov	edx, 4
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 4
	je	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	lea	rax, -12[rbp]
	mov	rdi, rax
	call	read32
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get32, .-get32
	.section	.rodata
	.align 8
.LC1:
	.string	"expected 0x%08x at 0x%lx, got 0x%08x\n"
	.text
	.type	expect32, @function
expect32:
.LFB11:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	get32
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	je	.L23
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	ftell@PLT
	lea	rcx, -4[rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -4[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	r8d, esi
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	expect32, .-expect32
	.section	.rodata
	.align 8
.LC2:
	.string	"expected 0x%08lx to be 0x%08x, got 0x%08x\n"
	.text
	.type	expect32_imm, @function
expect32_imm:
.LFB12:
	.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -16[rbp], rdx
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	je	.L26
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -8[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	r8d, esi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L26:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	expect32_imm, .-expect32_imm
	.section	.rodata
	.align 8
.LC3:
	.string	"expected %s to be 0x%08x, got 0x%08x\n"
	.text
	.type	expect32_text, @function
expect32_text:
.LFB13:
	.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -16[rbp], rdx
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	je	.L29
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -8[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	r8d, esi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L29:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	expect32_text, .-expect32_text
	.section	.rodata
.LC4:
	.string	"seek by 0x%x failed\n"
	.text
	.type	seek_past, @function
seek_past:
.LFB14:
	.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	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	ecx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	cmp	eax, -1
	jne	.L32
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	seek_past, .-seek_past
	.globl	IMA_Steps
	.section	.rodata
	.align 32
	.type	IMA_Steps, @object
	.size	IMA_Steps, 356
IMA_Steps:
	.long	7
	.long	8
	.long	9
	.long	10
	.long	11
	.long	12
	.long	13
	.long	14
	.long	16
	.long	17
	.long	19
	.long	21
	.long	23
	.long	25
	.long	28
	.long	31
	.long	34
	.long	37
	.long	41
	.long	45
	.long	50
	.long	55
	.long	60
	.long	66
	.long	73
	.long	80
	.long	88
	.long	97
	.long	107
	.long	118
	.long	130
	.long	143
	.long	157
	.long	173
	.long	190
	.long	209
	.long	230
	.long	253
	.long	279
	.long	307
	.long	337
	.long	371
	.long	408
	.long	449
	.long	494
	.long	544
	.long	598
	.long	658
	.long	724
	.long	796
	.long	876
	.long	963
	.long	1060
	.long	1166
	.long	1282
	.long	1411
	.long	1552
	.long	1707
	.long	1878
	.long	2066
	.long	2272
	.long	2499
	.long	2749
	.long	3024
	.long	3327
	.long	3660
	.long	4026
	.long	4428
	.long	4871
	.long	5358
	.long	5894
	.long	6484
	.long	7132
	.long	7845
	.long	8630
	.long	9493
	.long	10442
	.long	11487
	.long	12635
	.long	13899
	.long	15289
	.long	16818
	.long	18500
	.long	20350
	.long	22385
	.long	24623
	.long	27086
	.long	29794
	.long	32767
	.globl	IMA_IndexTable
	.align 16
	.type	IMA_IndexTable, @object
	.size	IMA_IndexTable, 16
IMA_IndexTable:
	.ascii	"\377\377\377\377\002\004\006\b\377\377\377\377\002\004\006\b"
	.text
	.type	clamp16, @function
clamp16:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 32767
	jle	.L34
	mov	eax, 32767
	jmp	.L35
.L34:
	cmp	DWORD PTR -4[rbp], -32768
	jge	.L36
	mov	eax, -32768
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -4[rbp]
.L35:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	clamp16, .-clamp16
	.section	.rodata
	.align 8
.LC5:
	.string	"invalid step index (%d) at 0x%lx\n"
.LC6:
	.string	"error writing output\n"
	.text
	.type	decode_audio, @function
decode_audio:
.LFB16:
	.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, 104
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	DWORD PTR -80[rbp], edx
	mov	QWORD PTR -88[rbp], rcx
	mov	QWORD PTR -96[rbp], r8
	mov	DWORD PTR -100[rbp], r9d
	mov	edx, DWORD PTR -80[rbp]
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	imul	rax, rdx
	add	rax, rax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	cmp	DWORD PTR -76[rbp], 0
	je	.L38
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	mov	DWORD PTR -52[rbp], eax
	jmp	.L39
.L41:
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	get8
	mov	rdx, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	movzx	eax, al
	mov	WORD PTR [rdx], ax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cwde
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	WORD PTR [rax], dx
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	get8
	mov	BYTE PTR -61[rbp], al
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	edx, WORD PTR [rax]
	movzx	eax, BYTE PTR -61[rbp]
	and	ax, 128
	mov	esi, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	or	edx, esi
	mov	WORD PTR [rax], dx
	movzx	edx, BYTE PTR -61[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	and	edx, 127
	mov	BYTE PTR 2[rax], dl
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	cmp	al, 88
	jle	.L40
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	movsx	edx, al
	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
.L40:
	sub	DWORD PTR -52[rbp], 1
.L39:
	cmp	DWORD PTR -52[rbp], 0
	jns	.L41
	mov	DWORD PTR -48[rbp], 0
	jmp	.L42
.L43:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -60[rbp], edx
	mov	eax, eax
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, WORD PTR [rcx]
	mov	WORD PTR [rdx], ax
	add	DWORD PTR -48[rbp], 1
.L42:
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L43
	add	DWORD PTR -56[rbp], 1
.L38:
	mov	DWORD PTR -44[rbp], 0
	jmp	.L44
.L57:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	mov	DWORD PTR -40[rbp], eax
	jmp	.L45
.L54:
	cmp	DWORD PTR -44[rbp], 0
	jne	.L46
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	get8
	mov	BYTE PTR -62[rbp], al
	mov	DWORD PTR -44[rbp], 8
.L46:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	movsx	eax, al
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, IMA_Steps[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 3
	mov	DWORD PTR -36[rbp], eax
	movzx	eax, BYTE PTR -62[rbp]
	and	eax, 16
	test	eax, eax
	je	.L47
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 2
	add	DWORD PTR -36[rbp], eax
.L47:
	movzx	eax, BYTE PTR -62[rbp]
	and	eax, 32
	test	eax, eax
	je	.L48
	mov	eax, DWORD PTR -28[rbp]
	sar	eax
	add	DWORD PTR -36[rbp], eax
.L48:
	movzx	eax, BYTE PTR -62[rbp]
	and	eax, 64
	test	eax, eax
	je	.L49
	mov	eax, DWORD PTR -28[rbp]
	add	DWORD PTR -36[rbp], eax
.L49:
	movzx	eax, BYTE PTR -62[rbp]
	test	al, al
	jns	.L50
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cwde
	sub	eax, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	lea	rbx, [rcx+rdx]
	mov	edi, eax
	call	clamp16
	mov	WORD PTR [rbx], ax
	jmp	.L51
.L50:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movsx	edx, ax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	lea	rbx, [rcx+rdx]
	mov	edi, eax
	call	clamp16
	mov	WORD PTR [rbx], ax
.L51:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	mov	ecx, eax
	movzx	eax, BYTE PTR -62[rbp]
	shr	al, 4
	movzx	eax, al
	cdqe
	lea	rdx, IMA_IndexTable[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	add	ecx, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR 2[rax], dl
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	cmp	al, 88
	jle	.L52
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	BYTE PTR 2[rax], 88
.L52:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	test	al, al
	jns	.L53
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	BYTE PTR 2[rax], 0
.L53:
	sal	BYTE PTR -62[rbp], 4
	sub	DWORD PTR -44[rbp], 4
	sub	DWORD PTR -40[rbp], 1
.L45:
	cmp	DWORD PTR -40[rbp], 0
	jns	.L54
	mov	DWORD PTR -32[rbp], 0
	jmp	.L55
.L56:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -60[rbp], edx
	mov	eax, eax
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, WORD PTR [rcx]
	mov	WORD PTR [rdx], ax
	add	DWORD PTR -32[rbp], 1
.L55:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L56
	add	DWORD PTR -56[rbp], 1
.L44:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -80[rbp]
	jb	.L57
	mov	ebx, DWORD PTR -80[rbp]
	mov	edx, DWORD PTR -80[rbp]
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	lea	rsi, [rax+rax]
	mov	rcx, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rbx, rax
	je	.L58
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L58:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	decode_audio, .-decode_audio
	.globl	HVQM4_13_magic
	.section	.rodata
	.align 16
	.type	HVQM4_13_magic, @object
	.size	HVQM4_13_magic, 16
HVQM4_13_magic:
	.string	"HVQM4 1.3"
	.zero	6
	.globl	HVQM4_15_magic
	.align 16
	.type	HVQM4_15_magic, @object
	.size	HVQM4_15_magic, 16
HVQM4_15_magic:
	.string	"HVQM4 1.5"
	.zero	6
	.align 8
.LC7:
	.string	"does not appear to be a HVQM4 file\n"
.LC8:
	.string	"header size"
.LC9:
	.string	"zero blocks\n"
	.align 8
.LC10:
	.string	"expected nonzero audio srate and frame size\n"
	.text
	.type	load_header, @function
load_header:
.LFB17:
	.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 -16[rbp]
	mov	edx, 16
	mov	rsi, rax
	lea	rdi, HVQM4_13_magic[rip]
	call	memcmp@PLT
	test	eax, eax
	jne	.L60
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L61
.L60:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 16
	mov	rsi, rax
	lea	rdi, HVQM4_15_magic[rip]
	call	memcmp@PLT
	test	eax, eax
	jne	.L62
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L61
.L62:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L61:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 20
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 24
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 28
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 32
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 20[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 36
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 24[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 40
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 28[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 44
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 32[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 48
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 36[rdx], eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 52
	mov	rdi, rax
	call	read16
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 40[rdx], ax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 54
	mov	rdi, rax
	call	read16
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 42[rdx], ax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 56
	mov	rdi, rax
	call	read16
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 44[rdx], ax
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR 58[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 46[rax], dl
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR 59[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 47[rax], dl
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR 60[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 48[rax], dl
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR 61[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 49[rax], dl
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 62
	mov	rdi, rax
	call	read16
	mov	rdx, QWORD PTR -8[rbp]
	mov	WORD PTR 50[rdx], ax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 64
	mov	rdi, rax
	call	read32
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 52[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rdx, .LC8[rip]
	mov	esi, eax
	mov	edi, 68
	call	expect32_text
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	test	eax, eax
	jne	.L63
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 12
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L63:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	je	.L64
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 52[rax]
	test	eax, eax
	je	.L65
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 36[rax]
	test	eax, eax
	je	.L65
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 48[rax]
	test	al, al
	jne	.L64
.L65:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 44
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L64:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	edx, 44
	mov	esi, eax
	mov	edi, 0
	call	expect32_imm
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 44[rax]
	movzx	eax, ax
	mov	edx, 56
	mov	esi, eax
	mov	edi, 514
	call	expect32_imm
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 46[rax]
	test	al, al
	je	.L66
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 46[rax]
	cmp	al, 18
	je	.L66
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 46[rax]
	movzx	eax, al
	mov	edx, 58
	mov	esi, eax
	mov	edi, 0
	call	expect32_imm
.L66:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 47[rax]
	movzx	eax, al
	mov	edx, 59
	mov	esi, eax
	mov	edi, 0
	call	expect32_imm
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	load_header, .-load_header
	.section	.rodata
.LC11:
	.string	"HVQM4 1.3"
.LC12:
	.string	"HVQM4 1.5"
.LC13:
	.string	"Header size: 0x%x\n"
.LC14:
	.string	"Body size:   0x%x\n"
.LC15:
	.string	"Duration:    %u (?)\n"
.LC16:
	.string	"Resolution:  %u x %u\n"
.LC17:
	.string	"unk24:       0x%u\n"
.LC18:
	.string	"%d Blocks\n"
.LC19:
	.string	"%d Video frames\n"
.LC20:
	.string	"%d Audio frames\n"
.LC21:
	.string	"Sample rate: %u Hz\n"
.LC22:
	.string	"Audio frame size: 0x%x\n"
.LC23:
	.string	"Audio channels: %u\n"
.LC24:
	.string	"No audio!"
	.text
	.globl	display_header
	.type	display_header, @function
display_header:
.LFB18:
	.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	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L68
	cmp	eax, 1
	je	.L69
	jmp	.L70
.L68:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L70
.L69:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	nop
.L70:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 28[rax]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 42[rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 40[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 24[rax]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	je	.L71
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 52[rax]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 36[rax]
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 48[rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L72
.L71:
	lea	rdi, .LC24[rip]
	call	puts@PLT
.L72:
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	display_header, .-display_header
	.type	put_32bitLE, @function
put_32bitLE:
.LFB19:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L74
.L75:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	mov	BYTE PTR [rax], dl
	shr	DWORD PTR -28[rbp], 8
	add	DWORD PTR -4[rbp], 1
.L74:
	cmp	DWORD PTR -4[rbp], 3
	jbe	.L75
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	put_32bitLE, .-put_32bitLE
	.type	put_16bitLE, @function
put_16bitLE:
.LFB20:
	.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	WORD PTR -28[rbp], ax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L77
.L78:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, WORD PTR -28[rbp]
	mov	BYTE PTR [rax], dl
	shr	WORD PTR -28[rbp], 8
	add	DWORD PTR -4[rbp], 1
.L77:
	cmp	DWORD PTR -4[rbp], 1
	jbe	.L78
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	put_16bitLE, .-put_16bitLE
	.section	.rodata
.LC25:
	.string	"RIFF"
.LC26:
	.string	"WAVE"
.LC27:
	.string	"fmt "
.LC28:
	.string	"data"
	.text
	.type	make_wav_header, @function
make_wav_header:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	eax, DWORD PTR -28[rbp]
	imul	eax, DWORD PTR -36[rbp]
	add	eax, eax
	cdqe
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 4
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	lea	edx, 36[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	esi, edx
	mov	rdi, rax
	call	put_32bitLE
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	edx, 4
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 12
	mov	edx, 4
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	mov	esi, 16
	mov	rdi, rax
	call	put_32bitLE
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 20
	mov	esi, 1
	mov	rdi, rax
	call	put_16bitLE
	mov	eax, DWORD PTR -36[rbp]
	movzx	eax, ax
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, 22
	mov	esi, eax
	mov	rdi, rdx
	call	put_16bitLE
	mov	eax, DWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, 24
	mov	esi, eax
	mov	rdi, rdx
	call	put_32bitLE
	mov	eax, DWORD PTR -32[rbp]
	imul	eax, DWORD PTR -36[rbp]
	add	eax, eax
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 28
	mov	esi, edx
	mov	rdi, rax
	call	put_32bitLE
	mov	eax, DWORD PTR -36[rbp]
	add	eax, eax
	movzx	eax, ax
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, 32
	mov	esi, eax
	mov	rdi, rdx
	call	put_16bitLE
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 34
	mov	esi, 16
	mov	rdi, rax
	call	put_16bitLE
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 36
	mov	edx, 4
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 40
	mov	esi, edx
	mov	rdi, rax
	call	put_32bitLE
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	make_wav_header, .-make_wav_header
	.section	.rodata
	.align 8
.LC29:
	.string	"h4m 'HVQM4 1.3/1.5' audio decoder 0.3 by hcs\n"
	.align 8
.LC30:
	.string	"usage: %s file.h4m output.wav\n"
.LC31:
	.string	"rb"
.LC32:
	.string	"failed opening %s\n"
.LC33:
	.string	"failed reading header"
	.align 8
.LC34:
	.string	"this video contains no audio!\n"
.LC35:
	.string	"wb"
.LC36:
	.string	"error opening %s\n"
.LC37:
	.string	"error writing riff header\n"
	.align 8
.LC38:
	.string	"processed 0x%lx bytes, should have done 0x%x\n"
.LC39:
	.string	"unexpected frame id at %08lx\n"
.LC40:
	.string	"frame count mismatch\n"
.LC41:
	.string	"block size mismatch\n"
.LC42:
	.string	"total frame count mismatch\n"
.LC43:
	.string	"%u samples\n"
.LC44:
	.string	"error rewriting riff header\n"
.LC45:
	.string	"error finishing output\n"
.LC46:
	.string	"Done!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC29[rip]
	call	puts@PLT
	cmp	DWORD PTR -324[rbp], 3
	je	.L81
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L81:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC31[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -232[rbp], rax
	cmp	QWORD PTR -232[rbp], 0
	jne	.L82
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L82:
	mov	rdx, QWORD PTR -232[rbp]
	lea	rax, -80[rbp]
	mov	rcx, rdx
	mov	edx, 68
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 68
	je	.L83
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC33[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L83:
	lea	rdx, -80[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	load_header
	lea	rax, -192[rbp]
	mov	rdi, rax
	call	display_header
	mov	eax, DWORD PTR -176[rbp]
	test	eax, eax
	jne	.L84
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC34[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L84:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -224[rbp], rax
	cmp	QWORD PTR -224[rbp], 0
	jne	.L85
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC36[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L85:
	mov	rdx, QWORD PTR -224[rbp]
	lea	rax, -128[rbp]
	mov	rcx, rdx
	mov	edx, 44
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 44
	je	.L86
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC37[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L86:
	mov	DWORD PTR -308[rbp], 0
	mov	DWORD PTR -304[rbp], 0
	mov	DWORD PTR -300[rbp], 0
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -296[rbp], eax
	mov	DWORD PTR -292[rbp], 0
	jmp	.L87
.L105:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	sub	eax, DWORD PTR -296[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	expect32
	mov	rax, QWORD PTR -216[rbp]
	mov	DWORD PTR -296[rbp], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get32
	mov	DWORD PTR -268[rbp], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get32
	mov	DWORD PTR -264[rbp], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get32
	mov	DWORD PTR -260[rbp], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rsi, rax
	mov	edi, 16777216
	call	expect32
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -208[rbp], rax
	add	DWORD PTR -308[rbp], 1
	mov	DWORD PTR -288[rbp], 1
	mov	DWORD PTR -284[rbp], 1
	mov	DWORD PTR -280[rbp], 0
	mov	DWORD PTR -276[rbp], 0
	mov	DWORD PTR -272[rbp], 0
	movzx	eax, BYTE PTR -144[rbp]
	movzx	eax, al
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -248[rbp], rax
	jmp	.L88
.L101:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get16
	mov	WORD PTR -312[rbp], ax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get16
	mov	WORD PTR -310[rbp], ax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get32
	mov	DWORD PTR -256[rbp], eax
	cmp	WORD PTR -312[rbp], 1
	jne	.L89
	mov	eax, DWORD PTR -192[rbp]
	test	eax, eax
	jne	.L90
	cmp	WORD PTR -310[rbp], 16
	je	.L91
.L90:
	mov	eax, DWORD PTR -192[rbp]
	test	eax, eax
	jne	.L92
	cmp	WORD PTR -310[rbp], 48
	je	.L91
.L92:
	cmp	DWORD PTR -288[rbp], 0
	je	.L93
	cmp	WORD PTR -310[rbp], 16
	je	.L91
.L93:
	cmp	DWORD PTR -288[rbp], 0
	jne	.L89
	cmp	WORD PTR -310[rbp], 32
	jne	.L89
.L91:
	mov	DWORD PTR -288[rbp], 0
	add	DWORD PTR -280[rbp], 1
	add	DWORD PTR -300[rbp], 1
	mov	rdx, QWORD PTR -232[rbp]
	mov	eax, DWORD PTR -256[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	seek_past
	jmp	.L88
.L89:
	cmp	WORD PTR -312[rbp], 0
	jne	.L94
	cmp	DWORD PTR -284[rbp], 0
	je	.L95
	cmp	WORD PTR -310[rbp], 3
	je	.L96
	cmp	WORD PTR -310[rbp], 1
	je	.L96
.L95:
	cmp	DWORD PTR -284[rbp], 0
	jne	.L94
	cmp	WORD PTR -310[rbp], 2
	jne	.L94
.L96:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -200[rbp], rax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get32
	mov	DWORD PTR -252[rbp], eax
	movzx	eax, BYTE PTR -144[rbp]
	movzx	r8d, al
	mov	rdi, QWORD PTR -224[rbp]
	mov	rcx, QWORD PTR -232[rbp]
	mov	edx, DWORD PTR -252[rbp]
	mov	esi, DWORD PTR -284[rbp]
	lea	rax, -248[rbp]
	mov	r9d, r8d
	mov	r8, rdi
	mov	rdi, rax
	call	decode_audio
	mov	edx, DWORD PTR -272[rbp]
	mov	eax, DWORD PTR -252[rbp]
	add	eax, edx
	mov	DWORD PTR -272[rbp], eax
	add	DWORD PTR -276[rbp], 1
	add	DWORD PTR -304[rbp], 1
	mov	DWORD PTR -284[rbp], 0
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	sub	rax, QWORD PTR -200[rbp]
	mov	QWORD PTR -240[rbp], rax
	mov	eax, DWORD PTR -256[rbp]
	cmp	QWORD PTR -240[rbp], rax
	jle	.L97
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -256[rbp]
	mov	rdx, QWORD PTR -240[rbp]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L97:
	mov	eax, DWORD PTR -256[rbp]
	cmp	QWORD PTR -240[rbp], rax
	jge	.L88
	jmp	.L99
.L100:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	get8
	add	QWORD PTR -240[rbp], 1
.L99:
	mov	eax, DWORD PTR -256[rbp]
	cmp	QWORD PTR -240[rbp], rax
	jl	.L100
	jmp	.L88
.L94:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC39[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L88:
	mov	eax, DWORD PTR -276[rbp]
	cmp	eax, DWORD PTR -264[rbp]
	jb	.L101
	mov	eax, DWORD PTR -280[rbp]
	cmp	eax, DWORD PTR -260[rbp]
	jb	.L101
	mov	eax, DWORD PTR -264[rbp]
	cmp	eax, DWORD PTR -276[rbp]
	jne	.L102
	mov	eax, DWORD PTR -260[rbp]
	cmp	eax, DWORD PTR -280[rbp]
	je	.L103
.L102:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC40[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L103:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	ecx, DWORD PTR -268[rbp]
	mov	rdx, QWORD PTR -208[rbp]
	add	rdx, rcx
	cmp	rax, rdx
	je	.L104
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC41[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L104:
	mov	eax, DWORD PTR -272[rbp]
	add	DWORD PTR -292[rbp], eax
.L87:
	mov	eax, DWORD PTR -180[rbp]
	cmp	DWORD PTR -308[rbp], eax
	jb	.L105
	mov	eax, DWORD PTR -176[rbp]
	cmp	DWORD PTR -304[rbp], eax
	jne	.L106
	mov	eax, DWORD PTR -172[rbp]
	cmp	DWORD PTR -300[rbp], eax
	je	.L107
.L106:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC42[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L107:
	mov	eax, DWORD PTR -292[rbp]
	mov	esi, eax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -144[rbp]
	movzx	edx, al
	mov	eax, DWORD PTR -140[rbp]
	mov	edi, eax
	mov	esi, DWORD PTR -292[rbp]
	lea	rax, -128[rbp]
	mov	ecx, edx
	mov	edx, edi
	mov	rdi, rax
	call	make_wav_header
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -224[rbp]
	lea	rax, -128[rbp]
	mov	rcx, rdx
	mov	edx, 44
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 44
	je	.L108
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC44[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L108:
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	eax, -1
	jne	.L109
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC45[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L109:
	lea	rdi, .LC46[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L111
	call	__stack_chk_fail@PLT
.L111:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.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	"259188.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"read error at 0x%lx\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get8, %function
get8:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r0, fp, #20
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L2
	ldr	r3, .L5+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-24]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L5+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	ldr	r2, .L5
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.word	stderr
	.word	.LC0
	.size	get8, .-get8
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read16, %function
read16:
	@ 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, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #8
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	orr	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L9
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	read16, .-read16
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get16, %function
get16:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r0, fp, #20
	ldr	r3, [fp, #-24]
	mov	r2, #2
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #2
	beq	.L12
	ldr	r3, .L15+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-24]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L15+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L12:
	sub	r3, fp, #20
	mov	r0, r3
	bl	read16
	mov	r3, r0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.size	get16, .-get16
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read32, %function
read32:
	@ 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, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L18
.L19:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #8
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	orr	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L19
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	read32, .-read32
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get32, %function
get32:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r0, fp, #20
	ldr	r3, [fp, #-24]
	mov	r2, #4
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #4
	beq	.L22
	ldr	r3, .L25+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-24]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L25+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L22:
	sub	r3, fp, #20
	mov	r0, r3
	bl	read32
	mov	r3, r0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.size	get32, .-get32
	.section	.rodata
	.align	2
.LC4:
	.ascii	"expected 0x%08x at 0x%lx, got 0x%08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	expect32, %function
expect32:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	get32
	str	r0, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L29
	ldr	r3, .L30
	ldr	r4, [r3]
	ldr	r0, [fp, #-28]
	bl	ftell
	mov	r3, r0
	sub	r2, r3, #4
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-24]
	ldr	r1, .L30+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L29:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L31:
	.align	2
.L30:
	.word	stderr
	.word	.LC4
	.size	expect32, .-expect32
	.section	.rodata
	.align	2
.LC5:
	.ascii	"expected 0x%08lx to be 0x%08x, got 0x%08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	expect32_imm, %function
expect32_imm:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L34
	ldr	r3, .L35
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r1, .L35+4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L34:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	stderr
	.word	.LC5
	.size	expect32_imm, .-expect32_imm
	.section	.rodata
	.align	2
.LC6:
	.ascii	"expected %s to be 0x%08x, got 0x%08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	expect32_text, %function
expect32_text:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L39
	ldr	r3, .L40
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r1, .L40+4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L39:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	stderr
	.word	.LC6
	.size	expect32_text, .-expect32_text
	.section	.rodata
	.align	2
.LC7:
	.ascii	"seek by 0x%x failed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	seek_past, %function
seek_past:
	@ 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, [fp, #-8]
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	fseek
	mov	r3, r0
	cmn	r3, #1
	bne	.L44
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L45+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L44:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	stderr
	.word	.LC7
	.size	seek_past, .-seek_past
	.global	IMA_Steps
	.section	.rodata
	.align	2
	.type	IMA_Steps, %object
	.size	IMA_Steps, 356
IMA_Steps:
	.word	7
	.word	8
	.word	9
	.word	10
	.word	11
	.word	12
	.word	13
	.word	14
	.word	16
	.word	17
	.word	19
	.word	21
	.word	23
	.word	25
	.word	28
	.word	31
	.word	34
	.word	37
	.word	41
	.word	45
	.word	50
	.word	55
	.word	60
	.word	66
	.word	73
	.word	80
	.word	88
	.word	97
	.word	107
	.word	118
	.word	130
	.word	143
	.word	157
	.word	173
	.word	190
	.word	209
	.word	230
	.word	253
	.word	279
	.word	307
	.word	337
	.word	371
	.word	408
	.word	449
	.word	494
	.word	544
	.word	598
	.word	658
	.word	724
	.word	796
	.word	876
	.word	963
	.word	1060
	.word	1166
	.word	1282
	.word	1411
	.word	1552
	.word	1707
	.word	1878
	.word	2066
	.word	2272
	.word	2499
	.word	2749
	.word	3024
	.word	3327
	.word	3660
	.word	4026
	.word	4428
	.word	4871
	.word	5358
	.word	5894
	.word	6484
	.word	7132
	.word	7845
	.word	8630
	.word	9493
	.word	10442
	.word	11487
	.word	12635
	.word	13899
	.word	15289
	.word	16818
	.word	18500
	.word	20350
	.word	22385
	.word	24623
	.word	27086
	.word	29794
	.word	32767
	.global	IMA_IndexTable
	.align	2
	.type	IMA_IndexTable, %object
	.size	IMA_IndexTable, 16
IMA_IndexTable:
	.ascii	"\377\377\377\377\002\004\006\010\377\377\377\377\002"
	.ascii	"\004\006\010"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clamp16, %function
clamp16:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #32768
	blt	.L48
	ldr	r3, .L51
	b	.L49
.L48:
	ldr	r3, [fp, #-8]
	cmn	r3, #32768
	bge	.L50
	ldr	r3, .L51+4
	b	.L49
.L50:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #16
	asr	r3, r3, #16
.L49:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L52:
	.align	2
.L51:
	.word	32767
	.word	-32768
	.size	clamp16, .-clamp16
	.section	.rodata
	.align	2
.LC8:
	.ascii	"invalid step index (%d) at 0x%lx\012\000"
	.align	2
.LC9:
	.ascii	"error writing output\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	decode_audio, %function
decode_audio:
	@ args = 8, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	str	r2, [fp, #-72]
	str	r3, [fp, #-76]
	ldr	r3, [fp, #8]
	ldr	r2, [fp, #-72]
	mul	r3, r2, r3
	lsl	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	beq	.L54
	ldr	r3, [fp, #8]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L55
.L57:
	ldr	r0, [fp, #-76]
	bl	get8
	mov	r3, r0
	mov	r1, r3
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	lsl	r2, r1, #16
	asr	r2, r2, #16
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsh	r3, [r3]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-64]
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r1, r3
	lsl	r2, r2, #16
	asr	r2, r2, #16
	strh	r2, [r3]	@ movhi
	ldr	r0, [fp, #-76]
	bl	get8
	mov	r3, r0
	strb	r3, [fp, #-53]
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsh	r1, [r3]
	ldrb	r3, [fp, #-53]	@ zero_extendqisi2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	and	r3, r3, #128
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-64]
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r0, r3
	orr	r2, r1, r2
	lsl	r2, r2, #16
	asr	r2, r2, #16
	strh	r2, [r3]	@ movhi
	ldrsb	r2, [fp, #-53]
	ldr	r3, [fp, #-64]
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r1, r3
	and	r2, r2, #127
	lsl	r2, r2, #24
	asr	r2, r2, #24
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsb	r3, [r3, #2]
	cmp	r3, #88
	ble	.L56
	ldr	r3, .L75
	ldr	r4, [r3]
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsb	r3, [r3, #2]
	mov	r5, r3
	ldr	r0, [fp, #-76]
	bl	ftell
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L75+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L56:
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
.L55:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L57
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L58
.L59:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-52]
	add	r1, r3, #1
	str	r1, [fp, #-52]
	lsl	r3, r3, #1
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldrsh	r2, [r2]
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L58:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	blt	.L59
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L54:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L60
.L73:
	ldr	r3, [fp, #8]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L61
.L70:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L62
	ldr	r0, [fp, #-76]
	bl	get8
	mov	r3, r0
	strb	r3, [fp, #-54]
	mov	r3, #8
	str	r3, [fp, #-36]
.L62:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsb	r3, [r3, #2]
	mov	r2, r3
	ldr	r3, .L75+8
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	asr	r3, r3, #3
	str	r3, [fp, #-28]
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L63
	ldr	r3, [fp, #-16]
	asr	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-28]
.L63:
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	and	r3, r3, #32
	cmp	r3, #0
	beq	.L64
	ldr	r3, [fp, #-16]
	asr	r3, r3, #1
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-28]
.L64:
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	and	r3, r3, #64
	cmp	r3, #0
	beq	.L65
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-28]
.L65:
	ldrsb	r3, [fp, #-54]
	cmp	r3, #0
	bge	.L66
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-28]
	sub	r1, r2, r3
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, r1
	bl	clamp16
	mov	r3, r0
	strh	r3, [r4]	@ movhi
	b	.L67
.L66:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r1, r2, r3
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, r1
	bl	clamp16
	mov	r3, r0
	strh	r3, [r4]	@ movhi
.L67:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsb	r3, [r3, #2]
	and	r2, r3, #255
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #255
	mov	r1, r3
	ldr	r3, .L75+12
	ldrsb	r3, [r3, r1]
	and	r3, r3, #255
	add	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-64]
	ldr	r1, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r1, r3
	lsl	r2, r2, #24
	asr	r2, r2, #24
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsb	r3, [r3, #2]
	cmp	r3, #88
	ble	.L68
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #88
	strb	r2, [r3, #2]
.L68:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldrsb	r3, [r3, #2]
	cmp	r3, #0
	bge	.L69
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #2]
.L69:
	ldrb	r3, [fp, #-54]
	lsl	r3, r3, #4
	strb	r3, [fp, #-54]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #4
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
.L61:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L70
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L71
.L72:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-52]
	add	r1, r3, #1
	str	r1, [fp, #-52]
	lsl	r3, r3, #1
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldrsh	r2, [r2]
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L71:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	blt	.L72
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L60:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	bcc	.L73
	ldr	r3, [fp, #8]
	lsl	r1, r3, #1
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-72]
	ldr	r0, [fp, #-20]
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-72]
	cmp	r3, r2
	beq	.L74
	ldr	r3, .L75
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L75+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L74:
	ldr	r0, [fp, #-20]
	bl	free
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L76:
	.align	2
.L75:
	.word	stderr
	.word	.LC8
	.word	IMA_Steps
	.word	IMA_IndexTable
	.word	.LC9
	.size	decode_audio, .-decode_audio
	.global	HVQM4_13_magic
	.section	.rodata
	.align	2
	.type	HVQM4_13_magic, %object
	.size	HVQM4_13_magic, 16
HVQM4_13_magic:
	.ascii	"HVQM4 1.3\000"
	.space	6
	.global	HVQM4_15_magic
	.align	2
	.type	HVQM4_15_magic, %object
	.size	HVQM4_15_magic, 16
HVQM4_15_magic:
	.ascii	"HVQM4 1.5\000"
	.space	6
	.align	2
.LC10:
	.ascii	"does not appear to be a HVQM4 file\012\000"
	.align	2
.LC11:
	.ascii	"header size\000"
	.align	2
.LC12:
	.ascii	"zero blocks\012\000"
	.align	2
.LC13:
	.ascii	"expected nonzero audio srate and frame size\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_header, %function
load_header:
	@ 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]
	mov	r2, #16
	ldr	r1, [fp, #-12]
	ldr	r0, .L85
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L78
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	b	.L79
.L78:
	mov	r2, #16
	ldr	r1, [fp, #-12]
	ldr	r0, .L85+4
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L80
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3]
	b	.L79
.L80:
	ldr	r3, .L85+8
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L85+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L79:
	ldr	r3, [fp, #-12]
	add	r3, r3, #16
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	add	r3, r3, #20
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #24
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #28
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #32
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-12]
	add	r3, r3, #36
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-12]
	add	r3, r3, #40
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #28]
	ldr	r3, [fp, #-12]
	add	r3, r3, #44
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-12]
	add	r3, r3, #48
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #36]
	ldr	r3, [fp, #-12]
	add	r3, r3, #52
	mov	r0, r3
	bl	read16
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	strh	r2, [r3, #40]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #54
	mov	r0, r3
	bl	read16
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	strh	r2, [r3, #42]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #56
	mov	r0, r3
	bl	read16
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	strh	r2, [r3, #44]	@ movhi
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3, #58]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #46]
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3, #59]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #47]
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3, #60]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #48]
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3, #61]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #49]
	ldr	r3, [fp, #-12]
	add	r3, r3, #62
	mov	r0, r3
	bl	read16
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	strh	r2, [r3, #50]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #64
	mov	r0, r3
	bl	read32
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #52]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, .L85+16
	mov	r1, r3
	mov	r0, #68
	bl	expect32_text
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L81
	ldr	r3, .L85+8
	ldr	r3, [r3]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L85+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L81:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L82
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #52]
	cmp	r3, #0
	beq	.L83
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #36]
	cmp	r3, #0
	beq	.L83
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #48]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L82
.L83:
	ldr	r3, .L85+8
	ldr	r3, [r3]
	mov	r2, #44
	mov	r1, #1
	ldr	r0, .L85+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L82:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	mov	r2, #44
	mov	r1, r3
	mov	r0, #0
	bl	expect32_imm
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #44]
	mov	r2, #56
	mov	r1, r3
	ldr	r0, .L85+28
	bl	expect32_imm
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #46]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L84
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #46]	@ zero_extendqisi2
	cmp	r3, #18
	beq	.L84
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #46]	@ zero_extendqisi2
	mov	r2, #58
	mov	r1, r3
	mov	r0, #0
	bl	expect32_imm
.L84:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #47]	@ zero_extendqisi2
	mov	r2, #59
	mov	r1, r3
	mov	r0, #0
	bl	expect32_imm
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L86:
	.align	2
.L85:
	.word	HVQM4_13_magic
	.word	HVQM4_15_magic
	.word	stderr
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	514
	.size	load_header, .-load_header
	.section	.rodata
	.align	2
.LC14:
	.ascii	"HVQM4 1.3\000"
	.align	2
.LC15:
	.ascii	"HVQM4 1.5\000"
	.align	2
.LC16:
	.ascii	"Header size: 0x%x\012\000"
	.align	2
.LC17:
	.ascii	"Body size:   0x%x\012\000"
	.align	2
.LC18:
	.ascii	"Duration:    %u (?)\012\000"
	.align	2
.LC19:
	.ascii	"Resolution:  %u x %u\012\000"
	.align	2
.LC20:
	.ascii	"unk24:       0x%u\012\000"
	.align	2
.LC21:
	.ascii	"%d Blocks\012\000"
	.align	2
.LC22:
	.ascii	"%d Video frames\012\000"
	.align	2
.LC23:
	.ascii	"%d Audio frames\012\000"
	.align	2
.LC24:
	.ascii	"Sample rate: %u Hz\012\000"
	.align	2
.LC25:
	.ascii	"Audio frame size: 0x%x\012\000"
	.align	2
.LC26:
	.ascii	"Audio channels: %u\012\000"
	.align	2
.LC27:
	.ascii	"No audio!\000"
	.text
	.align	2
	.global	display_header
	.syntax unified
	.arm
	.fpu softvfp
	.type	display_header, %function
display_header:
	@ 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, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L88
	cmp	r3, #1
	beq	.L89
	b	.L90
.L88:
	ldr	r0, .L93
	bl	puts
	b	.L90
.L89:
	ldr	r0, .L93+4
	bl	puts
	nop
.L90:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L93+8
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L93+12
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #28]
	mov	r1, r3
	ldr	r0, .L93+16
	bl	printf
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #40]
	mov	r1, r3
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #42]
	mov	r2, r3
	ldr	r0, .L93+20
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	mov	r1, r3
	ldr	r0, .L93+24
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, .L93+28
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r0, .L93+32
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L91
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L93+36
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #52]
	mov	r1, r3
	ldr	r0, .L93+40
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #36]
	mov	r1, r3
	ldr	r0, .L93+44
	bl	printf
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #48]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L93+48
	bl	printf
	b	.L92
.L91:
	ldr	r0, .L93+52
	bl	puts
.L92:
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L94:
	.align	2
.L93:
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.size	display_header, .-display_header
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	put_32bitLE, %function
put_32bitLE:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L96
.L97:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	lsr	r3, r3, #8
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L96:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	bls	.L97
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	put_32bitLE, .-put_32bitLE
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	put_16bitLE, %function
put_16bitLE:
	@ 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
	strh	r3, [fp, #-18]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L99
.L100:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrh	r2, [fp, #-18]	@ movhi
	and	r2, r2, #255
	strb	r2, [r3]
	ldrh	r3, [fp, #-18]
	lsr	r3, r3, #8
	strh	r3, [fp, #-18]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L99:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bls	.L100
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	put_16bitLE, .-put_16bitLE
	.section	.rodata
	.align	2
.LC28:
	.ascii	"RIFF\000"
	.align	2
.LC29:
	.ascii	"WAVE\000"
	.align	2
.LC30:
	.ascii	"fmt \000"
	.align	2
.LC31:
	.ascii	"data\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_wav_header, %function
make_wav_header:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	mul	r3, r2, r3
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r2, #4
	ldr	r1, .L102
	ldr	r0, [fp, #-16]
	bl	memcpy
	ldr	r3, [fp, #-16]
	add	r2, r3, #4
	ldr	r3, [fp, #-8]
	add	r3, r3, #36
	mov	r1, r3
	mov	r0, r2
	bl	put_32bitLE
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	mov	r2, #4
	ldr	r1, .L102+4
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-16]
	add	r3, r3, #12
	mov	r2, #4
	ldr	r1, .L102+8
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	mov	r1, #16
	mov	r0, r3
	bl	put_32bitLE
	ldr	r3, [fp, #-16]
	add	r3, r3, #20
	mov	r1, #1
	mov	r0, r3
	bl	put_16bitLE
	ldr	r3, [fp, #-16]
	add	r2, r3, #22
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r1, r3
	mov	r0, r2
	bl	put_16bitLE
	ldr	r3, [fp, #-16]
	add	r3, r3, #24
	ldr	r2, [fp, #-24]
	mov	r1, r2
	mov	r0, r3
	bl	put_32bitLE
	ldr	r3, [fp, #-16]
	add	r0, r3, #28
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	mul	r3, r2, r3
	lsl	r3, r3, #1
	mov	r1, r3
	bl	put_32bitLE
	ldr	r3, [fp, #-16]
	add	r2, r3, #32
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r1, r3
	mov	r0, r2
	bl	put_16bitLE
	ldr	r3, [fp, #-16]
	add	r3, r3, #34
	mov	r1, #16
	mov	r0, r3
	bl	put_16bitLE
	ldr	r3, [fp, #-16]
	add	r3, r3, #36
	mov	r2, #4
	ldr	r1, .L102+12
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-16]
	add	r3, r3, #40
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	put_32bitLE
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L103:
	.align	2
.L102:
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.size	make_wav_header, .-make_wav_header
	.section	.rodata
	.align	2
.LC32:
	.ascii	"h4m 'HVQM4 1.3/1.5' audio decoder 0.3 by hcs\012\000"
	.align	2
.LC33:
	.ascii	"usage: %s file.h4m output.wav\012\000"
	.align	2
.LC34:
	.ascii	"rb\000"
	.align	2
.LC35:
	.ascii	"failed opening %s\012\000"
	.align	2
.LC36:
	.ascii	"failed reading header\000"
	.align	2
.LC37:
	.ascii	"this video contains no audio!\012\000"
	.align	2
.LC38:
	.ascii	"wb\000"
	.align	2
.LC39:
	.ascii	"error opening %s\012\000"
	.align	2
.LC40:
	.ascii	"error writing riff header\012\000"
	.align	2
.LC41:
	.ascii	"processed 0x%lx bytes, should have done 0x%x\012\000"
	.align	2
.LC42:
	.ascii	"unexpected frame id at %08lx\012\000"
	.align	2
.LC43:
	.ascii	"frame count mismatch\012\000"
	.align	2
.LC44:
	.ascii	"block size mismatch\012\000"
	.align	2
.LC45:
	.ascii	"total frame count mismatch\012\000"
	.align	2
.LC46:
	.ascii	"%u samples\012\000"
	.align	2
.LC47:
	.ascii	"error rewriting riff header\012\000"
	.align	2
.LC48:
	.ascii	"error finishing output\012\000"
	.align	2
.LC49:
	.ascii	"Done!\000"
	.align	2
.LC50:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #284
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L136
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L136+4
	bl	puts
	ldr	r3, [fp, #-280]
	cmp	r3, #3
	beq	.L105
	ldr	r3, .L136+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-284]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L136+12
	bl	fprintf
	mov	r0, #1
	bl	exit
.L105:
	ldr	r3, [fp, #-284]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L136+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-224]
	ldr	r3, [fp, #-224]
	cmp	r3, #0
	bne	.L106
	ldr	r3, .L136+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-284]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L136+20
	bl	fprintf
	mov	r0, #1
	bl	exit
.L106:
	sub	r0, fp, #84
	ldr	r3, [fp, #-224]
	mov	r2, #68
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #68
	beq	.L107
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L136+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L107:
	sub	r2, fp, #84
	sub	r3, fp, #184
	mov	r1, r2
	mov	r0, r3
	bl	load_header
	sub	r3, fp, #184
	mov	r0, r3
	bl	display_header
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bne	.L108
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L136+28
	bl	fwrite
	mov	r0, #1
	bl	exit
.L108:
	ldr	r3, [fp, #-284]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L136+32
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-220]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	bne	.L109
	ldr	r3, .L136+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-284]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L136+36
	bl	fprintf
	mov	r0, #1
	bl	exit
.L109:
	sub	r0, fp, #128
	ldr	r3, [fp, #-220]
	mov	r2, #44
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	cmp	r3, #44
	beq	.L110
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L136+40
	bl	fwrite
	mov	r0, #1
	bl	exit
.L110:
	mov	r3, #0
	str	r3, [fp, #-268]
	mov	r3, #0
	str	r3, [fp, #-264]
	mov	r3, #0
	str	r3, [fp, #-260]
	ldr	r0, [fp, #-224]
	bl	ftell
	mov	r3, r0
	str	r3, [fp, #-256]
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L111
.L129:
	ldr	r0, [fp, #-224]
	bl	ftell
	str	r0, [fp, #-216]
	ldr	r0, [fp, #-224]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-256]
	sub	r3, r2, r3
	ldr	r1, [fp, #-224]
	mov	r0, r3
	bl	expect32
	ldr	r3, [fp, #-216]
	str	r3, [fp, #-256]
	ldr	r0, [fp, #-224]
	bl	get32
	str	r0, [fp, #-212]
	ldr	r0, [fp, #-224]
	bl	get32
	str	r0, [fp, #-208]
	ldr	r0, [fp, #-224]
	bl	get32
	str	r0, [fp, #-204]
	ldr	r1, [fp, #-224]
	mov	r0, #16777216
	bl	expect32
	ldr	r0, [fp, #-224]
	bl	ftell
	str	r0, [fp, #-200]
	ldr	r3, [fp, #-268]
	add	r3, r3, #1
	str	r3, [fp, #-268]
	mov	r3, #1
	str	r3, [fp, #-248]
	mov	r3, #1
	str	r3, [fp, #-244]
	mov	r3, #0
	str	r3, [fp, #-240]
	mov	r3, #0
	str	r3, [fp, #-236]
	mov	r3, #0
	str	r3, [fp, #-232]
	ldrb	r3, [fp, #-136]	@ zero_extendqisi2
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-272]
	b	.L112
.L125:
	sub	r3, fp, #12
	sub	r4, r3, #264
	ldr	r0, [fp, #-224]
	bl	get16
	mov	r3, r0
	strh	r3, [r4]	@ movhi
	sub	r3, fp, #12
	sub	r4, r3, #260
	sub	r4, r4, #2
	ldr	r0, [fp, #-224]
	bl	get16
	mov	r3, r0
	strh	r3, [r4]	@ movhi
	ldr	r0, [fp, #-224]
	bl	get32
	str	r0, [fp, #-196]
	sub	r3, fp, #12
	sub	r3, r3, #264
	ldrh	r3, [r3]
	cmp	r3, #1
	bne	.L113
	ldr	r3, [fp, #-184]
	cmp	r3, #0
	bne	.L114
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #16
	beq	.L115
.L114:
	ldr	r3, [fp, #-184]
	cmp	r3, #0
	bne	.L116
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #48
	beq	.L115
.L116:
	ldr	r3, [fp, #-248]
	cmp	r3, #0
	beq	.L117
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #16
	beq	.L115
.L117:
	ldr	r3, [fp, #-248]
	cmp	r3, #0
	bne	.L113
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #32
	bne	.L113
.L115:
	mov	r3, #0
	str	r3, [fp, #-248]
	ldr	r3, [fp, #-240]
	add	r3, r3, #1
	str	r3, [fp, #-240]
	ldr	r3, [fp, #-260]
	add	r3, r3, #1
	str	r3, [fp, #-260]
	ldr	r1, [fp, #-224]
	ldr	r0, [fp, #-196]
	bl	seek_past
	b	.L112
.L113:
	sub	r3, fp, #12
	sub	r3, r3, #264
	ldrh	r3, [r3]
	cmp	r3, #0
	bne	.L118
	ldr	r3, [fp, #-244]
	cmp	r3, #0
	beq	.L119
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #3
	beq	.L120
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #1
	beq	.L120
.L119:
	ldr	r3, [fp, #-244]
	cmp	r3, #0
	bne	.L118
	sub	r3, fp, #12
	sub	r3, r3, #260
	sub	r3, r3, #2
	ldrh	r3, [r3]
	cmp	r3, #2
	bne	.L118
.L120:
	ldr	r0, [fp, #-224]
	bl	ftell
	str	r0, [fp, #-192]
	ldr	r0, [fp, #-224]
	bl	get32
	str	r0, [fp, #-188]
	ldrb	r3, [fp, #-136]	@ zero_extendqisi2
	sub	r0, fp, #272
	str	r3, [sp, #4]
	ldr	r3, [fp, #-220]
	str	r3, [sp]
	ldr	r3, [fp, #-224]
	ldr	r2, [fp, #-188]
	ldr	r1, [fp, #-244]
	bl	decode_audio
	ldr	r2, [fp, #-232]
	ldr	r3, [fp, #-188]
	add	r3, r2, r3
	str	r3, [fp, #-232]
	ldr	r3, [fp, #-236]
	add	r3, r3, #1
	str	r3, [fp, #-236]
	ldr	r3, [fp, #-264]
	add	r3, r3, #1
	str	r3, [fp, #-264]
	mov	r3, #0
	str	r3, [fp, #-244]
	ldr	r0, [fp, #-224]
	bl	ftell
	mov	r2, r0
	ldr	r3, [fp, #-192]
	sub	r3, r2, r3
	str	r3, [fp, #-228]
	ldr	r3, [fp, #-228]
	ldr	r2, [fp, #-196]
	cmp	r2, r3
	bcs	.L121
	ldr	r3, .L136+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-196]
	ldr	r2, [fp, #-228]
	ldr	r1, .L136+44
	bl	fprintf
	mov	r0, #1
	bl	exit
.L121:
	ldr	r3, [fp, #-228]
	ldr	r2, [fp, #-196]
	cmp	r2, r3
	bls	.L112
	b	.L123
.L124:
	ldr	r0, [fp, #-224]
	bl	get8
	ldr	r3, [fp, #-228]
	add	r3, r3, #1
	str	r3, [fp, #-228]
.L123:
	ldr	r3, [fp, #-228]
	ldr	r2, [fp, #-196]
	cmp	r2, r3
	bhi	.L124
	b	.L112
.L118:
	ldr	r3, .L136+8
	ldr	r4, [r3]
	ldr	r0, [fp, #-224]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L136+48
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L112:
	ldr	r2, [fp, #-236]
	ldr	r3, [fp, #-208]
	cmp	r2, r3
	bcc	.L125
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-204]
	cmp	r2, r3
	bcc	.L125
	ldr	r2, [fp, #-208]
	ldr	r3, [fp, #-236]
	cmp	r2, r3
	bne	.L126
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-240]
	cmp	r2, r3
	beq	.L127
.L126:
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L136+52
	bl	fwrite
	mov	r0, #1
	bl	exit
.L127:
	ldr	r0, [fp, #-224]
	bl	ftell
	mov	r3, r0
	mov	r1, r3
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-212]
	add	r3, r2, r3
	cmp	r1, r3
	beq	.L128
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L136+56
	bl	fwrite
	mov	r0, #1
	bl	exit
.L128:
	ldr	r3, [fp, #-232]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L111:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-268]
	cmp	r2, r3
	bcc	.L129
	ldr	r3, [fp, #-168]
	ldr	r2, [fp, #-264]
	cmp	r2, r3
	bne	.L130
	ldr	r3, [fp, #-164]
	ldr	r2, [fp, #-260]
	cmp	r2, r3
	beq	.L131
.L130:
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L136+60
	bl	fwrite
	mov	r0, #1
	bl	exit
.L131:
	ldr	r1, [fp, #-252]
	ldr	r0, .L136+64
	bl	printf
	ldr	r1, [fp, #-252]
	ldr	r3, [fp, #-132]
	mov	r2, r3
	ldrb	r3, [fp, #-136]	@ zero_extendqisi2
	sub	r0, fp, #128
	bl	make_wav_header
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-220]
	bl	fseek
	sub	r0, fp, #128
	ldr	r3, [fp, #-220]
	mov	r2, #44
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	cmp	r3, #44
	beq	.L132
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L136+68
	bl	fwrite
	mov	r0, #1
	bl	exit
.L132:
	ldr	r0, [fp, #-220]
	bl	fclose
	mov	r3, r0
	cmn	r3, #1
	bne	.L133
	ldr	r3, .L136+8
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L136+72
	bl	fwrite
	mov	r0, #1
	bl	exit
.L133:
	ldr	r0, .L136+76
	bl	puts
	mov	r3, #0
	ldr	r2, .L136
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L135
	bl	__stack_chk_fail
.L135:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L137:
	.align	2
.L136:
	.word	.LC50
	.word	.LC32
	.word	stderr
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.word	.LC47
	.word	.LC48
	.word	.LC49
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
