	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_idle                  ## -- Begin function i915_gem_idle
	.p2align	4, 0x90
_i915_gem_idle:                         ## @i915_gem_idle
	.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
	movq	8(%rdi), %r14
	callq	_mutex_lock
	cmpl	$0, (%r14)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	callq	_i915_gpu_idle
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	callq	_i915_gem_retire_requests
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_i915_gem_evict_everything
LBB0_6:
	movq	%rbx, %rdi
	callq	_i915_gem_reset_fences
	movl	$1, (%r14)
	leaq	8(%r14), %rdi
	callq	_del_timer_sync
	movq	%rbx, %rdi
	callq	_i915_kernel_lost_context
	movq	%rbx, %rdi
	callq	_i915_gem_cleanup_ringbuffer
	movq	%rbx, %rdi
	callq	_mutex_unlock
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_cancel_delayed_work_sync
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_idle                  ; -- Begin function i915_gem_idle
	.p2align	2
_i915_gem_idle:                         ; @i915_gem_idle
	.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	x19, x0
	ldr	x21, [x0, #8]
	bl	_mutex_lock
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_2:
	mov	w20, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_i915_gpu_idle
	cbz	w0, LBB0_6
; %bb.4:
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x20
	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_6:
	mov	x0, x19
	bl	_i915_gem_retire_requests
Lloh0:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbnz	w0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_i915_gem_evict_everything
LBB0_8:
	mov	x0, x19
	bl	_i915_gem_reset_fences
	mov	w8, #1
	mov	x20, x21
	str	w8, [x20], #4
	add	x0, x21, #8
	bl	_del_timer_sync
	mov	x0, x19
	bl	_i915_kernel_lost_context
	mov	x0, x19
	bl	_i915_gem_cleanup_ringbuffer
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_cancel_delayed_work_sync
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
.subsections_via_symbols
