	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp5061_set_const_chg_current
_adp5061_set_const_chg_current:         ## @adp5061_set_const_chg_current
	.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
	movslq	%esi, %rax
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	movq	_ADP5061_ICHG_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
	movq	_adp5061_const_ichg@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	movl	%r15d, %edi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_adp5061_get_array_index
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r14), %r14d
	movq	_ADP5061_CHG_CURR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_ADP5061_CHG_CURR_ICHG_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_ADP5061_CHG_CURR_ICHG_MODE
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADP5061_ICHG_MAX,4,2           ## @ADP5061_ICHG_MAX
	.comm	_adp5061_const_ichg,4,2         ## @adp5061_const_ichg
	.comm	_ADP5061_CHG_CURR,4,2           ## @ADP5061_CHG_CURR
	.comm	_ADP5061_CHG_CURR_ICHG_MSK,4,2  ## @ADP5061_CHG_CURR_ICHG_MSK
	.no_dead_strip	_adp5061_set_const_chg_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adp5061_set_const_chg_current
_adp5061_set_const_chg_current:         ; @adp5061_set_const_chg_current
	.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
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w1, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
Lloh0:
	adrp	x10, _ADP5061_ICHG_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ADP5061_ICHG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	add	w8, w8, w9
	cmp	w8, w10
	csel	w20, w8, w10, lt
Lloh3:
	adrp	x8, _adp5061_const_ichg@GOTPAGE
Lloh4:
	ldr	x8, [x8, _adp5061_const_ichg@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_adp5061_get_array_index
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w19, [x19]
Lloh6:
	adrp	x8, _ADP5061_CHG_CURR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADP5061_CHG_CURR@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
Lloh9:
	adrp	x8, _ADP5061_CHG_CURR_ICHG_MSK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADP5061_CHG_CURR_ICHG_MSK@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	bl	_ADP5061_CHG_CURR_ICHG_MODE
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	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
	b	_regmap_update_bits
LBB0_2:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ADP5061_ICHG_MAX,4,2           ; @ADP5061_ICHG_MAX
	.comm	_adp5061_const_ichg,4,2         ; @adp5061_const_ichg
	.comm	_ADP5061_CHG_CURR,4,2           ; @ADP5061_CHG_CURR
	.comm	_ADP5061_CHG_CURR_ICHG_MSK,4,2  ; @ADP5061_CHG_CURR_ICHG_MSK
	.no_dead_strip	_adp5061_set_const_chg_current
.subsections_via_symbols
