	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc2945_history_store
_ltc2945_history_store:                 ## @ltc2945_history_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rdi, %r15
	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	%r15, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movl	(%rbx), %r12d
	movl	%r12d, %edi
	callq	_is_power_reg
	cmpq	$1, %rax
	movl	$3, %ebx
	sbbl	$0, %ebx
	movl	l___const.ltc2945_history_store.buf_min+8(%rip), %eax
	movl	%eax, -56(%rbp)
	movq	l___const.ltc2945_history_store.buf_min(%rip), %rax
	movq	%rax, -64(%rbp)
	movl	$0, -72(%rbp)
	movq	$0, -80(%rbp)
	leaq	-88(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	cmpq	$1, -88(%rbp)
	jne	LBB0_2
## %bb.3:
	movq	_LTC2945_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_CONTROL_TEST_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %ecx
	callq	_regmap_bulk_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	leal	-128(%r12), %eax
	cmpl	$4, %eax
	jae	LBB0_5
## %bb.6:
	cltq
	leaq	l_switch.table.ltc2945_history_store(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_regmap_bulk_write
	movl	%eax, %ebx
	movl	(%r13), %esi
	movq	_CONTROL_TEST_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	testl	%ebx, %ebx
	cmovnel	%ebx, %r14d
	movl	%r14d, %eax
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r12d, %edx
	callq	_WARN_ONCE
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.ltc2945_history_store.buf_min
l___const.ltc2945_history_store.buf_min:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LTC2945_CONTROL,4,2            ## @LTC2945_CONTROL
	.comm	_CONTROL_TEST_MODE,4,2          ## @CONTROL_TEST_MODE
	.comm	_LTC2945_MAX_POWER_H,4,2        ## @LTC2945_MAX_POWER_H
	.comm	_LTC2945_MAX_SENSE_H,4,2        ## @LTC2945_MAX_SENSE_H
	.comm	_LTC2945_MAX_VIN_H,4,2          ## @LTC2945_MAX_VIN_H
	.comm	_LTC2945_MAX_ADIN_H,4,2         ## @LTC2945_MAX_ADIN_H
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad register: 0x%x\n"

	.no_dead_strip	_ltc2945_history_store
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ltc2945_history_store
l_switch.table.ltc2945_history_store:
	.quad	_LTC2945_MAX_VIN_H
	.quad	_LTC2945_MAX_SENSE_H
	.quad	_LTC2945_MAX_POWER_H
	.quad	_LTC2945_MAX_ADIN_H

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc2945_history_store
_ltc2945_history_store:                 ; @ltc2945_history_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, x1
	bl	_to_sensor_dev_attr
	mov	x21, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	w21, [x21]
	mov	x0, x21
	bl	_is_power_reg
	cmp	x0, #0
	mov	w8, #2
Lloh3:
	adrp	x9, l___const.ltc2945_history_store.buf_min@PAGE
Lloh4:
	add	x9, x9, l___const.ltc2945_history_store.buf_min@PAGEOFF
	ldr	x10, [x9]
	str	x10, [sp, #24]
	ldr	w9, [x9, #8]
	cinc	w22, w8, ne
	str	w9, [sp, #32]
	str	wzr, [sp, #16]
	str	xzr, [sp, #8]
	mov	x2, sp
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtoul
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x8, [sp]
	cmp	x8, #1
	b.ne	LBB0_6
; %bb.2:
Lloh5:
	adrp	x23, _LTC2945_CONTROL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _LTC2945_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh7:
	adrp	x24, _CONTROL_TEST_MODE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _CONTROL_TEST_MODE@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	x3, x2
	bl	_regmap_update_bits
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x21
	mov	x3, x22
	bl	_regmap_bulk_write
	cbnz	w0, LBB0_7
; %bb.3:
	sub	w8, w21, #128
	cmp	w8, #4
	b.hs	LBB0_5
; %bb.4:
Lloh9:
	adrp	x9, l_switch.table.ltc2945_history_store@PAGE
Lloh10:
	add	x9, x9, l_switch.table.ltc2945_history_store@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	x3, x22
	bl	_regmap_bulk_write
	mov	x21, x0
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w3, #0
	bl	_regmap_update_bits
	cmp	w21, #0
	csel	w0, w19, w21, eq
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_WARN_ONCE
LBB0_6:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldr	x8, [sp, #40]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.ltc2945_history_store.buf_min
l___const.ltc2945_history_store.buf_min:
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LTC2945_CONTROL,4,2            ; @LTC2945_CONTROL
	.comm	_CONTROL_TEST_MODE,4,2          ; @CONTROL_TEST_MODE
	.comm	_LTC2945_MAX_POWER_H,4,2        ; @LTC2945_MAX_POWER_H
	.comm	_LTC2945_MAX_SENSE_H,4,2        ; @LTC2945_MAX_SENSE_H
	.comm	_LTC2945_MAX_VIN_H,4,2          ; @LTC2945_MAX_VIN_H
	.comm	_LTC2945_MAX_ADIN_H,4,2         ; @LTC2945_MAX_ADIN_H
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad register: 0x%x\n"

	.no_dead_strip	_ltc2945_history_store
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ltc2945_history_store
l_switch.table.ltc2945_history_store:
	.quad	_LTC2945_MAX_VIN_H
	.quad	_LTC2945_MAX_SENSE_H
	.quad	_LTC2945_MAX_POWER_H
	.quad	_LTC2945_MAX_ADIN_H

.subsections_via_symbols
