	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crt_mode_valid
_intel_crt_mode_valid:                  ## @intel_crt_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %rdi
	callq	_to_i915
	movq	%rax, %r14
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_MODE_NO_DBLESCAN@GOTPCREL(%rip), %rbx
	jmp	LBB0_14
LBB0_2:
	cmpl	$25000, 4(%r15)                 ## imm = 0x61A8
	jge	LBB0_4
## %bb.3:
	movq	_MODE_CLOCK_LOW@GOTPCREL(%rip), %rbx
	jmp	LBB0_14
LBB0_4:
	movl	(%r14), %r12d
	movq	%r14, %rdi
	callq	_HAS_PCH_LPT
	movl	$180000, %ecx                   ## imm = 0x2BF20
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_IS_VALLEYVIEW
	movl	$270000, %ecx                   ## imm = 0x41EB0
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$3, %esi
	movl	$4, %edx
	callq	_IS_GEN_RANGE
	testq	%rax, %rax
	movl	$350000, %eax                   ## imm = 0x55730
	movl	$400000, %ecx                   ## imm = 0x61A80
	cmovel	%eax, %ecx
LBB0_7:
	movl	4(%r15), %eax
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rbx
	cmpl	%ecx, %eax
	jg	LBB0_14
## %bb.8:
	cmpl	%r12d, %eax
	jg	LBB0_14
## %bb.9:
	movq	%r14, %rdi
	callq	_HAS_PCH_LPT
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	4(%r15), %edi
	movl	$270000, %esi                   ## imm = 0x41EB0
	movl	$24, %edx
	callq	_ironlake_get_lanes_required
	cmpl	$2, %eax
	jg	LBB0_14
LBB0_11:
	cmpl	$4097, 8(%r15)                  ## imm = 0x1001
	jl	LBB0_12
## %bb.13:
	movq	_MODE_H_ILLEGAL@GOTPCREL(%rip), %rbx
	jmp	LBB0_14
LBB0_12:
	movq	_MODE_OK@GOTPCREL(%rip), %rbx
LBB0_14:
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ## @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ## @MODE_NO_DBLESCAN
	.comm	_MODE_CLOCK_LOW,4,2             ## @MODE_CLOCK_LOW
	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_MODE_H_ILLEGAL,4,2             ## @MODE_H_ILLEGAL
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_intel_crt_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_crt_mode_valid
_intel_crt_mode_valid:                  ; @intel_crt_mode_valid
	.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
	mov	x19, x1
	ldr	x0, [x0]
	bl	_to_i915
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MODE_NO_DBLESCAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_NO_DBLESCAN@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
	ldr	w8, [x19, #4]
	mov	w9, #25000
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _MODE_CLOCK_LOW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MODE_CLOCK_LOW@GOTPAGEOFF]
	b	LBB0_15
LBB0_4:
	mov	x20, x0
	ldr	w21, [x0]
	bl	_HAS_PCH_LPT
	cbz	x0, LBB0_6
; %bb.5:
	mov	w9, #48928
	movk	w9, #2, lsl #16
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	_IS_VALLEYVIEW
	cbz	x0, LBB0_8
; %bb.7:
	mov	w9, #7856
	movk	w9, #4, lsl #16
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	mov	w1, #3
	mov	w2, #4
	bl	_IS_GEN_RANGE
	cmp	x0, #0
	mov	w8, #6784
	movk	w8, #6, lsl #16
	mov	w9, #22320
	movk	w9, #5, lsl #16
	csel	w9, w9, w8, eq
LBB0_9:
	ldr	w10, [x19, #4]
Lloh7:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	cmp	w10, w9
	b.gt	LBB0_15
; %bb.10:
	cmp	w10, w21
	b.gt	LBB0_15
; %bb.11:
	mov	x0, x20
	bl	_HAS_PCH_LPT
	cbz	x0, LBB0_14
; %bb.12:
	ldr	w0, [x19, #4]
	mov	w1, #7856
	movk	w1, #4, lsl #16
	mov	w2, #24
	bl	_ironlake_get_lanes_required
	cmp	w0, #2
	b.le	LBB0_14
; %bb.13:
Lloh9:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
	ldr	w8, [x19, #8]
Lloh11:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
Lloh13:
	adrp	x10, _MODE_H_ILLEGAL@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MODE_H_ILLEGAL@GOTPAGEOFF]
	cmp	w8, #1, lsl #12                 ; =4096
	csel	x8, x10, x9, gt
LBB0_15:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ; @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ; @MODE_NO_DBLESCAN
	.comm	_MODE_CLOCK_LOW,4,2             ; @MODE_CLOCK_LOW
	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_MODE_H_ILLEGAL,4,2             ; @MODE_H_ILLEGAL
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_intel_crt_mode_valid
.subsections_via_symbols
