	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function engine_stuck
_engine_stuck:                          ## @engine_stuck
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_head_stuck
	movq	_ENGINE_DEAD@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_5
## %bb.1:
	movl	12(%rbx), %edi
	movl	$2, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movl	(%r15), %eax
	jmp	LBB0_5
LBB0_2:
	movq	_RING_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ENGINE_READ
	movl	%eax, %r14d
	movq	_RING_WAIT@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	movl	(%rbx), %r8d
	movl	4(%rbx), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%edx, %edx
	callq	_intel_gt_handle_error
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_ENGINE_WRITE
	movq	_ENGINE_WAIT_KICK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENGINE_DEAD,4,2                ## @ENGINE_DEAD
	.comm	_RING_CTL,4,2                   ## @RING_CTL
	.comm	_RING_WAIT,4,2                  ## @RING_WAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stuck wait on %s"

	.comm	_ENGINE_WAIT_KICK,4,2           ## @ENGINE_WAIT_KICK
	.no_dead_strip	_engine_stuck
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function engine_stuck
_engine_stuck:                          ; @engine_stuck
	.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
	bl	_head_stuck
Lloh0:
	adrp	x21, _ENGINE_DEAD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENGINE_DEAD@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.1:
	ldr	w0, [x19, #12]
	mov	w1, #2
	bl	_IS_GEN
	cbz	x0, LBB0_3
LBB0_2:
	ldr	w0, [x21]
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x22, _RING_CTL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RING_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ENGINE_READ
Lloh4:
	adrp	x8, _RING_WAIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RING_WAIT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.4:
	mov	x20, x0
	ldp	w1, w0, [x19, #4]
	ldr	w4, [x19]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	bl	_intel_gt_handle_error
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_ENGINE_WRITE
Lloh9:
	adrp	x8, _ENGINE_WAIT_KICK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENGINE_WAIT_KICK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENGINE_DEAD,4,2                ; @ENGINE_DEAD
	.comm	_RING_CTL,4,2                   ; @RING_CTL
	.comm	_RING_WAIT,4,2                  ; @RING_WAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stuck wait on %s"

	.comm	_ENGINE_WAIT_KICK,4,2           ; @ENGINE_WAIT_KICK
	.no_dead_strip	_engine_stuck
.subsections_via_symbols
