	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sanitize_fdset
_sanitize_fdset:                        ## @sanitize_fdset
	.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	%edi, %ebx
	movq	_EINTR@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_maxactivefd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	1(%rdi), %r15d
	movq	_activefds@GOTPCREL(%rip), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_fdbits
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_msyslog
LBB0_2:
	movq	_EBADF@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_maxactivefd@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	js	LBB0_5
## %bb.6:
	movl	$-1, %ebx
	movq	_activefds@GOTPCREL(%rip), %r14
	leaq	-44(%rbp), %r15
	xorl	%ecx, %ecx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %ecx
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jge	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %r12d
	incl	%ebx
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_read
	movl	%ebx, %ecx
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_msyslog
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_FD_CLR
	jmp	LBB0_10
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	cmpl	%ecx, %eax
	jne	LBB0_13
	jmp	LBB0_14
LBB0_5:
	xorl	%ecx, %ecx
LBB0_13:
	movl	%ecx, (%r13)
LBB0_14:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"select(%d, %s, 0L, 0L, &0.0) error: %m"

	.comm	_maxactivefd,4,2                ## @maxactivefd
	.comm	_activefds,4,2                  ## @activefds
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"Removing bad file descriptor %d from select set"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_sanitize_fdset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sanitize_fdset
_sanitize_fdset:                        ; @sanitize_fdset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
Lloh0:
	adrp	x8, _EINTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _maxactivefd@GOTPAGE
Lloh7:
	ldr	x8, [x8, _maxactivefd@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	w21, w0, #1
Lloh9:
	adrp	x1, _activefds@GOTPAGE
Lloh10:
	ldr	x1, [x1, _activefds@GOTPAGEOFF]
	bl	_fdbits
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_msyslog
LBB0_2:
Lloh13:
	adrp	x8, _EBADF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_10
; %bb.3:
Lloh16:
	adrp	x22, _maxactivefd@GOTPAGE
Lloh17:
	ldr	x22, [x22, _maxactivefd@GOTPAGEOFF]
	ldr	w8, [x22]
	tbnz	w8, #31, LBB0_12
; %bb.4:
	mov	w23, #0
	mov	w19, #-1
Lloh18:
	adrp	x20, _activefds@GOTPAGE
Lloh19:
	ldr	x20, [x20, _activefds@GOTPAGEOFF]
Lloh20:
	adrp	x24, _LOG_ERR@GOTPAGE
Lloh21:
	ldr	x24, [x24, _LOG_ERR@GOTPAGEOFF]
Lloh22:
	adrp	x21, l_.str.1@PAGE
Lloh23:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x19
	bl	_msyslog
	mov	x0, x19
	mov	x1, x20
	bl	_FD_CLR
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x22]
	cmp	w19, w8
	b.ge	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	mov	x0, x19
	mov	x1, x20
	bl	_FD_ISSET
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #0
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, x19
	b	LBB0_6
LBB0_10:
Lloh24:
	adrp	x8, _FALSE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
	cmp	w8, w23
	b.ne	LBB0_13
	b	LBB0_14
LBB0_12:
	mov	w23, #0
LBB0_13:
	str	w23, [x22]
LBB0_14:
Lloh26:
	adrp	x8, _TRUE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"select(%d, %s, 0L, 0L, &0.0) error: %m"

	.comm	_maxactivefd,4,2                ; @maxactivefd
	.comm	_activefds,4,2                  ; @activefds
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"Removing bad file descriptor %d from select set"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_sanitize_fdset
.subsections_via_symbols
