	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma8452_write_event_value
_mma8452_write_event_value:             ## @mma8452_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	%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
	movl	%r9d, %r14d
	movl	%r8d, %r13d
	movl	%ecx, %r12d
	movq	%rsi, %rbx
	callq	_iio_priv
	movq	%rax, %r15
	leaq	-48(%rbp), %rcx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_mma8452_get_event_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.1:
	movl	16(%rbp), %r12d
	cmpl	$130, %r13d
	je	LBB0_7
## %bb.2:
	cmpl	$129, %r13d
	je	LBB0_11
## %bb.3:
	cmpl	$128, %r13d
	jne	LBB0_13
## %bb.4:
	testl	%r14d, %r14d
	js	LBB0_13
## %bb.5:
	movq	-48(%rbp), %rax
	cmpl	%r14d, (%rax)
	jl	LBB0_13
## %bb.6:
	movl	8(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	jmp	LBB0_17
LBB0_7:
	movl	(%r15), %edi
	movq	_MMA8452_TRANSIENT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_19
## %bb.8:
	movl	%r12d, %eax
	orl	%r14d, %eax
	movq	_MMA8452_TRANSIENT_CFG_HPF_BYP@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	je	LBB0_15
## %bb.9:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	callq	_mma8452_set_hp_filter_frequency
	testl	%eax, %eax
	js	LBB0_18
## %bb.10:
	notl	%r13d
	andl	%ebx, %r13d
	jmp	LBB0_16
LBB0_11:
	movq	%r15, %rdi
	callq	_mma8452_get_power_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_19
## %bb.12:
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	addl	%r12d, %r14d
	movq	_mma8452_time_step_us@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rbx
	movq	%r15, %rdi
	callq	_mma8452_get_odr_index
	movq	%rax, %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rbx,%rcx,4)
	cmpl	$256, %eax                      ## imm = 0x100
	jb	LBB0_14
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_14:
	movq	-48(%rbp), %rcx
	movl	4(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	jmp	LBB0_17
LBB0_15:
	orl	%ebx, %r13d
LBB0_16:
	movq	_MMA8452_TRANSIENT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
LBB0_17:
	callq	_mma8452_change_config
LBB0_18:
	movl	%eax, %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
	.comm	_mma8452_time_step_us,8,3       ## @mma8452_time_step_us
	.comm	_MMA8452_TRANSIENT_CFG,4,2      ## @MMA8452_TRANSIENT_CFG
	.comm	_MMA8452_TRANSIENT_CFG_HPF_BYP,4,2 ## @MMA8452_TRANSIENT_CFG_HPF_BYP
	.no_dead_strip	_mma8452_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 mma8452_write_event_value
_mma8452_write_event_value:             ; @mma8452_write_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	x22, x6
	mov	x20, x5
	mov	x23, x4
	mov	x21, x3
	mov	x24, x1
	bl	_iio_priv
	mov	x19, x0
	add	x3, sp, #8
	mov	x1, x24
	mov	x2, x21
	bl	_mma8452_get_event_regs
	mov	x21, x0
	cbnz	w0, LBB0_20
; %bb.1:
	cmp	w23, #130
	b.eq	LBB0_7
; %bb.2:
	cmp	w23, #129
	b.eq	LBB0_11
; %bb.3:
	cmp	w23, #128
	b.ne	LBB0_13
; %bb.4:
	tbnz	w20, #31, LBB0_13
; %bb.5:
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
	cmp	w9, w20
	b.lt	LBB0_13
; %bb.6:
	ldr	w1, [x8, #8]
	mov	x0, x19
	mov	x2, x20
	b	LBB0_18
LBB0_7:
	ldr	w0, [x19]
Lloh0:
	adrp	x23, _MMA8452_TRANSIENT_CFG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MMA8452_TRANSIENT_CFG@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_20
; %bb.8:
Lloh2:
	adrp	x8, _MMA8452_TRANSIENT_CFG_HPF_BYP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMA8452_TRANSIENT_CFG_HPF_BYP@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
	orr	w8, w22, w20
	cbz	w8, LBB0_15
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_mma8452_set_hp_filter_frequency
	tbnz	w0, #31, LBB0_19
; %bb.10:
	bic	w2, w21, w24
	b	LBB0_16
LBB0_11:
	mov	x0, x19
	bl	_mma8452_get_power_mode
	mov	x21, x0
	tbnz	w0, #31, LBB0_20
; %bb.12:
Lloh5:
	adrp	x8, _USEC_PER_SEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USEC_PER_SEC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	madd	w20, w8, w20, w22
Lloh8:
	adrp	x8, _mma8452_time_step_us@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mma8452_time_step_us@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x21, [x8, w21, uxtw #3]
	mov	x0, x19
	bl	_mma8452_get_odr_index
	ldr	w8, [x21, x0, lsl #2]
	sdiv	w2, w20, w8
	cmp	w2, #256
	b.lo	LBB0_14
LBB0_13:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_20
LBB0_14:
	ldr	x8, [sp, #8]
	ldr	w1, [x8, #4]
	b	LBB0_17
LBB0_15:
	orr	w2, w24, w21
LBB0_16:
	ldr	w1, [x23]
LBB0_17:
	mov	x0, x19
LBB0_18:
	bl	_mma8452_change_config
LBB0_19:
	mov	x21, x0
LBB0_20:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
	.comm	_mma8452_time_step_us,8,3       ; @mma8452_time_step_us
	.comm	_MMA8452_TRANSIENT_CFG,4,2      ; @MMA8452_TRANSIENT_CFG
	.comm	_MMA8452_TRANSIENT_CFG_HPF_BYP,4,2 ; @MMA8452_TRANSIENT_CFG_HPF_BYP
	.no_dead_strip	_mma8452_write_event_value
.subsections_via_symbols
