	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chan_is_dead                   ## -- Begin function chan_is_dead
	.p2align	4, 0x90
_chan_is_dead:                          ## @chan_is_dead
	.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	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_SSH_CHANNEL_ZOMBIE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	40(%rbx), %esi
	leaq	L_.str(%rip), %rdi
LBB0_18:
	xorl	%eax, %eax
	callq	_debug2
	movl	$1, %r14d
	jmp	LBB0_19
LBB0_2:
	movq	8(%rbx), %rax
	movq	_CHAN_INPUT_CLOSED@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.3:
	movq	16(%rbx), %rax
	movq	_CHAN_OUTPUT_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.4:
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	_datafellows@GOTPCREL(%rip), %rax
	movq	_SSH_BUG_EXTEOF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.5:
	movq	24(%rbx), %rax
	movq	_CHAN_EXTENDED_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:
	cmpl	$-1, 32(%rbx)
	je	LBB0_9
## %bb.7:
	movl	44(%rbx), %edi
	callq	_sshbuf_len
	testq	%rax, %rax
	jle	LBB0_9
## %bb.8:
	movl	32(%rbx), %r15d
	movl	40(%rbx), %r12d
	movl	44(%rbx), %edi
	callq	_sshbuf_len
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r12d, %esi
	movl	%r15d, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_debug2
	jmp	LBB0_19
LBB0_9:
	movl	36(%rbx), %eax
	movq	_CHAN_LOCAL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movl	40(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_18
LBB0_11:
	movq	_CHAN_CLOSE_SENT@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_12
LBB0_16:
	movq	_CHAN_CLOSE_RCVD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.17:
	movl	40(%rbx), %esi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_18
LBB0_12:
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.15:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_chan_send_close2
	movl	36(%rbx), %eax
	testl	%eax, (%r13)
	jne	LBB0_16
	jmp	LBB0_19
LBB0_13:
	movq	_CHAN_CLOSE_RCVD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.14:
	movl	40(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_18
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_CHANNEL_ZOMBIE,8,3         ## @SSH_CHANNEL_ZOMBIE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel %d: zombie"

	.comm	_CHAN_INPUT_CLOSED,8,3          ## @CHAN_INPUT_CLOSED
	.comm	_CHAN_OUTPUT_CLOSED,8,3         ## @CHAN_OUTPUT_CLOSED
	.comm	_datafellows,4,2                ## @datafellows
	.comm	_SSH_BUG_EXTEOF,4,2             ## @SSH_BUG_EXTEOF
	.comm	_CHAN_EXTENDED_WRITE,8,3        ## @CHAN_EXTENDED_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"channel %d: active efd: %d len %zu"

	.comm	_CHAN_LOCAL,4,2                 ## @CHAN_LOCAL
L_.str.2:                               ## @.str.2
	.asciz	"channel %d: is dead (local)"

	.comm	_CHAN_CLOSE_SENT,4,2            ## @CHAN_CLOSE_SENT
	.comm	_CHAN_CLOSE_RCVD,4,2            ## @CHAN_CLOSE_RCVD
L_.str.3:                               ## @.str.3
	.asciz	"channel %d: almost dead"

L_.str.4:                               ## @.str.4
	.asciz	"channel %d: is dead"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chan_is_dead                   ; -- Begin function chan_is_dead
	.p2align	2
_chan_is_dead:                          ; @chan_is_dead
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _SSH_CHANNEL_ZOMBIE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SSH_CHANNEL_ZOMBIE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w1, [x19, #40]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_debug2
	mov	w0, #1
	b	LBB0_20
LBB0_3:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _CHAN_INPUT_CLOSED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHAN_INPUT_CLOSED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.4:
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _CHAN_OUTPUT_CLOSED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CHAN_OUTPUT_CLOSED@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.5:
	mov	x21, x2
	mov	x20, x0
Lloh11:
	adrp	x8, _datafellows@GOTPAGE
Lloh12:
	ldr	x8, [x8, _datafellows@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SSH_BUG_EXTEOF@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SSH_BUG_EXTEOF@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
	ldr	x8, [x19, #24]
Lloh17:
	adrp	x9, _CHAN_EXTENDED_WRITE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CHAN_EXTENDED_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	ldr	w8, [x19, #32]
	cmn	w8, #1
	b.eq	LBB0_10
; %bb.8:
	ldr	w0, [x19, #44]
	bl	_sshbuf_len
	cmp	x0, #1
	b.lt	LBB0_10
; %bb.9:
	ldp	w20, w0, [x19, #40]
	ldr	w19, [x19, #32]
	bl	_sshbuf_len
	stp	x19, x0, [sp]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_debug2
	b	LBB0_19
LBB0_10:
	ldr	w8, [x19, #36]
Lloh22:
	adrp	x9, _CHAN_LOCAL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CHAN_LOCAL@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	ldr	w1, [x19, #40]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_12:
Lloh27:
	adrp	x22, _CHAN_CLOSE_SENT@GOTPAGE
Lloh28:
	ldr	x22, [x22, _CHAN_CLOSE_SENT@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_13:
Lloh29:
	adrp	x9, _CHAN_CLOSE_RCVD@GOTPAGE
Lloh30:
	ldr	x9, [x9, _CHAN_CLOSE_RCVD@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.14:
	ldr	w1, [x19, #40]
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_15:
	cbz	w21, LBB0_17
; %bb.16:
	mov	x0, x20
	mov	x1, x19
	bl	_chan_send_close2
	ldr	w8, [x19, #36]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_13
	b	LBB0_19
LBB0_17:
Lloh34:
	adrp	x9, _CHAN_CLOSE_RCVD@GOTPAGE
Lloh35:
	ldr	x9, [x9, _CHAN_CLOSE_RCVD@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:
	ldr	w1, [x19, #40]
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_2
LBB0_19:
	mov	w0, #0
LBB0_20:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_CHANNEL_ZOMBIE,8,3         ; @SSH_CHANNEL_ZOMBIE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel %d: zombie"

	.comm	_CHAN_INPUT_CLOSED,8,3          ; @CHAN_INPUT_CLOSED
	.comm	_CHAN_OUTPUT_CLOSED,8,3         ; @CHAN_OUTPUT_CLOSED
	.comm	_datafellows,4,2                ; @datafellows
	.comm	_SSH_BUG_EXTEOF,4,2             ; @SSH_BUG_EXTEOF
	.comm	_CHAN_EXTENDED_WRITE,8,3        ; @CHAN_EXTENDED_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"channel %d: active efd: %d len %zu"

	.comm	_CHAN_LOCAL,4,2                 ; @CHAN_LOCAL
l_.str.2:                               ; @.str.2
	.asciz	"channel %d: is dead (local)"

	.comm	_CHAN_CLOSE_SENT,4,2            ; @CHAN_CLOSE_SENT
	.comm	_CHAN_CLOSE_RCVD,4,2            ; @CHAN_CLOSE_RCVD
l_.str.3:                               ; @.str.3
	.asciz	"channel %d: almost dead"

l_.str.4:                               ; @.str.4
	.asciz	"channel %d: is dead"

.subsections_via_symbols
