	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function act8945a_get_charge_type
_act8945a_get_charge_type:              ## @act8945a_get_charge_type
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_ACT8945A_APCH_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	_ACT8945A_APCH_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	_APCH_STATE_CSTATE@GOTPCREL(%rip), %rcx
	movl	-20(%rbp), %eax
	andl	(%rcx), %eax
	movq	_APCH_STATE_CSTATE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_3
## %bb.6:
	cltq
	leaq	l_switch.table.act8945a_get_charge_type(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_APCH_STATUS_INDAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -24(%rbp)
	jne	LBB0_4
## %bb.5:
	movq	_POWER_SUPPLY_CHARGE_TYPE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_POWER_SUPPLY_CHARGE_TYPE_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACT8945A_APCH_STATUS,4,2       ## @ACT8945A_APCH_STATUS
	.comm	_ACT8945A_APCH_STATE,4,2        ## @ACT8945A_APCH_STATE
	.comm	_APCH_STATE_CSTATE,4,2          ## @APCH_STATE_CSTATE
	.comm	_APCH_STATE_CSTATE_SHIFT,4,2    ## @APCH_STATE_CSTATE_SHIFT
	.comm	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_TRICKLE
	.comm	_POWER_SUPPLY_CHARGE_TYPE_FAST,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_FAST
	.comm	_POWER_SUPPLY_CHARGE_TYPE_NONE,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_NONE
	.comm	_APCH_STATUS_INDAT,4,2          ## @APCH_STATUS_INDAT
	.comm	_POWER_SUPPLY_CHARGE_TYPE_UNKNOWN,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_UNKNOWN
	.no_dead_strip	_act8945a_get_charge_type
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.act8945a_get_charge_type
l_switch.table.act8945a_get_charge_type:
	.quad	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE
	.quad	_POWER_SUPPLY_CHARGE_TYPE_FAST
	.quad	_POWER_SUPPLY_CHARGE_TYPE_NONE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function act8945a_get_charge_type
_act8945a_get_charge_type:              ; @act8945a_get_charge_type
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _ACT8945A_APCH_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACT8945A_APCH_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _ACT8945A_APCH_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACT8945A_APCH_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _APCH_STATE_CSTATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APCH_STATE_CSTATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	and	w8, w9, w8
Lloh9:
	adrp	x9, _APCH_STATE_CSTATE_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _APCH_STATE_CSTATE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.3:
Lloh12:
	adrp	x9, l_switch.table.act8945a_get_charge_type@PAGE
Lloh13:
	add	x9, x9, l_switch.table.act8945a_get_charge_type@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
	ldr	w8, [sp, #12]
Lloh14:
	adrp	x9, _APCH_STATUS_INDAT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _APCH_STATUS_INDAT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _POWER_SUPPLY_CHARGE_TYPE_UNKNOWN@GOTPAGE
Lloh18:
	ldr	x10, [x10, _POWER_SUPPLY_CHARGE_TYPE_UNKNOWN@GOTPAGEOFF]
Lloh19:
	adrp	x11, _POWER_SUPPLY_CHARGE_TYPE_NONE@GOTPAGE
Lloh20:
	ldr	x11, [x11, _POWER_SUPPLY_CHARGE_TYPE_NONE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
LBB0_5:
	mov	w0, #0
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_6:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ACT8945A_APCH_STATUS,4,2       ; @ACT8945A_APCH_STATUS
	.comm	_ACT8945A_APCH_STATE,4,2        ; @ACT8945A_APCH_STATE
	.comm	_APCH_STATE_CSTATE,4,2          ; @APCH_STATE_CSTATE
	.comm	_APCH_STATE_CSTATE_SHIFT,4,2    ; @APCH_STATE_CSTATE_SHIFT
	.comm	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_TRICKLE
	.comm	_POWER_SUPPLY_CHARGE_TYPE_FAST,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_FAST
	.comm	_POWER_SUPPLY_CHARGE_TYPE_NONE,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_NONE
	.comm	_APCH_STATUS_INDAT,4,2          ; @APCH_STATUS_INDAT
	.comm	_POWER_SUPPLY_CHARGE_TYPE_UNKNOWN,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_UNKNOWN
	.no_dead_strip	_act8945a_get_charge_type
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.act8945a_get_charge_type
l_switch.table.act8945a_get_charge_type:
	.quad	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE
	.quad	_POWER_SUPPLY_CHARGE_TYPE_FAST
	.quad	_POWER_SUPPLY_CHARGE_TYPE_NONE

.subsections_via_symbols
