	.file	"420647.c"
	.intel_syntax noprefix
	.text
	.type	fatal, @function
fatal:
.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, 224
	mov	QWORD PTR -216[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	fatal, .-fatal
	.section	.rodata
.LC0:
	.string	"strdup: %s"
	.text
	.type	xstrdup, @function
xstrdup:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	fatal
.L5:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	xstrdup, .-xstrdup
	.section	.rodata
.LC1:
	.string	"asprintf: %s"
	.text
	.type	xasprintf, @function
xasprintf:
.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, 240
	mov	QWORD PTR -232[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L8
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L8:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -232[rbp]
	lea	rax, -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vasprintf@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	fatal
.L9:
	mov	rax, QWORD PTR -216[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	xasprintf, .-xasprintf
	.section	.rodata
	.align 8
.LC2:
	.string	"usage: in.(s3m|it|xm|mod) [output.wav]"
	.text
	.type	usage, @function
usage:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	fatal
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	usage, .-usage
	.section	.rodata
.LC3:
	.string	".wav"
.LC4:
	.string	"%s.wav"
.LC5:
	.string	"file=%s"
.LC6:
	.string	"failed to init sound: %s"
.LC7:
	.string	"failed to load file: %s"
.LC8:
	.string	"converting %s to %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 1
	jg	.L14
	call	usage
.L14:
	cmp	DWORD PTR -36[rbp], 2
	jle	.L15
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	xstrdup
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 46
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L17
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L17
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
.L17:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	xasprintf
	mov	QWORD PTR -32[rbp], rax
.L16:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	xasprintf
	mov	QWORD PTR -16[rbp], rax
	lea	rdi, drv_wav[rip]
	call	MikMod_RegisterDriver@PLT
	call	MikMod_RegisterAllLoaders@PLT
	mov	WORD PTR md_device[rip], 1
	movzx	eax, WORD PTR md_mode[rip]
	or	eax, 8
	mov	WORD PTR md_mode[rip], ax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	MikMod_Init@PLT
	test	eax, eax
	je	.L18
	mov	eax, DWORD PTR MikMod_errno[rip]
	mov	edi, eax
	call	MikMod_strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	fatal
.L18:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 64
	mov	rdi, rax
	call	Player_Load@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L19
	mov	eax, DWORD PTR MikMod_errno[rip]
	mov	edi, eax
	call	MikMod_strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	fatal
.L19:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Player_Start@PLT
	jmp	.L20
.L21:
	mov	edi, 10000
	call	usleep@PLT
	call	MikMod_Update@PLT
.L20:
	call	Player_Active@PLT
	test	eax, eax
	jne	.L21
	call	Player_Stop@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Player_Free@PLT
	call	MikMod_Exit@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"420647.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fatal, %function
fatal:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, [fp, #4]
	str	r3, [fp, #-16]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-12]
	ldr	r3, .L3+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	vfprintf
	ldr	r3, .L3+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	stderr
	.size	fatal, .-fatal
	.section	.rodata
	.align	2
.LC1:
	.ascii	"strdup: %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xstrdup, %function
xstrdup:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L6
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L8
	bl	fatal
.L6:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC1
	.size	xstrdup, .-xstrdup
	.section	.rodata
	.align	2
.LC2:
	.ascii	"asprintf: %s\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xasprintf, %function
xasprintf:
	@ args = 4, pretend = 16, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, [fp, #4]
	str	r3, [fp, #-24]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-20]
	sub	r3, fp, #16
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	vasprintf
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+4
	bl	fatal
.L11:
	ldr	r3, [fp, #-16]
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L15:
	.align	2
.L14:
	.word	.LC3
	.word	.LC2
	.size	xasprintf, .-xasprintf
	.section	.rodata
	.align	2
.LC4:
	.ascii	"usage: in.(s3m|it|xm|mod) [output.wav]\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L17
	bl	fatal
	nop
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC4
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC5:
	.ascii	".wav\000"
	.align	2
.LC6:
	.ascii	"%s.wav\000"
	.align	2
.LC7:
	.ascii	"file=%s\000"
	.align	2
.LC8:
	.ascii	"failed to init sound: %s\000"
	.align	2
.LC9:
	.ascii	"failed to load file: %s\000"
	.align	2
.LC10:
	.ascii	"converting %s to %s\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	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L20
	bl	usage
.L20:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	ble	.L21
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	b	.L22
.L21:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	xstrdup
	str	r0, [fp, #-20]
	mov	r1, #46
	ldr	r0, [fp, #-20]
	bl	strrchr
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L23
	ldr	r1, .L29
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
.L23:
	ldr	r1, [fp, #-20]
	ldr	r0, .L29+4
	bl	xasprintf
	str	r0, [fp, #-20]
.L22:
	ldr	r1, [fp, #-20]
	ldr	r0, .L29+8
	bl	xasprintf
	str	r0, [fp, #-12]
	ldr	r0, .L29+12
	bl	MikMod_RegisterDriver
	bl	MikMod_RegisterAllLoaders
	ldr	r3, .L29+16
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	ldr	r3, .L29+20
	ldrh	r3, [r3]
	orr	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, .L29+20
	strh	r3, [r2]	@ movhi
	ldr	r0, [fp, #-12]
	bl	MikMod_Init
	mov	r3, r0
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L29+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	MikMod_strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L29+28
	bl	fatal
.L24:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #64
	mov	r0, r3
	bl	Player_Load
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L25
	ldr	r3, .L29+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	MikMod_strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L29+32
	bl	fatal
.L25:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, .L29+36
	bl	printf
	ldr	r0, [fp, #-8]
	bl	Player_Start
	b	.L26
.L27:
	ldr	r0, .L29+40
	bl	usleep
	bl	MikMod_Update
.L26:
	bl	Player_Active
	mov	r3, r0
	cmp	r3, #0
	bne	.L27
	bl	Player_Stop
	ldr	r0, [fp, #-8]
	bl	Player_Free
	bl	MikMod_Exit
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	drv_wav
	.word	md_device
	.word	md_mode
	.word	MikMod_errno
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	10000
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
