	.file	"597307.c"
	.intel_syntax noprefix
	.text
	.globl	file_size
	.type	file_size, @function
file_size:
.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 -24[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	jns	.L2
	mov	eax, -1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	jns	.L4
	mov	eax, -1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -8[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	file_size, .-file_size
	.section	.rodata
.LC0:
	.string	"  ZERO LENGTH"
.LC1:
	.string	"  NEGATIVE LENGTH: %i\n"
.LC2:
	.string	"  |  %s\n"
.LC3:
	.string	"%06x "
.LC4:
	.string	" %02x"
.LC5:
	.string	"   "
	.text
	.globl	hex_dump
	.type	hex_dump, @function
hex_dump:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -40[rbp], rax
	cmp	DWORD PTR -60[rbp], 0
	jne	.L6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L5
.L6:
	cmp	DWORD PTR -60[rbp], 0
	jns	.L8
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L8:
	mov	DWORD PTR -44[rbp], 0
	jmp	.L9
.L15:
	mov	eax, DWORD PTR -44[rbp]
	and	eax, 15
	test	eax, eax
	jne	.L10
	cmp	DWORD PTR -44[rbp], 0
	je	.L11
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 31
	jbe	.L12
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 126
	jbe	.L13
.L12:
	mov	eax, DWORD PTR -44[rbp]
	cdq
	shr	edx, 28
	add	eax, edx
	and	eax, 15
	sub	eax, edx
	cdqe
	mov	BYTE PTR -32[rbp+rax], 46
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	mov	ecx, eax
	sar	ecx, 31
	shr	ecx, 28
	add	eax, ecx
	and	eax, 15
	sub	eax, ecx
	movzx	edx, BYTE PTR [rdx]
	cdqe
	mov	BYTE PTR -32[rbp+rax], dl
.L14:
	mov	eax, DWORD PTR -44[rbp]
	cdq
	shr	edx, 28
	add	eax, edx
	and	eax, 15
	sub	eax, edx
	add	eax, 1
	cdqe
	mov	BYTE PTR -32[rbp+rax], 0
	add	DWORD PTR -44[rbp], 1
.L9:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L15
	jmp	.L16
.L17:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -44[rbp], 1
.L16:
	mov	eax, DWORD PTR -44[rbp]
	and	eax, 15
	test	eax, eax
	jne	.L17
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	hex_dump, .-hex_dump
	.section	.rodata
.LC6:
	.string	"rb"
.LC7:
	.string	"test.wav"
.LC8:
	.string	"File is not exist!"
.LC9:
	.string	"failed to allocate frames\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L21
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L22
.L21:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	file_size
	cdqe
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	jmp	.L22
.L23:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	hex_dump
	mov	eax, 0
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"597307.c"
	.text
	.align	2
	.global	file_size
	.syntax unified
	.arm
	.fpu softvfp
	.type	file_size, %function
file_size:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r0, [fp, #-16]
	bl	ftell
	str	r0, [fp, #-8]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	file_size, .-file_size
	.section	.rodata
	.align	2
.LC0:
	.ascii	"  ZERO LENGTH\000"
	.align	2
.LC1:
	.ascii	"  NEGATIVE LENGTH: %i\012\000"
	.align	2
.LC2:
	.ascii	"  |  %s\012\000"
	.align	2
.LC3:
	.ascii	"%06x \000"
	.align	2
.LC4:
	.ascii	" %02x\000"
	.align	2
.LC5:
	.ascii	"   \000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hex_dump
	.syntax unified
	.arm
	.fpu softvfp
	.type	hex_dump, %function
hex_dump:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L20+4
	bl	puts
	b	.L5
.L6:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L8
	ldr	r1, [fp, #-44]
	ldr	r0, .L20+8
	bl	printf
	b	.L5
.L8:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L9
.L15:
	ldr	r3, [fp, #-36]
	and	r3, r3, #15
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L11
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L20+12
	bl	printf
.L11:
	ldr	r1, [fp, #-36]
	ldr	r0, .L20+16
	bl	printf
.L10:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L20+20
	bl	printf
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #31
	bls	.L12
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #126
	bls	.L13
.L12:
	ldr	r3, [fp, #-36]
	rsbs	r2, r3, #0
	and	r3, r3, #15
	and	r2, r2, #15
	rsbpl	r3, r2, #0
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #46
	strb	r2, [r3, #-24]
	b	.L14
.L13:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	rsbs	r1, r3, #0
	and	r3, r3, #15
	and	r1, r1, #15
	rsbpl	r3, r1, #0
	ldrb	r2, [r2]	@ zero_extendqisi2
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-24]
.L14:
	ldr	r3, [fp, #-36]
	rsbs	r2, r3, #0
	and	r3, r3, #15
	and	r2, r2, #15
	rsbpl	r3, r2, #0
	add	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-24]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L9:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L15
	b	.L16
.L17:
	ldr	r0, .L20+24
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L16:
	ldr	r3, [fp, #-36]
	and	r3, r3, #15
	cmp	r3, #0
	bne	.L17
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L20+12
	bl	printf
.L5:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	hex_dump, .-hex_dump
	.section	.rodata
	.align	2
.LC7:
	.ascii	"rb\000"
	.align	2
.LC8:
	.ascii	"test.wav\000"
	.align	2
.LC9:
	.ascii	"File is not exist!\000"
	.align	2
.LC10:
	.ascii	"failed to allocate frames\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r1, .L26
	ldr	r0, .L26+4
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L23
	ldr	r0, .L26+8
	bl	puts
	mvn	r3, #0
	b	.L24
.L23:
	ldr	r0, [fp, #-16]
	bl	file_size
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L25
	ldr	r3, .L26+12
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L26+16
	bl	fwrite
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	b	.L24
.L25:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	fread
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	hex_dump
	mov	r3, #0
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	stderr
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
