	.file	"458163.c"
	.intel_syntax noprefix
	.text
	.globl	baseFile
	.bss
	.align 8
	.type	baseFile, @object
	.size	baseFile, 8
baseFile:
	.zero	8
	.globl	newFile
	.align 8
	.type	newFile, @object
	.size	newFile, 8
newFile:
	.zero	8
	.globl	driverFile
	.align 8
	.type	driverFile, @object
	.size	driverFile, 8
driverFile:
	.zero	8
	.globl	mapperFile
	.align 8
	.type	mapperFile, @object
	.size	mapperFile, 8
mapperFile:
	.zero	8
	.globl	extraFile
	.align 8
	.type	extraFile, @object
	.size	extraFile, 8
extraFile:
	.zero	8
	.globl	baseBankCount
	.align 4
	.type	baseBankCount, @object
	.size	baseBankCount, 4
baseBankCount:
	.zero	4
	.section	.rodata
.LC0:
	.string	"NEXTOR_DRIVER"
.LC1:
	.string	"\r"
.LC2:
	.string	"%4x"
	.align 8
.LC3:
	.string	"*** Invalid value for the /8 parameter, must be a hexadecimal address in the range 4000-7FFF"
.LC4:
	.string	"rb"
	.align 8
.LC5:
	.string	"*** Can't open base file: %s\r\n"
	.align 8
.LC6:
	.string	"*** The base file has not the expected length. Expected either %iK (for base file without driver) or >=%iK (for file with driver).\r\n"
	.align 8
.LC7:
	.string	"*** A driver file has been specified, but the base file appears to have a driver already.\r"
	.align 8
.LC8:
	.string	"*** No driver file has been specified, but the base file does not have driver.\r"
	.align 8
.LC9:
	.string	"*** Can't read the mapper code from the base file\r"
	.align 8
.LC10:
	.string	"*** Can't open mapper code file: %s\r\n"
	.align 8
.LC11:
	.string	"*** The mapper code file has not the expected size (%i bytes, or %i bytes if it has a header)\r\n"
	.align 8
.LC12:
	.string	"*** Can't read the mapper code file: %s\r\n"
	.align 8
.LC13:
	.string	"*** Can't open extra code file: %s\r\n"
	.align 8
.LC14:
	.string	"*** The extra code file is too big, maximum allowed size is %i bytes\r\n"
	.align 8
.LC15:
	.string	"*** Can't read the extra code file: %s"
	.align 8
.LC16:
	.string	"*** Can't open driver file: %s\r\n"
	.align 8
.LC17:
	.string	"*** The driver file is too small"
	.align 8
.LC18:
	.string	"*** The driver file is invalid. Driver signature not found at position %i."
.LC19:
	.string	"wb+"
	.align 8
.LC20:
	.string	"*** Can't create the ROM file: %s\r\n"
	.align 8
.LC21:
	.string	"*** Can't write to the ROM file: %s\r\n"
	.align 8
.LC22:
	.string	"*** Can't append the driver to the ROM file: %s\r\n"
	.align 8
.LC23:
	.string	"*** Can't read page 0 data from the ROM file: %s\r\n"
	.align 8
.LC24:
	.string	"*** Can't write page 0 data to the ROM file: %s\r\n"
	.align 8
.LC25:
	.string	"*** Can't write the bank number (%i) to the ROM file: %s\r\n"
	.align 8
.LC26:
	.string	"*** Can't write mapper code to the ROM file: %s\r\n"
	.align 8
.LC27:
	.string	"*** Can't write patch for 8K mapper initialization to the ROM file: %s\r\n"
	.align 8
.LC28:
	.string	"*** Can't write mapper code to the initialization block on the ROM file: %s\r\n"
	.align 8
.LC29:
	.string	"*** Can't write extra code (DOS 2 segment) to the ROM file: %s\r\n"
	.align 8
.LC30:
	.string	"*** Can't write extra code (DOS 1 segment) to the ROM file: %s\r\n"
	.align 8
