	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcp_disconnect
_tcp_disconnect:                        ## @tcp_disconnect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	24(%rdi), %r14
	movq	8(%r14), %rbx
	xorl	%eax, %eax
	callq	_NET_EPOCH_ASSERT
	movq	%r14, %rdi
	callq	_INP_WLOCK_ASSERT
	movq	(%r15), %rax
	movq	_TCPS_ESTABLISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.1:
	movq	_TCPS_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.2:
	movl	16(%r15), %edi
	callq	_IS_FASTOPEN
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	movq	_SO_LINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.6:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	_soisdisconnecting
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_sbflush
	movq	%r15, %rdi
	callq	_tcp_usrclosed
	movq	_INP_DROPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_tcp_close
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_10:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_7:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_tcp_drop
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_KASSERT                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TCPS_ESTABLISHED,8,3           ## @TCPS_ESTABLISHED
	.comm	_TCPS_LISTEN,8,3                ## @TCPS_LISTEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcp_disconnect: tcp_close() returned NULL"

	.comm	_SO_LINGER,4,2                  ## @SO_LINGER
L_.str.1:                               ## @.str.1
	.asciz	"tcp_disconnect: tcp_drop() returned NULL"

	.comm	_INP_DROPPED,4,2                ## @INP_DROPPED
	.no_dead_strip	_tcp_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcp_disconnect
_tcp_disconnect:                        ; @tcp_disconnect
	.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, x0
	ldr	x20, [x0, #24]
	ldr	x21, [x20, #8]
	bl	_NET_EPOCH_ASSERT
	mov	x0, x20
	bl	_INP_WLOCK_ASSERT
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TCPS_ESTABLISHED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TCPS_ESTABLISHED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _TCPS_LISTEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TCPS_LISTEN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_IS_FASTOPEN
	cbz	x0, LBB0_7
LBB0_3:
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _SO_LINGER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SO_LINGER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_9
LBB0_5:
	mov	x0, x21
	bl	_soisdisconnecting
	add	x0, x21, #16
	bl	_sbflush
	mov	x0, x19
	bl	_tcp_usrclosed
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _INP_DROPPED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INP_DROPPED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	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_7:
	mov	x0, x19
	bl	_tcp_close
	cmp	x0, #0
	cset	w0, ne
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	mov	x0, 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
	br	x1
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_tcp_drop
	cmp	x0, #0
	cset	w0, ne
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	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	_KASSERT
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TCPS_ESTABLISHED,8,3           ; @TCPS_ESTABLISHED
	.comm	_TCPS_LISTEN,8,3                ; @TCPS_LISTEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcp_disconnect: tcp_close() returned NULL"

	.comm	_SO_LINGER,4,2                  ; @SO_LINGER
l_.str.1:                               ; @.str.1
	.asciz	"tcp_disconnect: tcp_drop() returned NULL"

	.comm	_INP_DROPPED,4,2                ; @INP_DROPPED
	.no_dead_strip	_tcp_disconnect
.subsections_via_symbols
