	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tiadc_step_config
_tiadc_step_config:                     ## @tiadc_step_config
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.1:
	movq	%rax, %r12
	movq	48(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_REG_STEPDELAY
	movl	%eax, %r14d
	movq	24(%r12), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_STEPDELAY_OPEN
	movl	%eax, %ebx
	movq	32(%r12), %rax
	movl	(%rax,%r13,4), %edi
	callq	_STEPDELAY_SAMPLE
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_tiadc_writel
	movq	40(%r12), %rax
	movl	%r13d, (%rax,%r13,4)
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	16(%r12), %rcx
	movl	(%rax,%r13,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rcx,%r13,8), %rdi
	movq	_STEPCONFIG_AVG_16@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdi
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_STEPCONFIG_AVG_16@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	16(%r12), %rax
	movq	%rdi, (%rax,%r13,8)
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_ffs
	leaq	-1(%rax), %rdi
	callq	_STEPCONFIG_AVG
	movl	%eax, %r14d
	movq	_STEPCONFIG_FIFO1@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_STEPCONFIG_FIFO1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_iio_buffer_enabled
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_STEPCONFIG_MODE_SWCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_REG_STEPCONFIG
	movl	%eax, %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_STEPCONFIG_INP
	orl	%eax, %r14d
	orl	%ebx, %r14d
	movq	_STEPCONFIG_INM_ADCREFM@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_STEPCONFIG_RFP_VREFP@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_STEPCONFIG_RFM_VREFN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_tiadc_writel
	movq	24(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movq	_STEPDELAY_OPEN_MASK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_STEPDELAY_OPEN_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%r12), %rcx
	movq	%rax, (%rcx,%r13,8)
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r12), %rax
	cmpl	$256, (%rax,%r13,4)             ## imm = 0x100
	jl	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	movq	32(%r12), %rax
	movl	$255, (%rax,%r13,4)
	jmp	LBB0_13
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STEPCONFIG_AVG_16,8,3          ## @STEPCONFIG_AVG_16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chan %d step_avg truncating to %d\n"

	.comm	_STEPCONFIG_FIFO1,4,2           ## @STEPCONFIG_FIFO1
	.comm	_STEPCONFIG_MODE_SWCNT,4,2      ## @STEPCONFIG_MODE_SWCNT
	.comm	_STEPCONFIG_INM_ADCREFM,4,2     ## @STEPCONFIG_INM_ADCREFM
	.comm	_STEPCONFIG_RFP_VREFP,4,2       ## @STEPCONFIG_RFP_VREFP
	.comm	_STEPCONFIG_RFM_VREFN,4,2       ## @STEPCONFIG_RFM_VREFN
	.comm	_STEPDELAY_OPEN_MASK,8,3        ## @STEPDELAY_OPEN_MASK
L_.str.1:                               ## @.str.1
	.asciz	"chan %d open delay truncating to 0x3FFFF\n"

L_.str.2:                               ## @.str.2
	.asciz	"chan %d sample delay truncating to 0xFF\n"

	.no_dead_strip	_tiadc_step_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tiadc_step_config
_tiadc_step_config:                     ; @tiadc_step_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_iio_priv
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x20, x0
	mov	x21, #0
	ldr	x8, [x0, #48]
Lloh0:
	adrp	x28, _STEPCONFIG_AVG_16@GOTPAGE
Lloh1:
	ldr	x28, [x28, _STEPCONFIG_AVG_16@GOTPAGEOFF]
Lloh2:
	adrp	x24, _STEPCONFIG_RFM_VREFN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _STEPCONFIG_RFM_VREFN@GOTPAGEOFF]
Lloh4:
	adrp	x25, _STEPDELAY_OPEN_MASK@GOTPAGE
