	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9551_write_event_value
_mma9551_write_event_value:             ## @mma9551_write_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
	movl	%r9d, %r15d
	movq	%rsi, %rbx
	callq	_iio_priv
	cmpl	$128, (%rbx)
	jne	LBB0_4
## %bb.1:
	movq	%rax, %r14
	leal	-11(%r15), %eax
	cmpl	$-10, %eax
	jb	LBB0_4
## %bb.2:
	cmpl	$0, 16(%rbp)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	4(%r14), %edi
	movq	_MMA9551_APPID_TILT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMA9551_TILT_CFG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MMA9551_TILT_ANG_THRESH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %r8d
	callq	_mma9551_update_config_bits
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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
	.no_dead_strip	_mma9551_write_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_write_event_value
_mma9551_write_event_value:             ; @mma9551_write_event_value
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x6
	mov	x19, x5
	mov	x22, x1
	bl	_iio_priv
	ldr	w8, [x22]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	sub	w8, w19, #11
	cmn	w8, #10
	b.lo	LBB0_4
; %bb.2:
	cbnz	w21, LBB0_4
; %bb.3:
	mov	x20, x0
	bl	_mutex_lock
	ldr	w0, [x20, #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]
Lloh6:
	adrp	x8, _MMA9551_TILT_ANG_THRESH_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMA9551_TILT_ANG_THRESH_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x4, x19
	bl	_mma9551_update_config_bits
	mov	x19, x0
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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
	.no_dead_strip	_mma9551_write_event_value
.subsections_via_symbols
