	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chan_rcvd_ieof                 ## -- Begin function chan_rcvd_ieof
	.p2align	4, 0x90
_chan_rcvd_ieof:                        ## @chan_rcvd_ieof
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	16(%rsi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_debug2
	movq	_CHAN_EOF_RCVD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
	movq	(%rbx), %rax
	movq	_CHAN_OUTPUT_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_CHAN_OUTPUT_WAIT_DRAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_chan_set_ostate
	movq	(%rbx), %rax
LBB0_2:
	movq	_CHAN_OUTPUT_WAIT_DRAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movl	8(%rbx), %edi
	callq	_sshbuf_len
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_CHANNEL_EFD_OUTPUT_ACTIVE
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_chan_obuf_empty                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel %d: rcvd eof"

	.comm	_CHAN_EOF_RCVD,4,2              ## @CHAN_EOF_RCVD
	.comm	_CHAN_OUTPUT_OPEN,8,3           ## @CHAN_OUTPUT_OPEN
	.comm	_CHAN_OUTPUT_WAIT_DRAIN,8,3     ## @CHAN_OUTPUT_WAIT_DRAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chan_rcvd_ieof                 ; -- Begin function chan_rcvd_ieof
	.p2align	2
_chan_rcvd_ieof:                        ; @chan_rcvd_ieof
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w1, [x1, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug2
Lloh2:
	adrp	x8, _CHAN_EOF_RCVD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CHAN_EOF_RCVD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _CHAN_OUTPUT_OPEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHAN_OUTPUT_OPEN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x21, _CHAN_OUTPUT_WAIT_DRAIN@GOTPAGE
Lloh9:
	ldr	x21, [x21, _CHAN_OUTPUT_WAIT_DRAIN@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x1, [x21]
	mov	x0, x19
	bl	_chan_set_ostate
	ldr	x8, [x19]
LBB0_2:
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_sshbuf_len
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_CHANNEL_EFD_OUTPUT_ACTIVE
	cbz	w0, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_chan_obuf_empty
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel %d: rcvd eof"

	.comm	_CHAN_EOF_RCVD,4,2              ; @CHAN_EOF_RCVD
	.comm	_CHAN_OUTPUT_OPEN,8,3           ; @CHAN_OUTPUT_OPEN
	.comm	_CHAN_OUTPUT_WAIT_DRAIN,8,3     ; @CHAN_OUTPUT_WAIT_DRAIN
.subsections_via_symbols
