	.file	"411698.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: %s [OPTION] \n"
	.align 8
.LC1:
	.ascii	"             -a | --target-addr             target addr     "
	.ascii	"                             \n             -c | --block-cou"
	.ascii	"nt             write block-count                            "
	.ascii	"\n             -d | --device                  serial device "
	.ascii	"                               \n             -g | --group-s"
	.ascii	"ize              write group size                           "
	.ascii	"  \n             -i | --input                   input binary"
	.ascii	" file                            \n             -n"
	.string	" | --recon                   just print                                   \n             -t | --test                    test                                         \n             -h | --help                    display help info                            \n\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 721
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.section	.rodata
.LC2:
	.string	"block-count"
.LC3:
	.string	"device"
.LC4:
	.string	"input"
.LC5:
	.string	"target-addr"
.LC6:
	.string	"group-size"
.LC7:
	.string	"recon"
.LC8:
	.string	"test"
.LC9:
	.string	"help"
	.section	.data.rel.ro.local,"aw"
	.align 32
	.type	long_options, @object
	.size	long_options, 256
long_options:
	.quad	.LC2
	.long	1
	.zero	4
	.quad	0
	.long	99
	.zero	4
	.quad	.LC3
	.long	1
	.zero	4
	.quad	0
	.long	100
	.zero	4
	.quad	.LC4
	.long	1
	.zero	4
	.quad	0
	.long	105
	.zero	4
	.quad	.LC5
	.long	1
	.zero	4
	.quad	0
	.long	97
	.zero	4
	.quad	.LC6
	.long	1
	.zero	4
	.quad	0
	.long	103
	.zero	4
	.quad	.LC7
	.long	1
	.zero	4
	.quad	0
	.long	110
	.zero	4
	.quad	.LC8
	.long	0
	.zero	4
	.quad	0
	.long	116
	.zero	4
	.quad	.LC9
	.long	0
	.zero	4
	.quad	0
	.long	104
	.zero	4
	.globl	sys_banner
	.data
	.align 32
	.type	sys_banner, @object
	.size	sys_banner, 34
sys_banner:
	.string	"buildtime [03:31:13 Dec  6 2024] "
	.globl	ser_recv_buf
	.bss
	.align 32
	.type	ser_recv_buf, @object
	.size	ser_recv_buf, 2048
ser_recv_buf:
	.zero	2048
	.globl	ser_send_buf
	.align 32
	.type	ser_send_buf, @object
	.size	ser_send_buf, 1024
ser_send_buf:
	.zero	1024
	.text
	.globl	cksum
	.type	cksum, @function
