	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mux_configure_channel
_mux_configure_channel:                 ## @mux_configure_channel
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	32(%rsi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movslq	%r8d, %rax
	movq	8(%rsi), %rdi
	movq	24(%rsi), %r14
	movq	(%rdi), %r13
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %r12
	shlq	$4, %r12
	movl	$1, (%r14,%r12)
	movl	44(%r13), %eax
	movl	%eax, 44(%r14,%r12)
	movq	%rcx, 8(%r14,%r12)
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	%rax, 16(%r14,%r12)
	leaq	(%r14,%r12), %rsi
	addq	$40, %rsi
	callq	_iio_get_channel_type
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_IIO_CHAN_INFO_RAW@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_iio_channel_has_info
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	callq	_BIT
	orl	%eax, 36(%r14,%r12)
LBB0_4:
	movq	_IIO_CHAN_INFO_SCALE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_iio_channel_has_info
	testq	%rax, %rax
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	callq	_BIT
	orl	%eax, 36(%r14,%r12)
LBB0_6:
	movl	(%r15), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_iio_channel_has_available
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r15), %edi
	callq	_BIT
	orl	%eax, 32(%r14,%r12)
LBB0_8:
	movl	16(%r13), %edi
	callq	_mux_control_states
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	jle	LBB0_9
## %bb.11:
	movq	%rcx, 24(%r14,%r12)
	movq	8(%r13), %rdi
	callq	_iio_get_channel_ext_info_count
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_12
## %bb.20:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_devm_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_13
	jmp	LBB0_21
LBB0_1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_29
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_29
LBB0_12:
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_13:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$16, %edx
	callq	_devm_kcalloc
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rcx,%rdx,8)
	testq	%rax, %rax
	je	LBB0_21
## %bb.14:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_27
## %bb.15:
	movl	%r14d, %ecx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %r14
	movl	$8, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_16 Depth=1
	addq	$12, %rbx
	addq	$16, %r12
	cmpq	%rbx, %r14
	je	LBB0_27
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, -8(%rax,%r12)
	movq	16(%rdx), %rcx
	cmpl	$0, 8(%rcx,%rbx)
	je	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$0, 4(%rcx,%rbx)
	je	LBB0_26
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r13), %rax
	movq	8(%r13), %rdi
	movl	(%rax,%rbx), %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_iio_read_channel_ext_info
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_19
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	1(%r15), %edx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_devm_kmemdup
	movq	%rax, %rcx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rax,%rdx,8), %rax
	movq	%rcx, (%rax,%r12)
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.25:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r15d, %edx
	movq	$0, (%rcx,%rdx,8)
	movl	%r15d, -8(%rax,%r12)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_29
