	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltdc_crtc_mode_valid
_ltdc_crtc_mode_valid:                  ## @ltdc_crtc_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	%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	%rsi, %r14
	callq	_crtc_to_ltdc
	imull	$1000, (%r14), %r12d            ## imm = 0x3E8
	movq	%rax, %rbx
	movq	_CLK_TOLERANCE_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	4(%rbx), %edi
	movl	%r12d, %esi
	callq	_clk_round_rate
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG_DRIVER
	cmpl	(%rbx), %r15d
	jle	LBB0_2
## %bb.1:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_4
## %bb.3:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movl	%r12d, %ecx
	subl	%r13d, %ecx
	addl	%r13d, %r12d
	movq	_MODE_CLOCK_RANGE@GOTPCREL(%rip), %rdx
	movq	%rdx, %rax
	cmpl	%r12d, %r15d
	jg	LBB0_6
## %bb.5:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
LBB0_6:
	cmpl	%ecx, %r15d
	cmovlq	%rdx, %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLK_TOLERANCE_HZ,4,2           ## @CLK_TOLERANCE_HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clk rate target %d, available %d\n"

	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.comm	_MODE_CLOCK_RANGE,4,2           ## @MODE_CLOCK_RANGE
	.no_dead_strip	_ltdc_crtc_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltdc_crtc_mode_valid
_ltdc_crtc_mode_valid:                  ; @ltdc_crtc_mode_valid
	.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	x20, x1
	bl	_crtc_to_ltdc
	mov	x22, x0
	ldr	w8, [x20]
	mov	w9, #1000
	mul	w19, w8, w9
Lloh0:
	adrp	x8, _CLK_TOLERANCE_HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLK_TOLERANCE_HZ@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	w0, [x0, #4]
	mov	x1, x19
	bl	_clk_round_rate
	mov	x21, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_DRM_DEBUG_DRIVER
	ldr	w8, [x22]
	cmp	w21, w8
	b.le	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w9, [x20, #4]
Lloh7:
	adrp	x8, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x8]
Lloh10:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
	tst	w10, w9
	b.ne	LBB0_4
; %bb.3:
	sub	w9, w19, w23
	add	w10, w19, w23
	cmp	w21, w10
	ccmp	w21, w9, #8, le
Lloh12:
	adrp	x9, _MODE_CLOCK_RANGE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MODE_CLOCK_RANGE@GOTPAGEOFF]
	csel	x8, x9, x8, lt
LBB0_4:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CLK_TOLERANCE_HZ,4,2           ; @CLK_TOLERANCE_HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clk rate target %d, available %d\n"

	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.comm	_MODE_CLOCK_RANGE,4,2           ; @MODE_CLOCK_RANGE
	.no_dead_strip	_ltdc_crtc_mode_valid
.subsections_via_symbols
