	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3x_i2c_v0_calc_timings
_rk3x_i2c_v0_calc_timings:              ## @rk3x_i2c_v0_calc_timings
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	xorl	%edi, %edi
	cmpl	$400001, (%rsi)                 ## imm = 0x61A81
	setge	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	$400000, (%r12)                 ## imm = 0x61A80
	xorl	%edi, %edi
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
	cmpl	$1000, (%r12)                   ## imm = 0x3E8
	setl	%dil
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movl	$1000, (%r12)                   ## imm = 0x3E8
	movl	$1000, %edi                     ## imm = 0x3E8
	jmp	LBB0_6
LBB0_4:
	movl	(%r12), %edi
LBB0_6:
	callq	_rk3x_i2c_get_spec
	movq	%rax, %rbx
	movq	8(%r12), %rax
	movq	(%rbx), %r14
	addq	%rax, %r14
	movslq	8(%rbx), %rcx
	addq	%rax, %rcx
	imulq	$1000, %rcx, %rdi               ## imm = 0x3E8
	movl	$875, %esi                      ## imm = 0x36B
	callq	_DIV_ROUND_UP
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_max
	movq	%rax, %r14
	movslq	8(%rbx), %rdi
	addq	8(%r12), %rdi
	addq	16(%r12), %rdi
	addq	(%rbx), %rdi
	movl	$2, %esi
	callq	_DIV_ROUND_UP
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_max
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r15
	addq	24(%r12), %r15
	movslq	24(%rbx), %rax
	leaq	(%rax,%rax), %r14
	addq	$-50, %r14
	movl	$1000, %esi                     ## imm = 0x3E8
	movq	%r13, %rdi
	callq	_DIV_ROUND_UP
	movq	%rax, %rbx
	movslq	(%r12), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movslq	%eax, %r13
	shlq	$3, %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_DIV_ROUND_UP
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	imulq	%r15, %rdi
	movl	$8000000, %esi                  ## imm = 0x7A1200
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_DIV_ROUND_UP
	movq	%rax, %r12
	movq	%rbx, %rdi
	imulq	-56(%rbp), %rdi                 ## 8-byte Folded Reload
	movl	$8000000, %esi                  ## imm = 0x7A1200
	callq	_DIV_ROUND_UP
	movq	%rax, %r15
	leaq	(%rax,%r12), %rsi
	imulq	%rbx, %r14
	movabsq	$4835703278458516699, %rcx      ## imm = 0x431BDE82D7B634DB
	movq	%r14, %rax
	mulq	%rcx
	movq	%rdx, %r14
	shrq	$21, %r14
	cmpq	%r14, %r12
	jbe	LBB0_8
## %bb.7:
	movq	%rsi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	movq	%r14, %rcx
	callq	_WARN_ONCE
	movq	%rbx, %rsi
	movq	%r12, %r14
LBB0_8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rbx
	subq	%rsi, %rbx
	jb	LBB0_10
## %bb.9:
	movq	%rax, %r15
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	imulq	%rax, %r13
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_DIV_ROUND_UP
	cmpq	%r14, %rax
	cmovbq	%rax, %r14
	addq	%r12, %rbx
	cmpq	%rbx, %r14
	cmovbq	%r14, %rbx
	subq	%rbx, %r15
	movq	%rbx, %r12
LBB0_10:
	decq	%r12
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, (%rdx)
	decq	%r15
	movq	%r15, 8(%rdx)
	movq	$0, 16(%rdx)
	xorl	%eax, %eax
	cmpq	$65536, %r12                    ## imm = 0x10000
	jb	LBB0_12
## %bb.11:
	movq	$65535, (%rdx)                  ## imm = 0xFFFF
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	cmpq	$65536, %r15                    ## imm = 0x10000
	jb	LBB0_14
