	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9551_read_event_value
_mma9551_read_event_value:              ## @mma9551_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%rsi, %rbx
	callq	_iio_priv
	cmpl	$128, (%rbx)
	jne	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	4(%r15), %edi
	movq	_MMA9551_APPID_TILT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMA9551_TILT_CFG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	callq	_mma9551_read_config_byte
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.2:
	movq	16(%rbp), %rax
	movq	_MMA9551_TILT_ANG_THRESH_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-28(%rbp), %ecx
	movl	%ecx, (%r14)
	movl	$0, (%rax)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMA9551_APPID_TILT,4,2         ## @MMA9551_APPID_TILT
	.comm	_MMA9551_TILT_CFG_REG,4,2       ## @MMA9551_TILT_CFG_REG
	.comm	_MMA9551_TILT_ANG_THRESH_MASK,4,2 ## @MMA9551_TILT_ANG_THRESH_MASK
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mma9551_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 mma9551_read_event_value
_mma9551_read_event_value:              ; @mma9551_read_event_value
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x6
	mov	x20, x5
	mov	x22, x1
	bl	_iio_priv
	ldr	w8, [x22]
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.1:
	mov	x21, x0
	bl	_mutex_lock
	ldr	w0, [x21, #4]
Lloh0:
	adrp	x8, _MMA9551_APPID_TILT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMA9551_APPID_TILT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MMA9551_TILT_CFG_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMA9551_TILT_CFG_REG@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_mma9551_read_config_byte
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_4
; %bb.2:
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _MMA9551_TILT_ANG_THRESH_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMA9551_TILT_ANG_THRESH_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x20]
	str	wzr, [x19]
Lloh9:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA9551_APPID_TILT,4,2         ; @MMA9551_APPID_TILT
	.comm	_MMA9551_TILT_CFG_REG,4,2       ; @MMA9551_TILT_CFG_REG
	.comm	_MMA9551_TILT_ANG_THRESH_MASK,4,2 ; @MMA9551_TILT_ANG_THRESH_MASK
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mma9551_read_event_value
.subsections_via_symbols
