	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_check_unique_scan_index
_iio_check_unique_scan_index:           ## @iio_check_unique_scan_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_INDIO_ALL_BUFFER_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, (%rdi)
	je	LBB0_9
## %bb.1:
	movl	4(%rdi), %r11d
	cmpl	$2, %r11d
	jl	LBB0_9
## %bb.2:
	movq	16(%rdi), %rsi
	leal	-1(%r11), %r8d
	movl	$1, %r9d
	xorl	%r10d, %r10d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r10
	incq	%r9
	xorl	%eax, %eax
	cmpq	%r8, %r10
	je	LBB0_9
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	(%rsi,%r10,8), %rdx
	testq	%rdx, %rdx
	js	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r9, %rax
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r11, %rax
	jae	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	leaq	1(%rax), %rcx
	cmpq	(%rsi,%rax,8), %rdx
	movq	%rcx, %rax
	jne	LBB0_6
## %bb.8:
	addq	$8, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INDIO_ALL_BUFFER_MODES,4,2     ## @INDIO_ALL_BUFFER_MODES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Duplicate scan index %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_iio_check_unique_scan_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_check_unique_scan_index
_iio_check_unique_scan_index:           ; @iio_check_unique_scan_index
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _INDIO_ALL_BUFFER_MODES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INDIO_ALL_BUFFER_MODES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w9, [x0, #4]
	cmp	w9, #2
	b.lt	LBB0_3
; %bb.2:
	mov	x10, #0
	ldr	x11, [x0, #16]
	sub	w12, w9, #1
	mov	w13, #1
	b	LBB0_5
LBB0_3:
	mov	w8, #0
	b	LBB0_10
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #0
	add	x10, x10, #1
	add	x13, x13, #1
	cmp	x10, x12
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x2, [x11, x10, lsl #3]
	tbnz	x2, #63, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x13
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x8, x9
	b.hs	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x14, [x11, x8, lsl #3]
	add	x8, x8, #1
	cmp	x2, x14
	b.ne	LBB0_7
; %bb.9:
	add	x0, x0, #8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_10:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INDIO_ALL_BUFFER_MODES,4,2     ; @INDIO_ALL_BUFFER_MODES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Duplicate scan index %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_iio_check_unique_scan_index
.subsections_via_symbols
