	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_restore_vga            ## -- Begin function vmw_kms_restore_vga
	.p2align	4, 0x90
_vmw_kms_restore_vga:                   ## @vmw_kms_restore_vga
	.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, %r14
	movq	_SVGA_REG_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rdi), %rdx
	callq	_vmw_write
	movq	_SVGA_REG_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movq	_SVGA_REG_BITS_PER_PIXEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r14), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movq	_SVGA_CAP_PITCHLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r14)
	je	LBB0_2
## %bb.1:
	movq	_SVGA_REG_PITCHLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%r14), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	jmp	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	callq	_vmw_fifo_have_pitchlock
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	32(%r14), %rdi
	movq	_SVGA_FIFO_PITCHLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	56(%r14), %rsi
	callq	_vmw_mmio_write
LBB0_4:
	movq	_SVGA_CAP_DISPLAY_TOPOLOGY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r14)
	je	LBB0_8
## %bb.5:
	cmpq	$0, 40(%r14)
	je	LBB0_8
## %bb.6:
	movl	$32, %ebx
	xorl	%r15d, %r15d
	movq	_SVGA_REG_DISPLAY_ID@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r14), %r13
	movl	(%r12), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_vmw_write
	movq	_SVGA_REG_DISPLAY_IS_PRIMARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-32(%r13,%rbx), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movq	_SVGA_REG_DISPLAY_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-24(%r13,%rbx), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movq	_SVGA_REG_DISPLAY_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-16(%r13,%rbx), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movq	_SVGA_REG_DISPLAY_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-8(%r13,%rbx), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movq	_SVGA_REG_DISPLAY_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13,%rbx), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	movl	(%r12), %esi
	movq	_SVGA_ID_INVALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	callq	_vmw_write
	incq	%r15
	addq	$40, %rbx
	cmpq	40(%r14), %r15
	jb	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_REG_WIDTH,4,2             ## @SVGA_REG_WIDTH
	.comm	_SVGA_REG_HEIGHT,4,2            ## @SVGA_REG_HEIGHT
	.comm	_SVGA_REG_BITS_PER_PIXEL,4,2    ## @SVGA_REG_BITS_PER_PIXEL
	.comm	_SVGA_CAP_PITCHLOCK,4,2         ## @SVGA_CAP_PITCHLOCK
	.comm	_SVGA_REG_PITCHLOCK,4,2         ## @SVGA_REG_PITCHLOCK
	.comm	_SVGA_FIFO_PITCHLOCK,8,3        ## @SVGA_FIFO_PITCHLOCK
	.comm	_SVGA_CAP_DISPLAY_TOPOLOGY,4,2  ## @SVGA_CAP_DISPLAY_TOPOLOGY
	.comm	_SVGA_REG_DISPLAY_ID,4,2        ## @SVGA_REG_DISPLAY_ID
	.comm	_SVGA_REG_DISPLAY_IS_PRIMARY,4,2 ## @SVGA_REG_DISPLAY_IS_PRIMARY
	.comm	_SVGA_REG_DISPLAY_POSITION_X,4,2 ## @SVGA_REG_DISPLAY_POSITION_X
	.comm	_SVGA_REG_DISPLAY_POSITION_Y,4,2 ## @SVGA_REG_DISPLAY_POSITION_Y
	.comm	_SVGA_REG_DISPLAY_WIDTH,4,2     ## @SVGA_REG_DISPLAY_WIDTH
	.comm	_SVGA_REG_DISPLAY_HEIGHT,4,2    ## @SVGA_REG_DISPLAY_HEIGHT
	.comm	_SVGA_ID_INVALID,8,3            ## @SVGA_ID_INVALID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_restore_vga            ; -- Begin function vmw_kms_restore_vga
	.p2align	2
_vmw_kms_restore_vga:                   ; @vmw_kms_restore_vga
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _SVGA_REG_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SVGA_REG_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0]
	bl	_vmw_write
Lloh3:
	adrp	x8, _SVGA_REG_HEIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVGA_REG_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	bl	_vmw_write
