	.file	"505641.c"
	.intel_syntax noprefix
	.text
	.globl	rom
	.bss
	.align 32
	.type	rom, @object
	.size	rom, 1500
rom:
	.zero	1500
	.globl	ram
	.align 32
	.type	ram, @object
	.size	ram, 65536
ram:
	.zero	65536
	.globl	arch
	.align 8
	.type	arch, @object
	.size	arch, 8
arch:
	.zero	8
	.globl	c
	.type	c, @object
	.size	c, 1
c:
	.zero	1
	.globl	x
	.type	x, @object
	.size	x, 1
x:
	.zero	1
	.globl	dir
	.align 4
	.type	dir, @object
	.size	dir, 4
dir:
	.zero	4
	.globl	oldscan
	.align 4
	.type	oldscan, @object
	.size	oldscan, 4
oldscan:
	.zero	4
	.globl	siz
	.align 4
	.type	siz, @object
	.size	siz, 4
siz:
	.zero	4
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	scan
	.align 4
	.type	scan, @object
	.size	scan, 4
scan:
	.zero	4
	.globl	tmp
	.align 8
	.type	tmp, @object
	.size	tmp, 12
tmp:
	.zero	12
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"65C02.bin"
	.align 8
.LC2:
	.string	"\n***Problem opening Opcode List '65C02.bin'!***"
.LC3:
	.string	"test.bin"
.LC4:
	.string	"\n***Problem opening CODE!***"
