	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_framebuffer_pin
_vmw_framebuffer_pin:                   ## @vmw_framebuffer_pin
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movl	8(%rdi), %edi
	callq	_vmw_priv
	movq	%rax, %r14
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_vmw_framebuffer_to_vfbd
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	callq	_vmw_framebuffer_to_vfbs
	movq	(%rax), %rax
LBB0_3:
	movq	(%rax), %r15
	testq	%r15, %r15
	je	LBB0_4
## %bb.5:
	movl	(%r14), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_6
## %bb.8:
	cmpq	$0, (%rbx)
	je	LBB0_9
## %bb.10:
	movq	_SVGA_CAP_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	jne	LBB0_11
## %bb.12:
	movq	_vmw_sys_placement@GOTPCREL(%rip), %rdx
	jmp	LBB0_13
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_6:
	cmpl	$130, %eax
	jne	LBB0_14
## %bb.7:
	movq	%r14, %rdi
	callq	_vmw_overlay_pause_all
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_vmw_bo_pin_in_start_of_vram
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_vmw_overlay_resume_all
	movl	%ebx, %eax
	jmp	LBB0_15
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_vmw_mob_placement@GOTPCREL(%rip), %rdx
	jmp	LBB0_13
LBB0_11:
	movq	_vmw_vram_gmr_placement@GOTPCREL(%rip), %rdx
LBB0_13:
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmw_bo_pin_in_placement        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_CAP_3D,4,2                ## @SVGA_CAP_3D
	.comm	_vmw_vram_gmr_placement,4,2     ## @vmw_vram_gmr_placement
	.comm	_vmw_sys_placement,4,2          ## @vmw_sys_placement
	.comm	_vmw_mob_placement,4,2          ## @vmw_mob_placement
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vmw_framebuffer_pin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_framebuffer_pin
_vmw_framebuffer_pin:                   ; @vmw_framebuffer_pin
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	mov	x20, x0
	ldr	w0, [x20, #8]!
	bl	_vmw_priv
	mov	x19, x0
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_vmw_framebuffer_to_vfbd
	ldr	x20, [x0]
	cbz	x20, LBB0_6
LBB0_2:
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_7
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_11
; %bb.4:
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x9, _SVGA_CAP_3D@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SVGA_CAP_3D@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _vmw_vram_gmr_placement@GOTPAGE
Lloh4:
	ldr	x10, [x10, _vmw_vram_gmr_placement@GOTPAGEOFF]
Lloh5:
	adrp	x11, _vmw_sys_placement@GOTPAGE
Lloh6:
	ldr	x11, [x11, _vmw_sys_placement@GOTPAGEOFF]
	tst	w9, w8
	csel	x2, x11, x10, eq
	b	LBB0_12
LBB0_5:
	mov	x0, x20
	bl	_vmw_framebuffer_to_vfbs
	ldr	x0, [x0]
	ldr	x20, [x0]
	cbnz	x20, LBB0_2
LBB0_6:
	mov	w0, #0
	b	LBB0_10
LBB0_7:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_vmw_overlay_pause_all
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_vmw_bo_pin_in_start_of_vram
	mov	x20, x0
	mov	x0, x19
	bl	_vmw_overlay_resume_all
	mov	x0, x20
	b	LBB0_10
LBB0_9:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh10:
	adrp	x2, _vmw_mob_placement@GOTPAGE
Lloh11:
	ldr	x2, [x2, _vmw_mob_placement@GOTPAGEOFF]
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_vmw_bo_pin_in_placement
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_CAP_3D,4,2                ; @SVGA_CAP_3D
	.comm	_vmw_vram_gmr_placement,4,2     ; @vmw_vram_gmr_placement
	.comm	_vmw_sys_placement,4,2          ; @vmw_sys_placement
	.comm	_vmw_mob_placement,4,2          ; @vmw_mob_placement
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vmw_framebuffer_pin
.subsections_via_symbols
