	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsocket_close                  ## -- Begin function fsocket_close
	.p2align	4, 0x90
_fsocket_close:                         ## @fsocket_close
	.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	%edi, %r14d
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	%rbx, %rdi
	callq	_files_fdtable
	cmpl	%r14d, (%rax)
	jbe	LBB0_2
## %bb.1:
	movq	%rax, %r12
	movq	8(%rax), %rax
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %r15
	testq	%r15, %r15
	je	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_rcu_assign_pointer
	movl	4(%r12), %esi
	movl	%r14d, %edi
	callq	_FD_CLR
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	___put_unused_fd
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fsocket_filp_close             ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_EBADF@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_EBADF,4,2                      ## @EBADF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsocket_close                  ; -- Begin function fsocket_close
	.p2align	2
_fsocket_close:                         ; @fsocket_close
	.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	x20, x0
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x19, [x8]
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x19
	bl	_files_fdtable
	ldr	w8, [x0]
	cmp	w8, w20
	b.ls	LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8, w20, uxtw #3]
	cbz	x21, LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, #0
	bl	_rcu_assign_pointer
	ldr	w1, [x22, #4]
	mov	x0, x20
	bl	_FD_CLR
	mov	x0, x19
	mov	x1, x20
	bl	___put_unused_fd
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x21
	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	_fsocket_filp_close
LBB0_3:
	mov	x0, x19
	bl	_spin_unlock
Lloh3:
	adrp	x8, _EBADF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_EBADF,4,2                      ; @EBADF
.subsections_via_symbols
