	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma8452_write_raw
_mma8452_write_raw:                     ## @mma8452_write_raw
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r13
	callq	_iio_priv
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_iio_device_claim_direct_mode
	testl	%eax, %eax
	jne	LBB0_25
## %bb.1:
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	addq	$-128, %r15
	cmpq	$4, %r15
	ja	LBB0_15
## %bb.2:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r15,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mma8452_get_scale_index
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_24
## %bb.4:
	movq	_MMA8452_DATA_CFG_FS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	4(%r14), %edx
	orl	%r12d, %edx
	jmp	LBB0_19
LBB0_5:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mma8452_get_samp_freq_index
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_24
## %bb.6:
	movq	_MMA8452_CTRL_DR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r14), %eax
	movl	%eax, (%r14)
	movq	_MMA8452_CTRL_DR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	orl	%eax, %r12d
	movl	%r12d, (%r14)
	movq	%r14, %rdi
	callq	_mma8452_calculate_sleep
	movl	%eax, 8(%r14)
	movq	_MMA8452_CTRL_REG1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%r14), %edx
	jmp	LBB0_21
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mma8452_get_odr_index
	movl	%eax, %ebx
	movq	_mma8452_os_ratio@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_17
## %bb.8:
	movl	%ebx, %r12d
	movslq	%ebx, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	(%rdi,%rbx,8), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax,%r15,4)
	je	LBB0_26
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_24
LBB0_11:
	movl	%edx, %ecx
	movl	%edx, %eax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	orl	%esi, %eax
	movq	_MMA8452_DATA_CFG_HPF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	je	LBB0_18
## %bb.12:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	orl	%edx, 4(%r14)
	movq	%r14, %rdi
	movl	%ecx, %edx
	callq	_mma8452_set_hp_filter_frequency
	testl	%eax, %eax
	js	LBB0_23
## %bb.13:
	movl	4(%r14), %edx
	jmp	LBB0_20
LBB0_14:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movsbl	%dl, %eax
	cmpl	%edx, %eax
	je	LBB0_16
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_24
LBB0_16:
	movq	_MMA8452_OFF_X@GOTPCREL(%rip), %rax
	movq	(%r12), %rsi
	addq	(%rax), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_17:
	movl	%ebx, %r12d
	jmp	LBB0_24
LBB0_18:
	notl	%edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	andl	4(%r14), %edx
LBB0_19:
	movl	%edx, 4(%r14)
LBB0_20:
	movq	_MMA8452_DATA_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_21:
	movq	%r14, %rdi
LBB0_22:
	callq	_mma8452_change_config
LBB0_23:
	movl	%eax, %r12d
LBB0_24:
	movq	%r13, %rdi
	callq	_iio_device_release_direct_mode
	movl	%r12d, %eax
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_mma8452_set_power_mode
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_11
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_MMA8452_CTRL_DR_MASK,4,2       ## @MMA8452_CTRL_DR_MASK
	.comm	_MMA8452_CTRL_DR_SHIFT,4,2      ## @MMA8452_CTRL_DR_SHIFT
	.comm	_MMA8452_CTRL_REG1,8,3          ## @MMA8452_CTRL_REG1
	.comm	_MMA8452_DATA_CFG_FS_MASK,4,2   ## @MMA8452_DATA_CFG_FS_MASK
	.comm	_MMA8452_DATA_CFG,8,3           ## @MMA8452_DATA_CFG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMA8452_OFF_X,8,3              ## @MMA8452_OFF_X
	.comm	_MMA8452_DATA_CFG_HPF_MASK,4,2  ## @MMA8452_DATA_CFG_HPF_MASK
	.comm	_mma8452_os_ratio,8,3           ## @mma8452_os_ratio
	.no_dead_strip	_mma8452_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma8452_write_raw
_mma8452_write_raw:                     ; @mma8452_write_raw
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x25, x4
	mov	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
	bl	_iio_priv
	mov	x20, x0
	mov	x0, x19
	bl	_iio_device_claim_direct_mode
	mov	x21, x0
	cbnz	w0, LBB0_24
