	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_i2c_get_clk_reg_val
_aspeed_i2c_get_clk_reg_val:            ## @aspeed_i2c_get_clk_reg_val
	.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	%edx, %r15d
	movl	%esi, %ebx
	leal	(%rbx,%rbx), %r12d
	addl	$2, %r12d
	xorl	%ecx, %ecx
	cmpl	%edx, %r12d
	jge	LBB0_2
## %bb.1:
	leal	-1(%r15), %eax
	cltd
	idivl	%r12d
	movq	%rdi, %r14
	movl	%eax, %edi
	callq	_ilog2
	movq	%r14, %rdi
	movl	%eax, %ecx
	incl	%ecx
LBB0_2:
	movq	_ASPEED_I2CD_TIME_BASE_DIVISOR_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %r14d
	cmpl	%r14d, %ecx
	jle	LBB0_4
## %bb.3:
	movl	%r14d, %ecx
	shll	%cl, %r12d
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_dev_err
	movl	(%r13), %edx
	movl	%ebx, %eax
	jmp	LBB0_5
LBB0_4:
	movl	$1, %eax
	shll	%cl, %eax
	addl	%r15d, %eax
	decl	%eax
	movl	%eax, %edx
	sarl	%cl, %edx
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ebx
	notl	%ebx
	addl	%edx, %ebx
	xorl	%esi, %esi
	cmpl	%eax, %edx
	cmovel	%esi, %ebx
	incl	%edx
	decl	%eax
	cmpl	$3, %edx
	cmovbl	%esi, %eax
	movl	%r14d, %edx
	movl	%ecx, %r14d
LBB0_5:
	andl	%r14d, %edx
	movq	_ASPEED_I2CD_TIME_SCL_HIGH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_ASPEED_I2CD_TIME_SCL_HIGH_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movq	_ASPEED_I2CD_TIME_SCL_LOW_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_ASPEED_I2CD_TIME_SCL_LOW_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	%edx, %eax
	orl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ASPEED_I2CD_TIME_BASE_DIVISOR_MASK,4,2 ## @ASPEED_I2CD_TIME_BASE_DIVISOR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clamping clock divider: divider requested, %u, is greater than largest possible divider, %u.\n"

	.comm	_ASPEED_I2CD_TIME_SCL_HIGH_SHIFT,4,2 ## @ASPEED_I2CD_TIME_SCL_HIGH_SHIFT
	.comm	_ASPEED_I2CD_TIME_SCL_HIGH_MASK,4,2 ## @ASPEED_I2CD_TIME_SCL_HIGH_MASK
	.comm	_ASPEED_I2CD_TIME_SCL_LOW_SHIFT,4,2 ## @ASPEED_I2CD_TIME_SCL_LOW_SHIFT
	.comm	_ASPEED_I2CD_TIME_SCL_LOW_MASK,4,2 ## @ASPEED_I2CD_TIME_SCL_LOW_MASK
	.no_dead_strip	_aspeed_i2c_get_clk_reg_val
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_i2c_get_clk_reg_val
_aspeed_i2c_get_clk_reg_val:            ; @aspeed_i2c_get_clk_reg_val
	.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, x2
	mov	x19, x1
	mov	x21, x0
	lsl	w8, w1, #1
	add	w23, w8, #2
	cmp	w23, w2
	b.ge	LBB0_2
; %bb.1:
	sub	w8, w20, #1
	sdiv	w0, w8, w23
	bl	_ilog2
	add	w8, w0, #1
	b	LBB0_3
LBB0_2:
	mov	w8, #0
LBB0_3:
Lloh0:
	adrp	x24, _ASPEED_I2CD_TIME_BASE_DIVISOR_MASK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ASPEED_I2CD_TIME_BASE_DIVISOR_MASK@GOTPAGEOFF]
	ldr	w22, [x24]
	cmp	w8, w22
	b.le	LBB0_5
; %bb.4:
	lsl	w3, w23, w22
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_err
	ldr	w9, [x24]
	mov	x10, x19
	b	LBB0_6
LBB0_5:
	mov	w9, #1
	lsl	w9, w9, w8
	add	w9, w20, w9
	sub	w9, w9, #1
	asr	w9, w9, w8
	cmp	w9, #0
	cinc	w10, w9, lt
	asr	w10, w10, #1
	mvn	w11, w10
	add	w11, w9, w11
	cmp	w9, w10
	csel	w19, wzr, w11, eq
	add	w9, w9, #1
	sub	w10, w10, #1
	cmp	w9, #3
	csel	w10, wzr, w10, lo
	mov	x9, x22
	mov	x22, x8
LBB0_6:
Lloh4:
	adrp	x8, _ASPEED_I2CD_TIME_SCL_HIGH_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ASPEED_I2CD_TIME_SCL_HIGH_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	lsl	w8, w19, w8
Lloh7:
	adrp	x11, _ASPEED_I2CD_TIME_SCL_HIGH_MASK@GOTPAGE
Lloh8:
	ldr	x11, [x11, _ASPEED_I2CD_TIME_SCL_HIGH_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	and	w8, w8, w11
Lloh10:
	adrp	x11, _ASPEED_I2CD_TIME_SCL_LOW_SHIFT@GOTPAGE
Lloh11:
	ldr	x11, [x11, _ASPEED_I2CD_TIME_SCL_LOW_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	lsl	w10, w10, w11
Lloh13:
	adrp	x11, _ASPEED_I2CD_TIME_SCL_LOW_MASK@GOTPAGE
Lloh14:
	ldr	x11, [x11, _ASPEED_I2CD_TIME_SCL_LOW_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w8, w10, w8
	and	w9, w9, w22
	orr	w0, w8, w9
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ASPEED_I2CD_TIME_BASE_DIVISOR_MASK,4,2 ; @ASPEED_I2CD_TIME_BASE_DIVISOR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clamping clock divider: divider requested, %u, is greater than largest possible divider, %u.\n"

	.comm	_ASPEED_I2CD_TIME_SCL_HIGH_SHIFT,4,2 ; @ASPEED_I2CD_TIME_SCL_HIGH_SHIFT
	.comm	_ASPEED_I2CD_TIME_SCL_HIGH_MASK,4,2 ; @ASPEED_I2CD_TIME_SCL_HIGH_MASK
	.comm	_ASPEED_I2CD_TIME_SCL_LOW_SHIFT,4,2 ; @ASPEED_I2CD_TIME_SCL_LOW_SHIFT
	.comm	_ASPEED_I2CD_TIME_SCL_LOW_MASK,4,2 ; @ASPEED_I2CD_TIME_SCL_LOW_MASK
	.no_dead_strip	_aspeed_i2c_get_clk_reg_val
.subsections_via_symbols