Lloh6:
	adrp	x8, _SVGA_REG_BITS_PER_PIXEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SVGA_REG_BITS_PER_PIXEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
	mov	x0, x19
	bl	_vmw_write
	ldr	w8, [x19, #24]
Lloh9:
	adrp	x9, _SVGA_CAP_PITCHLOCK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SVGA_CAP_PITCHLOCK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _SVGA_REG_PITCHLOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SVGA_REG_PITCHLOCK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x2, [x19, #32]
	mov	x0, x19
	bl	_vmw_write
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_vmw_fifo_have_pitchlock
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19, #32]
	ldr	x8, [x19, #56]
Lloh15:
	adrp	x9, _SVGA_FIFO_PITCHLOCK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SVGA_FIFO_PITCHLOCK@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_vmw_mmio_write
LBB0_4:
	ldr	w8, [x19, #24]
Lloh18:
	adrp	x9, _SVGA_CAP_DISPLAY_TOPOLOGY@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SVGA_CAP_DISPLAY_TOPOLOGY@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.5:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x21, #0
	mov	x20, #0
Lloh21:
	adrp	x22, _SVGA_REG_DISPLAY_ID@GOTPAGE
Lloh22:
	ldr	x22, [x22, _SVGA_REG_DISPLAY_ID@GOTPAGEOFF]
Lloh23:
	adrp	x24, _SVGA_REG_DISPLAY_POSITION_X@GOTPAGE
Lloh24:
	ldr	x24, [x24, _SVGA_REG_DISPLAY_POSITION_X@GOTPAGEOFF]
Lloh25:
	adrp	x25, _SVGA_REG_DISPLAY_POSITION_Y@GOTPAGE
Lloh26:
	ldr	x25, [x25, _SVGA_REG_DISPLAY_POSITION_Y@GOTPAGEOFF]
Lloh27:
	adrp	x26, _SVGA_REG_DISPLAY_WIDTH@GOTPAGE
Lloh28:
	ldr	x26, [x26, _SVGA_REG_DISPLAY_WIDTH@GOTPAGEOFF]
Lloh29:
	adrp	x27, _SVGA_REG_DISPLAY_HEIGHT@GOTPAGE
Lloh30:
	ldr	x27, [x27, _SVGA_REG_DISPLAY_HEIGHT@GOTPAGEOFF]
Lloh31:
	adrp	x28, _SVGA_ID_INVALID@GOTPAGE
Lloh32:
	ldr	x28, [x28, _SVGA_ID_INVALID@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19, #48]
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_vmw_write
Lloh33:
	adrp	x8, _SVGA_REG_DISPLAY_IS_PRIMARY@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SVGA_REG_DISPLAY_IS_PRIMARY@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	add	x23, x23, x21
	ldr	x2, [x23]
	mov	x0, x19
	bl	_vmw_write
	ldr	w1, [x24]
	ldr	x2, [x23, #8]
	mov	x0, x19
	bl	_vmw_write
	ldr	w1, [x25]
	ldr	x2, [x23, #16]
	mov	x0, x19
	bl	_vmw_write
	ldr	w1, [x26]
	ldr	x2, [x23, #24]
	mov	x0, x19
	bl	_vmw_write
	ldr	w1, [x27]
	ldr	x2, [x23, #32]
	mov	x0, x19
	bl	_vmw_write
	ldr	w1, [x22]
	ldr	x2, [x28]
	mov	x0, x19
	bl	_vmw_write
	add	x20, x20, #1
	ldr	x8, [x19, #40]
	add	x21, x21, #40
	cmp	x20, x8
	b.lo	LBB0_7
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_REG_WIDTH,4,2             ; @SVGA_REG_WIDTH
	.comm	_SVGA_REG_HEIGHT,4,2            ; @SVGA_REG_HEIGHT
	.comm	_SVGA_REG_BITS_PER_PIXEL,4,2    ; @SVGA_REG_BITS_PER_PIXEL
	.comm	_SVGA_CAP_PITCHLOCK,4,2         ; @SVGA_CAP_PITCHLOCK
	.comm	_SVGA_REG_PITCHLOCK,4,2         ; @SVGA_REG_PITCHLOCK
	.comm	_SVGA_FIFO_PITCHLOCK,8,3        ; @SVGA_FIFO_PITCHLOCK
	.comm	_SVGA_CAP_DISPLAY_TOPOLOGY,4,2  ; @SVGA_CAP_DISPLAY_TOPOLOGY
	.comm	_SVGA_REG_DISPLAY_ID,4,2        ; @SVGA_REG_DISPLAY_ID
	.comm	_SVGA_REG_DISPLAY_IS_PRIMARY,4,2 ; @SVGA_REG_DISPLAY_IS_PRIMARY
	.comm	_SVGA_REG_DISPLAY_POSITION_X,4,2 ; @SVGA_REG_DISPLAY_POSITION_X
	.comm	_SVGA_REG_DISPLAY_POSITION_Y,4,2 ; @SVGA_REG_DISPLAY_POSITION_Y
	.comm	_SVGA_REG_DISPLAY_WIDTH,4,2     ; @SVGA_REG_DISPLAY_WIDTH
	.comm	_SVGA_REG_DISPLAY_HEIGHT,4,2    ; @SVGA_REG_DISPLAY_HEIGHT
	.comm	_SVGA_ID_INVALID,8,3            ; @SVGA_ID_INVALID
.subsections_via_symbols
