	.file	"463448.c"
	.intel_syntax noprefix
	.text
	.local	debug_file
	.comm	debug_file,4,4
	.local	debug_parse
	.comm	debug_parse,4,4
	.local	debug_lookup
	.comm	debug_lookup,4,4
	.local	debug_out
	.comm	debug_out,4,4
	.section	.rodata
.LC0:
	.string	"__PATCH_BAUDRATE"
.LC1:
	.string	"__PREFIX"
.LC2:
	.string	"__POSTFIX"
.LC3:
	.string	"__START_PROG"
.LC4:
	.string	"__END_PROG"
.LC5:
	.string	""
	.section	.data.rel.local,"aw"
	.align 32
	.type	s_labels, @object
	.size	s_labels, 48
s_labels:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.local	s_values
	.comm	s_values,8,8
	.section	.rodata
	.align 8
.LC6:
	.string	"Attempt to open file: ``%s'' with mode ``%s''\n"
	.align 8
.LC7:
	.string	"File: ``%s'' could not be opened\n"
	.text
	.type	openfile, @function
openfile:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR debug_file[rip]
	test	eax, eax
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L2:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	openfile, .-openfile
	.section	.rodata
.LC8:
	.string	"Reading hex: %s"
.LC9:
	.string	"%x"
.LC10:
	.string	"value: %d (dec) %x (hex)\n\n"
.LC11:
	.string	"Parse error in sym file\n"
	.text
	.type	get_hex, @function
get_hex:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L6
.L17:
	cmp	DWORD PTR -20[rbp], 2
	je	.L7
	cmp	DWORD PTR -20[rbp], 2
	jg	.L8
	cmp	DWORD PTR -20[rbp], 0
	je	.L9
	cmp	DWORD PTR -20[rbp], 1
	je	.L10
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 61
	jne	.L20
	mov	DWORD PTR -20[rbp], 1
	jmp	.L20
.L10:
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L21
	mov	DWORD PTR -20[rbp], 2
	jmp	.L21
.L7:
	mov	eax, DWORD PTR debug_parse[rip]
	test	eax, eax
	je	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L14:
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR debug_parse[rip]
	test	eax, eax
	je	.L15
	mov	ecx, DWORD PTR -24[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L15:
	mov	eax, DWORD PTR -24[rbp]
	jmp	.L18
.L8:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	nop
	jmp	.L12
.L21:
	nop
.L12:
	add	QWORD PTR -16[rbp], 1
.L6:
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, QWORD PTR -40[rbp]
	cmp	rax, 1023
	jle	.L17
	mov	eax, DWORD PTR -24[rbp]
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_hex, .-get_hex
	.type	check_value_size, @function
check_value_size:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], 0
	jmp	.L23
.L24:
	add	DWORD PTR -4[rbp], 1
