	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adis_write_reg                 ## -- Begin function adis_write_reg
	.p2align	4, 0x90
_adis_write_reg:                        ## @adis_write_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, %r13d
	movl	%edx, -212(%rbp)                ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r15
	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, %r12d
	movq	(%rdi), %rax
	movq	%rax, -208(%rbp)
	movabsq	$8589934600, %rcx               ## imm = 0x200000008
	movq	%rcx, -200(%rbp)
	movl	$1, -192(%rbp)
	movq	24(%rdi), %rsi
	movl	(%rsi), %edx
	movl	%edx, -188(%rbp)
	movq	_SPI_DELAY_UNIT_USECS@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	movl	%edi, -184(%rbp)
	movl	4(%rsi), %esi
	movl	%esi, -180(%rbp)
	leaq	8(%rax), %rbx
	movq	%rbx, -176(%rbp)
	movq	%rcx, -168(%rbp)
	movl	$1, -160(%rbp)
	movl	%edx, -156(%rbp)
	movl	%edi, -152(%rbp)
	movl	%esi, -148(%rbp)
	leaq	16(%rax), %rbx
	movq	%rbx, -144(%rbp)
	movq	%rcx, -136(%rbp)
	movl	$1, -128(%rbp)
	movl	%edx, -124(%rbp)
	movl	%edi, -120(%rbp)
	movl	%esi, -116(%rbp)
	leaq	24(%rax), %rsi
	movq	%rsi, -112(%rbp)
	movq	%rcx, -104(%rbp)
	movl	$0, -96(%rbp)
	movl	%edx, -92(%rbp)
	movq	$0, -88(%rbp)
	addq	$32, %rax
	movq	%rax, -80(%rbp)
	movq	%rcx, -72(%rbp)
	movl	$0, -64(%rbp)
	movl	%edx, -60(%rbp)
	movq	$0, -56(%rbp)
	leaq	12(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	-216(%rbp), %rdi
	callq	_spi_message_init
	cmpl	%r12d, 8(%r15)
	je	LBB0_2
## %bb.1:
	movq	_ADIS_REG_PAGE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ADIS_WRITE_REG
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movl	%r12d, 4(%rcx)
	leaq	-208(%rbp), %rdi
	leaq	-216(%rbp), %rsi
	callq	_spi_message_add_tail
LBB0_2:
	cmpl	$1, %r13d
	je	LBB0_7
## %bb.3:
	cmpl	$2, %r13d
	je	LBB0_6
## %bb.4:
	cmpl	$4, %r13d
	jne	LBB0_14
## %bb.5:
	leal	3(%r14), %edi
	callq	_ADIS_WRITE_REG
	movq	(%r15), %rcx
	movl	%eax, 32(%rcx)
	movl	-212(%rbp), %eax                ## 4-byte Reload
	shrl	$24, %eax
	movl	%eax, 36(%rcx)
	leal	2(%r14), %edi
	callq	_ADIS_WRITE_REG
	movq	(%r15), %rcx
	movl	%eax, 24(%rcx)
	movl	-212(%rbp), %eax                ## 4-byte Reload
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, 28(%rcx)
LBB0_6:
	leal	1(%r14), %edi
	callq	_ADIS_WRITE_REG
	movq	(%r15), %rcx
	movl	%eax, 16(%rcx)
	movl	-212(%rbp), %eax                ## 4-byte Reload
	movzbl	%ah, %eax
	movl	%eax, 20(%rcx)
LBB0_7:
	movq	%r14, %rdi
	movq	%rbx, %r14
	movl	%r12d, -220(%rbp)               ## 4-byte Spill
	movq	%rdi, -232(%rbp)                ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ADIS_WRITE_REG
	movq	(%r15), %rcx
	movl	%eax, 8(%rcx)
	movzbl	-212(%rbp), %eax                ## 1-byte Folded Reload
	movl	%eax, 12(%rcx)
	movl	%r13d, %r12d
	movq	%r12, %rax
	shlq	$5, %rax
	movl	$0, -192(%rbp,%rax)
	leaq	-176(%rbp), %rbx
	leaq	-216(%rbp), %r13
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_spi_message_add_tail
	addq	$32, %rbx
	decq	%r12
	jne	LBB0_8
## %bb.9:
	movq	16(%r15), %rdi
	leaq	-216(%rbp), %rsi
	callq	_spi_sync
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movq	16(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movq	-232(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%eax, %ecx
	callq	_dev_err
	jmp	LBB0_12
LBB0_11:
	movl	-220(%rbp), %eax                ## 4-byte Reload
	movl	%eax, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_14:
	movq	%rbx, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.13:
	movl	%ebx, %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 write 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_write_reg
lCPI0_0:
	.long	8                               ; 0x8
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_adis_write_reg
	.p2align	2
_adis_write_reg:                        ; @adis_write_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
	mov	x22, x3
	mov	x23, x2
	mov	x19, 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, #-56]
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, #24]
	ldr	w12, [x11]
Lloh8:
	adrp	x13, _SPI_DELAY_UNIT_USECS@GOTPAGE
Lloh9:
	ldr	x13, [x13, _SPI_DELAY_UNIT_USECS@GOTPAGEOFF]
Lloh10:
	ldr	w13, [x13]
	stp	w12, w13, [sp, #28]
	ldr	w11, [x11, #4]
	str	w11, [sp, #36]
	add	x14, x9, #8
	str	x14, [sp, #40]
	str	d0, [sp, #48]
	stp	w10, w12, [sp, #56]
	udiv	w24, w1, w8
	stp	w13, w11, [sp, #64]
	add	x8, x9, #16
	str	x8, [sp, #72]
	str	d0, [sp, #80]
	stp	w10, w12, [sp, #88]
	stp	w13, w11, [sp, #96]
	add	x8, x9, #24
	str	x8, [sp, #104]
	str	d0, [sp, #112]
	stp	wzr, w12, [sp, #120]
	movi.2d	v1, #0000000000000000
	str	d1, [sp, #128]
	add	x8, x9, #32
	str	x8, [sp, #136]
	str	d0, [sp, #144]
	stp	wzr, w12, [sp, #152]
	str	d1, [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, w24
	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, w24, [x8]
	add	x0, sp, #8
	mov	x1, sp
	bl	_spi_message_add_tail
LBB0_2:
	cmp	w22, #1
	b.eq	LBB0_7
; %bb.3:
	cmp	w22, #2
	b.eq	LBB0_6
; %bb.4:
	cmp	w22, #4
	b.ne	LBB0_12
; %bb.5:
	add	w0, w19, #3
	bl	_ADIS_WRITE_REG
	ldr	x8, [x20]
	lsr	w9, w23, #24
	stp	w0, w9, [x8, #32]
	add	w0, w19, #2
	bl	_ADIS_WRITE_REG
	ldr	x8, [x20]
	ubfx	w9, w23, #16, #8
	stp	w0, w9, [x8, #24]
LBB0_6:
	add	w0, w19, #1
	bl	_ADIS_WRITE_REG
	ldr	x8, [x20]
	ubfx	w9, w23, #8, #8
	stp	w0, w9, [x8, #16]
LBB0_7:
	mov	x0, x19
	bl	_ADIS_WRITE_REG
	ldr	x8, [x20]
	and	w9, w23, #0xff
	stp	w0, w9, [x8, #8]
	mov	w8, w22
	add	x9, sp, #8
	add	x8, x9, x8, lsl #5
	str	wzr, [x8, #16]
	add	w8, w22, #1
	add	x22, x9, #32
	sub	x23, x8, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, sp
	mov	x0, x22
	bl	_spi_message_add_tail
	add	x22, x22, #32
	subs	x23, x23, #1
	b.ne	LBB0_8
; %bb.9:
	ldr	x0, [x20, #16]
	mov	x1, sp
	bl	_spi_sync
	mov	x22, x0
	cbz	w0, LBB0_11
; %bb.10:
	ldr	x0, [x20, #16]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x22
	bl	_dev_err
	b	LBB0_13
LBB0_11:
	str	w24, [x20, #8]
	b	LBB0_13
LBB0_12:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_13:
	mov	x0, x21
	bl	_mutex_unlock
	ldur	x8, [x29, #-56]
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_15
; %bb.14:
	mov	x0, x22
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_15:
	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 write register 0x%02X: %d\n"

.subsections_via_symbols
