	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcnl4035_write_raw
_vcnl4035_write_raw:                    ## @vcnl4035_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%edx, %r15d
	callq	_iio_priv
	cmpq	$128, %rbx
	jne	LBB0_7
## %bb.1:
	movq	%rax, %r14
	leal	-801(%r15), %eax
	cmpl	$-801, %eax                     ## imm = 0xFCDF
	ja	LBB0_2
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_vcnl4035_set_pm_runtime_state
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	4(%r14), %edi
	movq	_VCNL4035_ALS_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VCNL4035_ALS_IT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movzwl	%r15w, %eax
	shrl	$2, %eax
	imull	$5243, %eax, %r15d              ## imm = 0x147B
	shrl	$17, %r15d
	movl	%r15d, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	%r15d, (%r14)
LBB0_6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_vcnl4035_set_pm_runtime_state
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VCNL4035_ALS_CONF,4,2          ## @VCNL4035_ALS_CONF
	.comm	_VCNL4035_ALS_IT_MASK,4,2       ## @VCNL4035_ALS_IT_MASK
	.no_dead_strip	_vcnl4035_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcnl4035_write_raw
_vcnl4035_write_raw:                    ; @vcnl4035_write_raw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x4
	mov	x20, x2
	bl	_iio_priv
	cmp	x21, #128
	b.ne	LBB0_2
; %bb.1:
	sub	w8, w20, #801
	cmn	w8, #801
	b.hi	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x0
	mov	w1, #1
	bl	_vcnl4035_set_pm_runtime_state
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x8, _VCNL4035_ALS_CONF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCNL4035_ALS_CONF@GOTPAGEOFF]
Lloh5:
	adrp	x9, _VCNL4035_ALS_IT_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VCNL4035_ALS_IT_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w2, [x9]
	ubfx	w8, w20, #2, #14
	mov	w9, #5243
	mul	w8, w8, w9
	lsr	w20, w8, #17
	mov	x3, x20
	bl	_regmap_update_bits
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.6:
	str	w20, [x19]
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_vcnl4035_set_pm_runtime_state
	b	LBB0_3
LBB0_8:
	mov	x21, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VCNL4035_ALS_CONF,4,2          ; @VCNL4035_ALS_CONF
	.comm	_VCNL4035_ALS_IT_MASK,4,2       ; @VCNL4035_ALS_IT_MASK
	.no_dead_strip	_vcnl4035_write_raw
.subsections_via_symbols
