	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_icc_set
_qcom_icc_set:                          ## @qcom_icc_set
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SDM845_MAX_BCMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_SDM845_MAX_VCD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	testq	%r12, %r12
	cmovneq	%r12, %rbx
	movl	(%rbx), %edi
	callq	_to_qcom_provider
	movq	%rax, %r15
	leaq	-56(%rbp), %rdi
	callq	_INIT_LIST_HEAD
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	cmpq	$0, 24(%rdi)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_bcm_aggregate
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$16, %rdi
	movq	%r12, %rsi
	callq	_list_add_tail
	movl	(%r15), %eax
	jmp	LBB0_4
LBB0_5:
	movq	_QCOM_ICC_BUCKET_AMC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-56(%rbp), %rdi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_tcs_list_gen
	xorl	%r12d, %r12d
	cmpl	$0, (%r13)
	je	LBB0_22
## %bb.6:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %edi
	callq	_rpmh_invalidate
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_9:
	movl	4(%r15), %edi
	movq	_RPMH_ACTIVE_ONLY_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_rpmh_write_batch
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	movl	%r13d, %esi
	callq	_pr_err
	movl	%r13d, %r12d
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %rdi
	callq	_INIT_LIST_HEAD
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.12:
	xorl	%r14d, %r14d
	movq	_QCOM_ICC_BUCKET_SLEEP@GOTPCREL(%rip), %r13
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	addq	$16, %rdi
	leaq	-56(%rbp), %rsi
	callq	_list_add_tail
	movl	(%r15), %eax
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_17
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%r14,8), %rdi
	movq	(%rdi), %rsi
	movq	_QCOM_ICC_BUCKET_WAKE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rsi,%rcx,8), %rbx
	movq	(%r13), %rdx
	cmpq	(%rsi,%rdx,8), %rbx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%rdi), %rsi
	movq	(%rsi,%rcx,8), %rcx
	cmpq	(%rsi,%rdx,8), %rcx
	jne	LBB0_15
	jmp	LBB0_16
LBB0_17:
	leaq	-56(%rbp), %rdi
	callq	_list_empty
	testq	%rax, %rax
	jne	LBB0_22
## %bb.18:
	movq	_QCOM_ICC_BUCKET_WAKE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-56(%rbp), %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_tcs_list_gen
	movl	4(%r15), %edi
	movq	_RPMH_WAKE_ONLY_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_rpmh_write_batch
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_20:
	movq	_QCOM_ICC_BUCKET_SLEEP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_tcs_list_gen
	movl	4(%r15), %edi
	movq	_RPMH_SLEEP_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_rpmh_write_batch
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movl	%ebx, %r12d
	jmp	LBB0_22
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SDM845_MAX_BCMS,4,2            ## @SDM845_MAX_BCMS
	.comm	_SDM845_MAX_VCD,4,2             ## @SDM845_MAX_VCD
	.comm	_QCOM_ICC_BUCKET_AMC,8,3        ## @QCOM_ICC_BUCKET_AMC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error invalidating RPMH client (%d)\n"

	.comm	_RPMH_ACTIVE_ONLY_STATE,4,2     ## @RPMH_ACTIVE_ONLY_STATE
L_.str.1:                               ## @.str.1
	.asciz	"Error sending AMC RPMH requests (%d)\n"

	.comm	_QCOM_ICC_BUCKET_WAKE,8,3       ## @QCOM_ICC_BUCKET_WAKE
	.comm	_QCOM_ICC_BUCKET_SLEEP,8,3      ## @QCOM_ICC_BUCKET_SLEEP
	.comm	_RPMH_WAKE_ONLY_STATE,4,2       ## @RPMH_WAKE_ONLY_STATE
L_.str.2:                               ## @.str.2
	.asciz	"Error sending WAKE RPMH requests (%d)\n"

	.comm	_RPMH_SLEEP_STATE,4,2           ## @RPMH_SLEEP_STATE
L_.str.3:                               ## @.str.3
	.asciz	"Error sending SLEEP RPMH requests (%d)\n"

	.no_dead_strip	_qcom_icc_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_icc_set