Lloh5:
	ldr	x25, [x25, _STEPDELAY_OPEN_MASK@GOTPAGEOFF]
	ldr	x23, [x8]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_REG_STEPDELAY
	mov	x26, x0
	ldr	x8, [x20, #24]
	ldr	x0, [x8, x21, lsl #3]
	bl	_STEPDELAY_OPEN
	mov	x27, x0
	ldr	x8, [x20, #32]
	lsl	x22, x21, #2
	ldr	w0, [x8, x22]
	bl	_STEPDELAY_SAMPLE
	orr	w2, w0, w27
	mov	x0, x20
	mov	x1, x26
	bl	_tiadc_writel
	ldr	x8, [x20, #40]
	str	w21, [x8, x22]
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x20, #8]
	ldr	w26, [x8, x21, lsl #2]
	ldr	x0, [x9, x21, lsl #3]
	ldr	x8, [x28]
	cmp	x0, x8
	b.le	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x8, [sp]
	mov	x0, x23
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x26
	bl	_dev_warn
	ldr	x0, [x28]
	ldr	x8, [x20, #16]
	str	x0, [x8, x21, lsl #3]
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_ffs
	sub	x0, x0, #1
	bl	_STEPCONFIG_AVG
Lloh8:
	adrp	x8, _STEPCONFIG_FIFO1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STEPCONFIG_FIFO1@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w27, w8, w0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh11:
	adrp	x8, _STEPCONFIG_FIFO1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STEPCONFIG_FIFO1@GOTPAGEOFF]
Lloh13:
	ldr	w27, [x8]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_iio_buffer_enabled
Lloh14:
	adrp	x8, _STEPCONFIG_MODE_SWCNT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STEPCONFIG_MODE_SWCNT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w22, w8, w27
	mov	x0, x21
	bl	_REG_STEPCONFIG
	mov	x27, x0
	mov	x0, x26
	bl	_STEPCONFIG_INP
	orr	w8, w22, w0
Lloh17:
	adrp	x9, _STEPCONFIG_INM_ADCREFM@GOTPAGE
Lloh18:
	ldr	x9, [x9, _STEPCONFIG_INM_ADCREFM@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _STEPCONFIG_RFP_VREFP@GOTPAGE
Lloh21:
	ldr	x9, [x9, _STEPCONFIG_RFP_VREFP@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x24]
	orr	w2, w8, w9
	mov	x0, x20
	mov	x1, x27
	bl	_tiadc_writel
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x9, [x25]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x26
	bl	_dev_warn
	ldr	x8, [x25]
	ldr	x9, [x20, #24]
	str	x8, [x9, x21, lsl #3]
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #32]
	ldr	w8, [x8, x21, lsl #2]
	cmp	w8, #256
	b.lt	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x26
	bl	_dev_warn
	ldr	x8, [x20, #32]
	mov	w9, #255
	str	w9, [x8, x21, lsl #2]
	b	LBB0_2
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_STEPCONFIG_AVG_16,8,3          ; @STEPCONFIG_AVG_16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chan %d step_avg truncating to %d\n"

	.comm	_STEPCONFIG_FIFO1,4,2           ; @STEPCONFIG_FIFO1
	.comm	_STEPCONFIG_MODE_SWCNT,4,2      ; @STEPCONFIG_MODE_SWCNT
	.comm	_STEPCONFIG_INM_ADCREFM,4,2     ; @STEPCONFIG_INM_ADCREFM
	.comm	_STEPCONFIG_RFP_VREFP,4,2       ; @STEPCONFIG_RFP_VREFP
	.comm	_STEPCONFIG_RFM_VREFN,4,2       ; @STEPCONFIG_RFM_VREFN
	.comm	_STEPDELAY_OPEN_MASK,8,3        ; @STEPDELAY_OPEN_MASK
l_.str.1:                               ; @.str.1
	.asciz	"chan %d open delay truncating to 0x3FFFF\n"

l_.str.2:                               ; @.str.2
	.asciz	"chan %d sample delay truncating to 0xFF\n"

	.no_dead_strip	_tiadc_step_config
.subsections_via_symbols
