	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb347_set_charge_current
_smb347_set_charge_current:             ## @smb347_set_charge_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_4
## %bb.1:
	movq	_fcc_tbl@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	8(%r14), %rcx
	movq	16(%rcx), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_current_to_hw
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movl	(%r14), %edi
	movq	_CFG_CHARGE_CURRENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CFG_CHARGE_CURRENT_FCC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CFG_CHARGE_CURRENT_FCC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movq	8(%r14), %rax
LBB0_4:
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.5:
	movq	_pcc_tbl@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	8(%r14), %rcx
	movq	8(%rcx), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_current_to_hw
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movl	(%r14), %edi
	movq	_CFG_CHARGE_CURRENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CFG_CHARGE_CURRENT_PCC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CFG_CHARGE_CURRENT_PCC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:
	movq	8(%r14), %rax
LBB0_8:
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.9:
	movq	_tc_tbl@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	8(%r14), %rcx
	movq	(%rcx), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_current_to_hw
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	movl	(%r14), %edi
	movq	_CFG_CHARGE_CURRENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CFG_CHARGE_CURRENT_TC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_12
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fcc_tbl,4,2                    ## @fcc_tbl
	.comm	_CFG_CHARGE_CURRENT,4,2         ## @CFG_CHARGE_CURRENT
	.comm	_CFG_CHARGE_CURRENT_FCC_MASK,4,2 ## @CFG_CHARGE_CURRENT_FCC_MASK
	.comm	_CFG_CHARGE_CURRENT_FCC_SHIFT,4,2 ## @CFG_CHARGE_CURRENT_FCC_SHIFT
	.comm	_pcc_tbl,4,2                    ## @pcc_tbl
	.comm	_CFG_CHARGE_CURRENT_PCC_MASK,4,2 ## @CFG_CHARGE_CURRENT_PCC_MASK
	.comm	_CFG_CHARGE_CURRENT_PCC_SHIFT,4,2 ## @CFG_CHARGE_CURRENT_PCC_SHIFT
	.comm	_tc_tbl,4,2                     ## @tc_tbl
	.comm	_CFG_CHARGE_CURRENT_TC_MASK,4,2 ## @CFG_CHARGE_CURRENT_TC_MASK
	.no_dead_strip	_smb347_set_charge_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb347_set_charge_current
_smb347_set_charge_current:             ; @smb347_set_charge_current
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _fcc_tbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fcc_tbl@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	x2, [x8, #16]
	mov	x0, x20
	bl	_current_to_hw
	mov	x3, x0
	tbnz	w0, #31, LBB0_13
; %bb.2:
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _CFG_CHARGE_CURRENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CFG_CHARGE_CURRENT@GOTPAGEOFF]
Lloh5:
	adrp	x9, _CFG_CHARGE_CURRENT_FCC_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CFG_CHARGE_CURRENT_FCC_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w2, [x9]
Lloh9:
	adrp	x8, _CFG_CHARGE_CURRENT_FCC_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CFG_CHARGE_CURRENT_FCC_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w3, w3, w8
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_12
; %bb.3:
	ldr	x8, [x19, #8]
LBB0_4:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_8
; %bb.5:
Lloh12:
	adrp	x8, _pcc_tbl@GOTPAGE
Lloh13:
	ldr	x8, [x8, _pcc_tbl@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	x2, [x8, #8]
	mov	x0, x20
	bl	_current_to_hw
	mov	x3, x0
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _CFG_CHARGE_CURRENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CFG_CHARGE_CURRENT@GOTPAGEOFF]
Lloh17:
	adrp	x9, _CFG_CHARGE_CURRENT_PCC_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CFG_CHARGE_CURRENT_PCC_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	ldr	w2, [x9]
Lloh21:
	adrp	x8, _CFG_CHARGE_CURRENT_PCC_SHIFT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CFG_CHARGE_CURRENT_PCC_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	lsl	w3, w3, w8
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_12
; %bb.7:
	ldr	x8, [x19, #8]
LBB0_8:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.9:
Lloh24:
	adrp	x8, _tc_tbl@GOTPAGE
Lloh25:
	ldr	x8, [x8, _tc_tbl@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	x2, [x8]
	mov	x0, x20
	bl	_current_to_hw
	mov	x3, x0
	tbnz	w0, #31, LBB0_13
; %bb.10:
	ldr	w0, [x19]
Lloh27:
	adrp	x8, _CFG_CHARGE_CURRENT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CFG_CHARGE_CURRENT@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _CFG_CHARGE_CURRENT_TC_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CFG_CHARGE_CURRENT_TC_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_12
LBB0_11:
	mov	w3, #0
	b	LBB0_13
LBB0_12:
	mov	x3, x0
LBB0_13:
	mov	x0, x3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_fcc_tbl,4,2                    ; @fcc_tbl
	.comm	_CFG_CHARGE_CURRENT,4,2         ; @CFG_CHARGE_CURRENT
	.comm	_CFG_CHARGE_CURRENT_FCC_MASK,4,2 ; @CFG_CHARGE_CURRENT_FCC_MASK
	.comm	_CFG_CHARGE_CURRENT_FCC_SHIFT,4,2 ; @CFG_CHARGE_CURRENT_FCC_SHIFT
	.comm	_pcc_tbl,4,2                    ; @pcc_tbl
	.comm	_CFG_CHARGE_CURRENT_PCC_MASK,4,2 ; @CFG_CHARGE_CURRENT_PCC_MASK
	.comm	_CFG_CHARGE_CURRENT_PCC_SHIFT,4,2 ; @CFG_CHARGE_CURRENT_PCC_SHIFT
	.comm	_tc_tbl,4,2                     ; @tc_tbl
	.comm	_CFG_CHARGE_CURRENT_TC_MASK,4,2 ; @CFG_CHARGE_CURRENT_TC_MASK
	.no_dead_strip	_smb347_set_charge_current
.subsections_via_symbols
