	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rps_set_power
_rps_set_power:                         ## @rps_set_power
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	addq	$12, %rdi
	callq	_lockdep_assert_held
	cmpl	%r14d, (%rbx)
	je	LBB0_8
## %bb.1:
	leal	-128(%r14), %eax
	xorl	%r13d, %r13d
	movl	$0, %edx
	movl	$0, %r12d
	movl	$0, %r15d
	cmpl	$2, %eax
	ja	LBB0_3
## %bb.2:
	cltq
	leaq	l_switch.table.rps_set_power(%rip), %rcx
	movl	(%rcx,%rax,4), %r13d
	leaq	l_switch.table.rps_set_power.1(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
	leaq	l_switch.table.rps_set_power.2(%rip), %rcx
	movl	(%rcx,%rax,4), %r12d
	movl	$32000, %r15d                   ## imm = 0x7D00
LBB0_3:
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_GEN6_RP_UP_EI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_GT_INTERVAL_FROM_US
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	_GEN6_RP_UP_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	imull	%r13d, %r12d
	imulq	$1374389535, %r12, %rsi         ## imm = 0x51EB851F
	shrq	$37, %rsi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_GT_INTERVAL_FROM_US
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	_GEN6_RP_DOWN_EI@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_GT_INTERVAL_FROM_US
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	_GEN6_RP_DOWN_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	imull	-48(%rbp), %r15d                ## 4-byte Folded Reload
	imulq	$1374389535, %r15, %rsi         ## imm = 0x51EB851F
	shrq	$37, %rsi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_GT_INTERVAL_FROM_US
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	_GEN6_RP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	xorl	%esi, %esi
	cmpl	$10, %eax
	jge	LBB0_6
## %bb.5:
	movq	_GEN6_RP_MEDIA_TURBO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_6:
	movq	_GEN6_RP_MEDIA_HW_NORMAL_MODE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_GEN6_RP_MEDIA_IS_GFX@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_GEN6_RP_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_GEN6_RP_UP_BUSY_AVG@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_GEN6_RP_DOWN_IDLE_AVG@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%r15d, %edi
	callq	_I915_WRITE
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_7:
	movl	%r14d, (%rbx)
	movl	%r13d, 4(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN6_RP_UP_EI,4,2              ## @GEN6_RP_UP_EI
	.comm	_GEN6_RP_UP_THRESHOLD,4,2       ## @GEN6_RP_UP_THRESHOLD
	.comm	_GEN6_RP_DOWN_EI,4,2            ## @GEN6_RP_DOWN_EI
	.comm	_GEN6_RP_DOWN_THRESHOLD,4,2     ## @GEN6_RP_DOWN_THRESHOLD
	.comm	_GEN6_RP_CONTROL,4,2            ## @GEN6_RP_CONTROL
	.comm	_GEN6_RP_MEDIA_TURBO,4,2        ## @GEN6_RP_MEDIA_TURBO
	.comm	_GEN6_RP_MEDIA_HW_NORMAL_MODE,4,2 ## @GEN6_RP_MEDIA_HW_NORMAL_MODE
	.comm	_GEN6_RP_MEDIA_IS_GFX,4,2       ## @GEN6_RP_MEDIA_IS_GFX
	.comm	_GEN6_RP_ENABLE,4,2             ## @GEN6_RP_ENABLE
	.comm	_GEN6_RP_UP_BUSY_AVG,4,2        ## @GEN6_RP_UP_BUSY_AVG
	.comm	_GEN6_RP_DOWN_IDLE_AVG,4,2      ## @GEN6_RP_DOWN_IDLE_AVG
	.no_dead_strip	_rps_set_power
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.rps_set_power
l_switch.table.rps_set_power:
	.long	95                              ## 0x5f
	.long	85                              ## 0x55
	.long	90                              ## 0x5a

	.p2align	2                               ## @switch.table.rps_set_power.1
l_switch.table.rps_set_power.1:
	.long	85                              ## 0x55
	.long	60                              ## 0x3c
	.long	75                              ## 0x4b

	.p2align	2                               ## @switch.table.rps_set_power.2
l_switch.table.rps_set_power.2:
	.long	16000                           ## 0x3e80
	.long	10000                           ## 0x2710
	.long	13000                           ## 0x32c8

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rps_set_power
_rps_set_power:                         ; @rps_set_power
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	add	x0, x0, #12
	bl	_lockdep_assert_held
	ldr	w8, [x19]
	cmp	w8, w20
	b.eq	LBB0_7
; %bb.1:
	sub	w8, w20, #128
	cmp	w8, #2
	b.hi	LBB0_3
; %bb.2:
	sbfiz	x8, x8, #2, #32
Lloh0:
	adrp	x9, l_switch.table.rps_set_power@PAGE
Lloh1:
	add	x9, x9, l_switch.table.rps_set_power@PAGEOFF
	ldr	w24, [x9, x8]
Lloh2:
	adrp	x9, l_switch.table.rps_set_power.1@PAGE
Lloh3:
	add	x9, x9, l_switch.table.rps_set_power.1@PAGEOFF
	ldr	w25, [x9, x8]
Lloh4:
	adrp	x9, l_switch.table.rps_set_power.2@PAGE
Lloh5:
	add	x9, x9, l_switch.table.rps_set_power.2@PAGEOFF
	ldr	w22, [x9, x8]
	mov	w21, #32000
	b	LBB0_4
LBB0_3:
	mov	w24, #0
	mov	w25, #0
	mov	w22, #0
	mov	w21, #0
LBB0_4:
	mov	x0, x19
	bl	_IS_VALLEYVIEW
	cbnz	x0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _GEN6_RP_UP_EI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GEN6_RP_UP_EI@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_GT_INTERVAL_FROM_US
	mov	x1, x0
	mov	x0, x23
	bl	_I915_WRITE
Lloh9:
	adrp	x8, _GEN6_RP_UP_THRESHOLD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GEN6_RP_UP_THRESHOLD@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	mul	w8, w22, w24
	mov	w26, #34079
	movk	w26, #20971, lsl #16
	umull	x8, w8, w26
	lsr	x1, x8, #37
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_GT_INTERVAL_FROM_US
	mov	x1, x0
	mov	x0, x23
	bl	_I915_WRITE
Lloh12:
	adrp	x8, _GEN6_RP_DOWN_EI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GEN6_RP_DOWN_EI@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_GT_INTERVAL_FROM_US
	mov	x1, x0
	mov	x0, x22
	bl	_I915_WRITE
Lloh15:
	adrp	x8, _GEN6_RP_DOWN_THRESHOLD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GEN6_RP_DOWN_THRESHOLD@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
	mul	w8, w21, w25
	umull	x8, w8, w26
	lsr	x1, x8, #37
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_GT_INTERVAL_FROM_US
	mov	x1, x0
	mov	x0, x22
	bl	_I915_WRITE
Lloh18:
	adrp	x8, _GEN6_RP_CONTROL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GEN6_RP_CONTROL@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_INTEL_GEN
Lloh21:
	adrp	x8, _GEN6_RP_MEDIA_TURBO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GEN6_RP_MEDIA_TURBO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w0, #9
	csel	w8, wzr, w8, gt
Lloh24:
	adrp	x9, _GEN6_RP_MEDIA_HW_NORMAL_MODE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _GEN6_RP_MEDIA_HW_NORMAL_MODE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _GEN6_RP_MEDIA_IS_GFX@GOTPAGE
Lloh28:
	ldr	x9, [x9, _GEN6_RP_MEDIA_IS_GFX@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _GEN6_RP_ENABLE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _GEN6_RP_ENABLE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh33:
	adrp	x9, _GEN6_RP_UP_BUSY_AVG@GOTPAGE
Lloh34:
	ldr	x9, [x9, _GEN6_RP_UP_BUSY_AVG@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _GEN6_RP_DOWN_IDLE_AVG@GOTPAGE
Lloh37:
	ldr	x9, [x9, _GEN6_RP_DOWN_IDLE_AVG@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_I915_WRITE
LBB0_6:
	stp	w20, w24, [x19]
	str	w25, [x19, #8]
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN6_RP_UP_EI,4,2              ; @GEN6_RP_UP_EI
	.comm	_GEN6_RP_UP_THRESHOLD,4,2       ; @GEN6_RP_UP_THRESHOLD
	.comm	_GEN6_RP_DOWN_EI,4,2            ; @GEN6_RP_DOWN_EI
	.comm	_GEN6_RP_DOWN_THRESHOLD,4,2     ; @GEN6_RP_DOWN_THRESHOLD
	.comm	_GEN6_RP_CONTROL,4,2            ; @GEN6_RP_CONTROL
	.comm	_GEN6_RP_MEDIA_TURBO,4,2        ; @GEN6_RP_MEDIA_TURBO
	.comm	_GEN6_RP_MEDIA_HW_NORMAL_MODE,4,2 ; @GEN6_RP_MEDIA_HW_NORMAL_MODE
	.comm	_GEN6_RP_MEDIA_IS_GFX,4,2       ; @GEN6_RP_MEDIA_IS_GFX
	.comm	_GEN6_RP_ENABLE,4,2             ; @GEN6_RP_ENABLE
	.comm	_GEN6_RP_UP_BUSY_AVG,4,2        ; @GEN6_RP_UP_BUSY_AVG
	.comm	_GEN6_RP_DOWN_IDLE_AVG,4,2      ; @GEN6_RP_DOWN_IDLE_AVG
	.no_dead_strip	_rps_set_power
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.rps_set_power
l_switch.table.rps_set_power:
	.long	95                              ; 0x5f
	.long	85                              ; 0x55
	.long	90                              ; 0x5a

	.p2align	2                               ; @switch.table.rps_set_power.1
l_switch.table.rps_set_power.1:
	.long	85                              ; 0x55
	.long	60                              ; 0x3c
	.long	75                              ; 0x4b

	.p2align	2                               ; @switch.table.rps_set_power.2
l_switch.table.rps_set_power.2:
	.long	16000                           ; 0x3e80
	.long	10000                           ; 0x2710
	.long	13000                           ; 0x32c8

.subsections_via_symbols
