	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_i2c_calc_divs
_cdns_i2c_calc_divs:                    ## @cdns_i2c_calc_divs
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r8
	movq	(%rdi), %rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,4), %r12
	addq	%rdx, %r12
	cmpq	%rsi, %r12
	ja	LBB0_7
## %bb.1:
	movq	%rsi, %rbx
	movq	%rsi, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r12
	jmp	LBB0_4
LBB0_2:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:
	movq	_CDNS_I2C_DIVA_MAX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	_CDNS_I2C_DIVB_MAX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	imulq	%rsi, %rdx
	cmpq	%rdx, %rax
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jbe	LBB0_5
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_5:
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.8:
	xorl	%ecx, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	$-1, -48(%rbp)                  ## 4-byte Folded Spill
	movl	$1, %r13d
	movl	$22, %r15d
	movl	%r12d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%r13d, %eax
	incl	%r13d
	addl	%r12d, %r14d
	addl	$22, %r15d
	movq	_CDNS_I2C_DIVA_MAX@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jbe	LBB0_18
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_DIV_ROUND_UP
	testl	%eax, %eax
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, %ecx
	movl	%eax, %eax
	movq	_CDNS_I2C_DIVB_MAX@GOTPCREL(%rip), %rdx
	cmpq	%rax, (%rdx)
	jb	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r15d, %esi
	imull	%ecx, %esi
	movq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rax, %rdx
	jb	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
                                        ## kill: def $edx killed $edx killed $rdx
	subl	%eax, %edx
	cmpl	%edx, -48(%rbp)                 ## 4-byte Folded Reload
	jbe	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	leal	-1(%r13), %esi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	decl	%ecx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_17
LBB0_6:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_18:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	xorl	%eax, %eax
LBB0_19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_I2C_DIVA_MAX,8,3          ## @CDNS_I2C_DIVA_MAX
	.comm	_CDNS_I2C_DIVB_MAX,8,3          ## @CDNS_I2C_DIVB_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cdns_i2c_calc_divs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_i2c_calc_divs
_cdns_i2c_calc_divs:                    ; @cdns_i2c_calc_divs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x24, [x0]
	mov	w8, #22
	mul	x25, x24, x8
	cmp	x25, x1
	b.hi	LBB0_2
; %bb.1:
	mov	x22, x1
	udiv	x9, x1, x25
Lloh0:
	adrp	x26, _CDNS_I2C_DIVA_MAX@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CDNS_I2C_DIVA_MAX@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh2:
	adrp	x27, _CDNS_I2C_DIVB_MAX@GOTPAGE
Lloh3:
	ldr	x27, [x27, _CDNS_I2C_DIVB_MAX@GOTPAGEOFF]
	ldr	x10, [x27]
	mul	x10, x10, x8
	cmp	x9, x10
	b.ls	LBB0_3
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_3:
	mov	x20, x0
	stp	x2, x3, [sp]                    ; 16-byte Folded Spill
	cbz	x8, LBB0_11
; %bb.4:
	stp	x24, xzr, [sp, #16]             ; 16-byte Folded Spill
	mov	w19, #-1
	mov	w28, #1
	mov	w21, #22
	mov	x23, x25
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	cmp	x8, w28, uxtw
	add	w28, w28, #1
	add	w23, w23, w25
	add	w21, w21, #22
	b.ls	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_DIV_ROUND_UP
	cbz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, w0
	ldr	x9, [x27]
	cmp	x9, x8
	b.lo	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mul	w8, w21, w0
	udiv	x8, x22, x8
	cmp	x24, x8
	b.lo	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w9, w24, w8
	cmp	w19, w9
	b.ls	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	sub	w11, w28, #1
	sub	w10, w0, #1
	stp	w10, w11, [sp, #24]             ; 8-byte Folded Spill
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	mov	x19, x9
	b	LBB0_5
LBB0_11:
	stp	x24, xzr, [sp, #16]             ; 16-byte Folded Spill
LBB0_12:
	mov	w0, #0
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	str	w9, [x8]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	str	w9, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x8, [x20]
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_I2C_DIVA_MAX,8,3          ; @CDNS_I2C_DIVA_MAX
	.comm	_CDNS_I2C_DIVB_MAX,8,3          ; @CDNS_I2C_DIVB_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cdns_i2c_calc_divs
.subsections_via_symbols
