	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ast_get_vbios_mode_info
_ast_get_vbios_mode_info:               ## @ast_get_vbios_mode_info
	.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	%rcx, %rbx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %r8
	movq	(%rax), %rsi
	movq	(%rsi), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	decl	%eax
	andl	$536870911, %eax                ## imm = 0x1FFFFFFF
	xorl	%r13d, %r13d
	leal	-2(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_5
## %bb.1:
	cmpl	$1, %eax
	je	LBB0_4
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_63
## %bb.3:
	movq	_vbios_stdtable@GOTPCREL(%rip), %rax
	movq	_VGAModeIndex@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leaq	(,%rdx,4), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%rbx)
	decq	%rdx
	jmp	LBB0_7
LBB0_5:
	movq	_vbios_stdtable@GOTPCREL(%rip), %rax
	movq	_TrueCModeIndex@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_vbios_stdtable@GOTPCREL(%rip), %rax
	movq	_HiCModeIndex@GOTPCREL(%rip), %rcx
LBB0_6:
	movq	(%rcx), %rdx
	leaq	(,%rdx,4), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%rbx)
LBB0_7:
	movl	(%rdi), %eax
	cmpl	$1359, %eax                     ## imm = 0x54F
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	jle	LBB0_8
## %bb.15:
	cmpl	$1599, %eax                     ## imm = 0x63F
	jle	LBB0_16
## %bb.19:
	cmpl	$1600, %eax                     ## imm = 0x640
	je	LBB0_29
## %bb.20:
	cmpl	$1680, %eax                     ## imm = 0x690
	je	LBB0_32
## %bb.21:
	cmpl	$1920, %eax                     ## imm = 0x780
	jne	LBB0_63
## %bb.22:
	cmpl	$1080, 4(%rdi)                  ## imm = 0x438
	jne	LBB0_23
## %bb.33:
	movq	_res_1920x1080@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_8:
	cmpl	$1023, %eax                     ## imm = 0x3FF
	jg	LBB0_11
## %bb.9:
	cmpl	$640, %eax                      ## imm = 0x280
	je	LBB0_10
## %bb.24:
	cmpl	$800, %eax                      ## imm = 0x320
	jne	LBB0_63
## %bb.25:
	movq	_res_800x600@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_11:
	cmpl	$1024, %eax                     ## imm = 0x400
	je	LBB0_26
## %bb.12:
	cmpl	$1280, %eax                     ## imm = 0x500
	jne	LBB0_63
## %bb.13:
	cmpl	$800, 4(%rdi)                   ## imm = 0x320
	jne	LBB0_14
## %bb.27:
	movq	_res_1280x800@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_16:
	cmpl	$1360, %eax                     ## imm = 0x550
	je	LBB0_28
## %bb.17:
	cmpl	$1440, %eax                     ## imm = 0x5A0
	jne	LBB0_63
## %bb.18:
	movq	_res_1440x900@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_29:
	cmpl	$900, 4(%rdi)                   ## imm = 0x384
	jne	LBB0_30
## %bb.31:
	movq	_res_1600x900@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_10:
	movq	_res_640x480@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_26:
	movq	_res_1024x768@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_28:
	movq	_res_1360x768@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_32:
	movq	_res_1680x1050@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_23:
	movq	_res_1920x1200@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_14:
	movq	_res_1280x1024@GOTPCREL(%rip), %rax
	jmp	LBB0_34
LBB0_30:
	movq	_res_1600x1200@GOTPCREL(%rip), %rax
LBB0_34:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_mode_vrefresh
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %r12d
	movq	_WideScreenMode@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	andl	%ecx, %edi
	movq	_DRM_MODE_FLAG_NVSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PVSync@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NVSync@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	movq	_PHSync@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_NHSync@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_35:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_38 Depth 2
                                        ##       Child Loop BB0_41 Depth 3
	cmpl	$255, %r12d
	jne	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=1
	xorl	%r15d, %r15d
