	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_tv_mode_valid
_intel_tv_mode_valid:                   ## @intel_tv_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_intel_tv_mode_find
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_i915
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_MODE_NO_DBLESCAN@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movl	4(%r15), %ecx
	cmpl	(%rax), %ecx
	jle	LBB0_4
## %bb.3:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	testq	%r14, %r14
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rbx
	movq	%r15, %rdi
	callq	_drm_mode_vrefresh
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	cltq
	subq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_abs
	cmpl	$1000, %eax                     ## imm = 0x3E8
	jge	LBB0_7
## %bb.6:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_MODE_CLOCK_RANGE@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	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_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.comm	_MODE_CLOCK_RANGE,4,2           ## @MODE_CLOCK_RANGE
	.no_dead_strip	_intel_tv_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_tv_mode_valid
_intel_tv_mode_valid:                   ; @intel_tv_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
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_intel_tv_mode_find
	mov	x20, x0
	ldr	w0, [x21]
	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_8
LBB0_2:
	ldr	w8, [x0]
	ldr	w9, [x19, #4]
	cmp	w9, w8
	b.le	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	cbz	x20, LBB0_7
; %bb.5:
	ldr	x20, [x20]
	mov	x0, x19
	bl	_drm_mode_vrefresh
	mov	w8, #1000
	mul	w8, w0, w8
	sub	x0, x20, w8, sxtw
	bl	_abs
	cmp	w0, #1000
	b.ge	LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _MODE_CLOCK_RANGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MODE_CLOCK_RANGE@GOTPAGEOFF]
LBB0_8:
	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
	.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_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.comm	_MODE_CLOCK_RANGE,4,2           ; @MODE_CLOCK_RANGE
	.no_dead_strip	_intel_tv_mode_valid
.subsections_via_symbols