cksum:
.LFB7:
	.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	WORD PTR -6[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	WORD PTR -6[rbp], ax
	add	DWORD PTR -4[rbp], 1
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jb	.L4
	movzx	eax, WORD PTR -6[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cksum, .-cksum
	.section	.rodata
.LC10:
	.string	"/dev/ttyS0"
.LC11:
	.string	"a:c:d:g:i:hnt"
.LC12:
	.string	"serialinit fail!"
.LC13:
	.string	"\r\nhelp\r\n"
.LC14:
	.string	"send [%s]\n"
.LC15:
	.string	"recv [%s]\n"
.LC16:
	.string	"open"
.LC17:
	.string	"fstat"
.LC18:
	.string	"ifile must less than 32K"
.LC19:
	.string	"mmap"
.LC20:
	.string	"the_stack_data/411698.c"
.LC21:
	.string	"r == 0"
.LC22:
	.string	"at28 prog 0x%04x %d "
.LC23:
	.string	"%02x"
.LC24:
	.string	" 0x%04x\r\n"
.LC25:
	.string	"%s"
.LC26:
	.string	"cmd [%s]\n"
.LC27:
	.string	"prog succ!"
.LC28:
	.string	"__SUCC__"
.LC29:
	.string	"__FAIL__"
.LC30:
	.string	"skip [%s]\r\n"
	.align 8
.LC31:
	.string	"PROG DONE: total [%d]; succ [%d]; fail [%d] skip [%d]\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 272
	mov	DWORD PTR -260[rbp], edi
	mov	QWORD PTR -272[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -244[rbp], 0
	lea	rax, .LC10[rip]
	mov	QWORD PTR -184[rbp], rax
	mov	QWORD PTR -176[rbp], 0
	mov	DWORD PTR -240[rbp], 0
	mov	DWORD PTR -236[rbp], 0
	mov	DWORD PTR -232[rbp], 0
	mov	DWORD PTR -228[rbp], 256
	mov	DWORD PTR -224[rbp], 0
	mov	DWORD PTR -220[rbp], 0
	mov	DWORD PTR -216[rbp], 0
	mov	DWORD PTR -212[rbp], 0
	mov	DWORD PTR -208[rbp], 0
	mov	DWORD PTR -204[rbp], 0
	jmp	.L7
.L18:
	mov	eax, DWORD PTR -200[rbp]
	sub	eax, 97
	cmp	eax, 19
	ja	.L8
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L10[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L10[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L10:
	.long	.L17-.L10
	.long	.L8-.L10
	.long	.L16-.L10
	.long	.L15-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L14-.L10
	.long	.L13-.L10
	.long	.L12-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L11-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L8-.L10
	.long	.L9-.L10
	.text
.L17:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR -240[rbp], eax
	jmp	.L7
.L16:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR -220[rbp], eax
	jmp	.L7
.L15:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L7
.L12:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -176[rbp], rax
	jmp	.L7
.L9:
	mov	DWORD PTR -236[rbp], 1
	jmp	.L7
.L11:
	mov	DWORD PTR -232[rbp], 1
	jmp	.L7
.L14:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR -228[rbp], eax
	jmp	.L7
.L13:
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
	nop
.L7:
	lea	rdx, -256[rbp]
	mov	rsi, QWORD PTR -272[rbp]
	mov	eax, DWORD PTR -260[rbp]
	mov	r8, rdx
	lea	rcx, long_options[rip]
	lea	rdx, .LC11[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -200[rbp], eax
	cmp	DWORD PTR -200[rbp], -1
	jne	.L18
	lea	rdi, sys_banner[rip]
	call	puts@PLT
	cmp	DWORD PTR -260[rbp], 1
	jne	.L19
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
	mov	edi, 0
	call	exit@PLT
.L19:
	cmp	DWORD PTR -232[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	serial_init@PLT
	cmp	eax, -1
	jne	.L20
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L20:
	cmp	DWORD PTR -236[rbp], 0
	je	.L21
	lea	rsi, .LC13[rip]
	lea	rdi, ser_send_buf[rip]
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -244[rbp], eax
	lea	rsi, ser_send_buf[rip]
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -244[rbp]
	mov	esi, eax
	lea	rdi, ser_send_buf[rip]
	call	serial_send@PLT
	mov	esi, 2048
	lea	rdi, ser_recv_buf[rip]
	call	serial_recv@PLT
	lea	rsi, ser_recv_buf[rip]
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L21:
	mov	rax, QWORD PTR -176[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], -1
	jne	.L22
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L22:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	cmp	eax, -1
	jne	.L23
	lea	rdi, .LC17[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -112[rbp]
	cmp	rax, 32768
	jle	.L24
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L24:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	mov	eax, DWORD PTR -196[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], -1
	jne	.L25
	lea	rdi, .LC19[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L25:
	mov	rax, QWORD PTR -112[rbp]
	mov	ecx, DWORD PTR -228[rbp]
	cqo
	idiv	rcx
	mov	DWORD PTR -192[rbp], eax
	mov	rax, QWORD PTR -112[rbp]
	mov	ecx, DWORD PTR -228[rbp]
	cqo
	idiv	rcx
	mov	rax, rdx
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -188[rbp], 0
	je	.L26
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 180
	lea	rsi, .LC20[rip]
	lea	rdi, .LC21[rip]
	call	__assert_fail@PLT
.L26:
	cmp	DWORD PTR -220[rbp], 0
	jne	.L27
	mov	eax, DWORD PTR -192[rbp]
	mov	DWORD PTR -220[rbp], eax
.L27:
	mov	DWORD PTR -252[rbp], 0
	jmp	.L28
.L37:
	mov	DWORD PTR -244[rbp], 0
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, ser_send_buf[rip]
	call	memset@PLT
	mov	edx, DWORD PTR -252[rbp]
	mov	eax, DWORD PTR -240[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -228[rbp]
	mov	ecx, eax
	lea	rsi, .LC22[rip]
	lea	rdi, ser_send_buf[rip]
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -244[rbp], eax
	mov	DWORD PTR -248[rbp], 0
	jmp	.L29
.L30:
	mov	edx, DWORD PTR -252[rbp]
	mov	eax, DWORD PTR -248[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -168[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edx, DWORD PTR -244[rbp]
	lea	rcx, ser_send_buf[rip]
	add	rcx, rdx
	mov	edx, eax
	lea	rsi, .LC23[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -244[rbp], eax
	add	DWORD PTR -248[rbp], 1
.L29:
	mov	eax, DWORD PTR -248[rbp]
	cmp	DWORD PTR -228[rbp], eax
	ja	.L30
	mov	eax, DWORD PTR -252[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -168[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -228[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	cksum
	movzx	eax, ax
	mov	edx, DWORD PTR -244[rbp]
	lea	rcx, ser_send_buf[rip]
	add	rcx, rdx
	mov	edx, eax
	lea	rsi, .LC24[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -244[rbp], eax
	cmp	DWORD PTR -232[rbp], 0
	je	.L31
	lea	rsi, ser_send_buf[rip]
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L32
.L31:
	mov	eax, DWORD PTR -224[rbp]
	cmp	eax, DWORD PTR -220[rbp]
	jb	.L33
	mov	eax, DWORD PTR -192[rbp]
	sub	eax, 1
	cmp	DWORD PTR -224[rbp], eax
	jne	.L34
.L33:
	lea	rsi, ser_send_buf[rip]
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -244[rbp]
	mov	esi, eax
	lea	rdi, ser_send_buf[rip]
	call	serial_send@PLT
	mov	edi, 4000000
	call	usleep@PLT
	mov	esi, 2048
	lea	rdi, ser_recv_buf[rip]
	call	serial_recv@PLT
	lea	rsi, ser_recv_buf[rip]
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC27[rip]
	lea	rdi, ser_recv_buf[rip]
	call	strstr@PLT
	test	rax, rax
	je	.L35
	lea	rdi, .LC28[rip]
	call	puts@PLT
	add	DWORD PTR -212[rbp], 1
	jmp	.L32
.L35:
	lea	rdi, .LC29[rip]
	call	puts@PLT
	add	DWORD PTR -208[rbp], 1
	jmp	.L32
.L34:
	lea	rsi, ser_send_buf[rip]
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -204[rbp], 1
.L32:
	add	DWORD PTR -224[rbp], 1
	add	DWORD PTR -216[rbp], 1
	mov	edx, DWORD PTR -252[rbp]
	mov	eax, DWORD PTR -228[rbp]
	add	eax, edx
	mov	DWORD PTR -252[rbp], eax
.L28:
	mov	eax, DWORD PTR -192[rbp]
	imul	eax, DWORD PTR -228[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -252[rbp]
	cmp	edx, eax
	ja	.L37
	mov	esi, DWORD PTR -204[rbp]
	mov	ecx, DWORD PTR -208[rbp]
	mov	edx, DWORD PTR -212[rbp]
	mov	eax, DWORD PTR -216[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"411698.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s [OPTION] \012\000"
	.align	2
.LC1:
	.ascii	"             -a | --target-addr             target "
	.ascii	"addr                                  \012         "
	.ascii	"    -c | --block-count             write block-coun"
	.ascii	"t                            \012             -d | "
	.ascii	"--device                  serial device            "
	.ascii	"                    \012             -g | --group-s"
	.ascii	"ize              write group size                  "
	.ascii	"           \012             -i | --input           "
	.ascii	"        input binary file                          "
	.ascii	"  \012             -n | --recon                   j"
	.ascii	"ust print                                   \012   "
	.ascii	"          -t | --test                    test      "
	.ascii	"                                   \012            "
	.ascii	" -h | --help                    display help info  "
	.ascii	"                          \012\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L2
	bl	printf
	ldr	r3, .L2+4
	ldr	r3, [r3]
	ldr	r2, .L2+8
	mov	r1, #1
	ldr	r0, .L2+12
	bl	fwrite
	mov	r0, #0
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	stdout
	.word	721
	.word	.LC1
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"block-count\000"
	.align	2
.LC3:
	.ascii	"device\000"
	.align	2
.LC4:
	.ascii	"input\000"
	.align	2
.LC5:
	.ascii	"target-addr\000"
	.align	2
.LC6:
	.ascii	"group-size\000"
	.align	2
.LC7:
	.ascii	"recon\000"
	.align	2
.LC8:
	.ascii	"test\000"
	.align	2
.LC9:
	.ascii	"help\000"
	.align	2
	.type	long_options, %object
	.size	long_options, 128
long_options:
	.word	.LC2
	.word	1
	.word	0
	.word	99
	.word	.LC3
	.word	1
	.word	0
	.word	100
	.word	.LC4
	.word	1
	.word	0
	.word	105
	.word	.LC5
	.word	1
	.word	0
	.word	97
	.word	.LC6
	.word	1
	.word	0
	.word	103
	.word	.LC7
	.word	1
	.word	0
	.word	110
	.word	.LC8
	.word	0
	.word	0
	.word	116
	.word	.LC9
	.word	0
	.word	0
	.word	104
	.global	sys_banner
	.data
	.align	2
	.type	sys_banner, %object
	.size	sys_banner, 34
sys_banner:
	.ascii	"buildtime [03:31:13 Dec  6 2024] \000"
	.comm	ser_recv_buf,2048,4
	.comm	ser_send_buf,1024,4
	.text
	.align	2
	.global	cksum
	.syntax unified
	.arm
	.fpu softvfp
	.type	cksum, %function
cksum:
	@ 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, #0
	strh	r3, [fp, #-10]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L5
.L6:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-10]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-10]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bcc	.L6
	ldrh	r3, [fp, #-10]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	cksum, .-cksum
	.section	.rodata
	.align	2
.LC10:
	.ascii	"/dev/ttyS0\000"
	.align	2
.LC11:
	.ascii	"a:c:d:g:i:hnt\000"
	.align	2
.LC12:
	.ascii	"serialinit fail!\000"
	.align	2
.LC13:
	.ascii	"\015\012help\015\012\000"
	.align	2
.LC14:
	.ascii	"send [%s]\012\000"
	.align	2
.LC15:
	.ascii	"recv [%s]\012\000"
	.align	2
.LC16:
	.ascii	"open\000"
	.align	2
.LC17:
	.ascii	"fstat\000"
	.align	2
.LC18:
	.ascii	"ifile must less than 32K\000"
	.align	2
.LC19:
	.ascii	"mmap\000"
	.global	__aeabi_uidiv
	.global	__aeabi_uidivmod
	.align	2
.LC20:
	.ascii	"the_stack_data/411698.c\000"
	.align	2
.LC21:
	.ascii	"r == 0\000"
	.align	2
.LC22:
	.ascii	"at28 prog 0x%04x %d \000"
	.align	2
.LC23:
	.ascii	"%02x\000"
	.align	2
.LC24:
	.ascii	" 0x%04x\015\012\000"
	.align	2
.LC25:
	.ascii	"%s\000"
	.align	2
.LC26:
	.ascii	"cmd [%s]\012\000"
	.align	2
.LC27:
	.ascii	"prog succ!\000"
	.align	2
.LC28:
	.ascii	"__SUCC__\000"
	.align	2
.LC29:
	.ascii	"__FAIL__\000"
	.align	2
.LC30:
	.ascii	"skip [%s]\015\012\000"
	.align	2
.LC31:
	.ascii	"PROG DONE: total [%d]; succ [%d]; fail [%d] skip [%"
	.ascii	"d]\012\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #204
	str	r0, [fp, #-200]
	str	r1, [fp, #-204]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-180]
	ldr	r3, .L42+4
	str	r3, [fp, #-176]
	mov	r3, #0
	str	r3, [fp, #-172]
	mov	r3, #0
	str	r3, [fp, #-168]
	mov	r3, #0
	str	r3, [fp, #-164]
	mov	r3, #0
	str	r3, [fp, #-160]
	mov	r3, #256
	str	r3, [fp, #-156]
	mov	r3, #0
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L9
.L20:
	ldr	r3, [fp, #-128]
	sub	r3, r3, #97
	cmp	r3, #19
	ldrls	pc, [pc, r3, asl #2]
	b	.L10
.L12:
	.word	.L19
	.word	.L10
	.word	.L18
	.word	.L17
	.word	.L10
	.word	.L10
	.word	.L16
	.word	.L15
	.word	.L14
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L13
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L11
.L19:
	ldr	r3, .L42+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-168]
	b	.L9
.L18:
	ldr	r3, .L42+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-148]
	b	.L9
.L17:
	ldr	r3, .L42+8
	ldr	r3, [r3]
	str	r3, [fp, #-176]
	b	.L9
.L14:
	ldr	r3, .L42+8
	ldr	r3, [r3]
	str	r3, [fp, #-172]
	b	.L9
.L11:
	mov	r3, #1
	str	r3, [fp, #-164]
	b	.L9
.L13:
	mov	r3, #1
	str	r3, [fp, #-160]
	b	.L9
.L16:
	ldr	r3, .L42+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-156]
	b	.L9
.L15:
	ldr	r3, [fp, #-204]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
	b	.L9
.L10:
	ldr	r3, [fp, #-204]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
	nop
.L9:
	sub	r3, fp, #192
	str	r3, [sp]
	ldr	r3, .L42+12
	ldr	r2, .L42+16
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-200]
	bl	getopt_long
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmn	r3, #1
	bne	.L20
	ldr	r0, .L42+20
	bl	puts
	ldr	r3, [fp, #-200]
	cmp	r3, #1
	bne	.L21
	ldr	r3, [fp, #-204]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
	mov	r0, #0
	bl	exit
.L21:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bne	.L22
	ldr	r0, [fp, #-176]
	bl	serial_init
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	ldr	r0, .L42+24
	bl	puts
	mov	r0, #0
	bl	exit
.L22:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L23
	ldr	r1, .L42+28
	ldr	r0, .L42+32
	bl	sprintf
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-180]
	add	r3, r3, r2
	str	r3, [fp, #-180]
	ldr	r1, .L42+32
	ldr	r0, .L42+36
	bl	printf
	ldr	r1, [fp, #-180]
	ldr	r0, .L42+32
	bl	serial_send
	mov	r1, #2048
	ldr	r0, .L42+40
	bl	serial_recv
	ldr	r1, .L42+40
	ldr	r0, .L42+44
	bl	printf
	mov	r0, #0
	bl	exit
.L23:
	mov	r1, #2
	ldr	r0, [fp, #-172]
	bl	open
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmn	r3, #1
	bne	.L24
	ldr	r0, .L42+48
	bl	perror
	mvn	r0, #0
	bl	exit
.L24:
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-124]
	bl	fstat
	mov	r3, r0
	cmn	r3, #1
	bne	.L25
	ldr	r0, .L42+52
	bl	perror
	mvn	r0, #0
	bl	exit
.L25:
	ldr	r3, [fp, #-64]
	cmp	r3, #32768
	ble	.L26
	ldr	r0, .L42+56
	bl	puts
	mvn	r0, #0
	bl	exit
.L26:
	ldr	r3, [fp, #-64]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-124]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmn	r3, #1
	bne	.L27
	ldr	r0, .L42+60
	bl	perror
	mvn	r0, #0
	bl	exit
.L27:
	ldr	r3, [fp, #-64]
	ldr	r1, [fp, #-156]
	mov	r0, r3
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-64]
	ldr	r1, [fp, #-156]
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	beq	.L28
	ldr	r3, .L42+64
	mov	r2, #180
	ldr	r1, .L42+68
	ldr	r0, .L42+72
	bl	__assert_fail
.L28:
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L29
	ldr	r3, [fp, #-116]
	str	r3, [fp, #-148]
.L29:
	mov	r3, #0
	str	r3, [fp, #-188]
	b	.L30
.L39:
	mov	r3, #0
	str	r3, [fp, #-180]
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L42+32
	bl	memset
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-168]
	add	r2, r2, r3
	ldr	r3, [fp, #-156]
	ldr	r1, .L42+76
	ldr	r0, .L42+32
	bl	sprintf
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-180]
	add	r3, r3, r2
	str	r3, [fp, #-180]
	mov	r3, #0
	str	r3, [fp, #-184]
	b	.L31
.L32:
	ldr	r3, [fp, #-180]
	ldr	r2, .L42+32
	add	r0, r3, r2
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-184]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-120]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L42+80
	bl	sprintf
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-180]
	add	r3, r3, r2
	str	r3, [fp, #-180]
	ldr	r3, [fp, #-184]
	add	r3, r3, #1
	str	r3, [fp, #-184]
.L31:
	ldr	r3, [fp, #-184]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	bhi	.L32
	ldr	r3, [fp, #-180]
	ldr	r2, .L42+32
	add	r4, r3, r2
	ldr	r3, [fp, #-188]
	ldr	r2, [fp, #-120]
	add	r3, r2, r3
	ldr	r1, [fp, #-156]
	mov	r0, r3
	bl	cksum
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L42+84
	mov	r0, r4
	bl	sprintf
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-180]
	add	r3, r3, r2
	str	r3, [fp, #-180]
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L33
	ldr	r1, .L42+32
	ldr	r0, .L42+88
	bl	printf
	b	.L34
.L33:
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-148]
	cmp	r2, r3
	bcc	.L35
	ldr	r3, [fp, #-116]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-152]
	cmp	r3, r2
	bne	.L36
.L35:
	ldr	r1, .L42+32
	ldr	r0, .L42+92
	bl	printf
	ldr	r1, [fp, #-180]
	ldr	r0, .L42+32
	bl	serial_send
	ldr	r0, .L42+96
	bl	usleep
	mov	r1, #2048
	ldr	r0, .L42+40
	bl	serial_recv
	ldr	r1, .L42+40
	ldr	r0, .L42+44
	bl	printf
	ldr	r1, .L42+100
	ldr	r0, .L42+40
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L37
	ldr	r0, .L42+104
	bl	puts
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
	b	.L34
.L37:
	ldr	r0, .L42+108
	bl	puts
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
	b	.L34
.L36:
	ldr	r1, .L42+32
	ldr	r0, .L42+112
	bl	printf
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L34:
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	str	r3, [fp, #-188]
.L30:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-156]
	mul	r2, r3, r2
	ldr	r3, [fp, #-188]
	cmp	r2, r3
	bhi	.L39
	ldr	r3, [fp, #-132]
	str	r3, [sp]
	ldr	r3, [fp, #-136]
	ldr	r2, [fp, #-140]
	ldr	r1, [fp, #-144]
	ldr	r0, .L42+116
	bl	printf
	ldr	r3, [fp, #-64]
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	munmap
	ldr	r0, [fp, #-124]
	bl	close
	mov	r3, #0
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC32
	.word	.LC10
	.word	optarg
	.word	long_options
	.word	.LC11
	.word	sys_banner
	.word	.LC12
	.word	.LC13
	.word	ser_send_buf
	.word	.LC14
	.word	ser_recv_buf
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	__PRETTY_FUNCTION__.6199
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	4000000
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6199, %object
	.size	__PRETTY_FUNCTION__.6199, 5
__PRETTY_FUNCTION__.6199:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
