	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_create_bo_proxy
_vmw_create_bo_proxy:                   ## @vmw_create_bo_proxy
	.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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	$0, -40(%rbp)
	movl	(%rsi), %eax
	movl	$4, %ebx
	movq	_SVGA3D_X8R8G8B8@GOTPCREL(%rip), %rcx
	cmpl	$128, %eax
	jle	LBB0_1
## %bb.3:
	leal	-129(%rax), %edx
	cmpl	$2, %edx
	jae	LBB0_4
## %bb.6:
	movl	$2, %ebx
	movq	_SVGA3D_R5G6B5@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_1:
	cmpl	$8, %eax
	je	LBB0_11
## %bb.2:
	cmpl	$128, %eax
	je	LBB0_7
	jmp	LBB0_5
LBB0_4:
	cmpl	$131, %eax
	je	LBB0_7
LBB0_5:
	leaq	-56(%rbp), %rsi
	movl	%eax, %edi
	callq	_drm_get_format_name
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_11:
	movl	$1, %ebx
	movq	_SVGA3D_P8@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movq	8(%rsi), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, -48(%rbp)
	movl	16(%rsi), %eax
	movl	%eax, -40(%rbp)
	movl	$1, -44(%rbp)
	movq	_SVGA3D_MS_PATTERN_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SVGA3D_MS_QUALITY_NONE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movups	-48(%rbp), %xmm0
	movups	%xmm0, 16(%rsp)
	movq	%r15, 48(%rsp)
	movl	%edx, 40(%rsp)
	movl	%eax, 32(%rsp)
	movl	$0, 8(%rsp)
	movl	$0, (%rsp)
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_vmw_surface_gb_priv_define
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	%ebx, %r12d
	jmp	LBB0_10
LBB0_9:
	movq	(%r15), %rbx
	movq	(%rbx), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_vmw_resource_reserve
	leaq	16(%rbx), %rdi
	callq	_vmw_bo_unreference
	movq	%r14, %rdi
	callq	_vmw_bo_reference
	movl	%eax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_vmw_resource_unreserve
	movq	(%rbx), %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%r12d, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA3D_X8R8G8B8,4,2            ## @SVGA3D_X8R8G8B8
	.comm	_SVGA3D_R5G6B5,4,2              ## @SVGA3D_R5G6B5
	.comm	_SVGA3D_P8,4,2                  ## @SVGA3D_P8
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid framebuffer format %s\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	"Failed to allocate proxy content buffer\n"

	.no_dead_strip	_vmw_create_bo_proxy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_create_bo_proxy
_vmw_create_bo_proxy:                   ; @vmw_create_bo_proxy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x3
	mov	x19, x2
	ldr	w8, [x1]
	mov	w9, #4
Lloh0:
	adrp	x10, _SVGA3D_X8R8G8B8@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SVGA3D_X8R8G8B8@GOTPAGEOFF]
	cmp	w8, #128
	b.le	LBB0_3
; %bb.1:
	sub	w11, w8, #129
	cmp	w11, #2
	b.hs	LBB0_5
; %bb.2:
	mov	w9, #2
Lloh2:
	adrp	x10, _SVGA3D_R5G6B5@GOTPAGE
Lloh3:
	ldr	x10, [x10, _SVGA3D_R5G6B5@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	cmp	w8, #8
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #128
	b.eq	LBB0_8
	b	LBB0_6
LBB0_5:
	cmp	w8, #131
	b.eq	LBB0_8
LBB0_6:
	add	x1, sp, #40
	mov	x0, x8
	bl	_drm_get_format_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_7:
	mov	w9, #1
Lloh9:
	adrp	x10, _SVGA3D_P8@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SVGA3D_P8@GOTPAGEOFF]
LBB0_8:
	ldr	w3, [x10]
	ldr	x8, [x1, #8]
	ldr	w8, [x8]
	udiv	w8, w8, w9
Lloh11:
	adrp	x9, _SVGA3D_MS_PATTERN_NONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SVGA3D_MS_PATTERN_NONE@GOTPAGEOFF]
	ldr	w10, [x1, #16]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x11, _SVGA3D_MS_QUALITY_NONE@GOTPAGE
Lloh15:
	ldr	x11, [x11, _SVGA3D_MS_QUALITY_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	orr	x8, x8, #0x100000000
	str	x20, [sp, #24]
	stp	w9, w11, [sp, #16]
	stp	x8, x10, [sp]
	mov	w1, #0
	mov	w2, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	mov	w7, #0
	bl	_vmw_surface_gb_priv_define
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.9:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_11
LBB0_10:
	ldr	x20, [x20]
	ldr	x0, [x20]
	bl	_mutex_lock
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	bl	_vmw_resource_reserve
	add	x0, x20, #16
	bl	_vmw_bo_unreference
	mov	x0, x19
	bl	_vmw_bo_reference
	str	w0, [x20, #16]
	str	xzr, [x20, #8]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_vmw_resource_unreserve
	ldr	x0, [x20]
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA3D_X8R8G8B8,4,2            ; @SVGA3D_X8R8G8B8
	.comm	_SVGA3D_R5G6B5,4,2              ; @SVGA3D_R5G6B5
	.comm	_SVGA3D_P8,4,2                  ; @SVGA3D_P8
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid framebuffer format %s\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	"Failed to allocate proxy content buffer\n"

	.no_dead_strip	_vmw_create_bo_proxy
.subsections_via_symbols