LBB0_27:
	xorl	%r15d, %r15d
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_29
## %bb.28:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_devm_kfree
	jmp	LBB0_29
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	(%rax,%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
LBB0_29:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	(%rax,%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get parent channel type\n"

	.comm	_IIO_CHAN_INFO_RAW,4,2          ## @IIO_CHAN_INFO_RAW
	.comm	_IIO_CHAN_INFO_SCALE,4,2        ## @IIO_CHAN_INFO_SCALE
L_.str.1:                               ## @.str.1
	.asciz	"too many channels\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"failed to get ext_info '%s'\n"

L_.str.3:                               ## @.str.3
	.asciz	"too large ext_info '%s'\n"

	.no_dead_strip	_mux_configure_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mux_configure_channel
_mux_configure_channel:                 ; @mux_configure_channel
	.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	x24, x4
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x26, x27, [x1, #24]
	ldp	x8, x0, [x1]
	ldr	x21, [x0]
	mov	w9, #48
	smaddl	x9, w4, w9, x26
	mov	w10, #1
	str	w10, [x9]
	ldr	w10, [x21, #44]
	str	w10, [x9, #44]
	stp	x3, x8, [x9, #8]
	add	x1, x9, #40
	bl	_iio_get_channel_type
	tbnz	w0, #31, LBB0_10
; %bb.1:
	sxtw	x24, w24
Lloh0:
	adrp	x23, _IIO_CHAN_INFO_RAW@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IIO_CHAN_INFO_RAW@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_iio_channel_has_info
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x23]
	bl	_BIT
	mov	w8, #48
	madd	x8, x24, x8, x26
	ldr	w9, [x8, #36]
	orr	w9, w9, w0
	str	w9, [x8, #36]
LBB0_3:
Lloh2:
	adrp	x25, _IIO_CHAN_INFO_SCALE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _IIO_CHAN_INFO_SCALE@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_iio_channel_has_info
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x25]
	bl	_BIT
	mov	w8, #48
	madd	x8, x24, x8, x26
	ldr	w9, [x8, #36]
	orr	w9, w9, w0
	str	w9, [x8, #36]
LBB0_5:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_iio_channel_has_available
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x23]
	bl	_BIT
	mov	w8, #48
	madd	x8, x24, x8, x26
	ldr	w9, [x8, #32]
	orr	w9, w9, w0
	str	w9, [x8, #32]
LBB0_7:
	ldr	w0, [x20, #16]
	bl	_mux_control_states
	cmp	x0, x22
	b.le	LBB0_12
; %bb.8:
	mov	w8, #48
	madd	x8, x24, x8, x26
	str	x22, [x8, #24]
	ldr	x0, [x20, #8]
	bl	_iio_get_channel_ext_info_count
	mov	x23, x0
Lloh4:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	cbz	w0, LBB0_14
; %bb.9:
Lloh6:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_devm_kzalloc
	mov	x22, x0
	cbnz	x0, LBB0_15
	b	LBB0_25
LBB0_10:
	mov	x23, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_27
LBB0_12:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_26
LBB0_14:
	mov	x22, #0
LBB0_15:
	ldr	w3, [x25]
	mov	x0, x19
	mov	x1, x23
	mov	w2, #16
	bl	_devm_kcalloc
	str	x0, [x27, x24, lsl #3]
	cbz	x0, LBB0_25
; %bb.16:
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	cmp	w23, #1
	b.lt	LBB0_28
; %bb.17:
	mov	x27, #0
	mov	w8, #12
	umull	x28, w23, w8
	mov	w26, #8
	mov	w25, #-1
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x27, x27, #12
	add	x26, x26, #16
	cmp	x28, x27
	b.eq	LBB0_28
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x0, x26
	stur	w25, [x8, #-8]
	ldr	x8, [x21, #16]
	add	x8, x8, x27
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	ldp	x8, x0, [x20]
	ldr	w1, [x8, x27]
	mov	x2, x22
	bl	_iio_read_channel_ext_info
	mov	x23, x0
	tbnz	w0, #31, LBB0_31
; %bb.22:                               ;   in Loop: Header=BB0_19 Depth=1
Lloh15:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ge	LBB0_32
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=1
	add	w2, w23, #1
Lloh18:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_devm_kmemdup
	mov	x8, x0
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x0, [x9, x24, lsl #3]
	str	x8, [x0, x26]
	cbz	x8, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_19 Depth=1
	str	xzr, [x8, w23, uxtw #3]
	add	x8, x0, x26
	stur	w23, [x8, #-8]
	b	LBB0_18
LBB0_25:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_26:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_27:
	mov	x0, x23
	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
LBB0_28:
	cbz	x22, LBB0_30
; %bb.29:
	mov	x0, x19
	mov	x1, x22
	bl	_devm_kfree
LBB0_30:
	mov	w23, #0
	b	LBB0_27
LBB0_31:
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x27]
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_32:
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x27]
	str	x8, [sp]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get parent channel type\n"

	.comm	_IIO_CHAN_INFO_RAW,4,2          ; @IIO_CHAN_INFO_RAW
	.comm	_IIO_CHAN_INFO_SCALE,4,2        ; @IIO_CHAN_INFO_SCALE
l_.str.1:                               ; @.str.1
	.asciz	"too many channels\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"failed to get ext_info '%s'\n"

l_.str.3:                               ; @.str.3
	.asciz	"too large ext_info '%s'\n"

	.no_dead_strip	_mux_configure_channel
.subsections_via_symbols
