	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function maybe_free_socket
_maybe_free_socket:                     ## @maybe_free_socket
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	movq	%rbx, -24(%rbp)
	movq	$0, (%rdi)
	movq	%rbx, %rdi
	callq	_VALID_SOCKET
	movl	%eax, %edi
	callq	_INSIST
	movq	%rbx, %rdi
	callq	_CONSISTENT
	cmpq	$0, (%rbx)
	jg	LBB0_11
## %bb.1:
	cmpq	$0, 8(%rbx)
	jg	LBB0_11
## %bb.2:
	cmpq	$0, 16(%rbx)
	jg	LBB0_11
## %bb.3:
	cmpq	$0, 24(%rbx)
	jg	LBB0_11
## %bb.4:
	cmpq	$0, 32(%rbx)
	jg	LBB0_11
## %bb.5:
	cmpl	$1, 40(%rbx)
	je	LBB0_11
## %bb.6:
	movl	68(%rbx), %edi
	callq	_ISC_LIST_EMPTY
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movl	64(%rbx), %edi
	callq	_ISC_LIST_EMPTY
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	60(%rbx), %edi
	callq	_ISC_LIST_EMPTY
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movq	48(%rbx), %rax
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	addq	$56, %rbx
	movq	%rbx, %rdi
	callq	_UNLOCK
	leaq	-24(%rbp), %rdi
	movl	%r14d, %esi
	callq	_free_socket
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	addq	$56, %rbx
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_UNLOCK                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_SOCKET,8,3             ## @INVALID_SOCKET
	.no_dead_strip	_maybe_free_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function maybe_free_socket
_maybe_free_socket:                     ; @maybe_free_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	x20, [x0]
	str	x20, [sp, #8]
	str	xzr, [x0]
	mov	x0, x20
	bl	_VALID_SOCKET
	bl	_INSIST
	mov	x0, x20
	bl	_CONSISTENT
	ldr	x8, [x20]
	cmp	x8, #0
	b.gt	LBB0_11
; %bb.1:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	b.gt	LBB0_11
; %bb.2:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	b.gt	LBB0_11
; %bb.3:
	ldr	x8, [x20, #24]
	cmp	x8, #0
	b.gt	LBB0_11
; %bb.4:
	ldr	x8, [x20, #32]
	cmp	x8, #0
	b.gt	LBB0_11
; %bb.5:
	ldr	w8, [x20, #40]
	cmp	w8, #1
	b.eq	LBB0_11
; %bb.6:
	ldr	w0, [x20, #68]
	bl	_ISC_LIST_EMPTY
	cbz	w0, LBB0_11
; %bb.7:
	ldr	w0, [x20, #64]
	bl	_ISC_LIST_EMPTY
	cbz	w0, LBB0_11
; %bb.8:
	ldr	w0, [x20, #60]
	bl	_ISC_LIST_EMPTY
	cbz	w0, LBB0_11
; %bb.9:
	ldr	x8, [x20, #48]
Lloh0:
	adrp	x9, _INVALID_SOCKET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INVALID_SOCKET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	add	x0, x20, #56
	bl	_UNLOCK
	add	x0, sp, #8
	mov	x1, x19
	bl	_free_socket
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	add	x0, x20, #56
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_UNLOCK
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_SOCKET,8,3             ; @INVALID_SOCKET
	.no_dead_strip	_maybe_free_socket
.subsections_via_symbols
