	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_stdu_init_display      ## -- Begin function vmw_kms_stdu_init_display
	.p2align	4, 0x90
_vmw_kms_stdu_init_display:             ## @vmw_kms_stdu_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_VMWGFX_ENABLE_SCREEN_TARGET_OTABLE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_SVGA_CAP_GBOBJECTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.3:
	movq	8(%r14), %rdi
	movq	_VMWGFX_NUM_DISPLAY_UNITS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_drm_vblank_init
	movl	%eax, %r15d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	movq	_vmw_du_screen_target@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vmw_stdu_init
	movl	%eax, %r15d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_6
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_INFO
	xorl	%r15d, %r15d
	jmp	LBB0_10
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_VMWGFX_ENABLE_SCREEN_TARGET_OTABLE,4,2 ## @VMWGFX_ENABLE_SCREEN_TARGET_OTABLE
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_SVGA_CAP_GBOBJECTS,4,2         ## @SVGA_CAP_GBOBJECTS
	.comm	_VMWGFX_NUM_DISPLAY_UNITS,4,2   ## @VMWGFX_NUM_DISPLAY_UNITS
	.comm	_vmw_du_screen_target,4,2       ## @vmw_du_screen_target
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize STDU %d"

L_.str.1:                               ## @.str.1
	.asciz	"Screen Target Display device initialized\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_kms_stdu_init_display      ; -- Begin function vmw_kms_stdu_init_display
	.p2align	2
_vmw_kms_stdu_init_display:             ; @vmw_kms_stdu_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
Lloh0:
	adrp	x8, _VMWGFX_ENABLE_SCREEN_TARGET_OTABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMWGFX_ENABLE_SCREEN_TARGET_OTABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _SVGA_CAP_GBOBJECTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SVGA_CAP_GBOBJECTS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.2:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x22, _VMWGFX_NUM_DISPLAY_UNITS@GOTPAGE
Lloh7:
	ldr	x22, [x22, _VMWGFX_NUM_DISPLAY_UNITS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_drm_vblank_init
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.3:
Lloh8:
	adrp	x8, _vmw_du_screen_target@GOTPAGE
Lloh9:
	ldr	x8, [x8, _vmw_du_screen_target@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_vmw_stdu_init
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_5
LBB0_7:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_INFO
	mov	w20, #0
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	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_10:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_VMWGFX_ENABLE_SCREEN_TARGET_OTABLE,4,2 ; @VMWGFX_ENABLE_SCREEN_TARGET_OTABLE
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_SVGA_CAP_GBOBJECTS,4,2         ; @SVGA_CAP_GBOBJECTS
	.comm	_VMWGFX_NUM_DISPLAY_UNITS,4,2   ; @VMWGFX_NUM_DISPLAY_UNITS
	.comm	_vmw_du_screen_target,4,2       ; @vmw_du_screen_target
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize STDU %d"

l_.str.1:                               ; @.str.1
	.asciz	"Screen Target Display device initialized\n"

.subsections_via_symbols
