	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iadc_read_raw
_iadc_read_raw:                         ## @iadc_read_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, %rbx
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_iio_priv
	cmpq	$128, %rbx
	je	LBB0_4
## %bb.1:
	cmpq	$129, %rbx
	jne	LBB0_5
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %r13
	addq	$24, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r15), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_iadc_do_conversion
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_6
## %bb.3:
	movl	-44(%rbp), %r8d
	movq	(%r15), %rsi
	movq	(%r12), %rax
	movq	8(%r12), %r10
	movl	(%rax,%rsi,4), %ebx
	movl	%r8d, %eax
	subl	%ebx, %eax
	movq	_IADC_REF_GAIN_MICRO_VOLTS@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	16(%r12), %ecx
	movl	%ecx, %edi
	subl	%ebx, %edi
	cltd
	idivl	%edi
	movl	%eax, %r9d
	cltd
	idivl	(%r10,%rsi,4)
	movl	%eax, %r15d
	movl	20(%r12), %edi
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	movl	%r15d, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	movl	$0, (%r14)
	movl	$1000, (%r13)                   ## imm = 0x3E8
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IADC_REF_GAIN_MICRO_VOLTS,4,2  ## @IADC_REF_GAIN_MICRO_VOLTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"off %d gain %d adc %d %duV I %duA\n"

	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_iadc_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iadc_read_raw
_iadc_read_raw:                         ; @iadc_read_raw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x4
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	bl	_iio_priv
	cmp	x23, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	x23, #129
	b.ne	LBB0_5
; %bb.2:
	mov	x20, x0
	add	x23, x0, #24
	mov	x0, x23
	bl	_mutex_lock
	ldr	x1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_iadc_do_conversion
	mov	x22, x0
	mov	x0, x23
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_6
; %bb.3:
	ldr	w4, [sp, #12]
	ldr	x8, [x21]
	lsl	x8, x8, #2
	ldp	x9, x10, [x20]
	ldr	w2, [x9, x8]
	sub	w9, w4, w2
Lloh0:
	adrp	x11, _IADC_REF_GAIN_MICRO_VOLTS@GOTPAGE
Lloh1:
	ldr	x11, [x11, _IADC_REF_GAIN_MICRO_VOLTS@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	mul	w9, w9, w11
	ldp	w3, w0, [x20, #16]
	sub	w11, w3, w2
	sdiv	w5, w9, w11
	ldr	w8, [x10, x8]
	sdiv	w20, w5, w8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x6, x20
	bl	_dev_dbg
	str	w20, [x19]
Lloh5:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	b	LBB0_6
LBB0_4:
	str	wzr, [x19]
	mov	w8, #1000
	str	w8, [x22]
Lloh8:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IADC_REF_GAIN_MICRO_VOLTS,4,2  ; @IADC_REF_GAIN_MICRO_VOLTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"off %d gain %d adc %d %duV I %duA\n"

	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_iadc_read_raw
.subsections_via_symbols
