	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_sou_primary_plane_prepare_fb
_vmw_sou_primary_plane_prepare_fb:      ## @vmw_sou_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	16(%rsi), %r14
	movq	(%rdi), %rax
	movslq	(%rax), %r15
	testq	%r15, %r15
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %r15
LBB0_2:
	movq	%rbx, %rdi
	callq	_vmw_plane_state_to_vps
	movq	%rax, %r12
	testq	%r14, %r14
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %eax
	imull	4(%rbx), %eax
	shll	$2, %eax
	movslq	%eax, %r14
	movl	(%r15), %edi
	callq	_vmw_priv
	movq	%rax, %r15
	movq	%r12, %r13
	addq	$8, %r13
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.5:
	cmpq	%r14, (%r12)
	je	LBB0_13
## %bb.6:
	movq	%r13, %rdi
	callq	_vmw_bo_unreference
	movq	$0, (%r12)
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%r15, %rdi
	callq	_vmw_svga_enable
	movq	%r15, %rdi
	callq	_vmw_overlay_pause_all
	movq	(%r13), %rsi
	movq	_vmw_vram_ne_placement@GOTPCREL(%rip), %rcx
	movq	_vmw_bo_bo_free@GOTPCREL(%rip), %r9
	movq	%r15, %rdi
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	callq	_vmw_bo_init
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_vmw_overlay_resume_all
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.10:
	movq	$0, (%r13)
	jmp	LBB0_11
LBB0_3:
	movq	%r12, %rdi
	addq	$8, %rdi
	callq	_vmw_bo_unreference
	movq	$0, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r14, (%r12)
	movq	8(%r12), %rsi
LBB0_13:
	movq	%r15, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmw_bo_pin_in_vram             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_vram_ne_placement,4,2      ## @vmw_vram_ne_placement
	.comm	_vmw_bo_bo_free,4,2             ## @vmw_bo_bo_free
	.no_dead_strip	_vmw_sou_primary_plane_prepare_fb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_sou_primary_plane_prepare_fb
_vmw_sou_primary_plane_prepare_fb:      ; @vmw_sou_primary_plane_prepare_fb
	.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, x1
	ldr	x21, [x1, #16]
	ldr	x8, [x0]
	ldrsw	x22, [x8]
	cbnz	w22, LBB0_2
; %bb.1:
	ldr	x22, [x20, #8]
LBB0_2:
	mov	x0, x20
	bl	_vmw_plane_state_to_vps
	mov	x19, x0
	cbz	x21, LBB0_9
; %bb.3:
	ldp	w8, w9, [x20]
	mul	w8, w8, w9
	lsl	w8, w8, #2
	sxtw	x21, w8
	ldr	w0, [x22]
	bl	_vmw_priv
	mov	x20, x0
	mov	x22, x19
	ldr	x1, [x22, #8]!
	cbz	x1, LBB0_6
; %bb.4:
	ldr	x8, [x19]
	cmp	x8, x21
	b.eq	LBB0_13
; %bb.5:
	mov	x0, x22
	bl	_vmw_bo_unreference
	str	xzr, [x19]
LBB0_6:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x22]
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_vmw_svga_enable
	mov	x0, x20
	bl	_vmw_overlay_pause_all
	ldr	x1, [x22]
Lloh3:
	adrp	x3, _vmw_vram_ne_placement@GOTPAGE
Lloh4:
	ldr	x3, [x3, _vmw_vram_ne_placement@GOTPAGEOFF]
Lloh5:
	adrp	x5, _vmw_bo_bo_free@GOTPAGE
Lloh6:
	ldr	x5, [x5, _vmw_bo_bo_free@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, x21
	mov	w4, #0
	bl	_vmw_bo_init
	mov	x23, x0
	mov	x0, x20
	bl	_vmw_overlay_resume_all
	cbz	w23, LBB0_12
; %bb.8:
	str	xzr, [x22]
	b	LBB0_11
LBB0_9:
	add	x0, x19, #8
	bl	_vmw_bo_unreference
	mov	w23, #0
	str	xzr, [x19]
	b	LBB0_11
LBB0_10:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_11:
	mov	x0, x23
	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
LBB0_12:
	str	x21, [x19]
	ldr	x1, [x19, #8]
LBB0_13:
	mov	x0, x20
	mov	w2, #1
	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
	b	_vmw_bo_pin_in_vram
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_vram_ne_placement,4,2      ; @vmw_vram_ne_placement
	.comm	_vmw_bo_bo_free,4,2             ; @vmw_bo_bo_free
	.no_dead_strip	_vmw_sou_primary_plane_prepare_fb
.subsections_via_symbols
