	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_modeset_driver_remove    ## -- Begin function intel_modeset_driver_remove
	.p2align	4, 0x90
_intel_modeset_driver_remove:           ## @intel_modeset_driver_remove
	.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	%rdi, %r14
	callq	_to_i915
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_flush_workqueue
	leaq	4(%rbx), %r15
	leaq	8(%rbx), %rdi
	callq	_flush_work
	movq	%r15, %rdi
	callq	_llist_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_intel_irq_uninstall
	movq	%r14, %rdi
	callq	_intel_hpd_poll_fini
	movq	%rbx, %rdi
	callq	_intel_fbdev_fini
	xorl	%eax, %eax
	callq	_intel_unregister_dsm_handler
	movq	%rbx, %rdi
	callq	_intel_fbc_global_disable
	xorl	%eax, %eax
	callq	_flush_scheduled_work
	movq	%rbx, %rdi
	callq	_intel_hdcp_component_fini
	movq	%r14, %rdi
	callq	_drm_mode_config_cleanup
	movq	%rbx, %rdi
	callq	_intel_overlay_cleanup
	movq	%rbx, %rdi
	callq	_intel_gmbus_teardown
	movl	(%rbx), %edi
	callq	_destroy_workqueue
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_fbc_cleanup_cfb          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_modeset_driver_remove    ; -- Begin function intel_modeset_driver_remove
	.p2align	2
_intel_modeset_driver_remove:           ; @intel_modeset_driver_remove
	.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, x0
	bl	_to_i915
	mov	x19, x0
	ldr	w0, [x0]
	bl	_flush_workqueue
	add	x21, x19, #4
	add	x0, x19, #8
	bl	_flush_work
	mov	x0, x21
	bl	_llist_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x19
	bl	_intel_irq_uninstall
	mov	x0, x20
	bl	_intel_hpd_poll_fini
	mov	x0, x19
	bl	_intel_fbdev_fini
	bl	_intel_unregister_dsm_handler
	mov	x0, x19
	bl	_intel_fbc_global_disable
	bl	_flush_scheduled_work
	mov	x0, x19
	bl	_intel_hdcp_component_fini
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	mov	x0, x19
	bl	_intel_overlay_cleanup
	mov	x0, x19
	bl	_intel_gmbus_teardown
	ldr	w0, [x19]
	bl	_destroy_workqueue
	mov	x0, x19
	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
	b	_intel_fbc_cleanup_cfb
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
