	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_i2c_set_clk
_sprd_i2c_set_clk:                      ## @sprd_i2c_set_clk
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	(%rdi), %eax
	leal	(,%r12,4), %ecx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax), %ecx
	addl	$-4, %ecx
	movslq	%ecx, %rcx
	imulq	$1717986919, %rcx, %r13         ## imm = 0x66666667
	movq	%r13, %rcx
	shrq	$63, %rcx
	sarq	$33, %r13
	addl	%ecx, %r13d
	leal	(%rax,%rax,2), %eax
	addl	$-6, %eax
	cltq
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$33, %rbx
	addl	%eax, %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_I2C_ADDR_DVD0_CALC
	movl	%eax, %r14d
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_I2C_ADDR_DVD1_CALC
	movl	%eax, %ebx
	movq	_ADDR_DVD0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	_ADDR_DVD1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	cmpl	$100000, %r12d                  ## imm = 0x186A0
	je	LBB0_3
## %bb.1:
	cmpl	$400000, %r12d                  ## imm = 0x61A80
	jne	LBB0_5
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$1801439851, %rax, %rdi         ## imm = 0x6B5FCA6B
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$54, %rdi
	jmp	LBB0_4
LBB0_3:
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	imulq	$1125899907, %rax, %rdi         ## imm = 0x431BDE83
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$48, %rdi
LBB0_4:
	addl	%eax, %edi
	movq	_ADDR_STA0_DVD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADDR_DVD0,8,3                  ## @ADDR_DVD0
	.comm	_ADDR_DVD1,8,3                  ## @ADDR_DVD1
	.comm	_ADDR_STA0_DVD,8,3              ## @ADDR_STA0_DVD
	.no_dead_strip	_sprd_i2c_set_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_i2c_set_clk
_sprd_i2c_set_clk:                      ; @sprd_i2c_set_clk
	.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
	mov	x19, x0
	ldr	w24, [x0]
	lsl	w8, w1, #2
	sdiv	w8, w24, w8
	lsl	w8, w8, #1
	sub	w8, w8, #2
	lsl	w9, w8, #1
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x11, w9, w10
	lsr	x12, x11, #63
	asr	x11, x11, #33
	add	w21, w11, w12
	add	w8, w9, w8
	smull	x8, w8, w10
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w22, w8, w9
	mov	x0, x21
	mov	x1, x22
	bl	_I2C_ADDR_DVD0_CALC
	mov	x23, x0
	mov	x0, x21
	mov	x1, x22
	bl	_I2C_ADDR_DVD1_CALC
	mov	x21, x0
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _ADDR_DVD0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADDR_DVD0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writel
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _ADDR_DVD1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADDR_DVD1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	sub	w8, w20, #24, lsl #12           ; =98304
	cmp	w8, #1696
	b.eq	LBB0_3
; %bb.1:
	mov	w8, #6784
	movk	w8, #6, lsl #16
	cmp	w20, w8
	b.ne	LBB0_5
; %bb.2:
	add	w8, w24, w24, lsl #1
	lsl	w8, w8, #1
	mov	w9, #51819
	movk	w9, #27487, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #54
	b	LBB0_4
LBB0_3:
	mov	w8, #56963
	movk	w8, #17179, lsl #16
	smull	x8, w24, w8
	lsr	x9, x8, #63
	asr	x8, x8, #48
LBB0_4:
	add	w0, w8, w9
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _ADDR_STA0_DVD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADDR_STA0_DVD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, 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
	b	_writel
LBB0_5:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ADDR_DVD0,8,3                  ; @ADDR_DVD0
	.comm	_ADDR_DVD1,8,3                  ; @ADDR_DVD1
	.comm	_ADDR_STA0_DVD,8,3              ; @ADDR_STA0_DVD
	.no_dead_strip	_sprd_i2c_set_clk
.subsections_via_symbols
