	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sumo_apply_state_adjust_rules
_sumo_apply_state_adjust_rules:         ## @sumo_apply_state_adjust_rules
	.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	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_sumo_get_ps
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_sumo_get_ps
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_sumo_get_pi
	movl	(%rbx), %ecx
	movq	_ATOM_PPLIB_CLASSIFICATION_THERMAL@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sumo_patch_thermal_state       ## TAILCALL
LBB0_2:
	movq	8(%rax), %r12
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_SUMO_POWERSTATE_FLAGS_BOOST_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_ATOM_PPLIB_CLASSIFICATION_UI_BATTERY@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_8
## %bb.6:
	movq	_ATOM_PPLIB_CLASSIFICATION_SDSTATE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_8
## %bb.7:
	movq	_ATOM_PPLIB_CLASSIFICATION_HDSTATE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_9
LBB0_8:
	movq	_SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_9:
	cmpq	$0, 8(%r13)
	je	LBB0_28
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_11:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	$0, 20(%rcx,%rbx)
LBB0_12:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	$0, 16(%rcx,%rbx)
LBB0_13:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_23
LBB0_14:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	$1, 24(%rcx,%rbx)
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r14
	addq	$32, %rbx
	cmpq	8(%r13), %r14
	jae	LBB0_28
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	8(%rax,%rbx), %rsi
	cmpq	%r12, %rsi
	jae	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_sumo_get_valid_engine_clock
	movq	%rax, %rsi
	movq	16(%r13), %rax
	movq	%rsi, 8(%rax,%rbx)
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_sumo_get_sleep_divider_id_from_clock
	movq	16(%r13), %rcx
	movl	%eax, 16(%rcx,%rbx)
	movq	8(%rcx,%rbx), %rsi
	movq	_SUMO_MINIMUM_ENGINE_CLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	callq	_sumo_get_sleep_divider_id_from_clock
	movq	16(%r13), %rcx
	movl	16(%rcx,%rbx), %edx
	leal	1(%rdx), %esi
	cmpl	%eax, %esi
	cmovll	%esi, %eax
	movl	%eax, 20(%rcx,%rbx)
	cmpl	$2, %edx
	jl	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	%eax, %edx
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	decl	%edx
	movl	%edx, 16(%rcx,%rbx)
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	testl	%edx, %edx
	je	LBB0_11
LBB0_22:                                ##   in Loop: Header=BB0_16 Depth=1
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_ATOM_PPLIB_CLASSIFICATION_UVDSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testl	%eax, (%rdx)
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_ATOM_PPLIB_CLASSIFICATION2_MVC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testl	%eax, 4(%rdx)
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%r13), %rax
	decq	%rax
	cmpq	%rax, %r14
	jne	LBB0_14
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	$0, 24(%rcx,%rbx)
	jmp	LBB0_15
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_PPLIB_CLASSIFICATION_THERMAL,4,2 ## @ATOM_PPLIB_CLASSIFICATION_THERMAL
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE
	.comm	_SUMO_POWERSTATE_FLAGS_BOOST_STATE,4,2 ## @SUMO_POWERSTATE_FLAGS_BOOST_STATE
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_BATTERY,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UI_BATTERY
	.comm	_ATOM_PPLIB_CLASSIFICATION_SDSTATE,4,2 ## @ATOM_PPLIB_CLASSIFICATION_SDSTATE
	.comm	_ATOM_PPLIB_CLASSIFICATION_HDSTATE,4,2 ## @ATOM_PPLIB_CLASSIFICATION_HDSTATE
	.comm	_SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE,4,2 ## @SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE
	.comm	_SUMO_MINIMUM_ENGINE_CLOCK,8,3  ## @SUMO_MINIMUM_ENGINE_CLOCK
	.comm	_ATOM_PPLIB_CLASSIFICATION_UVDSTATE,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UVDSTATE
	.comm	_ATOM_PPLIB_CLASSIFICATION2_MVC,4,2 ## @ATOM_PPLIB_CLASSIFICATION2_MVC
	.no_dead_strip	_sumo_apply_state_adjust_rules
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sumo_apply_state_adjust_rules
_sumo_apply_state_adjust_rules:         ; @sumo_apply_state_adjust_rules
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_sumo_get_ps
	mov	x21, x0
	mov	x0, x22
	bl	_sumo_get_ps
	mov	x22, x0
	mov	x0, x19
	bl	_sumo_get_pi
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _ATOM_PPLIB_CLASSIFICATION_THERMAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_PPLIB_CLASSIFICATION_THERMAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_sumo_patch_thermal_state
LBB0_2:
	ldp	x9, x22, [x0]
	cbz	x9, LBB0_5
; %bb.3:
Lloh3:
	adrp	x9, _ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh6:
	adrp	x9, _SUMO_POWERSTATE_FLAGS_BOOST_STATE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SUMO_POWERSTATE_FLAGS_BOOST_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	w10, [x21]
	orr	w9, w10, w9
	str	w9, [x21]
