	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adis_read_reg                  ## -- Begin function adis_read_reg
	.p2align	4, 0x90
_adis_read_reg:                         ## @adis_read_reg
	.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	$200, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, -232(%rbp)                ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ADIS_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %r14d
	movq	(%rdi), %rcx
	movq	%rcx, -208(%rbp)
	movabsq	$8589934600, %r8                ## imm = 0x200000008
	movq	%r8, -200(%rbp)
	movl	$1, -192(%rbp)
	movq	32(%rdi), %rdx
	movl	8(%rdx), %esi
	movl	%esi, -188(%rbp)
	movl	$0, -184(%rbp)
	movq	_SPI_DELAY_UNIT_USECS@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, -180(%rbp)
	movl	4(%rdx), %edi
	movl	%edi, -176(%rbp)
	leaq	8(%rcx), %rax
	movq	%rax, -168(%rbp)
	movq	%r8, -160(%rbp)
	movl	$1, -152(%rbp)
	movl	(%rdx), %eax
	movl	%eax, -148(%rbp)
	movl	$0, -144(%rbp)
	movl	%esi, -140(%rbp)
	movl	%edi, -136(%rbp)
	addq	$16, %rcx
	movq	%rcx, -128(%rbp)
	movq	%r8, -120(%rbp)
	movl	$1, -112(%rbp)
	movl	%eax, -108(%rbp)
	movl	16(%rbx), %ecx
	movl	%ecx, -104(%rbp)
	movl	%esi, -100(%rbp)
	movl	%edi, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	%r8, -80(%rbp)
	movl	$0, -72(%rbp)
	movl	%eax, -68(%rbp)
	addl	$2, %ecx
	movl	%ecx, -64(%rbp)
	movq	$0, -60(%rbp)
	leaq	12(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	leaq	-216(%rbp), %rdi
	callq	_spi_message_init
	movl	%r14d, -220(%rbp)               ## 4-byte Spill
	cmpl	%r14d, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_ADIS_REG_PAGE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ADIS_WRITE_REG
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	-220(%rbp), %eax                ## 4-byte Reload
	movl	%eax, 4(%rcx)
	leaq	-208(%rbp), %rdi
	leaq	-216(%rbp), %rsi
	callq	_spi_message_add_tail
LBB0_2:
	cmpl	$2, %r15d
	je	LBB0_5
## %bb.3:
	cmpl	$4, %r15d
	jne	LBB0_14
## %bb.4:
	leal	2(%r12), %edi
	callq	_ADIS_READ_REG
	movq	(%rbx), %rcx
	movl	%eax, 8(%rcx)
	movl	$0, 12(%rcx)
	leaq	-168(%rbp), %rdi
	leaq	-216(%rbp), %rsi
	callq	_spi_message_add_tail
LBB0_5:
	movl	%r12d, %edi
	callq	_ADIS_READ_REG
	movq	(%rbx), %rcx
	movl	%eax, 16(%rcx)
	movl	$0, 20(%rcx)
	leaq	-128(%rbp), %rdi
	leaq	-216(%rbp), %r14
	movq	%r14, %rsi
	callq	_spi_message_add_tail
	leaq	-88(%rbp), %rdi
	movq	%r14, %rsi
	callq	_spi_message_add_tail
	movq	24(%rbx), %rdi
	movq	%r14, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	movq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	jmp	LBB0_12
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_7:
	movl	-220(%rbp), %eax                ## 4-byte Reload
	movl	%eax, 8(%rbx)
	xorl	%r14d, %r14d
	cmpl	$2, %r15d
	je	LBB0_10
## %bb.8:
	cmpl	$4, %r15d
	jne	LBB0_12
## %bb.9:
	movl	16(%rbx), %edi
	callq	_get_unaligned_be32
	jmp	LBB0_11
LBB0_10:
	movl	16(%rbx), %edi
	addl	$2, %edi
	callq	_get_unaligned_be16
LBB0_11:
	movq	-232(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_12:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.13:
	movl	%r14d, %eax
	addq	$200, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ADIS_PAGE_SIZE,4,2             ## @ADIS_PAGE_SIZE
	.comm	_SPI_DELAY_UNIT_USECS,4,2       ## @SPI_DELAY_UNIT_USECS
	.comm	_ADIS_REG_PAGE_ID,4,2           ## @ADIS_REG_PAGE_ID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read register 0x%02X: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function adis_read_reg
lCPI0_0:
	.long	8                               ; 0x8
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_adis_read_reg
	.p2align	2
_adis_read_reg:                         ; @adis_read_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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	x22, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _ADIS_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADIS_PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	x9, [sp, #8]
Lloh6:
	adrp	x10, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	mov	w10, #1
	str	w10, [sp, #24]
	ldr	x11, [x0, #32]
	ldr	w12, [x11, #8]
	stp	w12, wzr, [sp, #28]
Lloh8:
	adrp	x12, _SPI_DELAY_UNIT_USECS@GOTPAGE
Lloh9:
	ldr	x12, [x12, _SPI_DELAY_UNIT_USECS@GOTPAGEOFF]
Lloh10:
	ldr	w12, [x12]
	str	w12, [sp, #36]
	ldr	w13, [x11, #4]
	str	w13, [sp, #40]
	add	x14, x9, #8
	str	x14, [sp, #48]
	str	d0, [sp, #56]
	str	w10, [sp, #64]
	udiv	w25, w1, w8
	ldr	w8, [x11]
	stp	w8, wzr, [sp, #68]
	stp	w12, w13, [sp, #76]
	add	x9, x9, #16
	str	x9, [sp, #88]
	str	d0, [sp, #96]
	stp	w10, w8, [sp, #104]
	ldr	w9, [x0, #16]
	stp	w9, w12, [sp, #112]
	str	w13, [sp, #120]
	str	xzr, [sp, #128]
	str	d0, [sp, #136]
	stp	wzr, w8, [sp, #144]
	add	w8, w9, #2
	stp	w8, wzr, [sp, #152]
	str	wzr, [sp, #160]
	add	x21, x0, #12
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, sp
	bl	_spi_message_init
	ldr	w8, [x20, #8]
	cmp	w8, w25
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _ADIS_REG_PAGE_ID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADIS_REG_PAGE_ID@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_ADIS_WRITE_REG
	ldr	x8, [x20]
	stp	w0, w25, [x8]
	add	x0, sp, #8
	mov	x1, sp
	bl	_spi_message_add_tail
LBB0_2:
	cmp	w22, #2
	b.eq	LBB0_5
; %bb.3:
	cmp	w22, #4
	b.ne	LBB0_7
; %bb.4:
	add	w0, w23, #2
	bl	_ADIS_READ_REG
	ldr	x8, [x20]
	stp	w0, wzr, [x8, #8]
	add	x8, sp, #8
	add	x0, x8, #40
	mov	x1, sp
	bl	_spi_message_add_tail
LBB0_5:
	mov	x0, x23
	bl	_ADIS_READ_REG
	ldr	x8, [x20]
	stp	w0, wzr, [x8, #16]
	add	x24, sp, #8
	add	x0, x24, #80
	mov	x1, sp
	bl	_spi_message_add_tail
	add	x0, x24, #120
	mov	x1, sp
	bl	_spi_message_add_tail
	ldr	x0, [x20, #24]
	mov	x1, sp
	bl	_spi_sync
	cbz	w0, LBB0_8
; %bb.6:
	mov	x24, x0
	ldr	x0, [x20, #24]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x24
	bl	_dev_err
	b	LBB0_14
LBB0_7:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_14
LBB0_8:
	str	w25, [x20, #8]
	cmp	w22, #2
	b.eq	LBB0_11
; %bb.9:
	cmp	w22, #4
	b.ne	LBB0_13
; %bb.10:
	ldr	w0, [x20, #16]
	bl	_get_unaligned_be32
	b	LBB0_12
LBB0_11:
	ldr	w8, [x20, #16]
	add	w0, w8, #2
	bl	_get_unaligned_be16
LBB0_12:
	mov	w24, #0
	str	w0, [x19]
	b	LBB0_14
LBB0_13:
	mov	w24, #0
LBB0_14:
	mov	x0, x21
	bl	_mutex_unlock
	ldur	x8, [x29, #-72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x24
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ADIS_PAGE_SIZE,4,2             ; @ADIS_PAGE_SIZE
	.comm	_SPI_DELAY_UNIT_USECS,4,2       ; @SPI_DELAY_UNIT_USECS
	.comm	_ADIS_REG_PAGE_ID,4,2           ; @ADIS_REG_PAGE_ID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read register 0x%02X: %d\n"

.subsections_via_symbols