; %bb.1:
	sub	x8, x25, #128
	cmp	x8, #4
	b.hi	LBB0_15
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_mma8452_get_scale_index
	mov	x21, x0
	tbnz	w0, #31, LBB0_23
; %bb.4:
Lloh2:
	adrp	x8, _MMA8452_DATA_CFG_FS_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMA8452_DATA_CFG_FS_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	bic	w8, w9, w8
	orr	w2, w8, w21
	b	LBB0_18
LBB0_5:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_mma8452_get_samp_freq_index
	mov	x21, x0
	tbnz	w0, #31, LBB0_23
; %bb.6:
Lloh5:
	adrp	x8, _MMA8452_CTRL_DR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMA8452_CTRL_DR_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
Lloh8:
	adrp	x9, _MMA8452_CTRL_DR_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MMA8452_CTRL_DR_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w9, w21, w9
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	bl	_mma8452_calculate_sleep
	str	w0, [x20, #8]
Lloh11:
	adrp	x8, _MMA8452_CTRL_REG1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMA8452_CTRL_REG1@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	ldr	w2, [x20]
	b	LBB0_20
LBB0_7:
	mov	x0, x20
	bl	_mma8452_get_odr_index
	mov	x21, x0
Lloh14:
	adrp	x24, _mma8452_os_ratio@GOTPAGE
Lloh15:
	ldr	x24, [x24, _mma8452_os_ratio@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_23
; %bb.8:
	mov	x23, #0
	sxtw	x25, w21
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	x8, [x0, x23, lsl #3]
	ldr	w8, [x8, x25, lsl #2]
	cmp	w8, w22
	b.eq	LBB0_25
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_9
	b	LBB0_23
LBB0_11:
Lloh16:
	adrp	x8, _MMA8452_DATA_CFG_HPF_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MMA8452_DATA_CFG_HPF_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w9, w23, w22
	cbz	w9, LBB0_17
; %bb.12:
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_mma8452_set_hp_filter_frequency
	tbnz	w0, #31, LBB0_22
; %bb.13:
	ldr	w2, [x20, #4]
	b	LBB0_19
LBB0_14:
	cmp	w22, w22, sxtb
	b.eq	LBB0_16
LBB0_15:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_23
LBB0_16:
Lloh22:
	adrp	x8, _MMA8452_OFF_X@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MMA8452_OFF_X@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x20
	mov	x2, x22
	b	LBB0_21
LBB0_17:
	ldr	w9, [x20, #4]
	bic	w2, w9, w8
LBB0_18:
	str	w2, [x20, #4]
LBB0_19:
Lloh25:
	adrp	x8, _MMA8452_DATA_CFG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MMA8452_DATA_CFG@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
LBB0_20:
	mov	x0, x20
LBB0_21:
	bl	_mma8452_change_config
LBB0_22:
	mov	x21, x0
LBB0_23:
	mov	x0, x19
	bl	_iio_device_release_direct_mode
LBB0_24:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	mov	x0, x20
	mov	x1, x23
	bl	_mma8452_set_power_mode
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_14-LBB0_3)>>2
                                        ; -- End function
	.comm	_MMA8452_CTRL_DR_MASK,4,2       ; @MMA8452_CTRL_DR_MASK
	.comm	_MMA8452_CTRL_DR_SHIFT,4,2      ; @MMA8452_CTRL_DR_SHIFT
	.comm	_MMA8452_CTRL_REG1,8,3          ; @MMA8452_CTRL_REG1
	.comm	_MMA8452_DATA_CFG_FS_MASK,4,2   ; @MMA8452_DATA_CFG_FS_MASK
	.comm	_MMA8452_DATA_CFG,8,3           ; @MMA8452_DATA_CFG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMA8452_OFF_X,8,3              ; @MMA8452_OFF_X
	.comm	_MMA8452_DATA_CFG_HPF_MASK,4,2  ; @MMA8452_DATA_CFG_HPF_MASK
	.comm	_mma8452_os_ratio,8,3           ; @mma8452_os_ratio
	.no_dead_strip	_mma8452_write_raw
.subsections_via_symbols
