	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_poll
_do_poll:                               ## @do_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_check_apm_user
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_apm_waitqueue@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_poll_wait
	movq	%r12, %rdi
	callq	_queue_empty
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"poll"

	.comm	_apm_waitqueue,4,2              ## @apm_waitqueue
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.no_dead_strip	_do_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_poll
_do_poll:                               ; @do_poll
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_check_apm_user
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, _apm_waitqueue@GOTPAGE
Lloh3:
	ldr	x1, [x1, _apm_waitqueue@GOTPAGEOFF]
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
	mov	x0, x19
	bl	_queue_empty
	cbz	w0, LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh4:
	adrp	x8, _POLLIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w0, w9, w8
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"poll"

	.comm	_apm_waitqueue,4,2              ; @apm_waitqueue
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.no_dead_strip	_do_poll
.subsections_via_symbols
