	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rm3100_set_samp_freq
_rm3100_set_samp_freq:                  ## @rm3100_set_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	movq	8(%rax), %rbx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	4(%rax), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_RM3100_REG_CC_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_RM3100_SAMP_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.7:
	movq	_rm3100_samp_rates@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r12
	cmpq	%r12, %rax
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%r12,8), %rdx
	cmpl	%r13d, (%rdx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r14d, 4(%rdx)
	jne	LBB0_10
## %bb.4:
	cmpl	%eax, %r12d
	jne	LBB0_5
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_1:
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_3:
	xorl	%r12d, %r12d
	cmpl	%eax, %r12d
	je	LBB0_11
LBB0_5:
	movq	_RM3100_REG_TMRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RM3100_TMRC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%r12d, %edx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_6
## %bb.14:
	movl	-52(%rbp), %eax
	cmpl	$600, %r13d                     ## imm = 0x258
	jne	LBB0_17
## %bb.15:
	cmpl	$200, %eax
	jne	LBB0_17
## %bb.16:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$100, %esi
	jmp	LBB0_20
LBB0_17:
	cmpl	$600, %r13d                     ## imm = 0x258
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_21
## %bb.18:
	cmpl	$100, %eax
	jne	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	movl	$200, %esi
LBB0_20:
	callq	_rm3100_set_cycle_count
	testl	%eax, %eax
	js	LBB0_6
LBB0_21:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_INDIO_BUFFER_TRIGGERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.22:
	movq	_RM3100_REG_CMM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_6
## %bb.23:
	movq	8(%rbx), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %edx
	andl	$7, %edx
	movq	_RM3100_CMM_AXIS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movl	(%r13), %esi
	movq	_RM3100_CMM_START@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_6
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_rm3100_samp_rates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r12d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	8(%rax), %eax
	addl	%eax, %eax
	movl	%eax, (%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_25
LBB0_6:
	movl	%eax, %r15d
LBB0_12:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_13:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_25:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RM3100_REG_CC_X,4,2            ## @RM3100_REG_CC_X
	.comm	_RM3100_SAMP_NUM,4,2            ## @RM3100_SAMP_NUM
	.comm	_rm3100_samp_rates,8,3          ## @rm3100_samp_rates
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RM3100_REG_TMRC,4,2            ## @RM3100_REG_TMRC
	.comm	_RM3100_TMRC_OFFSET,4,2         ## @RM3100_TMRC_OFFSET
	.comm	_INDIO_BUFFER_TRIGGERED,8,3     ## @INDIO_BUFFER_TRIGGERED
	.comm	_RM3100_REG_CMM,4,2             ## @RM3100_REG_CMM
	.comm	_RM3100_CMM_AXIS_SHIFT,4,2      ## @RM3100_CMM_AXIS_SHIFT
	.comm	_RM3100_CMM_START,4,2           ## @RM3100_CMM_START
	.no_dead_strip	_rm3100_set_samp_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rm3100_set_samp_freq
_rm3100_set_samp_freq:                  ; @rm3100_set_samp_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x2
	mov	x23, x1
	mov	x21, x0
	bl	_iio_priv
	mov	x20, x0
	ldr	x22, [x0, #8]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _RM3100_REG_CC_X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RM3100_REG_CC_X@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x22
	bl	_regmap_read
	tbnz	w0, #31, LBB0_20
; %bb.1:
Lloh3:
	adrp	x8, _RM3100_SAMP_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RM3100_SAMP_NUM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x26, #0
Lloh6:
	adrp	x9, _rm3100_samp_rates@GOTPAGE
Lloh7:
	ldr	x9, [x9, _rm3100_samp_rates@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	cmp	x8, x26
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x26, lsl #3]
	ldr	w11, [x10]
	cmp	w11, w23
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w10, [x10, #4]
	cmp	w10, w24
	b.ne	LBB0_3
; %bb.6:
	cmp	w26, w8
	b.ne	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_21
LBB0_8:
	mov	w26, #0
	cmp	w26, w8
	b.eq	LBB0_7
LBB0_9:
Lloh12:
	adrp	x8, _RM3100_REG_TMRC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RM3100_REG_TMRC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _RM3100_TMRC_OFFSET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RM3100_TMRC_OFFSET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	add	w2, w8, w26
	mov	x0, x22
	bl	_regmap_write
	tbnz	w0, #31, LBB0_20
; %bb.10:
	ldr	w8, [sp, #12]
	cmp	w23, #600
	b.ne	LBB0_13
; %bb.11:
	cmp	w8, #200
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x20
	mov	w1, #100
	bl	_rm3100_set_cycle_count
	tbz	w0, #31, LBB0_16
	b	LBB0_20
LBB0_13:
	cmp	w23, #600
	b.eq	LBB0_16
; %bb.14:
	cmp	w8, #100
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x20
	mov	w1, #200
	bl	_rm3100_set_cycle_count
	tbnz	w0, #31, LBB0_20
LBB0_16:
	ldr	x8, [x21]
Lloh18:
	adrp	x9, _INDIO_BUFFER_TRIGGERED@GOTPAGE
Lloh19:
	ldr	x9, [x9, _INDIO_BUFFER_TRIGGERED@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.17:
Lloh21:
	adrp	x23, _RM3100_REG_CMM@GOTPAGE
Lloh22:
	ldr	x23, [x23, _RM3100_REG_CMM@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	mov	w2, #0
	bl	_regmap_write
	tbnz	w0, #31, LBB0_20
; %bb.18:
	ldr	x0, [x20, #8]
	ldr	w1, [x23]
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	and	w8, w8, #0x7
Lloh23:
	adrp	x9, _RM3100_CMM_AXIS_SHIFT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _RM3100_CMM_AXIS_SHIFT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh26:
	adrp	x9, _RM3100_CMM_START@GOTPAGE
Lloh27:
	ldr	x9, [x9, _RM3100_CMM_START@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_regmap_write
	tbnz	w0, #31, LBB0_20
LBB0_19:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w25, #0
Lloh29:
	adrp	x8, _rm3100_samp_rates@GOTPAGE
Lloh30:
	ldr	x8, [x8, _rm3100_samp_rates@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	ldr	x8, [x8, w26, uxtw #3]
	ldr	w8, [x8, #8]
	lsl	w8, w8, #1
	str	w8, [x20]
	b	LBB0_22
LBB0_20:
	mov	x25, x0
LBB0_21:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_22:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_RM3100_REG_CC_X,4,2            ; @RM3100_REG_CC_X
	.comm	_RM3100_SAMP_NUM,4,2            ; @RM3100_SAMP_NUM
	.comm	_rm3100_samp_rates,8,3          ; @rm3100_samp_rates
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RM3100_REG_TMRC,4,2            ; @RM3100_REG_TMRC
	.comm	_RM3100_TMRC_OFFSET,4,2         ; @RM3100_TMRC_OFFSET
	.comm	_INDIO_BUFFER_TRIGGERED,8,3     ; @INDIO_BUFFER_TRIGGERED
	.comm	_RM3100_REG_CMM,4,2             ; @RM3100_REG_CMM
	.comm	_RM3100_CMM_AXIS_SHIFT,4,2      ; @RM3100_CMM_AXIS_SHIFT
	.comm	_RM3100_CMM_START,4,2           ; @RM3100_CMM_START
	.no_dead_strip	_rm3100_set_samp_freq
.subsections_via_symbols
