	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_shutdown                   ## -- Begin function tcp_shutdown
	.p2align	4, 0x90
_tcp_shutdown:                          ## @tcp_shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_SEND_SHUTDOWN@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_TCPF_ESTABLISHED@GOTPCREL(%rip), %rax
	movq	_TCPF_SYN_SENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_TCPF_SYN_RECV@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_TCPF_CLOSE_WAIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	(%rdi), %eax
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_tcp_close_state
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_tcp_send_fin                   ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEND_SHUTDOWN,4,2              ## @SEND_SHUTDOWN
	.comm	_TCPF_ESTABLISHED,4,2           ## @TCPF_ESTABLISHED
	.comm	_TCPF_SYN_SENT,4,2              ## @TCPF_SYN_SENT
	.comm	_TCPF_SYN_RECV,4,2              ## @TCPF_SYN_RECV
	.comm	_TCPF_CLOSE_WAIT,4,2            ## @TCPF_CLOSE_WAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_shutdown                   ; -- Begin function tcp_shutdown
	.p2align	2
_tcp_shutdown:                          ; @tcp_shutdown
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _SEND_SHUTDOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEND_SHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _TCPF_ESTABLISHED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TCPF_ESTABLISHED@GOTPAGEOFF]
Lloh5:
	adrp	x10, _TCPF_SYN_SENT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TCPF_SYN_SENT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _TCPF_SYN_RECV@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TCPF_SYN_RECV@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh12:
	adrp	x10, _TCPF_CLOSE_WAIT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TCPF_CLOSE_WAIT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w9, w10
	lsr	w8, w9, w8
	tbz	w8, #0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_tcp_close_state
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tcp_send_fin
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SEND_SHUTDOWN,4,2              ; @SEND_SHUTDOWN
	.comm	_TCPF_ESTABLISHED,4,2           ; @TCPF_ESTABLISHED
	.comm	_TCPF_SYN_SENT,4,2              ; @TCPF_SYN_SENT
	.comm	_TCPF_SYN_RECV,4,2              ; @TCPF_SYN_RECV
	.comm	_TCPF_CLOSE_WAIT,4,2            ; @TCPF_CLOSE_WAIT
.subsections_via_symbols
