	.file	"153269406.c"
	.intel_syntax noprefix
	.text
	.local	eof
	.comm	eof,4,4
	.globl	sig_chld
	.type	sig_chld, @function
sig_chld:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR eof[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sig_chld, .-sig_chld
	.section	.rodata
.LC0:
	.string	"argc=%d\n"
.LC1:
	.string	"argv[%d]=\"%s\"\n"
.LC2:
	.string	"ptsname()"
.LC3:
	.string	"slave device is: %s\n"
.LC4:
	.string	"fork()"
.LC5:
	.string	"ioctl(TIOCSCTTY)"
.LC6:
	.string	"execvp()"
.LC7:
	.string	"Child pid %d\n"
.LC8:
	.string	"select()"
.LC9:
	.string	"read(STDIN_FILENO)"
.LC10:
	.string	"write(masterfd)"
.LC11:
	.string	"read(masterfd)"
.LC12:
	.string	"write(STDOUT_FILENO)"
.LC13:
	.string	"waitpid()"
.LC14:
	.string	"Child status %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 384
	mov	DWORD PTR -4468[rbp], edi
	mov	QWORD PTR -4480[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -4468[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4452[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -4452[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -4480[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4452[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4452[rbp], 1
.L4:
	mov	eax, DWORD PTR -4452[rbp]
	cmp	eax, DWORD PTR -4468[rbp]
	jl	.L5
	mov	edi, 258
	call	posix_openpt@PLT
	mov	DWORD PTR -4448[rbp], eax
	cmp	DWORD PTR -4448[rbp], -1
	je	.L6
	mov	eax, DWORD PTR -4448[rbp]
	mov	edi, eax
	call	grantpt@PLT
	cmp	eax, -1
	je	.L6
	mov	eax, DWORD PTR -4448[rbp]
	mov	edi, eax
	call	unlockpt@PLT
	cmp	eax, -1
	jne	.L7
.L6:
	mov	eax, -1
	jmp	.L38
.L7:
	mov	eax, DWORD PTR -4448[rbp]
	mov	edi, eax
	call	ptsname@PLT
	mov	QWORD PTR -4416[rbp], rax
	cmp	QWORD PTR -4416[rbp], 0
	jne	.L9
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L9:
	mov	rax, QWORD PTR -4416[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	call	fork@PLT
	mov	DWORD PTR -4444[rbp], eax
	cmp	DWORD PTR -4444[rbp], -1
	je	.L10
	cmp	DWORD PTR -4444[rbp], 0
	je	.L11
	jmp	.L40
.L10:
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L11:
	mov	eax, DWORD PTR -4448[rbp]
	mov	edi, eax
	call	close@PLT
	call	setsid@PLT
	mov	rax, QWORD PTR -4416[rbp]
	mov	esi, 258
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4440[rbp], eax
	cmp	DWORD PTR -4440[rbp], 0
	jns	.L14
	mov	eax, -1
	jmp	.L38
.L14:
	mov	eax, DWORD PTR -4440[rbp]
	mov	edx, 0
	mov	esi, 21518
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L15
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L15:
	mov	eax, DWORD PTR -4440[rbp]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -4440[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -4440[rbp]
	mov	esi, 2
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -4440[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -4480[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -4480[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	cmp	eax, -1
	jne	.L41
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L40:
	mov	eax, DWORD PTR -4444[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4448[rbp]
	add	eax, 1
	mov	DWORD PTR -4436[rbp], eax
	lea	rax, sig_chld[rip]
	mov	QWORD PTR -4272[rbp], rax
	lea	rax, -4272[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 17
	call	sigaction@PLT
	mov	edx, 0
	mov	esi, 3
	mov	edi, 0
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -4432[rbp], eax
	mov	eax, DWORD PTR -4432[rbp]
	or	ah, 8
	mov	edx, eax
	mov	esi, 4
	mov	edi, 0
	mov	eax, 0
	call	fcntl@PLT
	mov	eax, DWORD PTR -4448[rbp]
	mov	edx, 0
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -4432[rbp], eax
	mov	eax, DWORD PTR -4432[rbp]
	or	ah, 8
	mov	edx, eax
	mov	eax, DWORD PTR -4448[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	jmp	.L18
.L35:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -4400[rbp]
	mov	rdi, rdx
#APP
# 110 "the_stack_data/153269406.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -4428[rbp], edx
	mov	DWORD PTR -4424[rbp], eax
	mov	rax, QWORD PTR -4400[rbp]
	or	rax, 1
	mov	QWORD PTR -4400[rbp], rax
	mov	eax, DWORD PTR -4448[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -4400[rbp+rax*8]
	mov	eax, DWORD PTR -4448[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 -4400[rbp+rax*8], rdx
	lea	rsi, -4400[rbp]
	mov	eax, DWORD PTR -4436[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	edi, eax
	call	select@PLT
	mov	DWORD PTR -4420[rbp], eax
	cmp	DWORD PTR -4420[rbp], -1
	je	.L19
	cmp	DWORD PTR -4420[rbp], 0
	je	.L18
	jmp	.L21
.L19:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L22
	mov	DWORD PTR eof[rip], 1
	jmp	.L21
.L22:
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L21:
	mov	rax, QWORD PTR -4400[rbp]
	and	eax, 1
	test	rax, rax
	je	.L23
.L28:
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	QWORD PTR -4408[rbp], rax
	cmp	QWORD PTR -4408[rbp], -1
	jne	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L42
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L24:
	cmp	QWORD PTR -4408[rbp], 0
	jne	.L26
	mov	DWORD PTR eof[rip], 1
.L26:
	mov	rdx, QWORD PTR -4408[rbp]
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4448[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L27
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L27:
	cmp	QWORD PTR -4408[rbp], 0
	jg	.L28
	jmp	.L23
.L42:
	nop
.L23:
	mov	eax, DWORD PTR -4448[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -4400[rbp+rax*8]
	mov	eax, DWORD PTR -4448[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
.L34:
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4448[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -4408[rbp], rax
	cmp	QWORD PTR -4408[rbp], -1
	jne	.L29
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	jne	.L30
	jmp	.L18
.L30:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 5
	jne	.L31
	mov	DWORD PTR eof[rip], 1
	jmp	.L18
.L31:
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L29:
	cmp	QWORD PTR -4408[rbp], 0
	jne	.L32
	mov	DWORD PTR eof[rip], 1
.L32:
	mov	rdx, QWORD PTR -4408[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	cmp	rax, -1
	jne	.L33
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L33:
	cmp	QWORD PTR -4408[rbp], 0
	jg	.L34
.L18:
	mov	eax, DWORD PTR eof[rip]
	test	eax, eax
	je	.L35
	jmp	.L36
.L41:
	nop
.L36:
	lea	rcx, -4456[rbp]
	mov	eax, DWORD PTR -4444[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	cmp	eax, -1
	jne	.L37
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L38
.L37:
	mov	eax, DWORD PTR -4456[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4448[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L38:
	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
.LFE7:
	.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	"153269406.c"
	.text
	.local	eof
	.comm	eof,4,4
	.align	2
	.global	sig_chld
	.syntax unified
	.arm
	.fpu softvfp
	.type	sig_chld, %function
sig_chld:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L3
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L4:
	.align	2
.L3:
	.word	eof
	.size	sig_chld, .-sig_chld
	.section	.rodata
	.align	2
.LC0:
	.ascii	"argc=%d\012\000"
	.align	2
.LC1:
	.ascii	"argv[%d]=\"%s\"\012\000"
	.align	2
.LC2:
	.ascii	"ptsname()\000"
	.align	2
.LC3:
	.ascii	"slave device is: %s\012\000"
	.align	2
.LC4:
	.ascii	"fork()\000"
	.align	2
.LC5:
	.ascii	"ioctl(TIOCSCTTY)\000"
	.align	2
.LC6:
	.ascii	"execvp()\000"
	.align	2
.LC7:
	.ascii	"Child pid %d\012\000"
	.align	2
.LC8:
	.ascii	"select()\000"
	.align	2
.LC9:
	.ascii	"read(STDIN_FILENO)\000"
	.align	2
.LC10:
	.ascii	"write(masterfd)\000"
	.align	2
.LC11:
	.ascii	"read(masterfd)\000"
	.align	2
.LC12:
	.ascii	"write(STDOUT_FILENO)\000"
	.align	2
.LC13:
	.ascii	"waitpid()\000"
	.align	2
.LC14:
	.ascii	"Child status %d\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4424
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4416
	sub	sp, sp, #20
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-324]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-328]
	ldr	r3, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-324]
	ldr	r0, .L47+4
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-316]
	b	.L6
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-328]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	mov	r2, r3
	ldr	r1, [r1, #-316]
	ldr	r0, .L47+8
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	add	r3, r3, #1
	str	r3, [r2, #-316]
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-316]
	ldr	r3, [r3, #-324]
	cmp	r2, r3
	blt	.L7
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L47+12
	bl	posix_openpt
	str	r0, [r4, #-308]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	cmn	r3, #1
	beq	.L8
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-308]
	bl	grantpt
	mov	r3, r0
	cmn	r3, #1
	beq	.L8
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-308]
	bl	unlockpt
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
.L8:
	mvn	r3, #0
	b	.L42
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-308]
	bl	ptsname
	str	r0, [r4, #-304]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-304]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L47+16
	bl	perror
	mvn	r3, #0
	b	.L42
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-304]
	ldr	r0, .L47+20
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-300]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	cmn	r3, #1
	beq	.L12
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	cmp	r3, #0
	beq	.L13
	b	.L44
.L12:
	ldr	r0, .L47+24
	bl	perror
	mvn	r3, #0
	b	.L42
.L13:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-308]
	bl	close
	bl	setsid
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, .L47+12
	ldr	r0, [r3, #-304]
	bl	open
	str	r0, [r4, #-296]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-296]
	cmp	r3, #0
	bge	.L16
	mvn	r3, #0
	b	.L42
.L16:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	ldr	r1, .L47+28
	ldr	r0, [r3, #-296]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L17
	ldr	r0, .L47+32
	bl	perror
	mvn	r3, #0
	b	.L42
.L17:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, #0
	ldr	r0, [r3, #-296]
	bl	dup2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, #1
	ldr	r0, [r3, #-296]
	bl	dup2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, #2
	ldr	r0, [r3, #-296]
	bl	dup2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-296]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-328]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-328]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	execvp
	mov	r3, r0
	cmn	r3, #1
	bne	.L45
	ldr	r0, .L47+36
	bl	perror
	mvn	r3, #0
	b	.L42
.L44:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-300]
	ldr	r0, .L47+40
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	add	r3, r3, #1
	str	r3, [r2, #-292]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L47+44
	str	r3, [r2, #-144]
	sub	r3, fp, #4224
	sub	r3, r3, #12
	sub	r3, r3, #16
	mov	r2, #0
	mov	r1, r3
	mov	r0, #17
	bl	sigaction
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r2, #0
	mov	r1, #3
	mov	r0, #0
	bl	fcntl
	str	r0, [r4, #-288]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-288]
	orr	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	mov	r0, #0
	bl	fcntl
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	mov	r1, #3
	ldr	r0, [r3, #-308]
	bl	fcntl
	str	r0, [r4, #-288]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-288]
	orr	r3, r3, #2048
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	mov	r1, #4
	ldr	r0, [r0, #-308]
	bl	fcntl
	b	.L20
.L39:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4352
	sub	r3, r3, #12
	sub	r3, r3, #16
	str	r3, [r2, #-284]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-312]
	b	.L21
.L22:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-284]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-312]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-312]
	add	r3, r3, #1
	str	r3, [r2, #-312]
.L21:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-312]
	cmp	r3, #31
	bls	.L22
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-272]
	orr	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	str	r3, [r2, #-272]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	lsl	r3, r2, #2
	add	r3, r1, r3
	ldr	r1, [r3, #-272]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	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
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	lsl	r3, r2, #2
	add	r3, r0, r3
	str	r1, [r3, #-272]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r1, fp, #4352
	sub	r1, r1, #12
	sub	r1, r1, #16
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	ldr	r0, [r0, #-292]
	bl	select
	str	r0, [r4, #-280]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-280]
	cmn	r3, #1
	beq	.L23
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-280]
	cmp	r3, #0
	beq	.L20
	b	.L25
.L23:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L26
	ldr	r3, .L47+48
	mov	r2, #1
	str	r2, [r3]
	b	.L25
.L26:
	ldr	r0, .L47+52
	bl	perror
	mvn	r3, #0
	b	.L42
.L25:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-272]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L27
.L32:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [r4, #-276]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmn	r3, #1
	bne	.L28
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L46
	ldr	r0, .L47+56
	bl	perror
	mvn	r3, #0
	b	.L42
.L28:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmp	r3, #0
	bne	.L30
	ldr	r3, .L47+48
	mov	r2, #1
	str	r2, [r3]
.L30:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-276]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-308]
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L31
	ldr	r0, .L47+60
	bl	perror
	mvn	r3, #0
	b	.L42
.L31:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmp	r3, #0
	bgt	.L32
	b	.L27
.L46:
	nop
.L27:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #-272]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	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	.L20
.L38:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-308]
	bl	read
	str	r0, [r4, #-276]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmn	r3, #1
	bne	.L33
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L34
	b	.L20
.L34:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L35
	ldr	r3, .L47+48
	mov	r2, #1
	str	r2, [r3]
	b	.L20
.L35:
	ldr	r0, .L47+64
	bl	perror
	mvn	r3, #0
	b	.L42
.L33:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmp	r3, #0
	bne	.L36
	ldr	r3, .L47+48
	mov	r2, #1
	str	r2, [r3]
.L36:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-276]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L37
	ldr	r0, .L47+68
	bl	perror
	mvn	r3, #0
	b	.L42
.L37:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-276]
	cmp	r3, #0
	bgt	.L38
.L20:
	ldr	r3, .L47+48
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	b	.L40
.L45:
	nop
.L40:
	sub	r3, fp, #4416
	sub	r3, r3, #12
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [r0, #-300]
	bl	waitpid
	mov	r3, r0
	cmn	r3, #1
	bne	.L41
	ldr	r0, .L47+72
	bl	perror
	mvn	r3, #0
	b	.L42
.L41:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-320]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r1, r3
	ldr	r0, .L47+76
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-308]
	bl	close
	mov	r3, #0
.L42:
	ldr	r2, .L47
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC15
	.word	.LC0
	.word	.LC1
	.word	258
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	21518
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	sig_chld
	.word	eof
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
