	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_apply_state_adjust_rules
_ci_apply_state_adjust_rules:           ## @ci_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_ci_get_ps
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_ci_get_pi
	movq	%rax, %r12
	cmpq	$0, 8(%r14)
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	shlq	$5, %rax
	movups	16(%rcx,%rax), %xmm0
	jmp	LBB0_3
LBB0_1:
	xorps	%xmm0, %xmm0
LBB0_3:
	movups	%xmm0, 16(%r14)
	cmpl	$1, 8(%rbx)
	jle	LBB0_5
## %bb.4:
	xorl	%r8d, %r8d
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_ci_dpm_vblank_too_short
	testq	%rax, %rax
	sete	%r8b
LBB0_6:
	movq	_ATOM_PPLIB_CLASSIFICATION_UI_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	movq	_ATOM_PPLIB_CLASSIFICATION_UI_BATTERY@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	sete	%dl
	movl	%edx, (%r12)
	movl	12(%rbx), %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%dl
	je	LBB0_7
LBB0_14:
	movq	8(%r15), %rcx
	testb	%r8b, %r8b
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_16:
	movslq	(%r15), %rax
	decq	%rax
LBB0_17:
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdx
	movq	8(%rcx), %rsi
	cmpq	$0, 8(%r14)
	je	LBB0_19
## %bb.18:
	movq	(%rbx), %rax
	movq	16(%rbx), %rdi
	shlq	$5, %rax
	movq	(%rdi,%rax), %rbx
	cmpq	%rbx, %rsi
	cmovleq	%rbx, %rsi
	movq	8(%rdi,%rax), %rax
	cmpq	%rax, %rdx
	cmovleq	%rax, %rdx
LBB0_19:
	movq	%rsi, 8(%rcx)
	movq	%rdx, (%rcx)
	cmpq	%rsi, 24(%rcx)
	jge	LBB0_21
## %bb.20:
	movq	%rsi, 24(%rcx)
LBB0_21:
	movq	16(%rcx), %rax
	testb	%r8b, %r8b
	je	LBB0_22
## %bb.24:
	cmpq	%rdx, %rax
	jge	LBB0_26
## %bb.25:
	movq	%rdx, 16(%rcx)
	jmp	LBB0_26
LBB0_22:
	cmpq	%rax, %rdx
	jge	LBB0_26
## %bb.23:
	movq	%rax, (%rcx)
LBB0_26:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.8:
	movb	%dl, %al
	shlq	$4, %rax
	addq	%rbx, %rax
	addq	$24, %rax
	movq	8(%r15), %rdx
	movq	(%rax), %rsi
	movq	8(%rax), %rdi
	shlq	$4, %rcx
	xorl	%eax, %eax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	addq	$16, %rax
	cmpq	%rax, %rcx
	je	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx,%rax)
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rsi, (%rdx,%rax)
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%rdi, 8(%rdx,%rax)
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rdi, 8(%rdx,%rax)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_MASK,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UI_MASK
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_BATTERY,4,2 ## @ATOM_PPLIB_CLASSIFICATION_UI_BATTERY
	.no_dead_strip	_ci_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 ci_apply_state_adjust_rules
_ci_apply_state_adjust_rules:           ; @ci_apply_state_adjust_rules
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_ci_get_ps
	mov	x21, x0
	mov	x0, x19
	bl	_ci_get_pi
	mov	x22, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	add	x8, x8, x9, lsl #5
	ldr	q0, [x8, #16]
	b	LBB0_3
LBB0_2:
	movi.2d	v0, #0000000000000000
LBB0_3:
	str	q0, [x20, #16]
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.le	LBB0_5
; %bb.4:
	mov	w8, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_ci_dpm_vblank_too_short
	cmp	x0, #0
	cset	w8, eq
LBB0_6:
	ldr	w9, [x20]
Lloh0:
	adrp	x10, _ATOM_PPLIB_CLASSIFICATION_UI_MASK@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ATOM_PPLIB_CLASSIFICATION_UI_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh3:
	adrp	x10, _ATOM_PPLIB_CLASSIFICATION_UI_BATTERY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ATOM_PPLIB_CLASSIFICATION_UI_BATTERY@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	cset	w9, eq
	str	w9, [x22]
	ldr	w9, [x19, #12]
	add	x10, x19, #40
	add	x11, x19, #24
	cmp	w9, #0
	csel	x11, x11, x10, eq
	cbz	w9, LBB0_20
LBB0_7:
	ldr	x9, [x21, #8]
	tbz	w8, #0, LBB0_9
; %bb.8:
	mov	x10, #0
	b	LBB0_10
LBB0_9:
	ldrsw	x10, [x21]
	sub	x10, x10, #1
LBB0_10:
	lsl	x10, x10, #4
	ldr	x10, [x9, x10]
	ldr	x11, [x9, #8]
	ldr	x12, [x20, #8]
	cbz	x12, LBB0_12
; %bb.11:
	ldr	x12, [x19, #16]
	ldr	x13, [x19]
	add	x12, x12, x13, lsl #5
	ldp	x13, x12, [x12]
	cmp	x11, x13
	csel	x11, x11, x13, gt
	cmp	x10, x12
	csel	x10, x10, x12, gt
LBB0_12:
	stp	x10, x11, [x9]
	ldr	x12, [x9, #24]
	cmp	x12, x11
	b.lt	LBB0_16
; %bb.13:
	ldr	x11, [x9, #16]
	tbz	w8, #0, LBB0_17
LBB0_14:
	cmp	x11, x10
	b.ge	LBB0_19
; %bb.15:
	str	x10, [x9, #16]
	b	LBB0_19
LBB0_16:
	str	x11, [x9, #24]
	ldr	x11, [x9, #16]
	tbnz	w8, #0, LBB0_14
LBB0_17:
	cmp	x10, x11
	b.ge	LBB0_19
; %bb.18:
	str	x11, [x9]
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_20:
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.21:
	ldr	x12, [x21, #8]
	ldp	x10, x11, [x11]
	add	x12, x12, #8
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x12, x12, #16
	subs	x9, x9, #1
	b.eq	LBB0_7
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldur	x13, [x12, #-8]
	cmp	x13, x10
	b.le	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	stur	x10, [x12, #-8]
LBB0_25:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	x13, [x12]
	cmp	x13, x11
	b.le	LBB0_22
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=1
	str	x11, [x12]
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_MASK,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UI_MASK
	.comm	_ATOM_PPLIB_CLASSIFICATION_UI_BATTERY,4,2 ; @ATOM_PPLIB_CLASSIFICATION_UI_BATTERY
	.no_dead_strip	_ci_apply_state_adjust_rules
.subsections_via_symbols
