	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_i2c_setclk
_cdns_i2c_setclk:                       ## @cdns_i2c_setclk
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rax
	movq	(%rsi), %rcx
	movq	%rcx, -32(%rbp)
	leaq	-32(%rbp), %rdi
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rcx
	movq	%rax, %rsi
	callq	_cdns_i2c_calc_divs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_CDNS_I2C_CR_OFFSET@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_cdns_i2c_readreg
	movl	-24(%rbp), %edx
	movq	_CDNS_I2C_CR_DIVA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_CDNS_I2C_CR_DIVA_MASK@GOTPCREL(%rip), %rcx
	movq	_CDNS_I2C_CR_DIVB_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %esi
	notl	%esi
	movq	_CDNS_I2C_CR_DIVB_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	-20(%rbp), %edi
	shll	%cl, %edi
	andl	%eax, %esi
	orl	%esi, %edx
	orl	%edx, %edi
	movl	(%r14), %esi
	callq	_cdns_i2c_writereg
LBB0_2:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_I2C_CR_OFFSET,4,2         ## @CDNS_I2C_CR_OFFSET
	.comm	_CDNS_I2C_CR_DIVA_MASK,4,2      ## @CDNS_I2C_CR_DIVA_MASK
	.comm	_CDNS_I2C_CR_DIVB_MASK,4,2      ## @CDNS_I2C_CR_DIVB_MASK
	.comm	_CDNS_I2C_CR_DIVA_SHIFT,4,2     ## @CDNS_I2C_CR_DIVA_SHIFT
	.comm	_CDNS_I2C_CR_DIVB_SHIFT,4,2     ## @CDNS_I2C_CR_DIVB_SHIFT
	.no_dead_strip	_cdns_i2c_setclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_i2c_setclk
_cdns_i2c_setclk:                       ; @cdns_i2c_setclk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, x0
	ldr	x9, [x1]
	str	x9, [sp]
	mov	x0, sp
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x1, x8
	bl	_cdns_i2c_calc_divs
	mov	x19, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x20, _CDNS_I2C_CR_OFFSET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CDNS_I2C_CR_OFFSET@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_cdns_i2c_readreg
Lloh2:
	adrp	x8, _CDNS_I2C_CR_DIVA_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CDNS_I2C_CR_DIVA_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CDNS_I2C_CR_DIVB_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CDNS_I2C_CR_DIVB_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
	ldp	w11, w9, [sp, #8]
Lloh8:
	adrp	x10, _CDNS_I2C_CR_DIVA_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CDNS_I2C_CR_DIVA_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh11:
	adrp	x10, _CDNS_I2C_CR_DIVB_SHIFT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CDNS_I2C_CR_DIVB_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	lsl	w10, w11, w10
	orr	w8, w9, w8
	orr	w0, w8, w10
	ldr	w1, [x20]
	bl	_cdns_i2c_writereg
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_I2C_CR_OFFSET,4,2         ; @CDNS_I2C_CR_OFFSET
	.comm	_CDNS_I2C_CR_DIVA_MASK,4,2      ; @CDNS_I2C_CR_DIVA_MASK
	.comm	_CDNS_I2C_CR_DIVB_MASK,4,2      ; @CDNS_I2C_CR_DIVB_MASK
	.comm	_CDNS_I2C_CR_DIVA_SHIFT,4,2     ; @CDNS_I2C_CR_DIVA_SHIFT
	.comm	_CDNS_I2C_CR_DIVB_SHIFT,4,2     ; @CDNS_I2C_CR_DIVB_SHIFT
	.no_dead_strip	_cdns_i2c_setclk
.subsections_via_symbols
