	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen6_rps_busy                  ## -- Begin function gen6_rps_busy
	.p2align	4, 0x90
_gen6_rps_busy:                         ## @gen6_rps_busy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 32(%rbx)
	je	LBB0_5
## %bb.1:
	movq	_GEN6_PM_RP_UP_EI_EXPIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_gen6_rps_reset_ei
LBB0_3:
	movq	_GEN6_PMINTRMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	24(%rbx), %esi
	movq	%rbx, %rdi
	callq	_gen6_rps_pm_mask
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	%rbx, %rdi
	callq	_gen6_enable_rps_interrupts
	movl	20(%rbx), %esi
	movl	24(%rbx), %edi
	callq	_max
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	movl	%eax, %edi
	callq	_clamp
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_intel_set_rps
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN6_PM_RP_UP_EI_EXPIRED,4,2   ## @GEN6_PM_RP_UP_EI_EXPIRED
	.comm	_GEN6_PMINTRMSK,4,2             ## @GEN6_PMINTRMSK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set idle frequency\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen6_rps_busy                  ; -- Begin function gen6_rps_busy
	.p2align	2
_gen6_rps_busy:                         ; @gen6_rps_busy
	.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, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _GEN6_PM_RP_UP_EI_EXPIRED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GEN6_PM_RP_UP_EI_EXPIRED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_gen6_rps_reset_ei
LBB0_3:
Lloh3:
	adrp	x8, _GEN6_PMINTRMSK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GEN6_PMINTRMSK@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	ldr	w1, [x20, #24]
	mov	x0, x20
	bl	_gen6_rps_pm_mask
	mov	x1, x0
	mov	x0, x21
	bl	_I915_WRITE
	mov	x0, x20
	bl	_gen6_enable_rps_interrupts
	ldp	w1, w0, [x20, #20]
	bl	_max
	ldp	w2, w1, [x20, #12]
	bl	_clamp
	mov	x1, x0
	mov	x0, x20
	bl	_intel_set_rps
	cbz	x0, LBB0_5
; %bb.4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
LBB0_5:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN6_PM_RP_UP_EI_EXPIRED,4,2   ; @GEN6_PM_RP_UP_EI_EXPIRED
	.comm	_GEN6_PMINTRMSK,4,2             ; @GEN6_PMINTRMSK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set idle frequency\n"

.subsections_via_symbols
