	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk8312_read_raw
_stk8312_read_raw:                      ## @stk8312_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, %r13
	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_15
## %bb.3:
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_iio_buffer_enabled
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	movq	_stk8312_scale_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	16(%r14), %rcx
	movq	-8(%rax,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	movslq	16(%r14), %rcx
	movq	-8(%rax,%rcx,8), %rax
	movl	4(%rax), %eax
	jmp	LBB0_14
LBB0_13:
	movq	_stk8312_samp_freq_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movl	(%rax,%rcx,8), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%edx, (%rsi)
	movl	4(%rax,%rcx,8), %eax
LBB0_14:
	movl	%eax, (%rbx)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	addq	$20, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_STK8312_MODE_ACTIVE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	orl	(%r14), %esi
	movq	%r14, %rdi
	callq	_stk8312_set_mode
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stk8312_read_accel
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	%ebx, %edi
	movl	$7, %esi
	callq	_sign_extend32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r15), %esi
	notl	%esi
	andl	(%r14), %esi
	movq	%r14, %rdi
	callq	_stk8312_set_mode
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_17
## %bb.11:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_7
LBB0_9:
	movl	(%r15), %esi
	notl	%esi
	andl	(%r14), %esi
	movq	%r14, %rdi
	callq	_stk8312_set_mode
LBB0_7:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_STK8312_MODE_ACTIVE,4,2        ## @STK8312_MODE_ACTIVE
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_stk8312_scale_table,8,3        ## @stk8312_scale_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_stk8312_samp_freq_table,8,3    ## @stk8312_samp_freq_table
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_stk8312_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk8312_read_raw
_stk8312_read_raw:                      ; @stk8312_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	x23, x1
	mov	x22, 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_8
; %bb.3:
	mov	x0, x22
	bl	_iio_buffer_enabled
	cbz	w0, LBB0_11
; %bb.4:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh2:
	adrp	x8, _stk8312_scale_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stk8312_scale_table@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldrsw	x9, [x19, #16]
	add	x9, x8, x9, lsl #3
	ldur	x9, [x9, #-8]
	ldr	w9, [x9]
	str	w9, [x20]
	ldrsw	x9, [x19, #16]
	add	x8, x8, x9, lsl #3
	ldur	x8, [x8, #-8]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _stk8312_samp_freq_table@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stk8312_samp_freq_table@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	add	x8, x8, x9, lsl #3
	ldr	w9, [x8]
	str	w9, [x20]
LBB0_7:
	ldr	w8, [x8, #4]
	str	w8, [x21]
Lloh8:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	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
LBB0_11:
	add	x21, x19, #20
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x19]
Lloh13:
	adrp	x24, _STK8312_MODE_ACTIVE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _STK8312_MODE_ACTIVE@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_stk8312_set_mode
	tbnz	w0, #31, LBB0_14
; %bb.12:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_stk8312_read_accel
	mov	x22, x0
	tbnz	w0, #31, LBB0_15
; %bb.13:
	mov	x0, x22
	mov	w1, #7
	bl	_sign_extend32
	str	w0, [x20]
	ldr	w8, [x19]
	ldr	w9, [x24]
	bic	w1, w8, w9
	mov	x0, x19
	bl	_stk8312_set_mode
	mov	x19, x0
	mov	x0, x21
	bl	_mutex_unlock
Lloh15:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w19, #0
	csel	w22, w19, w8, lt
	b	LBB0_10
LBB0_14:
	mov	x22, x0
	b	LBB0_16
LBB0_15:
	ldr	w8, [x19]
	ldr	w9, [x24]
	bic	w1, w8, w9
	mov	x0, x19
	bl	_stk8312_set_mode
LBB0_16:
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_STK8312_MODE_ACTIVE,4,2        ; @STK8312_MODE_ACTIVE
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_stk8312_scale_table,8,3        ; @stk8312_scale_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_stk8312_samp_freq_table,8,3    ; @stk8312_samp_freq_table
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_stk8312_read_raw
.subsections_via_symbols
