	.file	"167329395.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"hp:b:s:rn:d:"
.LC1:
	.string	"read: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 576
	mov	DWORD PTR -564[rbp], edi
	mov	QWORD PTR -576[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -548[rbp], 0
	mov	DWORD PTR -544[rbp], 13
	cmp	DWORD PTR -564[rbp], 1
	jne	.L2
	call	usage@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	mov	DWORD PTR -552[rbp], 0
.L19:
	lea	rdx, -552[rbp]
	mov	rsi, QWORD PTR -576[rbp]
	mov	eax, DWORD PTR -564[rbp]
	mov	r8, rdx
	lea	rcx, loptions.0[rip]
	lea	rdx, .LC0[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -540[rbp], eax
	cmp	DWORD PTR -540[rbp], -1
	je	.L23
	cmp	DWORD PTR -540[rbp], 48
	je	.L24
	cmp	DWORD PTR -540[rbp], 48
	jl	.L19
	cmp	DWORD PTR -540[rbp], 115
	jg	.L19
	cmp	DWORD PTR -540[rbp], 98
	jl	.L19
	mov	eax, DWORD PTR -540[rbp]
	sub	eax, 98
	cmp	eax, 17
	ja	.L19
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L8[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L8[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L8:
	.long	.L14-.L8
	.long	.L19-.L8
	.long	.L13-.L8
	.long	.L19-.L8
	.long	.L19-.L8
	.long	.L19-.L8
	.long	.L12-.L8
	.long	.L19-.L8
	.long	.L19-.L8
	.long	.L19-.L8
	.long	.L19-.L8
	.long	.L19-.L8
	.long	.L11-.L8
	.long	.L19-.L8
	.long	.L10-.L8
	.long	.L19-.L8
	.long	.L9-.L8
	.long	.L7-.L8
	.text
.L13:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	imul	eax, eax, 1000
	mov	edi, eax
	call	usleep@PLT
	jmp	.L6
.L12:
	call	usage@PLT
	jmp	.L6
.L14:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -544[rbp], eax
	jmp	.L6
.L10:
	mov	rdx, QWORD PTR optarg[rip]
	lea	rax, -528[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, DWORD PTR -544[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	serialport_init
	mov	DWORD PTR -548[rbp], eax
	cmp	DWORD PTR -548[rbp], -1
	jne	.L25
	mov	eax, -1
	jmp	.L20
.L11:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	movzx	edx, al
	mov	eax, DWORD PTR -548[rbp]
	mov	esi, edx
	mov	edi, eax
	call	serialport_writebyte
	mov	DWORD PTR -536[rbp], eax
	cmp	DWORD PTR -536[rbp], -1
	jne	.L26
	mov	eax, -1
	jmp	.L20
.L7:
	mov	rdx, QWORD PTR optarg[rip]
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rdx, -272[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	serialport_write
	mov	DWORD PTR -536[rbp], eax
	cmp	DWORD PTR -536[rbp], -1
	jne	.L27
	mov	eax, -1
	jmp	.L20
.L9:
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	call	serialport_read_until
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L24:
	nop
	jmp	.L19
.L25:
	nop
	jmp	.L19
.L26:
	nop
	jmp	.L19
.L27:
	nop
.L6:
	jmp	.L19
.L23:
	nop
	mov	edi, 0
	call	exit@PLT
.L20:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	serialport_writebyte
	.type	serialport_writebyte, @function
serialport_writebyte:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, esi
	mov	BYTE PTR -24[rbp], al
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 1
	je	.L29
	mov	eax, -1
	jmp	.L30
.L29:
	mov	eax, 0
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	serialport_writebyte, .-serialport_writebyte
	.globl	serialport_write
	.type	serialport_write, @function
serialport_write:
.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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	je	.L32
	mov	eax, -1
	jmp	.L33
.L32:
	mov	eax, 0
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	serialport_write, .-serialport_write
	.globl	serialport_read_until
	.type	serialport_read_until, @function
serialport_read_until:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	eax, edx
	mov	BYTE PTR -40[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 0
.L39:
	lea	rcx, -9[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	jne	.L35
	mov	eax, -1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L40
	jmp	.L41
.L35:
	cmp	DWORD PTR -16[rbp], 0
	jne	.L37
	mov	edi, 10000
	call	usleep@PLT
	jmp	.L38
.L37:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -9[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -20[rbp], 1
.L38:
	jmp	.L39
.L41:
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	serialport_read_until, .-serialport_read_until
	.section	.rodata
	.align 8
.LC2:
	.string	"init_serialport: Unable to open port "
	.align 8
.LC3:
	.string	"init_serialport: Couldn't get term attributes"
	.align 8
.LC4:
	.string	"init_serialport: Couldn't set term attributes"
	.text
	.globl	serialport_init
	.type	serialport_init, @function
serialport_init:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 2306
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], -1
	jne	.L43
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L54
.L43:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	test	eax, eax
	jns	.L45
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L54
.L45:
	mov	eax, DWORD PTR -108[rbp]
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -108[rbp], 115200
	je	.L46
	cmp	DWORD PTR -108[rbp], 115200
	jg	.L47
	cmp	DWORD PTR -108[rbp], 57600
	je	.L48
	cmp	DWORD PTR -108[rbp], 57600
	jg	.L47
	cmp	DWORD PTR -108[rbp], 38400
	je	.L49
	cmp	DWORD PTR -108[rbp], 38400
	jg	.L47
	cmp	DWORD PTR -108[rbp], 19200
	je	.L50
	cmp	DWORD PTR -108[rbp], 19200
	jg	.L47
	cmp	DWORD PTR -108[rbp], 4800
	je	.L51
	cmp	DWORD PTR -108[rbp], 9600
	je	.L52
	jmp	.L47
.L51:
	mov	DWORD PTR -88[rbp], 12
	jmp	.L47
.L52:
	mov	DWORD PTR -88[rbp], 13
	jmp	.L47
.L50:
	mov	DWORD PTR -88[rbp], 14
	jmp	.L47
.L49:
	mov	DWORD PTR -88[rbp], 15
	jmp	.L47
.L48:
	mov	DWORD PTR -88[rbp], 4097
	jmp	.L47
.L46:
	mov	DWORD PTR -88[rbp], 4098
	nop
.L47:
	mov	edx, DWORD PTR -88[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetispeed@PLT
	mov	edx, DWORD PTR -88[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetospeed@PLT
	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 -72[rbp]
	and	eax, 2147483647
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 2176
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	and	ah, -29
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -28
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	and	eax, -2
	mov	DWORD PTR -76[rbp], eax
	mov	BYTE PTR -57[rbp], 0
	mov	BYTE PTR -58[rbp], 20
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	test	eax, eax
	jns	.L53
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L54
.L53:
	mov	eax, DWORD PTR -84[rbp]
.L54:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L55
	call	__stack_chk_fail@PLT
.L55:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	serialport_init, .-serialport_init
	.section	.rodata
.LC5:
	.string	"help"
.LC6:
	.string	"port"
.LC7:
	.string	"baud"
.LC8:
	.string	"send"
.LC9:
	.string	"receive"
.LC10:
	.string	"num"
.LC11:
	.string	"delay"
	.section	.data.rel.local,"aw"
	.align 32
	.type	loptions.0, @object
	.size	loptions.0, 224
loptions.0:
	.quad	.LC5
	.long	0
	.zero	4
	.quad	0
	.long	104
	.zero	4
	.quad	.LC6
	.long	1
	.zero	4
	.quad	0
	.long	112
	.zero	4
	.quad	.LC7
	.long	1
	.zero	4
	.quad	0
	.long	98
	.zero	4
	.quad	.LC8
	.long	1
	.zero	4
	.quad	0
	.long	115
	.zero	4
	.quad	.LC9
	.long	0
	.zero	4
	.quad	0
	.long	114
	.zero	4
	.quad	.LC10
	.long	1
	.zero	4
	.quad	0
	.long	110
	.zero	4
	.quad	.LC11
	.long	1
	.zero	4
	.quad	0
	.long	100
	.zero	4
	.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	"167329395.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"hp:b:s:rn:d:\000"
	.align	2
.LC1:
	.ascii	"read: %s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 552
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #560
	str	r0, [fp, #-552]
	str	r1, [fp, #-556]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-540]
	mov	r3, #13
	str	r3, [fp, #-536]
	ldr	r3, [fp, #-552]
	cmp	r3, #1
	bne	.L2
	bl	usage
	mov	r0, #0
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [fp, #-544]
.L19:
	sub	r3, fp, #544
	str	r3, [sp]
	ldr	r3, .L28+4
	ldr	r2, .L28+8
	ldr	r1, [fp, #-556]
	ldr	r0, [fp, #-552]
	bl	getopt_long
	str	r0, [fp, #-532]
	ldr	r3, [fp, #-532]
	cmn	r3, #1
	beq	.L23
	ldr	r3, [fp, #-532]
	cmp	r3, #48
	beq	.L24
	ldr	r3, [fp, #-532]
	cmp	r3, #48
	blt	.L19
	ldr	r3, [fp, #-532]
	cmp	r3, #115
	bgt	.L19
	ldr	r3, [fp, #-532]
	cmp	r3, #98
	blt	.L19
	ldr	r3, [fp, #-532]
	sub	r3, r3, #98
	cmp	r3, #17
	ldrls	pc, [pc, r3, asl #2]
	b	.L19
.L8:
	.word	.L14
	.word	.L19
	.word	.L13
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L12
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L11
	.word	.L19
	.word	.L10
	.word	.L19
	.word	.L9
	.word	.L7
.L13:
	ldr	r3, .L28+12
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-524]
	ldr	r2, [fp, #-524]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	usleep
	b	.L6
.L12:
	bl	usage
	b	.L6
.L14:
	ldr	r3, .L28+12
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-536]
	b	.L6
.L10:
	ldr	r3, .L28+12
	ldr	r2, [r3]
	sub	r3, fp, #520
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, .L28+12
	ldr	r3, [r3]
	ldr	r1, [fp, #-536]
	mov	r0, r3
	bl	serialport_init
	str	r0, [fp, #-540]
	ldr	r3, [fp, #-540]
	cmn	r3, #1
	bne	.L25
	mvn	r3, #0
	b	.L20
.L11:
	ldr	r3, .L28+12
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-524]
	ldr	r3, [fp, #-524]
	and	r3, r3, #255
	mov	r1, r3
	ldr	r0, [fp, #-540]
	bl	serialport_writebyte
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmn	r3, #1
	bne	.L26
	mvn	r3, #0
	b	.L20
.L7:
	ldr	r3, .L28+12
	ldr	r2, [r3]
	sub	r3, fp, #264
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-540]
	bl	serialport_write
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmn	r3, #1
	bne	.L27
	mvn	r3, #0
	b	.L20
.L9:
	sub	r3, fp, #264
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-540]
	bl	serialport_read_until
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L28+16
	bl	printf
	b	.L6
.L24:
	nop
	b	.L19
.L25:
	nop
	b	.L19
.L26:
	nop
	b	.L19
.L27:
	nop
.L6:
	b	.L19
.L23:
	nop
	mov	r0, #0
	bl	exit
.L20:
	ldr	r2, .L28
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC2
	.word	loptions.6078
	.word	.LC0
	.word	optarg
	.word	.LC1
	.size	main, .-main
	.align	2
	.global	serialport_writebyte
	.syntax unified
	.arm
	.fpu softvfp
	.type	serialport_writebyte, %function
serialport_writebyte:
	@ 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]
	sub	r3, fp, #17
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	beq	.L31
	mvn	r3, #0
	b	.L32
.L31:
	mov	r3, #0
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	serialport_writebyte, .-serialport_writebyte
	.align	2
	.global	serialport_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	serialport_write, %function
serialport_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	write
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L34
	mvn	r3, #0
	b	.L35
.L34:
	mov	r3, #0
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	serialport_write, .-serialport_write
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	serialport_read_until
	.syntax unified
	.arm
	.fpu softvfp
	.type	serialport_read_until, %function
serialport_read_until:
	@ 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]
	mov	r3, r2
	strb	r3, [fp, #-29]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
.L41:
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	read
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L37
	mvn	r3, #0
	ldr	r2, .L44
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L42
	b	.L43
.L37:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L39
	ldr	r0, .L44+4
	bl	usleep
	b	.L40
.L39:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r2, [fp, #-12]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L40:
	b	.L41
.L43:
	bl	__stack_chk_fail
.L42:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC3
	.word	10000
	.size	serialport_read_until, .-serialport_read_until
	.section	.rodata
	.align	2
.LC4:
	.ascii	"init_serialport: Unable to open port \000"
	.align	2
.LC5:
	.ascii	"init_serialport: Couldn't get term attributes\000"
	.align	2
.LC6:
	.ascii	"init_serialport: Couldn't set term attributes\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	serialport_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	serialport_init, %function
serialport_init:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L60
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L60+4
	ldr	r0, [fp, #-80]
	bl	open
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmn	r3, #1
	bne	.L47
	ldr	r0, .L60+8
	bl	perror
	mvn	r3, #0
	b	.L58
.L47:
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L49
	ldr	r0, .L60+12
	bl	perror
	mvn	r3, #0
	b	.L58
.L49:
	ldr	r3, [fp, #-84]
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-84]
	ldr	r2, .L60+16
	cmp	r3, r2
	beq	.L50
	ldr	r3, [fp, #-84]
	ldr	r2, .L60+16
	cmp	r3, r2
	bgt	.L51
	ldr	r3, [fp, #-84]
	cmp	r3, #57600
	beq	.L52
	ldr	r3, [fp, #-84]
	cmp	r3, #57600
	bgt	.L51
	ldr	r3, [fp, #-84]
	cmp	r3, #38400
	beq	.L53
	ldr	r3, [fp, #-84]
	cmp	r3, #38400
	bgt	.L51
	ldr	r3, [fp, #-84]
	cmp	r3, #19200
	beq	.L54
	ldr	r3, [fp, #-84]
	cmp	r3, #19200
	bgt	.L51
	ldr	r3, [fp, #-84]
	cmp	r3, #4800
	beq	.L55
	ldr	r3, [fp, #-84]
	cmp	r3, #9600
	beq	.L56
	b	.L51
.L55:
	mov	r3, #12
	str	r3, [fp, #-76]
	b	.L51
.L56:
	mov	r3, #13
	str	r3, [fp, #-76]
	b	.L51
.L54:
	mov	r3, #14
	str	r3, [fp, #-76]
	b	.L51
.L53:
	mov	r3, #15
	str	r3, [fp, #-76]
	b	.L51
.L52:
	ldr	r3, .L60+20
	str	r3, [fp, #-76]
	b	.L51
.L50:
	ldr	r3, .L60+24
	str	r3, [fp, #-76]
	nop
.L51:
	sub	r3, fp, #68
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	cfsetispeed
	sub	r3, fp, #68
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	cfsetospeed
	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, #-60]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	orr	r3, r3, #2176
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #7168
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-56]
	bic	r3, r3, #27
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-64]
	bic	r3, r3, #1
	str	r3, [fp, #-64]
	mov	r3, #0
	strb	r3, [fp, #-45]
	mov	r3, #20
	strb	r3, [fp, #-46]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L57
	ldr	r0, .L60+28
	bl	perror
	mvn	r3, #0
	b	.L58
.L57:
	ldr	r3, [fp, #-72]
.L58:
	ldr	r2, .L60
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L59
	bl	__stack_chk_fail
.L59:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L61:
	.align	2
.L60:
	.word	.LC7
	.word	2306
	.word	.LC4
	.word	.LC5
	.word	115200
	.word	4097
	.word	4098
	.word	.LC6
	.size	serialport_init, .-serialport_init
	.section	.rodata
	.align	2
.LC8:
	.ascii	"help\000"
	.align	2
.LC9:
	.ascii	"port\000"
	.align	2
.LC10:
	.ascii	"baud\000"
	.align	2
.LC11:
	.ascii	"send\000"
	.align	2
.LC12:
	.ascii	"receive\000"
	.align	2
.LC13:
	.ascii	"num\000"
	.align	2
.LC14:
	.ascii	"delay\000"
	.data
	.align	2
	.type	loptions.6078, %object
	.size	loptions.6078, 112
loptions.6078:
	.word	.LC8
	.word	0
	.word	0
	.word	104
	.word	.LC9
	.word	1
	.word	0
	.word	112
	.word	.LC10
	.word	1
	.word	0
	.word	98
	.word	.LC11
	.word	1
	.word	0
	.word	115
	.word	.LC12
	.word	0
	.word	0
	.word	114
	.word	.LC13
	.word	1
	.word	0
	.word	110
	.word	.LC14
	.word	1
	.word	0
	.word	100
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
