	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm1_control_handler
_pm1_control_handler:                   ## @pm1_control_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$-1, %ebx
	cmpl	$2, %r8d
	jne	LBB0_6
## %bb.1:
	movq	_pm1_control@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%edx, %edx
	je	LBB0_3
## %bb.2:
	movl	%ecx, (%r9)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_PM1_SCI_EN@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movq	_PM1_SLP_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_PM1_ALWAYS_ZERO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%esi, %edx
	notl	%edx
	andl	(%r9), %edx
	orl	%ecx, %edx
	movl	%edx, (%rax)
	xorl	%ebx, %ebx
	testl	%esi, (%r9)
	je	LBB0_6
## %bb.4:
	movq	_PM1_SLP_TYP@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	andl	$-1024, %edx                    ## imm = 0xFC00
	cmpl	$5120, %edx                     ## imm = 0x1400
	jne	LBB0_6
## %bb.5:
	movq	_VM_SUSPEND_POWEROFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vm_suspend
	testl	%eax, %eax
	sete	%al
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_EALREADY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_pm1_control,4,2                ## @pm1_control
	.comm	_PM1_SCI_EN,4,2                 ## @PM1_SCI_EN
	.comm	_PM1_SLP_EN,4,2                 ## @PM1_SLP_EN
	.comm	_PM1_ALWAYS_ZERO,4,2            ## @PM1_ALWAYS_ZERO
	.comm	_PM1_SLP_TYP,4,2                ## @PM1_SLP_TYP
	.comm	_VM_SUSPEND_POWEROFF,4,2        ## @VM_SUSPEND_POWEROFF
	.comm	_errno,8,3                      ## @errno
	.comm	_EALREADY,8,3                   ## @EALREADY
	.no_dead_strip	_pm1_control_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm1_control_handler
_pm1_control_handler:                   ; @pm1_control_handler
	.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
	cmp	w4, #2
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _pm1_control@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pm1_control@GOTPAGEOFF]
	ldr	w9, [x8]
	cbz	w2, LBB0_4
; %bb.2:
	mov	w0, #0
	str	w9, [x5]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh2:
	adrp	x10, _PM1_SCI_EN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PM1_SCI_EN@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	and	w9, w10, w9
	ldr	w10, [x5]
Lloh5:
	adrp	x11, _PM1_SLP_EN@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PM1_SLP_EN@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
Lloh8:
	adrp	x12, _PM1_ALWAYS_ZERO@GOTPAGE
Lloh9:
	ldr	x12, [x12, _PM1_ALWAYS_ZERO@GOTPAGEOFF]
Lloh10:
	ldr	w12, [x12]
	orr	w12, w12, w11
	bic	w10, w10, w12
	orr	w9, w10, w9
	str	w9, [x8]
	ldr	w8, [x5]
	tst	w8, w11
	b.eq	LBB0_7
; %bb.5:
Lloh11:
	adrp	x8, _PM1_SLP_TYP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PM1_SLP_TYP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w9, w8
	lsr	w8, w8, #10
	cmp	w8, #5
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _VM_SUSPEND_POWEROFF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VM_SUSPEND_POWEROFF@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_vm_suspend
	cmp	w0, #0
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _EALREADY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EALREADY@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_pm1_control,4,2                ; @pm1_control
	.comm	_PM1_SCI_EN,4,2                 ; @PM1_SCI_EN
	.comm	_PM1_SLP_EN,4,2                 ; @PM1_SLP_EN
	.comm	_PM1_ALWAYS_ZERO,4,2            ; @PM1_ALWAYS_ZERO
	.comm	_PM1_SLP_TYP,4,2                ; @PM1_SLP_TYP
	.comm	_VM_SUSPEND_POWEROFF,4,2        ; @VM_SUSPEND_POWEROFF
	.comm	_errno,8,3                      ; @errno
	.comm	_EALREADY,8,3                   ; @EALREADY
	.no_dead_strip	_pm1_control_handler
.subsections_via_symbols
