	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9551_read_incli_chan
_mma9551_read_incli_chan:               ## @mma9551_read_incli_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	%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
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_5
## %bb.1:
	movq	%rdx, %r14
	movq	%rdi, %r12
	cltq
	leaq	l_switch.table.mma9551_read_incli_chan(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	leaq	l_switch.table.mma9551_read_incli_chan.1(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %r13d
	movl	(%rcx), %r15d
	movl	$1, %esi
	callq	_mma9551_set_power_state
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	_MMA9551_APPID_TILT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_mma9551_read_status_byte
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movl	(%r15), %esi
	movq	_MMA9551_TILT_QUAD_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_mma9551_read_status_byte
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	_MMA9551_TILT_ANGFLG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-48(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movl	%edx, %ecx
	andl	$3, %ecx
	movl	%ecx, -44(%rbp)
	imull	$90, %ecx, %ecx
	movl	$90, %esi
	subl	%eax, %esi
	testb	$1, %dl
	cmovel	%eax, %esi
	addl	%ecx, %esi
	movl	%esi, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_mma9551_set_power_state
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMA9551_TILT_YZ_ANG_REG,4,2    ## @MMA9551_TILT_YZ_ANG_REG
	.comm	_MMA9551_TILT_YZ_QUAD_SHIFT,4,2 ## @MMA9551_TILT_YZ_QUAD_SHIFT
	.comm	_MMA9551_TILT_XZ_ANG_REG,4,2    ## @MMA9551_TILT_XZ_ANG_REG
	.comm	_MMA9551_TILT_XZ_QUAD_SHIFT,4,2 ## @MMA9551_TILT_XZ_QUAD_SHIFT
	.comm	_MMA9551_TILT_XY_ANG_REG,4,2    ## @MMA9551_TILT_XY_ANG_REG
	.comm	_MMA9551_TILT_XY_QUAD_SHIFT,4,2 ## @MMA9551_TILT_XY_QUAD_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMA9551_APPID_TILT,4,2         ## @MMA9551_APPID_TILT
	.comm	_MMA9551_TILT_QUAD_REG,4,2      ## @MMA9551_TILT_QUAD_REG
	.comm	_MMA9551_TILT_ANGFLG,4,2        ## @MMA9551_TILT_ANGFLG
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_mma9551_read_incli_chan
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mma9551_read_incli_chan
l_switch.table.mma9551_read_incli_chan:
	.quad	_MMA9551_TILT_XY_QUAD_SHIFT
	.quad	_MMA9551_TILT_XZ_QUAD_SHIFT
	.quad	_MMA9551_TILT_YZ_QUAD_SHIFT

	.p2align	3                               ## @switch.table.mma9551_read_incli_chan.1
l_switch.table.mma9551_read_incli_chan.1:
	.quad	_MMA9551_TILT_XY_ANG_REG
	.quad	_MMA9551_TILT_XZ_ANG_REG
	.quad	_MMA9551_TILT_YZ_ANG_REG

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma9551_read_incli_chan
_mma9551_read_incli_chan:               ; @mma9551_read_incli_chan
	.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
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x19, x0
	sbfiz	x8, x8, #3, #32
Lloh0:
	adrp	x9, l_switch.table.mma9551_read_incli_chan@PAGE
Lloh1:
	add	x9, x9, l_switch.table.mma9551_read_incli_chan@PAGEOFF
	ldr	x9, [x9, x8]
Lloh2:
	adrp	x10, l_switch.table.mma9551_read_incli_chan.1@PAGE
Lloh3:
	add	x10, x10, l_switch.table.mma9551_read_incli_chan.1@PAGEOFF
	ldr	x8, [x10, x8]
	ldr	w22, [x8]
	ldr	w23, [x9]
	mov	w1, #1
	bl	_mma9551_set_power_state
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh4:
	adrp	x24, _MMA9551_APPID_TILT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MMA9551_APPID_TILT@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x3, sp, #12
	mov	x0, x19
	mov	x2, x22
	bl	_mma9551_read_status_byte
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w1, [x24]
Lloh6:
	adrp	x8, _MMA9551_TILT_QUAD_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMA9551_TILT_QUAD_REG@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	bl	_mma9551_read_status_byte
	tbnz	w0, #31, LBB0_7
; %bb.4:
Lloh9:
	adrp	x8, _MMA9551_TILT_ANGFLG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMA9551_TILT_ANGFLG@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	ldr	w9, [sp, #8]
	asr	w9, w9, w23
	and	w10, w9, #0x3
	stp	w10, w8, [sp, #8]
	mov	w11, #90
	sub	w12, w11, w8
	tst	w9, #0x1
	csel	w8, w8, w12, eq
	madd	w8, w10, w11, w8
	str	w8, [x20]
Lloh12:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	b	LBB0_8
LBB0_5:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_6:
	mov	x21, x0
	b	LBB0_9
LBB0_7:
	mov	x21, x0
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	bl	_mma9551_set_power_state
LBB0_9:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA9551_TILT_YZ_ANG_REG,4,2    ; @MMA9551_TILT_YZ_ANG_REG
	.comm	_MMA9551_TILT_YZ_QUAD_SHIFT,4,2 ; @MMA9551_TILT_YZ_QUAD_SHIFT
	.comm	_MMA9551_TILT_XZ_ANG_REG,4,2    ; @MMA9551_TILT_XZ_ANG_REG
	.comm	_MMA9551_TILT_XZ_QUAD_SHIFT,4,2 ; @MMA9551_TILT_XZ_QUAD_SHIFT
	.comm	_MMA9551_TILT_XY_ANG_REG,4,2    ; @MMA9551_TILT_XY_ANG_REG
	.comm	_MMA9551_TILT_XY_QUAD_SHIFT,4,2 ; @MMA9551_TILT_XY_QUAD_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMA9551_APPID_TILT,4,2         ; @MMA9551_APPID_TILT
	.comm	_MMA9551_TILT_QUAD_REG,4,2      ; @MMA9551_TILT_QUAD_REG
	.comm	_MMA9551_TILT_ANGFLG,4,2        ; @MMA9551_TILT_ANGFLG
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_mma9551_read_incli_chan
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mma9551_read_incli_chan
l_switch.table.mma9551_read_incli_chan:
	.quad	_MMA9551_TILT_XY_QUAD_SHIFT
	.quad	_MMA9551_TILT_XZ_QUAD_SHIFT
	.quad	_MMA9551_TILT_YZ_QUAD_SHIFT

	.p2align	3                               ; @switch.table.mma9551_read_incli_chan.1
l_switch.table.mma9551_read_incli_chan.1:
	.quad	_MMA9551_TILT_XY_ANG_REG
	.quad	_MMA9551_TILT_XZ_ANG_REG
	.quad	_MMA9551_TILT_YZ_ANG_REG

.subsections_via_symbols
