	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dln2_update_scan_mode
_dln2_update_scan_mode:                 ## @dln2_update_scan_mode
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_iio_priv
	movq	%rax, %r14
	movl	(%rbx), %ebx
	movq	%rax, %rdi
	callq	_mutex_lock
	cmpl	$2, %ebx
	jl	LBB0_8
## %bb.1:
	decl	%ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_test_bit
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_dln2_adc_set_chan_enabled
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	cmpl	%r12d, %ebx
	jne	LBB0_2
LBB0_8:
	movq	%r14, %rdi
	callq	_dln2_adc_update_demux
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_dln2_adc_set_chan_enabled
	incl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to enable ADC channel %d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_dln2_update_scan_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dln2_update_scan_mode
_dln2_update_scan_mode:                 ; @dln2_update_scan_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_iio_priv
	mov	x19, x0
	ldr	w22, [x20]
	bl	_mutex_lock
	cmp	w22, #2
	b.lt	LBB0_4
; %bb.1:
	mov	w20, #0
	sub	w22, w22, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_test_bit
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dln2_adc_set_chan_enabled
	tbnz	w0, #31, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	cmp	w22, w20
	b.ne	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_dln2_adc_update_demux
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	cbz	w20, LBB0_8
; %bb.6:
	mov	w21, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_dln2_adc_set_chan_enabled
	add	w21, w21, #1
	cmp	w20, w21
	b.ne	LBB0_7
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to enable ADC channel %d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_dln2_update_scan_mode
.subsections_via_symbols
