	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_driver_unload             ## -- Begin function i915_driver_unload
	.p2align	4, 0x90
_i915_driver_unload:                    ## @i915_driver_unload
	.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	(%rdi), %r12
	xorl	%eax, %eax
	callq	_intel_gpu_ips_teardown
	movq	%rbx, %rdi
	callq	_i915_teardown_sysfs
	cmpq	$0, 72(%r12)
	je	LBB0_2
## %bb.1:
	leaq	72(%r12), %rdi
	callq	_unregister_shrinker
LBB0_2:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_i915_gpu_idle
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_4:
	movq	%rbx, %rdi
	callq	_i915_gem_retire_requests
	movq	%r14, %rdi
	callq	_mutex_unlock
	leaq	68(%r12), %rdi
	callq	_cancel_delayed_work_sync
	movl	88(%r12), %edi
	callq	_io_mapping_free
	movl	64(%r12), %edi
	testl	%edi, %edi
	js	LBB0_6
## %bb.5:
	movl	80(%r12), %edx
	movl	84(%r12), %esi
	callq	_mtrr_del
	movl	$-1, 64(%r12)
LBB0_6:
	xorl	%eax, %eax
	callq	_acpi_video_unregister
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	%rbx, %rdi
	callq	_intel_fbdev_fini
	movq	%rbx, %rdi
	callq	_intel_modeset_cleanup
	leaq	56(%r12), %rdi
	callq	_cancel_work_sync
	movq	48(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	cmpq	$0, 40(%r12)
	je	LBB0_10
## %bb.9:
	leaq	40(%r12), %r15
	callq	_kfree
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
LBB0_10:
	movq	8(%rbx), %rdi
	callq	_vga_switcheroo_unregister_client
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_vga_client_register
LBB0_11:
	leaq	32(%r12), %r15
	leaq	36(%r12), %rdi
	callq	_del_timer_sync
	movq	%r15, %rdi
	callq	_cancel_work_sync
	movq	%rbx, %rdi
	callq	_i915_destroy_error_state
	movq	8(%rbx), %rdi
	cmpq	$0, (%rdi)
	je	LBB0_13
## %bb.12:
	callq	_pci_disable_msi
LBB0_13:
	movq	%rbx, %rdi
	callq	_intel_opregion_fini
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movl	20(%r12), %edi
	callq	_flush_workqueue
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_i915_gem_free_all_phys_object
	movq	%rbx, %rdi
	callq	_i915_gem_cleanup_ringbuffer
	movq	%rbx, %rdi
	callq	_i915_gem_context_fini
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_i915_gem_cleanup_aliasing_ppgtt
	movq	%rbx, %rdi
	callq	_i915_gem_cleanup_stolen
	movq	%rbx, %rdi
	callq	_I915_NEED_GFX_HWS
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	callq	_i915_free_hws
LBB0_16:
	movq	24(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.17:
	movq	8(%rbx), %rdi
	callq	_pci_iounmap
LBB0_18:
	movq	%rbx, %rdi
	callq	_intel_teardown_gmbus
	movq	%rbx, %rdi
	callq	_intel_teardown_mchbar
	movl	20(%r12), %edi
	callq	_destroy_workqueue
	leaq	16(%r12), %rdi
	callq	_pm_qos_remove_request
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_kmem_cache_destroy
LBB0_20:
	movl	(%r12), %edi
	callq	_pci_dev_put
	movq	(%rbx), %rdi
	callq	_kfree
	xorl	%eax, %eax
	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	"failed to idle hardware: %d\n"

	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_driver_unload             ; -- Begin function i915_driver_unload
	.p2align	2
_i915_driver_unload:                    ; @i915_driver_unload
	.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
	ldr	x22, [x0]
	bl	_intel_gpu_ips_teardown
	mov	x0, x19
	bl	_i915_teardown_sysfs
	mov	x0, x22
	ldr	x8, [x0, #72]!
	cbz	x8, LBB0_2
; %bb.1:
	bl	_unregister_shrinker
LBB0_2:
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_i915_gpu_idle
	cbz	w0, LBB0_4
; %bb.3:
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_4:
	mov	x0, x19
	bl	_i915_gem_retire_requests
	mov	x0, x20
	bl	_mutex_unlock
	add	x0, x22, #68
	bl	_cancel_delayed_work_sync
	ldr	w0, [x22, #88]
	bl	_io_mapping_free
	ldr	w0, [x22, #64]
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldp	w2, w1, [x22, #80]
	bl	_mtrr_del
	mov	w8, #-1
	str	w8, [x22, #64]
LBB0_6:
	bl	_acpi_video_unregister
Lloh2:
	adrp	x23, _DRIVER_MODESET@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DRIVER_MODESET@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbz	x0, LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_intel_fbdev_fini
	mov	x0, x19
	bl	_intel_modeset_cleanup
	add	x0, x22, #56
	bl	_cancel_work_sync
	ldr	x0, [x22, #48]
	cbz	x0, LBB0_10
; %bb.8:
	mov	x21, x22
	ldr	x8, [x21, #40]!
	cbz	x8, LBB0_10
; %bb.9:
	bl	_kfree
	stp	xzr, xzr, [x21]
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_vga_switcheroo_unregister_client
	ldr	x0, [x19, #8]
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_vga_client_register
LBB0_11:
	add	x21, x22, #32
	add	x0, x22, #36
	bl	_del_timer_sync
	mov	x0, x21
	bl	_cancel_work_sync
	mov	x0, x19
	bl	_i915_destroy_error_state
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_13
; %bb.12:
	bl	_pci_disable_msi
LBB0_13:
	mov	x0, x19
	bl	_intel_opregion_fini
	ldr	w1, [x23]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [x22, #20]
	bl	_flush_workqueue
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_i915_gem_free_all_phys_object
	mov	x0, x19
	bl	_i915_gem_cleanup_ringbuffer
	mov	x0, x19
	bl	_i915_gem_context_fini
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_i915_gem_cleanup_aliasing_ppgtt
	mov	x0, x19
	bl	_i915_gem_cleanup_stolen
	mov	x0, x19
	bl	_I915_NEED_GFX_HWS
	cbz	w0, LBB0_20
LBB0_15:
	ldr	x1, [x22, #24]
	cbz	x1, LBB0_17
LBB0_16:
	ldr	x0, [x19, #8]
	bl	_pci_iounmap
LBB0_17:
	mov	x0, x19
	bl	_intel_teardown_gmbus
	mov	x0, x19
	bl	_intel_teardown_mchbar
	ldr	w0, [x22, #20]
	bl	_destroy_workqueue
	add	x0, x22, #16
	bl	_pm_qos_remove_request
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_19
; %bb.18:
	bl	_kmem_cache_destroy
LBB0_19:
	ldr	w0, [x22]
	bl	_pci_dev_put
	ldr	x0, [x19]
	bl	_kfree
	mov	w0, #0
	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_20:
	mov	x0, x19
	bl	_i915_free_hws
	ldr	x1, [x22, #24]
	cbnz	x1, LBB0_16
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to idle hardware: %d\n"

	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
.subsections_via_symbols
