	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_ldu_init_display       ## -- Begin function vmw_kms_ldu_init_display
	.p2align	4, 0x90
_vmw_kms_ldu_init_display:              ## @vmw_kms_ldu_init_display
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_INFO
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdi, %r15
	movq	24(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	addq	$24, %rax
	movq	%rax, %rdi
	callq	_INIT_LIST_HEAD
	movq	8(%r15), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	movq	_SVGA_CAP_MULTIMON@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	_VMWGFX_NUM_DISPLAY_UNITS@GOTPCREL(%rip), %r12
	movl	$1, %esi
	andl	(%r15), %eax
	je	LBB0_7
## %bb.6:
	movl	(%r12), %esi
LBB0_7:
	movq	%r14, %rdi
	callq	_drm_vblank_init
	testl	%eax, %eax
	je	LBB0_8
## %bb.14:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	callq	_kfree
	movq	$0, 8(%r15)
	jmp	LBB0_15
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_8:
	movq	%r15, %rdi
	callq	_vmw_kms_create_implicit_placement_property
	movl	(%r13), %eax
	testl	%eax, (%r15)
	je	LBB0_12
## %bb.9:
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_vmw_ldu_init
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_11
	jmp	LBB0_13
LBB0_12:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_vmw_ldu_init
LBB0_13:
	movq	_vmw_du_legacy@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_INFO
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ldu system already on\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SVGA_CAP_MULTIMON,4,2          ## @SVGA_CAP_MULTIMON
	.comm	_VMWGFX_NUM_DISPLAY_UNITS,4,2   ## @VMWGFX_NUM_DISPLAY_UNITS
	.comm	_vmw_du_legacy,4,2              ## @vmw_du_legacy
L_.str.1:                               ## @.str.1
	.asciz	"Legacy Display Unit initialized\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_ldu_init_display       ; -- Begin function vmw_kms_ldu_init_display
	.p2align	2
_vmw_kms_ldu_init_display:              ; @vmw_kms_ldu_init_display
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_INFO
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x0
	ldr	x20, [x0, #24]
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.5:
	add	x0, x0, #24
	bl	_INIT_LIST_HEAD
	ldr	x8, [x19, #8]
	stp	xzr, xzr, [x8, #8]
	str	xzr, [x8]
	ldr	w8, [x19]
Lloh7:
	adrp	x22, _SVGA_CAP_MULTIMON@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SVGA_CAP_MULTIMON@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh9:
	adrp	x21, _VMWGFX_NUM_DISPLAY_UNITS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _VMWGFX_NUM_DISPLAY_UNITS@GOTPAGEOFF]
	ldr	w10, [x21]
	tst	w9, w8
	csinc	w1, w10, wzr, ne
	mov	x0, x20
	bl	_drm_vblank_init
	cbz	w0, LBB0_8
; %bb.6:
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
	b	LBB0_3
LBB0_7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	mov	x0, x19
	bl	_vmw_kms_create_implicit_placement_property
	ldr	w8, [x19]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.9:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
	mov	w20, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_vmw_ldu_init
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_11
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	mov	w1, #0
	bl	_vmw_ldu_init
LBB0_13:
Lloh13:
	adrp	x8, _vmw_du_legacy@GOTPAGE
Lloh14:
	ldr	x8, [x8, _vmw_du_legacy@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_INFO
	mov	w20, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ldu system already on\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SVGA_CAP_MULTIMON,4,2          ; @SVGA_CAP_MULTIMON
	.comm	_VMWGFX_NUM_DISPLAY_UNITS,4,2   ; @VMWGFX_NUM_DISPLAY_UNITS
	.comm	_vmw_du_legacy,4,2              ; @vmw_du_legacy
l_.str.1:                               ; @.str.1
	.asciz	"Legacy Display Unit initialized\n"

.subsections_via_symbols
