	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_finish_reset             ## -- Begin function intel_finish_reset
	.p2align	4, 0x90
_intel_finish_reset:                    ## @intel_finish_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, %rbx
	movq	_I915_RESET_MODESET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	leaq	24(%rbx), %r14
	leaq	20(%rbx), %r15
	leaq	16(%rbx), %rdi
	callq	_fetch_and_zero
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_gpu_reset_clobbers_display
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	%rbx, %rdi
	callq	_intel_pps_unlock_regs_wa
	movq	%r14, %rdi
	callq	_intel_modeset_init_hw
	movq	%rbx, %rdi
	callq	_intel_init_clock_gating
	leaq	4(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irq
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_7:
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	___intel_display_resume
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_9:
	movq	%rbx, %rdi
	callq	_intel_hpd_init
	movq	_I915_RESET_MODESET@GOTPCREL(%rip), %r13
	jmp	LBB0_10
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	___intel_display_resume
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_10:
	movq	%r12, %rdi
	callq	_drm_atomic_state_put
LBB0_11:
	movq	%r15, %rdi
	callq	_drm_modeset_drop_locks
	movq	%r15, %rdi
	callq	_drm_modeset_acquire_fini
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	(%r13), %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit_unlock               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_RESET_MODESET,4,2         ## @I915_RESET_MODESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Restoring old state failed with %i\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_finish_reset             ; -- Begin function intel_finish_reset
	.p2align	2
_intel_finish_reset:                    ; @intel_finish_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	x24, _I915_RESET_MODESET@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I915_RESET_MODESET@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_8
; %bb.1:
	add	x20, x19, #24
	add	x21, x19, #20
	add	x0, x19, #16
	bl	_fetch_and_zero
	cbz	x0, LBB0_12
; %bb.2:
	mov	x22, x0
	mov	x0, x19
	bl	_gpu_reset_clobbers_display
	cbz	w0, LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_intel_pps_unlock_regs_wa
	mov	x0, x20
	bl	_intel_modeset_init_hw
	mov	x0, x19
	bl	_intel_init_clock_gating
	add	x23, x19, #4
	mov	x0, x23
	bl	_spin_lock_irq
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	blr	x8
LBB0_5:
	mov	x0, x23
	bl	_spin_unlock_irq
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	___intel_display_resume
	cbz	w0, LBB0_7
; %bb.6:
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_7:
	mov	x0, x19
	bl	_intel_hpd_init
	b	LBB0_11
LBB0_8:
	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
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	___intel_display_resume
	cbz	w0, LBB0_11
; %bb.10:
	mov	x1, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_11:
	mov	x0, x22
	bl	_drm_atomic_state_put
LBB0_12:
	mov	x0, x21
	bl	_drm_modeset_drop_locks
	mov	x0, x21
	bl	_drm_modeset_acquire_fini
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x24]
	mov	x1, x19
	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	_clear_bit_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_RESET_MODESET,4,2         ; @I915_RESET_MODESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Restoring old state failed with %i\n"

.subsections_via_symbols
