	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_write_svga             ## -- Begin function vmw_kms_write_svga
	.p2align	4, 0x90
_vmw_kms_write_svga:                    ## @vmw_kms_write_svga
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r15d
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	_SVGA_CAP_PITCHLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_SVGA_REG_PITCHLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_vmw_write
	jmp	LBB0_4
LBB0_2:
	movq	%rbx, %rdi
	callq	_vmw_fifo_have_pitchlock
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_SVGA_FIFO_PITCHLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r14d, %edi
	callq	_vmw_mmio_write
LBB0_4:
	movq	_SVGA_REG_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_vmw_write
	movq	_SVGA_REG_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_vmw_write
	movq	_SVGA_REG_BITS_PER_PIXEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_vmw_write
	movq	_SVGA_REG_DEPTH@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_vmw_read
	movl	%eax, %ecx
	xorl	%eax, %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r12d, %ecx
	je	LBB0_6
## %bb.5:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_vmw_read
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_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_REG_DEPTH,4,2             ## @SVGA_REG_DEPTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid depth %u for %u bpp, host expects %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_write_svga             ; -- Begin function vmw_kms_write_svga
	.p2align	2
_vmw_kms_write_svga:                    ; @vmw_kms_write_svga
	.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	x20, x5
	mov	x19, x4
	mov	x24, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _SVGA_CAP_PITCHLOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SVGA_CAP_PITCHLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _SVGA_REG_PITCHLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVGA_REG_PITCHLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x24
	bl	_vmw_write
	b	LBB0_4
LBB0_2:
	mov	x0, x21
	bl	_vmw_fifo_have_pitchlock
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _SVGA_FIFO_PITCHLOCK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SVGA_FIFO_PITCHLOCK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x24
	bl	_vmw_mmio_write
LBB0_4:
Lloh9:
	adrp	x8, _SVGA_REG_WIDTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SVGA_REG_WIDTH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x23
	bl	_vmw_write
Lloh12:
	adrp	x8, _SVGA_REG_HEIGHT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SVGA_REG_HEIGHT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x22
	bl	_vmw_write
Lloh15:
	adrp	x8, _SVGA_REG_BITS_PER_PIXEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SVGA_REG_BITS_PER_PIXEL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x19
	bl	_vmw_write
Lloh18:
	adrp	x22, _SVGA_REG_DEPTH@GOTPAGE
Lloh19:
	ldr	x22, [x22, _SVGA_REG_DEPTH@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_vmw_read
	cmp	w0, w20
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_vmw_read
	mov	x3, x0
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_DRM_ERROR
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.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_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_REG_DEPTH,4,2             ; @SVGA_REG_DEPTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid depth %u for %u bpp, host expects %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
