	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3x_i2c_adapt_div
_rk3x_i2c_adapt_div:                    ## @rk3x_i2c_adapt_div
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	24(%rdi), %rsi
	movq	16(%rdi), %rax
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	movl	24(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movl	4(%rbx), %edi
	callq	_clk_enable
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_REG_CON@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_i2c_readl
	movq	_REG_CON_TUNING_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	orl	-48(%rbp), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movl	-44(%rbp), %eax
	shll	$16, %eax
	movzwl	-40(%rbp), %esi
	orl	%eax, %esi
	movq	_REG_CLKDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%rbx), %edi
	callq	_clk_disable
	imull	$-589934592, -40(%rbp), %edi    ## imm = 0xDCD65000
	addl	$-589934592, %edi               ## imm = 0xDCD65000
	movq	%r14, %rsi
	callq	_div_u64
	movl	%eax, %r15d
	imull	$-589934592, -44(%rbp), %edi    ## imm = 0xDCD65000
	addl	$-589934592, %edi               ## imm = 0xDCD65000
	movq	%r14, %rsi
	callq	_div_u64
	movl	%eax, %r9d
	movl	(%rbx), %edi
	shrq	$3, %r14
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	movq	%r14, %rax
	mulq	%rcx
	movq	%rdx, %rcx
	shrq	$4, %rcx
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	idivl	24(%rbx)
	leaq	L_.str.1(%rip), %rsi
	movq	%rcx, %rdx
	movl	%eax, %ecx
	movl	%r15d, %r8d
	callq	_dev_dbg
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not reach SCL freq %u"

	.comm	_REG_CON,4,2                    ## @REG_CON
	.comm	_REG_CON_TUNING_MASK,4,2        ## @REG_CON_TUNING_MASK
	.comm	_REG_CLKDIV,4,2                 ## @REG_CLKDIV
L_.str.1:                               ## @.str.1
	.asciz	"CLK %lukhz, Req %uns, Act low %lluns high %lluns\n"

	.no_dead_strip	_rk3x_i2c_adapt_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3x_i2c_adapt_div
_rk3x_i2c_adapt_div:                    ; @rk3x_i2c_adapt_div
	.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	x20, x1
	mov	x19, x0
	add	x1, x0, #24
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	mov	x2, sp
	mov	x0, x20
	blr	x8
	cmp	w0, #0
	cset	w0, ne
	ldr	w2, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	ldr	w0, [x19, #4]
	bl	_clk_enable
	add	x21, x19, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x22, _REG_CON@GOTPAGE
Lloh3:
	ldr	x22, [x22, _REG_CON@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_i2c_readl
Lloh4:
	adrp	x8, _REG_CON_TUNING_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _REG_CON_TUNING_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w9, [sp]
	orr	w1, w8, w9
	ldr	w2, [x22]
	mov	x0, x19
	bl	_i2c_writel
	ldr	w8, [sp, #4]
	ldrh	w1, [sp, #8]
	bfi	w1, w8, #16, #16
Lloh7:
	adrp	x8, _REG_CLKDIV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_CLKDIV@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_writel
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #4]
	bl	_clk_disable
	ldr	w8, [sp, #8]
	mov	w22, #20480
	movk	w22, #56534, lsl #16
	madd	w0, w8, w22, w22
	mov	x1, x20
	bl	_div_u64
	mov	x21, x0
	ldr	w8, [sp, #4]
	madd	w0, w8, w22, w22
	mov	x1, x20
	bl	_div_u64
	mov	x5, x0
	ldr	w0, [x19]
	lsr	x8, x20, #3
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	umulh	x8, x8, x9
	lsr	x2, x8, #4
	ldr	w8, [x19, #24]
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	sdiv	w3, w9, w8
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x21
	bl	_dev_dbg
	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 AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not reach SCL freq %u"

	.comm	_REG_CON,4,2                    ; @REG_CON
	.comm	_REG_CON_TUNING_MASK,4,2        ; @REG_CON_TUNING_MASK
	.comm	_REG_CLKDIV,4,2                 ; @REG_CLKDIV
l_.str.1:                               ; @.str.1
	.asciz	"CLK %lukhz, Req %uns, Act low %lluns high %lluns\n"

	.no_dead_strip	_rk3x_i2c_adapt_div
.subsections_via_symbols