.LC5:
	.string	"Go!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR arch[rip], rax
	mov	rax, QWORD PTR arch[rip]
	test	rax, rax
	jne	.L2
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR arch[rip]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR arch[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR siz[rip], eax
	mov	rax, QWORD PTR arch[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR arch[rip]
	mov	eax, DWORD PTR siz[rip]
	cdqe
	mov	rcx, rdx
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, rom[rip]
	call	fread@PLT
	mov	DWORD PTR dir[rip], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR arch[rip], rax
	mov	rax, QWORD PTR arch[rip]
	test	rax, rax
	jne	.L4
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR arch[rip]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR arch[rip]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR siz[rip], eax
	mov	rax, QWORD PTR arch[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR arch[rip]
	mov	eax, DWORD PTR siz[rip]
	cdqe
	mov	ecx, DWORD PTR dir[rip]
	movsx	rcx, ecx
	lea	rsi, ram[rip]
	lea	rdi, [rcx+rsi]
	mov	rcx, rdx
	mov	edx, 1
	mov	rsi, rax
	call	fread@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L5:
	call	disassemble
	mov	eax, DWORD PTR dir[rip]
	cdqe
	lea	rdx, ram[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	jne	.L5
	mov	eax, 0
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC6:
	.string	"%04x: "
.LC7:
	.string	"$%02x"
.LC8:
	.string	"$%04x"
.LC9:
	.string	"  [ "
.LC10:
	.string	"%02x "
.LC11:
	.string	"]"
	.text
	.globl	disassemble
	.type	disassemble, @function
disassemble:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR dir[rip]
	cdqe
	lea	rdx, ram[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	DWORD PTR tmp[rip+8], eax
	mov	eax, DWORD PTR dir[rip]
	mov	DWORD PTR oldscan[rip], eax
	mov	eax, DWORD PTR dir[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR count[rip], 0
	mov	DWORD PTR scan[rip], 0
	jmp	.L7
.L9:
	mov	eax, DWORD PTR scan[rip]
	add	eax, 1
	mov	DWORD PTR scan[rip], eax
.L8:
	mov	eax, DWORD PTR scan[rip]
	cdqe
	lea	rdx, rom[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	jns	.L9
	mov	eax, DWORD PTR scan[rip]
	add	eax, 1
	mov	DWORD PTR scan[rip], eax
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
.L7:
	mov	edx, DWORD PTR tmp[rip+8]
	mov	eax, DWORD PTR count[rip]
	cmp	edx, eax
	je	.L10
	mov	eax, DWORD PTR count[rip]
	cmp	eax, 255
	jle	.L8
.L10:
	mov	DWORD PTR siz[rip], 1
.L15:
	mov	eax, DWORD PTR scan[rip]
	cdqe
	lea	rdx, rom[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	and	eax, -128
	mov	BYTE PTR x[rip], al
	mov	eax, DWORD PTR scan[rip]
	cdqe
	lea	rdx, rom[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	and	eax, 127
	mov	BYTE PTR c[rip], al
	movzx	eax, BYTE PTR c[rip]
	movzx	eax, al
	cmp	eax, 38
	je	.L12
	cmp	eax, 64
	jne	.L13
	mov	eax, DWORD PTR dir[rip]
	add	eax, 1
	mov	DWORD PTR dir[rip], eax
	mov	eax, DWORD PTR dir[rip]
	cdqe
	lea	rdx, ram[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR siz[rip], 2
	jmp	.L14
.L12:
	mov	eax, DWORD PTR dir[rip]
	add	eax, 1
	mov	DWORD PTR dir[rip], eax
	mov	eax, DWORD PTR dir[rip]
	cdqe
	lea	rdx, ram[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	ecx, al
	mov	eax, DWORD PTR dir[rip]
	add	eax, 1
	mov	DWORD PTR dir[rip], eax
	mov	eax, DWORD PTR dir[rip]
	cdqe
	lea	rdx, ram[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	sal	eax, 8
	add	eax, ecx
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR siz[rip], 3
	jmp	.L14
.L13:
	movzx	eax, BYTE PTR c[rip]
	movzx	eax, al
	mov	edi, eax
	call	putchar@PLT
.L14:
	mov	eax, DWORD PTR scan[rip]
	add	eax, 1
	mov	DWORD PTR scan[rip], eax
	movzx	eax, BYTE PTR x[rip]
	test	al, al
	je	.L15
	mov	eax, DWORD PTR dir[rip]
	add	eax, 1
	mov	DWORD PTR dir[rip], eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR count[rip], 0
	jmp	.L16
.L17:
	mov	edx, DWORD PTR oldscan[rip]
	mov	eax, DWORD PTR count[rip]
	add	eax, edx
	cdqe
	lea	rdx, ram[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
.L16:
	mov	edx, DWORD PTR count[rip]
	mov	eax, DWORD PTR siz[rip]
	cmp	edx, eax
	jl	.L17
	lea	rdi, .LC11[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	disassemble, .-disassemble
	.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	"505641.c"
	.text
	.comm	rom,1500,4
	.comm	ram,65536,4
	.comm	arch,4,4
	.comm	c,1,1
	.comm	x,1,1
	.comm	dir,4,4
	.comm	oldscan,4,4
	.comm	siz,4,4
	.comm	count,4,4
	.comm	scan,4,4
	.comm	tmp,12,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"65C02.bin\000"
	.align	2
.LC2:
	.ascii	"\012***Problem opening Opcode List '65C02.bin'!***\000"
	.align	2
.LC3:
	.ascii	"test.bin\000"
	.align	2
.LC4:
	.ascii	"\012***Problem opening CODE!***\000"
	.align	2
.LC5:
	.ascii	"Go!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L6
	ldr	r0, .L6+4
	bl	fopen
	mov	r3, r0
	ldr	r2, .L6+8
	str	r3, [r2]
	ldr	r3, .L6+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L6+12
	bl	puts
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r2, #2
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	mov	r3, r0
	ldr	r2, .L6+16
	str	r3, [r2]
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L6+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r0, .L6+20
	bl	fread
	ldr	r3, .L6+24
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L6
	ldr	r0, .L6+28
	bl	fopen
	mov	r3, r0
	ldr	r2, .L6+8
	str	r3, [r2]
	ldr	r3, .L6+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L6+32
	bl	puts
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r2, #2
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	ftell
	mov	r3, r0
	ldr	r2, .L6+16
	str	r3, [r2]
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L6+24
	ldr	r3, [r3]
	ldr	r2, .L6+36
	add	r0, r3, r2
	ldr	r3, .L6+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r2, #1
	bl	fread
	ldr	r0, .L6+40
	bl	puts
.L5:
	bl	disassemble
	ldr	r3, .L6+24
	ldr	r3, [r3]
	ldr	r2, .L6+36
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L5
	mov	r3, #0
.L3:
	mov	r0, r3
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	arch
	.word	.LC2
	.word	siz
	.word	rom
	.word	dir
	.word	.LC3
	.word	.LC4
	.word	ram
	.word	.LC5
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"%04x: \000"
	.align	2
.LC7:
	.ascii	"$%02x\000"
	.align	2
.LC8:
	.ascii	"$%04x\000"
	.align	2
.LC9:
	.ascii	"  [ \000"
	.align	2
.LC10:
	.ascii	"%02x \000"
	.align	2
.LC11:
	.ascii	"]\000"
	.text
	.align	2
	.global	disassemble
	.syntax unified
	.arm
	.fpu softvfp
	.type	disassemble, %function
disassemble:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, .L20+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L20+8
	str	r2, [r3, #8]
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, .L20+12
	str	r3, [r2]
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L20+16
	bl	printf
	ldr	r3, .L20+20
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L20+24
	mov	r2, #0
	str	r2, [r3]
	b	.L9
.L11:
	ldr	r3, .L20+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+24
	str	r3, [r2]
.L10:
	ldr	r3, .L20+24
	ldr	r3, [r3]
	ldr	r2, .L20+28
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	cmp	r3, #0
	bge	.L11
	ldr	r3, .L20+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+24
	str	r3, [r2]
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
.L9:
	ldr	r3, .L20+8
	ldr	r2, [r3, #8]
	ldr	r3, .L20+20
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L12
	ldr	r3, .L20+20
	ldr	r3, [r3]
	cmp	r3, #255
	ble	.L10
.L12:
	ldr	r3, .L20+32
	mov	r2, #1
	str	r2, [r3]
.L17:
	ldr	r3, .L20+24
	ldr	r3, [r3]
	ldr	r2, .L20+28
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	bic	r3, r3, #127
	and	r2, r3, #255
	ldr	r3, .L20+36
	strb	r2, [r3]
	ldr	r3, .L20+24
	ldr	r3, [r3]
	ldr	r2, .L20+28
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	and	r3, r3, #127
	and	r2, r3, #255
	ldr	r3, .L20+40
	strb	r2, [r3]
	ldr	r3, .L20+40
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #38
	beq	.L14
	cmp	r3, #64
	bne	.L15
	ldr	r3, .L20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20
	str	r3, [r2]
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, .L20+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L20+44
	bl	printf
	ldr	r3, .L20+32
	mov	r2, #2
	str	r2, [r3]
	b	.L16
.L14:
	ldr	r3, .L20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20
	str	r3, [r2]
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, .L20+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20
	str	r3, [r2]
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, .L20+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L20+48
	bl	printf
	ldr	r3, .L20+32
	mov	r2, #3
	str	r2, [r3]
	b	.L16
.L15:
	ldr	r3, .L20+40
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
.L16:
	ldr	r3, .L20+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+24
	str	r3, [r2]
	ldr	r3, .L20+36
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L17
	ldr	r3, .L20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20
	str	r3, [r2]
	ldr	r0, .L20+52
	bl	printf
	ldr	r3, .L20+20
	mov	r2, #0
	str	r2, [r3]
	b	.L18
.L19:
	ldr	r3, .L20+12
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L20+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L20+56
	bl	printf
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
.L18:
	ldr	r3, .L20+20
	ldr	r2, [r3]
	ldr	r3, .L20+32
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L19
	ldr	r0, .L20+60
	bl	puts
	nop
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	dir
	.word	ram
	.word	tmp
	.word	oldscan
	.word	.LC6
	.word	count
	.word	scan
	.word	rom
	.word	siz
	.word	x
	.word	c
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	disassemble, .-disassemble
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
