	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_maintain_activefds             ## -- Begin function maintain_activefds
	.p2align	4, 0x90
_maintain_activefds:                    ## @maintain_activefds
	.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	_FD_SETSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edi, %edi
	js	LBB0_13
## %bb.1:
	cmpl	%r14d, %edx
	jle	LBB0_13
## %bb.2:
	testl	%esi, %esi
	je	LBB0_3
## %bb.5:
	movq	_activefds@GOTPCREL(%rip), %rsi
	movl	%r14d, %edi
	callq	_FD_CLR
	movq	_maxactivefd@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	cmpl	%r14d, %eax
	jne	LBB0_4
## %bb.7:
	movq	_activefds@GOTPCREL(%rip), %r15
	movl	%r14d, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	decl	%ebx
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movl	%ebx, (%r12)
	jmp	LBB0_12
LBB0_3:
	movq	_activefds@GOTPCREL(%rip), %rsi
	movl	%r14d, %edi
	callq	_FD_SET
	movq	_maxactivefd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r14d, %edi
	callq	_max
	movl	%eax, (%rbx)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r12), %ebx
LBB0_12:
	xorl	%edi, %edi
	cmpl	%r14d, %ebx
	setne	%dil
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_INSIST                         ## TAILCALL
LBB0_13:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_msyslog
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_FD_SETSIZE,4,2                 ## @FD_SETSIZE
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too many sockets in use, FD_SETSIZE %d exceeded by fd %d"

	.comm	_activefds,4,2                  ## @activefds
	.comm	_maxactivefd,4,2                ## @maxactivefd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_maintain_activefds             ; -- Begin function maintain_activefds
	.p2align	2
_maintain_activefds:                    ; @maintain_activefds
	.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	x19, x0
Lloh0:
	adrp	x8, _FD_SETSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FD_SETSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	tbnz	w0, #31, LBB0_12
; %bb.1:
	cmp	w2, w19
	b.le	LBB0_12
; %bb.2:
	cbz	w1, LBB0_8
; %bb.3:
Lloh3:
	adrp	x1, _activefds@GOTPAGE
Lloh4:
	ldr	x1, [x1, _activefds@GOTPAGEOFF]
	mov	x0, x19
	bl	_FD_CLR
Lloh5:
	adrp	x22, _maxactivefd@GOTPAGE
Lloh6:
	ldr	x22, [x22, _maxactivefd@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #0
	ccmp	w8, w19, #0, ne
	b.ne	LBB0_9
; %bb.4:
Lloh7:
	adrp	x21, _activefds@GOTPAGE
Lloh8:
	ldr	x21, [x21, _activefds@GOTPAGEOFF]
	mov	x20, x19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	subs	w20, w20, #1
	b.lt	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_FD_ISSET
	cbz	x0, LBB0_5
; %bb.7:
	str	w20, [x22]
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x1, _activefds@GOTPAGE
Lloh10:
	ldr	x1, [x1, _activefds@GOTPAGEOFF]
	mov	x0, x19
	bl	_FD_SET
Lloh11:
	adrp	x20, _maxactivefd@GOTPAGE
Lloh12:
	ldr	x20, [x20, _maxactivefd@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_max
	str	w0, [x20]
LBB0_9:
	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
LBB0_10:
	ldr	w20, [x22]
LBB0_11:
	cmp	w20, w19
	cset	w0, ne
	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	_INSIST
LBB0_12:
Lloh13:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_msyslog
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_FD_SETSIZE,4,2                 ; @FD_SETSIZE
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many sockets in use, FD_SETSIZE %d exceeded by fd %d"

	.comm	_activefds,4,2                  ; @activefds
	.comm	_maxactivefd,4,2                ; @maxactivefd
.subsections_via_symbols
