	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7768_set_freq
_ad7768_set_freq:                       ## @ad7768_set_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
	movq	%rdi, %r14
	movq	_U32_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%rdi), %edi
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, %r12
	movq	_ad7768_clk_config@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	xorl	%r13d, %r13d
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ad7768_clk_config@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%r12d, %eax
	subl	(%rdi,%r14), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	%ebx, %ecx
	cmovbl	%ecx, %ebx
	cmovbl	%r15d, %r13d
	incq	%r15
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$16, %r14
	cmpq	%rax, %r15
	jb	LBB0_2
## %bb.3:
	movl	%r13d, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_ad7768_clk_config@GOTPCREL(%rip), %r15
LBB0_4:
	movq	(%r15), %rax
	shlq	$4, %r13
	movl	12(%rax,%r13), %edi
	callq	_AD7768_PWR_MCLK_DIV
	movl	%eax, %r12d
	movq	(%r15), %rax
	movl	8(%rax,%r13), %edi
	callq	_AD7768_PWR_PWRMODE
	orl	%eax, %r12d
	movq	_AD7768_REG_POWER_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_ad7768_spi_reg_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movq	(%r15), %rax
	movl	4(%rax,%r13), %esi
	movq	%r14, %rdi
	callq	_ad7768_set_dig_fil
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	movq	(%r15), %rax
	movl	(%rax,%r13), %esi
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_U32_MAX,4,2                    ## @U32_MAX
	.comm	_ad7768_clk_config,8,3          ## @ad7768_clk_config
	.comm	_AD7768_REG_POWER_CLOCK,4,2     ## @AD7768_REG_POWER_CLOCK
	.no_dead_strip	_ad7768_set_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7768_set_freq
_ad7768_set_freq:                       ; @ad7768_set_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, x0
Lloh0:
	adrp	x8, _U32_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _U32_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	w0, [x0]
	bl	_DIV_ROUND_CLOSEST
	mov	x20, x0
Lloh3:
	adrp	x21, _ad7768_clk_config@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ad7768_clk_config@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_3
; %bb.1:
	mov	x24, #0
	mov	x25, #0
	mov	w22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	w8, [x0, x24]
	subs	w8, w20, w8
	cneg	w8, w8, mi
	cmp	w8, w23
	csel	w23, w8, w23, lo
	csel	w22, w25, w22, lo
	add	x25, x25, #1
	bl	_ARRAY_SIZE
	add	x24, x24, #16
	cmp	x25, w0, uxtw
	b.lo	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x22, #0
LBB0_4:
	ldr	x8, [x21]
	lsl	x23, x22, #4
	add	x8, x8, x23
	ldr	w0, [x8, #12]
	bl	_AD7768_PWR_MCLK_DIV
	mov	x20, x0
	ldr	x8, [x21]
	add	x8, x8, x23
	ldr	w0, [x8, #8]
	bl	_AD7768_PWR_PWRMODE
	orr	w2, w0, w20
Lloh5:
	adrp	x8, _AD7768_REG_POWER_CLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AD7768_REG_POWER_CLOCK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ad7768_spi_reg_write
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	x8, [x21]
	add	x8, x8, x22, lsl #4
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_ad7768_set_dig_fil
	tbnz	w0, #31, LBB0_7
; %bb.6:
	ldr	w0, [x19]
	ldr	x8, [x21]
	ldr	w1, [x8, x23]
	bl	_DIV_ROUND_CLOSEST
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
LBB0_7:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_U32_MAX,4,2                    ; @U32_MAX
	.comm	_ad7768_clk_config,8,3          ; @ad7768_clk_config
	.comm	_AD7768_REG_POWER_CLOCK,4,2     ; @AD7768_REG_POWER_CLOCK
	.no_dead_strip	_ad7768_set_freq
.subsections_via_symbols
