	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max17042_load_new_capacity_params
_max17042_load_new_capacity_params:     ## @max17042_load_new_capacity_params
	.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	(%rdi), %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	_MAX17042_FullCAP0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	callq	_regmap_read
	movq	_MAX17042_VFSOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_regmap_read
	movl	-28(%rbp), %eax
	sarl	$8, %eax
	imull	-32(%rbp), %eax
	cltq
	imulq	$1374389535, %rax, %rbx         ## imm = 0x51EB851F
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$37, %rbx
	addl	%eax, %ebx
	movq	_MAX17042_RemCap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_max17042_write_verify_reg
	movq	_MAX17042_RepCap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_max17042_write_verify_reg
	movl	(%r15), %eax
	movq	_dQ_ACC_DIV@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_MAX17042_dQacc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_max17042_write_verify_reg
	movq	_MAX17042_dPacc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_dP_ACC_200@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_max17042_write_verify_reg
	movq	_MAX17042_FullCAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_max17042_write_verify_reg
	movq	_MAX17042_DesignCap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %edx
	movq	%r14, %rdi
	callq	_regmap_write
	movq	_MAX17042_FullCAPNom@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	movq	%r14, %rdi
	callq	_max17042_write_verify_reg
	movq	_MAX17042_RepSOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-28(%rbp), %edx
	movq	%r14, %rdi
	callq	_regmap_write
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX17042_FullCAP0,4,2          ## @MAX17042_FullCAP0
	.comm	_MAX17042_VFSOC,4,2             ## @MAX17042_VFSOC
	.comm	_MAX17042_RemCap,4,2            ## @MAX17042_RemCap
	.comm	_MAX17042_RepCap,4,2            ## @MAX17042_RepCap
	.comm	_dQ_ACC_DIV,4,2                 ## @dQ_ACC_DIV
	.comm	_MAX17042_dQacc,4,2             ## @MAX17042_dQacc
	.comm	_MAX17042_dPacc,4,2             ## @MAX17042_dPacc
	.comm	_dP_ACC_200,4,2                 ## @dP_ACC_200
	.comm	_MAX17042_FullCAP,4,2           ## @MAX17042_FullCAP
	.comm	_MAX17042_DesignCap,4,2         ## @MAX17042_DesignCap
	.comm	_MAX17042_FullCAPNom,4,2        ## @MAX17042_FullCAPNom
	.comm	_MAX17042_RepSOC,4,2            ## @MAX17042_RepSOC
	.no_dead_strip	_max17042_load_new_capacity_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max17042_load_new_capacity_params
_max17042_load_new_capacity_params:     ; @max17042_load_new_capacity_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldp	x19, x8, [x0]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _MAX17042_FullCAP0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX17042_FullCAP0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_regmap_read
Lloh3:
	adrp	x8, _MAX17042_VFSOC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX17042_VFSOC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_regmap_read
	ldp	w8, w9, [sp, #8]
	asr	w8, w8, #8
	mul	w8, w8, w9
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w20, w8, w9
Lloh6:
	adrp	x8, _MAX17042_RemCap@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX17042_RemCap@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_max17042_write_verify_reg
Lloh9:
	adrp	x8, _MAX17042_RepCap@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX17042_RepCap@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_max17042_write_verify_reg
Lloh12:
	adrp	x8, _dQ_ACC_DIV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dQ_ACC_DIV@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh14:
	ldr	w8, [x8]
	sdiv	w2, w9, w8
Lloh15:
	adrp	x8, _MAX17042_dQacc@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAX17042_dQacc@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_max17042_write_verify_reg
Lloh18:
	adrp	x8, _MAX17042_dPacc@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX17042_dPacc@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _dP_ACC_200@GOTPAGE
Lloh22:
	ldr	x8, [x8, _dP_ACC_200@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_max17042_write_verify_reg
Lloh24:
	adrp	x8, _MAX17042_FullCAP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAX17042_FullCAP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_max17042_write_verify_reg
Lloh27:
	adrp	x8, _MAX17042_DesignCap@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAX17042_DesignCap@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_regmap_write
Lloh30:
	adrp	x8, _MAX17042_FullCAPNom@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAX17042_FullCAPNom@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [x21, #8]
	mov	x0, x19
	bl	_max17042_write_verify_reg
Lloh33:
	adrp	x8, _MAX17042_RepSOC@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MAX17042_RepSOC@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_regmap_write
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX17042_FullCAP0,4,2          ; @MAX17042_FullCAP0
	.comm	_MAX17042_VFSOC,4,2             ; @MAX17042_VFSOC
	.comm	_MAX17042_RemCap,4,2            ; @MAX17042_RemCap
	.comm	_MAX17042_RepCap,4,2            ; @MAX17042_RepCap
	.comm	_dQ_ACC_DIV,4,2                 ; @dQ_ACC_DIV
	.comm	_MAX17042_dQacc,4,2             ; @MAX17042_dQacc
	.comm	_MAX17042_dPacc,4,2             ; @MAX17042_dPacc
	.comm	_dP_ACC_200,4,2                 ; @dP_ACC_200
	.comm	_MAX17042_FullCAP,4,2           ; @MAX17042_FullCAP
	.comm	_MAX17042_DesignCap,4,2         ; @MAX17042_DesignCap
	.comm	_MAX17042_FullCAPNom,4,2        ; @MAX17042_FullCAPNom
	.comm	_MAX17042_RepSOC,4,2            ; @MAX17042_RepSOC
	.no_dead_strip	_max17042_load_new_capacity_params
.subsections_via_symbols
