	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spear_adc_set_clk
_spear_adc_set_clk:                     ## @spear_adc_set_clk
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_clk_get_rate
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %ecx
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%ecx, %ebx
	subl	%edi, %ebx
	movl	%eax, (%r15)
	callq	_SPEAR_ADC_CLK_LOW
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_SPEAR_ADC_CLK_HIGH
	orl	%eax, %r14d
	movq	8(%r15), %rsi
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___raw_writel                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_spear_adc_set_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spear_adc_set_clk
_spear_adc_set_clk:                     ; @spear_adc_set_clk
	.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, [x0, #16]
	bl	_clk_get_rate
	mov	x21, x0
	mov	x1, x19
	bl	_DIV_ROUND_UP
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w8, w8, #1
	sub	w19, w0, w8
	sdiv	w9, w21, w0
	str	w9, [x20]
	mov	x0, x8
	bl	_SPEAR_ADC_CLK_LOW
	mov	x21, x0
	mov	x0, x19
	bl	_SPEAR_ADC_CLK_HIGH
	orr	w0, w0, w21
	ldr	x1, [x20, #8]
	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
	b	___raw_writel
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_spear_adc_set_clk
.subsections_via_symbols
