	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function komeda_crtc_mode_fixup
_komeda_crtc_mode_fixup:                ## @komeda_crtc_mode_fixup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_to_kcrtc
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_mode_set_crtcinfo
	movq	(%r14), %rax
	cmpq	$0, 8(%rax)
	movl	(%rbx), %ecx
	je	LBB0_2
## %bb.1:
	movd	%ecx, %xmm0
	pinsrd	$1, 4(%rbx), %xmm0
	movq	8(%rbx), %xmm1                  ## xmm1 = mem[0],zero
	punpcklqdq	%xmm1, %xmm0            ## xmm0 = xmm0[0],xmm1[0]
	movdqa	%xmm0, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$1, %xmm1
	movdqu	%xmm1, (%rbx)
	movl	16(%rbx), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	%edx, 16(%rbx)
	movd	%xmm1, %ecx
LBB0_2:
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	movslq	%ecx, %rsi
	movl	(%rax), %edi
	callq	_clk_round_rate
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, (%rbx)
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_komeda_crtc_mode_fixup
.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_fixup
_komeda_crtc_mode_fixup:                ; @komeda_crtc_mode_fixup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_to_kcrtc
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_drm_mode_set_crtcinfo
	ldr	x8, [x20]
	ldr	x10, [x8, #8]
	ldr	w9, [x19]
	cbz	x10, LBB0_2
; %bb.1:
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	ldp	w10, w11, [x19, #4]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	stp	w9, w10, [x19]
	cmp	w11, #0
	cinc	w10, w11, lt
	asr	w10, w10, #1
	ldp	w11, w12, [x19, #12]
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	stp	w10, w11, [x19, #8]
	cmp	w12, #0
	cinc	w10, w12, lt
	asr	w10, w10, #1
	str	w10, [x19, #16]
LBB0_2:
	mov	w10, #1000
	mul	w9, w9, w10
	sxtw	x1, w9
	ldr	w0, [x8]
	bl	_clk_round_rate
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	w8, [x19]
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_komeda_crtc_mode_fixup
.subsections_via_symbols
