	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_is_idle           ## -- Begin function intel_engine_is_idle
	.p2align	4, 0x90
_intel_engine_is_idle:                  ## @intel_engine_is_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
	movl	32(%rdi), %edi
	callq	_intel_gt_is_wedged
	movl	$1, %r14d
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	callq	_intel_engine_pm_is_awake
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movq	%rbx, %rdi
	callq	_execlists_active
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	leaq	8(%rbx), %r15
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_synchronize_hardirq
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_local_bh_disable
	movq	%r15, %rdi
	callq	_tasklet_trylock
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	callq	___tasklet_is_enabled
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	8(%rbx), %edi
	callq	*16(%rbx)
LBB0_6:
	movq	%r15, %rdi
	callq	_tasklet_unlock
LBB0_7:
	xorl	%eax, %eax
	callq	_local_bh_enable
	movq	%r15, %rdi
	callq	_tasklet_unlock_wait
	movq	%rbx, %rdi
	callq	_execlists_active
	testq	%rax, %rax
	jne	LBB0_10
LBB0_8:
	movq	%rbx, %rdi
	callq	_RB_EMPTY_ROOT
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ring_is_idle                   ## TAILCALL
LBB0_9:
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_is_idle           ; -- Begin function intel_engine_is_idle
	.p2align	2
_intel_engine_is_idle:                  ; @intel_engine_is_idle
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_intel_gt_is_wedged
	cbz	x0, LBB0_3
LBB0_1:
	mov	w0, #1
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x19
	bl	_intel_engine_pm_is_awake
	cbz	w0, LBB0_1
; %bb.4:
	mov	x0, x19
	bl	_execlists_active
	cbz	x0, LBB0_11
; %bb.5:
	add	x20, x19, #8
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_synchronize_hardirq
	bl	_local_bh_disable
	mov	x0, x20
	bl	_tasklet_trylock
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	___tasklet_is_enabled
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19, #16]
	ldr	w0, [x19, #8]
	blr	x8
LBB0_8:
	mov	x0, x20
	bl	_tasklet_unlock
LBB0_9:
	bl	_local_bh_enable
	mov	x0, x20
	bl	_tasklet_unlock_wait
	mov	x0, x19
	bl	_execlists_active
	cbz	x0, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_2
LBB0_11:
	mov	x0, x19
	bl	_RB_EMPTY_ROOT
	cbz	w0, LBB0_2
; %bb.12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ring_is_idle
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
