	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_coincell_chgr_config
_qcom_coincell_chgr_config:             ## @qcom_coincell_chgr_config
	.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	%rdi, %r14
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.1:
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	_qcom_rset_map@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpl	%r12d, (%rdi,%rbx,4)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_4:
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_12
## %bb.5:
	movq	_qcom_vset_map@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpl	%r15d, (%rdi,%r12,4)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jl	LBB0_6
LBB0_8:
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r12d
	jge	LBB0_9
## %bb.14:
	movl	8(%r14), %edi
	movq	_QCOM_COINCELL_REG_RSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	movl	%eax, %ebx
	movl	12(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_10:
	movl	8(%r14), %edi
	movq	_QCOM_COINCELL_REG_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	xorl	%edx, %edx
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
LBB0_12:
	movl	12(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r12d, %edx
	jmp	LBB0_13
LBB0_9:
	movl	12(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r15d, %edx
LBB0_13:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	8(%r14), %edi
	movq	_QCOM_COINCELL_REG_VSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%r12d, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.18:
	movl	8(%r14), %edi
	movq	_QCOM_COINCELL_REG_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	_QCOM_COINCELL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_QCOM_COINCELL_REG_ENABLE,8,3   ## @QCOM_COINCELL_REG_ENABLE
	.comm	_qcom_rset_map,8,3              ## @qcom_rset_map
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid rset-ohms value %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_qcom_vset_map,8,3              ## @qcom_vset_map
L_.str.1:                               ## @.str.1
	.asciz	"invalid vset-millivolts value %d\n"

	.comm	_QCOM_COINCELL_REG_RSET,8,3     ## @QCOM_COINCELL_REG_RSET
L_.str.2:                               ## @.str.2
	.asciz	"could not write to RSET register\n"

	.comm	_QCOM_COINCELL_REG_VSET,8,3     ## @QCOM_COINCELL_REG_VSET
	.comm	_QCOM_COINCELL_ENABLE,4,2       ## @QCOM_COINCELL_ENABLE
	.no_dead_strip	_qcom_coincell_chgr_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_coincell_chgr_config
_qcom_coincell_chgr_config:             ; @qcom_coincell_chgr_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	cbz	w3, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x22, x1
Lloh0:
	adrp	x23, _qcom_rset_map@GOTPAGE
Lloh1:
	ldr	x23, [x23, _qcom_rset_map@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	ldr	w8, [x0, x21, lsl #2]
	cmp	w8, w22
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_3
	b	LBB0_8
LBB0_5:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x8, _QCOM_COINCELL_REG_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _QCOM_COINCELL_REG_ENABLE@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh4:
	ldr	x8, [x8]
	add	x1, x8, x9
	mov	w2, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_regmap_write
LBB0_7:
	mov	w21, #0
LBB0_8:
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.ge	LBB0_13
; %bb.9:
Lloh5:
	adrp	x23, _qcom_vset_map@GOTPAGE
Lloh6:
	ldr	x23, [x23, _qcom_vset_map@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.10:
	mov	x22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	ldr	w8, [x0, x22, lsl #2]
	cmp	w8, w20
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_11
	b	LBB0_15
LBB0_13:
	ldr	w0, [x19, #12]
	str	x22, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_19
LBB0_14:
	mov	w22, #0
LBB0_15:
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w22, w0
	b.ge	LBB0_18
; %bb.16:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _QCOM_COINCELL_REG_RSET@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QCOM_COINCELL_REG_RSET@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x2, x21
	bl	_regmap_write
	cbz	w0, LBB0_21
; %bb.17:
	mov	x20, x0
	ldr	w0, [x19, #12]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_20
LBB0_18:
	ldr	w0, [x19, #12]
	str	x20, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_19:
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_20:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_21:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
Lloh19:
	adrp	x9, _QCOM_COINCELL_REG_VSET@GOTPAGE
Lloh20:
	ldr	x9, [x9, _QCOM_COINCELL_REG_VSET@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x2, x22
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.22:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
Lloh22:
	adrp	x9, _QCOM_COINCELL_REG_ENABLE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _QCOM_COINCELL_REG_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x1, x9, x8
Lloh25:
	adrp	x8, _QCOM_COINCELL_ENABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _QCOM_COINCELL_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_QCOM_COINCELL_REG_ENABLE,8,3   ; @QCOM_COINCELL_REG_ENABLE
	.comm	_qcom_rset_map,8,3              ; @qcom_rset_map
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid rset-ohms value %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_qcom_vset_map,8,3              ; @qcom_vset_map
l_.str.1:                               ; @.str.1
	.asciz	"invalid vset-millivolts value %d\n"

	.comm	_QCOM_COINCELL_REG_RSET,8,3     ; @QCOM_COINCELL_REG_RSET
l_.str.2:                               ; @.str.2
	.asciz	"could not write to RSET register\n"

	.comm	_QCOM_COINCELL_REG_VSET,8,3     ; @QCOM_COINCELL_REG_VSET
	.comm	_QCOM_COINCELL_ENABLE,4,2       ; @QCOM_COINCELL_ENABLE
	.no_dead_strip	_qcom_coincell_chgr_config
.subsections_via_symbols
