	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_du_connector_fill_modes    ## -- Begin function vmw_du_connector_fill_modes
	.p2align	4, 0x90
_vmw_du_connector_fill_modes:           ## @vmw_du_connector_fill_modes
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_vmw_connector_to_du
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_vmw_priv
	movq	%rax, %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movq	$0, -96(%rbp)
	movq	_DRM_MODE_TYPE_DRIVER@GOTPCREL(%rip), %rax
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_DRM_MODE
	addq	$64, %rsp
	movl	%eax, -128(%rbp)
	xorl	%ebx, %ebx
	cmpq	$0, 24(%r13)
	sete	-44(%rbp)                       ## 1-byte Folded Spill
	movl	20(%r13), %esi
	movq	%r15, %rdi
	callq	_min
	movq	%rax, %r15
	movl	16(%r13), %esi
	movq	%r14, %rdi
	callq	_min
	movq	%rax, %r12
	movq	(%r13), %rax
	movq	_vmw_du_screen_target@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	movl	12(%r13), %esi
	movq	%r15, %rdi
	callq	_min
	movq	%rax, %r15
	movl	8(%r13), %esi
	movq	%r12, %rdi
	callq	_min
	movq	%rax, %r12
LBB0_2:
	leaq	-128(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_mode_duplicate
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %r14
	movb	-44(%rbp), %al                  ## 1-byte Reload
	movb	%al, %bl
	addl	%ebx, %ebx
	addl	$2, %ebx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %eax
	movl	%eax, (%r14)
	movq	8(%r13), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_vmw_guess_mode_timing
	movl	(%r14), %esi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	imull	%ebx, %esi
	movq	8(%r14), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_vmw_kms_validate_mode_vram
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_drm_mode_probed_add
	jmp	LBB0_7
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_drm_mode_destroy
	xorl	%r14d, %r14d
LBB0_7:
	movq	16(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	addq	$28, %rdi
	callq	_list_del_init
	movq	16(%r13), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_mode_destroy
LBB0_9:
	movq	%r14, 16(%r13)
	movq	_vmw_kms_connector_builtin@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_17
## %bb.10:
	movl	$40, %r13d
	movq	%rbx, %rax
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r14), %rax
	leaq	(%rax,%r13), %rbx
	cmpq	$0, 16(%rax,%r13)
	leaq	40(%r13), %r13
	je	LBB0_17
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rbx), %rsi
	cmpq	%rsi, %r15
	jl	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-32(%rax,%r13), %rdx
	cmpq	%r12, %rdx
	jg	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	imull	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_vmw_kms_validate_mode_vram
	testq	%rax, %rax
	je	LBB0_11
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_drm_mode_duplicate
	testq	%rax, %rax
	je	LBB0_5
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_drm_mode_vrefresh
	movl	%eax, 24(%rbx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_drm_mode_probed_add
	jmp	LBB0_11
LBB0_17:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_drm_connector_list_update
	movq	%rbx, %rdi
	callq	_drm_mode_sort
	movl	$1, %eax
	jmp	LBB0_18
LBB0_5:
	xorl	%eax, %eax
LBB0_18:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"preferred"

	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ## @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_vmw_du_screen_target,8,3       ## @vmw_du_screen_target
	.comm	_vmw_kms_connector_builtin,8,3  ## @vmw_kms_connector_builtin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_du_connector_fill_modes    ; -- Begin function vmw_du_connector_fill_modes
	.p2align	2
_vmw_du_connector_fill_modes:           ; @vmw_du_connector_fill_modes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_vmw_connector_to_du
	mov	x24, x0
	ldr	x20, [x19, #8]
	mov	x0, x20
	bl	_vmw_priv
	mov	x21, x0
	str	xzr, [sp, #64]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
Lloh0:
	adrp	x8, _DRM_MODE_TYPE_DRIVER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_TYPE_DRIVER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
	orr	w1, w9, w8
Lloh8:
	ldr	w8, [x10]
Lloh9:
	adrp	x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	stp	xzr, xzr, [sp]
	stp	wzr, w8, [sp, #16]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_DRM_MODE
	str	w0, [sp, #32]
	ldr	x8, [x21, #24]
	cmp	x8, #0
	mov	w8, #2
	mov	w9, #4
	csel	w26, w9, w8, eq
	ldr	w1, [x21, #20]
	mov	x0, x22
	bl	_min
	mov	x22, x0
	ldr	w1, [x21, #16]
	mov	x0, x23
	bl	_min
	mov	x23, x0
	ldr	x8, [x21]
Lloh14:
	adrp	x9, _vmw_du_screen_target@GOTPAGE
Lloh15:
	ldr	x9, [x9, _vmw_du_screen_target@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x21, #12]
	mov	x0, x22
	bl	_min
	mov	x22, x0
	ldr	w1, [x21, #8]
	mov	x0, x23
	bl	_min
	mov	x23, x0
LBB0_2:
	add	x1, sp, #32
	mov	x0, x20
	bl	_drm_mode_duplicate
	cbz	x0, LBB0_15
; %bb.3:
	mov	x25, x0
	ldr	w8, [x24]
	str	w8, [x0]
	ldr	x8, [x24, #8]
	str	x8, [x0, #8]
	bl	_vmw_guess_mode_timing
	ldr	w8, [x25]
	mul	w1, w8, w26
	ldr	x2, [x25, #8]
	mov	x0, x21
	bl	_vmw_kms_validate_mode_vram
	cbz	x0, LBB0_16
; %bb.4:
	mov	x0, x19
	mov	x1, x25
	bl	_drm_mode_probed_add
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_6
LBB0_5:
	add	x0, x8, #28
	bl	_list_del_init
	ldr	x1, [x24, #16]
	mov	x0, x20
	bl	_drm_mode_destroy
LBB0_6:
	str	x25, [x24, #16]
Lloh17:
	adrp	x25, _vmw_kms_connector_builtin@GOTPAGE
Lloh18:
	ldr	x25, [x25, _vmw_kms_connector_builtin@GOTPAGEOFF]
	ldr	x24, [x25]
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_14
; %bb.7:
	mov	x27, #0
	mov	x8, x24
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x24, x0
	bl	_drm_mode_vrefresh
	str	w0, [x24, #24]
	mov	x0, x19
	mov	x1, x24
	bl	_drm_mode_probed_add
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x25]
	add	x9, x8, x27
	add	x24, x9, #40
	ldr	x9, [x9, #56]
	add	x27, x27, #40
	cbz	x9, LBB0_14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x9, [x24]
	cmp	x22, x9
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x8, x27
	ldr	x2, [x8, #8]
	cmp	x2, x23
	b.gt	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mul	w1, w9, w26
	mov	x0, x21
	bl	_vmw_kms_validate_mode_vram
	cbz	x0, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_drm_mode_duplicate
	cbnz	x0, LBB0_8
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_drm_connector_list_update
	mov	x0, x19
	bl	_drm_mode_sort
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_16:
	mov	x0, x20
	mov	x1, x25
	bl	_drm_mode_destroy
	mov	x25, #0
	ldr	x8, [x24, #16]
	cbnz	x8, LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"preferred"

	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ; @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_vmw_du_screen_target,8,3       ; @vmw_du_screen_target
	.comm	_vmw_kms_connector_builtin,8,3  ; @vmw_kms_connector_builtin
.subsections_via_symbols
