	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7291_read_event_value
_ad7291_read_event_value:               ## @ad7291_read_event_value
	.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	%r9, %r14
	movl	%r8d, %r12d
	movl	%ecx, %ebx
	movq	%rsi, %r15
	callq	_iio_priv
	movq	%rax, %r13
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_ad7291_threshold_reg
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_ad7291_i2c_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	_IIO_EV_INFO_HYSTERESIS@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_3
## %bb.2:
	movq	(%r15), %rax
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_3:
	movq	_AD7291_VALUE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	jmp	LBB0_5
LBB0_4:
	movl	-44(%rbp), %edi
	movl	$11, %esi
	callq	_sign_extend32
LBB0_5:
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_EV_INFO_HYSTERESIS,4,2     ## @IIO_EV_INFO_HYSTERESIS
	.comm	_IIO_VOLTAGE,8,3                ## @IIO_VOLTAGE
	.comm	_AD7291_VALUE_MASK,4,2          ## @AD7291_VALUE_MASK
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_ad7291_read_event_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7291_read_event_value
_ad7291_read_event_value:               ; @ad7291_read_event_value
	.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	x19, x5
	mov	x21, x4
	mov	x22, x3
	mov	x20, x1
	bl	_iio_priv
	mov	x23, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_ad7291_threshold_reg
	mov	x1, x0
	add	x2, sp, #12
	mov	x0, x23
	bl	_ad7291_i2c_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _IIO_EV_INFO_HYSTERESIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_EV_INFO_HYSTERESIS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _IIO_VOLTAGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_VOLTAGE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_3:
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _AD7291_VALUE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AD7291_VALUE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w0, w9, w8
	b	LBB0_5
LBB0_4:
	ldr	w0, [sp, #12]
	mov	w1, #11
	bl	_sign_extend32
LBB0_5:
	str	w0, [x19]
Lloh9:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_EV_INFO_HYSTERESIS,4,2     ; @IIO_EV_INFO_HYSTERESIS
	.comm	_IIO_VOLTAGE,8,3                ; @IIO_VOLTAGE
	.comm	_AD7291_VALUE_MASK,4,2          ; @AD7291_VALUE_MASK
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_ad7291_read_event_value
.subsections_via_symbols
