	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function vmw_surface_dma_encode
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_vmw_surface_dma_encode:                ## @vmw_surface_dma_encode
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	32(%rdi), %edi
	callq	_svga3dsurface_get_desc
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.1:
	movq	%rax, %rcx
	addq	$132, %rbx
	movl	$8, %r15d
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %ecx
	movl	%ecx, -20(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -76(%rbx)
	movups	%xmm0, -60(%rbx)
	movups	%xmm0, -44(%rbx)
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	8(%rdx,%r13), %ecx
	movl	%ecx, -84(%rbx)
	movl	4(%rdx,%r13), %ecx
	movl	%ecx, -88(%rbx)
	movl	(%rdx,%r13), %ecx
	movl	%ecx, -92(%rbx)
	movl	$40, -132(%rbx)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_svga3dsurface_get_image_buffer_size
	movl	%eax, -100(%rbx)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, -124(%rbx)
	movq	$0, -108(%rbx)
	addq	$12, %r13
	addq	$16, %r15
	addq	$136, %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpq	(%r14), %rax
	movq	%r12, %rcx
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %rax
	movq	24(%r14), %r12
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r13), %rsi
	movq	_SVGA_3D_CMD_SURFACE_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	$128, -4(%rbx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	addl	(%r12,%r15), %eax
	movl	%eax, -24(%rbx)
	movq	%rcx, %rdi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	callq	_svga3dsurface_calculate_pitch
	movl	%eax, -28(%rbx)
	movl	8(%r14), %ecx
	movl	%ecx, -8(%rbx)
	movl	-4(%r12,%r15), %ecx
	movl	%ecx, -12(%rbx)
	movl	-8(%r12,%r15), %ecx
	movl	%ecx, -16(%rbx)
	movq	_SVGA3D_WRITE_HOST_VRAM@GOTPCREL(%rip), %rcx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SVGA3D_READ_HOST_VRAM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_5:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_3D_CMD_SURFACE_DMA,4,2    ## @SVGA_3D_CMD_SURFACE_DMA
	.comm	_SVGA3D_WRITE_HOST_VRAM,4,2     ## @SVGA3D_WRITE_HOST_VRAM
	.comm	_SVGA3D_READ_HOST_VRAM,4,2      ## @SVGA3D_READ_HOST_VRAM
	.no_dead_strip	_vmw_surface_dma_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_surface_dma_encode
_vmw_surface_dma_encode:                ; @vmw_surface_dma_encode
	.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, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
	ldr	w0, [x0, #32]
	bl	_svga3dsurface_get_desc
	ldr	x8, [x21]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x22, x0
	mov	x24, #0
	mov	x25, #0
	mov	x26, #0
	add	x27, x23, #132
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x21, #16]
	add	x23, x9, x25
Lloh0:
	adrp	x9, _SVGA_3D_CMD_SURFACE_DMA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SVGA_3D_CMD_SURFACE_DMA@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
	mov	w9, #128
	stp	w9, w10, [x27, #-4]
	ldr	w9, [x20]
	add	x28, x8, x24
	ldr	w8, [x28, #8]
	add	w8, w9, w8
	stur	w8, [x27, #-24]
	mov	x0, x22
	mov	x1, x23
	bl	_svga3dsurface_calculate_pitch
	mov	x2, x0
	stur	w0, [x27, #-28]
	ldr	w8, [x21, #8]
	stur	w8, [x27, #-8]
	ldr	d0, [x28]
	stur	d0, [x27, #-16]
	cmp	w19, #0
Lloh3:
	adrp	x8, _SVGA3D_WRITE_HOST_VRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVGA3D_WRITE_HOST_VRAM@GOTPAGEOFF]
Lloh5:
	adrp	x9, _SVGA3D_READ_HOST_VRAM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SVGA3D_READ_HOST_VRAM@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	stur	w8, [x27, #-20]
	movi.2d	v0, #0000000000000000
	stur	q0, [x27, #-76]
	stur	q0, [x27, #-60]
	stur	q0, [x27, #-44]
	ldr	w8, [x23, #8]
	stur	w8, [x27, #-84]
	ldr	d0, [x23]
	stur	d0, [x27, #-92]
	mov	w8, #40
	stur	w8, [x27, #-132]
	mov	x0, x22
	mov	x1, x23
	bl	_svga3dsurface_get_image_buffer_size
	stur	w0, [x27, #-100]
	add	x26, x26, #1
	stur	xzr, [x27, #-108]
	stur	xzr, [x27, #-116]
	stur	xzr, [x27, #-124]
	ldr	x8, [x21]
	add	x25, x25, #12
	add	x24, x24, #16
	add	x27, x27, #136
	cmp	x26, x8
	b.lo	LBB0_2
LBB0_3:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_3D_CMD_SURFACE_DMA,4,2    ; @SVGA_3D_CMD_SURFACE_DMA
	.comm	_SVGA3D_WRITE_HOST_VRAM,4,2     ; @SVGA3D_WRITE_HOST_VRAM
	.comm	_SVGA3D_READ_HOST_VRAM,4,2      ; @SVGA3D_READ_HOST_VRAM
	.no_dead_strip	_vmw_surface_dma_encode
.subsections_via_symbols
