	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function channel_pre_open
_channel_pre_open:                      ## @channel_pre_open
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rsi), %rax
	movq	_CHAN_INPUT_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	cmpq	$0, 8(%rbx)
	jle	LBB0_5
## %bb.2:
	movl	64(%rbx), %edi
	callq	_sshbuf_len
	cmpq	8(%rbx), %rax
	jge	LBB0_5
## %bb.3:
	movl	64(%rbx), %edi
	movq	_CHAN_RBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sshbuf_check_reserve
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	16(%rbx), %edi
	movq	%r14, %rsi
	callq	_FD_SET
LBB0_5:
	movq	24(%rbx), %rax
	movq	_CHAN_OUTPUT_OPEN@GOTPCREL(%rip), %rcx
	movq	_CHAN_OUTPUT_WAIT_DRAIN@GOTPCREL(%rip), %r13
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	cmpq	(%r13), %rax
	jne	LBB0_13
LBB0_7:
	movl	60(%rbx), %edi
	callq	_sshbuf_len
	testq	%rax, %rax
	jle	LBB0_9
## %bb.8:
	movl	32(%rbx), %edi
	movq	%r15, %rsi
	callq	_FD_SET
	cmpl	$-1, 36(%rbx)
	jne	LBB0_14
	jmp	LBB0_26
