	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5592r_read_raw
_ad5592r_read_raw:                      ## @ad5592r_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, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_iio_priv
	movq	%rax, %r14
	cmpq	$128, %rbx
	je	LBB0_6
## %bb.1:
	cmpq	$130, %rbx
	je	LBB0_8
## %bb.2:
	cmpq	$129, %rbx
	jne	LBB0_10
## %bb.3:
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpl	$0, 8(%r12)
	je	LBB0_14
## %bb.4:
	movq	(%r14), %rax
	movslq	(%r12), %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_5:
	movl	%ecx, -44(%rbp)
	movl	12(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movl	-44(%rbp), %eax
	movl	%eax, (%r13)
	jmp	LBB0_9
LBB0_6:
	movq	%r13, %rbx
	movq	%r14, %rdi
	callq	_ad5592r_get_vref
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, (%r13)
	movl	12(%r12), %ecx
	movq	_IIO_TEMP@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_12
## %bb.7:
	imull	$150715900, %eax, %edi          ## imm = 0x8FBBDFC
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	movq	%rbx, %rdx
	callq	_div_s64_rem
	movl	%eax, (%r13)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_8:
	movq	%r14, %rdi
	callq	_ad5592r_get_vref
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_AD5592R_REG_CTRL_ADC_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%r14), %eax
	movl	$-1884125, %ecx                 ## imm = 0xFFE34023
	movl	$-859125, %eax                  ## imm = 0xFFF2E40B
	cmovel	%ecx, %eax
	cltd
	idivl	%ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_9:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_12:
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpl	$0, 8(%r12)
	jne	LBB0_17
## %bb.13:
	movq	_AD5592R_REG_CTRL_ADC_RANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_14:
	movq	16(%r14), %rax
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.15:
	movl	-44(%rbp), %eax
	shrl	$12, %eax
	movl	(%r12), %edx
	xorl	%edx, %eax
	testb	$7, %al
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_21
## %bb.16:
	movl	12(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_17:
	movq	_AD5592R_REG_CTRL_DAC_RANGE@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	andl	8(%r14), %eax
	cmpl	$1, %eax
	movl	$2, %eax
	sbbl	$0, %eax
	imull	(%r13), %eax
	movl	%eax, (%r13)
	movl	4(%r12), %eax
	movl	%eax, (%rbx)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %ebx
LBB0_20:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	$11, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %ecx
	andl	-44(%rbp), %ecx
	movslq	(%r12), %rdx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error while reading channel %u\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Channel %u read: 0x%04hX\n"

	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_TEMP,4,2                   ## @IIO_TEMP
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_AD5592R_REG_CTRL_DAC_RANGE,4,2 ## @AD5592R_REG_CTRL_DAC_RANGE
	.comm	_AD5592R_REG_CTRL_ADC_RANGE,4,2 ## @AD5592R_REG_CTRL_ADC_RANGE
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad5592r_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad5592r_read_raw
_ad5592r_read_raw:                      ; @ad5592r_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	x24, x4
	mov	x23, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_iio_priv
	mov	x21, x0
	cmp	x24, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	x24, #130
	b.eq	LBB0_8
; %bb.2:
	cmp	x24, #129
	b.ne	LBB0_10
; %bb.3:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_13
; %bb.4:
	ldr	x8, [x21]
	ldrsw	x2, [x22]
	ldr	w3, [x8, x2, lsl #2]
LBB0_5:
	str	w3, [sp, #12]
	ldr	w0, [x21, #12]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [sp, #12]
	b	LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_ad5592r_get_vref
	str	w0, [x20]
	ldr	w8, [x22, #12]
Lloh2:
	adrp	x9, _IIO_TEMP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IIO_TEMP@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.7:
	mov	w8, #48636
	movk	w8, #2299, lsl #16
	mul	w0, w0, w8
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	mov	x2, x23
	bl	_div_s64_rem
	str	w0, [x20]
Lloh5:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	b	LBB0_14
LBB0_8:
	mov	x0, x21
	bl	_ad5592r_get_vref
	mov	x22, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21, #8]
Lloh8:
	adrp	x9, _AD5592R_REG_CTRL_ADC_RANGE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AD5592R_REG_CTRL_ADC_RANGE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #58379
	movk	w8, #65522, lsl #16
	mov	w9, #16419
	movk	w9, #65507, lsl #16
	csel	w8, w9, w8, eq
	sdiv	w8, w8, w22
LBB0_9:
	str	w8, [x20]
Lloh11:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	b	LBB0_14
LBB0_10:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x22, #8]
	ldr	w9, [x21, #8]
Lloh16:
	adrp	x10, _AD5592R_REG_CTRL_ADC_RANGE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AD5592R_REG_CTRL_ADC_RANGE@GOTPAGEOFF]
Lloh18:
	adrp	x11, _AD5592R_REG_CTRL_DAC_RANGE@GOTPAGE
Lloh19:
	ldr	x11, [x11, _AD5592R_REG_CTRL_DAC_RANGE@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	tst	w8, w9
	mov	w8, #1
	cinc	w8, w8, ne
	ldr	w9, [x20]
	mul	w8, w8, w9
	str	w8, [x20]
	ldr	w8, [x22, #4]
	str	w8, [x23]
Lloh20:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
Lloh22:
	ldr	w23, [x8]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x21, #16]
	ldr	x8, [x8]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x21
	blr	x8
	mov	x23, x0
	cbz	w0, LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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
LBB0_15:
	ldr	w8, [sp, #12]
	ldr	w2, [x22]
	eor	w8, w2, w8, lsr #12
	tst	w8, #0x7
	b.eq	LBB0_17
; %bb.16:
	ldr	w0, [x21, #12]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_17:
	mov	w0, #11
	mov	w1, #0
	bl	_GENMASK
	ldr	w8, [sp, #12]
	and	w3, w8, w0
	ldrsw	x2, [x22]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error while reading channel %u\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Channel %u read: 0x%04hX\n"

	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_TEMP,4,2                   ; @IIO_TEMP
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_AD5592R_REG_CTRL_DAC_RANGE,4,2 ; @AD5592R_REG_CTRL_DAC_RANGE
	.comm	_AD5592R_REG_CTRL_ADC_RANGE,4,2 ; @AD5592R_REG_CTRL_ADC_RANGE
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad5592r_read_raw
.subsections_via_symbols
