	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waitrfd
_waitrfd:                               ## @waitrfd
	.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	%rsi, %r12
	movl	%edi, %ebx
	leaq	-48(%rbp), %rdi
	callq	_monotime_tv
	movl	%ebx, -56(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %r15
	movq	_errno@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	testl	%edx, %edx
	js	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_poll
	movl	%eax, %ebx
	movl	(%r13), %r14d
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_ms_subtract_diff
	movl	%r14d, (%r13)
	testl	%ebx, %ebx
	jg	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %ebx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_6
	jmp	LBB0_8
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
LBB0_8:
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_3:
	xorl	%eax, %eax
LBB0_9:
	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	_errno,4,2                      ## @errno
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_waitrfd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waitrfd
_waitrfd:                               ; @waitrfd
	.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, x1
	mov	x20, x0
	mov	x0, sp
	bl	_monotime_tv
Lloh0:
	adrp	x8, _POLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w20, w8, [sp, #8]
Lloh3:
	adrp	x21, _errno@GOTPAGE
Lloh4:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
Lloh5:
	adrp	x22, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EAGAIN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19]
	tbnz	w2, #31, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x0, sp, #8
	mov	w1, #1
	bl	_poll
	mov	x20, x0
	ldr	w23, [x21]
	mov	x0, sp
	mov	x1, x19
	bl	_ms_subtract_diff
	str	w23, [x21]
	cmp	w20, #0
	b.gt	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x22]
	cmn	w20, #1
	ccmp	w23, w8, #4, eq
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	cbnz	w20, LBB0_1
LBB0_5:
Lloh7:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_6:
	mov	w0, #-1
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_errno,4,2                      ; @errno
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_waitrfd
.subsections_via_symbols
