	.file	"494832.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: raw2gba input.raw\n"
.LC1:
	.string	"r"
	.align 8
.LC2:
	.string	"Error: could not open %s for reading.\n"
.LC3:
	.string	"%s.h"
.LC4:
	.string	"w"
	.align 8
.LC5:
	.string	"/* %s\n * generated by raw2gba */\n\n"
.LC6:
	.string	"#define %s_bytes %d\n\n"
	.align 8
.LC7:
	.string	"const signed char %s [] = {\n    "
.LC8:
	.string	"(signed char) 0x%02X"
.LC9:
	.string	", "
.LC10:
	.string	"\n    "
.LC11:
	.string	"\n};\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 136
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	cmp	DWORD PTR -132[rbp], 2
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -112[rbp], rax
	cmp	QWORD PTR -112[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -116[rbp], eax
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -104[rbp], rax
	mov	eax, DWORD PTR -116[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -96[rbp], rdx
	mov	QWORD PTR -160[rbp], rax
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -176[rbp], rax
	mov	QWORD PTR -168[rbp], 0
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L5:
	cmp	rsp, rdx
	je	.L6
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L5
.L6:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L7
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L7:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	BYTE PTR [rax+rdx], 0
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 3
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -80[rbp], rdx
	mov	r14, rax
	mov	r15d, 0
	mov	r12, rax
	mov	r13d, 0
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L8:
	cmp	rsp, rdx
	je	.L9
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L8
.L9:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L10
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L10:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -72[rbp], rax
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L3
.L11:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	ecx, DWORD PTR -116[rbp]
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -124[rbp], 1
	mov	rax, QWORD PTR -104[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	movzx	edx, al
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -120[rbp], 1
	jmp	.L12
.L14:
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	cmp	DWORD PTR -124[rbp], 11
	jle	.L13
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, rax
	mov	edx, 5
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	DWORD PTR -124[rbp], 0
.L13:
	add	DWORD PTR -124[rbp], 1
	mov	eax, DWORD PTR -120[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	movzx	edx, al
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -120[rbp], 1
.L12:
	mov	eax, DWORD PTR -120[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L14
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, rax
	mov	edx, 5
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L3:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"494832.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: raw2gba input.raw\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Error: could not open %s for reading.\012\000"
	.align	2
.LC3:
	.ascii	"%s.h\000"
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.ascii	"/* %s\012 * generated by raw2gba */\012\012\000"
	.align	2
.LC6:
	.ascii	"#define %s_bytes %d\012\012\000"
	.align	2
.LC7:
	.ascii	"const signed char %s [] = {\012    \000"
	.align	2
.LC8:
	.ascii	"(signed char) 0x%02X\000"
	.align	2
.LC9:
	.ascii	", \000"
	.align	2
.LC10:
	.ascii	"\012    \000"
	.align	2
.LC11:
	.ascii	"\012};\012\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L11+8
	bl	fwrite
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L11+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+16
	bl	fprintf
	mvn	r3, #0
	b	.L3
.L4:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-48]
	bl	fseek
	ldr	r0, [fp, #-48]
	bl	ftell
	str	r0, [fp, #-44]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-48]
	bl	fseek
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r1, [fp, #-44]
	ldr	r3, [fp, #-48]
	mov	r2, #1
	ldr	r0, [fp, #-40]
	bl	fread
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	ip, r3, #1
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	add	r3, ip, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	strcpy
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #4
	ldr	r2, [fp, #-32]
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r3, r0
	add	ip, r3, #3
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	add	r3, ip, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-32]
	ldr	r1, .L11+20
	ldr	r0, [fp, #-24]
	bl	sprintf
	ldr	r1, .L11+24
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L11+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L11+16
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L3
.L5:
	ldr	r2, [fp, #-24]
	ldr	r1, .L11+28
	ldr	r0, [fp, #-20]
	bl	fprintf
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-32]
	ldr	r1, .L11+32
	ldr	r0, [fp, #-20]
	bl	fprintf
	ldr	r2, [fp, #-32]
	ldr	r1, .L11+36
	ldr	r0, [fp, #-20]
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-40]
	ldrsb	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, .L11+40
	ldr	r0, [fp, #-20]
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-52]
	b	.L6
.L8:
	ldr	r3, [fp, #-20]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L11+44
	bl	fwrite
	ldr	r3, [fp, #-56]
	cmp	r3, #11
	ble	.L7
	ldr	r3, [fp, #-20]
	mov	r2, #5
	mov	r1, #1
	ldr	r0, .L11+48
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-56]
.L7:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, .L11+40
	ldr	r0, [fp, #-20]
	bl	fprintf
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L6:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-20]
	mov	r2, #5
	mov	r1, #1
	ldr	r0, .L11+52
	bl	fwrite
	ldr	r0, [fp, #-40]
	bl	free
	ldr	r0, [fp, #-48]
	bl	fclose
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, #0
.L3:
	mov	sp, r4
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC12
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
