	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi8435_read_event_value
_hi8435_read_event_value:               ## @hi8435_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	%ecx, %r15d
	movq	%rsi, %r12
	callq	_iio_priv
	movq	%rax, %rbx
	movq	_HI8435_PSEN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_hi8435_readb
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	movl	-48(%rbp), %r13d
	movl	(%r12), %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	callq	_BIT
	testl	%r13d, %eax
	jne	LBB0_2
## %bb.3:
	movq	_HI8435_GOCENHYS_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_HI8435_SOCENHYS_REG@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_hi8435_readw
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_7
## %bb.6:
	movl	-44(%rbp), %ecx
	movzbl	%cl, %eax
	sarl	$8, %ecx
	subl	%ecx, %eax
	jmp	LBB0_9
LBB0_7:
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_10
## %bb.8:
	movl	-44(%rbp), %eax
	movzbl	%al, %ecx
	sarl	$8, %eax
	addl	%ecx, %eax
LBB0_9:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%r14)
LBB0_10:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HI8435_PSEN_REG,4,2            ## @HI8435_PSEN_REG
	.comm	_HI8435_SOCENHYS_REG,4,2        ## @HI8435_SOCENHYS_REG
	.comm	_HI8435_GOCENHYS_REG,4,2        ## @HI8435_GOCENHYS_REG
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_hi8435_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 hi8435_read_event_value
_hi8435_read_event_value:               ; @hi8435_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	x20, x3
	mov	x22, x1
	bl	_iio_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _HI8435_PSEN_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HI8435_PSEN_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_hi8435_readb
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	w23, [sp, #12]
	ldr	w8, [x22]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #3
	bl	_BIT
Lloh3:
	adrp	x8, _HI8435_SOCENHYS_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HI8435_SOCENHYS_REG@GOTPAGEOFF]
Lloh5:
	adrp	x9, _HI8435_GOCENHYS_REG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HI8435_GOCENHYS_REG@GOTPAGEOFF]
	tst	w0, w23
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_hi8435_readw
	tbnz	w0, #31, LBB0_8
; %bb.2:
Lloh7:
	adrp	x8, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [sp, #8]
	and	w9, w8, #0xff
	sub	w8, w9, w8, asr #8
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _IIO_EV_DIR_RISING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [sp, #8]
	asr	w9, w8, #8
	add	w8, w9, w8, uxtb
LBB0_6:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x19]
LBB0_7:
Lloh13:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_8:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HI8435_PSEN_REG,4,2            ; @HI8435_PSEN_REG
	.comm	_HI8435_SOCENHYS_REG,4,2        ; @HI8435_SOCENHYS_REG
	.comm	_HI8435_GOCENHYS_REG,4,2        ; @HI8435_GOCENHYS_REG
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_hi8435_read_event_value
.subsections_via_symbols
