	.file	"672987.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/uio0"
	.text
	.globl	ram_open
	.type	ram_open, @function
ram_open:
.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, 16
	mov	DWORD PTR -4[rbp], -1
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ram_open, .-ram_open
	.section	.rodata
.LC1:
	.string	"/dev/uio1"
	.text
	.globl	pl2ps_open
	.type	pl2ps_open, @function
pl2ps_open:
.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, 16
	mov	DWORD PTR -4[rbp], -1
	mov	esi, 2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pl2ps_open, .-pl2ps_open
	.section	.rodata
.LC2:
	.string	"/dev/uio2"
	.text
	.globl	ps2pl_open
	.type	ps2pl_open, @function
ps2pl_open:
.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, 16
	mov	DWORD PTR -4[rbp], -1
	mov	esi, 2
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ps2pl_open, .-ps2pl_open
	.section	.rodata
.LC3:
	.string	"-h"
.LC4:
	.string	"--help"
	.align 8
.LC5:
	.string	"usage: loader <path of code.hex> <byte size of code.hex>"
.LC6:
	.string	"Invalid code.hex size of %c\n"
.LC7:
	.string	"r"
.LC8:
	.string	"code.hex open error"
.LC9:
	.string	"code.hex size mismatch"
.LC10:
	.string	"load finish, %d\n"
.LC11:
	.string	"Failed to open ram"
.LC12:
	.string	"Failed to mmap ram"
.LC13:
	.string	"Failed to open pl2ps"
.LC14:
	.string	"Failed to mmap pl2ps"
.LC15:
	.string	"Failed to open ps2pl"
.LC16:
	.string	"Failed to mmap ps2pl"
