	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function komeda_crtc_mode_valid
_komeda_crtc_mode_valid:                ## @komeda_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r12
	callq	_to_kcrtc
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_MODE_NO_INTERLACE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	(%rax), %rax
	movslq	4(%r15), %rcx
	imulq	$1000, %rcx, %r14               ## imm = 0x3E8
	cmpq	$0, 8(%rax)
	setne	%cl
	shrq	%cl, %r14
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clk_round_rate
	cmpq	%rax, %r14
	jne	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_to_kcrtc
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_komeda_calc_min_aclk_rate
	movq	%rax, %rbx
	movl	(%r12), %edi
	movq	%rax, %rsi
	callq	_clk_round_rate
	cmpq	%rbx, %rax
	jae	LBB0_5
## %bb.6:
	movslq	8(%r15), %rsi
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	movq	_MODE_NOCLOCK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_MODE_NO_INTERLACE,4,2          ## @MODE_NO_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pxlclk doesn't support %lu Hz\n"

	.comm	_MODE_NOCLOCK,4,2               ## @MODE_NOCLOCK
L_.str.1:                               ## @.str.1
	.asciz	"engine clk can't satisfy the requirement of %s-clk: %lu.\n"

	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_komeda_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 komeda_crtc_mode_valid
_komeda_crtc_mode_valid:                ; @komeda_crtc_mode_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x22, [x8]
	bl	_to_kcrtc
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MODE_NO_INTERLACE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_NO_INTERLACE@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	ldr	x8, [x0]
	ldrsw	x9, [x19, #4]
	mov	w10, #1000
	mul	x9, x9, x10
	ldr	x10, [x8, #8]
	cmp	x10, #0
	cset	w10, ne
	lsr	x20, x9, x10
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clk_round_rate
	cmp	x20, x0
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_to_kcrtc
	mov	x1, x20
	bl	_komeda_calc_min_aclk_rate
	mov	x21, x0
	ldr	w0, [x22]
	mov	x1, x21
	bl	_clk_round_rate
	cmp	x0, x21
	b.hs	LBB0_6
; %bb.4:
	ldrsw	x1, [x19, #8]
	str	x20, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_ATOMIC
Lloh7:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DRM_DEBUG_ATOMIC
Lloh11:
	adrp	x8, _MODE_NOCLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE_NOCLOCK@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_MODE_NO_INTERLACE,4,2          ; @MODE_NO_INTERLACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pxlclk doesn't support %lu Hz\n"

	.comm	_MODE_NOCLOCK,4,2               ; @MODE_NOCLOCK
l_.str.1:                               ; @.str.1
	.asciz	"engine clk can't satisfy the requirement of %s-clk: %lu.\n"

	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_komeda_crtc_mode_valid
.subsections_via_symbols
