	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp288_charger_set_cc
_axp288_charger_set_cc:                 ## @axp288_charger_set_cc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_CHRG_CCCV_CC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %eax
	cmpl	%esi, %r15d
	jg	LBB0_2
## %bb.1:
	movl	(%r14), %eax
	cmpl	%esi, %eax
	cmovll	%eax, %esi
	movl	%esi, %eax
LBB0_2:
	subl	%r15d, %eax
	movq	_CHRG_CCCV_CC_LSB_RES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	cltd
	idivl	%r12d
	movl	%eax, %ebx
	movq	_CHRG_CCCV_CC_BIT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	movl	8(%r14), %edi
	movq	_AXP20X_CHRG_CTRL1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CHRG_CCCV_CC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	imull	%r12d, %ebx
	addl	%r15d, %ebx
	movl	%ebx, 4(%r14)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHRG_CCCV_CC_OFFSET,4,2        ## @CHRG_CCCV_CC_OFFSET
	.comm	_CHRG_CCCV_CC_LSB_RES,4,2       ## @CHRG_CCCV_CC_LSB_RES
	.comm	_CHRG_CCCV_CC_BIT_POS,4,2       ## @CHRG_CCCV_CC_BIT_POS
	.comm	_AXP20X_CHRG_CTRL1,4,2          ## @AXP20X_CHRG_CTRL1
	.comm	_CHRG_CCCV_CC_MASK,4,2          ## @CHRG_CCCV_CC_MASK
	.no_dead_strip	_axp288_charger_set_cc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp288_charger_set_cc
_axp288_charger_set_cc:                 ; @axp288_charger_set_cc
	.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	x19, x0
Lloh0:
	adrp	x8, _CHRG_CCCV_CC_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHRG_CCCV_CC_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x8, x20
	cmp	w20, w1
	b.gt	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, w1
	csel	w8, w8, w1, lt
LBB0_2:
	sub	w8, w8, w20
Lloh3:
	adrp	x9, _CHRG_CCCV_CC_LSB_RES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHRG_CCCV_CC_LSB_RES@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x9]
	sdiv	w22, w8, w21
Lloh6:
	adrp	x8, _CHRG_CCCV_CC_BIT_POS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHRG_CCCV_CC_BIT_POS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w3, w22, w8
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x8, _AXP20X_CHRG_CTRL1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AXP20X_CHRG_CTRL1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _CHRG_CCCV_CC_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CHRG_CCCV_CC_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_4
; %bb.3:
	madd	w8, w22, w21, w20
	str	w8, [x19, #4]
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CHRG_CCCV_CC_OFFSET,4,2        ; @CHRG_CCCV_CC_OFFSET
	.comm	_CHRG_CCCV_CC_LSB_RES,4,2       ; @CHRG_CCCV_CC_LSB_RES
	.comm	_CHRG_CCCV_CC_BIT_POS,4,2       ; @CHRG_CCCV_CC_BIT_POS
	.comm	_AXP20X_CHRG_CTRL1,4,2          ; @AXP20X_CHRG_CTRL1
	.comm	_CHRG_CCCV_CC_MASK,4,2          ; @CHRG_CCCV_CC_MASK
	.no_dead_strip	_axp288_charger_set_cc
.subsections_via_symbols