.LC17:
	.string	"%08x, %d, %d, %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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, 216
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -244[rbp], edi
	mov	QWORD PTR -256[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 -244[rbp], 2
	jne	.L8
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, .LC3[rip]
	cmp	rax, rdx
	je	.L9
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, .LC4[rip]
	cmp	rax, rdx
	jne	.L8
.L9:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L10
.L8:
	cmp	DWORD PTR -244[rbp], 3
	je	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -208[rbp], eax
	cmp	DWORD PTR -208[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -208[rbp]
	lea	edx, 15[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 4
	mov	DWORD PTR -204[rbp], eax
	mov	eax, DWORD PTR -208[rbp]
	add	eax, eax
	mov	DWORD PTR -200[rbp], eax
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L13
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -200[rbp]
	add	eax, 3
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -160[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L14:
	cmp	rsp, rdx
	je	.L15
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L14
.L15:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L16
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L16:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -152[rbp], rax
	mov	DWORD PTR -224[rbp], 0
	mov	DWORD PTR -228[rbp], 0
.L22:
	mov	rdx, QWORD PTR -168[rbp]
	lea	rax, -96[rbp]
	mov	esi, 35
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L17
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, -1
	jmp	.L10
.L17:
	mov	DWORD PTR -228[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -224[rbp]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -228[rbp]
	lea	esi, [rdx+rax]
	mov	eax, DWORD PTR -228[rbp]
	cdqe
	movzx	ecx, BYTE PTR -96[rbp+rax]
	mov	rdx, QWORD PTR -152[rbp]
	movsx	rax, esi
	mov	BYTE PTR [rdx+rax], cl
	add	DWORD PTR -228[rbp], 1
.L18:
	cmp	DWORD PTR -228[rbp], 31
	jle	.L19
	add	DWORD PTR -224[rbp], 1
	mov	eax, DWORD PTR -224[rbp]
	cmp	eax, DWORD PTR -204[rbp]
	jge	.L45
	jmp	.L22
.L45:
	nop
	mov	eax, DWORD PTR -224[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	call	ram_open
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	jns	.L23
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -2
	jmp	.L10
.L23:
	mov	eax, DWORD PTR -196[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 268435456
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], -1
	jne	.L24
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L10
.L24:
	mov	eax, 0
	call	pl2ps_open
	mov	DWORD PTR -192[rbp], eax
	cmp	DWORD PTR -192[rbp], 0
	jns	.L25
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -2
	jmp	.L10
.L25:
	mov	eax, DWORD PTR -192[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], -1
	jne	.L26
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L10
.L26:
	mov	eax, 0
	call	ps2pl_open
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -192[rbp], 0
	jns	.L27
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -2
	jmp	.L10
.L27:
	mov	eax, DWORD PTR -188[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], -1
	jne	.L28
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -188[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L10
.L28:
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 24
	mov	DWORD PTR [rax], 0
	mov	BYTE PTR -106[rbp], 48
	mov	BYTE PTR -105[rbp], 120
	mov	DWORD PTR -224[rbp], 2
	mov	DWORD PTR -228[rbp], 0
	mov	DWORD PTR -220[rbp], 3
	mov	DWORD PTR -184[rbp], 0
	mov	DWORD PTR -216[rbp], 0
	mov	DWORD PTR -212[rbp], 0
	mov	DWORD PTR -212[rbp], 0
	jmp	.L29
.L30:
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -212[rbp], 1
.L29:
	cmp	DWORD PTR -212[rbp], 67108863
	jle	.L30
.L36:
	mov	eax, DWORD PTR -228[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	je	.L46
	mov	rdx, QWORD PTR -152[rbp]
	mov	eax, DWORD PTR -228[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR -229[rbp], al
	add	DWORD PTR -228[rbp], 1
	mov	eax, DWORD PTR -224[rbp]
	cdqe
	movzx	edx, BYTE PTR -229[rbp]
	mov	BYTE PTR -106[rbp+rax], dl
	cmp	DWORD PTR -224[rbp], 9
	jne	.L33
	mov	DWORD PTR -224[rbp], 2
	lea	rcx, -176[rbp]
	lea	rax, -106[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	edx, DWORD PTR -216[rbp]
	mov	eax, DWORD PTR -220[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -120[rbp]
	mov	DWORD PTR [rax], edx
	cmp	DWORD PTR -220[rbp], 0
	jne	.L34
	mov	DWORD PTR -220[rbp], 3
	add	DWORD PTR -216[rbp], 4
	jmp	.L36
.L34:
	sub	DWORD PTR -220[rbp], 1
	jmp	.L36
.L33:
	add	DWORD PTR -224[rbp], 1
	jmp	.L36
.L46:
	nop
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 24
	mov	DWORD PTR [rax], 1
	mov	DWORD PTR -212[rbp], 0
	mov	DWORD PTR -180[rbp], 0
.L40:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	je	.L37
	mov	rax, QWORD PTR -136[rbp]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
.L37:
	cmp	DWORD PTR -212[rbp], 10000000
	jne	.L38
	mov	DWORD PTR -212[rbp], 0
	mov	rax, QWORD PTR -136[rbp]
	add	rax, 8
	mov	esi, DWORD PTR [rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, 20
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, 16
	mov	eax, DWORD PTR [rax]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L40
.L38:
	add	DWORD PTR -212[rbp], 1
	jmp	.L40
.L10:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"672987.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/uio0\000"
	.text
	.align	2
	.global	ram_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	ram_open, %function
ram_open:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mvn	r3, #0
	str	r3, [fp, #-8]
	mov	r1, #2
	ldr	r0, .L3
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	ram_open, .-ram_open
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/dev/uio1\000"
	.text
	.align	2
	.global	pl2ps_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	pl2ps_open, %function
pl2ps_open:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mvn	r3, #0
	str	r3, [fp, #-8]
	mov	r1, #2
	ldr	r0, .L7
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	pl2ps_open, .-pl2ps_open
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/dev/uio2\000"
	.text
	.align	2
	.global	ps2pl_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	ps2pl_open, %function
ps2pl_open:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mvn	r3, #0
	str	r3, [fp, #-8]
	mov	r1, #2
	ldr	r0, .L11
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC2
	.size	ps2pl_open, .-ps2pl_open
	.section	.rodata
	.align	2
.LC3:
	.ascii	"-h\000"
	.align	2
.LC4:
	.ascii	"--help\000"
	.align	2
.LC5:
	.ascii	"usage: loader <path of code.hex> <byte size of code"
	.ascii	".hex>\000"
	.align	2
.LC6:
	.ascii	"Invalid code.hex size of %c\012\000"
	.align	2
.LC7:
	.ascii	"r\000"
	.align	2
.LC8:
	.ascii	"code.hex open error\000"
	.align	2
.LC9:
	.ascii	"code.hex size mismatch\000"
	.align	2
.LC10:
	.ascii	"load finish, %d\012\000"
	.align	2
.LC11:
	.ascii	"Failed to open ram\000"
	.align	2
.LC12:
	.ascii	"Failed to mmap ram\000"
	.align	2
.LC13:
	.ascii	"Failed to open pl2ps\000"
	.align	2
.LC14:
	.ascii	"Failed to mmap pl2ps\000"
	.align	2
.LC15:
	.ascii	"Failed to open ps2pl\000"
	.align	2
.LC16:
	.ascii	"Failed to mmap ps2pl\000"
	.align	2
.LC17:
	.ascii	"%08x, %d, %d, %d\012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #156
	str	r0, [fp, #-152]
	str	r1, [fp, #-156]
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-152]
	cmp	r3, #2
	bne	.L14
	ldr	r3, [fp, #-156]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L50+4
	cmp	r3, r2
	beq	.L15
	ldr	r3, [fp, #-156]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L50+8
	cmp	r3, r2
	bne	.L14
.L15:
	ldr	r0, .L50+12
	bl	puts
	mov	r3, #0
	b	.L16
.L14:
	ldr	r3, [fp, #-152]
	cmp	r3, #3
	beq	.L17
	ldr	r0, .L50+12
	bl	puts
	mvn	r3, #0
	b	.L16
.L17:
	ldr	r3, [fp, #-156]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-156]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L50+16
	bl	printf
	mvn	r3, #0
	b	.L16
.L18:
	ldr	r3, [fp, #-120]
	add	r2, r3, #15
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #4
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #1
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-156]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L50+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L50+24
	bl	puts
	mvn	r3, #0
	b	.L16
.L19:
	ldr	r3, [fp, #-112]
	add	ip, r3, #3
	sub	r3, ip, #1
	str	r3, [fp, #-104]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #0
	str	r3, [fp, #-100]
	mov	r3, #0
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-140]
.L25:
	sub	r3, fp, #48
	ldr	r2, [fp, #-108]
	mov	r1, #35
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	ldr	r0, .L50+28
	bl	puts
	ldr	r0, [fp, #-108]
	bl	fclose
	mvn	r3, #0
	b	.L16
.L20:
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L21
.L22:
	ldr	r3, [fp, #-136]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	sub	r1, fp, #48
	ldr	r2, [fp, #-140]
	add	r2, r1, r2
	ldrb	r1, [r2]	@ zero_extendqisi2
	ldr	r2, [fp, #-100]
	strb	r1, [r2, r3]
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L21:
	ldr	r3, [fp, #-140]
	cmp	r3, #31
	ble	.L22
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	bge	.L48
	b	.L25
.L48:
	nop
	ldr	r1, [fp, #-136]
	ldr	r0, .L50+32
	bl	printf
	ldr	r0, [fp, #-108]
	bl	fclose
	bl	ram_open
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bge	.L26
	ldr	r0, .L50+36
	bl	printf
	mvn	r3, #1
	b	.L16
.L26:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-96]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #268435456
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	bne	.L27
	ldr	r0, .L50+40
	bl	printf
	ldr	r0, [fp, #-96]
	bl	close
	mvn	r3, #0
	b	.L16
.L27:
	bl	pl2ps_open
	str	r0, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bge	.L28
	ldr	r0, .L50+44
	bl	printf
	mvn	r3, #1
	b	.L16
.L28:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-88]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmn	r3, #1
	bne	.L29
	ldr	r0, .L50+48
	bl	printf
	ldr	r0, [fp, #-88]
	bl	close
	mvn	r3, #0
	b	.L16
.L29:
	bl	ps2pl_open
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bge	.L30
	ldr	r0, .L50+52
	bl	printf
	mvn	r3, #1
	b	.L16
.L30:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmn	r3, #1
	bne	.L31
	ldr	r0, .L50+56
	bl	printf
	ldr	r0, [fp, #-80]
	bl	close
	mvn	r3, #0
	b	.L16
.L31:
	ldr	r3, [fp, #-76]
	add	r3, r3, #24
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #48
	strb	r3, [fp, #-60]
	mov	r3, #120
	strb	r3, [fp, #-59]
	mov	r3, #2
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-140]
	mov	r3, #3
	str	r3, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-128]
	mov	r3, #0
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L32
.L33:
	ldr	r3, [fp, #-124]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L32:
	ldr	r3, [fp, #-124]
	cmn	r3, #-67108863
	ble	.L33
.L39:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	beq	.L49
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-145]
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
	sub	r2, fp, #60
	ldr	r3, [fp, #-136]
	add	r3, r2, r3
	ldrb	r2, [fp, #-145]
	strb	r2, [r3]
	ldr	r3, [fp, #-136]
	cmp	r3, #9
	bne	.L36
	mov	r3, #2
	str	r3, [fp, #-136]
	sub	r1, fp, #144
	sub	r3, fp, #60
	mov	r2, #16
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-68]
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, [fp, #-68]
	str	r2, [r3]
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L37
	mov	r3, #3
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-128]
	add	r3, r3, #4
	str	r3, [fp, #-128]
	b	.L39
.L37:
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	str	r3, [fp, #-132]
	b	.L39
.L36:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
	b	.L39
.L49:
	nop
	ldr	r3, [fp, #-76]
	add	r3, r3, #24
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-64]
.L43:
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L40
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	putchar
.L40:
	ldr	r3, [fp, #-124]
	ldr	r2, .L50+60
	cmp	r3, r2
	bne	.L41
	mov	r3, #0
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-84]
	add	r3, r3, #16
	ldr	r1, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r3, #20
	ldr	r2, [r3]
	ldr	r3, [fp, #-84]
	ldr	r0, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r3, #8
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L50+64
	bl	printf
	b	.L43
.L41:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
	b	.L43
.L16:
	mov	sp, r4
	ldr	r2, .L50
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L45
	bl	__stack_chk_fail
.L45:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC18
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	10000000
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
