	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp288_charger_set_vbus_inlmt
_axp288_charger_set_vbus_inlmt:         ## @axp288_charger_set_vbus_inlmt
	.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
	cmpl	$3999999, %esi                  ## imm = 0x3D08FF
	jle	LBB0_2
## %bb.1:
	movq	_CHRG_VBUS_ILIM_4000MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_2:
	cmpl	$3499999, %esi                  ## imm = 0x3567DF
	jle	LBB0_4
## %bb.3:
	movq	_CHRG_VBUS_ILIM_3500MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_4:
	cmpl	$2999999, %esi                  ## imm = 0x2DC6BF
	jle	LBB0_6
## %bb.5:
	movq	_CHRG_VBUS_ILIM_3000MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_6:
	cmpl	$2499999, %esi                  ## imm = 0x26259F
	jle	LBB0_8
## %bb.7:
	movq	_CHRG_VBUS_ILIM_2500MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_8:
	cmpl	$1999999, %esi                  ## imm = 0x1E847F
	jle	LBB0_10
## %bb.9:
	movq	_CHRG_VBUS_ILIM_2000MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_10:
	cmpl	$1499999, %esi                  ## imm = 0x16E35F
	jle	LBB0_12
## %bb.11:
	movq	_CHRG_VBUS_ILIM_1500MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_12:
	cmpl	$899999, %esi                   ## imm = 0xDBB9F
	jle	LBB0_14
## %bb.13:
	movq	_CHRG_VBUS_ILIM_900MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	cmpl	$500000, %esi                   ## imm = 0x7A120
	jl	LBB0_15
## %bb.16:
	movq	_CHRG_VBUS_ILIM_500MA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_CHRG_VBUS_ILIM_100MA@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	movq	_CHRG_VBUS_ILIM_BIT_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	8(%r14), %edi
	movq	_AXP20X_CHRG_BAK_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CHRG_VBUS_ILIM_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_19
## %bb.18:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHRG_VBUS_ILIM_4000MA,4,2      ## @CHRG_VBUS_ILIM_4000MA
	.comm	_CHRG_VBUS_ILIM_BIT_POS,4,2     ## @CHRG_VBUS_ILIM_BIT_POS
	.comm	_CHRG_VBUS_ILIM_3500MA,4,2      ## @CHRG_VBUS_ILIM_3500MA
	.comm	_CHRG_VBUS_ILIM_3000MA,4,2      ## @CHRG_VBUS_ILIM_3000MA
	.comm	_CHRG_VBUS_ILIM_2500MA,4,2      ## @CHRG_VBUS_ILIM_2500MA
	.comm	_CHRG_VBUS_ILIM_2000MA,4,2      ## @CHRG_VBUS_ILIM_2000MA
	.comm	_CHRG_VBUS_ILIM_1500MA,4,2      ## @CHRG_VBUS_ILIM_1500MA
	.comm	_CHRG_VBUS_ILIM_900MA,4,2       ## @CHRG_VBUS_ILIM_900MA
	.comm	_CHRG_VBUS_ILIM_500MA,4,2       ## @CHRG_VBUS_ILIM_500MA
	.comm	_CHRG_VBUS_ILIM_100MA,4,2       ## @CHRG_VBUS_ILIM_100MA
	.comm	_AXP20X_CHRG_BAK_CTRL,4,2       ## @AXP20X_CHRG_BAK_CTRL
	.comm	_CHRG_VBUS_ILIM_MASK,4,2        ## @CHRG_VBUS_ILIM_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"charger BAK control %d\n"

	.no_dead_strip	_axp288_charger_set_vbus_inlmt
.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_vbus_inlmt
_axp288_charger_set_vbus_inlmt:         ; @axp288_charger_set_vbus_inlmt
	.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
	mov	w8, #2303
	movk	w8, #61, lsl #16
	cmp	w1, w8
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _CHRG_VBUS_ILIM_4000MA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHRG_VBUS_ILIM_4000MA@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	w8, #26591
	movk	w8, #53, lsl #16
	cmp	w1, w8
	b.le	LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _CHRG_VBUS_ILIM_3500MA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CHRG_VBUS_ILIM_3500MA@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _CHRG_VBUS_ILIM_3000MA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CHRG_VBUS_ILIM_3000MA@GOTPAGEOFF]
	mov	w9, #50879
	movk	w9, #45, lsl #16
