	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen6_set_rps                   ## -- Begin function gen6_set_rps
	.p2align	4, 0x90
_gen6_set_rps:                          ## @gen6_set_rps
	.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	%rsi, -48(%rbp)
	movq	(%rdi), %r12
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_gen6_rps_limits
	movl	%eax, %r14d
	leaq	24(%r12), %rdi
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	-48(%rbp), %rax
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	setg	%dil
	callq	_WARN_ON
	movq	-48(%rbp), %rax
	xorl	%edi, %edi
	cmpq	8(%r12), %rax
	setl	%dil
	callq	_WARN_ON
	movq	-48(%rbp), %rdi
	cmpq	16(%r12), %rdi
	je	LBB0_2
## %bb.1:
	movq	_GEN6_RPNSWREQ@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	callq	_GEN6_FREQUENCY
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_GEN6_OFFSET
	orl	%eax, %ebx
	movq	_GEN6_AGGRESSIVE_TURBO@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	_GEN6_RP_INTERRUPT_LIMITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	callq	_POSTING_READ
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r12)
	imulq	$50, %rax, %rdi
	callq	_trace_intel_gpu_freq_change
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN6_RPNSWREQ,4,2              ## @GEN6_RPNSWREQ
	.comm	_GEN6_AGGRESSIVE_TURBO,4,2      ## @GEN6_AGGRESSIVE_TURBO
	.comm	_GEN6_RP_INTERRUPT_LIMITS,4,2   ## @GEN6_RP_INTERRUPT_LIMITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen6_set_rps                   ; -- Begin function gen6_set_rps
	.p2align	2
_gen6_set_rps:                          ; @gen6_set_rps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	str	x1, [sp, #8]
	ldr	x19, [x0]
	add	x1, sp, #8
	mov	x0, x19
	bl	_gen6_rps_limits
	mov	x20, x0
	add	x0, x19, #24
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x8, [sp, #8]
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, gt
	bl	_WARN_ON
	ldr	x8, [sp, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	cset	w0, lt
	bl	_WARN_ON
	ldr	x0, [sp, #8]
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x23, _GEN6_RPNSWREQ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GEN6_RPNSWREQ@GOTPAGEOFF]
	ldr	w21, [x23]
	bl	_GEN6_FREQUENCY
	mov	x22, x0
	mov	w0, #0
	bl	_GEN6_OFFSET
	orr	w8, w0, w22
Lloh2:
	adrp	x9, _GEN6_AGGRESSIVE_TURBO@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GEN6_AGGRESSIVE_TURBO@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_I915_WRITE
Lloh5:
	adrp	x8, _GEN6_RP_INTERRUPT_LIMITS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GEN6_RP_INTERRUPT_LIMITS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_I915_WRITE
	ldr	w0, [x23]
	bl	_POSTING_READ
	ldr	x8, [sp, #8]
	str	x8, [x19, #16]
	mov	w9, #50
	mul	x0, x8, x9
	bl	_trace_intel_gpu_freq_change
LBB0_2:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN6_RPNSWREQ,4,2              ; @GEN6_RPNSWREQ
	.comm	_GEN6_AGGRESSIVE_TURBO,4,2      ; @GEN6_AGGRESSIVE_TURBO
	.comm	_GEN6_RP_INTERRUPT_LIMITS,4,2   ; @GEN6_RP_INTERRUPT_LIMITS
.subsections_via_symbols
