	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_kms_new_framebuffer_bo
_vmw_kms_new_framebuffer_bo:            ## @vmw_kms_new_framebuffer_bo
	.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	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rsi, -64(%rbp)
	movq	8(%rdi), %r15
	movq	8(%rcx), %rax
	movl	(%rax), %eax
	imull	(%rcx), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	(%rsi), %ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	seta	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rax
	movq	_vmw_du_screen_object@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movl	16(%r14), %edi
	movl	%edi, %eax
	andl	$-4, %eax
	cmpl	$128, %eax
	jne	LBB0_11
LBB0_7:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%rax, %r13
	movq	%rax, %rbx
	addq	$4, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	movl	$1, (%r13)
	movq	%r12, %rdi
	callq	_vmw_bo_reference
	movl	%eax, 12(%r13)
	movq	24(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	_vmw_framebuffer_bo_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	%eax, %ebx
	leaq	-64(%rbp), %rdi
	callq	_vmw_bo_unreference
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_4
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_11:
	leaq	-56(%rbp), %rsi
	callq	_drm_get_format_name
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_2
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Screen buffer object size is too small for requested mode.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_vmw_du_screen_object,8,3       ## @vmw_du_screen_object
L_.str.1:                               ## @.str.1
	.asciz	"Invalid pixel format: %s\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_framebuffer_bo_funcs,4,2   ## @vmw_framebuffer_bo_funcs
	.no_dead_strip	_vmw_kms_new_framebuffer_bo
.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_bo
_vmw_kms_new_framebuffer_bo:            ; @vmw_kms_new_framebuffer_bo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	str	x1, [sp, #24]
	ldr	x20, [x0, #8]
	ldr	w8, [x3]
	ldr	x9, [x3, #8]
	ldr	w9, [x9]
	mul	w8, w9, w8
	ldr	w9, [x1]
Lloh0:
	adrp	x10, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	mul	w9, w10, w9
	cmp	w8, w9
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_DRM_ERROR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_4:
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	ldr	x8, [x23]
Lloh7:
	adrp	x9, _vmw_du_screen_object@GOTPAGE
Lloh8:
	ldr	x9, [x9, _vmw_du_screen_object@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x21, #16]
	and	w8, w0, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_11
LBB0_7:
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.8:
	mov	x23, x0
	add	x24, x0, #4
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_drm_helper_mode_fill_fb_struct
	mov	w8, #1
	str	w8, [x23]
	mov	x0, x22
	bl	_vmw_bo_reference
	str	w0, [x23, #12]
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
	str	w8, [x23, #8]
	str	x23, [x19]
Lloh13:
	adrp	x2, _vmw_framebuffer_bo_funcs@GOTPAGE
Lloh14:
	ldr	x2, [x2, _vmw_framebuffer_bo_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x24
	bl	_drm_framebuffer_init
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.9:
	add	x0, sp, #24
	bl	_vmw_bo_unreference
	mov	x0, x23
	bl	_kfree
	b	LBB0_4
LBB0_10:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
	add	x1, sp, #16
	bl	_drm_get_format_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Screen buffer object size is too small for requested mode.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_vmw_du_screen_object,8,3       ; @vmw_du_screen_object
l_.str.1:                               ; @.str.1
	.asciz	"Invalid pixel format: %s\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_framebuffer_bo_funcs,4,2   ; @vmw_framebuffer_bo_funcs
	.no_dead_strip	_vmw_kms_new_framebuffer_bo
.subsections_via_symbols
