	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apm_get_power_status
_apm_get_power_status:                  ## @apm_get_power_status
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_APM_FUNC_GET_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_APM_DEVICE_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	$0, -52(%rbp)
	movq	_apm_info@GOTPCREL(%rip), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_APM_32_UNSUPPORTED@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	-56(%rbp), %rdi
	callq	_apm_bios_call
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	-48(%rbp), %rax
	jmp	LBB0_7
LBB0_4:
	movl	-56(%rbp), %eax
	movl	%eax, (%r12)
	movl	-52(%rbp), %eax
	movl	%eax, (%r15)
	cmpq	$0, (%rbx)
	movl	-44(%rbp), %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %edi
	callq	_swab16
	orl	$32768, %eax                    ## imm = 0x8000
LBB0_6:
	movl	%eax, (%r14)
	movq	_APM_SUCCESS@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APM_FUNC_GET_STATUS,4,2        ## @APM_FUNC_GET_STATUS
	.comm	_APM_DEVICE_ALL,4,2             ## @APM_DEVICE_ALL
	.comm	_apm_info,16,3                  ## @apm_info
	.comm	_APM_32_UNSUPPORTED,4,2         ## @APM_32_UNSUPPORTED
	.comm	_APM_SUCCESS,4,2                ## @APM_SUCCESS
	.no_dead_strip	_apm_get_power_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apm_get_power_status
_apm_get_power_status:                  ; @apm_get_power_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _APM_FUNC_GET_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APM_FUNC_GET_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
Lloh3:
	adrp	x8, _APM_DEVICE_ALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _APM_DEVICE_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w8, wzr, [sp, #8]
Lloh6:
	adrp	x22, _apm_info@GOTPAGE
Lloh7:
	ldr	x22, [x22, _apm_info@GOTPAGEOFF]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _APM_32_UNSUPPORTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _APM_32_UNSUPPORTED@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x23, sp, #8
	add	x0, sp, #8
	bl	_apm_bios_call
	cbz	x0, LBB0_4
; %bb.3:
	add	x8, x23, #8
	b	LBB0_7
LBB0_4:
	ldp	w8, w9, [sp, #8]
	str	w8, [x21]
	str	w9, [x20]
	ldr	x8, [x22]
	ldr	w0, [sp, #20]
	cbz	x8, LBB0_6
; %bb.5:
	bl	_swab16
	orr	w0, w0, #0x8000
LBB0_6:
	str	w0, [x19]
Lloh10:
	adrp	x8, _APM_SUCCESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _APM_SUCCESS@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_APM_FUNC_GET_STATUS,4,2        ; @APM_FUNC_GET_STATUS
	.comm	_APM_DEVICE_ALL,4,2             ; @APM_DEVICE_ALL
	.comm	_apm_info,16,3                  ; @apm_info
	.comm	_APM_32_UNSUPPORTED,4,2         ; @APM_32_UNSUPPORTED
	.comm	_APM_SUCCESS,4,2                ; @APM_SUCCESS
	.no_dead_strip	_apm_get_power_status
.subsections_via_symbols
