	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apm_haltcpu
_apm_haltcpu:                           ## @apm_haltcpu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	_APMIO_HALTCPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_3:
	movq	_APMIO_NOTHALTCPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_4
LBB0_6:
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movl	$1, %edi
	popq	%rbp
	jmp	_err                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_APMIO_HALTCPU,4,2              ## @APMIO_HALTCPU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioctl(APMIO_HALTCPU)"

	.comm	_APMIO_NOTHALTCPU,4,2           ## @APMIO_NOTHALTCPU
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(APMIO_NOTHALTCPU)"

	.no_dead_strip	_apm_haltcpu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apm_haltcpu
_apm_haltcpu:                           ; @apm_haltcpu
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cbz	w1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _APMIO_HALTCPU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APMIO_HALTCPU@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _APMIO_NOTHALTCPU@GOTPAGE
Lloh6:
	ldr	x8, [x8, _APMIO_NOTHALTCPU@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_APMIO_HALTCPU,4,2              ; @APMIO_HALTCPU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl(APMIO_HALTCPU)"

	.comm	_APMIO_NOTHALTCPU,4,2           ; @APMIO_NOTHALTCPU
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(APMIO_NOTHALTCPU)"

	.no_dead_strip	_apm_haltcpu
.subsections_via_symbols
