	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9553_write_event_value
_mma9553_write_event_value:             ## @mma9553_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, %ebx
	movq	%rsi, %r12
	callq	_iio_priv
	movq	%rax, %r14
	cmpl	$130, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$129, %ebx
	jne	LBB0_10
## %bb.2:
	cmpl	$128, (%r12)
	jne	LBB0_10
## %bb.3:
	cmpl	$256, %r15d                     ## imm = 0x100
	jae	LBB0_10
## %bb.4:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_MMA9553_REG_CONF_SPEED_STEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	addq	$8, %rdx
	movq	_MMA9553_MASK_CONF_STEPCOALESCE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%r15d, %ecx
	jmp	LBB0_5
LBB0_6:
	cmpl	$131, (%r12)
	jne	LBB0_10
## %bb.7:
	testl	%r15d, %r15d
	js	LBB0_10
## %bb.8:
	movq	_MMA9553_MAX_ACTTHD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MMA9553_ACTIVITY_THD_TO_SEC
	cmpl	%r15d, %eax
	jge	LBB0_9
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_MMA9553_REG_CONF_ACTTHD@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rbx
	addq	$4, %rbx
	movl	%r15d, %edi
	callq	_MMA9553_ACTIVITY_SEC_TO_THD
	movq	_MMA9553_MASK_CONF_WORD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
LBB0_5:
	callq	_mma9553_set_config
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMA9553_REG_CONF_SPEED_STEP,4,2 ## @MMA9553_REG_CONF_SPEED_STEP
	.comm	_MMA9553_MASK_CONF_STEPCOALESCE,4,2 ## @MMA9553_MASK_CONF_STEPCOALESCE
	.comm	_MMA9553_MAX_ACTTHD,4,2         ## @MMA9553_MAX_ACTTHD
	.comm	_MMA9553_REG_CONF_ACTTHD,4,2    ## @MMA9553_REG_CONF_ACTTHD
	.comm	_MMA9553_MASK_CONF_WORD,4,2     ## @MMA9553_MASK_CONF_WORD
	.no_dead_strip	_mma9553_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 mma9553_write_event_value
_mma9553_write_event_value:             ; @mma9553_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	x20, x5
	mov	x22, x4
	mov	x21, x1
	bl	_iio_priv
	mov	x19, x0
	cmp	w22, #130
	b.eq	LBB0_5
; %bb.1:
	cmp	w22, #129
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.3:
	cmp	w20, #256
	b.hs	LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _MMA9553_REG_CONF_SPEED_STEP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMA9553_REG_CONF_SPEED_STEP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, x19, #8
Lloh3:
	adrp	x8, _MMA9553_MASK_CONF_STEPCOALESCE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMA9553_MASK_CONF_STEPCOALESCE@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x3, x20
	b	LBB0_11
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, #131
	b.ne	LBB0_8
; %bb.6:
	tbnz	w20, #31, LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _MMA9553_MAX_ACTTHD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMA9553_MAX_ACTTHD@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_MMA9553_ACTIVITY_THD_TO_SEC
	cmp	w0, w20
	b.ge	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	mov	x0, x19
	bl	_mutex_lock
Lloh12:
	adrp	x8, _MMA9553_REG_CONF_ACTTHD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMA9553_REG_CONF_ACTTHD@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	add	x22, x19, #4
	mov	x0, x20
	bl	_MMA9553_ACTIVITY_SEC_TO_THD
	mov	x3, x0
Lloh15:
	adrp	x8, _MMA9553_MASK_CONF_WORD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MMA9553_MASK_CONF_WORD@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
LBB0_11:
	bl	_mma9553_set_config
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMA9553_REG_CONF_SPEED_STEP,4,2 ; @MMA9553_REG_CONF_SPEED_STEP
	.comm	_MMA9553_MASK_CONF_STEPCOALESCE,4,2 ; @MMA9553_MASK_CONF_STEPCOALESCE
	.comm	_MMA9553_MAX_ACTTHD,4,2         ; @MMA9553_MAX_ACTTHD
	.comm	_MMA9553_REG_CONF_ACTTHD,4,2    ; @MMA9553_REG_CONF_ACTTHD
	.comm	_MMA9553_MASK_CONF_WORD,4,2     ; @MMA9553_MASK_CONF_WORD
	.no_dead_strip	_mma9553_write_event_value
.subsections_via_symbols
