	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dn_shutdown
_dn_shutdown:                           ## @dn_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	%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
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_DN_SK
	movq	%rax, %r12
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_lock_sock
	movq	(%r13), %rax
	movq	_SS_UNCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.1:
	movq	_SS_DISCONNECTING@GOTPCREL(%rip), %rcx
	movl	$0, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r12), %rax
	movq	_DN_O@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_SHUTDOWN_MASK@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	%r14d, (%r15)
	movq	%r15, %rdi
	callq	_dn_destroy_sock
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r15, %rdi
	callq	_release_sock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_SS_UNCONNECTED,8,3             ## @SS_UNCONNECTED
	.comm	_SS_DISCONNECTING,8,3           ## @SS_DISCONNECTING
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DN_O,8,3                       ## @DN_O
	.comm	_SHUTDOWN_MASK,4,2              ## @SHUTDOWN_MASK
	.no_dead_strip	_dn_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dn_shutdown
_dn_shutdown:                           ; @dn_shutdown
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_DN_SK
	mov	x21, x0
Lloh0:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _SS_UNCONNECTED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SS_UNCONNECTED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	neg	w20, w23
	b	LBB0_7
LBB0_2:
Lloh6:
	adrp	x9, _SS_DISCONNECTING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SS_DISCONNECTING@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.3:
	ldr	x8, [x21]
Lloh9:
	adrp	x9, _DN_O@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DN_O@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _SHUTDOWN_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SHUTDOWN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w10, w20, #0, ne
	b.eq	LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_5:
	str	w20, [x19]
	mov	x0, x19
	bl	_dn_destroy_sock
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_SS_UNCONNECTED,8,3             ; @SS_UNCONNECTED
	.comm	_SS_DISCONNECTING,8,3           ; @SS_DISCONNECTING
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DN_O,8,3                       ; @DN_O
	.comm	_SHUTDOWN_MASK,4,2              ; @SHUTDOWN_MASK
	.no_dead_strip	_dn_shutdown
.subsections_via_symbols