LBB0_5:
Lloh9:
	adrp	x9, _ATOM_PPLIB_CLASSIFICATION_UI_BATTERY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATOM_PPLIB_CLASSIFICATION_UI_BATTERY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x23, _SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.6:
Lloh14:
	adrp	x9, _ATOM_PPLIB_CLASSIFICATION_SDSTATE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATOM_PPLIB_CLASSIFICATION_SDSTATE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
Lloh17:
	adrp	x9, _ATOM_PPLIB_CLASSIFICATION_HDSTATE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ATOM_PPLIB_CLASSIFICATION_HDSTATE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_8:
	ldr	w8, [x23]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_9:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_28
; %bb.10:
	mov	x24, #0
	mov	x25, #0
Lloh20:
	adrp	x26, _SUMO_MINIMUM_ENGINE_CLOCK@GOTPAGE
Lloh21:
	ldr	x26, [x26, _SUMO_MINIMUM_ENGINE_CLOCK@GOTPAGEOFF]
Lloh22:
	adrp	x27, _ATOM_PPLIB_CLASSIFICATION_UVDSTATE@GOTPAGE
Lloh23:
	ldr	x27, [x27, _ATOM_PPLIB_CLASSIFICATION_UVDSTATE@GOTPAGEOFF]
	mov	w28, #1
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [x20]
	ldr	w10, [x27]
	tst	w10, w9
	b.eq	LBB0_26
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x8, x8, x24
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	str	wzr, [x8, #24]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x25, x25, #1
	ldr	x8, [x21, #8]
	add	x24, x24, #32
	cmp	x25, x8
	b.hs	LBB0_28
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	add	x8, x8, x24
	ldr	x1, [x8, #8]
	cmp	x1, x22
	b.hs	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_sumo_get_valid_engine_clock
	mov	x1, x0
	ldr	x8, [x21, #16]
	add	x8, x8, x24
	str	x0, [x8, #8]
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x2, x22
	bl	_sumo_get_sleep_divider_id_from_clock
	ldr	x8, [x21, #16]
	add	x8, x8, x24
	str	w0, [x8, #16]
	ldr	x1, [x8, #8]
	ldr	x2, [x26]
	mov	x0, x19
	bl	_sumo_get_sleep_divider_id_from_clock
	ldr	x8, [x21, #16]
	add	x9, x8, x24
	ldr	w11, [x9, #16]
	add	w10, w11, #1
	cmp	w10, w0
	csinc	w10, w0, w11, ge
	str	w10, [x9, #20]
	cmp	w11, #2
	ccmp	w11, w10, #0, ge
	b.eq	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	cbz	w11, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	cbnz	w10, LBB0_23
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	sub	w11, w11, #1
	str	w11, [x9, #16]
	cbnz	w10, LBB0_23
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_15 Depth=1
	str	wzr, [x9, #20]
LBB0_22:                                ;   in Loop: Header=BB0_15 Depth=1
	str	wzr, [x9, #16]
LBB0_23:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [x21]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.24:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x8, x8, x24
LBB0_25:                                ;   in Loop: Header=BB0_15 Depth=1
	str	w28, [x8, #24]
	b	LBB0_14
LBB0_26:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [x20, #4]
Lloh24:
	adrp	x10, _ATOM_PPLIB_CLASSIFICATION2_MVC@GOTPAGE
Lloh25:
	ldr	x10, [x10, _ATOM_PPLIB_CLASSIFICATION2_MVC@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_12
; %bb.27:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x9, [x21, #8]
	sub	x9, x9, #1
	add	x8, x8, x24
	cmp	x25, x9
	b.eq	LBB0_13
	b	LBB0_25
LBB0_28:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_PPLIB_CLASSIFICATION_THERMAL,4,2 ; @ATOM_PPLIB_CLASSIFICATION_THERMAL
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE
	.comm	_SUMO_POWERSTATE_FLAGS_BOOST_STATE,4,2 ; @SUMO_POWERSTATE_FLAGS_BOOST_STATE
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_BATTERY,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UI_BATTERY
	.comm	_ATOM_PPLIB_CLASSIFICATION_SDSTATE,4,2 ; @ATOM_PPLIB_CLASSIFICATION_SDSTATE
	.comm	_ATOM_PPLIB_CLASSIFICATION_HDSTATE,4,2 ; @ATOM_PPLIB_CLASSIFICATION_HDSTATE
	.comm	_SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE,4,2 ; @SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE
	.comm	_SUMO_MINIMUM_ENGINE_CLOCK,8,3  ; @SUMO_MINIMUM_ENGINE_CLOCK
	.comm	_ATOM_PPLIB_CLASSIFICATION_UVDSTATE,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UVDSTATE
	.comm	_ATOM_PPLIB_CLASSIFICATION2_MVC,4,2 ; @ATOM_PPLIB_CLASSIFICATION2_MVC
	.no_dead_strip	_sumo_apply_state_adjust_rules
.subsections_via_symbols
