	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kxcjk1013_read_raw
_kxcjk1013_read_raw:                    ## @kxcjk1013_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_13
## %bb.1:
	movq	%rax, %r12
	cmpq	$129, %r15
	je	LBB0_14
## %bb.2:
	cmpq	$130, %r15
	jne	LBB0_15
## %bb.3:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_iio_buffer_enabled
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_16
## %bb.12:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_16
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	_KXCJK1013_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
	movl	(%rax), %ebx
	jmp	LBB0_16
LBB0_14:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_kxcjk1013_get_odr
LBB0_6:
	movl	%eax, %ebx
LBB0_7:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_16
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_kxcjk1013_set_power_state
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kxcjk1013_get_acc_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	shrl	$4, %ebx
	movl	%ebx, %edi
	movl	$11, %esi
	callq	_sign_extend32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_kxcjk1013_set_power_state
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_kxcjk1013_set_power_state
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_KXCJK1013_scale_table,8,3      ## @KXCJK1013_scale_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_kxcjk1013_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kxcjk1013_read_raw
_kxcjk1013_read_raw:                    ; @kxcjk1013_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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_iio_priv
	mov	x19, x0
	cmp	x24, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	x24, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	x24, #130
	b.ne	LBB0_8
; %bb.3:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x23
	bl	_iio_buffer_enabled
	cbz	w0, LBB0_11
; %bb.4:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w19, #0
	csel	w23, w19, w8, lt
	b	LBB0_9
LBB0_6:
	str	wzr, [x21]
Lloh6:
	adrp	x8, _KXCJK1013_scale_table@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KXCJK1013_scale_table@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x20]
Lloh9:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	b	LBB0_9
LBB0_7:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_kxcjk1013_get_odr
	mov	x19, x0
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x23
LBB0_10:
	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:
	mov	x0, x19
	mov	w1, #1
	bl	_kxcjk1013_set_power_state
	tbnz	w0, #31, LBB0_14
; %bb.12:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_kxcjk1013_get_acc_reg
	mov	x23, x0
	tbnz	w0, #31, LBB0_15
; %bb.13:
	lsr	w0, w23, #4
	mov	w1, #11
	bl	_sign_extend32
	str	w0, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_kxcjk1013_set_power_state
	mov	x19, x0
	b	LBB0_5
LBB0_14:
	mov	x23, x0
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	mov	w1, #0
	bl	_kxcjk1013_set_power_state
LBB0_16:
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_KXCJK1013_scale_table,8,3      ; @KXCJK1013_scale_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_kxcjk1013_read_raw
.subsections_via_symbols
