	.file	"extr_rshd.c_rshd_loop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"fd too large"
.LC1:
	.string	"out of memory"
.LC2:
	.string	"select: %s"
.LC3:
	.string	"read: %s"
	.text
	.p2align 4
	.type	rshd_loop, @function
rshd_loop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, r9d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 20[rsp], esi
	mov	DWORD PTR 24[rsp], edx
	mov	DWORD PTR 28[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	cmp	ecx, r9d
	mov	eax, r9d
	cmovge	eax, ecx
	cmp	eax, edi
	cmovl	eax, edi
	cmp	DWORD PTR FD_SETSIZE[rip], eax
	jg	.L2
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	errx@PLT
.L2:
	lea	rbx, 32[rsp]
	mov	rdi, rbx
	mov	QWORD PTR 8[rsp], rbx
	call	FD_ZERO@PLT
	mov	rsi, rbx
	mov	edi, ebp
	call	FD_SET@PLT
	mov	rsi, rbx
	mov	edi, r12d
	call	FD_SET@PLT
	mov	rsi, rbx
	mov	edi, r13d
	call	FD_SET@PLT
	mov	esi, r13d
	mov	edi, r12d
	call	max@PLT
	mov	edi, ebp
	mov	esi, eax
	call	max@PLT
	mov	esi, DWORD PTR RSH_BUFSIZ[rip]
	mov	edi, DWORD PTR RSHD_BUFSIZ[rip]
	lea	r14d, 1[rax]
	call	max@PLT
	mov	edi, eax
	call	malloc@PLT
	mov	r15, rax
	test	rax, rax
	je	.L29
.L3:
	mov	DWORD PTR 16[rsp], 2
	lea	rbx, 36[rsp]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR 32[rsp]
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	mov	rsi, rbx
	mov	edi, r14d
	mov	DWORD PTR 36[rsp], eax
	call	select@PLT
	test	eax, eax
	jns	.L5
	mov	rdi, QWORD PTR errno[rip]
	cmp	rdi, QWORD PTR EINTR[rip]
	je	.L4
	call	strerror@PLT
	lea	rdi, .LC2[rip]
	mov	esi, eax
	xor	eax, eax
	call	syslog_and_die@PLT
.L5:
	mov	rsi, rbx
	mov	edi, ebp
	call	FD_ISSET@PLT
	test	rax, rax
	jne	.L30
.L8:
	mov	rsi, rbx
	mov	edi, r12d
	call	FD_ISSET@PLT
	test	rax, rax
	jne	.L31
.L11:
	mov	rsi, rbx
	mov	edi, r13d
	call	FD_ISSET@PLT
	test	rax, rax
	je	.L4
	mov	edx, DWORD PTR RSH_BUFSIZ[rip]
	mov	rsi, r15
	mov	edi, r13d
	call	read@PLT
	test	eax, eax
	js	.L32
	jne	.L16
	mov	edi, r13d
	call	close@PLT
	mov	edi, DWORD PTR 28[rsp]
	call	close@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, r13d
	call	FD_CLR@PLT
	sub	DWORD PTR 16[rsp], 1
	jne	.L4
	xor	edi, edi
	call	exit@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edx, DWORD PTR RSH_BUFSIZ[rip]
	mov	rsi, r15
	mov	edi, r12d
	call	read@PLT
	test	eax, eax
	js	.L33
	jne	.L13
	mov	edi, r12d
	call	close@PLT
	mov	edi, DWORD PTR 24[rsp]
	call	close@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, r12d
	call	FD_CLR@PLT
	sub	DWORD PTR 16[rsp], 1
	jne	.L11
	xor	edi, edi
	call	exit@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rax, QWORD PTR ivec_in[rip]
	mov	edx, DWORD PTR RSHD_BUFSIZ[rip]
	mov	rsi, r15
	mov	edi, ebp
	mov	ecx, DWORD PTR [rax]
	call	do_read@PLT
	test	eax, eax
	js	.L34
	jne	.L10
	mov	edi, ebp
	call	close@PLT
	mov	edi, DWORD PTR 20[rsp]
	call	close@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, ebp
	call	FD_CLR@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdx, QWORD PTR ivec_out[rip]
	mov	edi, DWORD PTR 24[rsp]
	mov	rsi, r15
	mov	ecx, DWORD PTR [rdx]
	mov	edx, eax
	call	do_write@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdx, QWORD PTR ivec_out[rip]
	mov	edi, DWORD PTR 28[rsp]
	mov	rsi, r15
	mov	ecx, DWORD PTR 4[rdx]
	mov	edx, eax
	call	do_write@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR 20[rsp]
	mov	edx, eax
	mov	rsi, r15
	call	net_write@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, QWORD PTR errno[rip]
	call	strerror@PLT
	lea	rdi, .LC3[rip]
	mov	esi, eax
	xor	eax, eax
	call	syslog_and_die@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdi, QWORD PTR errno[rip]
	call	strerror@PLT
	lea	rdi, .LC3[rip]
	mov	esi, eax
	xor	eax, eax
	call	syslog_and_die@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdi, QWORD PTR errno[rip]
	call	strerror@PLT
	lea	rdi, .LC3[rip]
	mov	esi, eax
	xor	eax, eax
	call	syslog_and_die@PLT
	jmp	.L4
.L29:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	syslog_and_die@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	rshd_loop, .-rshd_loop
	.comm	protocol_version,4,4
	.comm	ivec_out,8,8
	.comm	ivec_in,8,8
	.comm	errno,8,8
	.comm	auth_method,8,8
	.comm	RSH_BUFSIZ,4,4
	.comm	RSHD_BUFSIZ,4,4
	.comm	FD_SETSIZE,4,4
	.comm	EINTR,8,8
	.comm	AUTH_KRB5,8,8
	.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_rshd.c_rshd_loop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"fd too large\000"
	.align	2
.LC1:
	.ascii	"out of memory\000"
	.align	2
.LC2:
	.ascii	"select: %s\000"
	.align	2
.LC3:
	.ascii	"read: %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rshd_loop, %function
rshd_loop:
	@ args = 12, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	ldr	r6, [sp, #84]
	mov	r5, r3
	cmp	r3, r6
	movlt	r3, r6
	cmp	r3, r0
	movlt	r3, r0
	mov	r4, r0
	ldr	r0, .L35
	str	r1, [sp, #16]
	ldr	r1, [r0]
	str	r2, [sp, #20]
	cmp	r1, r3
	ldr	r3, .L35+4
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bgt	.L2
	mov	r0, #1
	ldr	r1, .L35+8
	bl	errx
.L2:
	add	r0, sp, #28
	bl	FD_ZERO
	add	r1, sp, #28
	mov	r0, r4
	bl	FD_SET
	add	r1, sp, #28
	mov	r0, r5
	bl	FD_SET
	add	r1, sp, #28
	mov	r0, r6
	bl	FD_SET
	mov	r1, r6
	mov	r0, r5
	bl	max
	mov	r1, r0
	mov	r0, r4
	bl	max
	ldr	r3, .L35+12
	mov	r7, r0
	ldr	r1, [r3]
	ldr	r3, .L35+16
	add	r7, r7, #1
	ldr	r0, [r3]
	bl	max
	bl	malloc
	subs	r9, r0, #0
	beq	.L29
.L3:
	mov	r3, #2
	mov	r8, #0
	ldr	r10, .L35+20
	ldr	fp, .L35+24
	str	r3, [sp, #12]
.L4:
	mov	r3, #0
	ldr	ip, [sp, #28]
	mov	r2, r3
	mov	r0, r7
	str	r8, [sp]
	add	r1, sp, #32
	str	ip, [sp, #32]
	bl	select
	cmp	r0, #0
	bge	.L5
	ldr	r0, [r10]
	ldr	r3, [fp]
	cmp	r0, r3
	beq	.L4
	bl	strerror
	mov	r1, r0
	ldr	r0, .L35+28
	bl	syslog_and_die
.L5:
	mov	r0, r4
	add	r1, sp, #32
	bl	FD_ISSET
	cmp	r0, #0
	bne	.L30
.L8:
	mov	r0, r5
	add	r1, sp, #32
	bl	FD_ISSET
	cmp	r0, #0
	bne	.L31
.L11:
	mov	r0, r6
	add	r1, sp, #32
	bl	FD_ISSET
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L35+12
	mov	r1, r9
	ldr	r2, [r3]
	mov	r0, r6
	bl	read
	subs	r2, r0, #0
	blt	.L32
	bne	.L16
	mov	r0, r6
	bl	close
	ldr	r0, [sp, #80]
	bl	close
	mov	r0, r6
	add	r1, sp, #28
	bl	FD_CLR
	ldr	r3, [sp, #12]
	subs	r3, r3, #1
	str	r3, [sp, #12]
	bne	.L4
	mov	r0, r3
	bl	exit
	b	.L4
.L31:
	ldr	r3, .L35+12
	mov	r1, r9
	ldr	r2, [r3]
	mov	r0, r5
	bl	read
	subs	r2, r0, #0
	blt	.L33
	bne	.L13
	mov	r0, r5
	bl	close
	ldr	r0, [sp, #20]
	bl	close
	mov	r0, r5
	add	r1, sp, #28
	bl	FD_CLR
	ldr	r3, [sp, #12]
	subs	r3, r3, #1
	str	r3, [sp, #12]
	bne	.L11
	mov	r0, r3
	bl	exit
	b	.L11
.L30:
	ldr	r3, .L35+32
	ldr	r2, .L35+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r1, r9
	mov	r0, r4
	ldr	r3, [r3]
	bl	do_read
	subs	r2, r0, #0
	blt	.L34
	bne	.L10
	mov	r0, r4
	bl	close
	ldr	r0, [sp, #16]
	bl	close
	mov	r0, r4
	add	r1, sp, #28
	bl	FD_CLR
	b	.L8
.L13:
	ldr	r3, .L35+36
	mov	r1, r9
	ldr	r3, [r3]
	ldr	r0, [sp, #20]
	ldr	r3, [r3]
	bl	do_write
	b	.L11
.L16:
	ldr	r3, .L35+36
	mov	r1, r9
	ldr	r3, [r3]
	ldr	r0, [sp, #80]
	ldr	r3, [r3, #4]
	bl	do_write
	b	.L4
.L10:
	mov	r1, r9
	ldr	r0, [sp, #16]
	bl	net_write
	b	.L8
.L34:
	ldr	r0, [r10]
	bl	strerror
	mov	r1, r0
	ldr	r0, .L35+40
	bl	syslog_and_die
	b	.L8
.L33:
	ldr	r0, [r10]
	bl	strerror
	mov	r1, r0
	ldr	r0, .L35+40
	bl	syslog_and_die
	b	.L11
.L32:
	ldr	r0, [r10]
	bl	strerror
	mov	r1, r0
	ldr	r0, .L35+40
	bl	syslog_and_die
	b	.L4
.L29:
	ldr	r0, .L35+44
	bl	syslog_and_die
	b	.L3
.L36:
	.align	2
.L35:
	.word	FD_SETSIZE
	.word	.LC4
	.word	.LC0
	.word	RSH_BUFSIZ
	.word	RSHD_BUFSIZ
	.word	errno
	.word	EINTR
	.word	.LC2
	.word	ivec_in
	.word	ivec_out
	.word	.LC3
	.word	.LC1
	.size	rshd_loop, .-rshd_loop
	.comm	protocol_version,4,4
	.comm	ivec_out,4,4
	.comm	ivec_in,4,4
	.comm	errno,4,4
	.comm	auth_method,4,4
	.comm	RSH_BUFSIZ,4,4
	.comm	RSHD_BUFSIZ,4,4
	.comm	FD_SETSIZE,4,4
	.comm	EINTR,4,4
	.comm	AUTH_KRB5,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
