	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_stdu_primary_plane_prepare_fb
_vmw_stdu_primary_plane_prepare_fb:     ## @vmw_stdu_primary_plane_prepare_fb
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_vmw_priv
	movq	%rax, %r15
	movq	24(%rbx), %r14
	movq	%rbx, %rdi
	callq	_vmw_plane_state_to_vps
	movq	%rax, %r13
	testq	%r14, %r14
	je	LBB0_1
## %bb.3:
	movq	16(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_vmw_framebuffer_to_vfb
	movq	%rax, %rbx
	cmpq	$0, (%rax)
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_7
LBB0_4:
	xorl	%r12d, %r12d
LBB0_5:
	cmpq	$0, (%rbx)
	jne	LBB0_6
## %bb.11:
	movq	_SEPARATE_SURFACE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_1:
	xorl	%ebx, %ebx
	cmpq	$0, 16(%r13)
	je	LBB0_34
## %bb.2:
	movq	%r13, %r14
	addq	$16, %r14
	xorl	%edi, %edi
	cmpq	$0, (%r13)
	setne	%dil
	callq	_WARN_ON
	movq	%r14, %rdi
	jmp	LBB0_33
LBB0_6:
	movq	_SEPARATE_BO@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r15d
	movq	_SAME_AS_DISPLAY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_13
## %bb.23:
	leaq	16(%r13), %rbx
	cmpq	$0, 16(%r13)
	je	LBB0_25
## %bb.24:
	xorl	%edi, %edi
	cmpq	$0, (%r13)
	setne	%dil
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_vmw_surface_unreference
LBB0_25:
	movq	(%r12), %rdi
	callq	_vmw_surface_reference
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_27
	jmp	LBB0_29
LBB0_13:
	movq	$0, -104(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -120(%rbp)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -112(%rbp)
	movl	$1, -104(%rbp)
	movq	_SEPARATE_BO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_34
LBB0_7:
	movq	%r14, %rdi
	callq	_vmw_framebuffer_to_vfbs
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 40(%rax)
	jne	LBB0_5
## %bb.9:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 48(%rax)
	jne	LBB0_5
## %bb.10:
	movq	_SAME_AS_DISPLAY@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_15:
	movq	(%r12), %rax
	movq	(%rax), %r11
	movq	8(%rax), %rsi
	movl	16(%rax), %ebx
	movl	20(%rax), %r8d
	movq	24(%rax), %r10
	movq	32(%rax), %rdx
	leaq	16(%r13), %r12
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 16(%rax)
	jne	LBB0_19
## %bb.17:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 24(%rax)
	jne	LBB0_19
## %bb.18:
	cmpq	%r11, (%rax)
	je	LBB0_22
LBB0_19:
	xorl	%edi, %edi
	cmpq	$0, (%r13)
	setne	%dil
	movq	%r11, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movq	%r10, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	callq	_WARN_ON
	movq	%r12, %rdi
	callq	_vmw_surface_unreference
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %r10                 ## 8-byte Reload
	movl	%ebx, %r8d
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	cmpq	$0, 16(%r13)
	jne	LBB0_22
LBB0_20:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	(%rsi), %r9d
	movq	-104(%rbp), %rax
	movq	%rax, 32(%rsp)
	movups	-120(%rbp), %xmm0
	movups	%xmm0, 16(%rsp)
	movq	%r12, 56(%rsp)
	movl	%ebx, 48(%rsp)
	movl	%r8d, 40(%rsp)
	movq	%r10, (%rsp)
	movl	$0, 8(%rsp)
	xorl	%esi, %esi
	movq	%r11, %rcx
	movl	$1, %r8d
	callq	_vmw_surface_gb_priv_define
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_34
LBB0_22:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_29
LBB0_27:
	addq	$8, %rax
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_vmw_resource_pin
	testl	%eax, %eax
	je	LBB0_28
## %bb.32:
	movl	%eax, %ebx
	addq	$16, %r13
	movq	%r13, %rdi
LBB0_33:
	callq	_vmw_surface_unreference
	jmp	LBB0_34
LBB0_28:
	incq	(%r13)
LBB0_29:
	movl	%r15d, 8(%r13)
	movq	_SEPARATE_BO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	(%rax), %r15d
	jne	LBB0_34
## %bb.30:
	movq	_SVGA_CAP_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	jne	LBB0_34
## %bb.31:
	movq	(%r14), %rax
	movl	(%rax), %eax
	cltd
	idivl	8(%r14)
	movl	%eax, 12(%r13)
LBB0_34:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SAME_AS_DISPLAY,4,2            ## @SAME_AS_DISPLAY
	.comm	_SEPARATE_BO,4,2                ## @SEPARATE_BO
	.comm	_SEPARATE_SURFACE,4,2           ## @SEPARATE_SURFACE
	.comm	_SVGA3D_X8R8G8B8,8,3            ## @SVGA3D_X8R8G8B8
	.comm	_SVGA3D_R5G6B5,8,3              ## @SVGA3D_R5G6B5
	.comm	_SVGA3D_P8,8,3                  ## @SVGA3D_P8
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid format\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SVGA3D_MS_PATTERN_NONE,4,2     ## @SVGA3D_MS_PATTERN_NONE
	.comm	_SVGA3D_MS_QUALITY_NONE,4,2     ## @SVGA3D_MS_QUALITY_NONE
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't allocate STDU surface.\n"

	.comm	_SVGA_CAP_3D,4,2                ## @SVGA_CAP_3D
	.no_dead_strip	_vmw_stdu_primary_plane_prepare_fb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vmw_stdu_primary_plane_prepare_fb
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vmw_stdu_primary_plane_prepare_fb:     ; @vmw_stdu_primary_plane_prepare_fb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x22, x1
	ldr	w0, [x0]
	bl	_vmw_priv
	mov	x21, x0
	ldr	x20, [x22, #24]
	mov	x0, x22
	bl	_vmw_plane_state_to_vps
	mov	x19, x0
	cbz	x20, LBB0_8
; %bb.1:
	ldp	x24, x25, [x22, #8]
	ldr	x28, [x22]
	mov	x0, x20
	bl	_vmw_framebuffer_to_vfb
	mov	x23, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x26, _SEPARATE_BO@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SEPARATE_BO@GOTPAGEOFF]
	cbz	x8, LBB0_12
; %bb.2:
	mov	x22, #0
LBB0_3:
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _SEPARATE_SURFACE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SEPARATE_SURFACE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x26, eq
LBB0_4:
	ldr	w27, [x8]
Lloh4:
	adrp	x8, _SAME_AS_DISPLAY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SAME_AS_DISPLAY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ne	LBB0_10
; %bb.5:
	mov	x23, x19
	ldr	x8, [x23, #16]!
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x23
	bl	_vmw_surface_unreference
LBB0_7:
	ldr	x0, [x22]
	bl	_vmw_surface_reference
	str	x0, [x23]
	cbnz	x0, LBB0_24
	b	LBB0_27
LBB0_8:
	mov	x20, x19
	ldr	x8, [x20, #16]!
	cbz	x8, LBB0_29
; %bb.9:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x20
	bl	_vmw_surface_unreference
	mov	w23, #0
	b	LBB0_30
LBB0_10:
	ldr	w8, [x26]
	cmp	w27, w8
	b.ne	LBB0_16
; %bb.11:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_30
LBB0_12:
	mov	x0, x20
	bl	_vmw_framebuffer_to_vfbs
	mov	x22, x0
	cbz	x0, LBB0_3
; %bb.13:
	ldr	x8, [x22]
	ldr	x9, [x8, #40]
	cmp	x9, x28
	b.ne	LBB0_3
; %bb.14:
	ldr	x8, [x8, #48]
	cmp	x8, x24
	b.ne	LBB0_3
; %bb.15:
Lloh12:
	adrp	x8, _SAME_AS_DISPLAY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAME_AS_DISPLAY@GOTPAGEOFF]
	b	LBB0_4
LBB0_16:
	ldr	x8, [x22]
	ldp	x3, x11, [x8]
	ldp	w23, w10, [x8, #16]
	ldp	x6, x2, [x8, #24]
	mov	x22, x19
	ldr	x0, [x22, #16]!
	cbz	x0, LBB0_21
; %bb.17:
	ldr	x8, [x0, #16]
	cmp	x8, x28
	b.ne	LBB0_20
; %bb.18:
	ldr	x8, [x0, #24]
	cmp	x8, x24
	b.ne	LBB0_20
; %bb.19:
	ldr	x8, [x0]
	cmp	x8, x3
	b.eq	LBB0_24
LBB0_20:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, ne
	stp	x3, x24, [sp, #40]              ; 16-byte Folded Spill
	stp	x6, x25, [sp, #24]              ; 16-byte Folded Spill
	mov	x25, x21
	mov	x21, x2
	mov	x24, x10
	mov	x26, x11
	bl	_WARN_ON
	mov	x0, x22
	bl	_vmw_surface_unreference
	mov	x11, x26
	mov	x10, x24
	mov	x2, x21
	mov	x21, x25
	ldp	x6, x25, [sp, #24]              ; 16-byte Folded Reload
	ldp	x3, x24, [sp, #40]              ; 16-byte Folded Reload
Lloh14:
	adrp	x26, _SEPARATE_BO@GOTPAGE
Lloh15:
	ldr	x26, [x26, _SEPARATE_BO@GOTPAGEOFF]
	ldr	x0, [x19, #16]
	cbnz	x0, LBB0_24
LBB0_21:
	ldr	w0, [x25]
	ldr	w5, [x11]
	stp	x28, x24, [sp, #56]
Lloh16:
	adrp	x8, lCPI0_0@PAGE
Lloh17:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #72]
	str	x22, [sp, #16]
	stp	w10, w23, [sp, #8]
	add	x8, sp, #56
	str	x8, [sp]
	mov	w1, #0
	mov	w4, #1
	mov	w7, #0
	bl	_vmw_surface_gb_priv_define
	cbz	w0, LBB0_23
; %bb.22:
	mov	x23, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_30
LBB0_23:
	ldr	x0, [x22]
	cbz	x0, LBB0_27
LBB0_24:
	add	x0, x0, #8
	mov	w1, #0
	bl	_vmw_resource_pin
	cbz	w0, LBB0_26
; %bb.25:
	mov	x23, x0
	add	x0, x19, #16
	bl	_vmw_surface_unreference
	b	LBB0_30
LBB0_26:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
LBB0_27:
	str	w27, [x19, #8]
	ldr	w8, [x26]
	cmp	w27, w8
	b.ne	LBB0_29
; %bb.28:
	ldr	w8, [x21]
Lloh20:
	adrp	x9, _SVGA_CAP_3D@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SVGA_CAP_3D@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_31
LBB0_29:
	mov	w23, #0
LBB0_30:
	mov	x0, x23
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_31:
	mov	w23, #0
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	sdiv	w8, w8, w9
	str	w8, [x19, #12]
	b	LBB0_30
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SAME_AS_DISPLAY,4,2            ; @SAME_AS_DISPLAY
	.comm	_SEPARATE_BO,4,2                ; @SEPARATE_BO
	.comm	_SEPARATE_SURFACE,4,2           ; @SEPARATE_SURFACE
	.comm	_SVGA3D_X8R8G8B8,8,3            ; @SVGA3D_X8R8G8B8
	.comm	_SVGA3D_R5G6B5,8,3              ; @SVGA3D_R5G6B5
	.comm	_SVGA3D_P8,8,3                  ; @SVGA3D_P8
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid format\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SVGA3D_MS_PATTERN_NONE,4,2     ; @SVGA3D_MS_PATTERN_NONE
	.comm	_SVGA3D_MS_QUALITY_NONE,4,2     ; @SVGA3D_MS_QUALITY_NONE
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't allocate STDU surface.\n"

	.comm	_SVGA_CAP_3D,4,2                ; @SVGA_CAP_3D
	.no_dead_strip	_vmw_stdu_primary_plane_prepare_fb
.subsections_via_symbols
