	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7298_read_raw
_ad7298_read_raw:                       ## @ad7298_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_iio_priv
	movq	%rax, %r13
	cmpq	$130, %r14
	je	LBB0_11
## %bb.1:
	cmpq	$132, %r14
	je	LBB0_15
## %bb.2:
	cmpq	$131, %r14
	jne	LBB0_16
## %bb.3:
	movq	%r12, %rdi
	callq	_iio_device_claim_direct_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movl	8(%r15), %esi
	movq	_AD7298_CH_TEMP@GOTPCREL(%rip), %r14
	cmpl	(%r14), %esi
	jne	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ad7298_scan_temp
	jmp	LBB0_7
LBB0_11:
	movl	4(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_14
## %bb.12:
	cmpl	$128, %eax
	jne	LBB0_16
## %bb.13:
	movq	%r13, %rdi
	callq	_ad7298_get_ref_voltage
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r15), %eax
	movl	%eax, (%rbx)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_15:
	movq	%r13, %rdi
	callq	_ad7298_get_ref_voltage
	movl	%eax, %ecx
	movl	$2732500, %eax                  ## imm = 0x29B1D4
	xorl	%edx, %edx
	idivl	%ecx
	movl	$1093, %ecx                     ## imm = 0x445
	subl	%eax, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
LBB0_10:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_14:
	movq	%r13, %rdi
	callq	_ad7298_get_ref_voltage
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	$10, (%rbx)
	movq	_IIO_VAL_FRACTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_6:
	movq	%r13, %rdi
	callq	_ad7298_scan_direct
LBB0_7:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_iio_device_release_direct_mode
	testl	%ebx, %ebx
	js	LBB0_17
## %bb.8:
	movl	8(%r15), %eax
	cmpl	(%r14), %eax
	je	LBB0_10
## %bb.9:
	movl	(%r15), %edi
	decl	%edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%ebx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_10
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7298_CH_TEMP,4,2             ## @AD7298_CH_TEMP
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.comm	_IIO_VAL_FRACTIONAL,4,2         ## @IIO_VAL_FRACTIONAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad7298_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7298_read_raw
_ad7298_read_raw:                       ; @ad7298_read_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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_iio_priv
	mov	x23, x0
	cmp	x24, #130
	b.eq	LBB0_6
; %bb.1:
	cmp	x24, #132
	b.eq	LBB0_10
; %bb.2:
	cmp	x24, #131
	b.ne	LBB0_9
; %bb.3:
	mov	x0, x22
	bl	_iio_device_claim_direct_mode
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.4:
	ldr	w1, [x20, #8]
Lloh0:
	adrp	x24, _AD7298_CH_TEMP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AD7298_CH_TEMP@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	x0, x23
	cmp	w1, w8
	b.ne	LBB0_14
; %bb.5:
	mov	x1, x19
	bl	_ad7298_scan_temp
	b	LBB0_15
LBB0_6:
	ldr	w8, [x20, #4]
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x23
	bl	_ad7298_get_ref_voltage
	str	w0, [x19]
	ldr	w8, [x20]
	str	w8, [x21]
Lloh2:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	b	LBB0_18
LBB0_9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_18
LBB0_10:
	mov	x0, x23
	bl	_ad7298_get_ref_voltage
	mov	w8, #45524
	movk	w8, #41, lsl #16
	sdiv	w8, w8, w0
	mov	w9, #1093
	sub	w8, w9, w8
LBB0_11:
	str	w8, [x19]
LBB0_12:
Lloh8:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	b	LBB0_18
LBB0_13:
	mov	x0, x23
	bl	_ad7298_get_ref_voltage
	str	w0, [x19]
	mov	w8, #10
	str	w8, [x21]
Lloh11:
	adrp	x8, _IIO_VAL_FRACTIONAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	b	LBB0_18
LBB0_14:
	bl	_ad7298_scan_direct
LBB0_15:
	mov	x21, x0
	mov	x0, x22
	bl	_iio_device_release_direct_mode
	tbnz	w21, #31, LBB0_18
; %bb.16:
	ldr	w8, [x20, #8]
	ldr	w9, [x24]
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.17:
	ldr	w8, [x20]
	sub	w0, w8, #1
	mov	w1, #0
	bl	_GENMASK
	and	w8, w0, w21
	b	LBB0_11
LBB0_18:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7298_CH_TEMP,4,2             ; @AD7298_CH_TEMP
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.comm	_IIO_VAL_FRACTIONAL,4,2         ; @IIO_VAL_FRACTIONAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad7298_read_raw
.subsections_via_symbols