LBB0_56:                                ##   in Loop: Header=BB0_35 Depth=1
	testq	%r15, %r15
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jne	LBB0_58
## %bb.57:                              ##   in Loop: Header=BB0_35 Depth=1
	testl	%edi, %edi
	movl	$0, %edi
	jne	LBB0_35
	jmp	LBB0_58
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	xorl	%r15d, %r15d
	jmp	LBB0_38
	.p2align	4, 0x90
LBB0_52:                                ##   in Loop: Header=BB0_38 Depth=2
	movq	%r9, %r15
LBB0_53:                                ##   in Loop: Header=BB0_38 Depth=2
	movl	92(%r9), %r12d
	addq	$88, %r9
	cmpl	$255, %r12d
	je	LBB0_56
LBB0_38:                                ##   Parent Loop BB0_35 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_41 Depth 3
	testl	%edi, %edi
	je	LBB0_49
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	%r9, %r8
	movl	%r12d, %r10d
	.p2align	4, 0x90
LBB0_41:                                ##   Parent Loop BB0_35 Depth=1
                                        ##     Parent Loop BB0_38 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	testl	%eax, %edx
	je	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_41 Depth=3
	testl	%ebx, (%r8)
	jne	LBB0_55
LBB0_43:                                ##   in Loop: Header=BB0_41 Depth=3
	testl	%eax, %ecx
	je	LBB0_45
## %bb.44:                              ##   in Loop: Header=BB0_41 Depth=3
	testl	%esi, (%r8)
	jne	LBB0_55
LBB0_45:                                ##   in Loop: Header=BB0_41 Depth=3
	testl	%eax, %r11d
	je	LBB0_47
## %bb.46:                              ##   in Loop: Header=BB0_41 Depth=3
	testl	%r13d, (%r8)
	jne	LBB0_55
