	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_channel_prepare_select         ## -- Begin function channel_prepare_select
	.p2align	4, 0x90
_channel_prepare_select:                ## @channel_prepare_select
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_channel_before_prepare_select
	movl	(%r13), %edi
	movq	(%r15), %rax
	movl	(%rax), %esi
	callq	_MAXIMUM
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rax), %edi
	movq	_NFDBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_howmany
	movl	%eax, %r14d
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%r12d
	cmpl	$3, %eax
	ja	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_fatal
LBB0_3:
	shll	$2, %r14d
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r14d
	jle	LBB0_5
LBB0_6:
	movl	%r12d, %esi
	movl	$4, %edx
	callq	_xreallocarray
	movq	%rax, (%rbx)
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %r13
	movq	%rbx, %r15
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	movl	%r12d, %esi
	movl	$4, %edx
	callq	_xreallocarray
	movq	%rax, (%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	movq	%r15, %r12
	movq	(%r15), %rdi
	movq	%r13, %r15
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%r13)
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	%r15, %rdi
	callq	_ssh_packet_is_rekeying
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_CHAN_PRE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	movq	(%rbx), %rcx
	movq	%r15, %rdi
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_channel_handler                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NFDBITS,4,2                    ## @NFDBITS
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel_prepare_select: max_fd (%d) is too large"

	.comm	_CHAN_PRE,4,2                   ## @CHAN_PRE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_channel_prepare_select         ; -- Begin function channel_prepare_select
	.p2align	2
_channel_prepare_select:                ; @channel_prepare_select
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x24, x4
	mov	x23, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_channel_before_prepare_select
	ldr	w0, [x23]
	ldr	x8, [x21]
	ldr	w1, [x8]
	bl	_MAXIMUM
	mov	x25, x0
	add	w0, w0, #1
Lloh0:
	adrp	x8, _NFDBITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFDBITS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_howmany
	mov	x27, x0
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sdiv	w8, w8, w27
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	bl	_fatal
LBB0_3:
	lsl	w26, w27, #2
	ldr	x0, [x22]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x24]
	cmp	w26, w8
	b.le	LBB0_6
LBB0_5:
	mov	x1, x27
	mov	w2, #4
	bl	_xreallocarray
	str	x0, [x22]
	ldr	x0, [x20]
	mov	x1, x27
	mov	w2, #4
	bl	_xreallocarray
	str	x0, [x20]
	str	w26, [x24]
	ldr	x0, [x22]
LBB0_6:
	str	w25, [x23]
	mov	w1, #0
	mov	x2, x26
	bl	_memset
	ldr	x0, [x20]
	mov	w1, #0
	mov	x2, x26
	bl	_memset
	mov	x0, x21
	bl	_ssh_packet_is_rekeying
	cbz	w0, LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh8:
	adrp	x8, _CHAN_PRE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHAN_PRE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x2, [x22]
	ldr	x3, [x20]
	mov	x0, x21
	mov	x4, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_channel_handler
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NFDBITS,4,2                    ; @NFDBITS
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel_prepare_select: max_fd (%d) is too large"

	.comm	_CHAN_PRE,4,2                   ; @CHAN_PRE
.subsections_via_symbols
