	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet_shutdown                  ## -- Begin function inet_shutdown
	.p2align	4, 0x90
_inet_shutdown:                         ## @inet_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	incl	%ebx
	je	LBB0_2
## %bb.1:
	movq	_SHUTDOWN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ebx, %eax
	jne	LBB0_2
## %bb.3:
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_lock_sock
	movq	(%r14), %rcx
	movq	_SS_CONNECTING@GOTPCREL(%rip), %rdx
	movl	(%r15), %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.4:
	movq	_TCPF_SYN_SENT@GOTPCREL(%rip), %rcx
	movq	_TCPF_SYN_RECV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_TCPF_CLOSE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	btl	%eax, %edx
	jb	LBB0_5
## %bb.6:
	movq	_SS_CONNECTED@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_21
LBB0_5:
	movq	_SS_DISCONNECTING@GOTPCREL(%rip), %rcx
LBB0_7:
	movq	(%rcx), %rcx
	movq	%rcx, (%r14)
LBB0_8:
	cmpl	$128, %eax
	je	LBB0_16
## %bb.9:
	cmpl	$129, %eax
	je	LBB0_14
## %bb.10:
	xorl	%r12d, %r12d
	cmpl	$130, %eax
	jne	LBB0_12
## %bb.11:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	orl	%ebx, 4(%r15)
	movq	16(%r15), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.13:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	*%rcx
	jmp	LBB0_20
LBB0_14:
	movq	_RCV_SHUTDOWN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_15
LBB0_16:
	movq	16(%r15), %rax
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	callq	*(%rax)
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.18:
	movq	_SS_UNCONNECTED@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_SS_DISCONNECTING@GOTPCREL(%rip), %rax
LBB0_19:
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_20:
	movq	%r15, %rdi
	callq	*8(%r15)
	movq	%r15, %rdi
	callq	_release_sock
LBB0_21:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%r12d, %r12d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_SHUTDOWN_MASK,4,2              ## @SHUTDOWN_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SS_CONNECTING,8,3              ## @SS_CONNECTING
	.comm	_TCPF_SYN_SENT,4,2              ## @TCPF_SYN_SENT
	.comm	_TCPF_SYN_RECV,4,2              ## @TCPF_SYN_RECV
	.comm	_TCPF_CLOSE,4,2                 ## @TCPF_CLOSE
	.comm	_SS_DISCONNECTING,8,3           ## @SS_DISCONNECTING
	.comm	_SS_CONNECTED,8,3               ## @SS_CONNECTED
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_RCV_SHUTDOWN,4,2               ## @RCV_SHUTDOWN
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_SS_UNCONNECTED,8,3             ## @SS_UNCONNECTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet_shutdown                  ; -- Begin function inet_shutdown
	.p2align	2
_inet_shutdown:                         ; @inet_shutdown
	.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
	adds	w20, w1, #1
	b.eq	LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _SHUTDOWN_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SHUTDOWN_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w8, w20, w8
	cbnz	w8, LBB0_8
; %bb.2:
	mov	x21, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_lock_sock
	ldr	x9, [x21]
Lloh3:
	adrp	x8, _SS_CONNECTING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SS_CONNECTING@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
	ldr	w8, [x19]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _TCPF_SYN_SENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TCPF_SYN_SENT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _TCPF_SYN_RECV@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TCPF_SYN_RECV@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _TCPF_CLOSE@GOTPAGE
Lloh13:
	ldr	x11, [x11, _TCPF_CLOSE@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh14:
	ldr	w10, [x11]
Lloh15:
	adrp	x11, _SS_DISCONNECTING@GOTPAGE
Lloh16:
	ldr	x11, [x11, _SS_DISCONNECTING@GOTPAGEOFF]
Lloh17:
	adrp	x12, _SS_CONNECTED@GOTPAGE
Lloh18:
	ldr	x12, [x12, _SS_CONNECTED@GOTPAGEOFF]
	orr	w9, w9, w10
	lsr	w9, w9, w8
	tst	w9, #0x1
	csel	x9, x12, x11, eq
	ldr	x9, [x9]
	str	x9, [x21]
LBB0_4:
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.7:
Lloh19:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_8:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_9:
Lloh25:
	adrp	x8, _RCV_SHUTDOWN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RCV_SHUTDOWN@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_14
LBB0_10:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh28:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	mov	x22, x0
Lloh31:
	adrp	x8, _SS_DISCONNECTING@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SS_DISCONNECTING@GOTPAGEOFF]
Lloh33:
	adrp	x9, _SS_UNCONNECTED@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SS_UNCONNECTED@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [x21]
	b	LBB0_15
LBB0_11:
	mov	w22, #0
LBB0_12:
	ldr	w8, [x19, #4]
	orr	w8, w8, w20
	str	w8, [x19, #4]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_15
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	blr	x8
	b	LBB0_15
LBB0_14:
	mov	w22, #0
LBB0_15:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_release_sock
LBB0_16:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SHUTDOWN_MASK,4,2              ; @SHUTDOWN_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SS_CONNECTING,8,3              ; @SS_CONNECTING
	.comm	_TCPF_SYN_SENT,4,2              ; @TCPF_SYN_SENT
	.comm	_TCPF_SYN_RECV,4,2              ; @TCPF_SYN_RECV
	.comm	_TCPF_CLOSE,4,2                 ; @TCPF_CLOSE
	.comm	_SS_DISCONNECTING,8,3           ; @SS_DISCONNECTING
	.comm	_SS_CONNECTED,8,3               ; @SS_CONNECTED
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_RCV_SHUTDOWN,4,2               ; @RCV_SHUTDOWN
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_SS_UNCONNECTED,8,3             ; @SS_UNCONNECTED
.subsections_via_symbols
