	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_svga_disable               ## -- Begin function vmw_svga_disable
	.p2align	4, 0x90
_vmw_svga_disable:                      ## @vmw_svga_disable
	.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, %rbx
	movl	16(%rdi), %edi
	callq	_vmw_kms_lost_device
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ttm_write_lock
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	8(%rbx), %rax
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_4
## %bb.1:
	leaq	8(%rbx), %r15
	movl	$0, (%rax,%rcx,4)
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_ttm_bo_evict_mm
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_3:
	movq	_SVGA_REG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SVGA_REG_ENABLE_HIDE@GOTPCREL(%rip), %rax
	movq	_SVGA_REG_ENABLE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_vmw_write
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_write_unlock               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_VRAM,8,3                ## @TTM_PL_VRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed evicting VRAM buffers.\n"

	.comm	_SVGA_REG_ENABLE,4,2            ## @SVGA_REG_ENABLE
	.comm	_SVGA_REG_ENABLE_HIDE,4,2       ## @SVGA_REG_ENABLE_HIDE
	.comm	_SVGA_REG_ENABLE_ENABLE,4,2     ## @SVGA_REG_ENABLE_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_svga_disable               ; -- Begin function vmw_svga_disable
	.p2align	2
_vmw_svga_disable:                      ; @vmw_svga_disable
	.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	x19, x0
	ldr	w0, [x0, #16]
	bl	_vmw_kms_lost_device
	mov	x0, x19
	mov	w1, #0
	bl	_ttm_write_lock
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock
	mov	x21, x19
	ldr	x8, [x21, #8]!
Lloh0:
	adrp	x22, _TTM_PL_VRAM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TTM_PL_VRAM@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	w10, [x8, x9, lsl #2]
	cbz	w10, LBB0_4
; %bb.1:
	str	wzr, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_spin_unlock
	ldr	x1, [x22]
	mov	x0, x21
	bl	_ttm_bo_evict_mm
	cbz	x0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_3:
Lloh4:
	adrp	x8, _SVGA_REG_ENABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SVGA_REG_ENABLE@GOTPAGEOFF]
Lloh6:
	adrp	x9, _SVGA_REG_ENABLE_HIDE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SVGA_REG_ENABLE_HIDE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	ldr	w8, [x9]
Lloh10:
	adrp	x9, _SVGA_REG_ENABLE_ENABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SVGA_REG_ENABLE_ENABLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_vmw_write
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_spin_unlock
LBB0_5:
	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	_ttm_write_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_VRAM,8,3                ; @TTM_PL_VRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed evicting VRAM buffers.\n"

	.comm	_SVGA_REG_ENABLE,4,2            ; @SVGA_REG_ENABLE
	.comm	_SVGA_REG_ENABLE_HIDE,4,2       ; @SVGA_REG_ENABLE_HIDE
	.comm	_SVGA_REG_ENABLE_ENABLE,4,2     ; @SVGA_REG_ENABLE_ENABLE
.subsections_via_symbols
