	.file	"extr_channels.c_channel_prepare_select.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"channel_prepare_select: max_fd (%d) is too large"
	.text
	.p2align 4
	.globl	channel_prepare_select
	.type	channel_prepare_select, @function
channel_prepare_select:
.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
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], r8
	mov	QWORD PTR 16[rsp], r9
	call	channel_before_prepare_select@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [r14]
	mov	esi, DWORD PTR [rax]
	call	MAXIMUM@PLT
	mov	esi, DWORD PTR NFDBITS[rip]
	lea	edi, 1[rax]
	mov	r13d, eax
	call	howmany@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L2
	mov	eax, DWORD PTR SIZE_MAX[rip]
	cdq
	idiv	r8d
	cmp	eax, 3
	jbe	.L14
.L2:
	mov	rdi, QWORD PTR [rbx]
	lea	r15d, 0[0+r8*4]
	test	rdi, rdi
	je	.L3
	mov	rax, QWORD PTR 8[rsp]
	cmp	DWORD PTR [rax], r15d
	jl	.L3
.L4:
	mov	DWORD PTR [r14], r13d
	xor	esi, esi
	mov	edx, r15d
	call	memset@PLT
	mov	rdi, QWORD PTR [r12]
	xor	esi, esi
	mov	edx, r15d
	call	memset@PLT
	mov	rdi, rbp
	call	ssh_packet_is_rekeying@PLT
	test	eax, eax
	je	.L15
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	esi, r8d
	mov	edx, 4
	mov	DWORD PTR 28[rsp], r8d
	call	xreallocarray@PLT
	mov	r8d, DWORD PTR 28[rsp]
	mov	edx, 4
	mov	QWORD PTR [rbx], rax
	mov	rdi, QWORD PTR [r12]
	mov	esi, r8d
	call	xreallocarray@PLT
	mov	QWORD PTR [r12], rax
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rbx]
	mov	DWORD PTR [rax], r15d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rcx, QWORD PTR [r12]
	mov	rdx, QWORD PTR [rbx]
	mov	rdi, rbp
	mov	r8, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR CHAN_PRE[rip]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	channel_handler@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	esi, r13d
	lea	rdi, .LC0[rip]
	mov	DWORD PTR 28[rsp], r8d
	call	fatal@PLT
	mov	r8d, DWORD PTR 28[rsp]
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	channel_prepare_select, .-channel_prepare_select
	.comm	SIZE_MAX,4,4
	.comm	NFDBITS,4,4
	.comm	CHAN_PRE,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_channels.c_channel_prepare_select.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"channel_prepare_select: max_fd (%d) is too large\000"
	.text
	.align	2
	.global	channel_prepare_select
	.syntax unified
	.arm
	.fpu softvfp
	.type	channel_prepare_select, %function
channel_prepare_select:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	mov	r9, r3
	sub	sp, sp, #12
	ldr	r3, [sp, #52]
	mov	r6, r2
	mov	r5, r1
	str	r3, [sp, #4]
	ldr	r10, [sp, #48]
	bl	channel_before_prepare_select
	ldr	r3, [r7]
	ldr	r0, [r9]
	ldr	r1, [r3]
	bl	MAXIMUM
	ldr	r3, .L16
	mov	r8, r0
	ldr	r1, [r3]
	add	r0, r0, #1
	bl	howmany
	subs	r4, r0, #0
	beq	.L2
	ldr	r3, .L16+4
	mov	r1, r4
	ldr	r0, [r3]
	bl	__aeabi_idiv
	cmp	r0, #3
	bls	.L14
.L2:
	ldr	r0, [r5]
	lsl	fp, r4, #2
	cmp	r0, #0
	beq	.L3
	ldr	r2, [r10]
	cmp	r2, fp
	blt	.L3
.L4:
	mov	r2, fp
	mov	r1, #0
	str	r8, [r9]
	bl	memset
	mov	r2, fp
	mov	r1, #0
	ldr	r0, [r6]
	bl	memset
	mov	r0, r7
	bl	ssh_packet_is_rekeying
	cmp	r0, #0
	beq	.L15
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r2, #4
	mov	r1, r4
	bl	xreallocarray
	str	r0, [r5]
	mov	r1, r4
	mov	r2, #4
	ldr	r0, [r6]
	bl	xreallocarray
	str	r0, [r6]
	ldr	r0, [r5]
	str	fp, [r10]
	b	.L4
.L15:
	mov	r0, r7
	ldr	r3, [sp, #4]
	ldr	r1, .L16+8
	str	r3, [sp, #48]
	ldr	r3, [r6]
	ldr	r2, [r5]
	ldr	r1, [r1]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	channel_handler
.L14:
	mov	r1, r8
	ldr	r0, .L16+12
	bl	fatal
	b	.L2
.L17:
	.align	2
.L16:
	.word	NFDBITS
	.word	SIZE_MAX
	.word	CHAN_PRE
	.word	.LC0
	.size	channel_prepare_select, .-channel_prepare_select
	.comm	SIZE_MAX,4,4
	.comm	NFDBITS,4,4
	.comm	CHAN_PRE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
