	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_adc_setup_samp_freq
_at91_adc_setup_samp_freq:              ## @at91_adc_setup_samp_freq
	.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	%esi, %r14d
	movq	%rdi, %rbx
	callq	_iio_priv_to_dev
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %edi
	callq	_clk_get_rate
	leal	(%r14,%r14), %ecx
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %r12d
	movl	4(%rbx), %edi
	movl	%r14d, %eax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	shrq	$38, %rsi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_at91_adc_startup_time
	movl	%eax, %r13d
	movq	_AT91_SAMA5D2_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_at91_adc_readl
	movq	_AT91_SAMA5D2_MR_STARTUP_MASK@GOTPCREL(%rip), %rcx
	movq	_AT91_SAMA5D2_MR_PRESCAL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	orl	(%rcx), %r15d
	notl	%r15d
	andl	%eax, %r15d
	movl	%r13d, %edi
	callq	_AT91_SAMA5D2_MR_STARTUP
	orl	%eax, %r15d
	movl	%r12d, %edi
	callq	_AT91_SAMA5D2_MR_PRESCAL
	orl	%eax, %r15d
	movq	_AT91_SAMA5D2_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_at91_adc_writel
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	callq	_dev_dbg
	movl	%r14d, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_SAMA5D2_MR,4,2            ## @AT91_SAMA5D2_MR
	.comm	_AT91_SAMA5D2_MR_STARTUP_MASK,4,2 ## @AT91_SAMA5D2_MR_STARTUP_MASK
	.comm	_AT91_SAMA5D2_MR_PRESCAL_MASK,4,2 ## @AT91_SAMA5D2_MR_PRESCAL_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"freq: %u, startup: %u, prescal: %u\n"

	.no_dead_strip	_at91_adc_setup_samp_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_adc_setup_samp_freq
_at91_adc_setup_samp_freq:              ; @at91_adc_setup_samp_freq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_iio_priv_to_dev
	mov	x21, x0
	ldr	w0, [x20, #8]
	bl	_clk_get_rate
	lsl	w8, w19, #1
	udiv	w8, w0, w8
	sub	w22, w8, #1
	ldr	w0, [x20, #4]
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w19, w8
	lsr	x1, x8, #38
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_at91_adc_startup_time
	mov	x23, x0
Lloh0:
	adrp	x24, _AT91_SAMA5D2_MR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AT91_SAMA5D2_MR@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_at91_adc_readl
Lloh2:
	adrp	x8, _AT91_SAMA5D2_MR_STARTUP_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AT91_SAMA5D2_MR_STARTUP_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _AT91_SAMA5D2_MR_PRESCAL_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AT91_SAMA5D2_MR_PRESCAL_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w25, w0, w8
	mov	x0, x23
	bl	_AT91_SAMA5D2_MR_STARTUP
	orr	w25, w25, w0
	mov	x0, x22
	bl	_AT91_SAMA5D2_MR_PRESCAL
	orr	w2, w25, w0
	ldr	w1, [x24]
	mov	x0, x20
	bl	_at91_adc_writel
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	mov	x3, x23
	mov	x4, x22
	bl	_dev_dbg
	str	w19, [x20]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_SAMA5D2_MR,4,2            ; @AT91_SAMA5D2_MR
	.comm	_AT91_SAMA5D2_MR_STARTUP_MASK,4,2 ; @AT91_SAMA5D2_MR_STARTUP_MASK
	.comm	_AT91_SAMA5D2_MR_PRESCAL_MASK,4,2 ; @AT91_SAMA5D2_MR_PRESCAL_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"freq: %u, startup: %u, prescal: %u\n"

	.no_dead_strip	_at91_adc_setup_samp_freq
.subsections_via_symbols
