	.file	"110346.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"read()"
.LC1:
	.string	"write()"
.LC2:
	.string	"bye-bye"
	.text
	.type	fsm_drive, @function
fsm_drive:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1044[rax]
	cmp	eax, 3
	je	.L2
	cmp	eax, 3
	jg	.L3
	cmp	eax, 2
	je	.L4
	cmp	eax, 2
	jg	.L3
	test	eax, eax
	je	.L5
	cmp	eax, 1
	je	.L6
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1040[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1040[rax]
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1044[rax], 3
	jmp	.L15
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1040[rax]
	test	eax, eax
	jns	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L15
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC0[rip]
	mov	QWORD PTR 1032[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1044[rax], 2
	jmp	.L15
.L9:
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1048[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1044[rax], 1
	jmp	.L15
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1040[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1048[rax]
	cdqe
	add	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L16
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, .LC1[rip]
	mov	QWORD PTR 1032[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1044[rax], 2
	jmp	.L16
.L11:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1040[rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L13
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 1048[rax]
	mov	eax, DWORD PTR -4[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1048[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 1040[rax]
	sub	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1040[rax], edx
	jmp	.L16
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1044[rax], 0
	jmp	.L16
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 1032[rax]
	mov	rdi, rax
	call	perror@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 1044[rax], 0
	jmp	.L10
.L2:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L3:
	call	abort@PLT
.L15:
	nop
	jmp	.L10
.L16:
	nop
.L10:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fsm_drive, .-fsm_drive
	.section	.rodata
.LC3:
	.string	"select()"
.LC4:
	.string	"fd1 ready to read"
.LC5:
	.string	"fd2 ready to write"
.LC6:
	.string	"fd2 ready to read"
.LC7:
	.string	"fd1 ready to write"
	.text
	.type	fsm_create, @function
fsm_create:
.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, 2432
	mov	DWORD PTR -2420[rbp], edi
	mov	DWORD PTR -2424[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -2420[rbp]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -2408[rbp], eax
	mov	eax, DWORD PTR -2408[rbp]
	or	ah, 8
	mov	edx, eax
	mov	eax, DWORD PTR -2420[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	eax, DWORD PTR -2424[rbp]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -2404[rbp], eax
	mov	eax, DWORD PTR -2404[rbp]
	or	ah, 8
	mov	edx, eax
	mov	eax, DWORD PTR -2424[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	eax, DWORD PTR -2420[rbp]
	mov	DWORD PTR -2128[rbp], eax
	mov	eax, DWORD PTR -2424[rbp]
	mov	DWORD PTR -2124[rbp], eax
	mov	DWORD PTR -1084[rbp], 0
	lea	rax, -2128[rbp]
	add	rax, 8
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1080[rbp], 0
	mov	DWORD PTR -1088[rbp], 0
	mov	QWORD PTR -1096[rbp], 0
	mov	eax, DWORD PTR -2424[rbp]
	mov	DWORD PTR -1072[rbp], eax
	mov	eax, DWORD PTR -2420[rbp]
	mov	DWORD PTR -1068[rbp], eax
	mov	DWORD PTR -28[rbp], 0
	lea	rax, -1072[rbp]
	add	rax, 8
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	jmp	.L18
.L31:
	mov	eax, DWORD PTR -1084[rbp]
	cmp	eax, 2
	jne	.L19
	lea	rax, -2128[rbp]
	mov	rdi, rax
	call	fsm_drive
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 2
	jne	.L20
	lea	rax, -1072[rbp]
	mov	rdi, rax
	call	fsm_drive
	jmp	.L18
.L20:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2384[rbp]
	mov	rdi, rdx
#APP
# 123 "the_stack_data/110346.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2400[rbp], edx
	mov	DWORD PTR -2396[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2256[rbp]
	mov	rdi, rdx
#APP
# 124 "the_stack_data/110346.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2392[rbp], edx
	mov	DWORD PTR -2388[rbp], eax
	mov	eax, DWORD PTR -1084[rbp]
	test	eax, eax
	jne	.L21
	mov	eax, DWORD PTR -2420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2384[rbp+rax*8]
	mov	eax, DWORD PTR -2420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -2384[rbp+rax*8], rdx
	jmp	.L22
.L21:
	mov	eax, DWORD PTR -1084[rbp]
	cmp	eax, 1
	jne	.L22
	mov	eax, DWORD PTR -2424[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2256[rbp+rax*8]
	mov	eax, DWORD PTR -2424[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -2256[rbp+rax*8], rdx
.L22:
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	jne	.L23
	mov	eax, DWORD PTR -2424[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2384[rbp+rax*8]
	mov	eax, DWORD PTR -2424[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -2384[rbp+rax*8], rdx
	jmp	.L25
.L23:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 1
	jne	.L25
	mov	eax, DWORD PTR -2420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2256[rbp+rax*8]
	mov	eax, DWORD PTR -2420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -2256[rbp+rax*8], rdx
	jmp	.L25
.L27:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L26
	jmp	.L25
.L26:
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	mov	eax, DWORD PTR -2420[rbp]
	cmp	DWORD PTR -2424[rbp], eax
	cmovge	eax, DWORD PTR -2424[rbp]
	lea	edi, 1[rax]
	lea	rdx, -2256[rbp]
	lea	rax, -2384[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	rsi, rax
	call	select@PLT
	cmp	eax, -1
	je	.L27
	mov	eax, DWORD PTR -2420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2384[rbp+rax*8]
	mov	eax, DWORD PTR -2420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	jne	.L28
	mov	eax, DWORD PTR -2424[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2256[rbp+rax*8]
	mov	eax, DWORD PTR -2424[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L29
.L28:
	mov	eax, DWORD PTR -1084[rbp]
	cmp	eax, 3
	je	.L29
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -2128[rbp]
	mov	rdi, rax
	call	fsm_drive
.L29:
	mov	eax, DWORD PTR -2424[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2384[rbp+rax*8]
	mov	eax, DWORD PTR -2424[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	jne	.L30
	mov	eax, DWORD PTR -2420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2256[rbp+rax*8]
	mov	eax, DWORD PTR -2420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L18
.L30:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 3
	je	.L18
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, -1072[rbp]
	mov	rdi, rax
	call	fsm_drive
.L18:
	mov	eax, DWORD PTR -1084[rbp]
	cmp	eax, 3
	jne	.L31
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 3
	jne	.L31
	mov	edx, DWORD PTR -2408[rbp]
	mov	eax, DWORD PTR -2420[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	edx, DWORD PTR -2404[rbp]
	mov	eax, DWORD PTR -2424[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	nop
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fsm_create, .-fsm_create
	.section	.rodata
.LC8:
	.string	"/dev/tty9"
.LC9:
	.string	"open()"
.LC10:
	.string	"[tty1]"
.LC11:
	.string	"/dev/tty10"
.LC12:
	.string	"[tty2]"
	.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, 16
	mov	esi, 2050
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jns	.L34
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L34:
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, 6
	lea	rsi, .LC10[rip]
	mov	edi, eax
	call	write@PLT
	mov	esi, 2
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L35
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L35:
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 6
	lea	rsi, .LC12[rip]
	mov	edi, eax
	call	write@PLT
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	fsm_create
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.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	"110346.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"read()\000"
	.align	2
.LC1:
	.ascii	"write()\000"
	.align	2
.LC2:
	.ascii	"bye-bye\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fsm_drive, %function
fsm_drive:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #1040]
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L7:
	ldr	r3, [fp, #-16]
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	mov	r2, #1024
	mov	r1, r3
	bl	read
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #1036]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #1036]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-16]
	mov	r2, #3
	str	r2, [r3, #1040]
	b	.L16
.L8:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #1036]
	cmp	r3, #0
	bge	.L10
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L16
	ldr	r3, [fp, #-16]
	ldr	r2, .L18
	str	r2, [r3, #1032]
	ldr	r3, [fp, #-16]
	mov	r2, #2
	str	r2, [r3, #1040]
	b	.L16
.L10:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #1044]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3, #1040]
	b	.L16
.L6:
	ldr	r3, [fp, #-16]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #1044]
	add	r1, r3, r2
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #1036]
	mov	r2, r3
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L12
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L17
	ldr	r3, [fp, #-16]
	ldr	r2, .L18+4
	str	r2, [r3, #1032]
	ldr	r3, [fp, #-16]
	mov	r2, #2
	str	r2, [r3, #1040]
	b	.L17
.L12:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #1036]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L14
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #1044]
	ldr	r3, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #1044]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #1036]
	ldr	r3, [fp, #-8]
	sub	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #1036]
	b	.L17
.L14:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #1040]
	b	.L17
.L5:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #1032]
	mov	r0, r3
	bl	perror
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #1040]
	b	.L11
.L3:
	ldr	r0, .L18+8
	bl	printf
	b	.L11
.L2:
	bl	abort
.L16:
	nop
	b	.L11
.L17:
	nop
.L11:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	fsm_drive, .-fsm_drive
	.section	.rodata
	.align	2
.LC3:
	.ascii	"select()\000"
	.align	2
.LC4:
	.ascii	"fd1 ready to read\000"
	.align	2
.LC5:
	.ascii	"fd2 ready to write\000"
	.align	2
.LC6:
	.ascii	"fd2 ready to read\000"
	.align	2
.LC7:
	.ascii	"fd1 ready to write\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fsm_create, %function
fsm_create:
	@ args = 0, pretend = 0, frame = 2392
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2400
	str	r0, [fp, #-2392]
	str	r1, [fp, #-2396]
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #3
	ldr	r0, [fp, #-2392]
	bl	fcntl
	str	r0, [fp, #-2376]
	ldr	r3, [fp, #-2376]
	orr	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	ldr	r0, [fp, #-2392]
	bl	fcntl
	mov	r1, #3
	ldr	r0, [fp, #-2396]
	bl	fcntl
	str	r0, [fp, #-2372]
	ldr	r3, [fp, #-2372]
	orr	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	ldr	r0, [fp, #-2396]
	bl	fcntl
	ldr	r3, [fp, #-2392]
	str	r3, [fp, #-2104]
	ldr	r3, [fp, #-2396]
	str	r3, [fp, #-2100]
	mov	r3, #0
	str	r3, [fp, #-1064]
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #8
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1060]
	mov	r3, #0
	str	r3, [fp, #-1068]
	mov	r3, #0
	str	r3, [fp, #-1072]
	ldr	r3, [fp, #-2396]
	str	r3, [fp, #-1056]
	ldr	r3, [fp, #-2392]
	str	r3, [fp, #-1052]
	mov	r3, #0
	str	r3, [fp, #-16]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #12
	add	r3, r3, #8
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L21
.L38:
	ldr	r3, [fp, #-1064]
	cmp	r3, #2
	bne	.L22
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fsm_drive
	b	.L21
.L22:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L23
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	fsm_drive
	b	.L21
.L23:
	sub	r3, fp, #2352
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2368]
	mov	r3, #0
	str	r3, [fp, #-2384]
	b	.L24
.L25:
	ldr	r3, [fp, #-2368]
	ldr	r2, [fp, #-2384]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2384]
	add	r3, r3, #1
	str	r3, [fp, #-2384]
.L24:
	ldr	r3, [fp, #-2384]
	cmp	r3, #31
	bls	.L25
	sub	r3, fp, #2224
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2364]
	mov	r3, #0
	str	r3, [fp, #-2380]
	b	.L26
.L27:
	ldr	r3, [fp, #-2364]
	ldr	r2, [fp, #-2380]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2380]
	add	r3, r3, #1
	str	r3, [fp, #-2380]
.L26:
	ldr	r3, [fp, #-2380]
	cmp	r3, #31
	bls	.L27
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	bne	.L28
	ldr	r3, [fp, #-2392]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-2356]
	ldr	r3, [fp, #-2392]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-2356]
	b	.L29
.L28:
	ldr	r3, [fp, #-1064]
	cmp	r3, #1
	bne	.L29
	ldr	r3, [fp, #-2396]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-2228]
	ldr	r3, [fp, #-2396]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-2228]
.L29:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L30
	ldr	r3, [fp, #-2396]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-2356]
	ldr	r3, [fp, #-2396]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-2356]
	b	.L32
.L30:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L32
	ldr	r3, [fp, #-2392]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-2228]
	ldr	r3, [fp, #-2392]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-2228]
	b	.L32
.L34:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L33
	b	.L32
.L33:
	ldr	r0, .L40+4
	bl	perror
	mov	r0, #1
	bl	exit
.L32:
	ldr	r2, [fp, #-2396]
	ldr	r3, [fp, #-2392]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	add	r0, r3, #1
	sub	r2, fp, #2224
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #2352
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	bl	select
	mov	r3, r0
	cmn	r3, #1
	beq	.L34
	ldr	r3, [fp, #-2392]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2356]
	ldr	r3, [fp, #-2392]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-2396]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2228]
	ldr	r3, [fp, #-2396]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L36
.L35:
	ldr	r3, [fp, #-1064]
	cmp	r3, #3
	beq	.L36
	ldr	r0, .L40+8
	bl	puts
	ldr	r0, .L40+12
	bl	puts
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fsm_drive
.L36:
	ldr	r3, [fp, #-2396]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2356]
	ldr	r3, [fp, #-2396]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	bne	.L37
	ldr	r3, [fp, #-2392]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2228]
	ldr	r3, [fp, #-2392]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L21
.L37:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	beq	.L21
	ldr	r0, .L40+16
	bl	puts
	ldr	r0, .L40+20
	bl	puts
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	fsm_drive
.L21:
	ldr	r3, [fp, #-1064]
	cmp	r3, #3
	bne	.L38
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L38
	ldr	r2, [fp, #-2376]
	mov	r1, #4
	ldr	r0, [fp, #-2392]
	bl	fcntl
	ldr	r2, [fp, #-2372]
	mov	r1, #4
	ldr	r0, [fp, #-2396]
	bl	fcntl
	nop
	ldr	r2, .L40
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L39
	bl	__stack_chk_fail
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC8
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	fsm_create, .-fsm_create
	.section	.rodata
	.align	2
.LC9:
	.ascii	"/dev/tty9\000"
	.align	2
.LC10:
	.ascii	"open()\000"
	.align	2
.LC11:
	.ascii	"[tty1]\000"
	.align	2
.LC12:
	.ascii	"/dev/tty10\000"
	.align	2
.LC13:
	.ascii	"[tty2]\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L45
	ldr	r0, .L45+4
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L43
	ldr	r0, .L45+8
	bl	perror
	mov	r0, #1
	bl	exit
.L43:
	mov	r2, #6
	ldr	r1, .L45+12
	ldr	r0, [fp, #-12]
	bl	write
	mov	r1, #2
	ldr	r0, .L45+16
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L44
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r0, .L45+8
	bl	perror
	mov	r0, #1
	bl	exit
.L44:
	mov	r2, #6
	ldr	r1, .L45+20
	ldr	r0, [fp, #-8]
	bl	write
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	fsm_create
	mov	r0, #0
	bl	exit
.L46:
	.align	2
.L45:
	.word	2050
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