LBB0_47:                                ##   in Loop: Header=BB0_41 Depth=3
	testl	%eax, -56(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_48
## %bb.54:                              ##   in Loop: Header=BB0_41 Depth=3
	testl	%r14d, (%r8)
	je	LBB0_48
LBB0_55:                                ##   in Loop: Header=BB0_41 Depth=3
	movl	92(%r8), %r10d
	cmpl	$255, %r10d
	je	LBB0_56
## %bb.40:                              ##   in Loop: Header=BB0_41 Depth=3
	addq	$88, %r8
	testl	%edi, %edi
	jne	LBB0_41
	jmp	LBB0_49
LBB0_48:                                ##   in Loop: Header=BB0_38 Depth=2
	movl	%r10d, %r12d
	movq	%r8, %r9
	.p2align	4, 0x90
LBB0_49:                                ##   in Loop: Header=BB0_38 Depth=2
	movslq	%r12d, %rax
	cmpq	%rax, -120(%rbp)                ## 8-byte Folded Reload
	jb	LBB0_53
## %bb.50:                              ##   in Loop: Header=BB0_38 Depth=2
	testq	%r15, %r15
	je	LBB0_52
## %bb.51:                              ##   in Loop: Header=BB0_38 Depth=2
	cmpl	4(%r15), %r12d
	jg	LBB0_52
	jmp	LBB0_53
LBB0_58:
	testq	%r15, %r15
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_60
## %bb.59:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movl	(%r15), %esi
	movq	%r15, %rdi
LBB0_60:
	movq	_HBorder@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%esi, %eax
	setne	%cl
	shlq	$3, %rcx
	movq	_VBorder@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	andl	(%rdx), %esi
	setne	%al
	movq	80(%rdi), %rdx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rdx, 88(%rsi)
	subq	%rcx, %rdx
	addq	72(%rdi), %rcx
	movq	%rcx, 80(%rsi)
	movq	%rdx, 72(%rsi)
	addq	64(%rdi), %rcx
	movq	%rcx, 64(%rsi)
	addq	56(%rdi), %rcx
	shlq	$3, %rax
	movq	%rcx, 56(%rsi)
	movq	48(%rdi), %rcx
	movq	%rcx, 48(%rsi)
	subq	%rax, %rcx
	addq	40(%rdi), %rax
	movq	%rax, 40(%rsi)
	movq	%rcx, 32(%rsi)
	addq	32(%rdi), %rax
	movq	%rax, 24(%rsi)
	addq	24(%rdi), %rax
	movq	%rax, 16(%rsi)
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rax
	movq	_AST1180@GOTPCREL(%rip), %rcx
	movl	$1, %r13d
	cmpq	(%rcx), %rax
	je	LBB0_63
## %bb.61:
	movzbl	16(%rdi), %r12d
	movzbl	8(%rdi), %r15d
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	shll	$4, %eax
	movzbl	%al, %ecx
	movq	%rbx, %rdi
	movl	$140, %edx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$141, %edx
	movl	%r15d, %ecx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$142, %edx
	movl	%r12d, %ecx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$145, %edx
	xorl	%ecx, %ecx
	callq	_ast_set_index_reg
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_NewModeInfo@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_63
## %bb.62:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$145, %edx
	movl	$168, %ecx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	shll	$3, %ecx
	movq	%rbx, %rdi
	movl	$146, %edx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movslq	4(%r15), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movq	%rbx, %rdi
	movl	$147, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movl	8(%r15), %ecx
	movq	%rbx, %rdi
	movl	$148, %edx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movl	8(%r15), %ecx
	sarl	$8, %ecx
	movq	%rbx, %rdi
	movl	$149, %edx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movl	12(%r15), %ecx
	movq	%rbx, %rdi
	movl	$150, %edx
	callq	_ast_set_index_reg
	movl	(%r14), %esi
	movl	12(%r15), %ecx
	sarl	$8, %ecx
	movq	%rbx, %rdi
	movl	$151, %edx
	callq	_ast_set_index_reg
LBB0_63:
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vbios_stdtable,8,3             ## @vbios_stdtable
	.comm	_VGAModeIndex,8,3               ## @VGAModeIndex
	.comm	_HiCModeIndex,8,3               ## @HiCModeIndex
	.comm	_TrueCModeIndex,8,3             ## @TrueCModeIndex
	.comm	_res_640x480,8,3                ## @res_640x480
	.comm	_res_800x600,8,3                ## @res_800x600
	.comm	_res_1024x768,8,3               ## @res_1024x768
	.comm	_res_1280x800,8,3               ## @res_1280x800
	.comm	_res_1280x1024,8,3              ## @res_1280x1024
	.comm	_res_1360x768,8,3               ## @res_1360x768
	.comm	_res_1440x900,8,3               ## @res_1440x900
	.comm	_res_1600x900,8,3               ## @res_1600x900
	.comm	_res_1600x1200,8,3              ## @res_1600x1200
	.comm	_res_1680x1050,8,3              ## @res_1680x1050
	.comm	_res_1920x1080,8,3              ## @res_1920x1080
	.comm	_res_1920x1200,8,3              ## @res_1920x1200
	.comm	_WideScreenMode,4,2             ## @WideScreenMode
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ## @DRM_MODE_FLAG_NVSYNC
	.comm	_PVSync,4,2                     ## @PVSync
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_NVSync,4,2                     ## @NVSync
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_PHSync,4,2                     ## @PHSync
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_NHSync,4,2                     ## @NHSync
	.comm	_HBorder,4,2                    ## @HBorder
	.comm	_VBorder,4,2                    ## @VBorder
	.comm	_AST1180,8,3                    ## @AST1180
	.comm	_AST_IO_CRTC_PORT,4,2           ## @AST_IO_CRTC_PORT
	.comm	_NewModeInfo,4,2                ## @NewModeInfo
	.no_dead_strip	_ast_get_vbios_mode_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ast_get_vbios_mode_info
_ast_get_vbios_mode_info:               ; @ast_get_vbios_mode_info
	.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, x3
	mov	x19, x2
	mov	x22, x1
	ldp	x9, x8, [x0, #8]
	ldr	x20, [x8]
	ldr	x24, [x9]
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldr	w8, [x8]
	sub	w8, w8, #1
	and	w8, w8, #0x1fffffff
	sub	w9, w8, #2
	cmp	w9, #2
	b.lo	LBB0_4
; %bb.1:
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.2:
	cbnz	w8, LBB0_17
; %bb.3:
Lloh0:
	adrp	x8, _vbios_stdtable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vbios_stdtable@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _VGAModeIndex@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VGAModeIndex@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #2
	str	x8, [x21, #8]
	sub	x25, x9, #1
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _vbios_stdtable@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vbios_stdtable@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _TrueCModeIndex@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TrueCModeIndex@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _vbios_stdtable@GOTPAGE
Lloh12:
	ldr	x8, [x8, _vbios_stdtable@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _HiCModeIndex@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HiCModeIndex@GOTPAGEOFF]
LBB0_6:
	ldr	x25, [x9]
	add	x8, x8, x25, lsl #2
	str	x8, [x21, #8]
LBB0_7:
	mov	w8, #0
	ldr	w9, [x0]
	cmp	w9, #1359
	b.le	LBB0_13
; %bb.8:
	cmp	w9, #1599
	b.le	LBB0_18
; %bb.9:
	cmp	w9, #1600
	b.eq	LBB0_24
; %bb.10:
	cmp	w9, #1680
	b.eq	LBB0_25
; %bb.11:
	cmp	w9, #1920
	b.ne	LBB0_59
; %bb.12:
	ldr	w8, [x0, #4]
Lloh16:
	adrp	x9, _res_1920x1200@GOTPAGE
Lloh17:
	ldr	x9, [x9, _res_1920x1200@GOTPAGEOFF]
Lloh18:
	adrp	x10, _res_1920x1080@GOTPAGE
Lloh19:
	ldr	x10, [x10, _res_1920x1080@GOTPAGEOFF]
	cmp	w8, #1080
	csel	x8, x10, x9, eq
	b	LBB0_29
LBB0_13:
	cmp	w9, #1023
	b.gt	LBB0_21
; %bb.14:
	cmp	w9, #640
	b.eq	LBB0_26
; %bb.15:
	cmp	w9, #800
	b.ne	LBB0_59
; %bb.16:
Lloh20:
	adrp	x8, _res_800x600@GOTPAGE
Lloh21:
	ldr	x8, [x8, _res_800x600@GOTPAGEOFF]
	b	LBB0_29
LBB0_17:
	mov	w8, #0
	b	LBB0_59
LBB0_18:
	cmp	w9, #1360
	b.eq	LBB0_27
; %bb.19:
	cmp	w9, #1440
	b.ne	LBB0_59
; %bb.20:
Lloh22:
	adrp	x8, _res_1440x900@GOTPAGE
Lloh23:
	ldr	x8, [x8, _res_1440x900@GOTPAGEOFF]
	b	LBB0_29
LBB0_21:
	cmp	w9, #1024
	b.eq	LBB0_28
; %bb.22:
	cmp	w9, #1280
	b.ne	LBB0_59
; %bb.23:
	ldr	w8, [x0, #4]
Lloh24:
	adrp	x9, _res_1280x1024@GOTPAGE
Lloh25:
	ldr	x9, [x9, _res_1280x1024@GOTPAGEOFF]
Lloh26:
	adrp	x10, _res_1280x800@GOTPAGE
Lloh27:
	ldr	x10, [x10, _res_1280x800@GOTPAGEOFF]
	cmp	w8, #800
	csel	x8, x10, x9, eq
	b	LBB0_29
LBB0_24:
	ldr	w8, [x0, #4]
Lloh28:
	adrp	x9, _res_1600x1200@GOTPAGE
Lloh29:
	ldr	x9, [x9, _res_1600x1200@GOTPAGEOFF]
Lloh30:
	adrp	x10, _res_1600x900@GOTPAGE
Lloh31:
	ldr	x10, [x10, _res_1600x900@GOTPAGEOFF]
	cmp	w8, #900
	csel	x8, x10, x9, eq
	b	LBB0_29
LBB0_25:
Lloh32:
	adrp	x8, _res_1680x1050@GOTPAGE
Lloh33:
	ldr	x8, [x8, _res_1680x1050@GOTPAGEOFF]
	b	LBB0_29
LBB0_26:
Lloh34:
	adrp	x8, _res_640x480@GOTPAGE
Lloh35:
	ldr	x8, [x8, _res_640x480@GOTPAGEOFF]
	b	LBB0_29
LBB0_27:
Lloh36:
	adrp	x8, _res_1360x768@GOTPAGE
Lloh37:
	ldr	x8, [x8, _res_1360x768@GOTPAGEOFF]
	b	LBB0_29
LBB0_28:
Lloh38:
	adrp	x8, _res_1024x768@GOTPAGE
Lloh39:
	ldr	x8, [x8, _res_1024x768@GOTPAGEOFF]
LBB0_29:
	ldr	x8, [x8]
	str	x8, [x21]
	mov	x0, x22
	bl	_drm_mode_vrefresh
	ldr	x8, [x21]
Lloh40:
	adrp	x9, _WideScreenMode@GOTPAGE
Lloh41:
	ldr	x9, [x9, _WideScreenMode@GOTPAGEOFF]
Lloh42:
	ldr	w11, [x9]
	ldp	w9, w10, [x8]
	and	w4, w11, w9
Lloh43:
	adrp	x11, _DRM_MODE_FLAG_NVSYNC@GOTPAGE
Lloh44:
	ldr	x11, [x11, _DRM_MODE_FLAG_NVSYNC@GOTPAGEOFF]
Lloh45:
	ldr	w11, [x11]
Lloh46:
	adrp	x12, _PVSync@GOTPAGE
Lloh47:
	ldr	x12, [x12, _PVSync@GOTPAGEOFF]
Lloh48:
	ldr	w12, [x12]
Lloh49:
	adrp	x13, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh50:
	ldr	x13, [x13, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh51:
	ldr	w13, [x13]
Lloh52:
	adrp	x14, _NVSync@GOTPAGE
Lloh53:
	ldr	x14, [x14, _NVSync@GOTPAGEOFF]
Lloh54:
	ldr	w14, [x14]
Lloh55:
	adrp	x15, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh56:
	ldr	x15, [x15, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
Lloh57:
	ldr	w15, [x15]
Lloh58:
	adrp	x16, _PHSync@GOTPAGE
Lloh59:
	ldr	x16, [x16, _PHSync@GOTPAGEOFF]
Lloh60:
	ldr	w16, [x16]
Lloh61:
	adrp	x17, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh62:
	ldr	x17, [x17, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh63:
	ldr	w17, [x17]
Lloh64:
	adrp	x1, _NHSync@GOTPAGE
Lloh65:
	ldr	x1, [x1, _NHSync@GOTPAGEOFF]
Lloh66:
	ldr	w1, [x1]
LBB0_30:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_37 Depth 2
                                        ;       Child Loop BB0_39 Depth 3
	mov	x3, x4
	cmp	w10, #255
	b.ne	LBB0_34
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x2, #0
LBB0_32:                                ;   in Loop: Header=BB0_30 Depth=1
	cbnz	x2, LBB0_53
; %bb.33:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	w4, #0
	cbnz	w3, LBB0_30
	b	LBB0_53
LBB0_34:                                ;   in Loop: Header=BB0_30 Depth=1
	mov	x2, #0
	mov	x5, x10
	mov	x4, x8
	b	LBB0_37
LBB0_35:                                ;   in Loop: Header=BB0_37 Depth=2
	mov	x2, x4
LBB0_36:                                ;   in Loop: Header=BB0_37 Depth=2
	ldr	w5, [x4, #92]
	add	x4, x4, #88
	cmp	w5, #255
	b.eq	LBB0_32
LBB0_37:                                ;   Parent Loop BB0_30 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_39 Depth 3
	cbz	w3, LBB0_49
; %bb.38:                               ;   in Loop: Header=BB0_37 Depth=2
	ldr	w23, [x22]
	and	w6, w11, w23
	and	w7, w13, w23
	and	w26, w15, w23
	and	w27, w17, w23
	mov	x23, x4
	mov	x28, x5
LBB0_39:                                ;   Parent Loop BB0_30 Depth=1
                                        ;     Parent Loop BB0_37 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cbz	w6, LBB0_41
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=3
	ldr	w30, [x23]
	tst	w12, w30
	b.ne	LBB0_47
LBB0_41:                                ;   in Loop: Header=BB0_39 Depth=3
	cbz	w7, LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_39 Depth=3
	ldr	w30, [x23]
	tst	w14, w30
	b.ne	LBB0_47
LBB0_43:                                ;   in Loop: Header=BB0_39 Depth=3
	cbz	w26, LBB0_45
; %bb.44:                               ;   in Loop: Header=BB0_39 Depth=3
	ldr	w30, [x23]
	tst	w16, w30
	b.ne	LBB0_47
LBB0_45:                                ;   in Loop: Header=BB0_39 Depth=3
	cbz	w27, LBB0_52
; %bb.46:                               ;   in Loop: Header=BB0_39 Depth=3
	ldr	w30, [x23]
	tst	w1, w30
	b.eq	LBB0_52
LBB0_47:                                ;   in Loop: Header=BB0_39 Depth=3
	ldr	w28, [x23, #92]
	cmp	w28, #255
	b.eq	LBB0_32
; %bb.48:                               ;   in Loop: Header=BB0_39 Depth=3
	add	x23, x23, #88
	cbnz	w3, LBB0_39
LBB0_49:                                ;   in Loop: Header=BB0_37 Depth=2
	cmp	x0, w5, sxtw
	b.lo	LBB0_36
LBB0_50:                                ;   in Loop: Header=BB0_37 Depth=2
	cbz	x2, LBB0_35
; %bb.51:                               ;   in Loop: Header=BB0_37 Depth=2
	ldr	w6, [x2, #4]
	cmp	w5, w6
	b.gt	LBB0_35
	b	LBB0_36
LBB0_52:                                ;   in Loop: Header=BB0_37 Depth=2
	mov	x5, x28
	mov	x4, x23
	cmp	x0, w5, sxtw
	b.lo	LBB0_36
	b	LBB0_50
LBB0_53:
	cbz	x2, LBB0_55
; %bb.54:
	str	x2, [x21]
	ldr	w9, [x2]
	mov	x8, x2
LBB0_55:
Lloh67:
	adrp	x10, _HBorder@GOTPAGE
Lloh68:
	ldr	x10, [x10, _HBorder@GOTPAGEOFF]
Lloh69:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w10, ne
Lloh70:
	adrp	x11, _VBorder@GOTPAGE
Lloh71:
	ldr	x11, [x11, _VBorder@GOTPAGEOFF]
	lsl	x10, x10, #3
Lloh72:
	ldr	w11, [x11]
	tst	w11, w9
	ldp	x11, x9, [x8, #72]
	ldp	x13, x12, [x8, #56]
	add	x11, x11, x10
	add	x12, x12, x11
	stp	x11, x9, [x19, #80]
	cset	w11, ne
	lsl	x11, x11, #3
	sub	x9, x9, x10
	stp	x12, x9, [x19, #64]
	add	x9, x13, x12
	ldp	x12, x10, [x8, #40]
	stp	x10, x9, [x19, #48]
	sub	x9, x10, x11
	ldp	x13, x10, [x8, #24]
	add	x11, x12, x11
	add	x10, x10, x11
	stp	x9, x11, [x19, #32]
	add	x9, x13, x10
	stp	x9, x10, [x19, #16]
	ldr	x9, [x20]
Lloh73:
	adrp	x10, _AST1180@GOTPAGE
Lloh74:
	ldr	x10, [x10, _AST1180@GOTPAGEOFF]
Lloh75:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_58
; %bb.56:
	ldrb	w22, [x8, #16]
	ldrb	w23, [x8, #8]
Lloh76:
	adrp	x26, _AST_IO_CRTC_PORT@GOTPAGE
Lloh77:
	ldr	x26, [x26, _AST_IO_CRTC_PORT@GOTPAGEOFF]
	ldr	w1, [x26]
	ubfiz	w3, w25, #4, #4
	mov	x0, x20
	mov	w2, #140
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #141
	mov	x3, x23
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #142
	mov	x3, x22
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #145
	mov	w3, #0
	bl	_ast_set_index_reg
	ldr	x8, [x21]
	ldr	w8, [x8]
Lloh78:
	adrp	x9, _NewModeInfo@GOTPAGE
Lloh79:
	ldr	x9, [x9, _NewModeInfo@GOTPAGEOFF]
Lloh80:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_58
; %bb.57:
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #145
	mov	w3, #168
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldr	w8, [x8]
	lsl	w3, w8, #3
	mov	x0, x20
	mov	w2, #146
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	ldrsw	x8, [x19, #4]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w3, w8, w9
	mov	x0, x20
	mov	w2, #147
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	ldr	w3, [x19, #8]
	mov	x0, x20
	mov	w2, #148
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	ldr	w8, [x19, #8]
	asr	w3, w8, #8
	mov	x0, x20
	mov	w2, #149
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	ldr	w3, [x19, #12]
	mov	x0, x20
	mov	w2, #150
	bl	_ast_set_index_reg
	ldr	w1, [x26]
	ldr	w8, [x19, #12]
	asr	w3, w8, #8
	mov	x0, x20
	mov	w2, #151
	bl	_ast_set_index_reg
LBB0_58:
	mov	w8, #1
LBB0_59:
	mov	x0, x8
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh76, Lloh77
	.cfi_endproc
                                        ; -- End function
	.comm	_vbios_stdtable,8,3             ; @vbios_stdtable
	.comm	_VGAModeIndex,8,3               ; @VGAModeIndex
	.comm	_HiCModeIndex,8,3               ; @HiCModeIndex
	.comm	_TrueCModeIndex,8,3             ; @TrueCModeIndex
	.comm	_res_640x480,8,3                ; @res_640x480
	.comm	_res_800x600,8,3                ; @res_800x600
	.comm	_res_1024x768,8,3               ; @res_1024x768
	.comm	_res_1280x800,8,3               ; @res_1280x800
	.comm	_res_1280x1024,8,3              ; @res_1280x1024
	.comm	_res_1360x768,8,3               ; @res_1360x768
	.comm	_res_1440x900,8,3               ; @res_1440x900
	.comm	_res_1600x900,8,3               ; @res_1600x900
	.comm	_res_1600x1200,8,3              ; @res_1600x1200
	.comm	_res_1680x1050,8,3              ; @res_1680x1050
	.comm	_res_1920x1080,8,3              ; @res_1920x1080
	.comm	_res_1920x1200,8,3              ; @res_1920x1200
	.comm	_WideScreenMode,4,2             ; @WideScreenMode
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ; @DRM_MODE_FLAG_NVSYNC
	.comm	_PVSync,4,2                     ; @PVSync
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_NVSync,4,2                     ; @NVSync
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_PHSync,4,2                     ; @PHSync
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_NHSync,4,2                     ; @NHSync
	.comm	_HBorder,4,2                    ; @HBorder
	.comm	_VBorder,4,2                    ; @VBorder
	.comm	_AST1180,8,3                    ; @AST1180
	.comm	_AST_IO_CRTC_PORT,4,2           ; @AST_IO_CRTC_PORT
	.comm	_NewModeInfo,4,2                ; @NewModeInfo
	.no_dead_strip	_ast_get_vbios_mode_info
.subsections_via_symbols
