	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function closesocket
_closesocket:                           ## @closesocket
	.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	%edx, %r15d
	movq	%rdi, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r13
	movl	%edx, %edi
	callq	_FDLOCK_ID
	movslq	%eax, %rbx
	shlq	$2, %rbx
	movq	32(%r12), %rdi
	addq	%rbx, %rdi
	callq	_LOCK
	movq	48(%r12), %rcx
	movslq	%r15d, %rax
	movq	$0, (%rcx,%rax,8)
	movq	_isc_sockettype_fdwatch@GOTPCREL(%rip), %r14
	cmpq	(%r14), %r13
	jne	LBB0_1
## %bb.2:
	movq	_CLOSED@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_CLOSE_PENDING@GOTPCREL(%rip), %rcx
LBB0_3:
	movq	(%rcx), %rcx
	movq	(%r12), %rdx
	movq	%rcx, (%rdx,%rax,8)
	addq	32(%r12), %rbx
	movq	%rbx, %rdi
	callq	_UNLOCK
	cmpq	(%r14), %r13
	jne	LBB0_5
## %bb.4:
	movq	_SELECT_POKE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_unwatch_fd
	movq	_SELECT_POKE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_unwatch_fd
	jmp	LBB0_6
LBB0_5:
	movq	_SELECT_POKE_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_select_poke
LBB0_6:
	movl	40(%r12), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	_STATID_CLOSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_inc_stats                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_isc_sockettype_fdwatch,8,3     ## @isc_sockettype_fdwatch
	.comm	_CLOSED,8,3                     ## @CLOSED
	.comm	_CLOSE_PENDING,8,3              ## @CLOSE_PENDING
	.comm	_SELECT_POKE_READ,4,2           ## @SELECT_POKE_READ
	.comm	_SELECT_POKE_WRITE,4,2          ## @SELECT_POKE_WRITE
	.comm	_SELECT_POKE_CLOSE,4,2          ## @SELECT_POKE_CLOSE
	.comm	_STATID_CLOSE,8,3               ## @STATID_CLOSE
	.comm	_MANAGED,8,3                    ## @MANAGED
	.no_dead_strip	_closesocket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function closesocket
_closesocket:                           ; @closesocket
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x1]
	mov	x0, x2
	bl	_FDLOCK_ID
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20, #32]
	sbfiz	x23, x0, #2, #32
	add	x0, x8, x23
	bl	_LOCK
	ldr	x8, [x20, #48]
	sbfiz	x9, x21, #3, #32
	str	xzr, [x8, x9]
Lloh0:
	adrp	x24, _isc_sockettype_fdwatch@GOTPAGE
Lloh1:
	ldr	x24, [x24, _isc_sockettype_fdwatch@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh2:
	adrp	x10, _CLOSED@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CLOSED@GOTPAGEOFF]
Lloh4:
	adrp	x11, _CLOSE_PENDING@GOTPAGE
Lloh5:
	ldr	x11, [x11, _CLOSE_PENDING@GOTPAGEOFF]
	cmp	x22, x8
	csel	x8, x10, x11, eq
	ldr	x8, [x8]
	ldr	x10, [x20]
	str	x8, [x10, x9]
	ldr	x8, [x20, #32]
	add	x0, x8, x23
	bl	_UNLOCK
	ldr	x8, [x24]
	cmp	x22, x8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _SELECT_POKE_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SELECT_POKE_READ@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_unwatch_fd
Lloh9:
	adrp	x8, _SELECT_POKE_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SELECT_POKE_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_unwatch_fd
	b	LBB0_3
LBB0_2:
Lloh12:
	adrp	x8, _SELECT_POKE_CLOSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SELECT_POKE_CLOSE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_select_poke
LBB0_3:
	ldr	w0, [x20, #40]
Lloh15:
	adrp	x8, _STATID_CLOSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STATID_CLOSE@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh17:
	ldr	x8, [x8]
	ldr	w1, [x9, x8, lsl #2]
	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
	b	_inc_stats
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_isc_sockettype_fdwatch,8,3     ; @isc_sockettype_fdwatch
	.comm	_CLOSED,8,3                     ; @CLOSED
	.comm	_CLOSE_PENDING,8,3              ; @CLOSE_PENDING
	.comm	_SELECT_POKE_READ,4,2           ; @SELECT_POKE_READ
	.comm	_SELECT_POKE_WRITE,4,2          ; @SELECT_POKE_WRITE
	.comm	_SELECT_POKE_CLOSE,4,2          ; @SELECT_POKE_CLOSE
	.comm	_STATID_CLOSE,8,3               ; @STATID_CLOSE
	.comm	_MANAGED,8,3                    ; @MANAGED
	.no_dead_strip	_closesocket
.subsections_via_symbols
