	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ast_mode_valid
_ast_mode_valid:                        ## @ast_mode_valid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	movq	_MODE_NOMODE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	cmpq	$0, 8(%rdi)
	movl	(%rsi), %r9d
	je	LBB0_17
## %bb.1:
	cmpl	$1439, %r9d                     ## imm = 0x59F
	jle	LBB0_2
## %bb.5:
	cmpl	$1440, %r9d                     ## imm = 0x5A0
	je	LBB0_10
## %bb.6:
	cmpl	$1600, %r9d                     ## imm = 0x640
	je	LBB0_10
## %bb.7:
	cmpl	$1680, %r9d                     ## imm = 0x690
	jne	LBB0_11
## %bb.8:
	cmpl	$1050, 4(%rsi)                  ## imm = 0x41A
	jne	LBB0_11
	jmp	LBB0_28
LBB0_2:
	cmpl	$1280, %r9d                     ## imm = 0x500
	je	LBB0_9
## %bb.3:
	cmpl	$1360, %r9d                     ## imm = 0x550
	jne	LBB0_11
## %bb.4:
	cmpl	$768, 4(%rsi)                   ## imm = 0x300
	jne	LBB0_11
	jmp	LBB0_28
LBB0_10:
	cmpl	$900, 4(%rsi)                   ## imm = 0x384
	jne	LBB0_11
	jmp	LBB0_28
LBB0_9:
	cmpl	$800, 4(%rsi)                   ## imm = 0x320
	je	LBB0_28
LBB0_11:
	movq	(%rdi), %rdx
	movq	_AST2100@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	sete	%r8b
	movq	_AST2200@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	sete	%bl
	orb	%r8b, %bl
	movq	_AST2300@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	sete	%r8b
	movq	_AST2400@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	sete	%cl
	orb	%r8b, %cl
	orb	%bl, %cl
	movq	_AST2500@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	sete	%r8b
	movq	_AST1180@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	sete	%dl
	orb	%r8b, %dl
	orb	%cl, %dl
	cmpb	$1, %dl
	jne	LBB0_17
## %bb.12:
	cmpl	$1920, %r9d                     ## imm = 0x780
	jne	LBB0_17
## %bb.13:
	movl	4(%rsi), %ecx
	cmpl	$1200, %ecx                     ## imm = 0x4B0
	je	LBB0_15
## %bb.14:
	cmpl	$1080, %ecx                     ## imm = 0x438
	je	LBB0_28
	jmp	LBB0_29
LBB0_17:
	cmpl	$1023, %r9d                     ## imm = 0x3FF
	jle	LBB0_18
## %bb.21:
	cmpl	$1024, %r9d                     ## imm = 0x400
	je	LBB0_26
## %bb.22:
	cmpl	$1280, %r9d                     ## imm = 0x500
	je	LBB0_27
## %bb.23:
	cmpl	$1600, %r9d                     ## imm = 0x640
	jne	LBB0_29
## %bb.24:
	cmpl	$1200, 4(%rsi)                  ## imm = 0x4B0
	je	LBB0_28
	jmp	LBB0_29
LBB0_18:
	cmpl	$640, %r9d                      ## imm = 0x280
	je	LBB0_25
## %bb.19:
	cmpl	$800, %r9d                      ## imm = 0x320
	jne	LBB0_29
## %bb.20:
	cmpl	$600, 4(%rsi)                   ## imm = 0x258
	je	LBB0_28
	jmp	LBB0_29
LBB0_26:
	cmpl	$768, 4(%rsi)                   ## imm = 0x300
	je	LBB0_28
	jmp	LBB0_29
LBB0_27:
	cmpl	$1024, 4(%rsi)                  ## imm = 0x400
	je	LBB0_28
	jmp	LBB0_29
LBB0_25:
	cmpl	$480, 4(%rsi)                   ## imm = 0x1E0
	je	LBB0_28
	jmp	LBB0_29
LBB0_15:
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$209, %edx
	movl	$255, %ecx
	callq	_ast_get_index_reg_mask
	testb	$1, %al
	jne	LBB0_16
LBB0_28:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_29:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_16:
	movl	(%r14), %eax
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_NOMODE,4,2                ## @MODE_NOMODE
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.comm	_AST2100,8,3                    ## @AST2100
	.comm	_AST2200,8,3                    ## @AST2200
	.comm	_AST2300,8,3                    ## @AST2300
	.comm	_AST2400,8,3                    ## @AST2400
	.comm	_AST2500,8,3                    ## @AST2500
	.comm	_AST1180,8,3                    ## @AST1180
	.comm	_AST_IO_CRTC_PORT,4,2           ## @AST_IO_CRTC_PORT
	.no_dead_strip	_ast_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ast_mode_valid