.L23:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, s_labels[rip]
	mov	rax, QWORD PTR [rdx+rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L24
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check_value_size, .-check_value_size
	.section	.rodata
.LC12:
	.string	"Looking up: ``%s''\n"
.LC13:
	.string	"Found ix: %d, value=%.4x\n"
	.align 8
.LC14:
	.string	"Label: ``%s'' not found, returning -1\n"
	.text
	.type	lookup, @function
lookup:
.LFB9:
	.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	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR debug_lookup[rip]
	test	eax, eax
	je	.L28
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L28
.L32:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, s_labels[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jne	.L29
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, s_labels[rip]
	mov	rcx, QWORD PTR [rcx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L29
	mov	eax, DWORD PTR debug_lookup[rip]
	test	eax, eax
	je	.L30
	mov	rdx, QWORD PTR s_values[rip]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -12[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L30:
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L31
.L29:
	add	DWORD PTR -12[rbp], 1
.L28:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, s_labels[rip]
	mov	rax, QWORD PTR [rdx+rax]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L32
	mov	eax, DWORD PTR debug_lookup[rip]
	test	eax, eax
	je	.L33
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L33:
	mov	eax, -1
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	lookup, .-lookup
	.section	.rodata
	.align 8
.LC15:
	.string	"scanned one line in symfile: <<<%s>>>\n"
	.text
	.type	read_symfile, @function
read_symfile:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 2120
	.cfi_offset 3, -24
	mov	QWORD PTR -2120[rbp], rdi
	mov	QWORD PTR -2128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2100[rbp], 0
	jmp	.L35
.L36:
	mov	rdx, QWORD PTR -2120[rbp]
	lea	rax, -2080[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	add	DWORD PTR -2100[rbp], 1
.L35:
	cmp	DWORD PTR -2100[rbp], 9
	jle	.L36
	jmp	.L37
.L46:
	mov	rdx, QWORD PTR -2120[rbp]
	lea	rax, -2080[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -2080[rbp]
	mov	QWORD PTR -2088[rbp], rax
	jmp	.L38
.L39:
	add	QWORD PTR -2088[rbp], 1
.L38:
	mov	rax, QWORD PTR -2088[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L39
	mov	eax, DWORD PTR debug_file[rip]
	test	eax, eax
	je	.L40
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -2080[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L40:
	mov	BYTE PTR -1056[rbp], 0
	mov	DWORD PTR -2092[rbp], -1
	mov	DWORD PTR -2096[rbp], 0
.L44:
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	movzx	eax, BYTE PTR -2080[rbp+rax]
	cmp	al, 32
	je	.L41
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	movzx	eax, BYTE PTR -2080[rbp+rax]
	cmp	al, 10
	je	.L41
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	movzx	eax, BYTE PTR -2080[rbp+rax]
	cmp	al, 9
	je	.L41
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	movzx	eax, BYTE PTR -2080[rbp+rax]
	cmp	al, 13
	jne	.L42
.L41:
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	mov	BYTE PTR -1056[rbp+rax], 0
	lea	rax, -1056[rbp]
	mov	rdi, rax
	call	lookup
	mov	DWORD PTR -2092[rbp], eax
	nop
	cmp	DWORD PTR -2092[rbp], -1
	jne	.L45
	jmp	.L37
.L42:
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	movzx	edx, BYTE PTR -2080[rbp+rax]
	mov	eax, DWORD PTR -2096[rbp]
	cdqe
	mov	BYTE PTR -1056[rbp+rax], dl
	add	DWORD PTR -2096[rbp], 1
	jmp	.L44
.L45:
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -2128[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -2080[rbp]
	mov	rdi, rax
	call	get_hex
	mov	DWORD PTR [rbx], eax
.L37:
	mov	rax, QWORD PTR -2120[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L46
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	read_symfile, .-read_symfile
	.section	.rodata
	.align 8
.LC16:
	.string	"Usage: %s [-r] <symfile> <binfile> <loadfile (out)>\n"
	.text
	.type	usage, @function
usage:
.LFB11:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE11:
	.size	usage, .-usage
	.section	.rodata
.LC17:
	.string	"r"
.LC18:
	.string	"rb"
.LC19:
	.string	"wb"
.LC20:
	.string	"-r"
	.align 8
.LC21:
	.string	"symbol file does not contain correct labels\n"
	.align 8
.LC22:
	.string	"Labels needed: __PREFIX, __POSTFIX, __START_PROG and __END_PROG\n"
.LC23:
	.string	"Start: %d, End: %d\n"
.LC24:
	.string	"byte(hi)=%d\n"
.LC25:
	.string	"byte(lo)=%d\n"
.LC26:
	.string	"value=%.2x\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], -1
	mov	DWORD PTR -52[rbp], -1
	mov	DWORD PTR -68[rbp], 0
	mov	eax, 0
	call	check_value_size
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR s_values[rip], rax
	cmp	DWORD PTR -84[rbp], 4
	je	.L51
	cmp	DWORD PTR -84[rbp], 5
	je	.L51
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
.L51:
	cmp	DWORD PTR -84[rbp], 4
	jne	.L52
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -16[rbp], rax
.L52:
	cmp	DWORD PTR -84[rbp], 5
	jne	.L53
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L54
	mov	DWORD PTR -68[rbp], 1
	jmp	.L55
.L54:
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
.L55:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -16[rbp], rax
.L53:
	mov	rdx, QWORD PTR s_values[rip]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_symfile
	lea	rdi, .LC3[rip]
	call	lookup
	mov	DWORD PTR -64[rbp], eax
	lea	rdi, .LC1[rip]
	call	lookup
	mov	DWORD PTR -60[rbp], eax
	lea	rdi, .LC2[rip]
	call	lookup
	mov	DWORD PTR -56[rbp], eax
	lea	rdi, .LC4[rip]
	call	lookup
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -64[rbp], -1
	je	.L56
	cmp	DWORD PTR -60[rbp], -1
	je	.L56
	cmp	DWORD PTR -56[rbp], -1
	je	.L56
	cmp	DWORD PTR -52[rbp], -1
	jne	.L57
.L56:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 44
	mov	esi, 1
	lea	rdi, .LC21[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 64
	mov	esi, 1
	lea	rdi, .LC22[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L57:
	mov	rdx, QWORD PTR s_values[rip]
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -48[rbp], eax
	mov	rdx, QWORD PTR s_values[rip]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	rdx, QWORD PTR s_values[rip]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -40[rbp], eax
	mov	rdx, QWORD PTR s_values[rip]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR debug_parse[rip]
	test	eax, eax
	je	.L58
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -48[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L58:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -72[rbp], 0
	jmp	.L59
.L60:
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -72[rbp], 1
.L59:
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -72[rbp], eax
	jl	.L60
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	cmp	DWORD PTR -68[rbp], 0
	je	.L61
	mov	DWORD PTR -72[rbp], 0
.L67:
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -73[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L77
	mov	eax, DWORD PTR -72[rbp]
	lea	edx, 255[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 8
	mov	BYTE PTR -74[rbp], al
	mov	eax, DWORD PTR debug_out[rip]
	test	eax, eax
	je	.L64
	movzx	eax, BYTE PTR -74[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L64:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -72[rbp]
	mov	BYTE PTR -74[rbp], al
	mov	eax, DWORD PTR debug_out[rip]
	test	eax, eax
	je	.L65
	movzx	eax, BYTE PTR -74[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L65:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR debug_out[rip]
	test	eax, eax
	je	.L66
	movzx	eax, BYTE PTR -73[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L66:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -73[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -72[rbp], 1
	jmp	.L67
.L61:
	mov	DWORD PTR -72[rbp], 0
	jmp	.L69
.L72:
	mov	eax, DWORD PTR -72[rbp]
	lea	edx, 255[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 8
	mov	BYTE PTR -74[rbp], al
	mov	eax, DWORD PTR debug_out[rip]
	test	eax, eax
	je	.L70
	movzx	eax, BYTE PTR -74[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L70:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -72[rbp]
	mov	BYTE PTR -74[rbp], al
	mov	eax, DWORD PTR debug_out[rip]
	test	eax, eax
	je	.L71
	movzx	eax, BYTE PTR -74[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L71:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -72[rbp], 1
.L69:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, DWORD PTR -48[rbp]
	cmp	DWORD PTR -72[rbp], eax
	jl	.L72
	jmp	.L68
.L77:
	nop
.L68:
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -72[rbp], 0
	jmp	.L73
.L74:
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -74[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -72[rbp], 1
.L73:
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -72[rbp], eax
	jl	.L74
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR s_values[rip]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L76
	call	__stack_chk_fail@PLT
.L76:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"463448.c"
	.text
	.local	debug_file
	.comm	debug_file,4,4
	.local	debug_parse
	.comm	debug_parse,4,4
	.local	debug_lookup
	.comm	debug_lookup,4,4
	.local	debug_out
	.comm	debug_out,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"__PATCH_BAUDRATE\000"
	.align	2
.LC1:
	.ascii	"__PREFIX\000"
	.align	2
.LC2:
	.ascii	"__POSTFIX\000"
	.align	2
.LC3:
	.ascii	"__START_PROG\000"
	.align	2
.LC4:
	.ascii	"__END_PROG\000"
	.align	2
.LC5:
	.ascii	"\000"
	.data
	.align	2
	.type	s_labels, %object
	.size	s_labels, 24
s_labels:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.local	s_values
	.comm	s_values,4,4
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Attempt to open file: ``%s'' with mode ``%s''\012\000"
	.align	2
.LC7:
	.ascii	"File: ``%s'' could not be opened\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	openfile, %function
openfile:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L5+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r1, .L5+8
	bl	fprintf
.L2:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L5+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L5+12
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	debug_file
	.word	stderr
	.word	.LC6
	.word	.LC7
	.size	openfile, .-openfile
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Reading hex: %s\000"
	.align	2
.LC9:
	.ascii	"%x\000"
	.align	2
.LC10:
	.ascii	"value: %d (dec) %x (hex)\012\012\000"
	.align	2
.LC11:
	.ascii	"Parse error in sym file\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_hex, %function
get_hex:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L8
.L19:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	beq	.L9
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	bgt	.L10
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L12
	b	.L10
.L11:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #61
	bne	.L22
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L22
.L12:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L23
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L23
.L9:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L24+12
	mov	r0, r3
	bl	fprintf
.L16:
	sub	r3, fp, #20
	mov	r2, r3
	ldr	r1, .L24+16
	ldr	r0, [fp, #-16]
	bl	__isoc99_sscanf
	ldr	r3, .L24+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L17
	ldr	r3, .L24+8
	ldr	r0, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r1, .L24+20
	bl	fprintf
.L17:
	ldr	r3, [fp, #-20]
	b	.L20
.L10:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L24+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L22:
	nop
	b	.L14
.L23:
	nop
.L14:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L8:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	cmp	r3, #1024
	blt	.L19
	ldr	r3, [fp, #-20]
.L20:
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC12
	.word	debug_parse
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	get_hex, .-get_hex
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_value_size, %function
check_value_size:
	@ 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
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L27
.L28:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L27:
	ldr	r2, .L30
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L28
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L31:
	.align	2
.L30:
	.word	s_labels
	.size	check_value_size, .-check_value_size
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Looking up: ``%s''\012\000"
	.align	2
.LC14:
	.ascii	"Found ix: %d, value=%.4x\012\000"
	.align	2
.LC15:
	.ascii	"Label: ``%s'' not found, returning -1\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lookup, %function
lookup:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L40
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L34
	ldr	r3, .L40+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L40+8
	mov	r0, r3
	bl	fprintf
	b	.L34
.L38:
	ldr	r2, .L40+12
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bne	.L35
	ldr	r2, .L40+12
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L35
	ldr	r3, .L40
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L36
	ldr	r3, .L40+4
	ldr	r0, [r3]
	ldr	r3, .L40+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L40+20
	bl	fprintf
.L36:
	ldr	r3, [fp, #-16]
	b	.L37
.L35:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L34:
	ldr	r2, .L40+12
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L38
	ldr	r3, .L40
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L40+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L40+24
	mov	r0, r3
	bl	fprintf
.L39:
	mvn	r3, #0
.L37:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	debug_lookup
	.word	stderr
	.word	.LC13
	.word	s_labels
	.word	s_values
	.word	.LC14
	.word	.LC15
	.size	lookup, .-lookup
	.section	.rodata
	.align	2
.LC16:
	.ascii	"scanned one line in symfile: <<<%s>>>\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_symfile, %function
read_symfile:
	@ args = 0, pretend = 0, frame = 2080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #2080
	sub	sp, sp, #4
	str	r0, [fp, #-2088]
	str	r1, [fp, #-2092]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2080]
	b	.L43
.L44:
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2088]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	ldr	r3, [fp, #-2080]
	add	r3, r3, #1
	str	r3, [fp, #-2080]
.L43:
	ldr	r3, [fp, #-2080]
	cmp	r3, #9
	ble	.L44
	b	.L45
.L54:
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2088]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	str	r3, [fp, #-2076]
	b	.L46
.L47:
	ldr	r3, [fp, #-2076]
	add	r3, r3, #1
	str	r3, [fp, #-2076]
.L46:
	ldr	r3, [fp, #-2076]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L47
	ldr	r3, .L57+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L48
	ldr	r3, .L57+8
	ldr	r0, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L57+12
	bl	fprintf
.L48:
	mov	r3, #0
	strb	r3, [fp, #-1040]
	mvn	r3, #0
	str	r3, [fp, #-2068]
	mov	r3, #0
	str	r3, [fp, #-2072]
.L52:
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L49
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L49
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L49
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L50
.L49:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	lookup
	str	r0, [fp, #-2068]
	nop
	ldr	r3, [fp, #-2068]
	cmn	r3, #1
	bne	.L53
	b	.L45
.L50:
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	add	r3, r3, r2
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-2072]
	add	r3, r3, #1
	str	r3, [fp, #-2072]
	b	.L52
.L53:
	ldr	r3, [fp, #-2068]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-2092]
	add	r4, r2, r3
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	get_hex
	mov	r3, r0
	str	r3, [r4]
.L45:
	ldr	r0, [fp, #-2088]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L54
	nop
	ldr	r3, .L57
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L55
	bl	__stack_chk_fail
.L55:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L58:
	.align	2
.L57:
	.word	.LC17
	.word	debug_file
	.word	stderr
	.word	.LC16
	.size	read_symfile, .-read_symfile
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Usage: %s [-r] <symfile> <binfile> <loadfile (out)>"
	.ascii	"\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ 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, .L60
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L60+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L61:
	.align	2
.L60:
	.word	stderr
	.word	.LC18
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC19:
	.ascii	"r\000"
	.align	2
.LC20:
	.ascii	"rb\000"
	.align	2
.LC21:
	.ascii	"wb\000"
	.align	2
.LC22:
	.ascii	"-r\000"
	.align	2
.LC23:
	.ascii	"symbol file does not contain correct labels\012\000"
	.align	2
.LC24:
	.ascii	"Labels needed: __PREFIX, __POSTFIX, __START_PROG an"
	.ascii	"d __END_PROG\012\000"
	.align	2
.LC25:
	.ascii	"Start: %d, End: %d\012\000"
	.align	2
.LC26:
	.ascii	"byte(hi)=%d\012\000"
	.align	2
.LC27:
	.ascii	"byte(lo)=%d\012\000"
	.align	2
.LC28:
	.ascii	"value=%.2x\012\000"
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L90
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-40]
	mvn	r3, #0
	str	r3, [fp, #-36]
	mvn	r3, #0
	str	r3, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-44]
	bl	check_value_size
	mov	r3, r0
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L90+4
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	cmp	r3, #4
	beq	.L63
	ldr	r3, [fp, #-72]
	cmp	r3, #5
	beq	.L63
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
.L63:
	ldr	r3, [fp, #-72]
	cmp	r3, #4
	bne	.L64
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L90+8
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-76]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L90+12
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-76]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L90+16
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-52]
.L64:
	ldr	r3, [fp, #-72]
	cmp	r3, #5
	bne	.L65
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L90+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L67
.L66:
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
.L67:
	ldr	r3, [fp, #-76]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L90+8
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-76]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L90+12
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-76]
	add	r3, r3, #16
	ldr	r3, [r3]
	ldr	r1, .L90+16
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-52]
.L65:
	ldr	r3, .L90+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-60]
	bl	read_symfile
	ldr	r0, .L90+24
	bl	lookup
	str	r0, [fp, #-40]
	ldr	r0, .L90+28
	bl	lookup
	str	r0, [fp, #-36]
	ldr	r0, .L90+32
	bl	lookup
	str	r0, [fp, #-32]
	ldr	r0, .L90+36
	bl	lookup
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	beq	.L68
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	beq	.L68
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	beq	.L68
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L69
.L68:
	ldr	r3, .L90+40
	ldr	r3, [r3]
	mov	r2, #44
	mov	r1, #1
	ldr	r0, .L90+44
	bl	fwrite
	ldr	r3, .L90+40
	ldr	r3, [r3]
	mov	r2, #64
	mov	r1, #1
	ldr	r0, .L90+48
	bl	fwrite
	mov	r0, #1
	bl	exit
.L69:
	ldr	r3, .L90+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, .L90+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, .L90+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, .L90+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L90+52
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L70
	ldr	r3, .L90+40
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	ldr	r1, .L90+56
	bl	fprintf
.L70:
	mov	r2, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-56]
	bl	fseek
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L71
.L72:
	sub	r0, fp, #62
	ldr	r3, [fp, #-56]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L71:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L72
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-56]
	bl	fseek
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L73
	mov	r3, #0
	str	r3, [fp, #-48]
.L79:
	sub	r0, fp, #61
	ldr	r3, [fp, #-56]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	ldr	r0, [fp, #-56]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L89
	ldr	r3, [fp, #-48]
	add	r2, r3, #255
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #8
	and	r3, r3, #255
	strb	r3, [fp, #-62]
	ldr	r3, .L90+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L76
	ldr	r3, .L90+40
	ldr	r3, [r3]
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	ldr	r1, .L90+64
	mov	r0, r3
	bl	fprintf
.L76:
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	and	r3, r3, #255
	strb	r3, [fp, #-62]
	ldr	r3, .L90+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L77
	ldr	r3, .L90+40
	ldr	r3, [r3]
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	ldr	r1, .L90+68
	mov	r0, r3
	bl	fprintf
.L77:
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, .L90+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L78
	ldr	r3, .L90+40
	ldr	r3, [r3]
	ldrb	r2, [fp, #-61]	@ zero_extendqisi2
	ldr	r1, .L90+72
	mov	r0, r3
	bl	fprintf
.L78:
	sub	r0, fp, #61
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	b	.L79
.L73:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L81
.L84:
	ldr	r3, [fp, #-48]
	add	r2, r3, #255
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #8
	and	r3, r3, #255
	strb	r3, [fp, #-62]
	ldr	r3, .L90+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L82
	ldr	r3, .L90+40
	ldr	r3, [r3]
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	ldr	r1, .L90+64
	mov	r0, r3
	bl	fprintf
.L82:
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	and	r3, r3, #255
	strb	r3, [fp, #-62]
	ldr	r3, .L90+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L83
	ldr	r3, .L90+40
	ldr	r3, [r3]
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	ldr	r1, .L90+68
	mov	r0, r3
	bl	fprintf
.L83:
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	sub	r0, fp, #62
	ldr	r3, [fp, #-56]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L81:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L84
	b	.L80
.L89:
	nop
.L80:
	mov	r2, #0
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-56]
	bl	fseek
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L85
.L86:
	sub	r0, fp, #62
	ldr	r3, [fp, #-56]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	sub	r0, fp, #62
	ldr	r3, [fp, #-52]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L85:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L86
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-56]
	bl	fclose
	ldr	r0, [fp, #-52]
	bl	fclose
	ldr	r3, .L90+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	mov	r3, #0
	ldr	r2, .L90
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L88
	bl	__stack_chk_fail
.L88:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L91:
	.align	2
.L90:
	.word	.LC29
	.word	s_values
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.word	.LC4
	.word	stderr
	.word	.LC23
	.word	.LC24
	.word	debug_parse
	.word	.LC25
	.word	debug_out
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
