	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk3310_read_raw
_stk3310_read_raw:                      ## @stk3310_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, %rbx
	movq	%rcx, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	callq	_iio_priv
	movq	%rax, %r13
	movq	24(%rax), %r12
	movq	(%r14), %rax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_2
## %bb.1:
	movq	_IIO_PROXIMITY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_7
LBB0_2:
	cmpq	$128, %rbx
	je	LBB0_9
## %bb.3:
	cmpq	$130, %rbx
	je	LBB0_11
## %bb.4:
	cmpq	$129, %rbx
	jne	LBB0_7
## %bb.5:
	cmpq	%rcx, %rax
	jne	LBB0_14
## %bb.6:
	movq	_STK3310_REG_ALS_DATA_MSB@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%edx, %edx
	cmpq	%rcx, %rax
	sete	%dl
	movl	(%r13,%rdx,4), %edi
	leaq	-44(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	js	LBB0_18
## %bb.10:
	movq	_stk3310_scale_table@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	xorl	%edx, %edx
	cmpq	%rcx, %rax
	sete	%dl
	movl	8(%r13,%rdx,4), %edi
	leaq	-44(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	js	LBB0_18
## %bb.12:
	movq	_stk3310_it_table@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rax
	movl	-44(%rbp), %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	movl	4(%rax), %eax
	movl	%eax, (%r15)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_18:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_14:
	movq	_STK3310_REG_PS_DATA_MSB@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
	movq	%r13, %r15
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	20(%r13), %edi
	leaq	-60(%rbp), %rdx
	movl	%ebx, %esi
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_19
## %bb.16:
	movl	-60(%rbp), %edi
	callq	_be16_to_cpu
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_19:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_LIGHT,8,3                  ## @IIO_LIGHT
	.comm	_IIO_PROXIMITY,8,3              ## @IIO_PROXIMITY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STK3310_REG_ALS_DATA_MSB,4,2   ## @STK3310_REG_ALS_DATA_MSB
	.comm	_STK3310_REG_PS_DATA_MSB,4,2    ## @STK3310_REG_PS_DATA_MSB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register read failed\n"

	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_stk3310_it_table,8,3           ## @stk3310_it_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_stk3310_scale_table,8,3        ## @stk3310_scale_table
	.no_dead_strip	_stk3310_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk3310_read_raw
_stk3310_read_raw:                      ; @stk3310_read_raw
	.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
	mov	x22, x4
	mov	x20, x3
	mov	x19, x2
	mov	x23, x1
	bl	_iio_priv
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _IIO_PROXIMITY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IIO_PROXIMITY@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.1:
	mov	x21, x0
	cmp	x22, #128
	b.eq	LBB0_8
; %bb.2:
	cmp	x22, #130
	b.eq	LBB0_10
; %bb.3:
	cmp	x22, #129
	b.ne	LBB0_6
; %bb.4:
	ldr	x22, [x21, #24]
Lloh6:
	adrp	x10, _STK3310_REG_ALS_DATA_MSB@GOTPAGE
Lloh7:
	ldr	x10, [x10, _STK3310_REG_ALS_DATA_MSB@GOTPAGEOFF]
Lloh8:
	adrp	x11, _STK3310_REG_PS_DATA_MSB@GOTPAGE
Lloh9:
	ldr	x11, [x11, _STK3310_REG_PS_DATA_MSB@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w23, [x8]
	add	x20, x21, #16
	mov	x0, x20
	bl	_mutex_lock
	ldr	w0, [x21, #20]
	add	x2, sp, #12
	mov	x1, x23
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_14
; %bb.5:
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
	str	w0, [x19]
	mov	x0, x20
	bl	_mutex_unlock
Lloh10:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	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
LBB0_8:
	cmp	x8, x9
	cset	w8, eq
	ldr	w0, [x21, w8, uxtw #2]
	add	x1, sp, #8
	bl	_regmap_field_read
	tbnz	w0, #31, LBB0_13
; %bb.9:
Lloh16:
	adrp	x8, _stk3310_scale_table@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stk3310_scale_table@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	mov	w10, #8
	mov	w11, #12
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	w0, [x21, x8]
	add	x1, sp, #8
	bl	_regmap_field_read
	tbnz	w0, #31, LBB0_13
; %bb.11:
Lloh18:
	adrp	x8, _stk3310_it_table@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stk3310_it_table@GOTPAGEOFF]
LBB0_12:
	ldr	x8, [x8]
	ldr	w9, [sp, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w9, [x8]
	str	w9, [x19]
	ldr	w8, [x8, #4]
	str	w8, [x20]
Lloh20:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_13:
	mov	x21, x0
	b	LBB0_7
LBB0_14:
	mov	x21, x0
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_LIGHT,8,3                  ; @IIO_LIGHT
	.comm	_IIO_PROXIMITY,8,3              ; @IIO_PROXIMITY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STK3310_REG_ALS_DATA_MSB,4,2   ; @STK3310_REG_ALS_DATA_MSB
	.comm	_STK3310_REG_PS_DATA_MSB,4,2    ; @STK3310_REG_PS_DATA_MSB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register read failed\n"

	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_stk3310_it_table,8,3           ; @stk3310_it_table
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_stk3310_scale_table,8,3        ; @stk3310_scale_table
	.no_dead_strip	_stk3310_read_raw
.subsections_via_symbols
