	.file	"424007.c"
	.intel_syntax noprefix
	.text
	.globl	COM
	.section	.rodata
.LC0:
	.string	""
	.section	.data.rel.local,"aw"
	.align 8
	.type	COM, @object
	.size	COM, 8
COM:
	.quad	.LC0
	.globl	PP_VER
	.section	.rodata
.LC1:
	.string	"0.99"
	.section	.data.rel.local
	.align 8
	.type	PP_VER, @object
	.size	PP_VER, 8
PP_VER:
	.quad	.LC1
	.globl	verbose
	.data
	.align 4
	.type	verbose, @object
	.size	verbose, 4
verbose:
	.long	1
	.globl	verify
	.align 4
	.type	verify, @object
	.size	verify, 4
verify:
	.long	1
	.globl	program
	.align 4
	.type	program, @object
	.size	program, 4
program:
	.long	1
	.globl	sleep_time
	.bss
	.align 4
	.type	sleep_time, @object
	.size	sleep_time, 4
sleep_time:
	.zero	4
	.globl	readflash
	.align 4
	.type	readflash, @object
	.size	readflash, 4
readflash:
	.zero	4
	.globl	baudRate
	.data
	.align 4
	.type	baudRate, @object
	.size	baudRate, 4
baudRate:
	.long	115200
	.globl	devid_expected
	.bss
	.align 4
	.type	devid_expected, @object
	.size	devid_expected, 4
devid_expected:
	.zero	4
	.globl	devid_mask
	.align 4
	.type	devid_mask, @object
	.size	devid_mask, 4
devid_mask:
	.zero	4
	.globl	com
	.align 4
	.type	com, @object
	.size	com, 4
com:
	.zero	4
	.globl	flash_size
	.align 4
	.type	flash_size, @object
	.size	flash_size, 4
flash_size:
	.zero	4
	.globl	page_size
	.align 4
	.type	page_size, @object
	.size	page_size, 4
page_size:
	.zero	4
	.globl	chip_family
	.align 4
	.type	chip_family, @object
	.size	chip_family, 4
chip_family:
	.zero	4
	.globl	config_size
	.align 4
	.type	config_size, @object
	.size	config_size, 4
config_size:
	.zero	4
	.globl	file_image
	.align 32
	.type	file_image, @object
	.size	file_image, 70000
file_image:
	.zero	70000
	.globl	progmem
	.align 32
	.type	progmem, @object
	.size	progmem, 260000
progmem:
	.zero	260000
	.globl	config_bytes
	.align 32
	.type	config_bytes, @object
	.size	config_bytes, 32
config_bytes:
	.zero	32
	.text
	.globl	get_unix_baud
	.type	get_unix_baud, @function
get_unix_baud:
.LFB6:
	.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 baudRate[rip]
	cmp	eax, 1152000
	je	.L2
	cmp	eax, 1152000
	jg	.L3
	cmp	eax, 1000000
	je	.L4
	cmp	eax, 1000000
	jg	.L3
	cmp	eax, 921600
	je	.L5
	cmp	eax, 921600
	jg	.L3
	cmp	eax, 576000
	je	.L6
	cmp	eax, 576000
	jg	.L3
	cmp	eax, 500000
	je	.L7
	cmp	eax, 500000
	jg	.L3
	cmp	eax, 460800
	je	.L8
	cmp	eax, 460800
	jg	.L3
	cmp	eax, 230400
	je	.L9
	cmp	eax, 230400
	jg	.L3
	cmp	eax, 115200
	je	.L10
	cmp	eax, 115200
	jg	.L3
	cmp	eax, 57600
	je	.L11
	cmp	eax, 57600
	jg	.L3
	cmp	eax, 38400
	je	.L12
	cmp	eax, 38400
	jg	.L3
	cmp	eax, 9600
	je	.L13
	cmp	eax, 19200
	je	.L14
	jmp	.L3
.L13:
	mov	eax, 13
	jmp	.L15
.L14:
	mov	eax, 14
	jmp	.L15
.L12:
	mov	eax, 15
	jmp	.L15
.L11:
	mov	eax, 4097
	jmp	.L15
.L10:
	mov	eax, 4098
	jmp	.L15
.L9:
	mov	eax, 4099
	jmp	.L15
.L8:
	mov	eax, 4100
	jmp	.L15
.L7:
	mov	eax, 4101
	jmp	.L15
.L6:
	mov	eax, 4102
	jmp	.L15
.L5:
	mov	eax, 4103
	jmp	.L15
.L4:
	mov	eax, 4104
	jmp	.L15
.L2:
	mov	eax, 4105
	jmp	.L15
.L3:
	mov	eax, 4098
.L15:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_unix_baud, .-get_unix_baud
	.section	.rodata
.LC2:
	.string	"Opening: %s at %d\n"
.LC3:
	.string	"Failed to open serial port"
.LC4:
	.string	"Err tcgetattr"
.LC5:
	.string	"set attr error"
	.text
	.globl	initSerialPort
	.type	initSerialPort, @function
