	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads8688_write_raw
_ads8688_write_raw:                     ## @ads8688_write_raw
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_iio_priv
	movq	_EINVAL@GOTPCREL(%rip), %rdx
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	addq	$12, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpq	$129, %r15
	je	LBB0_12
## %bb.1:
	cmpq	$128, %r15
	jne	LBB0_2
## %bb.3:
	movq	_ads8688_range_def@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	leaq	(%rax,%rax,2), %rax
	movl	(%rdi,%rax,8), %r13d
	testl	%r13d, %r13d
	jne	LBB0_6
## %bb.4:
	movl	8(%rdx), %eax
	imull	4(%rdi), %eax
	cmpl	%r14d, %eax
	je	LBB0_5
LBB0_6:
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	$4, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r12
	jge	LBB0_2
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	imull	(%rdi,%rbx), %eax
	cmpl	%r14d, %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	-4(%rdi,%rbx), %r13d
	jne	LBB0_11
	jmp	LBB0_21
LBB0_12:
	movq	_ads8688_range_def@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	cmpl	%r13d, (%rdi)
	je	LBB0_14
## %bb.13:
	cmpl	%r13d, 72(%rdi)
	jne	LBB0_5
LBB0_14:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	testl	%r13d, %r13d
	jne	LBB0_16
## %bb.15:
	movq	_ADS8688_PLUSMINUS25VREF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_16:
	leaq	(%rax,%rax,2), %rax
	movl	4(%rdi,%rax,8), %r15d
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.17:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	$4, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r12
	jge	LBB0_2
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	cmpl	%r13d, -4(%rdi,%rbx)
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	(%rdi,%rbx), %r15d
	jne	LBB0_20
LBB0_21:
	movl	%r12d, %eax
	leaq	(%rax,%rax,2), %rax
	movl	16(%rdi,%rax,8), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_ads8688_write_reg_range
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_24
	jmp	LBB0_23
LBB0_7:
	xorl	%r12d, %r12d
LBB0_2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_24
LBB0_23:
	movq	_ads8688_range_def@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r12d, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	8(%rax,%rcx,8), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rdx
	movq	%rax, (%rcx,%rdx,8)
LBB0_24:
	callq	_mutex_unlock
LBB0_25:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ads8688_range_def,8,3          ## @ads8688_range_def
	.comm	_ADS8688_PLUSMINUS25VREF,8,3    ## @ADS8688_PLUSMINUS25VREF
	.no_dead_strip	_ads8688_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ads8688_write_raw
_ads8688_write_raw:                     ; @ads8688_write_raw
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x26, x4
	mov	x25, x3
	mov	x24, x2
	mov	x19, x1
	mov	x23, x0
	bl	_iio_priv
	mov	x21, x0
Lloh0:
	adrp	x27, _EINVAL@GOTPAGE
Lloh1:
	ldr	x27, [x27, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x27]
	neg	w22, w8
	add	x20, x0, #12
	mov	x0, x20
	bl	_mutex_lock
	cmp	x26, #129
	b.eq	LBB0_9
; %bb.1:
	cmp	x26, #128
	b.ne	LBB0_20
; %bb.2:
Lloh2:
	adrp	x24, _ads8688_range_def@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ads8688_range_def@GOTPAGEOFF]
	ldr	x0, [x24]
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	mov	w9, #24
	mul	x8, x8, x9
	ldr	w28, [x0, x8]
	cbnz	w28, LBB0_4
; %bb.3:
	ldr	w8, [x0, #4]
	ldr	w9, [x21, #8]
	mul	w8, w9, w8
	cmp	w8, w25
	b.eq	LBB0_13
LBB0_4:
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.5:
	mov	x27, #0
	mov	x26, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	add	x27, x27, #24
	cmp	x26, w0, sxtw
	b.ge	LBB0_23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	add	x8, x0, x27
	ldr	w8, [x8, #4]
	ldr	w9, [x21, #8]
	mul	w8, w9, w8
	cmp	w8, w25
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x0, x27]
	cmp	w28, w8
	b.ne	LBB0_6
	b	LBB0_19
LBB0_9:
Lloh4:
	adrp	x25, _ads8688_range_def@GOTPAGE
Lloh5:
	ldr	x25, [x25, _ads8688_range_def@GOTPAGEOFF]
	ldr	x0, [x25]
	ldr	w8, [x0]
	cmp	w8, w24
	b.eq	LBB0_11
; %bb.10:
	ldr	w8, [x0, #72]
	cmp	w8, w24
	b.ne	LBB0_13
LBB0_11:
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	cbnz	w24, LBB0_14
; %bb.12:
Lloh6:
	adrp	x9, _ADS8688_PLUSMINUS25VREF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADS8688_PLUSMINUS25VREF@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w8, [x27]
	neg	w22, w8
	b	LBB0_25
LBB0_14:
	mov	w9, #24
	madd	x8, x8, x9, x0
	ldr	w27, [x8, #4]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.15:
	mov	x28, #0
	mov	x26, #0
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	add	x28, x28, #24
	cmp	x26, w0, sxtw
	b.ge	LBB0_23
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	w8, [x0, x28]
	cmp	w8, w24
	b.ne	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x8, x0, x28
	ldr	w8, [x8, #4]
	cmp	w27, w8
	b.ne	LBB0_16
LBB0_19:
	and	x8, x26, #0xffffffff
	mov	w9, #24
	madd	x8, x8, x9, x0
	ldr	w2, [x8, #16]
	mov	x0, x23
	mov	x1, x19
	bl	_ads8688_write_reg_range
	mov	x22, x0
	cbnz	w22, LBB0_24
	b	LBB0_21
LBB0_20:
	mov	x26, #0
	cbnz	w22, LBB0_24
LBB0_21:
Lloh9:
	adrp	x8, _ads8688_range_def@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ads8688_range_def@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	mov	w9, #24
	smaddl	x8, w26, w9, x8
	ldr	x8, [x8, #8]
	ldr	x9, [x21]
	ldr	x10, [x19]
	str	x8, [x9, x10, lsl #3]
	b	LBB0_24
LBB0_22:
	mov	x26, #0
LBB0_23:
	cbz	w22, LBB0_21
LBB0_24:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_25:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ads8688_range_def,8,3          ; @ads8688_range_def
	.comm	_ADS8688_PLUSMINUS25VREF,8,3    ; @ADS8688_PLUSMINUS25VREF
	.no_dead_strip	_ads8688_write_raw
.subsections_via_symbols
