	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_surface_define_encode
_vmw_surface_define_encode:             ## @vmw_surface_define_encode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r8d
	leal	(%r8,%r8,2), %eax
	leal	32(,%rax,4), %eax
	movq	_SVGA_3D_CMD_SURFACE_DEFINE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rsi)
	movl	%eax, 32(%rsi)
	movl	40(%rdi), %eax
	movl	%eax, 24(%rsi)
	movq	32(%rdi), %rax
	movq	%rax, 16(%rsi)
	movl	24(%rdi), %eax
	movl	%eax, 8(%rsi)
	movq	_DRM_VMW_MAX_SURFACE_FACES@GOTPCREL(%rip), %r9
	cmpl	$0, (%r9)
	jle	LBB0_3
## %bb.1:
	movq	16(%rdi), %r10
	movq	(%rsi), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r10,%rcx,4), %edx
	movl	%edx, (%rax,%rcx,4)
	incq	%rcx
	movslq	(%r9), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_2
LBB0_3:
	testl	%r8d, %r8d
	jle	LBB0_9
## %bb.4:
	movq	8(%rdi), %rcx
	addq	$40, %rsi
	cmpl	$1, %r8d
	je	LBB0_7
## %bb.5:
	movl	%r8d, %edx
	andl	$-2, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rcx), %eax
	movl	%eax, 8(%rsi)
	movl	4(%rcx), %eax
	movl	%eax, 4(%rsi)
	movl	(%rcx), %eax
	movl	%eax, (%rsi)
	movl	20(%rcx), %eax
	movl	%eax, 20(%rsi)
	movl	16(%rcx), %eax
	movl	%eax, 16(%rsi)
	movl	12(%rcx), %eax
	movl	%eax, 12(%rsi)
	addq	$24, %rsi
	addq	$24, %rcx
	addl	$-2, %edx
	jne	LBB0_6
LBB0_7:
	testb	$1, %r8b
	je	LBB0_9
## %bb.8:
	movl	8(%rcx), %eax
	movl	%eax, 8(%rsi)
	movl	4(%rcx), %eax
	movl	%eax, 4(%rsi)
	movl	(%rcx), %eax
	movl	%eax, (%rsi)
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_3D_CMD_SURFACE_DEFINE,4,2 ## @SVGA_3D_CMD_SURFACE_DEFINE
	.comm	_DRM_VMW_MAX_SURFACE_FACES,4,2  ## @DRM_VMW_MAX_SURFACE_FACES
	.no_dead_strip	_vmw_surface_define_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_define_encode
_vmw_surface_define_encode:             ; @vmw_surface_define_encode
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	mov	w9, #12
	orr	w10, wzr, #0x20
	madd	w9, w8, w9, w10
Lloh0:
	adrp	x10, _SVGA_3D_CMD_SURFACE_DEFINE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SVGA_3D_CMD_SURFACE_DEFINE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	stp	w9, w10, [x1, #32]
	ldr	w9, [x0, #40]
	str	w9, [x1, #24]
	ldr	x9, [x0, #32]
	str	x9, [x1, #16]
	ldr	w9, [x0, #24]
	str	w9, [x1, #8]
Lloh3:
	adrp	x9, _DRM_VMW_MAX_SURFACE_FACES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_VMW_MAX_SURFACE_FACES@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x10, #0
	ldr	x11, [x0, #16]
	ldr	x12, [x1]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x13, x10, #2
	ldr	w14, [x11, x13]
	str	w14, [x12, x13]
	add	x10, x10, #1
	ldrsw	x13, [x9]
	cmp	x10, x13
	b.lt	LBB0_2
LBB0_3:
	subs	w10, w8, #1
	b.lt	LBB0_11
; %bb.4:
	ldr	x11, [x0, #8]
	add	x9, x1, #40
	cmp	w10, #7
	b.hs	LBB0_6
; %bb.5:
	mov	w10, #0
	mov	x12, x11
	b	LBB0_9
LBB0_6:
	add	x13, x10, #1
	and	x10, x13, #0x1fffffff8
	add	x12, x10, x10, lsl #1
	lsl	x12, x12, #2
	add	x9, x9, x12
	add	x12, x11, x12
	add	x14, x1, #88
	mov	x15, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q0, [x11]
	ldp	q3, q2, [x11, #64]
	ldp	q4, q5, [x11, #32]
	stp	q1, q0, [x14, #-48]
	stp	q4, q5, [x14, #-16]
	stp	q3, q2, [x14, #16]
	add	x14, x14, #96
	add	x11, x11, #96
	subs	x15, x15, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x13, x10
	b.eq	LBB0_11
LBB0_9:
	sub	w8, w8, w10
	add	x9, x9, #8
	add	x10, x12, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	str	w11, [x9]
	ldur	d0, [x10, #-8]
	stur	d0, [x9, #-8]
	add	x9, x9, #12
	add	x10, x10, #12
	subs	w8, w8, #1
	b.ne	LBB0_10
LBB0_11:
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_3D_CMD_SURFACE_DEFINE,4,2 ; @SVGA_3D_CMD_SURFACE_DEFINE
	.comm	_DRM_VMW_MAX_SURFACE_FACES,4,2  ; @DRM_VMW_MAX_SURFACE_FACES
	.no_dead_strip	_vmw_surface_define_encode
.subsections_via_symbols
