	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mma9551_read_accel_chan        ## -- Begin function mma9551_read_accel_chan
	.p2align	4, 0x90
_mma9551_read_accel_chan:               ## @mma9551_read_accel_chan
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r15
	cltq
	leaq	l_switch.table.mma9551_read_accel_chan(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r12d
	movl	$1, %esi
	callq	_mma9551_set_power_state
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_MMA9551_APPID_AFE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_mma9551_read_status_word
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	-36(%rbp), %eax
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %ebx
LBB0_7:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_mma9551_set_power_state
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMA9551_AFE_X_ACCEL_REG,4,2    ## @MMA9551_AFE_X_ACCEL_REG
	.comm	_MMA9551_AFE_Y_ACCEL_REG,4,2    ## @MMA9551_AFE_Y_ACCEL_REG
	.comm	_MMA9551_AFE_Z_ACCEL_REG,4,2    ## @MMA9551_AFE_Z_ACCEL_REG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMA9551_APPID_AFE,4,2          ## @MMA9551_APPID_AFE
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mma9551_read_accel_chan
l_switch.table.mma9551_read_accel_chan:
	.quad	_MMA9551_AFE_Z_ACCEL_REG
	.quad	_MMA9551_AFE_Y_ACCEL_REG
	.quad	_MMA9551_AFE_X_ACCEL_REG

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mma9551_read_accel_chan        ; -- Begin function mma9551_read_accel_chan
	.p2align	2
_mma9551_read_accel_chan:               ; @mma9551_read_accel_chan
	.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
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x9, l_switch.table.mma9551_read_accel_chan@PAGE
Lloh1:
	add	x9, x9, l_switch.table.mma9551_read_accel_chan@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w22, [x8]
	mov	w1, #1
	bl	_mma9551_set_power_state
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _MMA9551_APPID_AFE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMA9551_APPID_AFE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	x2, x22
	bl	_mma9551_read_status_word
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w8, [sp, #12]
	str	w8, [x20]
Lloh5:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_5:
	mov	x21, x0
	b	LBB0_8
LBB0_6:
	mov	x21, x0
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_mma9551_set_power_state
LBB0_8:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA9551_AFE_X_ACCEL_REG,4,2    ; @MMA9551_AFE_X_ACCEL_REG
	.comm	_MMA9551_AFE_Y_ACCEL_REG,4,2    ; @MMA9551_AFE_Y_ACCEL_REG
	.comm	_MMA9551_AFE_Z_ACCEL_REG,4,2    ; @MMA9551_AFE_Z_ACCEL_REG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMA9551_APPID_AFE,4,2          ; @MMA9551_APPID_AFE
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mma9551_read_accel_chan
l_switch.table.mma9551_read_accel_chan:
	.quad	_MMA9551_AFE_Z_ACCEL_REG
	.quad	_MMA9551_AFE_Y_ACCEL_REG
	.quad	_MMA9551_AFE_X_ACCEL_REG

.subsections_via_symbols
