	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prcmu_configure_auto_pm        ## -- Begin function prcmu_configure_auto_pm
	.p2align	4, 0x90
_prcmu_configure_auto_pm:               ## @prcmu_configure_auto_pm
	.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	%rsi, %r14
	movq	%rdi, %r12
	testq	%rdi, %rdi
	sete	%al
	testq	%rsi, %rsi
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_BUG_ON
	movl	(%r12), %eax
	movl	4(%r12), %ecx
	andl	$15, %ecx
	movl	8(%r12), %edx
	shll	$20, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	shll	$8, %edx
	movzwl	%dx, %eax
	orl	%ecx, %eax
	movzbl	12(%r12), %ecx
	orl	%eax, %ecx
	movl	16(%r12), %eax
	shll	$8, %ecx
	shll	$4, %eax
	movzbl	%al, %eax
	orl	%ecx, %eax
	movl	20(%r12), %r13d
	andl	$15, %r13d
	orl	%eax, %r13d
	movl	(%r14), %eax
	movl	4(%r14), %ecx
	andl	$15, %ecx
	movl	8(%r14), %edx
	shll	$20, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	shll	$8, %edx
	movzwl	%dx, %eax
	orl	%ecx, %eax
	movzbl	12(%r14), %ecx
	orl	%eax, %ecx
	movl	16(%r14), %eax
	shll	$8, %ecx
	shll	$4, %eax
	movzbl	%al, %eax
	orl	%ecx, %eax
	movl	20(%r14), %ebx
	andl	$15, %ebx
	orl	%eax, %ebx
	movq	_mb2_transfer@GOTPCREL(%rip), %rax
	leaq	4(%rax), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_tcdm_base@GOTPCREL(%rip), %r15
	movq	_PRCM_REQ_MB2_AUTO_PM_SLEEP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r13d, %edi
	callq	_writel
	movq	_PRCM_REQ_MB2_AUTO_PM_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_PRCMU_AUTO_PM_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %eax
	cmpl	%ecx, (%r12)
	je	LBB0_4
## %bb.1:
	cmpl	%ecx, 4(%r12)
	je	LBB0_4
## %bb.2:
	cmpl	%ecx, (%r14)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	cmpl	%ecx, 4(%r14)
	sete	%al
LBB0_4:
	movq	_mb2_transfer@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mb2_transfer,8,2               ## @mb2_transfer
	.comm	_tcdm_base,8,3                  ## @tcdm_base
	.comm	_PRCM_REQ_MB2_AUTO_PM_SLEEP,8,3 ## @PRCM_REQ_MB2_AUTO_PM_SLEEP
	.comm	_PRCM_REQ_MB2_AUTO_PM_IDLE,8,3  ## @PRCM_REQ_MB2_AUTO_PM_IDLE
	.comm	_PRCMU_AUTO_PM_ON,4,2           ## @PRCMU_AUTO_PM_ON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prcmu_configure_auto_pm        ; -- Begin function prcmu_configure_auto_pm
	.p2align	2
_prcmu_configure_auto_pm:               ; @prcmu_configure_auto_pm
	.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	x19, x1
	mov	x20, x0
	cmp	x0, #0
	ccmp	x1, #0, #4, ne
	cset	w0, eq
	bl	_BUG_ON
	ldp	w8, w9, [x20]
	and	w9, w9, #0xf
	ldr	w10, [x20, #8]
	lsl	w9, w9, #16
	bfi	w9, w8, #20, #12
	bfi	w9, w10, #8, #8
	ldrb	w8, [x20, #12]
	orr	w8, w9, w8
	ldp	w9, w10, [x20, #16]
	ubfiz	w22, w9, #4, #4
	bfi	w22, w8, #8, #24
	bfxil	w22, w10, #0, #4
	ldp	w8, w9, [x19]
	and	w9, w9, #0xf
	ldr	w10, [x19, #8]
	lsl	w9, w9, #16
	bfi	w9, w8, #20, #12
	bfi	w9, w10, #8, #8
	ldrb	w8, [x19, #12]
	orr	w8, w9, w8
	ldp	w9, w10, [x19, #16]
	ubfiz	w23, w9, #4, #4
	bfi	w23, w8, #8, #24
	bfxil	w23, w10, #0, #4
Lloh0:
	adrp	x21, _mb2_transfer@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mb2_transfer@GOTPAGEOFF]
	add	x0, x21, #4
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x24, _tcdm_base@GOTPAGE
Lloh3:
	ldr	x24, [x24, _tcdm_base@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh4:
	adrp	x9, _PRCM_REQ_MB2_AUTO_PM_SLEEP@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PRCM_REQ_MB2_AUTO_PM_SLEEP@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x24]
Lloh7:
	adrp	x9, _PRCM_REQ_MB2_AUTO_PM_IDLE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PRCM_REQ_MB2_AUTO_PM_IDLE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writel
	ldr	w9, [x20]
Lloh10:
	adrp	x8, _PRCMU_AUTO_PM_ON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PRCMU_AUTO_PM_ON@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w9, [x20, #4]
	cmp	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w9, [x19]
	cmp	w9, w8
	b.ne	LBB0_5
LBB0_3:
	mov	w8, #1
LBB0_4:
	str	w8, [x21], #4
	mov	x0, x21
	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
	b	_spin_unlock_irqrestore
LBB0_5:
	ldr	w9, [x19, #4]
	cmp	w9, w8
	cset	w8, eq
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_mb2_transfer,8,2               ; @mb2_transfer
	.comm	_tcdm_base,8,3                  ; @tcdm_base
	.comm	_PRCM_REQ_MB2_AUTO_PM_SLEEP,8,3 ; @PRCM_REQ_MB2_AUTO_PM_SLEEP
	.comm	_PRCM_REQ_MB2_AUTO_PM_IDLE,8,3  ; @PRCM_REQ_MB2_AUTO_PM_IDLE
	.comm	_PRCMU_AUTO_PM_ON,4,2           ; @PRCMU_AUTO_PM_ON
.subsections_via_symbols
