	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpoll_to_select
_rpoll_to_select:                       ## @rpoll_to_select
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r15d
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	jge	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_fd_getd
	movslq	%r12d, %r13
	cmpl	(%r14,%r13,8), %eax
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14,%r13,8)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	incl	%ebx
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14,%r13,8)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	incl	%ebx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	testl	%eax, 4(%r14,%r13,8)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_FD_SET
	incl	%ebx
	jmp	LBB0_13
LBB0_1:
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %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	_rpoll_to_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpoll_to_select
_rpoll_to_select:                       ; @rpoll_to_select
	.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
	cmp	w1, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	mov	w23, #0
	mov	w26, #0
	mov	w25, #0
Lloh0:
	adrp	x28, _POLLOUT@GOTPAGE
Lloh1:
	ldr	x28, [x28, _POLLOUT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, #1
	cmp	w26, w22
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_fd_getd
	sbfiz	x8, x26, #3, #32
	ldr	w8, [x24, x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x27, w26
	cbz	x21, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x24, x27, lsl #3
	ldr	w8, [x8, #4]
Lloh2:
	adrp	x9, _POLLIN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _POLLIN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	mov	x1, x21
	bl	_FD_SET
	add	w23, w23, #1
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	x20, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x24, x27, lsl #3
	ldr	w8, [x8, #4]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	mov	x1, x20
	bl	_FD_SET
	add	w23, w23, #1
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x19, LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x24, x27, lsl #3
	ldr	w8, [x8, #4]
Lloh5:
	adrp	x9, _POLLIN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _POLLIN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ldr	w10, [x28]
	orr	w9, w10, w9
	bics	wzr, w8, w9
	b.eq	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	mov	x1, x19
	bl	_FD_SET
	add	w23, w23, #1
	b	LBB0_2
LBB0_14:
	mov	w23, #0
LBB0_15:
	mov	x0, x23
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.no_dead_strip	_rpoll_to_select
.subsections_via_symbols