## %bb.13:
	movq	$65535, 8(%rdx)                 ## imm = 0xFFFF
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$40, %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	"Conflicting, min_low_div %lu, max_low_div %lu\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rk3x_i2c_v0_calc_timings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3x_i2c_v0_calc_timings
_rk3x_i2c_v0_calc_timings:              ; @rk3x_i2c_v0_calc_timings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w22, #6784
	movk	w22, #6, lsl #16
	ldr	w8, [x1]
	cmp	w8, w22
	cset	w0, gt
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	str	w22, [x20]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #1000
	cset	w0, lt
LBB0_3:
	bl	_WARN_ON
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	cbz	x0, LBB0_5
; %bb.4:
	mov	w0, #1000
	str	w0, [x20]
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
LBB0_6:
	bl	_rk3x_i2c_get_spec
	mov	x23, x0
	ldr	x8, [x20, #8]
	ldr	x9, [x0]
	add	x22, x9, x8
	ldrsw	x9, [x0, #8]
	add	x8, x8, x9
	mov	w9, #1000
	mul	x0, x8, x9
	mov	w1, #875
	bl	_DIV_ROUND_UP
	mov	x1, x0
	mov	x0, x22
	bl	_max
	mov	x22, x0
	ldrsw	x8, [x23, #8]
	ldp	x9, x10, [x20, #8]
	add	x8, x9, x8
	add	x8, x8, x10
	ldr	x9, [x23]
	add	x0, x8, x9
	mov	w1, #2
	bl	_DIV_ROUND_UP
	mov	x1, x0
	mov	x0, x22
	bl	_max
	mov	x22, x0
	ldr	x8, [x20, #24]
	ldr	x9, [x23, #16]
	add	x27, x9, x8
	ldrsw	x8, [x23, #24]
	lsl	x8, x8, #1
	sub	x19, x8, #50
	mov	x0, x21
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x26, x0
	ldrsw	x8, [x20]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	sbfiz	x23, x8, #3, #32
	mov	x1, x23
	bl	_DIV_ROUND_UP
	mov	x20, x0
	mul	x24, x26, x27
	mov	x0, x24
	mov	w1, #4608
	movk	w1, #122, lsl #16
	bl	_DIV_ROUND_UP
	mov	x21, x0
	mul	x0, x26, x22
	mov	w1, #4608
	movk	w1, #122, lsl #16
	bl	_DIV_ROUND_UP
	mov	x25, x0
	add	x28, x0, x21
	mul	x8, x19, x26
	mov	x9, #13531
	movk	x9, #55222, lsl #16
	movk	x9, #56962, lsl #32
	movk	x9, #17179, lsl #48
	umulh	x8, x8, x9
	lsr	x26, x8, #21
	cmp	x21, x26
	b.ls	LBB0_8
; %bb.7:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	mov	x3, x26
	bl	_WARN_ONCE
	mov	x26, x21
LBB0_8:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	subs	x28, x20, x28
	b.lo	LBB0_10
; %bb.9:
	add	x8, x27, x22
	mul	x1, x23, x8
	mov	x0, x24
	bl	_DIV_ROUND_UP
	cmp	x0, x26
	csel	x8, x0, x26, lo
	add	x9, x28, x21
	cmp	x8, x9
	csel	x21, x8, x9, lo
	sub	x25, x20, x21
LBB0_10:
	sub	x9, x21, #1
	sub	x8, x25, #1
	stp	x9, x8, [x19]
	str	xzr, [x19, #16]
	cmp	x9, #16, lsl #12                ; =65536
	b.lo	LBB0_12
; %bb.11:
	mov	w9, #65535
	str	x9, [x19]
Lloh2:
	adrp	x9, _EINVAL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	neg	w0, w9
	cmp	x8, #16, lsl #12                ; =65536
	b.hs	LBB0_13
	b	LBB0_14
LBB0_12:
	mov	w0, #0
	cmp	x8, #16, lsl #12                ; =65536
	b.lo	LBB0_14
LBB0_13:
	mov	w8, #65535
	str	x8, [x19, #8]
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Conflicting, min_low_div %lu, max_low_div %lu\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rk3x_i2c_v0_calc_timings
.subsections_via_symbols
