	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_kms_new_framebuffer_surface
_vmw_kms_new_framebuffer_surface:       ## @vmw_kms_new_framebuffer_surface
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rsi, -72(%rbp)
	movq	(%rdi), %rax
	movq	_vmw_du_legacy@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rdi), %r14
	xorl	%edi, %edi
	cmpl	$0, 40(%rsi)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movl	$1, %edi
	cmpl	$1, (%rax)
	jne	LBB0_12
## %bb.8:
	cmpl	$1, 8(%rbx)
	jne	LBB0_12
## %bb.9:
	movq	16(%rbx), %rax
	cmpq	(%r13), %rax
	jl	LBB0_12
## %bb.10:
	movq	24(%rbx), %rax
	cmpq	8(%r13), %rax
	jl	LBB0_12
## %bb.11:
	xorl	%edi, %edi
	cmpl	$1, 32(%rbx)
	setne	%dil
LBB0_12:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	leaq	L_.str(%rip), %rdi
LBB0_14:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_22
LBB0_15:
	movl	16(%r13), %edi
	leal	-128(%rdi), %eax
	cmpl	$4, %eax
	jae	LBB0_21
## %bb.16:
	cmpl	$0, 8(%r12)
	jne	LBB0_18
## %bb.17:
	cltq
	leaq	l_switch.table.vmw_kms_new_framebuffer_surface(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	cmpl	12(%rbx), %eax
	jne	LBB0_24
LBB0_18:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.19:
	movq	%rax, %r14
	movq	%rax, %r12
	addq	$4, %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	movq	%rbx, %rdi
	callq	_vmw_surface_reference
	movl	%eax, 12(%r14)
	movq	24(%r13), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movq	%r12, (%r15)
	movq	_vmw_framebuffer_surface_funcs@GOTPCREL(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	je	LBB0_25
## %bb.20:
	movl	%eax, %ebx
	leaq	-72(%rbp), %rdi
	callq	_vmw_surface_unreference
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_6
LBB0_21:
	leaq	-64(%rbp), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_drm_get_format_name
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_23:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_24:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_14
LBB0_25:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_vmw_du_legacy,8,3              ## @vmw_du_legacy
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incompatible surface dimensions for requested mode.\n"

	.comm	_SVGA3D_A8R8G8B8,4,2            ## @SVGA3D_A8R8G8B8
	.comm	_SVGA3D_X8R8G8B8,4,2            ## @SVGA3D_X8R8G8B8
	.comm	_SVGA3D_R5G6B5,4,2              ## @SVGA3D_R5G6B5
	.comm	_SVGA3D_A1R5G5B5,4,2            ## @SVGA3D_A1R5G5B5
L_.str.1:                               ## @.str.1
	.asciz	"Invalid pixel format: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid surface format for requested mode.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_framebuffer_surface_funcs,4,2 ## @vmw_framebuffer_surface_funcs
	.no_dead_strip	_vmw_kms_new_framebuffer_surface
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.vmw_kms_new_framebuffer_surface
l_switch.table.vmw_kms_new_framebuffer_surface:
	.quad	_SVGA3D_X8R8G8B8
	.quad	_SVGA3D_A1R5G5B5
	.quad	_SVGA3D_R5G6B5
	.quad	_SVGA3D_A8R8G8B8

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_kms_new_framebuffer_surface
_vmw_kms_new_framebuffer_surface:       ; @vmw_kms_new_framebuffer_surface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	x1, [sp, #24]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _vmw_du_legacy@GOTPAGE
Lloh1:
	ldr	x9, [x9, _vmw_du_legacy@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_19
LBB0_2:
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x23, x1
	mov	x24, x0
	ldr	x22, [x0, #16]
	ldr	w8, [x1, #40]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_18
; %bb.3:
	ldr	x8, [x23]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x23, #8]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x23, #16]
	ldr	x9, [x21]
	cmp	x8, x9
	b.lt	LBB0_7
; %bb.6:
	ldr	x8, [x23, #24]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.ge	LBB0_9
LBB0_7:
	mov	w0, #1
	bl	_unlikely
	cbz	x0, LBB0_10
LBB0_8:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_17
LBB0_9:
	ldr	w8, [x23, #32]
	cmp	w8, #1
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_8
LBB0_10:
	ldr	w0, [x21, #16]
	sub	w8, w0, #128
	cmp	w8, #4
	b.hs	LBB0_16
; %bb.11:
	ldr	w9, [x24, #8]
	cbnz	w9, LBB0_13
; %bb.12:
Lloh7:
	adrp	x9, l_switch.table.vmw_kms_new_framebuffer_surface@PAGE
Lloh8:
	add	x9, x9, l_switch.table.vmw_kms_new_framebuffer_surface@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	ldr	w9, [x23, #12]
	cmp	w8, w9
	b.ne	LBB0_22
LBB0_13:
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_21
; %bb.14:
	mov	x24, x0
	add	x25, x0, #4
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	bl	_drm_helper_mode_fill_fb_struct
	mov	x0, x23
	bl	_vmw_surface_reference
	str	w0, [x24, #12]
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
	str	w8, [x24, #8]
	str	w19, [x24]
	str	x25, [x20]
Lloh12:
	adrp	x2, _vmw_framebuffer_surface_funcs@GOTPAGE
Lloh13:
	ldr	x2, [x2, _vmw_framebuffer_surface_funcs@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x25
	bl	_drm_framebuffer_init
	mov	x19, x0
	cbz	w0, LBB0_20
; %bb.15:
	add	x0, sp, #24
	bl	_vmw_surface_unreference
	mov	x0, x24
	bl	_kfree
	b	LBB0_20
LBB0_16:
	add	x1, sp, #16
	bl	_drm_get_format_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_17:
	bl	_DRM_ERROR
LBB0_18:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_21:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_19
LBB0_22:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_vmw_du_legacy,8,3              ; @vmw_du_legacy
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incompatible surface dimensions for requested mode.\n"

	.comm	_SVGA3D_A8R8G8B8,4,2            ; @SVGA3D_A8R8G8B8
	.comm	_SVGA3D_X8R8G8B8,4,2            ; @SVGA3D_X8R8G8B8
	.comm	_SVGA3D_R5G6B5,4,2              ; @SVGA3D_R5G6B5
	.comm	_SVGA3D_A1R5G5B5,4,2            ; @SVGA3D_A1R5G5B5
l_.str.1:                               ; @.str.1
	.asciz	"Invalid pixel format: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid surface format for requested mode.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_framebuffer_surface_funcs,4,2 ; @vmw_framebuffer_surface_funcs
	.no_dead_strip	_vmw_kms_new_framebuffer_surface
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.vmw_kms_new_framebuffer_surface
l_switch.table.vmw_kms_new_framebuffer_surface:
	.quad	_SVGA3D_X8R8G8B8
	.quad	_SVGA3D_A1R5G5B5
	.quad	_SVGA3D_R5G6B5
	.quad	_SVGA3D_A8R8G8B8

.subsections_via_symbols
