	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adis16400_initial_setup
_adis16400_initial_setup:               ## @adis16400_initial_setup
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_iio_priv
	movq	%rax, %r15
	movq	(%rax), %rdi
	movq	8(%rax), %rax
	movq	_ADIS16400_HAS_SLOW_MODE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	andl	(%rax), %ecx
	jne	LBB0_1
## %bb.2:
	movq	_ADIS16400_SPI_FAST@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ADIS16400_SPI_SLOW@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	movq	_SPI_MODE_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	callq	_spi_setup
	movq	%r15, %rdi
	callq	_adis_initial_startup
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_16:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movq	_ADIS16400_HAS_PROD_ID@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.6:
	movq	_ADIS16400_PRODUCT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_adis_read_reg_16
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.9:
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %edx
	cmpl	%edx, %ecx
	je	LBB0_11
## %bb.10:
	leaq	4(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movl	-36(%rbp), %ecx
LBB0_11:
	movl	(%r14), %edx
	addq	$4, %r14
	movq	(%r15), %rax
	movl	8(%rax), %r9d
	movl	12(%rax), %r8d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	$1, %ebx
	jmp	LBB0_12
LBB0_5:
	xorl	%ebx, %ebx
LBB0_12:
	testl	%eax, (%r12)
	je	LBB0_16
## %bb.13:
	movq	_ADIS16400_SMPL_PRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_adis_read_reg_16
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.14:
	movq	_ADIS16400_SMPL_PRD_DIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	xorl	%ebx, %ebx
	cmpl	$9, %eax
	ja	LBB0_16
## %bb.15:
	movq	_ADIS16400_SPI_FAST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rdi
	movq	%rax, (%rdi)
	callq	_spi_setup
	jmp	LBB0_16
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ADIS16400_HAS_SLOW_MODE,4,2    ## @ADIS16400_HAS_SLOW_MODE
	.comm	_ADIS16400_SPI_SLOW,8,3         ## @ADIS16400_SPI_SLOW
	.comm	_ADIS16400_SPI_FAST,8,3         ## @ADIS16400_SPI_FAST
	.comm	_SPI_MODE_3,4,2                 ## @SPI_MODE_3
	.comm	_ADIS16400_HAS_PROD_ID,4,2      ## @ADIS16400_HAS_PROD_ID
	.comm	_ADIS16400_PRODUCT_ID,4,2       ## @ADIS16400_PRODUCT_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adis%u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Device ID(%u) and product ID(%u) do not match."

L_.str.2:                               ## @.str.2
	.asciz	"%s: prod_id 0x%04x at CS%d (irq %d)\n"

	.comm	_ADIS16400_SMPL_PRD,4,2         ## @ADIS16400_SMPL_PRD
	.comm	_ADIS16400_SMPL_PRD_DIV_MASK,4,2 ## @ADIS16400_SMPL_PRD_DIV_MASK
	.no_dead_strip	_adis16400_initial_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adis16400_initial_setup
_adis16400_initial_setup:               ; @adis16400_initial_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_iio_priv
	mov	x19, x0
	ldp	x0, x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x22, _ADIS16400_HAS_SLOW_MODE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ADIS16400_HAS_SLOW_MODE@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh2:
	adrp	x21, _ADIS16400_SPI_FAST@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ADIS16400_SPI_FAST@GOTPAGEOFF]
	tst	w9, w8
Lloh4:
	adrp	x8, _ADIS16400_SPI_SLOW@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ADIS16400_SPI_SLOW@GOTPAGEOFF]
	csel	x8, x21, x8, eq
	ldr	x8, [x8]
	str	x8, [x0]
Lloh6:
	adrp	x8, _SPI_MODE_3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPI_MODE_3@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	bl	_spi_setup
	mov	x0, x19
	bl	_adis_initial_startup
	cbz	w0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ADIS16400_HAS_PROD_ID@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ADIS16400_HAS_PROD_ID@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
Lloh12:
	adrp	x8, _ADIS16400_PRODUCT_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADIS16400_PRODUCT_ID@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_adis_read_reg_16
	cbnz	w0, LBB0_1
; %bb.4:
	ldr	w0, [x20]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #4
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_14
; %bb.5:
	ldr	w3, [sp, #12]
	ldr	w2, [sp, #4]
	cmp	w3, w2
	b.eq	LBB0_7
; %bb.6:
	add	x0, x20, #4
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	ldr	w3, [sp, #12]
LBB0_7:
	ldr	w2, [x20], #4
	ldr	x8, [x19]
	ldp	w5, w4, [x8, #8]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.10:
Lloh21:
	adrp	x8, _ADIS16400_SMPL_PRD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ADIS16400_SMPL_PRD@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_adis_read_reg_16
	cbnz	w0, LBB0_1
; %bb.11:
	ldr	w8, [sp, #8]
Lloh24:
	adrp	x9, _ADIS16400_SMPL_PRD_DIV_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ADIS16400_SMPL_PRD_DIV_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #9
	b.hi	LBB0_13
; %bb.12:
	ldr	x8, [x21]
	ldr	x0, [x19]
	str	x8, [x0]
	bl	_spi_setup
LBB0_13:
	mov	w0, #0
	b	LBB0_1
LBB0_14:
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ADIS16400_HAS_SLOW_MODE,4,2    ; @ADIS16400_HAS_SLOW_MODE
	.comm	_ADIS16400_SPI_SLOW,8,3         ; @ADIS16400_SPI_SLOW
	.comm	_ADIS16400_SPI_FAST,8,3         ; @ADIS16400_SPI_FAST
	.comm	_SPI_MODE_3,4,2                 ; @SPI_MODE_3
	.comm	_ADIS16400_HAS_PROD_ID,4,2      ; @ADIS16400_HAS_PROD_ID
	.comm	_ADIS16400_PRODUCT_ID,4,2       ; @ADIS16400_PRODUCT_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adis%u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Device ID(%u) and product ID(%u) do not match."

l_.str.2:                               ; @.str.2
	.asciz	"%s: prod_id 0x%04x at CS%d (irq %d)\n"

	.comm	_ADIS16400_SMPL_PRD,4,2         ; @ADIS16400_SMPL_PRD
	.comm	_ADIS16400_SMPL_PRD_DIV_MASK,4,2 ; @ADIS16400_SMPL_PRD_DIV_MASK
	.no_dead_strip	_adis16400_initial_setup
.subsections_via_symbols
