	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk8ba50_read_raw
_stk8ba50_read_raw:                     ## @stk8ba50_read_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
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_iio_priv
	movq	%rax, %r14
	cmpq	$128, %r15
	je	LBB0_12
## %bb.1:
	cmpq	$129, %r15
	je	LBB0_13
## %bb.2:
	cmpq	$130, %r15
	jne	LBB0_7
## %bb.3:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_iio_buffer_enabled
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	_stk8ba50_scale_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%rbx)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_stk8ba50_samp_freq_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movl	(%rax,%rcx,4), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	$0, (%rbx)
LBB0_14:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_5:
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_STK8BA50_MODE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stk8ba50_set_power
	testl	%eax, %eax
	js	LBB0_6
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stk8ba50_read_accel
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movq	_STK8BA50_DATA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %eax
	movl	%eax, %edi
	movl	$9, %esi
	callq	_sign_extend32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_STK8BA50_MODE_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stk8ba50_set_power
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
LBB0_10:
	movq	_STK8BA50_MODE_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stk8ba50_set_power
LBB0_6:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_STK8BA50_MODE_NORMAL,4,2       ## @STK8BA50_MODE_NORMAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STK8BA50_MODE_SUSPEND,4,2      ## @STK8BA50_MODE_SUSPEND
	.comm	_STK8BA50_DATA_SHIFT,4,2        ## @STK8BA50_DATA_SHIFT
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_stk8ba50_scale_table,8,3       ## @stk8ba50_scale_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_stk8ba50_samp_freq_table,8,3   ## @stk8ba50_samp_freq_table
	.no_dead_strip	_stk8ba50_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk8ba50_read_raw
_stk8ba50_read_raw:                     ; @stk8ba50_read_raw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	bl	_iio_priv
	mov	x19, x0
	cmp	x24, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	x24, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	x24, #130
	b.ne	LBB0_14
; %bb.3:
	mov	x0, x23
	bl	_iio_buffer_enabled
	cbz	w0, LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_15
LBB0_5:
	str	wzr, [x20]
Lloh2:
	adrp	x8, _stk8ba50_scale_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stk8ba50_scale_table@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x21]
Lloh5:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x8, _stk8ba50_samp_freq_table@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stk8ba50_samp_freq_table@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x20]
	str	wzr, [x21]
LBB0_7:
Lloh10:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_9:
	add	x21, x19, #16
	mov	x0, x21
	bl	_mutex_lock
Lloh12:
	adrp	x8, _STK8BA50_MODE_NORMAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STK8BA50_MODE_NORMAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stk8ba50_set_power
	tbnz	w0, #31, LBB0_13
; %bb.10:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stk8ba50_read_accel
	tbnz	w0, #31, LBB0_12
; %bb.11:
Lloh15:
	adrp	x8, _STK8BA50_DATA_SHIFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STK8BA50_DATA_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	lsr	w0, w0, w8
	mov	w1, #9
	bl	_sign_extend32
	str	w0, [x20]
Lloh18:
	adrp	x8, _STK8BA50_MODE_SUSPEND@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STK8BA50_MODE_SUSPEND@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stk8ba50_set_power
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_7
LBB0_12:
Lloh21:
	adrp	x8, _STK8BA50_MODE_SUSPEND@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STK8BA50_MODE_SUSPEND@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stk8ba50_set_power
LBB0_13:
	mov	x0, x21
	bl	_mutex_unlock
LBB0_14:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_STK8BA50_MODE_NORMAL,4,2       ; @STK8BA50_MODE_NORMAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STK8BA50_MODE_SUSPEND,4,2      ; @STK8BA50_MODE_SUSPEND
	.comm	_STK8BA50_DATA_SHIFT,4,2        ; @STK8BA50_DATA_SHIFT
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_stk8ba50_scale_table,8,3       ; @stk8ba50_scale_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_stk8ba50_samp_freq_table,8,3   ; @stk8ba50_samp_freq_table
	.no_dead_strip	_stk8ba50_read_raw
.subsections_via_symbols
