	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc2731_charger_set_current
_sc2731_charger_set_current:            ## @sc2731_charger_set_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	%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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_SC2731_CURRENT_LIMIT_2000@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_SC2731_CURRENT_PRECHG@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_SC2731_CURRENT_STEP@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	8(%rdi), %edi
	movq	_SC2731_CHG_CFG0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movq	_SC2731_PRECHG_RNG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SC2731_PRECHG_RNG_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$3, %eax
	shll	%cl, %eax
	movslq	%eax, %rcx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_1
## %bb.5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	%r14, %r13
	movq	%r14, %rax
	cmovgq	%r13, %rax
	cmpq	%r14, %r12
	cmovlq	%r12, %rax
	subq	%r13, %rax
	movq	%rax, %rcx
	orq	%r15, %rcx
	shrq	$32, %rcx
	je	LBB0_2
## %bb.3:
	cqto
	idivq	%r15
	movq	%rax, %rcx
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %ecx
LBB0_4:
	movl	8(%rbx), %edi
	movq	_SC2731_CHG_CFG1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movq	_SC2731_CUR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SC2731_CURRENT_LIMIT_2000,8,3  ## @SC2731_CURRENT_LIMIT_2000
	.comm	_SC2731_CURRENT_PRECHG,8,3      ## @SC2731_CURRENT_PRECHG
	.comm	_SC2731_CURRENT_STEP,8,3        ## @SC2731_CURRENT_STEP
	.comm	_SC2731_CHG_CFG0,8,3            ## @SC2731_CHG_CFG0
	.comm	_SC2731_PRECHG_RNG_MASK,4,2     ## @SC2731_PRECHG_RNG_MASK
	.comm	_SC2731_PRECHG_RNG_SHIFT,4,2    ## @SC2731_PRECHG_RNG_SHIFT
	.comm	_SC2731_CHG_CFG1,8,3            ## @SC2731_CHG_CFG1
	.comm	_SC2731_CUR_MASK,4,2            ## @SC2731_CUR_MASK
	.no_dead_strip	_sc2731_charger_set_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc2731_charger_set_current
_sc2731_charger_set_current:            ; @sc2731_charger_set_current
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SC2731_CURRENT_LIMIT_2000@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SC2731_CURRENT_LIMIT_2000@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _SC2731_CURRENT_PRECHG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SC2731_CURRENT_PRECHG@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
Lloh6:
	adrp	x8, _SC2731_CURRENT_STEP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SC2731_CURRENT_STEP@GOTPAGEOFF]
Lloh8:
	ldr	x23, [x8]
	ldr	w0, [x0, #8]
Lloh9:
	adrp	x8, _SC2731_CHG_CFG0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SC2731_CHG_CFG0@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh11:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh12:
	adrp	x8, _SC2731_PRECHG_RNG_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SC2731_PRECHG_RNG_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _SC2731_PRECHG_RNG_SHIFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SC2731_PRECHG_RNG_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	mov	w9, #3
	lsl	w8, w9, w8
	sxtw	x3, w8
	bl	_regmap_update_bits
	cbz	w0, LBB0_2
; %bb.1:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	cmp	x22, x20
	csel	x8, x22, x20, gt
	cmp	x21, x20
	csel	x8, x21, x8, lt
	sub	x8, x8, x22
	sdiv	x3, x8, x23
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _SC2731_CHG_CFG1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SC2731_CHG_CFG1@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
Lloh21:
	adrp	x10, _SC2731_CUR_MASK@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SC2731_CUR_MASK@GOTPAGEOFF]
	add	x1, x9, x8
Lloh23:
	ldr	w2, [x10]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_regmap_update_bits
	.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
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SC2731_CURRENT_LIMIT_2000,8,3  ; @SC2731_CURRENT_LIMIT_2000
	.comm	_SC2731_CURRENT_PRECHG,8,3      ; @SC2731_CURRENT_PRECHG
	.comm	_SC2731_CURRENT_STEP,8,3        ; @SC2731_CURRENT_STEP
	.comm	_SC2731_CHG_CFG0,8,3            ; @SC2731_CHG_CFG0
	.comm	_SC2731_PRECHG_RNG_MASK,4,2     ; @SC2731_PRECHG_RNG_MASK
	.comm	_SC2731_PRECHG_RNG_SHIFT,4,2    ; @SC2731_PRECHG_RNG_SHIFT
	.comm	_SC2731_CHG_CFG1,8,3            ; @SC2731_CHG_CFG1
	.comm	_SC2731_CUR_MASK,4,2            ; @SC2731_CUR_MASK
	.no_dead_strip	_sc2731_charger_set_current
.subsections_via_symbols
