	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_db8500_prcmu_config_hotmon     ## -- Begin function db8500_prcmu_config_hotmon
	.p2align	4, 0x90
_db8500_prcmu_config_hotmon:            ## @db8500_prcmu_config_hotmon
	.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
	movl	%esi, %r15d
	movl	%edi, %r12d
	movq	_mb4_transfer@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	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
	movl	$4, %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	_tcdm_base@GOTPCREL(%rip), %rbx
	movq	_PRCM_REQ_MB4_HOTMON_LOW@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r12d, %edi
	callq	_writeb
	movq	_PRCM_REQ_MB4_HOTMON_HIGH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writeb
	movq	_HOTMON_CONFIG_LOW@GOTPCREL(%rip), %rax
	movq	_HOTMON_CONFIG_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_PRCM_REQ_MB4_HOTMON_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writeb
	movq	_MB4H_HOTMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PRCM_MBOX_HEADER_REQ_MB4@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writeb
	movl	$4, %edi
	callq	_MBOX_BIT
	movq	_PRCM_MBOX_CPU_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_writel
	leaq	4(%r14), %rdi
	callq	_wait_for_completion
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mb4_transfer,8,2               ## @mb4_transfer
	.comm	_PRCM_MBOX_CPU_VAL,4,2          ## @PRCM_MBOX_CPU_VAL
	.comm	_tcdm_base,8,3                  ## @tcdm_base
	.comm	_PRCM_REQ_MB4_HOTMON_LOW,8,3    ## @PRCM_REQ_MB4_HOTMON_LOW
	.comm	_PRCM_REQ_MB4_HOTMON_HIGH,8,3   ## @PRCM_REQ_MB4_HOTMON_HIGH
	.comm	_HOTMON_CONFIG_LOW,4,2          ## @HOTMON_CONFIG_LOW
	.comm	_HOTMON_CONFIG_HIGH,4,2         ## @HOTMON_CONFIG_HIGH
	.comm	_PRCM_REQ_MB4_HOTMON_CONFIG,8,3 ## @PRCM_REQ_MB4_HOTMON_CONFIG
	.comm	_MB4H_HOTMON,4,2                ## @MB4H_HOTMON
	.comm	_PRCM_MBOX_HEADER_REQ_MB4,8,3   ## @PRCM_MBOX_HEADER_REQ_MB4
	.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_config_hotmon     ; -- Begin function db8500_prcmu_config_hotmon
	.p2align	2
_db8500_prcmu_config_hotmon:            ; @db8500_prcmu_config_hotmon
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x19, _mb4_transfer@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mb4_transfer@GOTPAGEOFF]
	mov	x0, x19
	bl	_mutex_lock
Lloh2:
	adrp	x23, _PRCM_MBOX_CPU_VAL@GOTPAGE
Lloh3:
	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, #4
	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:
Lloh4:
	adrp	x22, _tcdm_base@GOTPAGE
Lloh5:
	ldr	x22, [x22, _tcdm_base@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _PRCM_REQ_MB4_HOTMON_LOW@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PRCM_REQ_MB4_HOTMON_LOW@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writeb
	ldr	x8, [x22]
Lloh9:
	adrp	x9, _PRCM_REQ_MB4_HOTMON_HIGH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PRCM_REQ_MB4_HOTMON_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writeb
Lloh12:
	adrp	x8, _HOTMON_CONFIG_LOW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HOTMON_CONFIG_LOW@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _HOTMON_CONFIG_HIGH@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HOTMON_CONFIG_HIGH@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x22]
Lloh18:
	adrp	x9, _PRCM_REQ_MB4_HOTMON_CONFIG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PRCM_REQ_MB4_HOTMON_CONFIG@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
Lloh21:
	adrp	x8, _MB4H_HOTMON@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MB4H_HOTMON@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x8, [x22]
Lloh24:
	adrp	x9, _PRCM_MBOX_HEADER_REQ_MB4@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PRCM_MBOX_HEADER_REQ_MB4@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
	mov	w0, #4
	bl	_MBOX_BIT
Lloh27:
	adrp	x8, _PRCM_MBOX_CPU_SET@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PRCM_MBOX_CPU_SET@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_writel
	add	x0, x19, #4
	bl	_wait_for_completion
	mov	x0, x19
	bl	_mutex_unlock
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_mb4_transfer,8,2               ; @mb4_transfer
	.comm	_PRCM_MBOX_CPU_VAL,4,2          ; @PRCM_MBOX_CPU_VAL
	.comm	_tcdm_base,8,3                  ; @tcdm_base
	.comm	_PRCM_REQ_MB4_HOTMON_LOW,8,3    ; @PRCM_REQ_MB4_HOTMON_LOW
	.comm	_PRCM_REQ_MB4_HOTMON_HIGH,8,3   ; @PRCM_REQ_MB4_HOTMON_HIGH
	.comm	_HOTMON_CONFIG_LOW,4,2          ; @HOTMON_CONFIG_LOW
	.comm	_HOTMON_CONFIG_HIGH,4,2         ; @HOTMON_CONFIG_HIGH
	.comm	_PRCM_REQ_MB4_HOTMON_CONFIG,8,3 ; @PRCM_REQ_MB4_HOTMON_CONFIG
	.comm	_MB4H_HOTMON,4,2                ; @MB4H_HOTMON
	.comm	_PRCM_MBOX_HEADER_REQ_MB4,8,3   ; @PRCM_MBOX_HEADER_REQ_MB4
	.comm	_PRCM_MBOX_CPU_SET,4,2          ; @PRCM_MBOX_CPU_SET
.subsections_via_symbols
