	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_mux_select
_iio_mux_select:                        ## @iio_mux_select
	.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, %r14
	movq	24(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movslq	%esi, %r12
	movq	16(%rdi), %r15
	movl	4(%rdi), %edi
	movq	%r12, %r13
	shlq	$4, %r13
	movq	(%r15,%r13), %rsi
	callq	_mux_control_select
	movl	%eax, %ebx
	movl	$-1, %eax
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.1:
	leaq	(%r15,%r13), %rdx
	movslq	(%r14), %rax
	movq	(%rdx), %rcx
	xorl	%ebx, %ebx
	cmpq	%rax, %rcx
	je	LBB0_12
## %bb.2:
	movq	8(%r15,%r13), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.4:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r13), %rcx
	addq	$8, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rax,%r15), %rsi
	addq	$8, %r15
	testq	%rsi, %rsi
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r12,8), %rdx
	movq	(%rdx,%r15,2), %rcx
	testq	%rcx, %rcx
	js	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r14), %edi
	movl	8(%rdx,%r15,2), %edx
	callq	_iio_write_channel_ext_info
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	jmp	LBB0_8
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
LBB0_10:
	xorl	%ebx, %ebx
	movl	%ecx, %eax
LBB0_11:
	movl	%eax, (%r14)
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_mux_control_deselect
	movl	$-1, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_iio_mux_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_mux_select
_iio_mux_select:                        ; @iio_mux_select
	.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	x21, x1
	mov	x19, x0
	ldp	x24, x22, [x0, #16]
	ldr	w0, [x0, #4]
	add	x23, x24, w1, sxtw #4
	ldr	x1, [x23]
	bl	_mux_control_select
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldrsw	x8, [x19]
	ldr	x9, [x23]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.2:
	mov	w20, #0
	b	LBB0_14
LBB0_3:
	mov	x20, x0
	mov	w9, #-1
	b	LBB0_13
LBB0_4:
	sxtw	x21, w21
	add	x24, x24, x21, lsl #4
	ldr	x8, [x24, #8]!
	cbz	x8, LBB0_12
; %bb.5:
	ldr	x1, [x8]
	cbz	x1, LBB0_12
; %bb.6:
	mov	x25, #0
	mov	w26, #8
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x1, [x8, x26]
	add	x25, x25, #16
	add	x26, x26, #8
	cbz	x1, LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22, x21, lsl #3]
	ldr	x3, [x9, x25]
	tbnz	x3, #63, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19, #8]
	add	x8, x9, x25
	ldr	w2, [x8, #8]
	bl	_iio_write_channel_ext_info
	tbnz	w0, #31, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x24]
	b	LBB0_7
LBB0_11:
	ldr	x9, [x23]
LBB0_12:
	mov	w20, #0
LBB0_13:
	str	w9, [x19]
LBB0_14:
	mov	x0, x20
	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
LBB0_15:
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_mux_control_deselect
	mov	w9, #-1
	b	LBB0_13
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_iio_mux_select
.subsections_via_symbols