LBB0_9:
	movq	24(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_CHANNEL_EFD_OUTPUT_ACTIVE
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	56(%rbx), %r12d
	movl	36(%rbx), %r13d
	movl	52(%rbx), %edi
	callq	_sshbuf_len
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movq	%rax, %rcx
	callq	_debug2
LBB0_13:
	cmpl	$-1, 36(%rbx)
	je	LBB0_26
LBB0_14:
	movq	(%rbx), %rax
	movq	_CHAN_INPUT_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	24(%rbx), %rax
	movq	_CHAN_OUTPUT_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_26
LBB0_16:
	movq	40(%rbx), %rax
	movq	_CHAN_EXTENDED_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.17:
	movl	52(%rbx), %edi
	callq	_sshbuf_len
	movl	36(%rbx), %edi
	testq	%rax, %rax
	jle	LBB0_20
## %bb.18:
	movq	%r15, %rsi
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FD_SET                         ## TAILCALL
LBB0_20:
	cmpl	$-1, %edi
	je	LBB0_26
LBB0_21:
	movq	_CHAN_EOF_SENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 48(%rbx)
	jne	LBB0_26
## %bb.22:
	movq	40(%rbx), %rax
	movq	_CHAN_EXTENDED_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_24
## %bb.23:
	movq	_CHAN_EXTENDED_IGNORE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_26
LBB0_24:
	movl	52(%rbx), %edi
	callq	_sshbuf_len
	cmpq	8(%rbx), %rax
	jge	LBB0_26
## %bb.25:
	movl	36(%rbx), %edi
	movq	%r14, %rsi
	jmp	LBB0_19
LBB0_12:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_chan_obuf_empty
	cmpl	$-1, 36(%rbx)
	jne	LBB0_14
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHAN_INPUT_OPEN,8,3            ## @CHAN_INPUT_OPEN
	.comm	_CHAN_RBUF,4,2                  ## @CHAN_RBUF
	.comm	_CHAN_OUTPUT_OPEN,8,3           ## @CHAN_OUTPUT_OPEN
	.comm	_CHAN_OUTPUT_WAIT_DRAIN,8,3     ## @CHAN_OUTPUT_WAIT_DRAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel %d: obuf_empty delayed efd %d/(%zu)"

	.comm	_CHAN_INPUT_CLOSED,8,3          ## @CHAN_INPUT_CLOSED
	.comm	_CHAN_OUTPUT_CLOSED,8,3         ## @CHAN_OUTPUT_CLOSED
	.comm	_CHAN_EXTENDED_WRITE,8,3        ## @CHAN_EXTENDED_WRITE
	.comm	_CHAN_EOF_SENT,4,2              ## @CHAN_EOF_SENT
	.comm	_CHAN_EXTENDED_READ,8,3         ## @CHAN_EXTENDED_READ
	.comm	_CHAN_EXTENDED_IGNORE,8,3       ## @CHAN_EXTENDED_IGNORE
	.no_dead_strip	_channel_pre_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function channel_pre_open
_channel_pre_open:                      ; @channel_pre_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _CHAN_INPUT_OPEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHAN_INPUT_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x20, #8]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	w0, [x20, #64]
	bl	_sshbuf_len
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.ge	LBB0_5
; %bb.3:
	ldr	w0, [x20, #64]
Lloh3:
	adrp	x8, _CHAN_RBUF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHAN_RBUF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_sshbuf_check_reserve
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x20, #16]
	mov	x1, x19
	bl	_FD_SET
LBB0_5:
	ldr	x8, [x20, #24]
Lloh6:
	adrp	x9, _CHAN_OUTPUT_OPEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHAN_OUTPUT_OPEN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x23, _CHAN_OUTPUT_WAIT_DRAIN@GOTPAGE
Lloh10:
	ldr	x23, [x23, _CHAN_OUTPUT_WAIT_DRAIN@GOTPAGEOFF]
	ldr	x10, [x23]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_12
; %bb.6:
	ldr	w0, [x20, #60]
	bl	_sshbuf_len
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.7:
	ldr	w0, [x20, #32]
	mov	x1, x21
	bl	_FD_SET
	b	LBB0_12
LBB0_8:
	ldr	x8, [x20, #24]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
	mov	x0, x20
	bl	_CHANNEL_EFD_OUTPUT_ACTIVE
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w22, [x20, #36]
	ldp	w0, w23, [x20, #52]
	bl	_sshbuf_len
	mov	x3, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	bl	_debug2
	b	LBB0_12
LBB0_11:
	mov	x0, x22
	mov	x1, x20
	bl	_chan_obuf_empty
LBB0_12:
	ldr	w8, [x20, #36]
	cmn	w8, #1
	b.eq	LBB0_25
; %bb.13:
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _CHAN_INPUT_CLOSED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CHAN_INPUT_CLOSED@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x20, #24]
Lloh16:
	adrp	x9, _CHAN_OUTPUT_CLOSED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CHAN_OUTPUT_CLOSED@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_25
LBB0_15:
	ldr	x8, [x20, #40]
Lloh19:
	adrp	x9, _CHAN_EXTENDED_WRITE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CHAN_EXTENDED_WRITE@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.16:
	ldr	w0, [x20, #52]
	bl	_sshbuf_len
	mov	x8, x0
	ldr	w0, [x20, #36]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.17:
	mov	x1, x21
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_FD_SET
LBB0_19:
	cmn	w0, #1
	b.eq	LBB0_25
LBB0_20:
	ldr	w8, [x20, #48]
Lloh22:
	adrp	x9, _CHAN_EOF_SENT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CHAN_EOF_SENT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_25
; %bb.21:
	ldr	x8, [x20, #40]
Lloh25:
	adrp	x9, _CHAN_EXTENDED_READ@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CHAN_EXTENDED_READ@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.22:
Lloh28:
	adrp	x9, _CHAN_EXTENDED_IGNORE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CHAN_EXTENDED_IGNORE@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
LBB0_23:
	ldr	w0, [x20, #52]
	bl	_sshbuf_len
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.ge	LBB0_25
; %bb.24:
	ldr	w0, [x20, #36]
	mov	x1, x19
	b	LBB0_18
LBB0_25:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_CHAN_INPUT_OPEN,8,3            ; @CHAN_INPUT_OPEN
	.comm	_CHAN_RBUF,4,2                  ; @CHAN_RBUF
	.comm	_CHAN_OUTPUT_OPEN,8,3           ; @CHAN_OUTPUT_OPEN
	.comm	_CHAN_OUTPUT_WAIT_DRAIN,8,3     ; @CHAN_OUTPUT_WAIT_DRAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel %d: obuf_empty delayed efd %d/(%zu)"

	.comm	_CHAN_INPUT_CLOSED,8,3          ; @CHAN_INPUT_CLOSED
	.comm	_CHAN_OUTPUT_CLOSED,8,3         ; @CHAN_OUTPUT_CLOSED
	.comm	_CHAN_EXTENDED_WRITE,8,3        ; @CHAN_EXTENDED_WRITE
	.comm	_CHAN_EOF_SENT,4,2              ; @CHAN_EOF_SENT
	.comm	_CHAN_EXTENDED_READ,8,3         ; @CHAN_EXTENDED_READ
	.comm	_CHAN_EXTENDED_IGNORE,8,3       ; @CHAN_EXTENDED_IGNORE
	.no_dead_strip	_channel_pre_open
.subsections_via_symbols
