	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7606_write_raw
_ad7606_write_raw:                      ## @ad7606_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	movq	%rax, %r15
	movq	%rax, %r13
	cmpq	$129, %r12
	je	LBB0_9
## %bb.1:
	cmpq	$128, %r12
	jne	LBB0_12
## %bb.2:
	addq	$24, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	56(%r13), %rsi
	movl	52(%r13), %edx
	movl	%ebx, %edi
	callq	_find_closest
	movl	%eax, %r14d
	cmpl	$0, 48(%r13)
	je	LBB0_3
## %bb.4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	jmp	LBB0_5
LBB0_9:
	testl	%ebx, %ebx
	je	LBB0_10
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	xorl	%r12d, %r12d
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	*(%r13)
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	8(%r13), %rax
	movslq	%r12d, %rcx
	movl	%r14d, (%rax,%rcx,4)
	jmp	LBB0_8
LBB0_10:
	movq	32(%r13), %rsi
	movl	44(%r13), %edx
	movl	%r14d, %edi
	callq	_find_closest
	movl	%eax, %r12d
	addq	$24, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	*16(%r13)
	testl	%eax, %eax
	js	LBB0_6
## %bb.11:
	movq	32(%r13), %rax
	movslq	%r12d, %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 40(%r13)
LBB0_8:
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_6:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad7606_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7606_write_raw
_ad7606_write_raw:                      ; @ad7606_write_raw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x24, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_iio_priv
	mov	x19, x0
	cmp	x24, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	x24, #128
	b.ne	LBB0_5
; %bb.2:
	add	x21, x19, #24
	mov	x0, x21
	bl	_mutex_lock
	ldr	x1, [x19, #56]
	ldr	w2, [x19, #52]
	mov	x0, x23
	bl	_find_closest
	mov	x23, x0
	ldr	w8, [x19, #48]
	cbz	w8, LBB0_6
; %bb.3:
	ldr	w22, [x22]
	b	LBB0_7
LBB0_4:
	cbz	w23, LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_6:
	mov	w22, #0
LBB0_7:
	ldr	x8, [x19]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	blr	x8
	tbnz	w0, #31, LBB0_12
; %bb.8:
	ldr	x8, [x19, #8]
	str	w23, [x8, w22, sxtw #2]
	b	LBB0_11
LBB0_9:
	ldr	x1, [x19, #32]
	ldr	w2, [x19, #44]
	mov	x0, x21
	bl	_find_closest
	mov	x22, x0
	add	x21, x19, #24
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x19, #16]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	tbnz	w0, #31, LBB0_12
; %bb.10:
	ldr	x8, [x19, #32]
	ldr	w8, [x8, w22, sxtw #2]
	str	w8, [x19, #40]
LBB0_11:
	mov	x0, x21
	bl	_mutex_unlock
	mov	w20, #0
	b	LBB0_13
LBB0_12:
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad7606_write_raw
.subsections_via_symbols
