	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function live_gpu_reset_workarounds
_live_gpu_reset_workarounds:            ## @live_gpu_reset_workarounds
	.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	%rdi, %rbx
	callq	_intel_has_gpu_reset
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_kernel_context
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	%r14, %rdi
	callq	_i915_gem_context_lock_engines
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movq	%rbx, %rdi
	callq	_igt_global_reset_lock
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_intel_runtime_pm_get
	movl	%eax, %r12d
	leaq	-48(%rbp), %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_reference_lists_init
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_verify_wa_lists
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_ALL_ENGINES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	callq	_intel_gt_reset
	leaq	L_.str.3(%rip), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_verify_wa_lists
	testl	%eax, %eax
	sete	%r13b
	jmp	LBB0_6
LBB0_4:
	movb	$1, %r13b
LBB0_6:
	movq	%r14, %rdi
	callq	_i915_gem_context_unlock_engines
	movq	%r14, %rdi
	callq	_kernel_context_close
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_reference_lists_fini
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_intel_runtime_pm_put
	movq	%rbx, %rdi
	callq	_igt_global_reset_unlock
	movq	_ESRCH@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	testb	%r13b, %r13b
	cmovel	%ecx, %eax
LBB0_7:
	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	"Verifying after GPU reset...\n"

L_.str.1:                               ## @.str.1
	.asciz	"before reset"

	.comm	_ALL_ENGINES,4,2                ## @ALL_ENGINES
L_.str.2:                               ## @.str.2
	.asciz	"live_workarounds"

L_.str.3:                               ## @.str.3
	.asciz	"after reset"

	.comm	_ESRCH,4,2                      ## @ESRCH
	.no_dead_strip	_live_gpu_reset_workarounds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function live_gpu_reset_workarounds
_live_gpu_reset_workarounds:            ; @live_gpu_reset_workarounds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_intel_has_gpu_reset
	cbz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_kernel_context
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_3:
	mov	x0, x20
	bl	_i915_gem_context_lock_engines
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	x0, x19
	bl	_igt_global_reset_lock
	add	x21, x19, #4
	mov	x0, x21
	bl	_intel_runtime_pm_get
	mov	x22, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_reference_lists_init
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x1, sp, #8
	mov	x0, x20
	bl	_verify_wa_lists
	cbz	w0, LBB0_5
; %bb.4:
Lloh4:
	adrp	x8, _ALL_ENGINES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ALL_ENGINES@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_intel_gt_reset
Lloh9:
	adrp	x2, l_.str.3@PAGE
Lloh10:
	add	x2, x2, l_.str.3@PAGEOFF
	add	x1, sp, #8
	mov	x0, x20
	bl	_verify_wa_lists
	cmp	w0, #0
	cset	w23, eq
	b	LBB0_6
LBB0_5:
	mov	w23, #1
LBB0_6:
	mov	x0, x20
	bl	_i915_gem_context_unlock_engines
	mov	x0, x20
	bl	_kernel_context_close
	add	x1, sp, #8
	mov	x0, x19
	bl	_reference_lists_fini
	mov	x0, x21
	mov	x1, x22
	bl	_intel_runtime_pm_put
	mov	x0, x19
	bl	_igt_global_reset_unlock
Lloh11:
	adrp	x8, _ESRCH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w23, #0
	csneg	w0, wzr, w8, eq
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Verifying after GPU reset...\n"

l_.str.1:                               ; @.str.1
	.asciz	"before reset"

	.comm	_ALL_ENGINES,4,2                ; @ALL_ENGINES
l_.str.2:                               ; @.str.2
	.asciz	"live_workarounds"

l_.str.3:                               ; @.str.3
	.asciz	"after reset"

	.comm	_ESRCH,4,2                      ; @ESRCH
	.no_dead_strip	_live_gpu_reset_workarounds
.subsections_via_symbols
