	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adis16480_set_freq
_adis16480_set_freq:                    ## @adis16480_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	callq	_iio_priv
	movq	%rax, %rdi
	movl	%r14d, %eax
	orl	%ebx, %eax
	js	LBB0_6
## %bb.1:
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	movslq	%r14d, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	addl	%eax, %ecx
	je	LBB0_6
## %bb.2:
	movq	(%rdi), %r8
	movq	_ADIS16480_CLK_PPS@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	8(%rdi), %esi
	cmpq	%rbx, %r8
	jne	LBB0_4
## %bb.3:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movq	_ADIS16495_REG_SYNC_SCALE@GOTPCREL(%rip), %rdx
	jmp	LBB0_5
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movq	_ADIS16480_REG_DEC_RATE@GOTPCREL(%rip), %rdx
LBB0_5:
	xorl	%ecx, %ecx
	cmpq	%rbx, %r8
	setne	%cl
	movl	(%rdx), %esi
	movq	16(%rdi), %rdx
	movl	(%rdx), %ebx
	cmpl	%ebx, %eax
	cmovbl	%eax, %ebx
	movl	%ebx, %edx
	subl	%ecx, %edx
	testl	%ebx, %ebx
	cmovel	%ebx, %edx
	addq	$12, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_adis_write_reg_16              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADIS16480_CLK_PPS,8,3          ## @ADIS16480_CLK_PPS
	.comm	_ADIS16495_REG_SYNC_SCALE,4,2   ## @ADIS16495_REG_SYNC_SCALE
	.comm	_ADIS16480_REG_DEC_RATE,4,2     ## @ADIS16480_REG_DEC_RATE
	.no_dead_strip	_adis16480_set_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adis16480_set_freq
_adis16480_set_freq:                    ; @adis16480_set_freq
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x1
	bl	_iio_priv
	orr	w8, w20, w19
	tbnz	w8, #31, LBB0_3
; %bb.1:
	mov	w8, #1000
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w20, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	madd	w8, w19, w8, w9
	cbz	w8, LBB0_3
; %bb.2:
	ldr	x9, [x0]
Lloh0:
	adrp	x10, _ADIS16480_CLK_PPS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ADIS16480_CLK_PPS@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	w11, [x0, #8]
Lloh3:
	adrp	x12, _ADIS16480_REG_DEC_RATE@GOTPAGE
Lloh4:
	ldr	x12, [x12, _ADIS16480_REG_DEC_RATE@GOTPAGEOFF]
Lloh5:
	adrp	x13, _ADIS16495_REG_SYNC_SCALE@GOTPAGE
Lloh6:
	ldr	x13, [x13, _ADIS16495_REG_SYNC_SCALE@GOTPAGEOFF]
	cmp	x9, x10
	csel	x12, x12, x13, ne
	udiv	w13, w11, w8
	udiv	w8, w8, w11
	csel	w8, w13, w8, ne
	cmp	x9, x10
	cset	w9, ne
	ldr	w1, [x12]
	ldr	x10, [x0, #16]
	ldr	w10, [x10]
	cmp	w8, w10
	csel	w8, w8, w10, lo
	sub	w9, w8, w9
	cmp	w8, #0
	csel	w2, wzr, w9, eq
	add	x0, x0, #12
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_adis_write_reg_16
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADIS16480_CLK_PPS,8,3          ; @ADIS16480_CLK_PPS
	.comm	_ADIS16495_REG_SYNC_SCALE,4,2   ; @ADIS16495_REG_SYNC_SCALE
	.comm	_ADIS16480_REG_DEC_RATE,4,2     ; @ADIS16480_REG_DEC_RATE
	.no_dead_strip	_adis16480_set_freq
.subsections_via_symbols
