	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_kms_check_display_memory
_vmw_kms_check_display_memory:          ## @vmw_kms_check_display_memory
	.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, %rbx
	movl	%esi, %r15d
	callq	_vmw_priv
	movq	%rax, %r12
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.1:
	movl	%r15d, %r13d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %eax
	cmpl	%r15d, %eax
	cmovgl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_drm_rect_width
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_drm_rect_height
	imull	%r12d, %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	addl	%eax, %r14d
	addq	$16, %rbx
	decq	%r13
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	_vmw_du_screen_target@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_drm_rect_width
	cmpq	8(%r12), %rax
	jg	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_drm_rect_height
	cmpq	16(%r12), %rax
	jle	LBB0_2
LBB0_16:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_17
LBB0_7:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	jmp	LBB0_9
LBB0_8:
	shll	$2, %r14d
	shll	$2, %r15d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_9:
	movl	24(%r12), %ecx
	cmpl	%ecx, %r14d
	jle	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_17
LBB0_11:
	movq	(%r12), %rax
	movq	_vmw_du_screen_target@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_14
## %bb.12:
	movq	_SVGA_CAP_NO_BB_RESTRICTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	testl	%edx, 28(%r12)
	jne	LBB0_18
## %bb.13:
	imull	%esi, %r15d
	cmpl	%ecx, %r15d
	jg	LBB0_15
	jmp	LBB0_18
LBB0_14:
	imull	%esi, %r15d
	xorl	%eax, %eax
	cmpl	%ecx, %r15d
	jle	LBB0_18
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
LBB0_17:
	callq	_VMW_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vmw_du_screen_target,8,3       ## @vmw_du_screen_target
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Screen size not supported.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Combined output size too large.\n"

	.comm	_SVGA_CAP_NO_BB_RESTRICTION,4,2 ## @SVGA_CAP_NO_BB_RESTRICTION
L_.str.2:                               ## @.str.2
	.asciz	"Topology is beyond supported limits.\n"

	.no_dead_strip	_vmw_kms_check_display_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_kms_check_display_memory
_vmw_kms_check_display_memory:          ; @vmw_kms_check_display_memory
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	bl	_vmw_priv
	mov	x19, x0
	cmp	w20, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x23, #0
	mov	w25, #0
	mov	w24, #0
	mov	w26, w20
Lloh0:
	adrp	x27, _vmw_du_screen_target@GOTPAGE
Lloh1:
	ldr	x27, [x27, _vmw_du_screen_target@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	cmp	x8, x23
	csel	x23, x8, x23, gt
	ldr	w8, [x21, #8]
	cmp	w8, w24
	csel	w24, w8, w24, gt
	mov	x0, x21
	bl	_drm_rect_width
	mov	x22, x0
	mov	x0, x21
	bl	_drm_rect_height
	madd	w25, w0, w22, w25
	add	x21, x21, #16
	subs	x26, x26, #1
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_drm_rect_width
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.gt	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_drm_rect_height
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.le	LBB0_2
	b	LBB0_15
LBB0_6:
	mov	w8, #0
	mov	w10, #0
	mov	w23, #0
	b	LBB0_8
LBB0_7:
	lsl	w10, w25, #2
	lsl	w8, w24, #2
LBB0_8:
	ldr	w9, [x19, #24]
	cmp	w10, w9
	b.le	LBB0_10
; %bb.9:
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_10:
	ldr	x10, [x19]
Lloh6:
	adrp	x11, _vmw_du_screen_target@GOTPAGE
Lloh7:
	ldr	x11, [x11, _vmw_du_screen_target@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_13
; %bb.11:
Lloh9:
	adrp	x10, _SVGA_CAP_NO_BB_RESTRICTION@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SVGA_CAP_NO_BB_RESTRICTION@GOTPAGEOFF]
	ldr	w11, [x19, #28]
Lloh11:
	ldr	w10, [x10]
	and	w10, w10, w11
	mul	w8, w8, w23
	cmp	w10, #0
	ccmp	w8, w9, #4, eq
	b.gt	LBB0_14
LBB0_12:
	mov	w0, #0
	b	LBB0_16
LBB0_13:
	mul	w8, w8, w23
	cmp	w8, w9
	b.le	LBB0_12
LBB0_14:
Lloh12:
	adrp	x20, l_.str.2@PAGE
Lloh13:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_15:
	mov	x0, x20
	bl	_VMW_DEBUG_KMS
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_vmw_du_screen_target,8,3       ; @vmw_du_screen_target
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Screen size not supported.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Combined output size too large.\n"

	.comm	_SVGA_CAP_NO_BB_RESTRICTION,4,2 ; @SVGA_CAP_NO_BB_RESTRICTION
l_.str.2:                               ; @.str.2
	.asciz	"Topology is beyond supported limits.\n"

	.no_dead_strip	_vmw_kms_check_display_memory
.subsections_via_symbols
