	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_prepare_reset            ## -- Begin function intel_prepare_reset
	.p2align	4, 0x90
_intel_prepare_reset:                   ## @intel_prepare_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	%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, %r14
	movq	_i915_modparams@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_gpu_reset_clobbers_display
	testl	%eax, %eax
	je	LBB0_10
LBB0_2:
	leaq	20(%r14), %r15
	leaq	16(%r14), %rbx
	movq	_I915_RESET_MODESET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	8(%r14), %r12
	movq	%r12, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	callq	_smp_mb__after_atomic
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_wake_up_bit
	leaq	12(%r14), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	%r12, %rdi
	callq	_intel_gt_set_wedged
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_acquire_init
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_modeset_lock_all_ctx
	movq	_EDEADLK@GOTPCREL(%rip), %r12
	addl	(%r12), %eax
	jne	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_drm_modeset_backoff
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_modeset_lock_all_ctx
	addl	(%r12), %eax
	je	LBB0_5
LBB0_7:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_atomic_helper_duplicate_state
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.11:
	movq	%r12, %rdi
	callq	_PTR_ERR
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_8:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_atomic_helper_disable_all
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_atomic_state_put           ## TAILCALL
LBB0_9:
	movq	%r12, (%r14)
	movq	%rbx, (%r12)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i915_modparams,4,2             ## @i915_modparams
	.comm	_I915_RESET_MODESET,4,2         ## @I915_RESET_MODESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Modeset potentially stuck, unbreaking through wedging\n"

	.comm	_EDEADLK,4,2                    ## @EDEADLK
L_.str.1:                               ## @.str.1
	.asciz	"Duplicating state failed with %i\n"

L_.str.2:                               ## @.str.2
	.asciz	"Suspending crtc's failed with %i\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_prepare_reset            ; -- Begin function intel_prepare_reset
	.p2align	2
_intel_prepare_reset:                   ; @intel_prepare_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _i915_modparams@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i915_modparams@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_gpu_reset_clobbers_display
	cbz	w0, LBB0_12
LBB0_2:
	add	x21, x19, #20
	add	x20, x19, #16
Lloh3:
	adrp	x23, _I915_RESET_MODESET@GOTPAGE
Lloh4:
	ldr	x23, [x23, _I915_RESET_MODESET@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x22, x19, #8
	mov	x1, x22
	bl	_set_bit
	bl	_smp_mb__after_atomic
	ldr	w1, [x23]
	mov	x0, x22
	bl	_wake_up_bit
	add	x0, x19, #12
	bl	_atomic_read
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x22
	bl	_intel_gt_set_wedged
LBB0_4:
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	mov	w1, #0
	bl	_drm_modeset_acquire_init
	mov	x0, x21
	mov	x1, x20
	bl	_drm_modeset_lock_all_ctx
Lloh7:
	adrp	x22, _EDEADLK@GOTPAGE
Lloh8:
	ldr	x22, [x22, _EDEADLK@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_drm_modeset_backoff
	mov	x0, x21
	mov	x1, x20
	bl	_drm_modeset_lock_all_ctx
	b	LBB0_5
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_atomic_helper_duplicate_state
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_DRM_ERROR
LBB0_9:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_atomic_helper_disable_all
	cbz	w0, LBB0_11
; %bb.10:
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_drm_atomic_state_put
LBB0_11:
	str	x22, [x19]
	str	x20, [x22]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_i915_modparams,4,2             ; @i915_modparams
	.comm	_I915_RESET_MODESET,4,2         ; @I915_RESET_MODESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Modeset potentially stuck, unbreaking through wedging\n"

	.comm	_EDEADLK,4,2                    ; @EDEADLK
l_.str.1:                               ; @.str.1
	.asciz	"Duplicating state failed with %i\n"

l_.str.2:                               ; @.str.2
	.asciz	"Suspending crtc's failed with %i\n"

.subsections_via_symbols
