	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gemini_poweroff
_gemini_poweroff:                       ## @gemini_poweroff
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_gpw_poweroff@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_crit
	movq	_GEMINI_PWC_CTRLREG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_GEMINI_CTRL_ENABLE@GOTPCREL(%rip), %r12
	movq	_GEMINI_CTRL_IRQ_CLR@GOTPCREL(%rip), %rax
	orl	(%r12), %ebx
	orl	(%rax), %ebx
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movl	(%r12), %edi
	notl	%edi
	andl	%ebx, %edi
	movq	_GEMINI_CTRL_SHUTDOWN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_gpw_poweroff,8,3               ## @gpw_poweroff
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Gemini power off\n"

	.comm	_GEMINI_PWC_CTRLREG,8,3         ## @GEMINI_PWC_CTRLREG
	.comm	_GEMINI_CTRL_ENABLE,4,2         ## @GEMINI_CTRL_ENABLE
	.comm	_GEMINI_CTRL_IRQ_CLR,4,2        ## @GEMINI_CTRL_IRQ_CLR
	.comm	_GEMINI_CTRL_SHUTDOWN,4,2       ## @GEMINI_CTRL_SHUTDOWN
	.no_dead_strip	_gemini_poweroff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gemini_poweroff
_gemini_poweroff:                       ; @gemini_poweroff
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _gpw_poweroff@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpw_poweroff@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	ldr	w0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_crit
	ldr	x8, [x20]
Lloh5:
	adrp	x21, _GEMINI_PWC_CTRLREG@GOTPAGE
Lloh6:
	ldr	x21, [x21, _GEMINI_PWC_CTRLREG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh7:
	adrp	x22, _GEMINI_CTRL_ENABLE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _GEMINI_CTRL_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh9:
	adrp	x9, _GEMINI_CTRL_IRQ_CLR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GEMINI_CTRL_IRQ_CLR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w19, w8, w9
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	bl	_writel
	ldr	w8, [x22]
	bic	w8, w19, w8
Lloh12:
	adrp	x9, _GEMINI_CTRL_SHUTDOWN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GEMINI_CTRL_SHUTDOWN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_gpw_poweroff,8,3               ; @gpw_poweroff
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Gemini power off\n"

	.comm	_GEMINI_PWC_CTRLREG,8,3         ; @GEMINI_PWC_CTRLREG
	.comm	_GEMINI_CTRL_ENABLE,4,2         ; @GEMINI_CTRL_ENABLE
	.comm	_GEMINI_CTRL_IRQ_CLR,4,2        ; @GEMINI_CTRL_IRQ_CLR
	.comm	_GEMINI_CTRL_SHUTDOWN,4,2       ; @GEMINI_CTRL_SHUTDOWN
	.no_dead_strip	_gemini_poweroff
.subsections_via_symbols
