	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_driver_unload
_vmw_driver_unload:                     ## @vmw_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_vmw_priv
	movq	%rax, %r12
	leaq	96(%rax), %rdi
	callq	_unregister_pm_notifier
	cmpq	$0, 32(%r12)
	je	LBB0_2
## %bb.1:
	leaq	28(%r12), %rdi
	callq	_drm_ht_remove
LBB0_2:
	movl	24(%r12), %edi
	callq	_vfree
	cmpq	$0, 88(%r12)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_vmw_fb_off
	movq	%r12, %rdi
	callq	_vmw_fb_close
	movq	%r12, %rdi
	callq	_vmw_fifo_resource_dec
	movq	%r12, %rdi
	callq	_vmw_svga_disable
LBB0_4:
	movq	%r12, %rdi
	callq	_vmw_kms_close
	movq	%r12, %rdi
	callq	_vmw_overlay_close
	cmpq	$0, 80(%r12)
	je	LBB0_6
## %bb.5:
	leaq	64(%r12), %rdi
	movq	_VMW_PL_GMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ttm_bo_clean_mm
LBB0_6:
	leaq	64(%r12), %r15
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ttm_bo_clean_mm
	movq	%r12, %rdi
	callq	_vmw_release_device_early
	cmpq	$0, 72(%r12)
	je	LBB0_8
## %bb.7:
	movq	_VMW_PL_MOB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ttm_bo_clean_mm
LBB0_8:
	movq	%r15, %rdi
	callq	_ttm_bo_device_release
	movq	%r12, %rdi
	callq	_vmw_release_device_late
	movl	60(%r12), %edi
	callq	_vmw_fence_manager_takedown
	movq	_SVGA_CAP_IRQMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.9:
	movl	56(%r12), %edi
	callq	_vmw_irq_uninstall
LBB0_10:
	cmpq	$0, 48(%r12)
	movl	(%r14), %edi
	je	LBB0_12
## %bb.11:
	movl	$2, %esi
	callq	_pci_release_region
	jmp	LBB0_13
LBB0_12:
	callq	_pci_release_regions
LBB0_13:
	movq	%r12, %rdi
	addq	$44, %rdi
	callq	_ttm_object_device_release
	movl	40(%r12), %edi
	callq	_memunmap
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_vmw_binding_state_free
LBB0_15:
	movq	_vmw_res_context@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_vmw_res_max@GOTPCREL(%rip), %r14
	cmpl	(%r14), %r15d
	jae	LBB0_18
## %bb.16:
	leaq	(,%r15,4), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	callq	_idr_destroy
	incq	%r15
	movl	(%r14), %eax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jb	LBB0_17
LBB0_18:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VMW_PL_GMR,4,2                 ## @VMW_PL_GMR
	.comm	_TTM_PL_VRAM,4,2                ## @TTM_PL_VRAM
	.comm	_VMW_PL_MOB,4,2                 ## @VMW_PL_MOB
	.comm	_SVGA_CAP_IRQMASK,4,2           ## @SVGA_CAP_IRQMASK
	.comm	_vmw_res_context,4,2            ## @vmw_res_context
	.comm	_vmw_res_max,4,2                ## @vmw_res_max
	.no_dead_strip	_vmw_driver_unload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_driver_unload
_vmw_driver_unload:                     ; @vmw_driver_unload
	.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	_vmw_priv
	mov	x19, x0
	add	x0, x0, #96
	bl	_unregister_pm_notifier
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x19, #28
	bl	_drm_ht_remove
LBB0_2:
	ldr	w0, [x19, #24]
	bl	_vfree
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_vmw_fb_off
	mov	x0, x19
	bl	_vmw_fb_close
	mov	x0, x19
	bl	_vmw_fifo_resource_dec
	mov	x0, x19
	bl	_vmw_svga_disable
LBB0_4:
	mov	x0, x19
	bl	_vmw_kms_close
	mov	x0, x19
	bl	_vmw_overlay_close
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_6
; %bb.5:
	add	x0, x19, #64
Lloh0:
	adrp	x8, _VMW_PL_GMR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMW_PL_GMR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ttm_bo_clean_mm
LBB0_6:
	add	x21, x19, #64
Lloh3:
	adrp	x8, _TTM_PL_VRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ttm_bo_clean_mm
	mov	x0, x19
	bl	_vmw_release_device_early
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _VMW_PL_MOB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VMW_PL_MOB@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ttm_bo_clean_mm
LBB0_8:
	mov	x0, x21
	bl	_ttm_bo_device_release
	mov	x0, x19
	bl	_vmw_release_device_late
	ldr	w0, [x19, #60]
	bl	_vmw_fence_manager_takedown
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _SVGA_CAP_IRQMASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SVGA_CAP_IRQMASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19, #56]
	bl	_vmw_irq_uninstall
LBB0_10:
	ldr	x8, [x19, #48]
	ldr	w0, [x20]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w1, #2
	bl	_pci_release_region
	b	LBB0_13
LBB0_12:
	bl	_pci_release_regions
LBB0_13:
	add	x0, x19, #44
	bl	_ttm_object_device_release
	ldr	w0, [x19, #40]
	bl	_memunmap
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_vmw_binding_state_free
LBB0_15:
Lloh12:
	adrp	x8, _vmw_res_context@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vmw_res_context@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
Lloh15:
	adrp	x21, _vmw_res_max@GOTPAGE
Lloh16:
	ldr	x21, [x21, _vmw_res_max@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w20, w8
	b.hs	LBB0_18
; %bb.16:
	lsl	x22, x20, #2
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x22
	bl	_idr_destroy
	add	x20, x20, #1
	ldr	w8, [x21]
	add	x22, x22, #4
	cmp	x20, x8
	b.lo	LBB0_17
LBB0_18:
	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	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_VMW_PL_GMR,4,2                 ; @VMW_PL_GMR
	.comm	_TTM_PL_VRAM,4,2                ; @TTM_PL_VRAM
	.comm	_VMW_PL_MOB,4,2                 ; @VMW_PL_MOB
	.comm	_SVGA_CAP_IRQMASK,4,2           ; @SVGA_CAP_IRQMASK
	.comm	_vmw_res_context,4,2            ; @vmw_res_context
	.comm	_vmw_res_max,4,2                ; @vmw_res_max
	.no_dead_strip	_vmw_driver_unload
.subsections_via_symbols
