	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fixup_detailed_cea_mode_clock
_fixup_detailed_cea_mode_clock:         ## @fixup_detailed_cea_mode_clock
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$5, %esi
	callq	_drm_match_cea_mode_clock_tolerance
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_drm_valid_cea_vic
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_edid_cea_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%r15,4), %rdi
	movl	(%rax,%r15,4), %r12d
	callq	_cea_mode_alternate_clock
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_drm_match_hdmi_mode_clock_tolerance
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_drm_valid_hdmi_vic
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	_edid_4k_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%r15,4), %rdi
	movl	(%rax,%r15,4), %r12d
	callq	_hdmi_mode_alternate_clock
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rax
LBB0_4:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	subl	%r12d, %edi
	callq	_abs
	movq	%rax, %r13
	movl	(%r14), %edi
	subl	%ebx, %edi
	callq	_abs
	cmpq	%rax, %r13
	cmovll	%r12d, %ebx
	movl	(%r14), %ecx
	cmpl	%ebx, %ecx
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%ebx, %r8d
	callq	_DRM_DEBUG
	movl	%ebx, (%r14)
LBB0_6:
	addq	$8, %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	"CEA"

	.comm	_edid_cea_modes,8,3             ## @edid_cea_modes
L_.str.1:                               ## @.str.1
	.asciz	"HDMI"

	.comm	_edid_4k_modes,8,3              ## @edid_4k_modes
L_.str.2:                               ## @.str.2
	.asciz	"detailed mode matches %s VIC %d, adjusting clock %d -> %d\n"

	.no_dead_strip	_fixup_detailed_cea_mode_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fixup_detailed_cea_mode_clock
_fixup_detailed_cea_mode_clock:         ; @fixup_detailed_cea_mode_clock
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w1, #5
	bl	_drm_match_cea_mode_clock_tolerance
	mov	x20, x0
	bl	_drm_valid_cea_vic
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _edid_cea_modes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _edid_cea_modes@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x0, x8, x20, lsl #2
	ldr	w24, [x0]
	bl	_cea_mode_alternate_clock
	mov	x22, x0
Lloh3:
	adrp	x21, l_.str@PAGE
Lloh4:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	mov	w1, #5
	bl	_drm_match_hdmi_mode_clock_tolerance
	mov	x20, x0
	bl	_drm_valid_hdmi_vic
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _edid_4k_modes@GOTPAGE
Lloh6:
	ldr	x8, [x8, _edid_4k_modes@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x0, x8, x20, lsl #2
	ldr	w24, [x0]
	bl	_hdmi_mode_alternate_clock
	mov	x22, x0
Lloh8:
	adrp	x21, l_.str.1@PAGE
Lloh9:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_4:
	ldr	w8, [x19]
	sub	w0, w8, w24
	bl	_abs
	mov	x23, x0
	ldr	w8, [x19]
	sub	w0, w8, w22
	bl	_abs
	cmp	x23, x0
	csel	w22, w24, w22, lt
	ldr	w3, [x19]
	cmp	w3, w22
	b.eq	LBB0_6
; %bb.5:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	mov	x4, x22
	bl	_DRM_DEBUG
	str	w22, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CEA"

	.comm	_edid_cea_modes,8,3             ; @edid_cea_modes
l_.str.1:                               ; @.str.1
	.asciz	"HDMI"

	.comm	_edid_4k_modes,8,3              ; @edid_4k_modes
l_.str.2:                               ; @.str.2
	.asciz	"detailed mode matches %s VIC %d, adjusting clock %d -> %d\n"

	.no_dead_strip	_fixup_detailed_cea_mode_clock
.subsections_via_symbols
