	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_i2c_clk_cfg
_dw_i2c_clk_cfg:                        ## @dw_i2c_clk_cfg
	.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
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_clk_get_rate
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	$1000000000, %edi               ## imm = 0x3B9ACA00
	movq	%rax, %rsi
	callq	_DIV_ROUND_UP
	movq	%rax, %r15
	movq	_I3C_BUS_I2C_FMP_TLOW_MIN_NS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_DIV_ROUND_UP
	movq	%rax, %r13
	movq	_I3C_BUS_I2C_FM_PLUS_SCL_RATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_DIV_ROUND_UP
	subq	%r13, %rax
	movq	%rax, %rdi
	callq	_SCL_I2C_FMP_TIMING_HCNT
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_SCL_I2C_FMP_TIMING_LCNT
	orl	%eax, %ebx
	movq	_SCL_I2C_FMP_TIMING@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_I3C_BUS_I2C_FM_TLOW_MIN_NS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_DIV_ROUND_UP
	movq	%rax, %r15
	movq	_I3C_BUS_I2C_FM_SCL_RATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_DIV_ROUND_UP
	subq	%r15, %rax
	movq	%rax, %rdi
	callq	_SCL_I2C_FM_TIMING_HCNT
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_SCL_I2C_FM_TIMING_LCNT
	orl	%eax, %ebx
	movq	_SCL_I2C_FM_TIMING@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_BUS_I3C_MST_FREE
	movq	_BUS_FREE_TIMING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%r14), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_DEVICE_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_DEV_CTRL_I2C_SLAVE_PRESENT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	movl	%eax, %edi
	callq	_writel
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I3C_BUS_I2C_FMP_TLOW_MIN_NS,8,3 ## @I3C_BUS_I2C_FMP_TLOW_MIN_NS
	.comm	_I3C_BUS_I2C_FM_PLUS_SCL_RATE,8,3 ## @I3C_BUS_I2C_FM_PLUS_SCL_RATE
	.comm	_SCL_I2C_FMP_TIMING,8,3         ## @SCL_I2C_FMP_TIMING
	.comm	_I3C_BUS_I2C_FM_TLOW_MIN_NS,8,3 ## @I3C_BUS_I2C_FM_TLOW_MIN_NS
	.comm	_I3C_BUS_I2C_FM_SCL_RATE,8,3    ## @I3C_BUS_I2C_FM_SCL_RATE
	.comm	_SCL_I2C_FM_TIMING,8,3          ## @SCL_I2C_FM_TIMING
	.comm	_BUS_FREE_TIMING,8,3            ## @BUS_FREE_TIMING
	.comm	_DEVICE_CTRL,8,3                ## @DEVICE_CTRL
	.comm	_DEV_CTRL_I2C_SLAVE_PRESENT,4,2 ## @DEV_CTRL_I2C_SLAVE_PRESENT
	.no_dead_strip	_dw_i2c_clk_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_i2c_clk_cfg
_dw_i2c_clk_cfg:                        ; @dw_i2c_clk_cfg
	.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	x19, x0
	ldr	w0, [x0, #8]
	bl	_clk_get_rate
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	w0, #51712
	movk	w0, #15258, lsl #16
	mov	x1, x20
	bl	_DIV_ROUND_UP
	mov	x21, x0
Lloh0:
	adrp	x8, _I3C_BUS_I2C_FMP_TLOW_MIN_NS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I3C_BUS_I2C_FMP_TLOW_MIN_NS@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	mov	x1, x21
	bl	_DIV_ROUND_UP
	mov	x22, x0
Lloh3:
	adrp	x8, _I3C_BUS_I2C_FM_PLUS_SCL_RATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I3C_BUS_I2C_FM_PLUS_SCL_RATE@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_DIV_ROUND_UP
	sub	x0, x0, x22
	bl	_SCL_I2C_FMP_TIMING_HCNT
	mov	x23, x0
	mov	x0, x22
	bl	_SCL_I2C_FMP_TIMING_LCNT
	orr	w0, w0, w23
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _SCL_I2C_FMP_TIMING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SCL_I2C_FMP_TIMING@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh9:
	adrp	x8, _I3C_BUS_I2C_FM_TLOW_MIN_NS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I3C_BUS_I2C_FM_TLOW_MIN_NS@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	mov	x1, x21
	bl	_DIV_ROUND_UP
	mov	x21, x0
Lloh12:
	adrp	x8, _I3C_BUS_I2C_FM_SCL_RATE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I3C_BUS_I2C_FM_SCL_RATE@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_DIV_ROUND_UP
	sub	x0, x0, x21
	bl	_SCL_I2C_FM_TIMING_HCNT
	mov	x20, x0
	mov	x0, x21
	bl	_SCL_I2C_FM_TIMING_LCNT
	orr	w0, w0, w20
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _SCL_I2C_FM_TIMING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SCL_I2C_FM_TIMING@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x21
	bl	_BUS_I3C_MST_FREE
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _BUS_FREE_TIMING@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BUS_FREE_TIMING@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19]
Lloh21:
	adrp	x20, _DEVICE_CTRL@GOTPAGE
Lloh22:
	ldr	x20, [x20, _DEVICE_CTRL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh23:
	adrp	x8, _DEV_CTRL_I2C_SLAVE_PRESENT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DEV_CTRL_I2C_SLAVE_PRESENT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I3C_BUS_I2C_FMP_TLOW_MIN_NS,8,3 ; @I3C_BUS_I2C_FMP_TLOW_MIN_NS
	.comm	_I3C_BUS_I2C_FM_PLUS_SCL_RATE,8,3 ; @I3C_BUS_I2C_FM_PLUS_SCL_RATE
	.comm	_SCL_I2C_FMP_TIMING,8,3         ; @SCL_I2C_FMP_TIMING
	.comm	_I3C_BUS_I2C_FM_TLOW_MIN_NS,8,3 ; @I3C_BUS_I2C_FM_TLOW_MIN_NS
	.comm	_I3C_BUS_I2C_FM_SCL_RATE,8,3    ; @I3C_BUS_I2C_FM_SCL_RATE
	.comm	_SCL_I2C_FM_TIMING,8,3          ; @SCL_I2C_FM_TIMING
	.comm	_BUS_FREE_TIMING,8,3            ; @BUS_FREE_TIMING
	.comm	_DEVICE_CTRL,8,3                ; @DEVICE_CTRL
	.comm	_DEV_CTRL_I2C_SLAVE_PRESENT,4,2 ; @DEV_CTRL_I2C_SLAVE_PRESENT
	.no_dead_strip	_dw_i2c_clk_cfg
.subsections_via_symbols
