	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc2731_charger_get_current_limit
_sc2731_charger_get_current_limit:      ## @sc2731_charger_get_current_limit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	8(%rdi), %eax
	movq	_SC2731_CHG_CFG5@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rdi), %rsi
	leaq	-12(%rbp), %rdx
	movl	%eax, %edi
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	_SC2731_CUR_LIMIT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	movq	_SC2731_CUR_LIMIT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cmpl	$3, %eax
	ja	LBB0_8
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	_SC2731_CURRENT_LIMIT_100@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	movq	_SC2731_CURRENT_LIMIT_2000@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_SC2731_CURRENT_LIMIT_900@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	movq	_SC2731_CURRENT_LIMIT_500@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_SC2731_CHG_CFG5,8,3            ## @SC2731_CHG_CFG5
	.comm	_SC2731_CUR_LIMIT_MASK,4,2      ## @SC2731_CUR_LIMIT_MASK
	.comm	_SC2731_CUR_LIMIT_SHIFT,4,2     ## @SC2731_CUR_LIMIT_SHIFT
	.comm	_SC2731_CURRENT_LIMIT_100,4,2   ## @SC2731_CURRENT_LIMIT_100
	.comm	_SC2731_CURRENT_LIMIT_2000,4,2  ## @SC2731_CURRENT_LIMIT_2000
	.comm	_SC2731_CURRENT_LIMIT_900,4,2   ## @SC2731_CURRENT_LIMIT_900
	.comm	_SC2731_CURRENT_LIMIT_500,4,2   ## @SC2731_CURRENT_LIMIT_500
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sc2731_charger_get_current_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc2731_charger_get_current_limit
_sc2731_charger_get_current_limit:      ; @sc2731_charger_get_current_limit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	w8, [x0, #8]
	ldr	x9, [x0]
Lloh0:
	adrp	x10, _SC2731_CHG_CFG5@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SC2731_CHG_CFG5@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x1, x10, x9
	add	x2, sp, #12
	mov	x0, x8
	bl	_regmap_read
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _SC2731_CUR_LIMIT_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SC2731_CUR_LIMIT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _SC2731_CUR_LIMIT_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SC2731_CUR_LIMIT_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.2:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	w0, #0
Lloh11:
	adrp	x8, _SC2731_CURRENT_LIMIT_100@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SC2731_CURRENT_LIMIT_100@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	w0, #0
Lloh16:
	adrp	x8, _SC2731_CURRENT_LIMIT_2000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SC2731_CURRENT_LIMIT_2000@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	w0, #0
Lloh18:
	adrp	x8, _SC2731_CURRENT_LIMIT_900@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SC2731_CURRENT_LIMIT_900@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
Lloh20:
	adrp	x8, _SC2731_CURRENT_LIMIT_500@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SC2731_CURRENT_LIMIT_500@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
                                        ; -- End function
	.comm	_SC2731_CHG_CFG5,8,3            ; @SC2731_CHG_CFG5
	.comm	_SC2731_CUR_LIMIT_MASK,4,2      ; @SC2731_CUR_LIMIT_MASK
	.comm	_SC2731_CUR_LIMIT_SHIFT,4,2     ; @SC2731_CUR_LIMIT_SHIFT
	.comm	_SC2731_CURRENT_LIMIT_100,4,2   ; @SC2731_CURRENT_LIMIT_100
	.comm	_SC2731_CURRENT_LIMIT_2000,4,2  ; @SC2731_CURRENT_LIMIT_2000
	.comm	_SC2731_CURRENT_LIMIT_900,4,2   ; @SC2731_CURRENT_LIMIT_900
	.comm	_SC2731_CURRENT_LIMIT_500,4,2   ; @SC2731_CURRENT_LIMIT_500
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sc2731_charger_get_current_limit
.subsections_via_symbols
