	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4725b_adc_init_clk_div
_jz4725b_adc_init_clk_div:              ## @jz4725b_adc_init_clk_div
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	8(%rsi), %edi
	callq	_clk_get_parent
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rdi
	callq	_clk_get_rate
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$8000000, %esi                  ## imm = 0x7A1200
	callq	_DIV_ROUND_UP
	movl	%eax, %edi
	movl	$1, %esi
	movl	$64, %edx
	callq	_clamp
	movl	%eax, %r12d
	movq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r12
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	leaq	-8000001(%rax), %rcx
	cmpq	$-7500002, %rcx                 ## imm = 0xFF8D8F1E
	ja	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_8:
	movq	%rax, %rdi
	movl	$100000, %esi                   ## imm = 0x186A0
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	decl	%eax
	movq	_JZ_ADC_REG_ADCLK_CLKDIV10US_LSB@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	decl	%r12d
	movq	_JZ_ADC_REG_ADCLK_CLKDIV_LSB@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	orl	%eax, %r12d
	movq	_JZ_ADC_REG_ADCLK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r12d, %edi
	callq	_writel
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADC clock has no parent\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"No valid divider for ADC main clock\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_JZ_ADC_REG_ADCLK_CLKDIV10US_LSB,4,2 ## @JZ_ADC_REG_ADCLK_CLKDIV10US_LSB
	.comm	_JZ_ADC_REG_ADCLK_CLKDIV_LSB,4,2 ## @JZ_ADC_REG_ADCLK_CLKDIV_LSB
	.comm	_JZ_ADC_REG_ADCLK,8,3           ## @JZ_ADC_REG_ADCLK
	.no_dead_strip	_jz4725b_adc_init_clk_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4725b_adc_init_clk_div
_jz4725b_adc_init_clk_div:              ; @jz4725b_adc_init_clk_div
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #8]
	bl	_clk_get_parent
	cbz	x0, LBB0_3
; %bb.1:
	bl	_clk_get_rate
	mov	x22, x0
	mov	w1, #4608
	movk	w1, #122, lsl #16
	bl	_DIV_ROUND_UP
	mov	w1, #1
	mov	w2, #64
	bl	_clamp
	mov	x21, x0
	mov	w8, w0
	udiv	x0, x22, x8
	sub	x8, x0, #1953, lsl #12          ; =7999488
	sub	x8, x8, #513
	mov	x9, #-28898
	movk	x9, #65421, lsl #16
	cmp	x8, x9
	b.hi	LBB0_5
; %bb.2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w1, #34464
	movk	w1, #1, lsl #16
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
Lloh8:
	adrp	x9, _JZ_ADC_REG_ADCLK_CLKDIV10US_LSB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _JZ_ADC_REG_ADCLK_CLKDIV10US_LSB@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	sub	w9, w21, #1
Lloh11:
	adrp	x10, _JZ_ADC_REG_ADCLK_CLKDIV_LSB@GOTPAGE
Lloh12:
	ldr	x10, [x10, _JZ_ADC_REG_ADCLK_CLKDIV_LSB@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w0, w9, w8
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _JZ_ADC_REG_ADCLK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _JZ_ADC_REG_ADCLK@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADC clock has no parent\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"No valid divider for ADC main clock\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_JZ_ADC_REG_ADCLK_CLKDIV10US_LSB,4,2 ; @JZ_ADC_REG_ADCLK_CLKDIV10US_LSB
	.comm	_JZ_ADC_REG_ADCLK_CLKDIV_LSB,4,2 ; @JZ_ADC_REG_ADCLK_CLKDIV_LSB
	.comm	_JZ_ADC_REG_ADCLK,8,3           ; @JZ_ADC_REG_ADCLK
	.no_dead_strip	_jz4725b_adc_init_clk_div
.subsections_via_symbols
