	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_kms_fb_create
_vmw_kms_fb_create:                     ## @vmw_kms_fb_create
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	callq	_vmw_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_vmw_fpriv
	movq	(%rax), %rbx
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	8(%r13), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ttm_base_object_lookup
	movq	%rax, %r14
	movq	%rax, -64(%rbp)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_2:
	movq	8(%r13), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_vmw_user_lookup_handle
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	cmpq	$0, -48(%rbp)
	je	LBB0_11
LBB0_10:
	leaq	-48(%rbp), %rdi
	callq	_vmw_bo_unreference
LBB0_11:
	cmpq	$0, -56(%rbp)
	je	LBB0_13
## %bb.12:
	leaq	-56(%rbp), %rdi
	callq	_vmw_surface_unreference
LBB0_13:
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	leaq	-64(%rbp), %rdi
	callq	_ttm_base_object_unref
	movl	%r12d, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_16
LBB0_4:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	jne	LBB0_7
## %bb.5:
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	%r15, %rdi
	callq	_vmw_kms_srf_ok
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:
	movq	-48(%rbp), %rsi
LBB0_7:
	movq	-56(%rbp), %rdx
	movq	_SVGA_CAP_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r15), %eax
	sete	%cl
	movq	%r15, %rdi
	movq	%r13, %r8
	callq	_vmw_kms_new_framebuffer
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	cmpq	$0, -48(%rbp)
	jne	LBB0_10
	jmp	LBB0_11
LBB0_15:
	movq	%r14, 8(%rbx)
LBB0_16:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_9:
	xorl	%r12d, %r12d
	cmpq	$0, -48(%rbp)
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not locate requested kms frame buffer.\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"Surface size cannot exceed %dx%d"

	.comm	_SVGA_CAP_3D,4,2                ## @SVGA_CAP_3D
L_.str.2:                               ## @.str.2
	.asciz	"failed to create vmw_framebuffer: %i\n"

	.no_dead_strip	_vmw_kms_fb_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_kms_fb_create
_vmw_kms_fb_create:                     ; @vmw_kms_fb_create
	.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, x2
	mov	x19, x1
	bl	_vmw_priv
	mov	x21, x0
	mov	x0, x19
	bl	_vmw_fpriv
	ldr	x22, [x0]
	stp	xzr, xzr, [sp, #32]
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	mov	x0, x22
	bl	_ttm_base_object_lookup
	mov	x19, x0
	str	x0, [sp, #24]
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
	add	x3, sp, #40
	add	x4, sp, #32
	mov	x0, x21
	mov	x1, x22
	bl	_vmw_user_lookup_handle
	cbz	w0, LBB0_9
; %bb.3:
	mov	x22, x0
	mov	x20, #0
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_5
LBB0_4:
	add	x0, sp, #32
	bl	_vmw_bo_unreference
LBB0_5:
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_7
; %bb.6:
	add	x0, sp, #40
	bl	_vmw_surface_unreference
LBB0_7:
	cbz	w22, LBB0_14
; %bb.8:
	str	x22, [sp]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	add	x0, sp, #24
	bl	_ttm_base_object_unref
	mov	x0, x22
	bl	_ERR_PTR
	mov	x20, x0
	b	LBB0_15
LBB0_9:
	ldr	x1, [sp, #32]
	cbnz	x1, LBB0_12
; %bb.10:
	ldp	w2, w1, [x20]
	mov	x0, x21
	bl	_vmw_kms_srf_ok
	cbz	w0, LBB0_16
; %bb.11:
	ldr	x1, [sp, #32]
LBB0_12:
	ldr	x2, [sp, #40]
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _SVGA_CAP_3D@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SVGA_CAP_3D@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w3, eq
	mov	x0, x21
	mov	x4, x20
	bl	_vmw_kms_new_framebuffer
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.13:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x22, x0
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_4
	b	LBB0_5
LBB0_14:
	str	x19, [x20, #8]
LBB0_15:
	mov	x0, x20
	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
LBB0_16:
	ldp	w9, w8, [x21, #4]
	stp	x8, x9, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	mov	x20, #0
LBB0_17:
	mov	w22, #0
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not locate requested kms frame buffer.\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"Surface size cannot exceed %dx%d"

	.comm	_SVGA_CAP_3D,4,2                ; @SVGA_CAP_3D
l_.str.2:                               ; @.str.2
	.asciz	"failed to create vmw_framebuffer: %i\n"

	.no_dead_strip	_vmw_kms_fb_create
.subsections_via_symbols
