	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm_remove_fd                   ## -- Begin function sm_remove_fd
	.p2align	4, 0x90
_sm_remove_fd:                          ## @sm_remove_fd
	.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, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r13
	movl	8(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_ISSET
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	40(%r13), %r15d
	movl	%ebx, %edi
	callq	_HT_KEY
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_ht_put
	movl	36(%r13), %r15d
	movl	%ebx, %edi
	callq	_HT_KEY
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_ht_put
	movq	%rax, %r12
	movl	32(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_ISSET
	movl	%eax, %r15d
	testl	%eax, %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_sm_on_debug
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	*(%r14)
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_close
	movl	8(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movl	32(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
LBB0_4:
	movl	28(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
	movl	24(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
	movl	20(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
	movl	16(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
	movl	12(%r13), %esi
	movl	%ebx, %edi
	callq	_FD_CLR
	movl	(%r13), %eax
	cmpl	%ebx, %eax
	jne	LBB0_9
## %bb.5:
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movl	%ebx, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %esi
	callq	_FD_ISSET
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %eax
	leal	-1(%rax), %edi
	movl	%edi, (%r13)
	testl	%eax, %eax
	jg	LBB0_7
LBB0_9:
	movl	4(%r13), %edi
	callq	_ht_size
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:
	movl	4(%r13), %edi
	callq	_ht_values
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.11:
	movq	%rax, %rdx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rcx)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$0, (%rcx)
	jmp	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%rdx), %rcx
	addq	$8, %rdx
	testq	%rcx, %rcx
	jne	LBB0_12
LBB0_16:
	movq	%rax, %rdi
	callq	_free
	jmp	LBB0_17
LBB0_1:
	movq	_SM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_ERROR,4,2                   ## @SM_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ss.remove%s_fd(%d)"

L_.str.1:                               ## @.str.1
	.asciz	"_server"

L_.str.2:                               ## @.str.2
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm_remove_fd                   ; -- Begin function sm_remove_fd
	.p2align	2
_sm_remove_fd:                          ; @sm_remove_fd
	.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	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldr	w1, [x23, #8]
	mov	x0, x19
	bl	_FD_ISSET
	cbz	w0, LBB0_16
; %bb.1:
	ldr	w21, [x23, #40]
	mov	x0, x19
	bl	_HT_KEY
	mov	x1, x0
	mov	x0, x21
	mov	x2, #0
	bl	_ht_put
	ldr	w21, [x23, #36]
	mov	x0, x19
	bl	_HT_KEY
	mov	x1, x0
	mov	x0, x21
	mov	x2, #0
	bl	_ht_put
	mov	x21, x0
	ldr	w1, [x23, #32]
	mov	x0, x19
	bl	_FD_ISSET
	mov	x22, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w0, #0
	csel	x2, x9, x8, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_sm_on_debug
	ldr	x8, [x20]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	blr	x8
	mov	x20, x0
	mov	x0, x19
	bl	_close
	ldr	w1, [x23, #8]
	mov	x0, x19
	bl	_FD_CLR
	cbz	w22, LBB0_3
; %bb.2:
	ldr	w1, [x23, #32]
	mov	x0, x19
	bl	_FD_CLR
LBB0_3:
	ldr	w1, [x23, #28]
	mov	x0, x19
	bl	_FD_CLR
	ldr	w1, [x23, #24]
	mov	x0, x19
	bl	_FD_CLR
	ldr	w1, [x23, #20]
	mov	x0, x19
	bl	_FD_CLR
	ldr	w1, [x23, #16]
	mov	x0, x19
	bl	_FD_CLR
	ldr	w1, [x23, #12]
	mov	x0, x19
	bl	_FD_CLR
	ldr	w8, [x23]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.4:
	tbnz	w8, #31, LBB0_8
; %bb.5:
	mov	x0, x19
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23, #8]
	bl	_FD_ISSET
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	sub	w0, w8, #1
	str	w0, [x23]
	cmp	w8, #0
	b.gt	LBB0_6
LBB0_8:
	ldr	w0, [x23, #4]
	bl	_ht_size
	cbz	x0, LBB0_17
; %bb.9:
	ldr	w0, [x23, #4]
	bl	_ht_values
	ldr	x8, [x0]
	cbz	x8, LBB0_15
; %bb.10:
	mov	x9, x0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8]
	cmp	w10, w19
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	str	wzr, [x8]
	b	LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x9, #8]!
	cbnz	x8, LBB0_12
LBB0_15:
	bl	_free
	b	LBB0_17
LBB0_16:
Lloh6:
	adrp	x8, _SM_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SM_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
LBB0_17:
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_ERROR,4,2                   ; @SM_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ss.remove%s_fd(%d)"

l_.str.1:                               ; @.str.1
	.asciz	"_server"

l_.str.2:                               ; @.str.2
	.space	1

.subsections_via_symbols
