	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_db8500_prcmu_set_power_state   ## -- Begin function db8500_prcmu_set_power_state
	.p2align	4, 0x90
_db8500_prcmu_set_power_state:          ## @db8500_prcmu_set_power_state
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_PRCMU_AP_SLEEP@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	setg	%al
	movq	_PRCMU_AP_DEEP_IDLE@GOTPCREL(%rip), %rcx
	cmpq	%rdi, (%rcx)
	movl	%edx, %r15d
	movl	%esi, %r14d
	setl	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_BUG_ON
	movq	_mb0_transfer@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_PRCM_MBOX_CPU_VAL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_readl
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_MBOX_BIT
	testl	%ebx, %eax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	jmp	LBB0_2
LBB0_3:
	movq	_MB0H_POWER_STATE_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_tcdm_base@GOTPCREL(%rip), %rbx
	movq	_PRCM_MBOX_HEADER_REQ_MB0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writeb
	movq	_PRCM_REQ_MB0_AP_POWER_STATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r12d, %edi
	callq	_writeb
	xorl	%edi, %edi
	testl	%r15d, %r15d
	setne	%dil
	movq	_PRCM_REQ_MB0_AP_PLL_STATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writeb
	xorl	%edi, %edi
	testl	%r14d, %r14d
	setne	%dil
	movq	_PRCM_REQ_MB0_ULP_CLOCK_STATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writeb
	movq	_PRCM_REQ_MB0_DO_NOT_WFI@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writeb
	xorl	%edi, %edi
	callq	_MBOX_BIT
	movq	_PRCM_MBOX_CPU_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_writel
	movq	_mb0_transfer@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRCMU_AP_SLEEP,8,3             ## @PRCMU_AP_SLEEP
	.comm	_PRCMU_AP_DEEP_IDLE,8,3         ## @PRCMU_AP_DEEP_IDLE
	.comm	_mb0_transfer,4,2               ## @mb0_transfer
	.comm	_PRCM_MBOX_CPU_VAL,4,2          ## @PRCM_MBOX_CPU_VAL
	.comm	_MB0H_POWER_STATE_TRANS,4,2     ## @MB0H_POWER_STATE_TRANS
	.comm	_tcdm_base,8,3                  ## @tcdm_base
	.comm	_PRCM_MBOX_HEADER_REQ_MB0,8,3   ## @PRCM_MBOX_HEADER_REQ_MB0
	.comm	_PRCM_REQ_MB0_AP_POWER_STATE,8,3 ## @PRCM_REQ_MB0_AP_POWER_STATE
	.comm	_PRCM_REQ_MB0_AP_PLL_STATE,8,3  ## @PRCM_REQ_MB0_AP_PLL_STATE
	.comm	_PRCM_REQ_MB0_ULP_CLOCK_STATE,8,3 ## @PRCM_REQ_MB0_ULP_CLOCK_STATE
	.comm	_PRCM_REQ_MB0_DO_NOT_WFI,8,3    ## @PRCM_REQ_MB0_DO_NOT_WFI
	.comm	_PRCM_MBOX_CPU_SET,4,2          ## @PRCM_MBOX_CPU_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_db8500_prcmu_set_power_state   ; -- Begin function db8500_prcmu_set_power_state
	.p2align	2
_db8500_prcmu_set_power_state:          ; @db8500_prcmu_set_power_state
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PRCMU_AP_SLEEP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRCMU_AP_SLEEP@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
Lloh3:
	adrp	x8, _PRCMU_AP_DEEP_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRCMU_AP_DEEP_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ccmp	x8, x0, #8, le
	cset	w0, lt
	bl	_BUG_ON
Lloh6:
	adrp	x0, _mb0_transfer@GOTPAGE
Lloh7:
	ldr	x0, [x0, _mb0_transfer@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh8:
	adrp	x23, _PRCM_MBOX_CPU_VAL@GOTPAGE
Lloh9:
	ldr	x23, [x23, _PRCM_MBOX_CPU_VAL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_readl
	mov	x22, x0
	mov	w0, #0
	bl	_MBOX_BIT
	tst	w0, w22
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	b	LBB0_1
LBB0_3:
Lloh10:
	adrp	x8, _MB0H_POWER_STATE_TRANS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MB0H_POWER_STATE_TRANS@GOTPAGEOFF]
Lloh12:
	adrp	x22, _tcdm_base@GOTPAGE
Lloh13:
	ldr	x22, [x22, _tcdm_base@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x8, [x22]
Lloh15:
	adrp	x9, _PRCM_MBOX_HEADER_REQ_MB0@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PRCM_MBOX_HEADER_REQ_MB0@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
	ldr	x8, [x22]
Lloh18:
	adrp	x9, _PRCM_REQ_MB0_AP_POWER_STATE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PRCM_REQ_MB0_AP_POWER_STATE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writeb
	cmp	w20, #0
	cset	w0, ne
	ldr	x8, [x22]
Lloh21:
	adrp	x9, _PRCM_REQ_MB0_AP_PLL_STATE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PRCM_REQ_MB0_AP_PLL_STATE@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
	cmp	w19, #0
	cset	w0, ne
	ldr	x8, [x22]
Lloh24:
	adrp	x9, _PRCM_REQ_MB0_ULP_CLOCK_STATE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PRCM_REQ_MB0_ULP_CLOCK_STATE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
	ldr	x8, [x22]
Lloh27:
	adrp	x9, _PRCM_REQ_MB0_DO_NOT_WFI@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PRCM_REQ_MB0_DO_NOT_WFI@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writeb
	mov	w0, #0
	bl	_MBOX_BIT
Lloh30:
	adrp	x8, _PRCM_MBOX_CPU_SET@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PRCM_MBOX_CPU_SET@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_writel
Lloh33:
	adrp	x0, _mb0_transfer@GOTPAGE
Lloh34:
	ldr	x0, [x0, _mb0_transfer@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PRCMU_AP_SLEEP,8,3             ; @PRCMU_AP_SLEEP
	.comm	_PRCMU_AP_DEEP_IDLE,8,3         ; @PRCMU_AP_DEEP_IDLE
	.comm	_mb0_transfer,4,2               ; @mb0_transfer
	.comm	_PRCM_MBOX_CPU_VAL,4,2          ; @PRCM_MBOX_CPU_VAL
	.comm	_MB0H_POWER_STATE_TRANS,4,2     ; @MB0H_POWER_STATE_TRANS
	.comm	_tcdm_base,8,3                  ; @tcdm_base
	.comm	_PRCM_MBOX_HEADER_REQ_MB0,8,3   ; @PRCM_MBOX_HEADER_REQ_MB0
	.comm	_PRCM_REQ_MB0_AP_POWER_STATE,8,3 ; @PRCM_REQ_MB0_AP_POWER_STATE
	.comm	_PRCM_REQ_MB0_AP_PLL_STATE,8,3  ; @PRCM_REQ_MB0_AP_PLL_STATE
	.comm	_PRCM_REQ_MB0_ULP_CLOCK_STATE,8,3 ; @PRCM_REQ_MB0_ULP_CLOCK_STATE
	.comm	_PRCM_REQ_MB0_DO_NOT_WFI,8,3    ; @PRCM_REQ_MB0_DO_NOT_WFI
	.comm	_PRCM_MBOX_CPU_SET,4,2          ; @PRCM_MBOX_CPU_SET
.subsections_via_symbols
