	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apm_get_event
_apm_get_event:                         ## @apm_get_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_APM_FUNC_GET_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -40(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_apm_bios_call
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	-48(%rbp), %eax
	jmp	LBB0_5
LBB0_2:
	movq	-32(%rbp), %rax
	movq	%rax, (%rbx)
	movq	_apm_info@GOTPCREL(%rip), %rax
	cmpl	$258, (%rax)                    ## imm = 0x102
	movq	$-1, %rax
	jl	LBB0_4
## %bb.3:
	movq	-40(%rbp), %rax
LBB0_4:
	movq	%rax, (%r14)
	movq	_APM_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APM_FUNC_GET_EVENT,4,2         ## @APM_FUNC_GET_EVENT
	.comm	_apm_info,4,2                   ## @apm_info
	.comm	_APM_SUCCESS,4,2                ## @APM_SUCCESS
	.no_dead_strip	_apm_get_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apm_get_event
_apm_get_event:                         ; @apm_get_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _APM_FUNC_GET_EVENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APM_FUNC_GET_EVENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	stp	xzr, xzr, [sp, #8]
	mov	x0, sp
	bl	_apm_bios_call
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [sp]
	b	LBB0_3
LBB0_2:
	ldp	x9, x8, [sp, #8]
	str	x8, [x20]
Lloh3:
	adrp	x8, _apm_info@GOTPAGE
Lloh4:
	ldr	x8, [x8, _apm_info@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #258
	csinv	x8, x9, xzr, ge
	str	x8, [x19]
Lloh6:
	adrp	x8, _APM_SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APM_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_APM_FUNC_GET_EVENT,4,2         ; @APM_FUNC_GET_EVENT
	.comm	_apm_info,4,2                   ; @apm_info
	.comm	_APM_SUCCESS,4,2                ; @APM_SUCCESS
	.no_dead_strip	_apm_get_event
.subsections_via_symbols
