	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_wait_for_idle         ## -- Begin function i915_gem_wait_for_idle
	.p2align	4, 0x90
_i915_gem_wait_for_idle:                ## @i915_gem_wait_for_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	%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	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r15
	addq	$4, %rdi
	callq	_intel_gt_pm_is_awake
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_I915_WAIT_LOCKED@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	andl	%ebx, %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movq	%r12, %rcx
	callq	_GEM_TRACE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_wait_for_timelines
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	testl	%ebx, (%r13)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_lockdep_assert_held
	movq	%r15, %rdi
	callq	_i915_retire_requests
	jmp	LBB0_5
LBB0_2:
	movl	%eax, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flags=%x (%s), timeout=%ld%s\n"

	.comm	_I915_WAIT_LOCKED,4,2           ## @I915_WAIT_LOCKED
L_.str.1:                               ## @.str.1
	.asciz	"locked"

L_.str.2:                               ## @.str.2
	.asciz	"unlocked"

	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ## @MAX_SCHEDULE_TIMEOUT
L_.str.3:                               ## @.str.3
	.asciz	" (forever)"

L_.str.4:                               ## @.str.4
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_wait_for_idle         ; -- Begin function i915_gem_wait_for_idle
	.p2align	2
_i915_gem_wait_for_idle:                ; @i915_gem_wait_for_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	x21, x2
	mov	x20, x1
	mov	x19, x0
	add	x0, x0, #4
	bl	_intel_gt_pm_is_awake
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x22, _I915_WAIT_LOCKED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _I915_WAIT_LOCKED@GOTPAGEOFF]
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	ldr	w10, [x22]
	tst	w10, w20
	csel	x2, x9, x8, eq
Lloh6:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, l_.str.4@PAGE
Lloh10:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh11:
	adrp	x10, l_.str.3@PAGE
Lloh12:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	x8, x21
	csel	x4, x10, x9, eq
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x3, x21
	bl	_GEM_TRACE
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_wait_for_timelines
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_lockdep_assert_held
	mov	x0, x19
	bl	_i915_retire_requests
LBB0_4:
	mov	w0, #0
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flags=%x (%s), timeout=%ld%s\n"

	.comm	_I915_WAIT_LOCKED,4,2           ; @I915_WAIT_LOCKED
l_.str.1:                               ; @.str.1
	.asciz	"locked"

l_.str.2:                               ; @.str.2
	.asciz	"unlocked"

	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ; @MAX_SCHEDULE_TIMEOUT
l_.str.3:                               ; @.str.3
	.asciz	" (forever)"

l_.str.4:                               ; @.str.4
	.space	1

.subsections_via_symbols
