	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpr0521_read_raw
_rpr0521_read_raw:                      ## @rpr0521_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, %r14
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_iio_priv
	addq	$-128, %r14
	cmpq	$3, %r14
	ja	LBB0_8
## %bb.1:
	movq	%rax, %r12
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r14,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r13), %rsi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_rpr0521_get_gain
	jmp	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	8(%r13), %esi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_rpr0521_read_samp_freq
LBB0_4:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.5:
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_6:
	movl	8(%r13), %eax
	movq	_IIO_INTENSITY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_14
## %bb.7:
	movq	_IIO_PROXIMITY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_14
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_rpr0521_read_ps_offset
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_13
LBB0_11:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r15, %rdi
	callq	_iio_device_claim_direct_mode
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_16:
	movq	_rpr0521_data_reg@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%r13), %rcx
	movl	4(%rax,%rcx,8), %ebx
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_rpr0521_set_power_state
	testl	%eax, %eax
	js	LBB0_18
## %bb.17:
	movl	4(%r12), %edi
	movq	(%r14), %rax
	movq	(%r13), %rcx
	movl	(%rax,%rcx,8), %esi
	leaq	-56(%rbp), %rdx
	movl	$4, %ecx
	callq	_regmap_bulk_read
	movl	%eax, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_rpr0521_set_power_state
	movl	%eax, %ebx
	testl	%r14d, %r14d
	cmovsl	%r14d, %ebx
	jmp	LBB0_19
LBB0_18:
	movl	%eax, %ebx
LBB0_19:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_iio_device_release_direct_mode
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.20:
	movl	-56(%rbp), %edi
	callq	_le16_to_cpu
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_11
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_IIO_INTENSITY,4,2              ## @IIO_INTENSITY
	.comm	_IIO_PROXIMITY,4,2              ## @IIO_PROXIMITY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_rpr0521_data_reg,8,3           ## @rpr0521_data_reg
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.no_dead_strip	_rpr0521_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpr0521_read_raw
_rpr0521_read_raw:                      ; @rpr0521_read_raw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x23, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_iio_priv
	sub	x8, x24, #128
	cmp	x8, #3
	b.hi	LBB0_8
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x20
	bl	_mutex_lock
	ldr	x1, [x22]
	mov	x0, x20
	mov	x2, x19
	mov	x3, x23
	bl	_rpr0521_get_gain
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_mutex_lock
	ldr	w1, [x22, #8]
	mov	x0, x20
	mov	x2, x19
	mov	x3, x23
	bl	_rpr0521_read_samp_freq
LBB0_4:
	mov	x19, x0
	mov	x0, x20
	bl	_mutex_unlock
Lloh2:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
	ldr	w8, [x22, #8]
Lloh4:
	adrp	x9, _IIO_INTENSITY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IIO_INTENSITY@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	adrp	x10, _IIO_PROXIMITY@GOTPAGE
Lloh8:
	ldr	x10, [x10, _IIO_PROXIMITY@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_iio_device_claim_direct_mode
	cbz	w0, LBB0_13
; %bb.7:
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x19
	bl	_rpr0521_read_ps_offset
	mov	x19, x0
	mov	x0, x20
	bl	_mutex_unlock
Lloh14:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	cmp	w19, #0
	csel	w23, w19, w8, lt
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
Lloh16:
	adrp	x25, _rpr0521_data_reg@GOTPAGE
Lloh17:
	ldr	x25, [x25, _rpr0521_data_reg@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #3
	ldr	w24, [x8, #4]
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x20
	mov	w1, #1
	mov	x2, x24
	bl	_rpr0521_set_power_state
	tbnz	w0, #31, LBB0_15
; %bb.14:
	ldr	w0, [x20, #4]
	ldr	x8, [x25]
	ldr	x9, [x22]
	lsl	x9, x9, #3
	ldr	w1, [x8, x9]
	add	x2, sp, #12
	mov	w3, #4
	bl	_regmap_bulk_read
	mov	x22, x0
	mov	x0, x20
	mov	w1, #0
	mov	x2, x24
	bl	_rpr0521_set_power_state
	cmp	w22, #0
	csel	w23, w22, w0, lt
	b	LBB0_16
LBB0_15:
	mov	x23, x0
LBB0_16:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	bl	_iio_device_release_direct_mode
	tbnz	w23, #31, LBB0_12
; %bb.17:
	ldr	w0, [sp, #12]
	bl	_le16_to_cpu
	str	w0, [x19]
Lloh18:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_IIO_INTENSITY,4,2              ; @IIO_INTENSITY
	.comm	_IIO_PROXIMITY,4,2              ; @IIO_PROXIMITY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_rpr0521_data_reg,8,3           ; @rpr0521_data_reg
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.no_dead_strip	_rpr0521_read_raw
.subsections_via_symbols
