	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_to_rpoll
_select_to_rpoll:                       ## @select_to_rpoll
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rsi)
	jle	LBB0_1
## %bb.2:
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	callq	_fd_getd
	movslq	%r15d, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 4(%rdx,%rcx,8)
	leal	1(%rcx), %r15d
	movl	%r13d, (%rdx,%rcx,8)
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r14d
	jge	LBB0_14
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, %r13d
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_FD_ISSET
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	testq	%r12, %r12
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r13d, %r13d
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	callq	_FD_ISSET
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_1:
	xorl	%r15d, %r15d
LBB0_14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.no_dead_strip	_select_to_rpoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_to_rpoll
_select_to_rpoll:                       ; @select_to_rpoll
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x0
	mov	w25, #0
	mov	w24, #0
Lloh0:
	adrp	x26, _POLLOUT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _POLLOUT@GOTPAGEOFF]
Lloh2:
	adrp	x27, _POLLIN@GOTPAGE
Lloh3:
	ldr	x27, [x27, _POLLIN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_fd_getd
	add	x8, x23, w25, sxtw #3
	add	w25, w25, #1
	stp	w28, w0, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w24, w24, #1
	ldr	w8, [x19]
	cmp	w24, w8
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x22, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x22
	bl	_FD_ISSET
	ldr	w8, [x27]
	cmp	x0, #0
	csel	w28, wzr, w8, eq
	cbnz	x21, LBB0_7
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
	cbz	x21, LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x21
	bl	_FD_ISSET
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	orr	w28, w8, w28
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w28, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	cbz	x20, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x20
	bl	_FD_ISSET
	cbnz	x0, LBB0_2
	b	LBB0_3
LBB0_12:
	mov	w25, #0
LBB0_13:
	str	w25, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.no_dead_strip	_select_to_rpoll
.subsections_via_symbols