_ast_mode_valid:                        ; @ast_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x19, _MODE_NOMODE@GOTPAGE
Lloh1:
	ldr	x19, [x19, _MODE_NOMODE@GOTPAGEOFF]
	ldr	w0, [x19]
	ldr	x10, [x8, #8]
	ldr	w9, [x1]
	cbz	x10, LBB0_15
; %bb.1:
	cmp	w9, #1439
	b.le	LBB0_6
; %bb.2:
	cmp	w9, #1440
	b.eq	LBB0_9
; %bb.3:
	cmp	w9, #1600
	b.eq	LBB0_9
; %bb.4:
	cmp	w9, #1680
	b.ne	LBB0_11
; %bb.5:
	ldr	w10, [x1, #4]
	cmp	w10, #1050
	b.ne	LBB0_11
	b	LBB0_28
LBB0_6:
	cmp	w9, #1280
	b.eq	LBB0_10
; %bb.7:
	cmp	w9, #1360
	b.ne	LBB0_11
; %bb.8:
	ldr	w10, [x1, #4]
	cmp	w10, #768
	b.ne	LBB0_11
	b	LBB0_28
LBB0_9:
	ldr	w10, [x1, #4]
	cmp	w10, #900
	b.ne	LBB0_11
	b	LBB0_28
LBB0_10:
	ldr	w10, [x1, #4]
	cmp	w10, #800
	b.eq	LBB0_28
LBB0_11:
	ldr	x10, [x8]
Lloh2:
	adrp	x11, _AST2100@GOTPAGE
Lloh3:
	ldr	x11, [x11, _AST2100@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
Lloh5:
	adrp	x12, _AST2200@GOTPAGE
Lloh6:
	ldr	x12, [x12, _AST2200@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
Lloh8:
	adrp	x13, _AST2300@GOTPAGE
Lloh9:
	ldr	x13, [x13, _AST2300@GOTPAGEOFF]
Lloh10:
	ldr	x13, [x13]
Lloh11:
	adrp	x14, _AST2400@GOTPAGE
Lloh12:
	ldr	x14, [x14, _AST2400@GOTPAGEOFF]
Lloh13:
	ldr	x14, [x14]
Lloh14:
	adrp	x15, _AST2500@GOTPAGE
Lloh15:
	ldr	x15, [x15, _AST2500@GOTPAGEOFF]
Lloh16:
	ldr	x15, [x15]
Lloh17:
	adrp	x16, _AST1180@GOTPAGE
Lloh18:
	ldr	x16, [x16, _AST1180@GOTPAGEOFF]
Lloh19:
	ldr	x16, [x16]
	cmp	x10, x16
	ccmp	x10, x15, #4, ne
	ccmp	x10, x14, #4, ne
	ccmp	x10, x13, #4, ne
	ccmp	x10, x12, #4, ne
	ccmp	x10, x11, #4, ne
	b.ne	LBB0_15
; %bb.12:
	cmp	w9, #1920
	b.ne	LBB0_15
; %bb.13:
	ldr	w9, [x1, #4]
	cmp	w9, #1200
	b.eq	LBB0_27
; %bb.14:
	cmp	w9, #1080
	b.eq	LBB0_28
	b	LBB0_29
LBB0_15:
	cmp	w9, #1023
	b.le	LBB0_20
; %bb.16:
	cmp	w9, #1024
	b.eq	LBB0_23
; %bb.17:
	cmp	w9, #1280
	b.eq	LBB0_24
; %bb.18:
	cmp	w9, #1600
	b.ne	LBB0_29
; %bb.19:
	ldr	w8, [x1, #4]
Lloh20:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, #1200
	b	LBB0_26
LBB0_20:
	cmp	w9, #640
	b.eq	LBB0_25
; %bb.21:
	cmp	w9, #800
	b.ne	LBB0_29
; %bb.22:
	ldr	w8, [x1, #4]
Lloh23:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, #600
	b	LBB0_26
LBB0_23:
	ldr	w8, [x1, #4]
Lloh26:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, #768
	b	LBB0_26
LBB0_24:
	ldr	w8, [x1, #4]
Lloh29:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w8, #1024
	b	LBB0_26
LBB0_25:
	ldr	w8, [x1, #4]
Lloh32:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	cmp	w8, #480
LBB0_26:
	csel	w0, w9, w0, eq
	b	LBB0_29
LBB0_27:
Lloh35:
	adrp	x9, _AST_IO_CRTC_PORT@GOTPAGE
Lloh36:
	ldr	x9, [x9, _AST_IO_CRTC_PORT@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x9]
	mov	x0, x8
	mov	w2, #209
	mov	w3, #255
	bl	_ast_get_index_reg_mask
	tbnz	w0, #0, LBB0_30
LBB0_28:
Lloh38:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
LBB0_29:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_30:
	ldr	w0, [x19]
	b	LBB0_29
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_NOMODE,4,2                ; @MODE_NOMODE
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.comm	_AST2100,8,3                    ; @AST2100
	.comm	_AST2200,8,3                    ; @AST2200
	.comm	_AST2300,8,3                    ; @AST2300
	.comm	_AST2400,8,3                    ; @AST2400
	.comm	_AST2500,8,3                    ; @AST2500
	.comm	_AST1180,8,3                    ; @AST1180
	.comm	_AST_IO_CRTC_PORT,4,2           ; @AST_IO_CRTC_PORT
	.no_dead_strip	_ast_mode_valid
.subsections_via_symbols