initSerialPort:
.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L17
	mov	edx, DWORD PTR baudRate[rip]
	mov	rax, QWORD PTR COM[rip]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	rax, QWORD PTR COM[rip]
	mov	esi, 2306
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR com[rip], eax
	mov	eax, DWORD PTR com[rip]
	test	eax, eax
	jns	.L18
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	comErr
.L18:
	lea	rax, -80[rbp]
	mov	edx, 60
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR com[rip]
	mov	edx, 0
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	eax, DWORD PTR com[rip]
	lea	rdx, -80[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	test	eax, eax
	je	.L19
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L19:
	mov	eax, 0
	call	get_unix_baud
	mov	edx, eax
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetispeed@PLT
	mov	eax, 0
	call	get_unix_baud
	mov	edx, eax
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetospeed@PLT
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -28
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 2176
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	ah, -2
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, -65
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, -49
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 48
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	and	eax, -2
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	and	eax, -17
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	and	ah, -2
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	and	ah, -29
	mov	DWORD PTR -80[rbp], eax
	mov	BYTE PTR -57[rbp], 0
	mov	BYTE PTR -58[rbp], 10
	mov	eax, DWORD PTR com[rip]
	lea	rdx, -80[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	test	eax, eax
	je	.L20
	mov	rax, QWORD PTR COM[rip]
	mov	rdi, rax
	call	perror@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L20:
	mov	eax, DWORD PTR com[rip]
	mov	esi, 2
	mov	edi, eax
	call	tcflush@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	initSerialPort, .-initSerialPort
	.section	.rodata
.LC6:
	.string	"TX: 0x%02X\n"
	.align 8
.LC7:
	.string	"Serial port failed to send a byte, write returned %d\n"
	.text
	.globl	putByte
	.type	putByte, @function
putByte:
.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	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	BYTE PTR -13[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L23
	mov	rax, QWORD PTR stdout[rip]
	mov	edx, DWORD PTR -20[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L23:
	mov	eax, DWORD PTR com[rip]
	lea	rcx, -13[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 1
	je	.L26
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	comErr
.L26:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	putByte, .-putByte
	.globl	putBytes
	.type	putBytes, @function
putBytes:
.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 -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	add	DWORD PTR -4[rbp], 1
.L28:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L29
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	putBytes, .-putBytes
	.section	.rodata
.LC8:
	.string	"RX: fail\n"
.LC9:
	.string	"RX:  0x%02X\n"
	.align 8
.LC10:
	.string	"Serial port failed to receive a byte, read returned %d\n"
	.text
	.globl	getByte
	.type	getByte, @function
getByte:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR com[rip]
	lea	rcx, -13[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L31
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	movzx	edx, al
	cmp	DWORD PTR -12[rbp], 0
	jg	.L32
	lea	rax, .LC8[rip]
	jmp	.L33
.L32:
	lea	rax, .LC9[rip]
.L33:
	mov	rcx, QWORD PTR stdout[rip]
	mov	rsi, rax
	mov	rdi, rcx
	mov	eax, 0
	call	flsprintf
.L31:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L34
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	movzx	eax, al
	jmp	.L36
.L34:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	comErr
	mov	eax, -1
.L36:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	getByte, .-getByte
	.globl	comErr
	.type	comErr, @function
comErr:
.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, 736
	mov	QWORD PTR -728[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L39
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L39:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -712[rbp], 8
	mov	DWORD PTR -708[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -704[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -696[rbp], rax
	lea	rcx, -712[rbp]
	mov	rdx, QWORD PTR -728[rbp]
	lea	rax, -688[rbp]
	mov	esi, 500
	mov	rdi, rax
	call	vsnprintf@PLT
	mov	rdx, QWORD PTR stderr[rip]
	lea	rax, -688[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR COM[rip]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
	.cfi_endproc
.LFE11:
	.size	comErr, .-comErr
	.globl	flsprintf
	.type	flsprintf, @function
flsprintf:
.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, 736
	mov	QWORD PTR -728[rbp], rdi
	mov	QWORD PTR -736[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L42
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L42:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -712[rbp], 16
	mov	DWORD PTR -708[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -704[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -696[rbp], rax
	lea	rcx, -712[rbp]
	mov	rdx, QWORD PTR -736[rbp]
	lea	rax, -688[rbp]
	mov	esi, 500
	mov	rdi, rax
	call	vsnprintf@PLT
	mov	rdx, QWORD PTR -728[rbp]
	lea	rax, -688[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR -728[rbp]
	mov	rdi, rax
	call	fflush@PLT
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	flsprintf, .-flsprintf
	.globl	is_empty
	.type	is_empty, @function
is_empty:
.LFB13:
	.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 1
	mov	DWORD PTR -8[rbp], 0
	jmp	.L45
.L47:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	je	.L46
	mov	DWORD PTR -4[rbp], 0
.L46:
	add	DWORD PTR -8[rbp], 1
.L45:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L47
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	is_empty, .-is_empty
	.globl	getlinex
	.type	getlinex, @function
getlinex:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L50
	mov	rax, -1
	jmp	.L51
.L50:
	cmp	QWORD PTR -56[rbp], 0
	jne	.L52
	mov	rax, -1
	jmp	.L51
.L52:
	cmp	QWORD PTR -48[rbp], 0
	jne	.L53
	mov	rax, -1
	jmp	.L51
.L53:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L54
	mov	rax, -1
	jmp	.L51
.L54:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L55
	mov	edi, 128
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L56
	mov	rax, -1
	jmp	.L51
.L56:
	mov	QWORD PTR -8[rbp], 128
.L55:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L57
.L61:
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, 1
	cmp	rdx, rax
	jbe	.L58
	sub	QWORD PTR -8[rbp], -128
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L58
	mov	rax, -1
	jmp	.L51
.L58:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -16[rbp], rdx
	mov	edx, DWORD PTR -28[rbp]
	mov	BYTE PTR [rax], dl
	cmp	DWORD PTR -28[rbp], 10
	je	.L62
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -28[rbp], eax
.L57:
	cmp	DWORD PTR -28[rbp], -1
	jne	.L61
	jmp	.L60
.L62:
	nop
.L60:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -16[rbp], rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, QWORD PTR -24[rbp]
	sub	rax, 1
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	getlinex, .-getlinex
	.globl	sleep_ms
	.type	sleep_ms, @function
sleep_ms:
.LFB15:
	.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	DWORD PTR -36[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	imul	eax, edx, 1000000
	cdqe
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	sleep_ms, .-sleep_ms
	.section	.rodata
.LC11:
	.string	"pp programmer\n"
	.text
	.globl	printHelp
	.type	printHelp, @function
printHelp:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE16:
	.size	printHelp, .-printHelp
	.section	.rodata
.LC12:
	.string	"%d"
.LC13:
	.string	"Unknown option `-%c'.\n"
	.align 8
.LC14:
	.string	"Unknown option character `\\x%x'.\n"
.LC15:
	.string	"Bug, unhandled option '%c'\n"
.LC16:
	.string	"c:nprs:t:v:b:"
	.text
	.globl	parseArgs
	.type	parseArgs, @function
parseArgs:
.LFB17:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	jmp	.L67
.L80:
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 63
	cmp	eax, 55
	ja	.L68
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L70[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L70[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L70:
	.long	.L78-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L77-.L70
	.long	.L76-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L68-.L70
	.long	.L75-.L70
	.long	.L68-.L70
	.long	.L74-.L70
	.long	.L68-.L70
	.long	.L73-.L70
	.long	.L72-.L70
	.long	.L71-.L70
	.long	.L68-.L70
	.long	.L69-.L70
	.text
.L76:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR COM[rip], rax
	jmp	.L67
.L75:
	mov	DWORD PTR verify[rip], 0
	jmp	.L67
.L74:
	mov	DWORD PTR program[rip], 0
	jmp	.L67
.L73:
	mov	DWORD PTR readflash[rip], 1
	jmp	.L67
.L72:
	mov	rax, QWORD PTR optarg[rip]
	lea	rdx, sleep_time[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	jmp	.L67
.L71:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	setCPUtype
	jmp	.L67
.L69:
	mov	rax, QWORD PTR optarg[rip]
	lea	rdx, verbose[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	jmp	.L67
.L77:
	mov	rax, QWORD PTR optarg[rip]
	lea	rdx, baudRate[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	jmp	.L67
.L78:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR optopt[rip]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 16384
	test	eax, eax
	je	.L79
	mov	edx, DWORD PTR optopt[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L68
.L79:
	mov	edx, DWORD PTR optopt[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L68:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L67:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC16[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L80
	cmp	DWORD PTR -20[rbp], 1
	jg	.L82
	mov	eax, 0
	call	printHelp
.L82:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	parseArgs, .-parseArgs
	.section	.rodata
.LC17:
	.string	"pp3_devices.dat"
.LC18:
	.string	"Opening filename %s \n"
.LC19:
	.string	"r"
.LC20:
	.string	"File open"
.LC21:
	.string	"\nRead %d chars: %s"
.LC22:
	.string	"%s %d %d %x %x %s"
.LC23:
	.string	"\n*** %s,%d,%d,%x,%x,%s"
	.align 8
.LC24:
	.string	"Found database match %s,%d,%d,%x,%x,%s\n"
.LC25:
	.string	"CF_P16F_A"
.LC26:
	.string	"CF_P16F_B"
.LC27:
	.string	"CF_P16F_C"
.LC28:
	.string	"CF_P16F_D"
.LC29:
	.string	"CF_P18F_A"
.LC30:
	.string	"CF_P18F_B"
.LC31:
	.string	"CF_P18F_C"
.LC32:
	.string	"CF_P18F_D"
.LC33:
	.string	"CF_P18F_E"
.LC34:
	.string	"CF_P18F_F"
.LC35:
	.string	"CF_P18F_G"
.LC36:
	.string	"CF_P18F_Q"
	.align 8
.LC37:
	.string	"chip family:%d, config size:%d\n"
	.text
	.globl	setCPUtype
	.type	setCPUtype, @function
setCPUtype:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -104[rbp], eax
	mov	DWORD PTR -108[rbp], 0
	jmp	.L84
.L85:
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -108[rbp], 1
.L84:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -104[rbp]
	jl	.L85
	mov	QWORD PTR -96[rbp], 0
	lea	rax, .LC17[rip]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -88[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L86
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
.L86:
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L87
	mov	eax, -1
	jmp	.L115
.L87:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L90
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L90
.L114:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L91
	mov	rdx, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
.L91:
	mov	rax, QWORD PTR -96[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	je	.L90
	mov	rax, QWORD PTR -96[rbp]
	lea	r8, -116[rbp]
	lea	rdi, -120[rbp]
	lea	rcx, -124[rbp]
	lea	rdx, -64[rbp]
	lea	rsi, -32[rbp]
	push	rsi
	lea	rsi, -112[rbp]
	push	rsi
	mov	r9, r8
	mov	r8, rdi
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	add	rsp, 16
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L92
	mov	r8d, DWORD PTR -112[rbp]
	mov	edi, DWORD PTR -116[rbp]
	mov	ecx, DWORD PTR -120[rbp]
	mov	edx, DWORD PTR -124[rbp]
	lea	rax, -64[rbp]
	sub	rsp, 8
	lea	rsi, -32[rbp]
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
.L92:
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L90
	mov	eax, DWORD PTR -124[rbp]
	mov	DWORD PTR flash_size[rip], eax
	mov	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR page_size[rip], eax
	mov	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR devid_expected[rip], eax
	mov	eax, DWORD PTR -112[rbp]
	mov	DWORD PTR devid_mask[rip], eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L93
	mov	r8d, DWORD PTR -112[rbp]
	mov	edi, DWORD PTR -116[rbp]
	mov	ecx, DWORD PTR -120[rbp]
	mov	edx, DWORD PTR -124[rbp]
	lea	rax, -64[rbp]
	sub	rsp, 8
	lea	rsi, -32[rbp]
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
.L93:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L94
	mov	DWORD PTR chip_family[rip], 0
.L94:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC26[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L95
	mov	DWORD PTR chip_family[rip], 2
.L95:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC27[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L96
	mov	DWORD PTR chip_family[rip], 7
.L96:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC28[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L97
	mov	DWORD PTR chip_family[rip], 8
.L97:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC29[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L98
	mov	DWORD PTR chip_family[rip], 1
.L98:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC30[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L99
	mov	DWORD PTR chip_family[rip], 3
.L99:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC31[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L100
	mov	DWORD PTR chip_family[rip], 4
.L100:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC32[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L101
	mov	DWORD PTR chip_family[rip], 5
.L101:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC33[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L102
	mov	DWORD PTR chip_family[rip], 6
.L102:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC34[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L103
	mov	DWORD PTR chip_family[rip], 9
.L103:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC35[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L104
	mov	DWORD PTR chip_family[rip], 10
.L104:
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC36[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L105
	mov	DWORD PTR chip_family[rip], 11
.L105:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	jne	.L106
	mov	DWORD PTR config_size[rip], 16
.L106:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 3
	jne	.L107
	mov	DWORD PTR config_size[rip], 8
.L107:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 4
	jne	.L108
	mov	DWORD PTR config_size[rip], 16
	mov	DWORD PTR chip_family[rip], 3
.L108:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	jne	.L109
	mov	DWORD PTR config_size[rip], 16
.L109:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	jne	.L110
	mov	DWORD PTR config_size[rip], 16
.L110:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	jne	.L111
	mov	DWORD PTR config_size[rip], 12
.L111:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	jne	.L112
	mov	DWORD PTR config_size[rip], 12
.L112:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 10
	jne	.L113
	mov	DWORD PTR config_size[rip], 10
	mov	DWORD PTR chip_family[rip], 9
.L113:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L90
	mov	edx, DWORD PTR config_size[rip]
	mov	eax, DWORD PTR chip_family[rip]
	mov	esi, eax
	lea	rdi, .LC37[rip]
	mov	eax, 0
	call	printf@PLT
.L90:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rcx, -88[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getlinex
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], -1
	jne	.L114
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L115:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L116
	call	__stack_chk_fail@PLT
.L116:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	setCPUtype, .-setCPUtype
	.section	.rodata
.LC38:
	.string	"Resetting PC\n"
	.text
	.globl	p16a_rst_pointer
	.type	p16a_rst_pointer, @function
p16a_rst_pointer:
.LFB19:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L118
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L118:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L119
	mov	edi, 9
	call	putByte
	jmp	.L120
.L119:
	mov	edi, 3
	call	putByte
.L120:
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	p16a_rst_pointer, .-p16a_rst_pointer
	.section	.rodata
.LC39:
	.string	"\nSetting PC\n"
	.text
	.globl	p16d_set_pointer
	.type	p16d_set_pointer, @function
p16d_set_pointer:
.LFB20:
	.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	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L123
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC39[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L123:
	mov	edi, 12
	call	putByte
	mov	edi, 2
	call	putByte
	mov	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	p16d_set_pointer, .-p16d_set_pointer
	.section	.rodata
.LC40:
	.string	"Mass erase\n"
	.text
	.globl	p16a_mass_erase
	.type	p16a_mass_erase, @function
p16a_mass_erase:
.LFB21:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L126
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L126:
	mov	edi, 7
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	p16a_mass_erase, .-p16a_mass_erase
	.section	.rodata
.LC41:
	.string	"Load config\n"
	.text
	.globl	p16a_load_config
	.type	p16a_load_config, @function
p16a_load_config:
.LFB22:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L129
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC41[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L129:
	mov	edi, 4
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	p16a_load_config, .-p16a_load_config
	.section	.rodata
.LC42:
	.string	"Inc pointer %d\n"
	.text
	.globl	p16a_inc_pointer
	.type	p16a_inc_pointer, @function
p16a_inc_pointer:
.LFB23:
	.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	eax, edi
	mov	BYTE PTR -4[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L132
	movzx	edx, BYTE PTR -4[rbp]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC42[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L132:
	mov	edi, 5
	call	putByte
	mov	edi, 1
	call	putByte
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	p16a_inc_pointer, .-p16a_inc_pointer
	.section	.rodata
	.align 8
.LC43:
	.string	"Programming page of %d bytes at 0x%4.4x\n"
	.text
	.globl	p16a_program_page
	.type	p16a_program_page, @function
p16a_program_page:
.LFB24:
	.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	ecx, esi
	mov	eax, edx
	mov	edx, ecx
	mov	BYTE PTR -8[rbp], dl
	mov	BYTE PTR -12[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L135
	movzx	edx, BYTE PTR -8[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -4[rbp]
	lea	rsi, .LC43[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L135:
	mov	edi, 8
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	add	eax, 2
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -12[rbp]
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	mov	edx, DWORD PTR -4[rbp]
	lea	rcx, file_image[rip]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	putBytes
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	p16a_program_page, .-p16a_program_page
	.section	.rodata
.LC44:
	.string	"Reading page of %d bytes\n"
	.text
	.globl	p16a_read_page
	.type	p16a_read_page, @function
p16a_read_page:
.LFB25:
	.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	eax, esi
	mov	BYTE PTR -28[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L138
	movzx	edx, BYTE PTR -28[rbp]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC44[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L138:
	mov	edi, 6
	call	putByte
	mov	edi, 1
	call	putByte
	movzx	eax, BYTE PTR -28[rbp]
	shr	al
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	BYTE PTR -1[rbp], 0
	jmp	.L139
.L140:
	mov	eax, 0
	call	getByte
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L139:
	movzx	eax, BYTE PTR -1[rbp]
	cmp	al, BYTE PTR -28[rbp]
	jb	.L140
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	p16a_read_page, .-p16a_read_page
	.section	.rodata
.LC45:
	.string	"Reading EEPROM of %d bytes\n"
	.text
	.globl	p16a_read_eeprom
	.type	p16a_read_eeprom, @function
p16a_read_eeprom:
.LFB26:
	.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	eax, esi
	mov	BYTE PTR -28[rbp], al
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	je	.L143
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L144
.L143:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L145
	movzx	edx, BYTE PTR -28[rbp]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC45[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L145:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	jne	.L146
	mov	edi, 10
	call	putByte
.L146:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L147
	mov	edi, 13
	call	putByte
.L147:
	mov	edi, 1
	call	putByte
	movzx	eax, BYTE PTR -28[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	BYTE PTR -1[rbp], 0
	jmp	.L148
.L149:
	mov	eax, 0
	call	getByte
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L148:
	movzx	eax, BYTE PTR -1[rbp]
	cmp	al, BYTE PTR -28[rbp]
	jb	.L149
	mov	eax, 1
	jmp	.L150
.L144:
	mov	eax, 0
.L150:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	p16a_read_eeprom, .-p16a_read_eeprom
	.section	.rodata
	.align 8
.LC46:
	.string	"Getting devid - lo:%2.2x,hi:%2.2x\n"
	.text
	.globl	p16a_get_devid
	.type	p16a_get_devid, @function
p16a_get_devid:
.LFB27:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	p16a_rst_pointer
	call	p16a_load_config
	mov	edi, 6
	call	p16a_inc_pointer
	lea	rax, -32[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	p16a_read_page
	movzx	eax, BYTE PTR -31[rbp]
	mov	BYTE PTR -38[rbp], al
	movzx	eax, BYTE PTR -32[rbp]
	mov	BYTE PTR -37[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L152
	movzx	ecx, BYTE PTR -38[rbp]
	movzx	edx, BYTE PTR -37[rbp]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC46[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L152:
	movzx	edx, BYTE PTR -37[rbp]
	movzx	eax, BYTE PTR -38[rbp]
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR devid_mask[rip]
	and	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L154
	call	__stack_chk_fail@PLT
.L154:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	p16a_get_devid, .-p16a_get_devid
	.section	.rodata
	.align 8
.LC47:
	.string	"Getting config +%d - lo:%2.2x,hi:%2.2x = %4.4x\n"
	.text
	.globl	p16a_get_config
	.type	p16a_get_config, @function
p16a_get_config:
.LFB28:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	eax, edi
	mov	BYTE PTR -52[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	p16a_rst_pointer
	call	p16a_load_config
	movzx	eax, BYTE PTR -52[rbp]
	mov	edi, eax
	call	p16a_inc_pointer
	lea	rax, -32[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	p16a_read_page
	movzx	eax, BYTE PTR -31[rbp]
	mov	BYTE PTR -38[rbp], al
	movzx	eax, BYTE PTR -32[rbp]
	mov	BYTE PTR -37[rbp], al
	movzx	edx, BYTE PTR -37[rbp]
	movzx	eax, BYTE PTR -38[rbp]
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L156
	movzx	esi, BYTE PTR -38[rbp]
	movzx	ecx, BYTE PTR -37[rbp]
	movzx	edx, BYTE PTR -52[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	edi, DWORD PTR -36[rbp]
	mov	r9d, edi
	mov	r8d, esi
	lea	rsi, .LC47[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L156:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L158
	call	__stack_chk_fail@PLT
.L158:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	p16a_get_config, .-p16a_get_config
	.globl	p16a_program_config
	.type	p16a_program_config, @function
p16a_program_config:
.LFB29:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	p16a_rst_pointer
	call	p16a_load_config
	mov	edi, 7
	call	p16a_inc_pointer
	mov	edx, 1
	mov	esi, 2
	mov	edi, 65550
	call	p16a_program_page
	mov	edx, 1
	mov	esi, 2
	mov	edi, 65552
	call	p16a_program_page
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	or	eax, edx
	test	al, al
	je	.L160
	mov	edx, 1
	mov	esi, 2
	mov	edi, 65554
	call	p16a_program_page
.L160:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L161
	mov	edx, 1
	mov	esi, 2
	mov	edi, 65556
	call	p16a_program_page
.L161:
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	p16a_program_config, .-p16a_program_config
	.section	.rodata
	.align 8
.LC48:
	.string	"Reading page of %d bytes at 0x%6.6x\n"
	.text
	.globl	p18a_read_page
	.type	p18a_read_page, @function
p18a_read_page:
.LFB30:
	.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 -28[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -32[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L164
	movzx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -28[rbp]
	lea	rsi, .LC48[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L164:
	mov	edi, 17
	call	putByte
	mov	edi, 4
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	shr	al
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	BYTE PTR -1[rbp], 0
	jmp	.L165
.L166:
	mov	eax, 0
	call	getByte
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L165:
	movzx	eax, BYTE PTR -1[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L166
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	p18a_read_page, .-p18a_read_page
	.globl	p18a_mass_erase
	.type	p18a_mass_erase, @function
p18a_mass_erase:
.LFB31:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L169
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L169:
	mov	edi, 19
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	p18a_mass_erase, .-p18a_mass_erase
	.globl	p18b_mass_erase
	.type	p18b_mass_erase, @function
p18b_mass_erase:
.LFB32:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L172
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L172:
	mov	edi, 35
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	p18b_mass_erase, .-p18b_mass_erase
	.section	.rodata
.LC49:
	.string	"Mass erase part of 0x%6.6x\n"
	.text
	.globl	p18d_mass_erase_part
	.type	p18d_mass_erase_part, @function
p18d_mass_erase_part:
.LFB33:
	.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	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L175
	mov	rax, QWORD PTR stdout[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC49[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L175:
	mov	edi, 48
	call	putByte
	mov	edi, 3
	call	putByte
	mov	rax, QWORD PTR -8[rbp]
	shr	rax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	rax, QWORD PTR -8[rbp]
	shr	rax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE33:
	.size	p18d_mass_erase_part, .-p18d_mass_erase_part
	.globl	p18d_mass_erase
	.type	p18d_mass_erase, @function
p18d_mass_erase:
.LFB34:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L178
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L178:
	mov	edi, 8388868
	call	p18d_mass_erase_part
	mov	edi, 8389124
	call	p18d_mass_erase_part
	mov	edi, 8389636
	call	p18d_mass_erase_part
	mov	edi, 8390660
	call	p18d_mass_erase_part
	mov	edi, 8388612
	call	p18d_mass_erase_part
	mov	edi, 8388613
	call	p18d_mass_erase_part
	mov	edi, 8388610
	call	p18d_mass_erase_part
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE34:
	.size	p18d_mass_erase, .-p18d_mass_erase
	.globl	p18e_mass_erase
	.type	p18e_mass_erase, @function
p18e_mass_erase:
.LFB35:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L181
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L181:
	mov	edi, 8388868
	call	p18d_mass_erase_part
	mov	edi, 8389124
	call	p18d_mass_erase_part
	mov	edi, 8389636
	call	p18d_mass_erase_part
	mov	edi, 8390660
	call	p18d_mass_erase_part
	mov	edi, 8392708
	call	p18d_mass_erase_part
	mov	edi, 8396804
	call	p18d_mass_erase_part
	mov	edi, 8404996
	call	p18d_mass_erase_part
	mov	edi, 8421380
	call	p18d_mass_erase_part
	mov	edi, 8388612
	call	p18d_mass_erase_part
	mov	edi, 8388613
	call	p18d_mass_erase_part
	mov	edi, 8388610
	call	p18d_mass_erase_part
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE35:
	.size	p18e_mass_erase, .-p18e_mass_erase
	.section	.rodata
.LC50:
	.string	"~"
	.align 8
.LC51:
	.string	"Writing A page of %d bytes at 0x%6.6x\n"
	.text
	.globl	p18a_write_page
	.type	p18a_write_page, @function
p18a_write_page:
.LFB36:
	.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 -28[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -32[rbp], al
	mov	BYTE PTR -1[rbp], 0
	mov	BYTE PTR -2[rbp], 0
	jmp	.L184
.L186:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	je	.L185
	mov	BYTE PTR -1[rbp], 0
.L185:
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L184:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L186
	cmp	BYTE PTR -1[rbp], 1
	jne	.L187
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L188
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L188:
	mov	eax, 0
	jmp	.L189
.L187:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L190
	movzx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -28[rbp]
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L190:
	mov	edi, 18
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	add	eax, 4
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	BYTE PTR -2[rbp], 0
	jmp	.L191
.L192:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L191:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L192
	mov	eax, 0
	call	getByte
	mov	eax, 0
.L189:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE36:
	.size	p18a_write_page, .-p18a_write_page
	.section	.rodata
	.align 8
.LC52:
	.string	"Writing D page of %d bytes at 0x%6.6x\n"
	.text
	.globl	p18d_write_page
	.type	p18d_write_page, @function
p18d_write_page:
.LFB37:
	.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 -28[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -32[rbp], al
	mov	BYTE PTR -1[rbp], 0
	mov	BYTE PTR -2[rbp], 0
	jmp	.L194
.L196:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	je	.L195
	mov	BYTE PTR -1[rbp], 0
.L195:
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L194:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L196
	cmp	BYTE PTR -1[rbp], 1
	jne	.L197
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L198
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L198:
	mov	eax, 0
	jmp	.L199
.L197:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L200
	movzx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -28[rbp]
	lea	rsi, .LC52[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L200:
	mov	edi, 49
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	add	eax, 4
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	BYTE PTR -2[rbp], 0
	jmp	.L201
.L202:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L201:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L202
	mov	eax, 0
	call	getByte
	mov	eax, 0
.L199:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE37:
	.size	p18d_write_page, .-p18d_write_page
	.section	.rodata
	.align 8
.LC53:
	.string	"Writing cfg 0x%2.2x 0x%2.2x at 0x%6.6x\n"
	.text
	.globl	p18a_write_cfg
	.type	p18a_write_cfg, @function
p18a_write_cfg:
.LFB38:
	.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	ecx, edi
	mov	eax, esi
	mov	DWORD PTR -12[rbp], edx
	mov	edx, ecx
	mov	BYTE PTR -4[rbp], dl
	mov	BYTE PTR -8[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L204
	movzx	ecx, BYTE PTR -8[rbp]
	movzx	edx, BYTE PTR -4[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, DWORD PTR -12[rbp]
	mov	r8d, esi
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L204:
	mov	edi, 20
	call	putByte
	mov	edi, 6
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE38:
	.size	p18a_write_cfg, .-p18a_write_cfg
	.globl	p18d_write_cfg
	.type	p18d_write_cfg, @function
p18d_write_cfg:
.LFB39:
	.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	ecx, edi
	mov	eax, esi
	mov	DWORD PTR -12[rbp], edx
	mov	edx, ecx
	mov	BYTE PTR -4[rbp], dl
	mov	BYTE PTR -8[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L207
	movzx	ecx, BYTE PTR -8[rbp]
	movzx	edx, BYTE PTR -4[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, DWORD PTR -12[rbp]
	mov	r8d, esi
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L207:
	mov	edi, 50
	call	putByte
	mov	edi, 6
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE39:
	.size	p18d_write_cfg, .-p18d_write_cfg
	.globl	p16c_mass_erase
	.type	p16c_mass_erase, @function
p16c_mass_erase:
.LFB40:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L210
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L210:
	mov	edi, 67
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE40:
	.size	p16c_mass_erase, .-p16c_mass_erase
	.globl	p16c_read_page
	.type	p16c_read_page, @function
p16c_read_page:
.LFB41:
	.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 -28[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -32[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L213
	movzx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -28[rbp]
	lea	rsi, .LC48[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L213:
	mov	edi, 65
	call	putByte
	mov	edi, 4
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	shr	al
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	BYTE PTR -1[rbp], 0
	jmp	.L214
.L215:
	mov	eax, 0
	call	getByte
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L214:
	movzx	eax, BYTE PTR -1[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L215
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE41:
	.size	p16c_read_page, .-p16c_read_page
	.globl	p16c_write_page
	.type	p16c_write_page, @function
p16c_write_page:
.LFB42:
	.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 -28[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -32[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -28[rbp], eax
	mov	BYTE PTR -1[rbp], 1
	mov	BYTE PTR -2[rbp], 0
	jmp	.L218
.L220:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	movzx	eax, BYTE PTR -2[rbp]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	and	eax, edx
	cmp	al, -1
	je	.L219
	mov	BYTE PTR -1[rbp], 0
.L219:
	add	BYTE PTR -2[rbp], 2
.L218:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L220
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L221
	movzx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -28[rbp]
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L221:
	cmp	BYTE PTR -1[rbp], 1
	jne	.L222
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L223
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L223:
	mov	eax, 0
	jmp	.L224
.L222:
	mov	edi, 66
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	add	eax, 4
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	BYTE PTR -2[rbp], 0
	jmp	.L225
.L226:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L225:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L226
	mov	eax, 0
	call	getByte
	mov	eax, 0
.L224:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE42:
	.size	p16c_write_page, .-p16c_write_page
	.globl	p16c_get_devid
	.type	p16c_get_devid, @function
p16c_get_devid:
.LFB43:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	edx, 4
	mov	esi, 65548
	mov	rdi, rax
	call	p16c_read_page
	movzx	eax, BYTE PTR -31[rbp]
	mov	BYTE PTR -38[rbp], al
	movzx	eax, BYTE PTR -32[rbp]
	mov	BYTE PTR -37[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L228
	movzx	ecx, BYTE PTR -38[rbp]
	movzx	edx, BYTE PTR -37[rbp]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC46[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L228:
	movzx	edx, BYTE PTR -37[rbp]
	movzx	eax, BYTE PTR -38[rbp]
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR devid_mask[rip]
	and	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L230
	call	__stack_chk_fail@PLT
.L230:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE43:
	.size	p16c_get_devid, .-p16c_get_devid
	.globl	p16c_write_single_cfg
	.type	p16c_write_single_cfg, @function
p16c_write_single_cfg:
.LFB44:
	.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	ecx, edi
	mov	eax, esi
	mov	DWORD PTR -12[rbp], edx
	mov	edx, ecx
	mov	BYTE PTR -4[rbp], dl
	mov	BYTE PTR -8[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L232
	movzx	ecx, BYTE PTR -8[rbp]
	movzx	edx, BYTE PTR -4[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, DWORD PTR -12[rbp]
	mov	r8d, esi
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L232:
	mov	edi, 68
	call	putByte
	mov	edi, 6
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE44:
	.size	p16c_write_single_cfg, .-p16c_write_single_cfg
	.globl	p18q_write_single_cfg
	.type	p18q_write_single_cfg, @function
p18q_write_single_cfg:
.LFB45:
	.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	ecx, edi
	mov	eax, esi
	mov	DWORD PTR -12[rbp], edx
	mov	edx, ecx
	mov	BYTE PTR -4[rbp], dl
	mov	BYTE PTR -8[rbp], al
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L235
	movzx	ecx, BYTE PTR -8[rbp]
	movzx	edx, BYTE PTR -4[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, DWORD PTR -12[rbp]
	mov	r8d, esi
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L235:
	mov	edi, 69
	call	putByte
	mov	edi, 6
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -12[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -8[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE45:
	.size	p18q_write_single_cfg, .-p18q_write_single_cfg
	.globl	p18q_write_page
	.type	p18q_write_page, @function
p18q_write_page:
.LFB46:
	.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 -28[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -32[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -28[rbp], eax
	mov	BYTE PTR -1[rbp], 1
	mov	BYTE PTR -2[rbp], 0
	jmp	.L238
.L240:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	movzx	eax, BYTE PTR -2[rbp]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	and	eax, edx
	cmp	al, -1
	je	.L239
	mov	BYTE PTR -1[rbp], 0
.L239:
	add	BYTE PTR -2[rbp], 2
.L238:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L240
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L241
	movzx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, DWORD PTR -28[rbp]
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L241:
	cmp	BYTE PTR -1[rbp], 1
	jne	.L242
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L243
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L243:
	mov	eax, 0
	jmp	.L244
.L242:
	mov	edi, 70
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	add	eax, 4
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -32[rbp]
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 16
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	eax, DWORD PTR -28[rbp]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	mov	BYTE PTR -2[rbp], 0
	jmp	.L245
.L246:
	movzx	edx, BYTE PTR -2[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	putByte
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L245:
	movzx	eax, BYTE PTR -2[rbp]
	cmp	al, BYTE PTR -32[rbp]
	jb	.L246
	mov	eax, 0
	call	getByte
	mov	eax, 0
.L244:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE46:
	.size	p18q_write_page, .-p18q_write_page
	.globl	p16c_write_cfg
	.type	p16c_write_cfg, @function
p16c_write_cfg:
.LFB47:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR config_bytes[rip]
	movzx	ecx, al
	movzx	eax, BYTE PTR config_bytes[rip+1]
	movzx	eax, al
	mov	edx, 32775
	mov	esi, ecx
	mov	edi, eax
	call	p16c_write_single_cfg
	movzx	eax, BYTE PTR config_bytes[rip+2]
	movzx	ecx, al
	movzx	eax, BYTE PTR config_bytes[rip+3]
	movzx	eax, al
	mov	edx, 32776
	mov	esi, ecx
	mov	edi, eax
	call	p16c_write_single_cfg
	movzx	eax, BYTE PTR config_bytes[rip+4]
	movzx	ecx, al
	movzx	eax, BYTE PTR config_bytes[rip+5]
	movzx	eax, al
	mov	edx, 32777
	mov	esi, ecx
	mov	edi, eax
	call	p16c_write_single_cfg
	movzx	eax, BYTE PTR config_bytes[rip+6]
	movzx	ecx, al
	movzx	eax, BYTE PTR config_bytes[rip+7]
	movzx	eax, al
	mov	edx, 32778
	mov	esi, ecx
	mov	edi, eax
	call	p16c_write_single_cfg
	movzx	eax, BYTE PTR config_bytes[rip+8]
	movzx	ecx, al
	movzx	eax, BYTE PTR config_bytes[rip+9]
	movzx	eax, al
	mov	edx, 32779
	mov	esi, ecx
	mov	edi, eax
	call	p16c_write_single_cfg
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE47:
	.size	p16c_write_cfg, .-p16c_write_cfg
	.section	.rodata
.LC54:
	.string	"Entering programming mode\n"
	.text
	.globl	prog_enter_progmode
	.type	prog_enter_progmode, @function
prog_enter_progmode:
.LFB48:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L250
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC54[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L250:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	jne	.L251
	mov	edi, 1
	call	putByte
	jmp	.L252
.L251:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	jne	.L253
	mov	edi, 1
	call	putByte
	jmp	.L252
.L253:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L254
	mov	edi, 1
	call	putByte
	jmp	.L252
.L254:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	jne	.L255
	mov	edi, 16
	call	putByte
	jmp	.L252
.L255:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 3
	jne	.L256
	mov	edi, 16
	call	putByte
	jmp	.L252
.L256:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	jne	.L257
	mov	edi, 16
	call	putByte
	jmp	.L252
.L257:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	jne	.L258
	mov	edi, 16
	call	putByte
	jmp	.L252
.L258:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L259
	mov	edi, 64
	call	putByte
	jmp	.L252
.L259:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	jne	.L260
	mov	edi, 64
	call	putByte
	jmp	.L252
.L260:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	jne	.L252
	mov	edi, 64
	call	putByte
.L252:
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE48:
	.size	prog_enter_progmode, .-prog_enter_progmode
	.section	.rodata
.LC55:
	.string	"Exiting programming mode\n"
	.text
	.globl	prog_exit_progmode
	.type	prog_exit_progmode, @function
prog_exit_progmode:
.LFB49:
	.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 verbose[rip]
	cmp	eax, 2
	jle	.L263
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC55[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L263:
	mov	edi, 2
	call	putByte
	mov	edi, 0
	call	putByte
	mov	eax, 0
	call	getByte
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE49:
	.size	prog_exit_progmode, .-prog_exit_progmode
	.section	.rodata
.LC56:
	.string	"getting ID for family %d\n"
	.text
	.globl	prog_get_device_id
	.type	prog_get_device_id, @function
prog_get_device_id:
.LFB50:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L266
	mov	edx, DWORD PTR chip_family[rip]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC56[rip]
	mov	rdi, rax
	mov	eax, 0
	call	flsprintf
.L266:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L267
	call	p16a_get_devid
	jmp	.L272
.L267:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L269
	call	p16c_get_devid
	jmp	.L272
.L269:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 3
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	sete	al
	movzx	eax, al
	or	edx, eax
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L270
	lea	rax, -18[rbp]
	mov	edx, 2
	mov	esi, 4194302
	mov	rdi, rax
	call	p18a_read_page
	movzx	eax, BYTE PTR -17[rbp]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -18[rbp]
	movzx	eax, al
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR devid_mask[rip]
	and	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	jmp	.L272
.L270:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	sete	al
	or	eax, edx
	test	al, al
	je	.L271
	lea	rax, -18[rbp]
	mov	edx, 2
	mov	esi, 8388604
	mov	rdi, rax
	call	p16c_read_page
	movzx	eax, BYTE PTR -17[rbp]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -18[rbp]
	movzx	eax, al
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR devid_mask[rip]
	and	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	jmp	.L272
.L271:
	mov	eax, 0
.L272:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L273
	call	__stack_chk_fail@PLT
.L273:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE50:
	.size	prog_get_device_id, .-prog_get_device_id
	.section	.rodata
.LC57:
	.string	"--- : invalid"
.LC58:
	.string	"%2X"
.LC59:
	.string	"%4X"
	.align 8
.LC60:
	.string	"Line len %d B, type %d, address 0x%4.4x offset 0x%4.4x, EFF 0x%6.6x\n"
.LC61:
	.string	"PM "
.LC62:
	.string	"CB "
.LC63:
	.string	"%2.2X"
	.text
	.globl	parse_hex
	.type	parse_hex, @function
parse_hex:
.LFB51:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	QWORD PTR -216[rbp], rdi
	mov	QWORD PTR -224[rbp], rsi
	mov	QWORD PTR -232[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	DWORD PTR -180[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L275
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
.L275:
	mov	rax, QWORD PTR -216[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L276
	mov	eax, -1
	jmp	.L311
.L276:
	mov	DWORD PTR -188[rbp], 0
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	jne	.L278
	mov	DWORD PTR -180[rbp], 1
.L278:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	jne	.L279
	mov	DWORD PTR -180[rbp], 1
.L279:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L280
	mov	DWORD PTR -180[rbp], 1
.L280:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L281
	mov	DWORD PTR -180[rbp], 1
.L281:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L283
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L283
.L310:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L284
	mov	rdx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -176[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
.L284:
	mov	rax, QWORD PTR -168[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 58
	je	.L285
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L286
	lea	rdi, .LC57[rip]
	call	puts@PLT
.L286:
	mov	eax, -1
	jmp	.L311
.L285:
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, 1[rax]
	lea	rax, -200[rbp]
	mov	rdx, rax
	lea	rsi, .LC58[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, 3[rax]
	lea	rax, -192[rbp]
	mov	rdx, rax
	lea	rsi, .LC59[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, 7[rax]
	lea	rax, -196[rbp]
	mov	rdx, rax
	lea	rsi, .LC58[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -188[rbp]
	sal	eax, 16
	mov	edx, eax
	mov	eax, DWORD PTR -192[rbp]
	add	eax, edx
	mov	DWORD PTR -172[rbp], eax
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L287
	mov	esi, DWORD PTR -188[rbp]
	mov	ecx, DWORD PTR -192[rbp]
	mov	edx, DWORD PTR -196[rbp]
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, DWORD PTR -172[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC60[rip]
	mov	eax, 0
	call	printf@PLT
.L287:
	mov	eax, DWORD PTR -196[rbp]
	test	eax, eax
	jne	.L288
	mov	DWORD PTR -184[rbp], 0
	jmp	.L289
.L290:
	mov	rdx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -184[rbp]
	add	eax, eax
	cdqe
	add	rax, 9
	lea	rcx, [rdx+rax]
	lea	rax, -204[rbp]
	mov	rdx, rax
	lea	rsi, .LC58[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -204[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	mov	BYTE PTR -144[rbp+rax], dl
	add	DWORD PTR -184[rbp], 1
.L289:
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -184[rbp], eax
	jl	.L290
	mov	eax, DWORD PTR flash_size[rip]
	cmp	DWORD PTR -172[rbp], eax
	jge	.L291
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L292
	lea	rdi, .LC61[rip]
	mov	eax, 0
	call	printf@PLT
.L292:
	mov	DWORD PTR -184[rbp], 0
	jmp	.L293
.L294:
	mov	edx, DWORD PTR -172[rbp]
	mov	eax, DWORD PTR -184[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -224[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -144[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -184[rbp], 1
.L293:
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -184[rbp], eax
	jl	.L294
.L291:
	mov	eax, DWORD PTR -188[rbp]
	cmp	eax, 48
	sete	al
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	sete	cl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	sete	al
	or	eax, ecx
	movzx	ecx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	sete	al
	movzx	eax, al
	or	ecx, eax
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	sete	al
	movzx	eax, al
	or	ecx, eax
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	sete	al
	movzx	eax, al
	or	eax, ecx
	and	eax, edx
	test	eax, eax
	je	.L295
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L296
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	printf@PLT
.L296:
	mov	DWORD PTR -184[rbp], 0
	jmp	.L297
.L298:
	mov	eax, DWORD PTR -184[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -232[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -144[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -184[rbp], 1
.L297:
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -184[rbp], eax
	jl	.L298
.L295:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 3
	sete	cl
	mov	eax, DWORD PTR flash_size[rip]
	mov	edx, DWORD PTR config_size[rip]
	sub	eax, edx
	cmp	DWORD PTR -172[rbp], eax
	sete	al
	and	eax, ecx
	test	al, al
	je	.L299
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L300
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	printf@PLT
.L300:
	mov	DWORD PTR -184[rbp], 0
	jmp	.L301
.L302:
	mov	eax, DWORD PTR -184[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -232[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -144[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -184[rbp], 1
.L301:
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -184[rbp], eax
	jl	.L302
.L299:
	mov	eax, DWORD PTR -188[rbp]
	cmp	eax, 1
	sete	dl
	cmp	DWORD PTR -180[rbp], 1
	sete	al
	and	eax, edx
	test	al, al
	je	.L288
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L303
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	printf@PLT
.L303:
	mov	DWORD PTR -184[rbp], 0
	jmp	.L304
.L305:
	mov	edx, DWORD PTR -192[rbp]
	mov	eax, DWORD PTR -184[rbp]
	add	eax, edx
	cdqe
	lea	rdx, -14[rax]
	mov	rax, QWORD PTR -232[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -144[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -184[rbp], 1
.L304:
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -184[rbp], eax
	jl	.L305
.L288:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, 4
	jne	.L306
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, 9[rax]
	lea	rax, -188[rbp]
	mov	rdx, rax
	lea	rsi, .LC59[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	__isoc99_sscanf@PLT
.L306:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L307
	mov	DWORD PTR -184[rbp], 0
	jmp	.L308
.L309:
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -144[rbp+rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC63[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -184[rbp], 1
.L308:
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -184[rbp], eax
	jl	.L309
.L307:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L283
	mov	edi, 10
	call	putchar@PLT
.L283:
	mov	rdx, QWORD PTR -152[rbp]
	lea	rcx, -160[rbp]
	lea	rax, -168[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getlinex
	mov	DWORD PTR -176[rbp], eax
	cmp	DWORD PTR -176[rbp], -1
	jne	.L310
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L311:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L312
	call	__stack_chk_fail@PLT
.L312:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE51:
	.size	parse_hex, .-parse_hex
	.section	.rodata
.LC64:
	.string	"PP programmer, version %s\n"
.LC65:
	.string	"Opening serial port"
	.align 8
.LC66:
	.string	"Sleeping for %d ms while arduino bootloader expires\n"
.LC67:
	.string	"Device ID: %4.4x \n"
	.align 8
.LC68:
	.string	"Wrong device ID: %4.4x, expected: %4.4x\n"
	.align 8
.LC69:
	.string	"Check for connection to target MCU, exiting now"
.LC70:
	.string	"No or wrong input HEX file."
	.align 8
.LC71:
	.string	"Programming FLASH (%d B in %d pages per %d bytes): \n"
.LC72:
	.string	"\n%d pages programmed\n"
.LC73:
	.string	"Programming config"
	.align 8
.LC74:
	.string	"Verifying FLASH (%d B in %d pages per %d bytes): \n"
.LC75:
	.string	"Verifying page at 0x%4.4X\n"
	.align 8
.LC76:
	.string	"Error at 0x%4.4X E:0x%2.2X R:0x%2.2X\n"
.LC77:
	.string	"Exiting now"
.LC78:
	.string	"\n%d pages verified\n"
.LC79:
	.string	"Verifying config..."
	.align 8
.LC80:
	.string	"Error at 0x%2.2X E:0x%2.2X R:0x%2.2X\n"
.LC81:
	.string	"OK"
	.align 8
.LC82:
	.string	"Programming FLASH (%d B in %d pages)"
	.align 8
.LC83:
	.string	"Verifying FLASH (%d B in %d pages)"
.LC84:
	.string	"Verifying config"
.LC85:
	.string	"config 1 OK: %4.4X\n"
	.align 8
.LC86:
	.string	"config 1 error: E:0x%4.4X R:0x%4.4X\n"
.LC87:
	.string	"config 2 OK: %4.4X\n"
	.align 8
.LC88:
	.string	"config 2 error: E:0x%4.4X R:0x%4.4X\n"
.LC89:
	.string	"config 3 OK: %4.4X\n"
	.align 8
.LC90:
	.string	"config 3 error: E:0x%4.4X R:0x%4.4X\n"
.LC91:
	.string	"config 4 OK: %4.4X\n"
	.align 8
.LC92:
	.string	"config 4 error: E:0x%4.4X R:0x%4.4X\n"
	.align 8
.LC93:
	.string	"Reading FLASH (%d B in %d pages)"
.LC94:
	.string	"wb"
.LC95:
	.string	"_flash.bin"
.LC96:
	.string	"Reading EEPROM"
.LC97:
	.string	"_eeprom.bin"
.LC98:
	.string	"Reading config"
.LC99:
	.string	"_config.bin"
	.text
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 288
	mov	DWORD PTR -276[rbp], edi
	mov	QWORD PTR -288[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -288[rbp]
	mov	eax, DWORD PTR -276[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	parseArgs
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L314
	mov	rax, QWORD PTR PP_VER[rip]
	mov	rsi, rax
	lea	rdi, .LC64[rip]
	mov	eax, 0
	call	printf@PLT
.L314:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L315
	lea	rdi, .LC65[rip]
	call	puts@PLT
.L315:
	mov	eax, 0
	call	initSerialPort
	mov	eax, DWORD PTR sleep_time[rip]
	test	eax, eax
	jle	.L316
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L317
	mov	eax, DWORD PTR sleep_time[rip]
	mov	esi, eax
	lea	rdi, .LC66[rip]
	mov	eax, 0
	call	printf@PLT
.L317:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR sleep_time[rip]
	mov	edi, eax
	call	sleep_ms
.L316:
	mov	DWORD PTR -260[rbp], 0
	jmp	.L318
.L319:
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, progmem[rip]
	mov	BYTE PTR [rax+rdx], -1
	add	DWORD PTR -260[rbp], 1
.L318:
	cmp	DWORD PTR -260[rbp], 259999
	jle	.L319
	mov	DWORD PTR -260[rbp], 0
	jmp	.L320
.L321:
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, config_bytes[rip]
	mov	BYTE PTR [rax+rdx], -1
	add	DWORD PTR -260[rbp], 1
.L320:
	cmp	DWORD PTR -260[rbp], 31
	jle	.L321
	mov	eax, DWORD PTR -276[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -288[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -240[rbp], rax
	lea	rax, progmem[rip]
	mov	QWORD PTR -232[rbp], rax
	lea	rax, config_bytes[rip]
	mov	QWORD PTR -224[rbp], rax
	mov	rdx, QWORD PTR -224[rbp]
	mov	rcx, QWORD PTR -232[rbp]
	mov	rax, QWORD PTR -240[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	parse_hex
	mov	DWORD PTR -248[rbp], eax
	mov	DWORD PTR -260[rbp], 0
	jmp	.L322
.L323:
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, progmem[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rcx, file_image[rip]
	mov	BYTE PTR [rax+rcx], dl
	add	DWORD PTR -260[rbp], 1
.L322:
	cmp	DWORD PTR -260[rbp], 69999
	jle	.L323
	mov	DWORD PTR -260[rbp], 0
	jmp	.L324
.L325:
	mov	eax, DWORD PTR -260[rbp]
	lea	ecx, 65550[rax]
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, config_bytes[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	movsx	rax, ecx
	lea	rcx, file_image[rip]
	mov	BYTE PTR [rax+rcx], dl
	add	DWORD PTR -260[rbp], 1
.L324:
	cmp	DWORD PTR -260[rbp], 9
	jle	.L325
	mov	DWORD PTR -260[rbp], 0
	jmp	.L326
.L328:
	mov	eax, DWORD PTR -260[rbp]
	and	eax, 1
	test	eax, eax
	je	.L327
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, file_image[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	and	eax, 63
	mov	ecx, eax
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, file_image[rip]
	mov	BYTE PTR [rax+rdx], cl
.L327:
	add	DWORD PTR -260[rbp], 1
.L326:
	cmp	DWORD PTR -260[rbp], 69999
	jle	.L328
	call	prog_enter_progmode
	call	prog_get_device_id
	mov	DWORD PTR -260[rbp], eax
	mov	eax, DWORD PTR devid_expected[rip]
	cmp	DWORD PTR -260[rbp], eax
	jne	.L329
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L330
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	lea	rdi, .LC67[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L330
.L329:
	mov	edx, DWORD PTR devid_expected[rip]
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	lea	rdi, .LC68[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC69[rip]
	call	puts@PLT
	call	prog_exit_progmode
	mov	eax, 1
	jmp	.L441
.L330:
	mov	eax, DWORD PTR readflash[rip]
	cmp	eax, 1
	jne	.L332
	mov	DWORD PTR program[rip], 0
	mov	DWORD PTR verify[rip], 0
.L332:
	cmp	DWORD PTR -248[rbp], -1
	jne	.L333
	mov	eax, DWORD PTR program[rip]
	cmp	eax, 1
	jne	.L333
	mov	eax, DWORD PTR verify[rip]
	cmp	eax, 1
	jne	.L333
	lea	rdi, .LC70[rip]
	call	puts@PLT
	call	prog_exit_progmode
	mov	eax, 1
	jmp	.L441
.L333:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 3
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	sete	al
	movzx	eax, al
	or	edx, eax
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	sete	al
	movzx	eax, al
	or	edx, eax
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	sete	al
	movzx	eax, al
	or	edx, eax
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L334
	mov	eax, DWORD PTR program[rip]
	cmp	eax, 1
	jne	.L335
	mov	DWORD PTR -252[rbp], 0
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	jne	.L336
	call	p18a_mass_erase
.L336:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 3
	jne	.L337
	call	p18b_mass_erase
.L337:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	jne	.L338
	call	p18d_mass_erase
.L338:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	jne	.L339
	call	p18e_mass_erase
.L339:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	sete	al
	or	eax, edx
	test	al, al
	je	.L340
	call	p16c_mass_erase
.L340:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L341
	mov	ecx, DWORD PTR page_size[rip]
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, DWORD PTR page_size[rip]
	cdq
	idiv	esi
	mov	edx, eax
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, eax
	lea	rdi, .LC71[rip]
	mov	eax, 0
	call	printf@PLT
.L341:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	DWORD PTR -260[rbp], 0
	jmp	.L342
.L349:
	mov	eax, DWORD PTR page_size[rip]
	mov	edx, DWORD PTR -260[rbp]
	movsx	rdx, edx
	lea	rcx, progmem[rip]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	is_empty
	test	eax, eax
	jne	.L343
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	sete	al
	or	eax, edx
	test	al, al
	je	.L344
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rcx, progmem[rip]
	add	rcx, rax
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	mov	rdi, rcx
	call	p18d_write_page
	jmp	.L345
.L344:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	jne	.L346
	mov	eax, DWORD PTR page_size[rip]
	movzx	eax, al
	mov	edx, DWORD PTR -260[rbp]
	lea	esi, [rdx+rdx]
	mov	edx, DWORD PTR -260[rbp]
	movsx	rdx, edx
	lea	rcx, progmem[rip]
	add	rcx, rdx
	mov	edx, eax
	mov	rdi, rcx
	call	p16c_write_page
	jmp	.L345
.L346:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	jne	.L347
	mov	eax, DWORD PTR page_size[rip]
	movzx	eax, al
	mov	edx, DWORD PTR -260[rbp]
	lea	esi, [rdx+rdx]
	mov	edx, DWORD PTR -260[rbp]
	movsx	rdx, edx
	lea	rcx, progmem[rip]
	add	rcx, rdx
	mov	edx, eax
	mov	rdi, rcx
	call	p18q_write_page
	jmp	.L345
.L347:
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rcx, progmem[rip]
	add	rcx, rax
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	mov	rdi, rcx
	call	p18a_write_page
.L345:
	add	DWORD PTR -252[rbp], 1
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L348
	mov	edi, 35
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L348
.L343:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L348
	mov	edi, 46
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L348:
	mov	eax, DWORD PTR page_size[rip]
	add	DWORD PTR -260[rbp], eax
.L342:
	mov	eax, DWORD PTR flash_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L349
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L350
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC72[rip]
	mov	eax, 0
	call	printf@PLT
.L350:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L351
	lea	rdi, .LC73[rip]
	call	puts@PLT
.L351:
	mov	DWORD PTR -260[rbp], 0
	jmp	.L352
.L358:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 1
	jne	.L353
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 3145728[rax]
	mov	eax, DWORD PTR -260[rbp]
	add	eax, 1
	cdqe
	lea	rcx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rsi, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rsi]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	p18a_write_cfg
.L353:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 5
	jne	.L354
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 3145728[rax]
	mov	eax, DWORD PTR -260[rbp]
	add	eax, 1
	cdqe
	lea	rcx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rsi, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rsi]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	p18d_write_cfg
.L354:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 6
	jne	.L355
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 3145728[rax]
	mov	eax, DWORD PTR -260[rbp]
	add	eax, 1
	cdqe
	lea	rcx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rsi, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rsi]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	p18d_write_cfg
.L355:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	jne	.L356
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 3145728[rax]
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rcx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	add	eax, 1
	cdqe
	lea	rsi, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rsi]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	p16c_write_single_cfg
.L356:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	jne	.L357
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 3145728[rax]
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rcx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	add	eax, 1
	cdqe
	lea	rsi, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rsi]
	movzx	eax, al
	mov	esi, ecx
	mov	edi, eax
	call	p18q_write_single_cfg
.L357:
	add	DWORD PTR -260[rbp], 2
.L352:
	mov	eax, DWORD PTR config_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L358
.L335:
	mov	eax, DWORD PTR verify[rip]
	cmp	eax, 1
	jne	.L379
	mov	DWORD PTR -252[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L360
	mov	ecx, DWORD PTR page_size[rip]
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, DWORD PTR page_size[rip]
	cdq
	idiv	esi
	mov	edx, eax
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, eax
	lea	rdi, .LC74[rip]
	mov	eax, 0
	call	printf@PLT
.L360:
	mov	DWORD PTR -260[rbp], 0
	jmp	.L361
.L371:
	mov	eax, DWORD PTR page_size[rip]
	mov	edx, DWORD PTR -260[rbp]
	movsx	rdx, edx
	lea	rcx, progmem[rip]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	is_empty
	test	eax, eax
	je	.L362
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 2
	jle	.L363
	mov	edi, 35
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L363
.L362:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	sete	al
	or	eax, edx
	test	al, al
	je	.L364
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	eax, DWORD PTR -260[rbp]
	lea	ecx, [rax+rax]
	lea	rax, -208[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	p16c_read_page
	jmp	.L365
.L364:
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	ecx, DWORD PTR -260[rbp]
	lea	rax, -208[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	p18a_read_page
.L365:
	add	DWORD PTR -252[rbp], 1
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 3
	jle	.L366
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	lea	rdi, .LC75[rip]
	mov	eax, 0
	call	printf@PLT
.L366:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L367
	mov	edi, 35
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L367:
	mov	DWORD PTR -256[rbp], 0
	jmp	.L368
.L370:
	mov	edx, DWORD PTR -260[rbp]
	mov	eax, DWORD PTR -256[rbp]
	add	eax, edx
	cdqe
	lea	rdx, progmem[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	cmp	dl, al
	je	.L369
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	movzx	edx, al
	mov	ecx, DWORD PTR -260[rbp]
	mov	eax, DWORD PTR -256[rbp]
	add	eax, ecx
	cdqe
	lea	rcx, progmem[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	eax, al
	mov	esi, DWORD PTR -260[rbp]
	mov	ecx, DWORD PTR -256[rbp]
	add	esi, ecx
	mov	ecx, edx
	mov	edx, eax
	lea	rdi, .LC76[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC77[rip]
	call	puts@PLT
	call	prog_exit_progmode
	mov	edi, 0
	call	exit@PLT
.L369:
	add	DWORD PTR -256[rbp], 1
.L368:
	mov	eax, DWORD PTR page_size[rip]
	cmp	DWORD PTR -256[rbp], eax
	jl	.L370
.L363:
	mov	eax, DWORD PTR page_size[rip]
	add	DWORD PTR -260[rbp], eax
.L361:
	mov	eax, DWORD PTR flash_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L371
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L372
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC78[rip]
	mov	eax, 0
	call	printf@PLT
.L372:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 9
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 11
	sete	al
	or	eax, edx
	test	al, al
	je	.L373
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, 6291456
	mov	rdi, rax
	call	p16c_read_page
	jmp	.L374
.L373:
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, 3145728
	mov	rdi, rax
	call	p18a_read_page
.L374:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L375
	lea	rdi, .LC79[rip]
	mov	eax, 0
	call	printf@PLT
.L375:
	mov	DWORD PTR -260[rbp], 0
	jmp	.L376
.L378:
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, config_bytes[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	cmp	dl, al
	je	.L377
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rdx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	edx, al
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	lea	rdi, .LC80[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC77[rip]
	call	puts@PLT
	call	prog_exit_progmode
	mov	edi, 0
	call	exit@PLT
.L377:
	add	DWORD PTR -260[rbp], 1
.L376:
	mov	eax, DWORD PTR config_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L378
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L379
	lea	rdi, .LC81[rip]
	call	puts@PLT
	jmp	.L379
.L334:
	mov	eax, DWORD PTR program[rip]
	cmp	eax, 1
	jne	.L380
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L381
	call	p16a_mass_erase
.L381:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L382
	call	p16c_mass_erase
.L382:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L383
	call	p16a_rst_pointer
.L383:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L384
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, DWORD PTR page_size[rip]
	cdq
	idiv	esi
	mov	edx, eax
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, eax
	lea	rdi, .LC82[rip]
	mov	eax, 0
	call	printf@PLT
.L384:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	DWORD PTR -260[rbp], 0
	jmp	.L385
.L389:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L386
	mov	edi, 46
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L386:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L387
	mov	eax, DWORD PTR page_size[rip]
	movzx	ecx, al
	mov	eax, DWORD PTR -260[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	p16a_program_page
.L387:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L388
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	lea	rcx, progmem[rip]
	add	rcx, rax
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, eax
	mov	rdi, rcx
	call	p16c_write_page
.L388:
	mov	eax, DWORD PTR page_size[rip]
	add	DWORD PTR -260[rbp], eax
.L385:
	mov	eax, DWORD PTR flash_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L389
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L390
	mov	edi, 10
	call	putchar@PLT
.L390:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L391
	lea	rdi, .LC73[rip]
	call	puts@PLT
.L391:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L392
	call	p16a_program_config
.L392:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L380
	call	p16c_write_cfg
.L380:
	mov	eax, DWORD PTR verify[rip]
	cmp	eax, 1
	jne	.L393
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L394
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, DWORD PTR page_size[rip]
	cdq
	idiv	esi
	mov	edx, eax
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, eax
	lea	rdi, .LC83[rip]
	mov	eax, 0
	call	printf@PLT
.L394:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L395
	call	p16a_rst_pointer
.L395:
	mov	DWORD PTR -260[rbp], 0
	jmp	.L396
.L403:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L397
	mov	edi, 46
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L397:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L398
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	p16a_read_page
.L398:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L399
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	ecx, DWORD PTR -260[rbp]
	lea	rax, -208[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	p16c_read_page
.L399:
	mov	DWORD PTR -256[rbp], 0
	jmp	.L400
.L402:
	mov	edx, DWORD PTR -260[rbp]
	mov	eax, DWORD PTR -256[rbp]
	add	eax, edx
	cdqe
	lea	rdx, file_image[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	cmp	dl, al
	je	.L401
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	movzx	edx, al
	mov	ecx, DWORD PTR -260[rbp]
	mov	eax, DWORD PTR -256[rbp]
	add	eax, ecx
	cdqe
	lea	rcx, file_image[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	eax, al
	mov	esi, DWORD PTR -260[rbp]
	mov	ecx, DWORD PTR -256[rbp]
	add	esi, ecx
	mov	ecx, edx
	mov	edx, eax
	lea	rdi, .LC76[rip]
	mov	eax, 0
	call	printf@PLT
	call	prog_exit_progmode
	mov	edi, 0
	call	exit@PLT
.L401:
	add	DWORD PTR -256[rbp], 1
.L400:
	mov	eax, DWORD PTR page_size[rip]
	cmp	DWORD PTR -256[rbp], eax
	jl	.L402
	mov	eax, DWORD PTR page_size[rip]
	add	DWORD PTR -260[rbp], eax
.L396:
	mov	eax, DWORD PTR flash_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L403
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L404
	mov	edi, 10
	call	putchar@PLT
.L404:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L405
	lea	rdi, .LC84[rip]
	call	puts@PLT
.L405:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L406
	mov	edi, 7
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	movzx	eax, BYTE PTR file_image[rip+65550]
	movzx	edx, al
	movzx	eax, BYTE PTR file_image[rip+65551]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -244[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	cmp	DWORD PTR -244[rbp], eax
	jne	.L407
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L408
	mov	eax, DWORD PTR -264[rbp]
	mov	esi, eax
	lea	rdi, .LC85[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L408
.L407:
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, DWORD PTR -244[rbp]
	mov	esi, eax
	lea	rdi, .LC86[rip]
	mov	eax, 0
	call	printf@PLT
.L408:
	mov	edi, 8
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	movzx	eax, BYTE PTR file_image[rip+65552]
	movzx	edx, al
	movzx	eax, BYTE PTR file_image[rip+65553]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -244[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	cmp	DWORD PTR -244[rbp], eax
	jne	.L409
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L410
	mov	eax, DWORD PTR -264[rbp]
	mov	esi, eax
	lea	rdi, .LC87[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L410
.L409:
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, DWORD PTR -244[rbp]
	mov	esi, eax
	lea	rdi, .LC88[rip]
	mov	eax, 0
	call	printf@PLT
.L410:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L406
	mov	edi, 9
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	movzx	eax, BYTE PTR file_image[rip+65554]
	movzx	edx, al
	movzx	eax, BYTE PTR file_image[rip+65555]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -244[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	cmp	DWORD PTR -244[rbp], eax
	jne	.L411
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L412
	mov	eax, DWORD PTR -264[rbp]
	mov	esi, eax
	lea	rdi, .LC89[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L412
.L411:
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, DWORD PTR -244[rbp]
	mov	esi, eax
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
.L412:
	mov	edi, 10
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	movzx	eax, BYTE PTR file_image[rip+65556]
	movzx	edx, al
	movzx	eax, BYTE PTR file_image[rip+65557]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	DWORD PTR -244[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	cmp	DWORD PTR -244[rbp], eax
	jne	.L413
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L406
	mov	eax, DWORD PTR -264[rbp]
	mov	esi, eax
	lea	rdi, .LC91[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L406
.L413:
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, DWORD PTR -244[rbp]
	mov	esi, eax
	lea	rdi, .LC92[rip]
	mov	eax, 0
	call	printf@PLT
.L406:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L393
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, 65550
	mov	rdi, rax
	call	p16c_read_page
	mov	DWORD PTR -256[rbp], 0
	jmp	.L414
.L416:
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	lea	rdx, config_bytes[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	cmp	dl, al
	je	.L415
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	movzx	eax, BYTE PTR -208[rbp+rax]
	movzx	edx, al
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	lea	rcx, config_bytes[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	movzx	eax, al
	mov	esi, DWORD PTR -260[rbp]
	mov	ecx, DWORD PTR -256[rbp]
	add	esi, ecx
	mov	ecx, edx
	mov	edx, eax
	lea	rdi, .LC76[rip]
	mov	eax, 0
	call	printf@PLT
	call	prog_exit_progmode
	mov	edi, 0
	call	exit@PLT
.L415:
	add	DWORD PTR -256[rbp], 1
.L414:
	cmp	DWORD PTR -256[rbp], 9
	jle	.L416
.L393:
	mov	eax, DWORD PTR readflash[rip]
	cmp	eax, 1
	jne	.L379
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L417
	mov	eax, DWORD PTR flash_size[rip]
	mov	ecx, DWORD PTR page_size[rip]
	cdq
	idiv	ecx
	mov	edx, eax
	mov	eax, DWORD PTR flash_size[rip]
	mov	esi, eax
	lea	rdi, .LC93[rip]
	mov	eax, 0
	call	printf@PLT
.L417:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L418
	call	p16a_rst_pointer
.L418:
	lea	rsi, .LC94[rip]
	lea	rdi, .LC95[rip]
	call	fopen@PLT
	mov	QWORD PTR -216[rbp], rax
	mov	DWORD PTR -260[rbp], 0
	jmp	.L419
.L424:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L420
	mov	edi, 46
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L420:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L421
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	p16a_read_page
.L421:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L422
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	mov	ecx, DWORD PTR -260[rbp]
	lea	rax, -208[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	p16c_read_page
.L422:
	cmp	QWORD PTR -216[rbp], 0
	je	.L423
	mov	eax, DWORD PTR page_size[rip]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -208[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
.L423:
	mov	eax, DWORD PTR page_size[rip]
	add	DWORD PTR -260[rbp], eax
.L419:
	mov	eax, DWORD PTR flash_size[rip]
	cmp	DWORD PTR -260[rbp], eax
	jl	.L424
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L425
	mov	edi, 10
	call	putchar@PLT
.L425:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L426
	lea	rdi, .LC96[rip]
	mov	eax, 0
	call	printf@PLT
.L426:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L427
	mov	edi, 61440
	call	p16d_set_pointer
.L427:
	lea	rsi, .LC94[rip]
	lea	rdi, .LC97[rip]
	call	fopen@PLT
	mov	QWORD PTR -216[rbp], rax
	mov	DWORD PTR -260[rbp], 0
	jmp	.L428
.L433:
	mov	eax, DWORD PTR verbose[rip]
	cmp	eax, 1
	jle	.L429
	mov	edi, 46
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L429:
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	je	.L430
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L431
.L430:
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	p16a_read_eeprom
.L431:
	cmp	QWORD PTR -216[rbp], 0
	je	.L432
	mov	eax, DWORD PTR page_size[rip]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -208[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
.L432:
	mov	eax, DWORD PTR page_size[rip]
	add	DWORD PTR -260[rbp], eax
.L428:
	cmp	DWORD PTR -260[rbp], 255
	jle	.L433
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L434
	mov	edi, 10
	call	putchar@PLT
.L434:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jle	.L435
	lea	rdi, .LC98[rip]
	call	puts@PLT
.L435:
	lea	rsi, .LC94[rip]
	lea	rdi, .LC99[rip]
	call	fopen@PLT
	mov	QWORD PTR -216[rbp], rax
	mov	eax, DWORD PTR chip_family[rip]
	test	eax, eax
	sete	dl
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 2
	sete	al
	or	eax, edx
	movzx	edx, al
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	sete	al
	movzx	eax, al
	or	eax, edx
	test	eax, eax
	je	.L436
	mov	edi, 7
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	cmp	QWORD PTR -216[rbp], 0
	je	.L437
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -264[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
.L437:
	mov	edi, 8
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	cmp	QWORD PTR -216[rbp], 0
	je	.L436
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -264[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
.L436:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 8
	jne	.L438
	mov	edi, 9
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	cmp	QWORD PTR -216[rbp], 0
	je	.L439
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -264[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
.L439:
	mov	edi, 10
	call	p16a_get_config
	mov	DWORD PTR -264[rbp], eax
	cmp	QWORD PTR -216[rbp], 0
	je	.L438
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -264[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
.L438:
	mov	eax, DWORD PTR chip_family[rip]
	cmp	eax, 7
	jne	.L440
	mov	eax, DWORD PTR page_size[rip]
	movzx	edx, al
	lea	rax, -208[rbp]
	mov	esi, 65550
	mov	rdi, rax
	call	p16c_read_page
	cmp	QWORD PTR -216[rbp], 0
	je	.L440
	mov	rdx, QWORD PTR -216[rbp]
	lea	rax, -208[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 10
	mov	rdi, rax
	call	fwrite@PLT
.L440:
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L379:
	call	prog_exit_progmode
	mov	eax, 0
.L441:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L442
	call	__stack_chk_fail@PLT
.L442:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE52:
	.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	"424007.c"
	.text
	.global	COM
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\000"
	.data
	.align	2
	.type	COM, %object
	.size	COM, 4
COM:
	.word	.LC0
	.global	PP_VER
	.section	.rodata
	.align	2
.LC1:
	.ascii	"0.99\000"
	.data
	.align	2
	.type	PP_VER, %object
	.size	PP_VER, 4
PP_VER:
	.word	.LC1
	.global	verbose
	.align	2
	.type	verbose, %object
	.size	verbose, 4
verbose:
	.word	1
	.global	verify
	.align	2
	.type	verify, %object
	.size	verify, 4
verify:
	.word	1
	.global	program
	.align	2
	.type	program, %object
	.size	program, 4
program:
	.word	1
	.global	sleep_time
	.bss
	.align	2
	.type	sleep_time, %object
	.size	sleep_time, 4
sleep_time:
	.space	4
	.global	readflash
	.align	2
	.type	readflash, %object
	.size	readflash, 4
readflash:
	.space	4
	.global	baudRate
	.data
	.align	2
	.type	baudRate, %object
	.size	baudRate, 4
baudRate:
	.word	115200
	.comm	devid_expected,4,4
	.comm	devid_mask,4,4
	.comm	com,4,4
	.comm	flash_size,4,4
	.comm	page_size,4,4
	.comm	chip_family,4,4
	.comm	config_size,4,4
	.comm	file_image,70000,4
	.comm	progmem,260000,4
	.comm	config_bytes,32,4
	.text
	.align	2
	.global	get_unix_baud
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_unix_baud, %function
get_unix_baud:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L16
	ldr	r3, [r3]
	ldr	r2, .L16+4
	cmp	r3, r2
	beq	.L2
	ldr	r2, .L16+4
	cmp	r3, r2
	bgt	.L3
	ldr	r2, .L16+8
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L16+8
	cmp	r3, r2
	bgt	.L3
	cmp	r3, #921600
	beq	.L5
	cmp	r3, #921600
	bgt	.L3
	ldr	r2, .L16+12
	cmp	r3, r2
	beq	.L6
	ldr	r2, .L16+12
	cmp	r3, r2
	bgt	.L3
	ldr	r2, .L16+16
	cmp	r3, r2
	beq	.L7
	ldr	r2, .L16+16
	cmp	r3, r2
	bgt	.L3
	ldr	r2, .L16+20
	cmp	r3, r2
	beq	.L8
	ldr	r2, .L16+20
	cmp	r3, r2
	bgt	.L3
	cmp	r3, #230400
	beq	.L9
	cmp	r3, #230400
	bgt	.L3
	ldr	r2, .L16+24
	cmp	r3, r2
	beq	.L10
	ldr	r2, .L16+24
	cmp	r3, r2
	bgt	.L3
	cmp	r3, #57600
	beq	.L11
	cmp	r3, #57600
	bgt	.L3
	cmp	r3, #38400
	beq	.L12
	cmp	r3, #38400
	bgt	.L3
	cmp	r3, #9600
	beq	.L13
	cmp	r3, #19200
	beq	.L14
	b	.L3
.L13:
	mov	r3, #13
	b	.L15
.L14:
	mov	r3, #14
	b	.L15
.L12:
	mov	r3, #15
	b	.L15
.L11:
	ldr	r3, .L16+28
	b	.L15
.L10:
	ldr	r3, .L16+32
	b	.L15
.L9:
	ldr	r3, .L16+36
	b	.L15
.L8:
	ldr	r3, .L16+40
	b	.L15
.L7:
	ldr	r3, .L16+44
	b	.L15
.L6:
	ldr	r3, .L16+48
	b	.L15
.L5:
	ldr	r3, .L16+52
	b	.L15
.L4:
	ldr	r3, .L16+56
	b	.L15
.L2:
	ldr	r3, .L16+60
	b	.L15
.L3:
	ldr	r3, .L16+32
.L15:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L17:
	.align	2
.L16:
	.word	baudRate
	.word	1152000
	.word	1000000
	.word	576000
	.word	500000
	.word	460800
	.word	115200
	.word	4097
	.word	4098
	.word	4099
	.word	4100
	.word	4101
	.word	4102
	.word	4103
	.word	4104
	.word	4105
	.size	get_unix_baud, .-get_unix_baud
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Opening: %s at %d\012\000"
	.align	2
.LC3:
	.ascii	"Failed to open serial port\000"
	.align	2
.LC4:
	.ascii	"Err tcgetattr\000"
	.align	2
.LC5:
	.ascii	"set attr error\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	initSerialPort
	.syntax unified
	.arm
	.fpu softvfp
	.type	initSerialPort, %function
initSerialPort:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L24+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L19
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, .L24+12
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L24+16
	bl	printf
.L19:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r1, .L24+20
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L24+24
	str	r3, [r2]
	ldr	r3, .L24+24
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L24+28
	bl	comErr
.L20:
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L24+24
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #4
	mov	r0, r3
	bl	fcntl
	ldr	r3, .L24+24
	ldr	r3, [r3]
	sub	r2, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	ldr	r0, .L24+32
	bl	puts
.L21:
	bl	get_unix_baud
	mov	r2, r0
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	cfsetispeed
	bl	get_unix_baud
	mov	r2, r0
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	cfsetospeed
	ldr	r3, [fp, #-56]
	bic	r3, r3, #27
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-60]
	orr	r3, r3, #2176
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #256
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #64
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #48
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	orr	r3, r3, #48
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-64]
	bic	r3, r3, #1
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #16
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #256
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #7168
	str	r3, [fp, #-68]
	mov	r3, #0
	strb	r3, [fp, #-45]
	mov	r3, #10
	strb	r3, [fp, #-46]
	ldr	r3, .L24+24
	ldr	r3, [r3]
	sub	r2, fp, #68
	mov	r1, #0
	mov	r0, r3
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L24+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	ldr	r0, .L24+36
	bl	printf
	bl	abort
.L22:
	ldr	r3, .L24+24
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	tcflush
	nop
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC6
	.word	verbose
	.word	COM
	.word	baudRate
	.word	.LC2
	.word	2306
	.word	com
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	initSerialPort, .-initSerialPort
	.section	.rodata
	.align	2
.LC7:
	.ascii	"TX: 0x%02X\012\000"
	.align	2
.LC8:
	.ascii	"Serial port failed to send a byte, write returned %"
	.ascii	"d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	putByte
	.syntax unified
	.arm
	.fpu softvfp
	.type	putByte, %function
putByte:
	@ 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, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	and	r3, r3, #255
	strb	r3, [fp, #-13]
	ldr	r3, .L31+4
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L27
	ldr	r3, .L31+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L31+12
	mov	r0, r3
	bl	flsprintf
.L27:
	ldr	r3, .L31+16
	ldr	r3, [r3]
	sub	r1, fp, #13
	mov	r2, #1
	mov	r0, r3
	bl	write
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L30
	ldr	r1, [fp, #-12]
	ldr	r0, .L31+20
	bl	comErr
.L30:
	nop
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC9
	.word	verbose
	.word	stdout
	.word	.LC7
	.word	com
	.word	.LC8
	.size	putByte, .-putByte
	.align	2
	.global	putBytes
	.syntax unified
	.arm
	.fpu softvfp
	.type	putBytes, %function
putBytes:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L34
.L35:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L34:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L35
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	putBytes, .-putBytes
	.section	.rodata
	.align	2
.LC10:
	.ascii	"RX: fail\012\000"
	.align	2
.LC11:
	.ascii	"RX:  0x%02X\012\000"
	.align	2
.LC12:
	.ascii	"Serial port failed to receive a byte, read returned"
	.ascii	" %d\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getByte
	.syntax unified
	.arm
	.fpu softvfp
	.type	getByte, %function
getByte:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L44+4
	ldr	r3, [r3]
	sub	r1, fp, #13
	mov	r2, #1
	mov	r0, r3
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L37
	ldr	r3, .L44+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L38
	ldr	r3, .L44+16
	b	.L39
.L38:
	ldr	r3, .L44+20
.L39:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	mov	r1, r3
	bl	flsprintf
.L37:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L40
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	b	.L42
.L40:
	ldr	r1, [fp, #-12]
	ldr	r0, .L44+24
	bl	comErr
	mvn	r3, #0
.L42:
	ldr	r2, .L44
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC13
	.word	com
	.word	verbose
	.word	stdout
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	getByte, .-getByte
	.section	.rodata
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	comErr
	.syntax unified
	.arm
	.fpu softvfp
	.type	comErr, %function
comErr:
	@ args = 4, pretend = 16, frame = 520
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #520
	ldr	r3, [fp, #4]
	str	r3, [fp, #-520]
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-512]
	sub	r0, fp, #508
	ldr	r3, [fp, #-512]
	ldr	r2, [fp, #-520]
	mov	r1, #500
	bl	vsnprintf
	ldr	r3, .L48+4
	ldr	r2, [r3]
	sub	r3, fp, #508
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r3, .L48+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mvn	r0, #0
	bl	exit
.L49:
	.align	2
.L48:
	.word	.LC14
	.word	stderr
	.word	COM
	.size	comErr, .-comErr
	.section	.rodata
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	flsprintf
	.syntax unified
	.arm
	.fpu softvfp
	.type	flsprintf, %function
flsprintf:
	@ args = 4, pretend = 12, frame = 520
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #524
	str	r0, [fp, #-524]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-528]
	ldr	r3, .L52
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-516]
	sub	r0, fp, #512
	ldr	r3, [fp, #-516]
	ldr	r2, [fp, #-528]
	mov	r1, #500
	bl	vsnprintf
	sub	r3, fp, #512
	ldr	r1, [fp, #-524]
	mov	r0, r3
	bl	fputs
	ldr	r0, [fp, #-524]
	bl	fflush
	nop
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L51
	bl	__stack_chk_fail
.L51:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #12
	bx	lr
.L53:
	.align	2
.L52:
	.word	.LC15
	.size	flsprintf, .-flsprintf
	.align	2
	.global	is_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_empty, %function
is_empty:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L55
.L57:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	beq	.L56
	mov	r3, #0
	str	r3, [fp, #-8]
.L56:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L55:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L57
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_empty, .-is_empty
	.align	2
	.global	getlinex
	.syntax unified
	.arm
	.fpu softvfp
	.type	getlinex, %function
getlinex:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L60
	mvn	r3, #0
	b	.L61
.L60:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L62
	mvn	r3, #0
	b	.L61
.L62:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L63
	mvn	r3, #0
	b	.L61
.L63:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-32]
	bl	fgetc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L64
	mvn	r3, #0
	b	.L61
.L64:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L65
	mov	r0, #128
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L66
	mvn	r3, #0
	b	.L61
.L66:
	mov	r3, #128
	str	r3, [fp, #-12]
.L65:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L67
.L71:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	cmp	r2, r3
	bls	.L68
	ldr	r3, [fp, #-12]
	add	r3, r3, #128
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-20]
	bl	realloc
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L68
	mvn	r3, #0
	b	.L61
.L68:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	beq	.L72
	ldr	r0, [fp, #-32]
	bl	fgetc
	str	r0, [fp, #-8]
.L67:
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L71
	b	.L70
.L72:
	nop
.L70:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	sub	r3, r3, #1
.L61:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	getlinex, .-getlinex
	.section	.rodata
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sleep_ms
	.syntax unified
	.arm
	.fpu softvfp
	.type	sleep_ms, %function
sleep_ms:
	@ 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, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r2, .L75+4
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-24]
	ldr	r3, .L75+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	mov	r1, r2
	lsl	r1, r1, #5
	sub	r1, r1, r2
	lsl	r3, r1, #6
	sub	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #6
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
	nop
	ldr	r3, .L75
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC16
	.word	274877907
	.size	sleep_ms, .-sleep_ms
	.section	.rodata
	.align	2
.LC17:
	.ascii	"pp programmer\012\000"
	.text
	.align	2
	.global	printHelp
	.syntax unified
	.arm
	.fpu softvfp
	.type	printHelp, %function
printHelp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L78
	ldr	r3, [r3]
	ldr	r1, .L78+4
	mov	r0, r3
	bl	flsprintf
	mov	r0, #0
	bl	exit
.L79:
	.align	2
.L78:
	.word	stdout
	.word	.LC17
	.size	printHelp, .-printHelp
	.section	.rodata
	.align	2
.LC18:
	.ascii	"%d\000"
	.align	2
.LC19:
	.ascii	"Unknown option `-%c'.\012\000"
	.align	2
.LC20:
	.ascii	"Unknown option character `\\x%x'.\012\000"
	.align	2
.LC21:
	.ascii	"Bug, unhandled option '%c'\012\000"
	.align	2
.LC22:
	.ascii	"c:nprs:t:v:b:\000"
	.text
	.align	2
	.global	parseArgs
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseArgs, %function
parseArgs:
	@ 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]
	b	.L81
.L94:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #63
	cmp	r3, #55
	ldrls	pc, [pc, r3, asl #2]
	b	.L82
.L84:
	.word	.L92
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L91
	.word	.L90
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L82
	.word	.L89
	.word	.L82
	.word	.L88
	.word	.L82
	.word	.L87
	.word	.L86
	.word	.L85
	.word	.L82
	.word	.L83
.L90:
	ldr	r3, .L97
	ldr	r3, [r3]
	ldr	r2, .L97+4
	str	r3, [r2]
	b	.L81
.L89:
	ldr	r3, .L97+8
	mov	r2, #0
	str	r2, [r3]
	b	.L81
.L88:
	ldr	r3, .L97+12
	mov	r2, #0
	str	r2, [r3]
	b	.L81
.L87:
	ldr	r3, .L97+16
	mov	r2, #1
	str	r2, [r3]
	b	.L81
.L86:
	ldr	r3, .L97
	ldr	r3, [r3]
	ldr	r2, .L97+20
	ldr	r1, .L97+24
	mov	r0, r3
	bl	__isoc99_sscanf
	b	.L81
.L85:
	ldr	r3, .L97
	ldr	r3, [r3]
	mov	r0, r3
	bl	setCPUtype
	b	.L81
.L83:
	ldr	r3, .L97
	ldr	r3, [r3]
	ldr	r2, .L97+28
	ldr	r1, .L97+24
	mov	r0, r3
	bl	__isoc99_sscanf
	b	.L81
.L91:
	ldr	r3, .L97
	ldr	r3, [r3]
	ldr	r2, .L97+32
	ldr	r1, .L97+24
	mov	r0, r3
	bl	__isoc99_sscanf
	b	.L81
.L92:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, .L97+36
	ldr	r3, [r3]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #16384
	cmp	r3, #0
	beq	.L93
	ldr	r3, .L97+40
	ldr	r3, [r3]
	ldr	r2, .L97+36
	ldr	r2, [r2]
	ldr	r1, .L97+44
	mov	r0, r3
	bl	fprintf
	b	.L82
.L93:
	ldr	r3, .L97+40
	ldr	r3, [r3]
	ldr	r2, .L97+36
	ldr	r2, [r2]
	ldr	r1, .L97+48
	mov	r0, r3
	bl	fprintf
.L82:
	ldr	r3, .L97+40
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L97+52
	mov	r0, r3
	bl	fprintf
	mov	r0, #0
	bl	exit
.L81:
	ldr	r2, .L97+56
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L94
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L96
	bl	printHelp
.L96:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L98:
	.align	2
.L97:
	.word	optarg
	.word	COM
	.word	verify
	.word	program
	.word	readflash
	.word	sleep_time
	.word	.LC18
	.word	verbose
	.word	baudRate
	.word	optopt
	.word	stderr
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	parseArgs, .-parseArgs
	.section	.rodata
	.align	2
.LC23:
	.ascii	"pp3_devices.dat\000"
	.align	2
.LC24:
	.ascii	"Opening filename %s \012\000"
	.align	2
.LC25:
	.ascii	"r\000"
	.align	2
.LC26:
	.ascii	"File open\000"
	.align	2
.LC27:
	.ascii	"\012Read %d chars: %s\000"
	.align	2
.LC28:
	.ascii	"%s %d %d %x %x %s\000"
	.align	2
.LC29:
	.ascii	"\012*** %s,%d,%d,%x,%x,%s\000"
	.align	2
.LC30:
	.ascii	"Found database match %s,%d,%d,%x,%x,%s\012\000"
	.align	2
.LC31:
	.ascii	"CF_P16F_A\000"
	.align	2
.LC32:
	.ascii	"CF_P16F_B\000"
	.align	2
.LC33:
	.ascii	"CF_P16F_C\000"
	.align	2
.LC34:
	.ascii	"CF_P16F_D\000"
	.align	2
.LC35:
	.ascii	"CF_P18F_A\000"
	.align	2
.LC36:
	.ascii	"CF_P18F_B\000"
	.align	2
.LC37:
	.ascii	"CF_P18F_C\000"
	.align	2
.LC38:
	.ascii	"CF_P18F_D\000"
	.align	2
.LC39:
	.ascii	"CF_P18F_E\000"
	.align	2
.LC40:
	.ascii	"CF_P18F_F\000"
	.align	2
.LC41:
	.ascii	"CF_P18F_G\000"
	.align	2
.LC42:
	.ascii	"CF_P18F_Q\000"
	.align	2
.LC43:
	.ascii	"chip family:%d, config size:%d\012\000"
	.align	2
.LC44:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setCPUtype
	.syntax unified
	.arm
	.fpu softvfp
	.type	setCPUtype, %function
setCPUtype:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-96]
	ldr	r3, .L133
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-96]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L100
.L101:
	ldr	r3, [fp, #-68]
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r1, r0
	ldr	r3, [fp, #-68]
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L100:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	blt	.L101
	mov	r3, #0
	str	r3, [fp, #-92]
	ldr	r3, .L133+4
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-72]
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L102
	ldr	r1, [fp, #-60]
	ldr	r0, .L133+12
	bl	printf
.L102:
	ldr	r1, .L133+16
	ldr	r0, [fp, #-60]
	bl	fopen
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L103
	mvn	r3, #0
	b	.L131
.L103:
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L106
	ldr	r0, .L133+20
	bl	puts
	b	.L106
.L130:
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L107
	ldr	r3, [fp, #-92]
	mov	r2, r3
	ldr	r1, [fp, #-52]
	ldr	r0, .L133+24
	bl	printf
.L107:
	ldr	r3, [fp, #-92]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	beq	.L106
	ldr	r0, [fp, #-92]
	sub	r1, fp, #88
	sub	r2, fp, #48
	sub	r3, fp, #28
	str	r3, [sp, #12]
	sub	r3, fp, #76
	str	r3, [sp, #8]
	sub	r3, fp, #80
	str	r3, [sp, #4]
	sub	r3, fp, #84
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L133+28
	bl	__isoc99_sscanf
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L108
	ldr	ip, [fp, #-88]
	ldr	lr, [fp, #-84]
	ldr	r3, [fp, #-80]
	ldr	r2, [fp, #-76]
	sub	r0, fp, #48
	sub	r1, fp, #28
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L133+32
	bl	printf
.L108:
	sub	r3, fp, #48
	ldr	r1, [fp, #-96]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L106
	ldr	r3, [fp, #-88]
	ldr	r2, .L133+36
	str	r3, [r2]
	ldr	r3, [fp, #-84]
	ldr	r2, .L133+40
	str	r3, [r2]
	ldr	r3, [fp, #-80]
	ldr	r2, .L133+44
	str	r3, [r2]
	ldr	r3, [fp, #-76]
	ldr	r2, .L133+48
	str	r3, [r2]
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L109
	ldr	ip, [fp, #-88]
	ldr	lr, [fp, #-84]
	ldr	r3, [fp, #-80]
	ldr	r2, [fp, #-76]
	sub	r0, fp, #48
	sub	r1, fp, #28
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L133+52
	bl	printf
.L109:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+56
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L110
	ldr	r3, .L133+60
	mov	r2, #0
	str	r2, [r3]
.L110:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+64
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L111
	ldr	r3, .L133+60
	mov	r2, #2
	str	r2, [r3]
.L111:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+68
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L112
	ldr	r3, .L133+60
	mov	r2, #7
	str	r2, [r3]
.L112:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+72
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L113
	ldr	r3, .L133+60
	mov	r2, #8
	str	r2, [r3]
.L113:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+76
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L114
	ldr	r3, .L133+60
	mov	r2, #1
	str	r2, [r3]
.L114:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+80
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L115
	ldr	r3, .L133+60
	mov	r2, #3
	str	r2, [r3]
.L115:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+84
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L116
	ldr	r3, .L133+60
	mov	r2, #4
	str	r2, [r3]
.L116:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+88
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L117
	ldr	r3, .L133+60
	mov	r2, #5
	str	r2, [r3]
.L117:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+92
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L118
	ldr	r3, .L133+60
	mov	r2, #6
	str	r2, [r3]
.L118:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+96
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L119
	ldr	r3, .L133+60
	mov	r2, #9
	str	r2, [r3]
.L119:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+100
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L120
	ldr	r3, .L133+60
	mov	r2, #10
	str	r2, [r3]
.L120:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L133+104
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L121
	ldr	r3, .L133+60
	mov	r2, #11
	str	r2, [r3]
.L121:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L122
	ldr	r3, .L133+108
	mov	r2, #16
	str	r2, [r3]
.L122:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L123
	ldr	r3, .L133+108
	mov	r2, #8
	str	r2, [r3]
.L123:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L124
	ldr	r3, .L133+108
	mov	r2, #16
	str	r2, [r3]
	ldr	r3, .L133+60
	mov	r2, #3
	str	r2, [r3]
.L124:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L125
	ldr	r3, .L133+108
	mov	r2, #16
	str	r2, [r3]
.L125:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L126
	ldr	r3, .L133+108
	mov	r2, #16
	str	r2, [r3]
.L126:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #9
	bne	.L127
	ldr	r3, .L133+108
	mov	r2, #12
	str	r2, [r3]
.L127:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L128
	ldr	r3, .L133+108
	mov	r2, #12
	str	r2, [r3]
.L128:
	ldr	r3, .L133+60
	ldr	r3, [r3]
	cmp	r3, #10
	bne	.L129
	ldr	r3, .L133+108
	mov	r2, #10
	str	r2, [r3]
	ldr	r3, .L133+60
	mov	r2, #9
	str	r2, [r3]
.L129:
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L106
	ldr	r3, .L133+60
	ldr	r3, [r3]
	ldr	r2, .L133+108
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L133+112
	bl	printf
.L106:
	sub	r1, fp, #72
	sub	r3, fp, #92
	ldr	r2, [fp, #-56]
	mov	r0, r3
	bl	getlinex
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmn	r3, #1
	bne	.L130
	ldr	r0, [fp, #-56]
	bl	fclose
	mov	r3, #0
.L131:
	ldr	r2, .L133
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L132
	bl	__stack_chk_fail
.L132:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L134:
	.align	2
.L133:
	.word	.LC44
	.word	.LC23
	.word	verbose
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	flash_size
	.word	page_size
	.word	devid_expected
	.word	devid_mask
	.word	.LC30
	.word	.LC31
	.word	chip_family
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	config_size
	.word	.LC43
	.size	setCPUtype, .-setCPUtype
	.section	.rodata
	.align	2
.LC45:
	.ascii	"Resetting PC\012\000"
	.text
	.align	2
	.global	p16a_rst_pointer
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_rst_pointer, %function
p16a_rst_pointer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L140
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L136
	ldr	r3, .L140+4
	ldr	r3, [r3]
	ldr	r1, .L140+8
	mov	r0, r3
	bl	flsprintf
.L136:
	ldr	r3, .L140+12
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L137
	mov	r0, #9
	bl	putByte
	b	.L138
.L137:
	mov	r0, #3
	bl	putByte
.L138:
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L141:
	.align	2
.L140:
	.word	verbose
	.word	stdout
	.word	.LC45
	.word	chip_family
	.size	p16a_rst_pointer, .-p16a_rst_pointer
	.section	.rodata
	.align	2
.LC46:
	.ascii	"\012Setting PC\012\000"
	.text
	.align	2
	.global	p16d_set_pointer
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16d_set_pointer, %function
p16d_set_pointer:
	@ 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, .L145
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L143
	ldr	r3, .L145+4
	ldr	r3, [r3]
	ldr	r1, .L145+8
	mov	r0, r3
	bl	flsprintf
.L143:
	mov	r0, #12
	bl	putByte
	mov	r0, #2
	bl	putByte
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L146:
	.align	2
.L145:
	.word	verbose
	.word	stdout
	.word	.LC46
	.size	p16d_set_pointer, .-p16d_set_pointer
	.section	.rodata
	.align	2
.LC47:
	.ascii	"Mass erase\012\000"
	.text
	.align	2
	.global	p16a_mass_erase
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_mass_erase, %function
p16a_mass_erase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L150
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L148
	ldr	r3, .L150+4
	ldr	r3, [r3]
	ldr	r1, .L150+8
	mov	r0, r3
	bl	flsprintf
.L148:
	mov	r0, #7
	bl	putByte
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L151:
	.align	2
.L150:
	.word	verbose
	.word	stdout
	.word	.LC47
	.size	p16a_mass_erase, .-p16a_mass_erase
	.section	.rodata
	.align	2
.LC48:
	.ascii	"Load config\012\000"
	.text
	.align	2
	.global	p16a_load_config
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_load_config, %function
p16a_load_config:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L155
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L153
	ldr	r3, .L155+4
	ldr	r3, [r3]
	ldr	r1, .L155+8
	mov	r0, r3
	bl	flsprintf
.L153:
	mov	r0, #4
	bl	putByte
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L156:
	.align	2
.L155:
	.word	verbose
	.word	stdout
	.word	.LC48
	.size	p16a_load_config, .-p16a_load_config
	.section	.rodata
	.align	2
.LC49:
	.ascii	"Inc pointer %d\012\000"
	.text
	.align	2
	.global	p16a_inc_pointer
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_inc_pointer, %function
p16a_inc_pointer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldr	r3, .L160
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L158
	ldr	r3, .L160+4
	ldr	r3, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldr	r1, .L160+8
	mov	r0, r3
	bl	flsprintf
.L158:
	mov	r0, #5
	bl	putByte
	mov	r0, #1
	bl	putByte
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L161:
	.align	2
.L160:
	.word	verbose
	.word	stdout
	.word	.LC49
	.size	p16a_inc_pointer, .-p16a_inc_pointer
	.section	.rodata
	.align	2
.LC50:
	.ascii	"Programming page of %d bytes at 0x%4.4x\012\000"
	.text
	.align	2
	.global	p16a_program_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_program_page, %function
p16a_program_page:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-9]
	mov	r3, r2
	strb	r3, [fp, #-10]
	ldr	r3, .L165
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L163
	ldr	r3, .L165+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-9]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, .L165+8
	bl	flsprintf
.L163:
	mov	r0, #8
	bl	putByte
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	add	r3, r3, #2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-8]
	ldr	r2, .L165+12
	add	r3, r3, r2
	ldrb	r2, [fp, #-9]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	putBytes
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L166:
	.align	2
.L165:
	.word	verbose
	.word	stdout
	.word	.LC50
	.word	file_image
	.size	p16a_program_page, .-p16a_program_page
	.section	.rodata
	.align	2
.LC51:
	.ascii	"Reading page of %d bytes\012\000"
	.text
	.align	2
	.global	p16a_read_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_read_page, %function
p16a_read_page:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldr	r3, .L172
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L168
	ldr	r3, .L172+4
	ldr	r3, [r3]
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	ldr	r1, .L172+8
	mov	r0, r3
	bl	flsprintf
.L168:
	mov	r0, #6
	bl	putByte
	mov	r0, #1
	bl	putByte
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	lsr	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	strb	r3, [fp, #-5]
	b	.L169
.L170:
	bl	getByte
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L169:
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L170
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L173:
	.align	2
.L172:
	.word	verbose
	.word	stdout
	.word	.LC51
	.size	p16a_read_page, .-p16a_read_page
	.section	.rodata
	.align	2
.LC52:
	.ascii	"Reading EEPROM of %d bytes\012\000"
	.text
	.align	2
	.global	p16a_read_eeprom
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_read_eeprom, %function
p16a_read_eeprom:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldr	r3, .L183
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L175
	ldr	r3, .L183
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L176
.L175:
	ldr	r3, .L183+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L177
	ldr	r3, .L183+8
	ldr	r3, [r3]
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	ldr	r1, .L183+12
	mov	r0, r3
	bl	flsprintf
.L177:
	ldr	r3, .L183
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L178
	mov	r0, #10
	bl	putByte
.L178:
	ldr	r3, .L183
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L179
	mov	r0, #13
	bl	putByte
.L179:
	mov	r0, #1
	bl	putByte
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	strb	r3, [fp, #-5]
	b	.L180
.L181:
	bl	getByte
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L180:
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L181
	mov	r3, #1
	b	.L182
.L176:
	mov	r3, #0
.L182:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L184:
	.align	2
.L183:
	.word	chip_family
	.word	verbose
	.word	stdout
	.word	.LC52
	.size	p16a_read_eeprom, .-p16a_read_eeprom
	.section	.rodata
	.align	2
.LC53:
	.ascii	"Getting devid - lo:%2.2x,hi:%2.2x\012\000"
	.align	2
.LC54:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	p16a_get_devid
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_get_devid, %function
p16a_get_devid:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L189
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	p16a_rst_pointer
	bl	p16a_load_config
	mov	r0, #6
	bl	p16a_inc_pointer
	sub	r3, fp, #28
	mov	r1, #4
	mov	r0, r3
	bl	p16a_read_page
	ldrb	r3, [fp, #-27]
	strb	r3, [fp, #-34]
	ldrb	r3, [fp, #-28]
	strb	r3, [fp, #-33]
	ldr	r3, .L189+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L186
	ldr	r3, .L189+8
	ldr	r0, [r3]
	ldrb	r2, [fp, #-33]	@ zero_extendqisi2
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	ldr	r1, .L189+12
	bl	flsprintf
.L186:
	ldrb	r2, [fp, #-33]	@ zero_extendqisi2
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, .L189+16
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	and	r3, r3, r2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r2, .L189
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L188
	bl	__stack_chk_fail
.L188:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L190:
	.align	2
.L189:
	.word	.LC54
	.word	verbose
	.word	stdout
	.word	.LC53
	.word	devid_mask
	.size	p16a_get_devid, .-p16a_get_devid
	.section	.rodata
	.align	2
.LC55:
	.ascii	"Getting config +%d - lo:%2.2x,hi:%2.2x = %4.4x\012\000"
	.align	2
.LC56:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	p16a_get_config
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_get_config, %function
p16a_get_config:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldr	r3, .L195
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	p16a_rst_pointer
	bl	p16a_load_config
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	mov	r0, r3
	bl	p16a_inc_pointer
	sub	r3, fp, #28
	mov	r1, #4
	mov	r0, r3
	bl	p16a_read_page
	ldrb	r3, [fp, #-27]
	strb	r3, [fp, #-34]
	ldrb	r3, [fp, #-28]
	strb	r3, [fp, #-33]
	ldrb	r2, [fp, #-33]	@ zero_extendqisi2
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, .L195+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L192
	ldr	r3, .L195+8
	ldr	r0, [r3]
	ldrb	r1, [fp, #-37]	@ zero_extendqisi2
	ldrb	ip, [fp, #-33]	@ zero_extendqisi2
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	ldr	r2, [fp, #-32]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r1
	ldr	r1, .L195+12
	bl	flsprintf
.L192:
	ldr	r3, [fp, #-32]
	ldr	r2, .L195
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L194
	bl	__stack_chk_fail
.L194:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L196:
	.align	2
.L195:
	.word	.LC56
	.word	verbose
	.word	stdout
	.word	.LC55
	.size	p16a_get_config, .-p16a_get_config
	.align	2
	.global	p16a_program_config
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16a_program_config, %function
p16a_program_config:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	p16a_rst_pointer
	bl	p16a_load_config
	mov	r0, #7
	bl	p16a_inc_pointer
	mov	r2, #1
	mov	r1, #2
	ldr	r0, .L201
	bl	p16a_program_page
	mov	r2, #1
	mov	r1, #2
	ldr	r0, .L201+4
	bl	p16a_program_page
	ldr	r3, .L201+8
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L201+8
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L198
	mov	r2, #1
	mov	r1, #2
	ldr	r0, .L201+12
	bl	p16a_program_page
.L198:
	ldr	r3, .L201+8
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L199
	mov	r2, #1
	mov	r1, #2
	ldr	r0, .L201+16
	bl	p16a_program_page
.L199:
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L202:
	.align	2
.L201:
	.word	65550
	.word	65552
	.word	chip_family
	.word	65554
	.word	65556
	.size	p16a_program_config, .-p16a_program_config
	.section	.rodata
	.align	2
.LC57:
	.ascii	"Reading page of %d bytes at 0x%6.6x\012\000"
	.text
	.align	2
	.global	p18a_read_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18a_read_page, %function
p18a_read_page:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	ldr	r3, .L208
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L204
	ldr	r3, .L208+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, .L208+8
	bl	flsprintf
.L204:
	mov	r0, #17
	bl	putByte
	mov	r0, #4
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsr	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	strb	r3, [fp, #-5]
	b	.L205
.L206:
	bl	getByte
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L205:
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L206
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L209:
	.align	2
.L208:
	.word	verbose
	.word	stdout
	.word	.LC57
	.size	p18a_read_page, .-p18a_read_page
	.align	2
	.global	p18a_mass_erase
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18a_mass_erase, %function
p18a_mass_erase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L213
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L211
	ldr	r3, .L213+4
	ldr	r3, [r3]
	ldr	r1, .L213+8
	mov	r0, r3
	bl	flsprintf
.L211:
	mov	r0, #19
	bl	putByte
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L214:
	.align	2
.L213:
	.word	verbose
	.word	stdout
	.word	.LC47
	.size	p18a_mass_erase, .-p18a_mass_erase
	.align	2
	.global	p18b_mass_erase
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18b_mass_erase, %function
p18b_mass_erase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L218
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L216
	ldr	r3, .L218+4
	ldr	r3, [r3]
	ldr	r1, .L218+8
	mov	r0, r3
	bl	flsprintf
.L216:
	mov	r0, #35
	bl	putByte
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L219:
	.align	2
.L218:
	.word	verbose
	.word	stdout
	.word	.LC47
	.size	p18b_mass_erase, .-p18b_mass_erase
	.section	.rodata
	.align	2
.LC58:
	.ascii	"Mass erase part of 0x%6.6x\012\000"
	.text
	.align	2
	.global	p18d_mass_erase_part
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18d_mass_erase_part, %function
p18d_mass_erase_part:
	@ 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, .L223
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L221
	ldr	r3, .L223+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L223+8
	mov	r0, r3
	bl	flsprintf
.L221:
	mov	r0, #48
	bl	putByte
	mov	r0, #3
	bl	putByte
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L224:
	.align	2
.L223:
	.word	verbose
	.word	stdout
	.word	.LC58
	.size	p18d_mass_erase_part, .-p18d_mass_erase_part
	.align	2
	.global	p18d_mass_erase
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18d_mass_erase, %function
p18d_mass_erase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L228
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L226
	ldr	r3, .L228+4
	ldr	r3, [r3]
	ldr	r1, .L228+8
	mov	r0, r3
	bl	flsprintf
.L226:
	ldr	r0, .L228+12
	bl	p18d_mass_erase_part
	ldr	r0, .L228+16
	bl	p18d_mass_erase_part
	ldr	r0, .L228+20
	bl	p18d_mass_erase_part
	ldr	r0, .L228+24
	bl	p18d_mass_erase_part
	ldr	r0, .L228+28
	bl	p18d_mass_erase_part
	ldr	r0, .L228+32
	bl	p18d_mass_erase_part
	ldr	r0, .L228+36
	bl	p18d_mass_erase_part
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L229:
	.align	2
.L228:
	.word	verbose
	.word	stdout
	.word	.LC47
	.word	8388868
	.word	8389124
	.word	8389636
	.word	8390660
	.word	8388612
	.word	8388613
	.word	8388610
	.size	p18d_mass_erase, .-p18d_mass_erase
	.align	2
	.global	p18e_mass_erase
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18e_mass_erase, %function
p18e_mass_erase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L233
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L231
	ldr	r3, .L233+4
	ldr	r3, [r3]
	ldr	r1, .L233+8
	mov	r0, r3
	bl	flsprintf
.L231:
	ldr	r0, .L233+12
	bl	p18d_mass_erase_part
	ldr	r0, .L233+16
	bl	p18d_mass_erase_part
	ldr	r0, .L233+20
	bl	p18d_mass_erase_part
	ldr	r0, .L233+24
	bl	p18d_mass_erase_part
	ldr	r0, .L233+28
	bl	p18d_mass_erase_part
	ldr	r0, .L233+32
	bl	p18d_mass_erase_part
	ldr	r0, .L233+36
	bl	p18d_mass_erase_part
	ldr	r0, .L233+40
	bl	p18d_mass_erase_part
	ldr	r0, .L233+44
	bl	p18d_mass_erase_part
	ldr	r0, .L233+48
	bl	p18d_mass_erase_part
	ldr	r0, .L233+52
	bl	p18d_mass_erase_part
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L234:
	.align	2
.L233:
	.word	verbose
	.word	stdout
	.word	.LC47
	.word	8388868
	.word	8389124
	.word	8389636
	.word	8390660
	.word	8392708
	.word	8396804
	.word	8404996
	.word	8421380
	.word	8388612
	.word	8388613
	.word	8388610
	.size	p18e_mass_erase, .-p18e_mass_erase
	.section	.rodata
	.align	2
.LC59:
	.ascii	"~\000"
	.align	2
.LC60:
	.ascii	"Writing A page of %d bytes at 0x%6.6x\012\000"
	.text
	.align	2
	.global	p18a_write_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18a_write_page, %function
p18a_write_page:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	mov	r3, #0
	strb	r3, [fp, #-5]
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L236
.L238:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	beq	.L237
	mov	r3, #0
	strb	r3, [fp, #-5]
.L237:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L236:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L238
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L239
	ldr	r3, .L245
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L240
	ldr	r3, .L245+4
	ldr	r3, [r3]
	ldr	r1, .L245+8
	mov	r0, r3
	bl	flsprintf
.L240:
	mov	r3, #0
	b	.L241
.L239:
	ldr	r3, .L245
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L242
	ldr	r3, .L245+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, .L245+12
	bl	flsprintf
.L242:
	mov	r0, #18
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	add	r3, r3, #4
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L243
.L244:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L243:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L244
	bl	getByte
	mov	r3, #0
.L241:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L246:
	.align	2
.L245:
	.word	verbose
	.word	stdout
	.word	.LC59
	.word	.LC60
	.size	p18a_write_page, .-p18a_write_page
	.section	.rodata
	.align	2
.LC61:
	.ascii	"Writing D page of %d bytes at 0x%6.6x\012\000"
	.text
	.align	2
	.global	p18d_write_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18d_write_page, %function
p18d_write_page:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	mov	r3, #0
	strb	r3, [fp, #-5]
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L248
.L250:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	beq	.L249
	mov	r3, #0
	strb	r3, [fp, #-5]
.L249:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L248:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L250
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L251
	ldr	r3, .L257
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L252
	ldr	r3, .L257+4
	ldr	r3, [r3]
	ldr	r1, .L257+8
	mov	r0, r3
	bl	flsprintf
.L252:
	mov	r3, #0
	b	.L253
.L251:
	ldr	r3, .L257
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L254
	ldr	r3, .L257+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, .L257+12
	bl	flsprintf
.L254:
	mov	r0, #49
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	add	r3, r3, #4
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L255
.L256:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L255:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L256
	bl	getByte
	mov	r3, #0
.L253:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L258:
	.align	2
.L257:
	.word	verbose
	.word	stdout
	.word	.LC59
	.word	.LC61
	.size	p18d_write_page, .-p18d_write_page
	.section	.rodata
	.align	2
.LC62:
	.ascii	"Writing cfg 0x%2.2x 0x%2.2x at 0x%6.6x\012\000"
	.text
	.align	2
	.global	p18a_write_cfg
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18a_write_cfg, %function
p18a_write_cfg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	str	r2, [fp, #-12]
	strb	r3, [fp, #-5]
	mov	r3, r1
	strb	r3, [fp, #-6]
	ldr	r3, .L262
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L260
	ldr	r3, .L262+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r1, [fp, #-6]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L262+8
	bl	flsprintf
.L260:
	mov	r0, #20
	bl	putByte
	mov	r0, #6
	bl	putByte
	mov	r0, #0
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L263:
	.align	2
.L262:
	.word	verbose
	.word	stdout
	.word	.LC62
	.size	p18a_write_cfg, .-p18a_write_cfg
	.align	2
	.global	p18d_write_cfg
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18d_write_cfg, %function
p18d_write_cfg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	str	r2, [fp, #-12]
	strb	r3, [fp, #-5]
	mov	r3, r1
	strb	r3, [fp, #-6]
	ldr	r3, .L267
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L265
	ldr	r3, .L267+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r1, [fp, #-6]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L267+8
	bl	flsprintf
.L265:
	mov	r0, #50
	bl	putByte
	mov	r0, #6
	bl	putByte
	mov	r0, #0
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L268:
	.align	2
.L267:
	.word	verbose
	.word	stdout
	.word	.LC62
	.size	p18d_write_cfg, .-p18d_write_cfg
	.align	2
	.global	p16c_mass_erase
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16c_mass_erase, %function
p16c_mass_erase:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L272
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L270
	ldr	r3, .L272+4
	ldr	r3, [r3]
	ldr	r1, .L272+8
	mov	r0, r3
	bl	flsprintf
.L270:
	mov	r0, #67
	bl	putByte
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L273:
	.align	2
.L272:
	.word	verbose
	.word	stdout
	.word	.LC47
	.size	p16c_mass_erase, .-p16c_mass_erase
	.align	2
	.global	p16c_read_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16c_read_page, %function
p16c_read_page:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, .L279
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L275
	ldr	r3, .L279+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, .L279+8
	bl	flsprintf
.L275:
	mov	r0, #65
	bl	putByte
	mov	r0, #4
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsr	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	strb	r3, [fp, #-5]
	b	.L276
.L277:
	bl	getByte
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L276:
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L277
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L280:
	.align	2
.L279:
	.word	verbose
	.word	stdout
	.word	.LC57
	.size	p16c_read_page, .-p16c_read_page
	.align	2
	.global	p16c_write_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16c_write_page, %function
p16c_write_page:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	mov	r3, #1
	strb	r3, [fp, #-5]
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L282
.L284:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, r2
	and	r3, r3, #255
	cmp	r3, #255
	beq	.L283
	mov	r3, #0
	strb	r3, [fp, #-5]
.L283:
	ldrb	r3, [fp, #-6]
	add	r3, r3, #2
	strb	r3, [fp, #-6]
.L282:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L284
	ldr	r3, .L291
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L285
	ldr	r3, .L291+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, .L291+8
	bl	flsprintf
.L285:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L286
	ldr	r3, .L291
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L287
	ldr	r3, .L291+4
	ldr	r3, [r3]
	ldr	r1, .L291+12
	mov	r0, r3
	bl	flsprintf
.L287:
	mov	r3, #0
	b	.L288
.L286:
	mov	r0, #66
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	add	r3, r3, #4
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L289
.L290:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L289:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L290
	bl	getByte
	mov	r3, #0
.L288:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L292:
	.align	2
.L291:
	.word	verbose
	.word	stdout
	.word	.LC60
	.word	.LC59
	.size	p16c_write_page, .-p16c_write_page
	.section	.rodata
	.align	2
.LC63:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	p16c_get_devid
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16c_get_devid, %function
p16c_get_devid:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L297
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #28
	mov	r2, #4
	ldr	r1, .L297+4
	mov	r0, r3
	bl	p16c_read_page
	ldrb	r3, [fp, #-27]
	strb	r3, [fp, #-34]
	ldrb	r3, [fp, #-28]
	strb	r3, [fp, #-33]
	ldr	r3, .L297+8
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L294
	ldr	r3, .L297+12
	ldr	r0, [r3]
	ldrb	r2, [fp, #-33]	@ zero_extendqisi2
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	ldr	r1, .L297+16
	bl	flsprintf
.L294:
	ldrb	r2, [fp, #-33]	@ zero_extendqisi2
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, .L297+20
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	and	r3, r3, r2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r2, .L297
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L296
	bl	__stack_chk_fail
.L296:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L298:
	.align	2
.L297:
	.word	.LC63
	.word	65548
	.word	verbose
	.word	stdout
	.word	.LC53
	.word	devid_mask
	.size	p16c_get_devid, .-p16c_get_devid
	.align	2
	.global	p16c_write_single_cfg
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16c_write_single_cfg, %function
p16c_write_single_cfg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	str	r2, [fp, #-12]
	strb	r3, [fp, #-5]
	mov	r3, r1
	strb	r3, [fp, #-6]
	ldr	r3, .L302
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L300
	ldr	r3, .L302+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r1, [fp, #-6]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L302+8
	bl	flsprintf
.L300:
	mov	r0, #68
	bl	putByte
	mov	r0, #6
	bl	putByte
	mov	r0, #0
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L303:
	.align	2
.L302:
	.word	verbose
	.word	stdout
	.word	.LC62
	.size	p16c_write_single_cfg, .-p16c_write_single_cfg
	.align	2
	.global	p18q_write_single_cfg
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18q_write_single_cfg, %function
p18q_write_single_cfg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	str	r2, [fp, #-12]
	strb	r3, [fp, #-5]
	mov	r3, r1
	strb	r3, [fp, #-6]
	ldr	r3, .L307
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L305
	ldr	r3, .L307+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r1, [fp, #-6]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L307+8
	bl	flsprintf
.L305:
	mov	r0, #69
	bl	putByte
	mov	r0, #6
	bl	putByte
	mov	r0, #0
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L308:
	.align	2
.L307:
	.word	verbose
	.word	stdout
	.word	.LC62
	.size	p18q_write_single_cfg, .-p18q_write_single_cfg
	.align	2
	.global	p18q_write_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	p18q_write_page, %function
p18q_write_page:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	mov	r3, #1
	strb	r3, [fp, #-5]
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L310
.L312:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, r2
	and	r3, r3, #255
	cmp	r3, #255
	beq	.L311
	mov	r3, #0
	strb	r3, [fp, #-5]
.L311:
	ldrb	r3, [fp, #-6]
	add	r3, r3, #2
	strb	r3, [fp, #-6]
.L310:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L312
	ldr	r3, .L319
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L313
	ldr	r3, .L319+4
	ldr	r0, [r3]
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, .L319+8
	bl	flsprintf
.L313:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L314
	ldr	r3, .L319
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L315
	ldr	r3, .L319+4
	ldr	r3, [r3]
	ldr	r1, .L319+12
	mov	r0, r3
	bl	flsprintf
.L315:
	mov	r3, #0
	b	.L316
.L314:
	mov	r0, #70
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	add	r3, r3, #4
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #16
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, r3
	bl	putByte
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L317
.L318:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putByte
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L317:
	ldrb	r2, [fp, #-6]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L318
	bl	getByte
	mov	r3, #0
.L316:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L320:
	.align	2
.L319:
	.word	verbose
	.word	stdout
	.word	.LC60
	.word	.LC59
	.size	p18q_write_page, .-p18q_write_page
	.align	2
	.global	p16c_write_cfg
	.syntax unified
	.arm
	.fpu softvfp
	.type	p16c_write_cfg, %function
p16c_write_cfg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L323
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	ldr	r2, .L323
	ldrb	r1, [r2]	@ zero_extendqisi2
	ldr	r2, .L323+4
	mov	r0, r3
	bl	p16c_write_single_cfg
	ldr	r3, .L323
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	ldr	r2, .L323
	ldrb	r1, [r2, #2]	@ zero_extendqisi2
	ldr	r2, .L323+8
	mov	r0, r3
	bl	p16c_write_single_cfg
	ldr	r3, .L323
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	ldr	r2, .L323
	ldrb	r1, [r2, #4]	@ zero_extendqisi2
	ldr	r2, .L323+12
	mov	r0, r3
	bl	p16c_write_single_cfg
	ldr	r3, .L323
	ldrb	r3, [r3, #7]	@ zero_extendqisi2
	ldr	r2, .L323
	ldrb	r1, [r2, #6]	@ zero_extendqisi2
	ldr	r2, .L323+16
	mov	r0, r3
	bl	p16c_write_single_cfg
	ldr	r3, .L323
	ldrb	r3, [r3, #9]	@ zero_extendqisi2
	ldr	r2, .L323
	ldrb	r1, [r2, #8]	@ zero_extendqisi2
	ldr	r2, .L323+20
	mov	r0, r3
	bl	p16c_write_single_cfg
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L324:
	.align	2
.L323:
	.word	config_bytes
	.word	32775
	.word	32776
	.word	32777
	.word	32778
	.word	32779
	.size	p16c_write_cfg, .-p16c_write_cfg
	.section	.rodata
	.align	2
.LC64:
	.ascii	"Entering programming mode\012\000"
	.text
	.align	2
	.global	prog_enter_progmode
	.syntax unified
	.arm
	.fpu softvfp
	.type	prog_enter_progmode, %function
prog_enter_progmode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L338
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L326
	ldr	r3, .L338+4
	ldr	r3, [r3]
	ldr	r1, .L338+8
	mov	r0, r3
	bl	flsprintf
.L326:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L327
	mov	r0, #1
	bl	putByte
	b	.L328
.L327:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L329
	mov	r0, #1
	bl	putByte
	b	.L328
.L329:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L330
	mov	r0, #1
	bl	putByte
	b	.L328
.L330:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L331
	mov	r0, #16
	bl	putByte
	b	.L328
.L331:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L332
	mov	r0, #16
	bl	putByte
	b	.L328
.L332:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L333
	mov	r0, #16
	bl	putByte
	b	.L328
.L333:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L334
	mov	r0, #16
	bl	putByte
	b	.L328
.L334:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L335
	mov	r0, #64
	bl	putByte
	b	.L328
.L335:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #9
	bne	.L336
	mov	r0, #64
	bl	putByte
	b	.L328
.L336:
	ldr	r3, .L338+12
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L328
	mov	r0, #64
	bl	putByte
.L328:
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L339:
	.align	2
.L338:
	.word	verbose
	.word	stdout
	.word	.LC64
	.word	chip_family
	.size	prog_enter_progmode, .-prog_enter_progmode
	.section	.rodata
	.align	2
.LC65:
	.ascii	"Exiting programming mode\012\000"
	.text
	.align	2
	.global	prog_exit_progmode
	.syntax unified
	.arm
	.fpu softvfp
	.type	prog_exit_progmode, %function
prog_exit_progmode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L343
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L341
	ldr	r3, .L343+4
	ldr	r3, [r3]
	ldr	r1, .L343+8
	mov	r0, r3
	bl	flsprintf
.L341:
	mov	r0, #2
	bl	putByte
	mov	r0, #0
	bl	putByte
	bl	getByte
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L344:
	.align	2
.L343:
	.word	verbose
	.word	stdout
	.word	.LC65
	.size	prog_exit_progmode, .-prog_exit_progmode
	.section	.rodata
	.align	2
.LC66:
	.ascii	"getting ID for family %d\012\000"
	.align	2
.LC67:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	prog_get_device_id
	.syntax unified
	.arm
	.fpu softvfp
	.type	prog_get_device_id, %function
prog_get_device_id:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L354
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L354+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L346
	ldr	r3, .L354+8
	ldr	r3, [r3]
	ldr	r2, .L354+12
	ldr	r2, [r2]
	ldr	r1, .L354+16
	mov	r0, r3
	bl	flsprintf
.L346:
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L347
	bl	p16a_get_devid
	mov	r3, r0
	b	.L352
.L347:
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L349
	bl	p16c_get_devid
	mov	r3, r0
	b	.L352
.L349:
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #5
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	ldr	r2, .L354+12
	ldr	r2, [r2]
	cmp	r2, #6
	moveq	r2, #1
	movne	r2, #0
	and	r2, r2, #255
	orr	r3, r3, r2
	cmp	r3, #0
	beq	.L350
	sub	r3, fp, #20
	mov	r2, #2
	ldr	r1, .L354+20
	mov	r0, r3
	bl	p18a_read_page
	ldrb	r3, [fp, #-19]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldrb	r2, [fp, #-20]	@ zero_extendqisi2
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, .L354+24
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	and	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	b	.L352
.L350:
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #9
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L354+12
	ldr	r3, [r3]
	cmp	r3, #11
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L351
	sub	r3, fp, #20
	mov	r2, #2
	ldr	r1, .L354+28
	mov	r0, r3
	bl	p16c_read_page
	ldrb	r3, [fp, #-19]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldrb	r2, [fp, #-20]	@ zero_extendqisi2
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, .L354+24
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	and	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	b	.L352
.L351:
	mov	r3, #0
.L352:
	ldr	r2, .L354
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L353
	bl	__stack_chk_fail
.L353:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L355:
	.align	2
.L354:
	.word	.LC67
	.word	verbose
	.word	stdout
	.word	chip_family
	.word	.LC66
	.word	4194302
	.word	devid_mask
	.word	8388604
	.size	prog_get_device_id, .-prog_get_device_id
	.section	.rodata
	.align	2
.LC68:
	.ascii	"--- : invalid\000"
	.align	2
.LC69:
	.ascii	"%2X\000"
	.align	2
.LC70:
	.ascii	"%4X\000"
	.align	2
.LC71:
	.ascii	"Line len %d B, type %d, address 0x%4.4x offset 0x%4"
	.ascii	".4x, EFF 0x%6.6x\012\000"
	.align	2
.LC72:
	.ascii	"PM \000"
	.align	2
.LC73:
	.ascii	"CB \000"
	.align	2
.LC74:
	.ascii	"%2.2X\000"
	.align	2
.LC75:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_hex
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_hex, %function
parse_hex:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #208
	str	r0, [fp, #-192]
	str	r1, [fp, #-196]
	str	r2, [fp, #-200]
	ldr	r3, .L395
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-184]
	mov	r3, #0
	str	r3, [fp, #-180]
	mov	r3, #0
	str	r3, [fp, #-152]
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L357
	ldr	r1, [fp, #-192]
	ldr	r0, .L395+8
	bl	printf
.L357:
	ldr	r1, .L395+12
	ldr	r0, [fp, #-192]
	bl	fopen
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L358
	mvn	r3, #0
	b	.L393
.L358:
	mov	r3, #0
	str	r3, [fp, #-160]
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L360
	mov	r3, #1
	str	r3, [fp, #-152]
.L360:
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L361
	mov	r3, #1
	str	r3, [fp, #-152]
.L361:
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L362
	mov	r3, #1
	str	r3, [fp, #-152]
.L362:
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L363
	mov	r3, #1
	str	r3, [fp, #-152]
.L363:
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L365
	ldr	r0, .L395+20
	bl	puts
	b	.L365
.L392:
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L366
	ldr	r3, [fp, #-184]
	mov	r2, r3
	ldr	r1, [fp, #-144]
	ldr	r0, .L395+24
	bl	printf
.L366:
	ldr	r3, [fp, #-184]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #58
	beq	.L367
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L368
	ldr	r0, .L395+28
	bl	puts
.L368:
	mvn	r3, #0
	b	.L393
.L367:
	ldr	r3, [fp, #-184]
	add	r3, r3, #1
	sub	r2, fp, #172
	ldr	r1, .L395+32
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-184]
	add	r3, r3, #3
	sub	r2, fp, #164
	ldr	r1, .L395+36
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-184]
	add	r3, r3, #7
	sub	r2, fp, #168
	ldr	r1, .L395+32
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-160]
	lsl	r2, r3, #16
	ldr	r3, [fp, #-164]
	add	r3, r2, r3
	str	r3, [fp, #-140]
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L369
	ldr	r1, [fp, #-172]
	ldr	r0, [fp, #-168]
	ldr	ip, [fp, #-164]
	ldr	r3, [fp, #-160]
	ldr	r2, [fp, #-140]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L395+40
	bl	printf
.L369:
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bne	.L370
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L371
.L372:
	ldr	r2, [fp, #-184]
	ldr	r3, [fp, #-156]
	lsl	r3, r3, #1
	add	r3, r3, #9
	add	r3, r2, r3
	sub	r2, fp, #176
	ldr	r1, .L395+32
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-176]
	and	r1, r3, #255
	sub	r2, fp, #136
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L371:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L372
	ldr	r3, .L395+44
	ldr	r3, [r3]
	ldr	r2, [fp, #-140]
	cmp	r2, r3
	bge	.L373
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L374
	ldr	r0, .L395+48
	bl	printf
.L374:
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L375
.L376:
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-196]
	add	r3, r3, r2
	sub	r1, fp, #136
	ldr	r2, [fp, #-156]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L375:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L376
.L373:
	ldr	r3, [fp, #-160]
	cmp	r3, #48
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r1, r3
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #5
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #6
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	ldr	r2, .L395+16
	ldr	r2, [r2]
	cmp	r2, #9
	moveq	r2, #1
	movne	r2, #0
	and	r2, r2, #255
	orr	r3, r3, r2
	ldr	r2, .L395+16
	ldr	r2, [r2]
	cmp	r2, #11
	moveq	r2, #1
	movne	r2, #0
	and	r2, r2, #255
	orr	r3, r3, r2
	and	r3, r3, r1
	cmp	r3, #0
	beq	.L377
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L378
	ldr	r0, .L395+52
	bl	printf
.L378:
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L379
.L380:
	ldr	r3, [fp, #-156]
	ldr	r2, [fp, #-200]
	add	r3, r2, r3
	sub	r1, fp, #136
	ldr	r2, [fp, #-156]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L379:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L380
.L377:
	ldr	r3, .L395+16
	ldr	r3, [r3]
	cmp	r3, #3
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L395+44
	ldr	r1, [r3]
	ldr	r3, .L395+56
	ldr	r3, [r3]
	sub	r3, r1, r3
	ldr	r1, [fp, #-140]
	cmp	r1, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	and	r3, r3, r2
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L381
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L382
	ldr	r0, .L395+52
	bl	printf
.L382:
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L383
.L384:
	ldr	r3, [fp, #-156]
	ldr	r2, [fp, #-200]
	add	r3, r2, r3
	sub	r1, fp, #136
	ldr	r2, [fp, #-156]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L383:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L384
.L381:
	ldr	r3, [fp, #-160]
	cmp	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, [fp, #-152]
	cmp	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	and	r3, r3, r2
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L370
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L385
	ldr	r0, .L395+52
	bl	printf
.L385:
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L386
.L387:
	ldr	r2, [fp, #-164]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	sub	r3, r3, #14
	ldr	r2, [fp, #-200]
	add	r3, r2, r3
	sub	r1, fp, #136
	ldr	r2, [fp, #-156]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L386:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L387
.L370:
	ldr	r3, [fp, #-168]
	cmp	r3, #4
	bne	.L388
	ldr	r3, [fp, #-184]
	add	r3, r3, #9
	sub	r2, fp, #160
	ldr	r1, .L395+36
	mov	r0, r3
	bl	__isoc99_sscanf
.L388:
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L389
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L390
.L391:
	sub	r2, fp, #136
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L395+60
	bl	printf
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L390:
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L391
.L389:
	ldr	r3, .L395+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L365
	mov	r0, #10
	bl	putchar
.L365:
	sub	r1, fp, #180
	sub	r3, fp, #184
	ldr	r2, [fp, #-148]
	mov	r0, r3
	bl	getlinex
	mov	r3, r0
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmn	r3, #1
	bne	.L392
	ldr	r0, [fp, #-148]
	bl	fclose
	mov	r3, #0
.L393:
	ldr	r2, .L395
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L394
	bl	__stack_chk_fail
.L394:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L396:
	.align	2
.L395:
	.word	.LC75
	.word	verbose
	.word	.LC24
	.word	.LC25
	.word	chip_family
	.word	.LC26
	.word	.LC27
	.word	.LC68
	.word	.LC69
	.word	.LC70
	.word	.LC71
	.word	flash_size
	.word	.LC72
	.word	.LC73
	.word	config_size
	.word	.LC74
	.size	parse_hex, .-parse_hex
	.section	.rodata
	.align	2
.LC76:
	.ascii	"PP programmer, version %s\012\000"
	.align	2
.LC77:
	.ascii	"Opening serial port\000"
	.align	2
.LC78:
	.ascii	"Sleeping for %d ms while arduino bootloader expires"
	.ascii	"\012\000"
	.align	2
.LC79:
	.ascii	"Device ID: %4.4x \012\000"
	.align	2
.LC80:
	.ascii	"Wrong device ID: %4.4x, expected: %4.4x\012\000"
	.align	2
.LC81:
	.ascii	"Check for connection to target MCU, exiting now\000"
	.align	2
.LC82:
	.ascii	"No or wrong input HEX file.\000"
	.global	__aeabi_idiv
	.align	2
.LC83:
	.ascii	"Programming FLASH (%d B in %d pages per %d bytes): "
	.ascii	"\012\000"
	.align	2
.LC84:
	.ascii	"\012%d pages programmed\012\000"
	.align	2
.LC85:
	.ascii	"Programming config\000"
	.align	2
.LC86:
	.ascii	"Verifying FLASH (%d B in %d pages per %d bytes): \012"
	.ascii	"\000"
	.align	2
.LC87:
	.ascii	"Verifying page at 0x%4.4X\012\000"
	.align	2
.LC88:
	.ascii	"Error at 0x%4.4X E:0x%2.2X R:0x%2.2X\012\000"
	.align	2
.LC89:
	.ascii	"Exiting now\000"
	.align	2
.LC90:
	.ascii	"\012%d pages verified\012\000"
	.align	2
.LC91:
	.ascii	"Verifying config...\000"
	.align	2
.LC92:
	.ascii	"Error at 0x%2.2X E:0x%2.2X R:0x%2.2X\012\000"
	.align	2
.LC93:
	.ascii	"OK\000"
	.align	2
.LC94:
	.ascii	"Programming FLASH (%d B in %d pages)\000"
	.align	2
.LC95:
	.ascii	"Verifying FLASH (%d B in %d pages)\000"
	.align	2
.LC96:
	.ascii	"Verifying config\000"
	.align	2
.LC97:
	.ascii	"config 1 OK: %4.4X\012\000"
	.align	2
.LC98:
	.ascii	"config 1 error: E:0x%4.4X R:0x%4.4X\012\000"
	.align	2
.LC99:
	.ascii	"config 2 OK: %4.4X\012\000"
	.align	2
.LC100:
	.ascii	"config 2 error: E:0x%4.4X R:0x%4.4X\012\000"
	.align	2
.LC101:
	.ascii	"config 3 OK: %4.4X\012\000"
	.align	2
.LC102:
	.ascii	"config 3 error: E:0x%4.4X R:0x%4.4X\012\000"
	.align	2
.LC103:
	.ascii	"config 4 OK: %4.4X\012\000"
	.align	2
.LC104:
	.ascii	"config 4 error: E:0x%4.4X R:0x%4.4X\012\000"
	.align	2
.LC105:
	.ascii	"Reading FLASH (%d B in %d pages)\000"
	.align	2
.LC106:
	.ascii	"wb\000"
	.align	2
.LC107:
	.ascii	"_flash.bin\000"
	.align	2
.LC108:
	.ascii	"Reading EEPROM\000"
	.align	2
.LC109:
	.ascii	"_eeprom.bin\000"
	.align	2
.LC110:
	.ascii	"Reading config\000"
	.align	2
.LC111:
	.ascii	"_config.bin\000"
	.align	2
.LC112:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 256
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #260
	str	r0, [fp, #-264]
	str	r1, [fp, #-268]
	ldr	r3, .L527
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, [fp, #-268]
	ldr	r0, [fp, #-264]
	bl	parseArgs
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L398
	ldr	r3, .L527+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L527+12
	bl	printf
.L398:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L399
	ldr	r0, .L527+16
	bl	puts
.L399:
	bl	initSerialPort
	ldr	r3, .L527+20
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L400
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L401
	ldr	r3, .L527+20
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L527+24
	bl	printf
.L401:
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L527+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	sleep_ms
.L400:
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L402
.L403:
	ldr	r2, .L527+32
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L402:
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+36
	cmp	r3, r2
	ble	.L403
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L404
.L405:
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L404:
	ldr	r3, [fp, #-252]
	cmp	r3, #31
	ble	.L405
	ldr	r3, [fp, #-264]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-268]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-240]
	ldr	r3, .L527+32
	str	r3, [fp, #-236]
	ldr	r3, .L527+164
	str	r3, [fp, #-232]
	ldr	r2, [fp, #-232]
	ldr	r1, [fp, #-236]
	ldr	r0, [fp, #-240]
	bl	parse_hex
	str	r0, [fp, #-228]
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L406
.L407:
	ldr	r2, .L527+32
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r2, .L527+152
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L406:
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+40
	cmp	r3, r2
	blt	.L407
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L408
.L409:
	ldr	r3, [fp, #-252]
	add	r3, r3, #65536
	add	r3, r3, #14
	ldr	r1, .L527+164
	ldr	r2, [fp, #-252]
	add	r2, r1, r2
	ldrb	r1, [r2]	@ zero_extendqisi2
	ldr	r2, .L527+152
	strb	r1, [r2, r3]
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L408:
	ldr	r3, [fp, #-252]
	cmp	r3, #9
	ble	.L409
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L410
.L412:
	ldr	r3, [fp, #-252]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L411
	ldr	r2, .L527+152
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #63
	and	r1, r3, #255
	ldr	r2, .L527+152
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
.L411:
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L410:
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+40
	cmp	r3, r2
	blt	.L412
	bl	prog_enter_progmode
	bl	prog_get_device_id
	str	r0, [fp, #-252]
	ldr	r3, .L527+44
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	bne	.L413
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L414
	ldr	r1, [fp, #-252]
	ldr	r0, .L527+48
	bl	printf
	b	.L414
.L413:
	ldr	r3, .L527+44
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-252]
	ldr	r0, .L527+52
	bl	printf
	ldr	r0, .L527+56
	bl	puts
	bl	prog_exit_progmode
	mov	r3, #1
	b	.L525
.L414:
	ldr	r3, .L527+172
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L416
	ldr	r3, .L527+60
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L527+64
	mov	r2, #0
	str	r2, [r3]
.L416:
	ldr	r3, [fp, #-228]
	cmn	r3, #1
	bne	.L417
	ldr	r3, .L527+60
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L417
	ldr	r3, .L527+64
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L417
	ldr	r0, .L527+68
	bl	puts
	bl	prog_exit_progmode
	mov	r3, #1
	b	.L525
.L417:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #5
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	ldr	r2, .L527+216
	ldr	r2, [r2]
	cmp	r2, #6
	moveq	r2, #1
	movne	r2, #0
	and	r2, r2, #255
	orr	r3, r3, r2
	ldr	r2, .L527+216
	ldr	r2, [r2]
	cmp	r2, #9
	moveq	r2, #1
	movne	r2, #0
	and	r2, r2, #255
	orr	r3, r3, r2
	ldr	r2, .L527+216
	ldr	r2, [r2]
	cmp	r2, #11
	moveq	r2, #1
	movne	r2, #0
	and	r2, r2, #255
	orr	r3, r3, r2
	cmp	r3, #0
	beq	.L418
	ldr	r3, .L527+60
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L419
	mov	r3, #0
	str	r3, [fp, #-244]
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L420
	bl	p18a_mass_erase
.L420:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L421
	bl	p18b_mass_erase
.L421:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L422
	bl	p18d_mass_erase
.L422:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L423
	bl	p18e_mass_erase
.L423:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #9
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #11
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L424
	bl	p16c_mass_erase
.L424:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L425
	ldr	r3, .L527+184
	ldr	r4, [r3]
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L527+220
	ldr	r3, [r3]
	mov	r1, r4
	ldr	r0, .L527+72
	bl	printf
.L425:
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L426
.L433:
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r3, r3, r2
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	bne	.L427
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #5
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #6
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L428
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r0, r3, r2
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-252]
	bl	p18d_write_page
	b	.L429
.L428:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #9
	bne	.L430
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r0, r3, r2
	ldr	r3, [fp, #-252]
	lsl	r1, r3, #1
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	bl	p16c_write_page
	b	.L429
.L430:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L431
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r0, r3, r2
	ldr	r3, [fp, #-252]
	lsl	r1, r3, #1
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	bl	p18q_write_page
	b	.L429
.L431:
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r0, r3, r2
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-252]
	bl	p18a_write_page
.L429:
	ldr	r3, [fp, #-244]
	add	r3, r3, #1
	str	r3, [fp, #-244]
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L432
	mov	r0, #35
	bl	putchar
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L432
.L427:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L432
	mov	r0, #46
	bl	putchar
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L432:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L426:
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L433
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L434
	ldr	r1, [fp, #-244]
	ldr	r0, .L527+76
	bl	printf
.L434:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L435
	ldr	r0, .L527+80
	bl	puts
.L435:
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L436
.L442:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L437
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r0, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	ldr	r2, .L527+164
	ldrb	r1, [r2, r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #3145728
	mov	r2, r3
	bl	p18a_write_cfg
.L437:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L438
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r0, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	ldr	r2, .L527+164
	ldrb	r1, [r2, r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #3145728
	mov	r2, r3
	bl	p18d_write_cfg
.L438:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L439
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r0, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	ldr	r2, .L527+164
	ldrb	r1, [r2, r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #3145728
	mov	r2, r3
	bl	p18d_write_cfg
.L439:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #9
	bne	.L440
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	ldr	r2, .L527+164
	ldrb	r0, [r2, r3]	@ zero_extendqisi2
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #3145728
	mov	r2, r3
	bl	p16c_write_single_cfg
.L440:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L441
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	ldr	r2, .L527+164
	ldrb	r0, [r2, r3]	@ zero_extendqisi2
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-252]
	add	r3, r3, #3145728
	mov	r2, r3
	bl	p18q_write_single_cfg
.L441:
	ldr	r3, [fp, #-252]
	add	r3, r3, #2
	str	r3, [fp, #-252]
.L436:
	ldr	r3, .L527+84
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L442
.L419:
	ldr	r3, .L527+64
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L463
	mov	r3, #0
	str	r3, [fp, #-244]
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L444
	ldr	r3, .L527+184
	ldr	r4, [r3]
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L527+220
	ldr	r3, [r3]
	mov	r1, r4
	ldr	r0, .L527+88
	bl	printf
.L444:
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L445
.L455:
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r3, r3, r2
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L446
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L447
	mov	r0, #35
	bl	putchar
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L447
.L446:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #9
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #11
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L448
	ldr	r3, [fp, #-252]
	lsl	r1, r3, #1
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	mov	r0, r3
	bl	p16c_read_page
	b	.L449
.L448:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	ldr	r1, [fp, #-252]
	mov	r0, r3
	bl	p18a_read_page
.L449:
	ldr	r3, [fp, #-244]
	add	r3, r3, #1
	str	r3, [fp, #-244]
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L450
	ldr	r1, [fp, #-252]
	ldr	r0, .L527+92
	bl	printf
.L450:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L451
	mov	r0, #35
	bl	putchar
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L451:
	mov	r3, #0
	str	r3, [fp, #-248]
	b	.L452
.L454:
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldr	r2, .L527+32
	ldrb	r2, [r2, r3]	@ zero_extendqisi2
	sub	r1, fp, #216
	ldr	r3, [fp, #-248]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L453
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r1, r2, r3
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldr	r2, .L527+32
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r0, r3
	sub	r2, fp, #216
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r0
	ldr	r0, .L527+168
	bl	printf
	ldr	r0, .L527+96
	bl	puts
	bl	prog_exit_progmode
	mov	r0, #0
	bl	exit
.L453:
	ldr	r3, [fp, #-248]
	add	r3, r3, #1
	str	r3, [fp, #-248]
.L452:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-248]
	cmp	r2, r3
	blt	.L454
.L447:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L445:
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L455
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L456
	ldr	r1, [fp, #-244]
	ldr	r0, .L527+100
	bl	printf
.L456:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #9
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #11
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L457
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	mov	r1, #6291456
	mov	r0, r3
	bl	p16c_read_page
	b	.L458
.L457:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	mov	r1, #3145728
	mov	r0, r3
	bl	p18a_read_page
.L458:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L459
	ldr	r0, .L527+104
	bl	printf
.L459:
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L460
.L462:
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r1, fp, #216
	ldr	r3, [fp, #-252]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L461
	ldr	r2, .L527+164
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	sub	r2, fp, #216
	ldr	r3, [fp, #-252]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r1
	ldr	r1, [fp, #-252]
	ldr	r0, .L527+108
	bl	printf
	ldr	r0, .L527+96
	bl	puts
	bl	prog_exit_progmode
	mov	r0, #0
	bl	exit
.L461:
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L460:
	ldr	r3, .L527+84
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L462
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L463
	ldr	r0, .L527+112
	bl	puts
	b	.L463
.L418:
	ldr	r3, .L527+60
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L464
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L465
	bl	p16a_mass_erase
.L465:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L466
	bl	p16c_mass_erase
.L466:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L467
	bl	p16a_rst_pointer
.L467:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L468
	ldr	r3, .L527+184
	ldr	r4, [r3]
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L527+116
	bl	printf
.L468:
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L469
.L473:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L470
	mov	r0, #46
	bl	putchar
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L470:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L471
	ldr	r0, [fp, #-252]
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r2, #0
	mov	r1, r3
	bl	p16a_program_page
.L471:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L472
	ldr	r3, [fp, #-252]
	ldr	r2, .L527+32
	add	r0, r3, r2
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r1, [fp, #-252]
	bl	p16c_write_page
.L472:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L469:
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L473
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L474
	mov	r0, #10
	bl	putchar
.L474:
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L475
	ldr	r0, .L527+80
	bl	puts
.L475:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L476
	bl	p16a_program_config
.L476:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L464
	bl	p16c_write_cfg
.L464:
	ldr	r3, .L527+64
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L477
	ldr	r3, .L527+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L478
	ldr	r3, .L527+184
	ldr	r4, [r3]
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L527+120
	bl	printf
.L478:
	ldr	r3, .L527+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L479
	bl	p16a_rst_pointer
.L479:
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L480
.L528:
	.align	2
.L527:
	.word	.LC112
	.word	verbose
	.word	PP_VER
	.word	.LC76
	.word	.LC77
	.word	sleep_time
	.word	.LC78
	.word	stdout
	.word	progmem
	.word	259999
	.word	70000
	.word	devid_expected
	.word	.LC79
	.word	.LC80
	.word	.LC81
	.word	program
	.word	verify
	.word	.LC82
	.word	.LC83
	.word	.LC84
	.word	.LC85
	.word	config_size
	.word	.LC86
	.word	.LC87
	.word	.LC89
	.word	.LC90
	.word	.LC91
	.word	.LC92
	.word	.LC93
	.word	.LC94
	.word	.LC95
	.word	.LC96
	.word	.LC97
	.word	.LC98
	.word	.LC99
	.word	.LC100
	.word	.LC101
	.word	.LC102
	.word	file_image
	.word	.LC103
	.word	.LC104
	.word	config_bytes
	.word	.LC88
	.word	readflash
	.word	.LC105
	.word	.LC107
	.word	flash_size
	.word	.LC108
	.word	.LC109
	.word	stdout
	.word	verbose
	.word	.LC110
	.word	.LC106
	.word	.LC111
	.word	chip_family
	.word	page_size
	.word	65550
	.word	.LC112
.L487:
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L481
	mov	r0, #46
	bl	putchar
	ldr	r3, .L527+196
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L481:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L482
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	mov	r1, r2
	mov	r0, r3
	bl	p16a_read_page
.L482:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L483
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	ldr	r1, [fp, #-252]
	mov	r0, r3
	bl	p16c_read_page
.L483:
	mov	r3, #0
	str	r3, [fp, #-248]
	b	.L484
.L486:
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldr	r2, .L527+152
	ldrb	r2, [r2, r3]	@ zero_extendqisi2
	sub	r1, fp, #216
	ldr	r3, [fp, #-248]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L485
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r1, r2, r3
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldr	r2, .L527+152
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r0, r3
	sub	r2, fp, #216
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r0
	ldr	r0, .L527+168
	bl	printf
	bl	prog_exit_progmode
	mov	r0, #0
	bl	exit
.L485:
	ldr	r3, [fp, #-248]
	add	r3, r3, #1
	str	r3, [fp, #-248]
.L484:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-248]
	cmp	r2, r3
	blt	.L486
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L480:
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L487
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L488
	mov	r0, #10
	bl	putchar
.L488:
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L489
	ldr	r0, .L527+124
	bl	puts
.L489:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L490
	mov	r0, #7
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #14]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #15]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	cmp	r2, r3
	bne	.L491
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L492
	ldr	r3, [fp, #-256]
	mov	r1, r3
	ldr	r0, .L527+128
	bl	printf
	b	.L492
.L491:
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	mov	r1, r3
	ldr	r0, .L527+132
	bl	printf
.L492:
	mov	r0, #8
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #16]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	cmp	r2, r3
	bne	.L493
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L494
	ldr	r3, [fp, #-256]
	mov	r1, r3
	ldr	r0, .L527+136
	bl	printf
	b	.L494
.L493:
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	mov	r1, r3
	ldr	r0, .L527+140
	bl	printf
.L494:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L490
	mov	r0, #9
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #18]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #19]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	cmp	r2, r3
	bne	.L495
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L496
	ldr	r3, [fp, #-256]
	mov	r1, r3
	ldr	r0, .L527+144
	bl	printf
	b	.L496
.L495:
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	mov	r1, r3
	ldr	r0, .L527+148
	bl	printf
.L496:
	mov	r0, #10
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #20]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L527+152
	add	r3, r3, #65536
	ldrb	r3, [r3, #21]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	cmp	r2, r3
	bne	.L497
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L490
	ldr	r3, [fp, #-256]
	mov	r1, r3
	ldr	r0, .L527+156
	bl	printf
	b	.L490
.L497:
	ldr	r3, [fp, #-256]
	ldr	r2, [fp, #-224]
	mov	r1, r3
	ldr	r0, .L527+160
	bl	printf
.L490:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L477
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	ldr	r1, .L527+224
	mov	r0, r3
	bl	p16c_read_page
	mov	r3, #0
	str	r3, [fp, #-248]
	b	.L498
.L500:
	ldr	r2, .L527+164
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r1, fp, #216
	ldr	r3, [fp, #-248]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L499
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-248]
	add	r1, r2, r3
	ldr	r2, .L527+164
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	sub	r2, fp, #216
	ldr	r3, [fp, #-248]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r0
	ldr	r0, .L527+168
	bl	printf
	bl	prog_exit_progmode
	mov	r0, #0
	bl	exit
.L499:
	ldr	r3, [fp, #-248]
	add	r3, r3, #1
	str	r3, [fp, #-248]
.L498:
	ldr	r3, [fp, #-248]
	cmp	r3, #9
	ble	.L500
.L477:
	ldr	r3, .L527+172
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L463
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L501
	ldr	r3, .L527+184
	ldr	r4, [r3]
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, .L527+220
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L527+176
	bl	printf
.L501:
	ldr	r3, .L527+196
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L502
	bl	p16a_rst_pointer
.L502:
	ldr	r1, .L527+208
	ldr	r0, .L527+180
	bl	fopen
	str	r0, [fp, #-220]
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L503
.L508:
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L504
	mov	r0, #46
	bl	putchar
	ldr	r3, .L527+196
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L504:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L505
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	mov	r1, r2
	mov	r0, r3
	bl	p16a_read_page
.L505:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L506
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	ldr	r1, [fp, #-252]
	mov	r0, r3
	bl	p16c_read_page
.L506:
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L507
	ldr	r3, .L527+220
	ldr	r3, [r3]
	mov	r1, r3
	sub	r0, fp, #216
	ldr	r3, [fp, #-220]
	mov	r2, #1
	bl	fwrite
.L507:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L503:
	ldr	r3, .L527+184
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	blt	.L508
	ldr	r0, [fp, #-220]
	bl	fclose
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L509
	mov	r0, #10
	bl	putchar
.L509:
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L510
	ldr	r0, .L527+188
	bl	printf
.L510:
	ldr	r3, .L527+196
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L511
	mov	r0, #61440
	bl	p16d_set_pointer
.L511:
	ldr	r1, .L527+208
	ldr	r0, .L527+192
	bl	fopen
	str	r0, [fp, #-220]
	mov	r3, #0
	str	r3, [fp, #-252]
	b	.L512
.L517:
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L513
	mov	r0, #46
	bl	putchar
	ldr	r3, .L527+196
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L513:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L514
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L515
.L514:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	mov	r1, r2
	mov	r0, r3
	bl	p16a_read_eeprom
.L515:
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L516
	ldr	r3, .L527+220
	ldr	r3, [r3]
	mov	r1, r3
	sub	r0, fp, #216
	ldr	r3, [fp, #-220]
	mov	r2, #1
	bl	fwrite
.L516:
	ldr	r3, .L527+220
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	str	r3, [fp, #-252]
.L512:
	ldr	r3, [fp, #-252]
	cmp	r3, #255
	ble	.L517
	ldr	r0, [fp, #-220]
	bl	fclose
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L518
	mov	r0, #10
	bl	putchar
.L518:
	ldr	r3, .L527+200
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L519
	ldr	r0, .L527+204
	bl	puts
.L519:
	ldr	r1, .L527+208
	ldr	r0, .L527+212
	bl	fopen
	str	r0, [fp, #-220]
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r2, r3, #255
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #2
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	orr	r3, r2, r3
	cmp	r3, #0
	beq	.L520
	mov	r0, #7
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L521
	sub	r0, fp, #256
	ldr	r3, [fp, #-220]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
.L521:
	mov	r0, #8
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L520
	sub	r0, fp, #256
	ldr	r3, [fp, #-220]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
.L520:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L522
	mov	r0, #9
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L523
	sub	r0, fp, #256
	ldr	r3, [fp, #-220]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
.L523:
	mov	r0, #10
	bl	p16a_get_config
	mov	r3, r0
	str	r3, [fp, #-256]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L522
	sub	r0, fp, #256
	ldr	r3, [fp, #-220]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
.L522:
	ldr	r3, .L527+216
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L524
	ldr	r3, .L527+220
	ldr	r3, [r3]
	and	r2, r3, #255
	sub	r3, fp, #216
	ldr	r1, .L527+224
	mov	r0, r3
	bl	p16c_read_page
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L524
	sub	r0, fp, #216
	ldr	r3, [fp, #-220]
	mov	r2, #1
	mov	r1, #10
	bl	fwrite
.L524:
	ldr	r0, [fp, #-220]
	bl	fclose
.L463:
	bl	prog_exit_progmode
	mov	r3, #0
.L525:
	ldr	r2, .L527+228
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L526
	bl	__stack_chk_fail
.L526:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
