	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phantom_poll
_phantom_poll:                          ## @phantom_poll
	.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
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rdi), %rbx
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_atomic_read
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	8(%rbx), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_poll_wait
	movq	_PHB_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EPOLLIN@GOTPCREL(%rip), %rax
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	jmp	LBB0_4
LBB0_1:
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_4:
	movq	%r14, %rdi
	callq	_atomic_read
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_pr_debug
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phantom_poll: %d\n"

	.comm	_PHB_RUNNING,4,2                ## @PHB_RUNNING
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
L_.str.1:                               ## @.str.1
	.asciz	"phantom_poll end: %x/%d\n"

	.no_dead_strip	_phantom_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phantom_poll
_phantom_poll:                          ; @phantom_poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	add	x19, x22, #4
	mov	x0, x19
	bl	_atomic_read
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pr_debug
	add	x1, x22, #8
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _PHB_RUNNING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PHB_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_atomic_read
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _EPOLLRDNORM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EPOLLRDNORM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w20, w9, w8
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _EPOLLERR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EPOLLERR@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_atomic_read
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phantom_poll: %d\n"

	.comm	_PHB_RUNNING,4,2                ; @PHB_RUNNING
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
l_.str.1:                               ; @.str.1
	.asciz	"phantom_poll end: %x/%d\n"

	.no_dead_strip	_phantom_poll
.subsections_via_symbols