.LC31:
	.string	"ROM file %s created successfully."
	.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
	lea	r11, -16384[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 208
	mov	DWORD PTR -16580[rbp], edi
	mov	QWORD PTR -16592[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16560[rbp], 0
	mov	QWORD PTR -16488[rbp], 0
	mov	QWORD PTR -16480[rbp], 0
	mov	QWORD PTR -16528[rbp], 0
	mov	QWORD PTR -16520[rbp], 0
	mov	QWORD PTR -16512[rbp], 0
	mov	QWORD PTR -16504[rbp], 0
	lea	rax, .LC0[rip]
	mov	QWORD PTR -16472[rbp], rax
	mov	rax, QWORD PTR -16472[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -16548[rbp], eax
	lea	rax, -64[rbp]
	mov	QWORD PTR -16496[rbp], rax
	lea	rdi, .LC1[rip]
	call	puts@PLT
	cmp	DWORD PTR -16580[rbp], 3
	jg	.L2
	mov	eax, 0
	call	DisplayInfo
	mov	edi, 0
	call	DoExit
.L2:
	mov	rax, QWORD PTR -16592[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16488[rbp], rax
	mov	rax, QWORD PTR -16592[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16480[rbp], rax
	mov	DWORD PTR -16552[rbp], 3
	jmp	.L3
.L9:
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 100
	mov	rdi, rax
	call	IsParam
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 3
	mov	QWORD PTR -16528[rbp], rax
	jmp	.L5
.L4:
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 109
	mov	rdi, rax
	call	IsParam
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 3
	mov	QWORD PTR -16520[rbp], rax
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 101
	mov	rdi, rax
	call	IsParam
	test	eax, eax
	je	.L7
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 3
	mov	QWORD PTR -16512[rbp], rax
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 56
	mov	rdi, rax
	call	IsParam
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR -16552[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16592[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 3
	mov	QWORD PTR -16504[rbp], rax
	jmp	.L5
.L8:
	mov	eax, 0
	call	DisplayInfo
	mov	edi, 0
	call	DoExit
.L5:
	add	DWORD PTR -16552[rbp], 1
.L3:
	mov	eax, DWORD PTR -16552[rbp]
	cmp	eax, DWORD PTR -16580[rbp]
	jl	.L9
	cmp	QWORD PTR -16504[rbp], 0
	je	.L10
	lea	rdx, -16560[rbp]
	mov	rax, QWORD PTR -16504[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -16560[rbp]
	cmp	eax, 16383
	jle	.L11
	mov	eax, DWORD PTR -16560[rbp]
	cmp	eax, 32767
	jle	.L10
.L11:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L10:
	mov	rax, QWORD PTR -16488[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR baseFile[rip], rax
	mov	rax, QWORD PTR baseFile[rip]
	test	rax, rax
	jne	.L12
	mov	rax, QWORD PTR -16488[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L12:
	mov	rax, QWORD PTR baseFile[rip]
	mov	edx, 0
	mov	esi, 254
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR baseBankCount[rip], 0
	mov	rax, QWORD PTR baseFile[rip]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 1
	lea	rdi, baseBankCount[rip]
	call	fread@PLT
	mov	rax, QWORD PTR baseFile[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR baseFile[rip]
	mov	rdi, rax
	call	GetFileSize
	mov	DWORD PTR -16544[rbp], eax
	mov	eax, DWORD PTR baseBankCount[rip]
	sal	eax, 14
	cmp	DWORD PTR -16544[rbp], eax
	jne	.L13
	mov	DWORD PTR -16556[rbp], 0
	jmp	.L14
.L13:
	mov	eax, DWORD PTR baseBankCount[rip]
	add	eax, 1
	sal	eax, 14
	cmp	DWORD PTR -16544[rbp], eax
	jl	.L15
	mov	DWORD PTR -16556[rbp], 1
	jmp	.L14
.L15:
	mov	eax, DWORD PTR baseBankCount[rip]
	add	eax, 1
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR baseBankCount[rip]
	sal	eax, 4
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L14:
	cmp	QWORD PTR -16528[rbp], 0
	je	.L16
	cmp	DWORD PTR -16556[rbp], 0
	je	.L16
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	DoExit
	jmp	.L17
.L16:
	cmp	QWORD PTR -16528[rbp], 0
	jne	.L17
	cmp	DWORD PTR -16556[rbp], 0
	jne	.L17
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	DoExit
.L17:
	cmp	QWORD PTR -16520[rbp], 0
	jne	.L18
	mov	rax, QWORD PTR baseFile[rip]
	mov	edx, 0
	mov	esi, 16336
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR baseFile[rip]
	mov	rax, QWORD PTR -16496[rbp]
	mov	rcx, rdx
	mov	edx, 48
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -16536[rbp], eax
	cmp	DWORD PTR -16536[rbp], 48
	je	.L19
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 1
	call	DoExit
.L19:
	mov	rax, QWORD PTR baseFile[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L20
.L18:
	mov	rax, QWORD PTR -16520[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR mapperFile[rip], rax
	mov	rax, QWORD PTR mapperFile[rip]
	test	rax, rax
	jne	.L21
	mov	rax, QWORD PTR -16520[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L21:
	mov	rax, QWORD PTR mapperFile[rip]
	mov	rdi, rax
	call	GetFileSize
	mov	DWORD PTR -16540[rbp], eax
	cmp	DWORD PTR -16540[rbp], 51
	jle	.L22
	mov	edx, 51
	mov	esi, 48
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L22:
	mov	rdx, QWORD PTR mapperFile[rip]
	mov	rax, QWORD PTR -16496[rbp]
	mov	rcx, rdx
	mov	edx, 51
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -16536[rbp], eax
	cmp	DWORD PTR -16536[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR -16520[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L23:
	mov	rax, QWORD PTR -16496[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	jne	.L24
	mov	eax, DWORD PTR -16560[rbp]
	test	eax, eax
	jne	.L25
	mov	rax, QWORD PTR -16496[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	rax, QWORD PTR -16496[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -16560[rbp], eax
.L25:
	lea	rax, -64[rbp]
	add	rax, 3
	mov	QWORD PTR -16496[rbp], rax
.L24:
	mov	rax, QWORD PTR mapperFile[rip]
	test	rax, rax
	je	.L20
	mov	rax, QWORD PTR mapperFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR mapperFile[rip], 0
.L20:
	cmp	QWORD PTR -16512[rbp], 0
	je	.L26
	mov	rax, QWORD PTR -16512[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR extraFile[rip], rax
	mov	rax, QWORD PTR extraFile[rip]
	test	rax, rax
	jne	.L27
	mov	rax, QWORD PTR -16520[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L27:
	mov	rax, QWORD PTR extraFile[rip]
	mov	rdi, rax
	call	GetFileSize
	cmp	eax, 1024
	jle	.L28
	mov	esi, 1024
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L28:
	mov	rdx, QWORD PTR extraFile[rip]
	lea	rax, -16464[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -16536[rbp], eax
	cmp	DWORD PTR -16536[rbp], 0
	jne	.L29
	mov	rax, QWORD PTR -16512[rbp]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L29:
	mov	rax, QWORD PTR extraFile[rip]
	test	rax, rax
	je	.L26
	mov	rax, QWORD PTR extraFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR extraFile[rip], 0
.L26:
	cmp	QWORD PTR -16528[rbp], 0
	je	.L30
	mov	rax, QWORD PTR -16528[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR driverFile[rip], rax
	mov	rax, QWORD PTR driverFile[rip]
	test	rax, rax
	jne	.L31
	mov	rax, QWORD PTR -16528[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L31:
	mov	rax, QWORD PTR driverFile[rip]
	mov	rdi, rax
	call	GetFileSize
	cmp	eax, 369
	jg	.L32
	mov	rax, QWORD PTR -16528[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L32:
	mov	rax, QWORD PTR driverFile[rip]
	mov	edx, 0
	mov	esi, 256
	mov	rdi, rax
	call	fseek@PLT
	mov	rcx, QWORD PTR driverFile[rip]
	mov	eax, DWORD PTR -16548[rbp]
	movsx	rdx, eax
	lea	rax, -8272[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -16548[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -16472[rbp]
	lea	rax, -8272[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L33
	mov	esi, 256
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L33:
	mov	rax, QWORD PTR driverFile[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
.L30:
	mov	rax, QWORD PTR -16480[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR newFile[rip], rax
	mov	rax, QWORD PTR newFile[rip]
	test	rax, rax
	jne	.L35
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
	jmp	.L35
.L36:
	mov	rdx, QWORD PTR baseFile[rip]
	lea	rax, -8272[rbp]
	mov	rcx, rdx
	mov	edx, 8192
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -16536[rbp], eax
	mov	rcx, QWORD PTR newFile[rip]
	mov	eax, DWORD PTR -16536[rbp]
	movsx	rdx, eax
	lea	rax, -8272[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	mov	eax, DWORD PTR -16532[rbp]
	cmp	eax, DWORD PTR -16536[rbp]
	je	.L35
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L35:
	mov	rax, QWORD PTR baseFile[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L36
	mov	rax, QWORD PTR baseFile[rip]
	test	rax, rax
	je	.L37
	mov	rax, QWORD PTR baseFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR baseFile[rip], 0
.L37:
	cmp	QWORD PTR -16528[rbp], 0
	je	.L38
	jmp	.L39
.L40:
	mov	rdx, QWORD PTR driverFile[rip]
	lea	rax, -8272[rbp]
	mov	rcx, rdx
	mov	edx, 8192
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -16536[rbp], eax
	mov	rcx, QWORD PTR newFile[rip]
	mov	eax, DWORD PTR -16536[rbp]
	movsx	rdx, eax
	lea	rax, -8272[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	mov	eax, DWORD PTR -16532[rbp]
	cmp	eax, DWORD PTR -16536[rbp]
	je	.L39
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L39:
	mov	rax, QWORD PTR driverFile[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L40
.L38:
	cmp	QWORD PTR -16528[rbp], 0
	je	.L41
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	lea	rax, -8272[rbp]
	mov	rcx, rdx
	mov	edx, 255
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -16536[rbp], eax
	cmp	DWORD PTR -16536[rbp], 255
	je	.L42
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L42:
	mov	eax, DWORD PTR baseBankCount[rip]
	sal	eax, 14
	movsx	rcx, eax
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR baseBankCount[rip]
	mov	DWORD PTR -16552[rbp], eax
	jmp	.L43
.L46:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	lea	rax, -8272[rbp]
	mov	rcx, rdx
	mov	edx, 255
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], 255
	je	.L44
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L44:
	mov	rdx, QWORD PTR newFile[rip]
	mov	eax, DWORD PTR -16552[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], -1
	jne	.L45
	mov	rdx, QWORD PTR -16480[rbp]
	mov	eax, DWORD PTR -16552[rbp]
	mov	esi, eax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L45:
	add	DWORD PTR -16552[rbp], 1
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 1
	mov	esi, 16127
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	fgetc@PLT
.L43:
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L46
.L41:
	cmp	QWORD PTR -16520[rbp], 0
	jne	.L47
	cmp	QWORD PTR -16528[rbp], 0
	je	.L48
.L47:
	cmp	QWORD PTR -16520[rbp], 0
	jne	.L49
	mov	eax, DWORD PTR baseBankCount[rip]
	sal	eax, 14
	add	eax, 1
	movsx	rcx, eax
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L52
.L49:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	fseek@PLT
.L52:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 1
	mov	esi, 16335
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	mov	rax, QWORD PTR -16496[rbp]
	mov	rcx, rdx
	mov	edx, 48
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], 48
	je	.L51
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L51:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	fgetc@PLT
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L52
.L48:
	mov	eax, DWORD PTR -16560[rbp]
	test	eax, eax
	je	.L53
	mov	BYTE PTR -67[rbp], 50
	mov	eax, DWORD PTR -16560[rbp]
	mov	BYTE PTR -66[rbp], al
	mov	eax, DWORD PTR -16560[rbp]
	sar	eax, 8
	mov	BYTE PTR -65[rbp], al
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	esi, 247
	mov	rdi, rax
	call	fseek@PLT
.L55:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	lea	rax, -67[rbp]
	mov	rcx, rdx
	mov	edx, 3
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], 3
	je	.L54
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L54:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 1
	mov	esi, 16380
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	fgetc@PLT
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L55
.L53:
	cmp	QWORD PTR -16520[rbp], 0
	je	.L56
	mov	WORD PTR -16562[rbp], 2012
	movzx	ecx, WORD PTR -16562[rbp]
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	mov	rax, QWORD PTR -16496[rbp]
	mov	rcx, rdx
	mov	edx, 48
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], 48
	je	.L56
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L56:
	cmp	QWORD PTR -16512[rbp], 0
	je	.L57
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	esi, 15312
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	lea	rax, -16464[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], 1024
	je	.L58
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L58:
	mov	rax, QWORD PTR newFile[rip]
	mov	edx, 0
	mov	esi, 64464
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR newFile[rip]
	lea	rax, -16464[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -16532[rbp], eax
	cmp	DWORD PTR -16532[rbp], 1024
	je	.L57
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	DoExit
.L57:
	mov	rax, QWORD PTR -16480[rbp]
	mov	rsi, rax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	DoExit
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC32:
	.string	"MKNEXROM v1.05 - Make a Nextor kernel ROM\r\nBy Konamiman, 4/2014\r\n\r\nUsage:\r\nmknexrom <basefile> <newfile> [/d:<driverfile>] [/m:<mapperfile>]\r\n         [/e:<extrafile>] [/8:<8K bank select address>]\r"
	.text
	.globl	DisplayInfo
	.type	DisplayInfo, @function
DisplayInfo:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC32[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	DisplayInfo, .-DisplayInfo
	.globl	GetFileSize
	.type	GetFileSize, @function
GetFileSize:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	GetFileSize, .-GetFileSize
	.globl	IsParam
	.type	IsParam, @function
IsParam:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -12[rbp], al
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L65
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	or	eax, 32
	mov	edx, eax
	movzx	eax, BYTE PTR -12[rbp]
	or	eax, 32
	cmp	dl, al
	jne	.L65
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	cmp	al, 58
	jne	.L65
	mov	eax, 1
	jmp	.L67
.L65:
	mov	eax, 0
.L67:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	IsParam, .-IsParam
	.globl	DoExit
	.type	DoExit, @function
DoExit:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	rax, QWORD PTR baseFile[rip]
	test	rax, rax
	je	.L69
	mov	rax, QWORD PTR baseFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR baseFile[rip], 0
.L69:
	mov	rax, QWORD PTR newFile[rip]
	test	rax, rax
	je	.L70
	mov	rax, QWORD PTR newFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR newFile[rip], 0
.L70:
	mov	rax, QWORD PTR driverFile[rip]
	test	rax, rax
	je	.L71
	mov	rax, QWORD PTR driverFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR driverFile[rip], 0
.L71:
	mov	rax, QWORD PTR mapperFile[rip]
	test	rax, rax
	je	.L72
	mov	rax, QWORD PTR mapperFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR mapperFile[rip], 0
.L72:
	mov	rax, QWORD PTR extraFile[rip]
	test	rax, rax
	je	.L73
	mov	rax, QWORD PTR extraFile[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR extraFile[rip], 0
.L73:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE10:
	.size	DoExit, .-DoExit
	.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	"458163.c"
	.text
	.global	baseFile
	.bss
	.align	2
	.type	baseFile, %object
	.size	baseFile, 4
baseFile:
	.space	4
	.global	newFile
	.align	2
	.type	newFile, %object
	.size	newFile, 4
newFile:
	.space	4
	.global	driverFile
	.align	2
	.type	driverFile, %object
	.size	driverFile, 4
driverFile:
	.space	4
	.global	mapperFile
	.align	2
	.type	mapperFile, %object
	.size	mapperFile, 4
mapperFile:
	.space	4
	.global	extraFile
	.align	2
	.type	extraFile, %object
	.size	extraFile, 4
extraFile:
	.space	4
	.comm	baseBankCount,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"NEXTOR_DRIVER\000"
	.align	2
.LC1:
	.ascii	"\015\000"
	.align	2
.LC2:
	.ascii	"%4x\000"
	.align	2
.LC3:
	.ascii	"*** Invalid value for the /8 parameter, must be a h"
	.ascii	"exadecimal address in the range 4000-7FFF\000"
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"*** Can't open base file: %s\015\012\000"
	.align	2
.LC6:
	.ascii	"*** The base file has not the expected length. Expe"
	.ascii	"cted either %iK (for base file without driver) or >"
	.ascii	"=%iK (for file with driver).\015\012\000"
	.align	2
.LC7:
	.ascii	"*** A driver file has been specified, but the base "
	.ascii	"file appears to have a driver already.\015\000"
	.align	2
.LC8:
	.ascii	"*** No driver file has been specified, but the base"
	.ascii	" file does not have driver.\015\000"
	.align	2
.LC9:
	.ascii	"*** Can't read the mapper code from the base file\015"
	.ascii	"\000"
	.align	2
.LC10:
	.ascii	"*** Can't open mapper code file: %s\015\012\000"
	.align	2
.LC11:
	.ascii	"*** The mapper code file has not the expected size "
	.ascii	"(%i bytes, or %i bytes if it has a header)\015\012\000"
	.align	2
.LC12:
	.ascii	"*** Can't read the mapper code file: %s\015\012\000"
	.align	2
.LC13:
	.ascii	"*** Can't open extra code file: %s\015\012\000"
	.align	2
.LC14:
	.ascii	"*** The extra code file is too big, maximum allowed"
	.ascii	" size is %i bytes\015\012\000"
	.align	2
.LC15:
	.ascii	"*** Can't read the extra code file: %s\000"
	.align	2
.LC16:
	.ascii	"*** Can't open driver file: %s\015\012\000"
	.align	2
.LC17:
	.ascii	"*** The driver file is too small\000"
	.align	2
.LC18:
	.ascii	"*** The driver file is invalid. Driver signature no"
	.ascii	"t found at position %i.\000"
	.align	2
.LC19:
	.ascii	"wb+\000"
	.align	2
.LC20:
	.ascii	"*** Can't create the ROM file: %s\015\012\000"
	.align	2
.LC21:
	.ascii	"*** Can't write to the ROM file: %s\015\012\000"
	.align	2
.LC22:
	.ascii	"*** Can't append the driver to the ROM file: %s\015"
	.ascii	"\012\000"
	.align	2
.LC23:
	.ascii	"*** Can't read page 0 data from the ROM file: %s\015"
	.ascii	"\012\000"
	.align	2
.LC24:
	.ascii	"*** Can't write page 0 data to the ROM file: %s\015"
	.ascii	"\012\000"
	.align	2
.LC25:
	.ascii	"*** Can't write the bank number (%i) to the ROM fil"
	.ascii	"e: %s\015\012\000"
	.align	2
.LC26:
	.ascii	"*** Can't write mapper code to the ROM file: %s\015"
	.ascii	"\012\000"
	.align	2
.LC27:
	.ascii	"*** Can't write patch for 8K mapper initialization "
	.ascii	"to the ROM file: %s\015\012\000"
	.align	2
.LC28:
	.ascii	"*** Can't write mapper code to the initialization b"
	.ascii	"lock on the ROM file: %s\015\012\000"
	.align	2
.LC29:
	.ascii	"*** Can't write extra code (DOS 2 segment) to the R"
	.ascii	"OM file: %s\015\012\000"
	.align	2
.LC30:
	.ascii	"*** Can't write extra code (DOS 1 segment) to the R"
	.ascii	"OM file: %s\015\012\000"
	.align	2
.LC31:
	.ascii	"ROM file %s created successfully.\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8328
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8320
	sub	sp, sp, #12
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-132]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-136]
	ldr	r3, .L61+184
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-124]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-92]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-88]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-112]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-108]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-104]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-100]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L61
	str	r3, [r2, #-84]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-84]
	bl	strlen
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-80]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #68
	str	r3, [r2, #-96]
	ldr	r0, .L61+4
	bl	puts
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-132]
	cmp	r3, #3
	bgt	.L2
	bl	DisplayInfo
	mov	r0, #0
	bl	DoExit
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-136]
	ldr	r3, [r3, #4]
	str	r3, [r2, #-92]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-136]
	ldr	r3, [r3, #8]
	str	r3, [r2, #-88]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #3
	str	r3, [r2, #-116]
	b	.L3
.L9:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #100
	mov	r0, r3
	bl	IsParam
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r3, #3
	str	r3, [r2, #-112]
	b	.L5
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #109
	mov	r0, r3
	bl	IsParam
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r3, #3
	str	r3, [r2, #-108]
	b	.L5
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #101
	mov	r0, r3
	bl	IsParam
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r3, #3
	str	r3, [r2, #-104]
	b	.L5
.L7:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #56
	mov	r0, r3
	bl	IsParam
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-136]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r3, #3
	str	r3, [r2, #-100]
	b	.L5
.L8:
	bl	DisplayInfo
	mov	r0, #0
	bl	DoExit
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	add	r3, r3, #1
	str	r3, [r2, #-116]
.L3:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-116]
	ldr	r3, [r3, #-132]
	cmp	r2, r3
	blt	.L9
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	cmp	r3, #0
	beq	.L10
	sub	r3, fp, #8256
	sub	r3, r3, #12
	sub	r3, r3, #60
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, .L61+8
	ldr	r0, [r0, #-100]
	bl	__isoc99_sscanf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #16384
	blt	.L11
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #32768
	blt	.L10
.L11:
	ldr	r0, .L61+12
	bl	printf
	mov	r0, #1
	bl	DoExit
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L61+16
	ldr	r0, [r3, #-92]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L61+20
	str	r3, [r2]
	ldr	r3, .L61+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-92]
	ldr	r0, .L61+24
	bl	printf
	mov	r0, #1
	bl	DoExit
.L12:
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #254
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+28
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, #1
	ldr	r0, .L61+28
	bl	fread
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+20
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	GetFileSize
	str	r0, [r4, #-76]
	ldr	r3, .L61+28
	ldr	r3, [r3]
	lsl	r3, r3, #14
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-76]
	cmp	r2, r3
	bne	.L13
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-120]
	b	.L14
.L13:
	ldr	r3, .L61+28
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #14
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-76]
	cmp	r2, r3
	blt	.L15
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-120]
	b	.L14
.L15:
	ldr	r3, .L61+28
	ldr	r3, [r3]
	lsl	r1, r3, #4
	ldr	r3, .L61+28
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r0, .L61+32
	bl	printf
	mov	r0, #1
	bl	DoExit
.L14:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	beq	.L16
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-120]
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L61+36
	bl	puts
	mov	r0, #1
	bl	DoExit
	b	.L17
.L16:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	bne	.L17
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-120]
	cmp	r3, #0
	bne	.L17
	ldr	r0, .L61+40
	bl	puts
	mov	r0, #1
	bl	DoExit
.L17:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L61+44
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+20
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #48
	mov	r1, #1
	ldr	r0, [r0, #-96]
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #48
	beq	.L19
	ldr	r0, .L61+48
	bl	puts
	mov	r0, #1
	bl	DoExit
.L19:
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	b	.L20
.L18:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L61+16
	ldr	r0, [r3, #-108]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L61+52
	str	r3, [r2]
	ldr	r3, .L61+52
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L21
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-108]
	ldr	r0, .L61+56
	bl	printf
	mov	r0, #1
	bl	DoExit
.L21:
	ldr	r3, .L61+52
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	GetFileSize
	str	r0, [r4, #-72]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-72]
	cmp	r3, #51
	ble	.L22
	mov	r2, #51
	mov	r1, #48
	ldr	r0, .L61+60
	bl	printf
	mov	r0, #1
	bl	DoExit
.L22:
	ldr	r3, .L61+52
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #51
	mov	r1, #1
	ldr	r0, [r0, #-96]
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #0
	bne	.L23
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-108]
	ldr	r0, .L61+64
	bl	printf
	mov	r0, #1
	bl	DoExit
.L23:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-96]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L24
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #0
	bne	.L25
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-96]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-96]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-124]
.L25:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #68
	add	r3, r3, #3
	str	r3, [r2, #-96]
.L24:
	ldr	r3, .L61+52
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L61+52
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L61+52
	mov	r2, #0
	str	r2, [r3]
.L20:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	cmp	r3, #0
	beq	.L26
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L61+16
	ldr	r0, [r3, #-104]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L61+68
	str	r3, [r2]
	ldr	r3, .L61+68
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L27
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-108]
	ldr	r0, .L61+72
	bl	printf
	mov	r0, #1
	bl	DoExit
.L27:
	ldr	r3, .L61+68
	ldr	r3, [r3]
	mov	r0, r3
	bl	GetFileSize
	mov	r3, r0
	cmp	r3, #1024
	ble	.L28
	mov	r1, #1024
	ldr	r0, .L61+76
	bl	printf
	mov	r0, #1
	bl	DoExit
.L28:
	ldr	r3, .L61+68
	ldr	r3, [r3]
	sub	r0, fp, #8192
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #1024
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #0
	bne	.L29
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-104]
	ldr	r0, .L61+80
	bl	printf
	mov	r0, #1
	bl	DoExit
.L29:
	ldr	r3, .L61+68
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L26
	ldr	r3, .L61+68
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L61+68
	mov	r2, #0
	str	r2, [r3]
.L26:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	beq	.L30
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L61+16
	ldr	r0, [r3, #-112]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L61+84
	str	r3, [r2]
	ldr	r3, .L61+84
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L31
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-112]
	ldr	r0, .L61+88
	bl	printf
	mov	r0, #1
	bl	DoExit
.L31:
	ldr	r3, .L61+84
	ldr	r3, [r3]
	mov	r0, r3
	bl	GetFileSize
	mov	r3, r0
	ldr	r2, .L61+92
	cmp	r3, r2
	bgt	.L32
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-112]
	ldr	r0, .L61+96
	bl	printf
	mov	r0, #1
	bl	DoExit
.L32:
	ldr	r3, .L61+84
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #256
	mov	r0, r3
	bl	fseek
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-80]
	ldr	r3, .L61+84
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r1, #1
	bl	fread
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-80]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #60
	ldr	r1, [r1, #-84]
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	mov	r1, #256
	ldr	r0, .L61+100
	bl	printf
	mov	r0, #1
	bl	DoExit
.L33:
	ldr	r3, .L61+84
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
.L30:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, .L61+104
	ldr	r0, [r3, #-88]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L61+172
	str	r3, [r2]
	ldr	r3, .L61+172
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L35
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+108
	bl	printf
	mov	r0, #1
	bl	DoExit
	b	.L35
.L36:
	ldr	r3, .L61+20
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #4096
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-68]
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-64]
	ldr	r3, [r3, #-68]
	cmp	r2, r3
	beq	.L35
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+112
	bl	printf
	mov	r0, #1
	bl	DoExit
.L35:
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
	ldr	r3, .L61+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L37
	ldr	r3, .L61+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L61+20
	mov	r2, #0
	str	r2, [r3]
.L37:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	beq	.L38
	b	.L39
.L40:
	ldr	r3, .L61+84
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #4096
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-68]
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-64]
	ldr	r3, [r3, #-68]
	cmp	r2, r3
	beq	.L39
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+116
	bl	printf
	mov	r0, #1
	bl	DoExit
.L39:
	ldr	r3, .L61+84
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L40
.L38:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	beq	.L41
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #255
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #255
	beq	.L42
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+120
	bl	printf
	mov	r0, #1
	bl	DoExit
.L42:
	ldr	r3, .L61+172
	ldr	r0, [r3]
	ldr	r3, .L61+28
	ldr	r3, [r3]
	lsl	r3, r3, #14
	mov	r2, #0
	mov	r1, r3
	bl	fseek
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L61+28
	ldr	r3, [r3]
	str	r3, [r2, #-116]
	b	.L43
.L46:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #255
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #255
	beq	.L44
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+124
	bl	printf
	mov	r0, #1
	bl	DoExit
.L44:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r3
	ldr	r0, [r2, #-116]
	bl	fputc
	str	r0, [r4, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmn	r3, #1
	bne	.L45
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-88]
	ldr	r1, [r3, #-116]
	ldr	r0, .L61+128
	bl	printf
	mov	r0, #1
	bl	DoExit
.L45:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	add	r3, r3, #1
	str	r3, [r2, #-116]
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, .L61+132
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
.L43:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
.L41:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L47
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	beq	.L48
.L47:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L49
	ldr	r3, .L61+172
	ldr	r0, [r3]
	ldr	r3, .L61+28
	ldr	r3, [r3]
	lsl	r3, r3, #14
	add	r3, r3, #1
	mov	r2, #0
	mov	r1, r3
	bl	fseek
	b	.L52
.L62:
	.align	2
.L61:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	baseFile
	.word	.LC5
	.word	baseBankCount
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	16336
	.word	.LC9
	.word	mapperFile
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	extraFile
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	driverFile
	.word	.LC16
	.word	369
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	16127
	.word	16335
	.word	.LC26
	.word	.LC27
	.word	16380
	.word	2012
	.word	.LC28
	.word	15312
	.word	.LC29
	.word	64464
	.word	newFile
	.word	.LC30
	.word	.LC31
	.word	.LC32
.L49:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	fseek
.L52:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, .L61+136
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #48
	mov	r1, #1
	ldr	r0, [r0, #-96]
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #48
	beq	.L51
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+140
	bl	printf
	mov	r0, #1
	bl	DoExit
.L51:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L52
.L48:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #0
	beq	.L53
	mov	r3, #50
	strb	r3, [fp, #-72]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	and	r3, r3, #255
	strb	r3, [fp, #-71]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	asr	r3, r3, #8
	and	r3, r3, #255
	strb	r3, [fp, #-70]
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #247
	mov	r0, r3
	bl	fseek
.L55:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #72
	mov	r2, #3
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #3
	beq	.L54
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+144
	bl	printf
	mov	r0, #1
	bl	DoExit
.L54:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, .L61+148
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L55
.L53:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	beq	.L56
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, .L61+152
	strh	r2, [r3, #-126]	@ movhi
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldrh	r1, [r2, #-126]
	mov	r2, #0
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #48
	mov	r1, #1
	ldr	r0, [r0, #-96]
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #48
	beq	.L56
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+156
	bl	printf
	mov	r0, #1
	bl	DoExit
.L56:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	cmp	r3, #0
	beq	.L57
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L61+160
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #8192
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #1024
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #1024
	beq	.L58
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+164
	bl	printf
	mov	r0, #1
	bl	DoExit
.L58:
	ldr	r3, .L61+172
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L61+168
	mov	r0, r3
	bl	fseek
	ldr	r3, .L61+172
	ldr	r3, [r3]
	sub	r0, fp, #8192
	sub	r0, r0, #12
	sub	r0, r0, #60
	mov	r2, #1024
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #1024
	beq	.L57
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+176
	bl	printf
	mov	r0, #1
	bl	DoExit
.L57:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-88]
	ldr	r0, .L61+180
	bl	printf
	mov	r0, #0
	bl	DoExit
	mov	r3, #0
	ldr	r2, .L61+184
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L60
	bl	__stack_chk_fail
.L60:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	main, .-main
	.section	.rodata
	.align	2
.LC33:
	.ascii	"MKNEXROM v1.05 - Make a Nextor kernel ROM\015\012By"
	.ascii	" Konamiman, 4/2014\015\012\015\012Usage:\015\012mkn"
	.ascii	"exrom <basefile> <newfile> [/d:<driverfile>] [/m:<m"
	.ascii	"apperfile>]\015\012         [/e:<extrafile>] [/8:<8"
	.ascii	"K bank select address>]\015\000"
	.text
	.align	2
	.global	DisplayInfo
	.syntax unified
	.arm
	.fpu softvfp
	.type	DisplayInfo, %function
DisplayInfo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L64
	bl	puts
	nop
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC33
	.size	DisplayInfo, .-DisplayInfo
	.align	2
	.global	GetFileSize
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetFileSize, %function
GetFileSize:
	@ 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	ftell
	str	r0, [fp, #-12]
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r0, [fp, #-16]
	bl	ftell
	str	r0, [fp, #-8]
	mov	r2, #0
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	GetFileSize, .-GetFileSize
	.align	2
	.global	IsParam
	.syntax unified
	.arm
	.fpu softvfp
	.type	IsParam, %function
IsParam:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	mov	r3, r1
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L69
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	orr	r3, r3, #32
	and	r2, r3, #255
	ldrb	r3, [fp, #-9]
	orr	r3, r3, #32
	and	r3, r3, #255
	cmp	r2, r3
	bne	.L69
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #58
	bne	.L69
	mov	r3, #1
	b	.L71
.L69:
	mov	r3, #0
.L71:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	IsParam, .-IsParam
	.align	2
	.global	DoExit
	.syntax unified
	.arm
	.fpu softvfp
	.type	DoExit, %function
DoExit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L78
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L73
	ldr	r3, .L78
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L78
	mov	r2, #0
	str	r2, [r3]
.L73:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L74
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L78+4
	mov	r2, #0
	str	r2, [r3]
.L74:
	ldr	r3, .L78+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L75
	ldr	r3, .L78+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L78+8
	mov	r2, #0
	str	r2, [r3]
.L75:
	ldr	r3, .L78+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L76
	ldr	r3, .L78+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L78+12
	mov	r2, #0
	str	r2, [r3]
.L76:
	ldr	r3, .L78+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L77
	ldr	r3, .L78+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L78+16
	mov	r2, #0
	str	r2, [r3]
.L77:
	ldr	r0, .L78+20
	bl	puts
	ldr	r0, [fp, #-8]
	bl	exit
.L79:
	.align	2
.L78:
	.word	baseFile
	.word	newFile
	.word	driverFile
	.word	mapperFile
	.word	extraFile
	.word	.LC1
	.size	DoExit, .-DoExit
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