Lloh6:
	adrp	x10, _CHRG_VBUS_ILIM_2500MA@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CHRG_VBUS_ILIM_2500MA@GOTPAGEOFF]
	mov	w11, #9631
	movk	w11, #38, lsl #16
Lloh8:
	adrp	x12, _CHRG_VBUS_ILIM_2000MA@GOTPAGE
Lloh9:
	ldr	x12, [x12, _CHRG_VBUS_ILIM_2000MA@GOTPAGEOFF]
	mov	w13, #33919
	movk	w13, #30, lsl #16
Lloh10:
	adrp	x14, _CHRG_VBUS_ILIM_1500MA@GOTPAGE
Lloh11:
	ldr	x14, [x14, _CHRG_VBUS_ILIM_1500MA@GOTPAGEOFF]
	mov	w15, #58207
	movk	w15, #22, lsl #16
Lloh12:
	adrp	x16, _CHRG_VBUS_ILIM_900MA@GOTPAGE
Lloh13:
	ldr	x16, [x16, _CHRG_VBUS_ILIM_900MA@GOTPAGEOFF]
	mov	w17, #48031
	movk	w17, #13, lsl #16
Lloh14:
	adrp	x0, _CHRG_VBUS_ILIM_100MA@GOTPAGE
Lloh15:
	ldr	x0, [x0, _CHRG_VBUS_ILIM_100MA@GOTPAGEOFF]
Lloh16:
	adrp	x2, _CHRG_VBUS_ILIM_500MA@GOTPAGE
Lloh17:
	ldr	x2, [x2, _CHRG_VBUS_ILIM_500MA@GOTPAGEOFF]
	mov	w3, #41247
	movk	w3, #7, lsl #16
	cmp	w1, w3
	csel	x0, x2, x0, gt
	cmp	w1, w17
	csel	x16, x16, x0, gt
	cmp	w1, w15
	csel	x14, x14, x16, gt
	cmp	w1, w13
	csel	x12, x12, x14, gt
	cmp	w1, w11
	csel	x10, x10, x12, gt
	cmp	w1, w9
	csel	x8, x8, x10, gt
LBB0_5:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _CHRG_VBUS_ILIM_BIT_POS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CHRG_VBUS_ILIM_BIT_POS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	lsl	w3, w8, w9
	ldr	w0, [x19, #8]
Lloh21:
	adrp	x8, _AXP20X_CHRG_BAK_CTRL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AXP20X_CHRG_BAK_CTRL@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _CHRG_VBUS_ILIM_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CHRG_VBUS_ILIM_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	mov	x20, x0
	tbz	w0, #31, LBB0_7
; %bb.6:
	ldr	x0, [x19]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CHRG_VBUS_ILIM_4000MA,4,2      ; @CHRG_VBUS_ILIM_4000MA
	.comm	_CHRG_VBUS_ILIM_BIT_POS,4,2     ; @CHRG_VBUS_ILIM_BIT_POS
	.comm	_CHRG_VBUS_ILIM_3500MA,4,2      ; @CHRG_VBUS_ILIM_3500MA
	.comm	_CHRG_VBUS_ILIM_3000MA,4,2      ; @CHRG_VBUS_ILIM_3000MA
	.comm	_CHRG_VBUS_ILIM_2500MA,4,2      ; @CHRG_VBUS_ILIM_2500MA
	.comm	_CHRG_VBUS_ILIM_2000MA,4,2      ; @CHRG_VBUS_ILIM_2000MA
	.comm	_CHRG_VBUS_ILIM_1500MA,4,2      ; @CHRG_VBUS_ILIM_1500MA
	.comm	_CHRG_VBUS_ILIM_900MA,4,2       ; @CHRG_VBUS_ILIM_900MA
	.comm	_CHRG_VBUS_ILIM_500MA,4,2       ; @CHRG_VBUS_ILIM_500MA
	.comm	_CHRG_VBUS_ILIM_100MA,4,2       ; @CHRG_VBUS_ILIM_100MA
	.comm	_AXP20X_CHRG_BAK_CTRL,4,2       ; @AXP20X_CHRG_BAK_CTRL
	.comm	_CHRG_VBUS_ILIM_MASK,4,2        ; @CHRG_VBUS_ILIM_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"charger BAK control %d\n"

	.no_dead_strip	_axp288_charger_set_vbus_inlmt
.subsections_via_symbols
