	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_engine_reset             ## -- Begin function intel_engine_reset
	.p2align	4, 0x90
_intel_engine_reset:                    ## @intel_engine_reset
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	24(%rdi), %rbx
	movl	16(%rdi), %esi
	movl	8(%rbx), %edx
	addq	$8, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_GEM_TRACE
	movq	_I915_RESET_ENGINE@GOTPCREL(%rip), %rax
	movq	40(%r15), %rdi
	addq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_test_bit
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movq	%r15, %rdi
	callq	_intel_engine_pm_get_if_awake
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_reset_prepare_engine
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	32(%r15), %rax
	movl	8(%rax), %edi
	movl	16(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rcx
	callq	_dev_notice
LBB0_4:
	movq	(%r15), %rdi
	movq	32(%r15), %rax
	shlq	$2, %rdi
	addq	(%rax), %rdi
	callq	_atomic_inc
	movq	24(%r15), %rdi
	cmpq	$0, (%rdi)
	je	LBB0_5
## %bb.6:
	movq	%r15, %rsi
	callq	_intel_guc_reset_engine
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_5:
	movq	%r15, %rdi
	callq	_intel_gt_reset_engine
LBB0_7:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	24(%r15), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	16(%r15), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %ecx
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_10
LBB0_9:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	___intel_engine_reset
	movq	%r15, %rdi
	callq	*8(%r15)
	movl	%eax, %r14d
LBB0_10:
	movq	%r15, %rdi
	callq	_intel_engine_cancel_stop_cs
	movq	%r15, %rdi
	callq	_reset_finish_engine
	movq	%r15, %rdi
	callq	_intel_engine_pm_put
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s flags=%lx\n"

	.comm	_I915_RESET_ENGINE,8,3          ## @I915_RESET_ENGINE
L_.str.1:                               ## @.str.1
	.asciz	"Resetting %s for %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"%sFailed to reset %s, ret=%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"GuC "

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	_intel_engine_reset             ; -- Begin function intel_engine_reset
	.p2align	2
_intel_engine_reset:                    ; @intel_engine_reset
	.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, x1
	mov	x19, x0
	ldr	x21, [x0, #24]
	ldr	w1, [x0, #16]
	ldr	w2, [x21, #8]!
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_GEM_TRACE
Lloh2:
	adrp	x8, _I915_RESET_ENGINE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I915_RESET_ENGINE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x19, #40]
	add	x0, x9, x8
	mov	x1, x21
	bl	_test_bit
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	mov	x0, x19
	bl	_intel_engine_pm_get_if_awake
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_reset_prepare_engine
	cbz	x20, LBB0_3
; %bb.2:
	ldr	x8, [x19, #32]
	ldr	w0, [x8, #8]
	ldr	w2, [x19, #16]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x20
	bl	_dev_notice
LBB0_3:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x0, x8, x9, lsl #2
	bl	_atomic_inc
	ldr	x0, [x19, #24]
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.4:
	mov	x1, x19
	bl	_intel_guc_reset_engine
	mov	x20, x0
	cbz	w0, LBB0_8
LBB0_5:
	ldr	x8, [x19, #24]
Lloh7:
	adrp	x9, l_.str.3@PAGE
Lloh8:
	add	x9, x9, l_.str.3@PAGEOFF
	ldr	x8, [x8]
Lloh9:
	adrp	x10, l_.str.4@PAGE
Lloh10:
	add	x10, x10, l_.str.4@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
	ldr	w2, [x19, #16]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x3, x20
	bl	_DRM_DEBUG_DRIVER
	b	LBB0_9
LBB0_6:
	mov	w20, #0
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_intel_gt_reset_engine
	mov	x20, x0
	cbnz	w0, LBB0_5
LBB0_8:
	mov	x0, x19
	mov	w1, #1
	bl	___intel_engine_reset
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
LBB0_9:
	mov	x0, x19
	bl	_intel_engine_cancel_stop_cs
	mov	x0, x19
	bl	_reset_finish_engine
	mov	x0, x19
	bl	_intel_engine_pm_put
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s flags=%lx\n"

	.comm	_I915_RESET_ENGINE,8,3          ; @I915_RESET_ENGINE
l_.str.1:                               ; @.str.1
	.asciz	"Resetting %s for %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"%sFailed to reset %s, ret=%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"GuC "

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

.subsections_via_symbols
