	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apmpoll
_apmpoll:                               ## @apmpoll
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	leaq	-40(%rbp), %rdi
	callq	_devfs_get_cdevpriv
	movq	_acpi@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_ACPI_LOCK
	movq	-40(%rbp), %rsi
	movq	8(%rsi), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	andl	%r15d, %ebx
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	callq	_selrecord
	xorl	%ebx, %ebx
LBB0_3:
	movl	(%r12), %edi
	callq	_ACPI_UNLOCK
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_acpi,4,2                       ## @acpi
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.no_dead_strip	_apmpoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apmpoll
_apmpoll:                               ; @apmpoll
	.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, x2
	mov	x19, x1
	add	x0, sp, #8
	bl	_devfs_get_cdevpriv
Lloh0:
	adrp	x21, _acpi@GOTPAGE
Lloh1:
	ldr	x21, [x21, _acpi@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ACPI_LOCK
	ldr	x1, [sp, #8]
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _POLLIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w19, w8, w19
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_selrecord
	mov	w19, #0
LBB0_3:
	ldr	w0, [x21]
	bl	_ACPI_UNLOCK
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_acpi,4,2                       ; @acpi
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.no_dead_strip	_apmpoll
.subsections_via_symbols
