	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk3310_write_raw
_stk3310_write_raw:                     ## @stk3310_write_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, %r13
	callq	_iio_priv
	movq	%rax, %r14
	movq	(%r13), %rax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_IIO_PROXIMITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_2:
	cmpq	$128, %rbx
	je	LBB0_9
## %bb.3:
	cmpq	$129, %rbx
	jne	LBB0_11
## %bb.4:
	movq	_stk3310_it_table@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_stk3310_get_index
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	xorl	%ecx, %ecx
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	movl	24(%r14,%rcx,4), %edi
	jmp	LBB0_6
LBB0_9:
	movq	_stk3310_scale_table@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_stk3310_get_index
	testl	%eax, %eax
	js	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	xorl	%ecx, %ecx
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	movl	16(%r14,%rcx,4), %edi
LBB0_6:
	movl	%ebx, %esi
	callq	_regmap_field_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_it_table,4,2           ## @stk3310_it_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sensor configuration failed\n"

	.comm	_stk3310_scale_table,4,2        ## @stk3310_scale_table
	.no_dead_strip	_stk3310_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk3310_write_raw
_stk3310_write_raw:                     ; @stk3310_write_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	x23, x4
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	bl	_iio_priv
	ldr	x8, [x20]
Lloh0:
	adrp	x24, _IIO_LIGHT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IIO_LIGHT@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh2:
	adrp	x10, _IIO_PROXIMITY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IIO_PROXIMITY@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_10
; %bb.1:
	mov	x19, x0
	cmp	x23, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	x23, #129
	b.ne	LBB0_10
; %bb.3:
Lloh5:
	adrp	x8, _stk3310_it_table@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stk3310_it_table@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	mov	x3, x21
	bl	_stk3310_get_index
	tbnz	w0, #31, LBB0_10
; %bb.4:
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
	ldr	x9, [x24]
	mov	w10, #24
	mov	w11, #28
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _stk3310_scale_table@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stk3310_scale_table@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	mov	x3, x21
	bl	_stk3310_get_index
	tbnz	w0, #31, LBB0_10
; %bb.6:
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
	ldr	x9, [x24]
	mov	w10, #16
	mov	w11, #20
LBB0_7:
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	w0, [x19, x8]
	mov	x1, x21
	bl	_regmap_field_write
	mov	x20, x0
	tbz	w0, #31, LBB0_9
; %bb.8:
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.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_it_table,4,2           ; @stk3310_it_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sensor configuration failed\n"

	.comm	_stk3310_scale_table,4,2        ; @stk3310_scale_table
	.no_dead_strip	_stk3310_write_raw
.subsections_via_symbols
