	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc2945_value_store
_ltc2945_value_store:                   ## @ltc2945_value_store
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movl	(%rbx), %ebx
	leaq	-72(%rbp), %rdx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	-72(%rbp), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_ltc2945_val_to_reg
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_is_power_reg
	movl	%r14d, %edi
	xorl	%esi, %esi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	callq	_clamp_val
	movzbl	%ah, %edx
	movl	%eax, -52(%rbp)
	sarl	$16, %eax
	movl	$3, %ecx
	jmp	LBB0_4
LBB0_3:
	movl	$4095, %edx                     ## imm = 0xFFF
	callq	_clamp_val
	shll	$4, %eax
	movzbl	%al, %edx
	sarl	$8, %eax
	movl	$2, %ecx
LBB0_4:
	movl	%eax, -60(%rbp)
	movl	%edx, -56(%rbp)
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_regmap_bulk_write
	testl	%eax, %eax
	cmovsl	%eax, %r12d
	movl	%r12d, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ltc2945_value_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc2945_value_store
_ltc2945_value_store:                   ; @ltc2945_value_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x23, x2
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x0, x1
	bl	_to_sensor_dev_attr
	mov	x21, x0
	mov	x0, x22
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	w21, [x21]
	mov	x2, sp
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtoul
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x2, [sp]
	mov	x0, x22
	mov	x1, x21
	bl	_ltc2945_val_to_reg
	mov	x22, x0
	mov	x0, x21
	bl	_is_power_reg
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #16777215
	bl	_clamp_val
	asr	w8, w0, #16
	ubfx	w9, w0, #8, #8
	str	w0, [sp, #20]
	mov	w3, #3
	b	LBB0_4
LBB0_3:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #4095
	bl	_clamp_val
	sbfx	w8, w0, #4, #24
	ubfiz	w9, w0, #4, #4
	mov	w3, #2
LBB0_4:
	stp	w8, w9, [sp, #12]
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_regmap_bulk_write
	cmp	w0, #0
	csel	w0, w0, w19, lt
LBB0_5:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	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
	add	sp, sp, #96
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ltc2945_value_store
.subsections_via_symbols
