	.file	"extr_636.c_shell.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Connection closed.\n"
.LC1:
	.string	"read remote"
.LC2:
	.string	"read user"
	.text
	.p2align 4
	.globl	shell
	.type	shell, @function
shell:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	lea	r12d, 1[rdi]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 1072
	.cfi_def_cfa_offset 1120
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1064[rsp], rax
	xor	eax, eax
	lea	rbx, 28[rsp]
	lea	r13, 32[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	xor	edi, edi
	mov	rsi, rbx
	call	FD_ISSET@PLT
	test	rax, rax
	jne	.L17
.L6:
	mov	rsi, rbx
	mov	edi, ebp
	call	FD_SET@PLT
	xor	edi, edi
	mov	rsi, rbx
	call	FD_SET@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	mov	rsi, rbx
	mov	edi, r12d
	call	select@PLT
	test	rax, rax
	js	.L2
	mov	rsi, rbx
	mov	edi, ebp
	call	FD_ISSET@PLT
	test	rax, rax
	je	.L3
	mov	edx, 1024
	mov	rsi, r13
	mov	edi, ebp
	call	read@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L18
	js	.L19
.L5:
	mov	rsi, r13
	mov	edi, 1
	mov	edx, r14d
	call	write@PLT
	xor	edi, edi
	mov	rsi, rbx
	call	FD_ISSET@PLT
	test	rax, rax
	je	.L6
.L17:
	mov	edx, 1024
	mov	rsi, r13
	xor	edi, edi
	call	read@PLT
	mov	edx, eax
	test	eax, eax
	jle	.L20
.L7:
	mov	rsi, r13
	mov	edi, ebp
	call	write@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	edi, DWORD PTR EXIT_FAILURE[rip]
	call	exit@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, ebp
	call	close@PLT
	mov	rax, QWORD PTR 1064[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 1072
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, DWORD PTR EXIT_FAILURE[rip]
	call	exit@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, .LC2[rip]
	mov	DWORD PTR 12[rsp], eax
	call	perror@PLT
	mov	edi, DWORD PTR EXIT_FAILURE[rip]
	call	exit@PLT
	mov	edx, DWORD PTR 12[rsp]
	jmp	.L7
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	shell, .-shell
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_636.c_shell.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Connection closed.\012\000"
	.align	2
.LC1:
	.ascii	"read remote\000"
	.align	2
.LC2:
	.ascii	"read user\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	shell
	.syntax unified
	.arm
	.fpu softvfp
	.type	shell, %function
shell:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L22
	sub	sp, sp, #1040
	sub	sp, sp, #4
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #1036]
	mov	r3,#0
	mov	r6, #0
	ldr	r9, .L22+4
	ldr	r7, .L22+8
	ldr	r8, .L22+12
	add	r5, r0, #1
	b	.L6
.L3:
	mov	r0, #0
	add	r1, sp, #8
	bl	FD_ISSET
	cmp	r0, #0
	bne	.L17
.L6:
	add	r1, sp, #8
	mov	r0, r4
	bl	FD_SET
	add	r1, sp, #8
	mov	r0, #0
	bl	FD_SET
	mov	r3, #0
	mov	r0, r5
	mov	r2, r3
	str	r6, [sp]
	add	r1, sp, #8
	bl	select
	cmp	r0, #0
	blt	.L2
	mov	r0, r4
	add	r1, sp, #8
	bl	FD_ISSET
	cmp	r0, #0
	beq	.L3
	add	r10, sp, #12
	mov	r1, r10
	mov	r2, #1024
	mov	r0, r4
	bl	read
	subs	fp, r0, #0
	beq	.L18
	blt	.L19
.L5:
	mov	r2, fp
	mov	r1, r10
	mov	r0, #1
	bl	write
	b	.L3
.L18:
	mov	r0, r8
	bl	printf
	ldr	r0, [r7]
	bl	exit
	b	.L5
.L2:
	mov	r0, r4
	bl	close
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #1036]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #1040
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	mov	r0, r9
	bl	perror
	ldr	r0, [r7]
	bl	exit
	b	.L5
.L17:
	add	r10, sp, #12
	mov	r1, r10
	mov	r2, #1024
	mov	r0, #0
	bl	read
	subs	fp, r0, #0
	ble	.L21
.L7:
	mov	r2, fp
	mov	r1, r10
	mov	r0, r4
	bl	write
	b	.L6
.L21:
	ldr	r0, .L22+16
	bl	perror
	ldr	r0, [r7]
	bl	exit
	b	.L7
.L20:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	.LC1
	.word	EXIT_FAILURE
	.word	.LC0
	.word	.LC2
	.size	shell, .-shell
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