_qcom_icc_set:                          ; @qcom_icc_set
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _SDM845_MAX_BCMS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDM845_MAX_BCMS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x8, _SDM845_MAX_VCD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SDM845_MAX_VCD@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cmp	x0, #0
	csel	x8, x1, x0, eq
	ldr	w0, [x8]
	bl	_to_qcom_provider
	mov	x21, x0
	sub	x0, x29, #64
	bl	_INIT_LIST_HEAD
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	ldr	x0, [x9, x22, lsl #3]
	ldr	x9, [x0, #24]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_bcm_aggregate
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x22, lsl #3]
	add	x0, x8, #16
	sub	x1, x29, #64
	bl	_list_add_tail
	ldr	w8, [x21]
	b	LBB0_2
LBB0_5:
Lloh13:
	adrp	x8, _QCOM_ICC_BUCKET_AMC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _QCOM_ICC_BUCKET_AMC@GOTPAGEOFF]
Lloh15:
	ldr	x1, [x8]
	sub	x0, x29, #64
	mov	x2, x19
	mov	x3, x20
	bl	_tcs_list_gen
	ldr	w8, [x20]
	cbz	w8, LBB0_18
; %bb.6:
	ldr	w0, [x21, #4]
	bl	_rpmh_invalidate
	cbz	w0, LBB0_8
; %bb.7:
	mov	x22, x0
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	w0, [x21, #4]
Lloh18:
	adrp	x8, _RPMH_ACTIVE_ONLY_STATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RPMH_ACTIVE_ONLY_STATE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x2, x19
	mov	x3, x20
	bl	_rpmh_write_batch
	cbz	w0, LBB0_11
; %bb.9:
	mov	x22, x0
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	mov	x1, x22
	bl	_pr_err
	b	LBB0_19
LBB0_11:
	sub	x0, x29, #64
	bl	_INIT_LIST_HEAD
	ldr	w8, [x21]
Lloh23:
	adrp	x22, _QCOM_ICC_BUCKET_WAKE@GOTPAGE
Lloh24:
	ldr	x22, [x22, _QCOM_ICC_BUCKET_WAKE@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.12:
	mov	x23, #0
Lloh25:
	adrp	x24, _QCOM_ICC_BUCKET_SLEEP@GOTPAGE
Lloh26:
	ldr	x24, [x24, _QCOM_ICC_BUCKET_SLEEP@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x0, x9, #16
	sub	x1, x29, #64
	bl	_list_add_tail
	ldr	w8, [x21]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	ldr	x9, [x9, x23, lsl #3]
	ldr	x12, [x9]
	ldr	x10, [x22]
	ldr	x13, [x12, x10, lsl #3]
	ldr	x11, [x24]
	ldr	x12, [x12, x11, lsl #3]
	cmp	x13, x12
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x12, [x9, #8]
	ldr	x10, [x12, x10, lsl #3]
	ldr	x11, [x12, x11, lsl #3]
	cmp	x10, x11
	b.ne	LBB0_13
	b	LBB0_14
LBB0_17:
	sub	x0, x29, #64
	bl	_list_empty
	cbz	x0, LBB0_21
LBB0_18:
	mov	w22, #0
LBB0_19:
	ldur	x8, [x29, #-56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.20:
	mov	x0, x22
	sub	sp, x29, #48
	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
LBB0_21:
	ldr	x1, [x22]
	sub	x0, x29, #64
	mov	x2, x19
	mov	x3, x20
	bl	_tcs_list_gen
	ldr	w0, [x21, #4]
Lloh30:
	adrp	x8, _RPMH_WAKE_ONLY_STATE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RPMH_WAKE_ONLY_STATE@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x2, x19
	mov	x3, x20
	bl	_rpmh_write_batch
	cbz	w0, LBB0_23
; %bb.22:
	mov	x22, x0
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_23:
Lloh35:
	adrp	x8, _QCOM_ICC_BUCKET_SLEEP@GOTPAGE
Lloh36:
	ldr	x8, [x8, _QCOM_ICC_BUCKET_SLEEP@GOTPAGEOFF]
Lloh37:
	ldr	x1, [x8]
	sub	x0, x29, #64
	mov	x2, x19
	mov	x3, x20
	bl	_tcs_list_gen
	ldr	w0, [x21, #4]
Lloh38:
	adrp	x8, _RPMH_SLEEP_STATE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RPMH_SLEEP_STATE@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x2, x19
	mov	x3, x20
	bl	_rpmh_write_batch
	mov	x22, x0
	cbz	w0, LBB0_19
; %bb.24:
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_SDM845_MAX_BCMS,4,2            ; @SDM845_MAX_BCMS
	.comm	_SDM845_MAX_VCD,4,2             ; @SDM845_MAX_VCD
	.comm	_QCOM_ICC_BUCKET_AMC,8,3        ; @QCOM_ICC_BUCKET_AMC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error invalidating RPMH client (%d)\n"

	.comm	_RPMH_ACTIVE_ONLY_STATE,4,2     ; @RPMH_ACTIVE_ONLY_STATE
l_.str.1:                               ; @.str.1
	.asciz	"Error sending AMC RPMH requests (%d)\n"

	.comm	_QCOM_ICC_BUCKET_WAKE,8,3       ; @QCOM_ICC_BUCKET_WAKE
	.comm	_QCOM_ICC_BUCKET_SLEEP,8,3      ; @QCOM_ICC_BUCKET_SLEEP
	.comm	_RPMH_WAKE_ONLY_STATE,4,2       ; @RPMH_WAKE_ONLY_STATE
l_.str.2:                               ; @.str.2
	.asciz	"Error sending WAKE RPMH requests (%d)\n"

	.comm	_RPMH_SLEEP_STATE,4,2           ; @RPMH_SLEEP_STATE
l_.str.3:                               ; @.str.3
	.asciz	"Error sending SLEEP RPMH requests (%d)\n"

	.no_dead_strip	_qcom_icc_set
.subsections_via_symbols
