	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd70528_get_charger_status
_bd70528_get_charger_status:            ## @bd70528_get_charger_status
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	movq	_BD70528_REG_CHG_CURR_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	jmp	LBB0_9
LBB0_2:
	movq	_BD70528_MASK_CHG_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-28(%rbp), %eax
	addl	$-128, %eax
	cmpl	$11, %eax
	ja	LBB0_7
## %bb.3:
	movl	$2535, %ecx                     ## imm = 0x9E7
	btl	%eax, %ecx
	jae	LBB0_4
## %bb.10:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movl	$536, %ecx                      ## imm = 0x218
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.6:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BD70528_REG_CHG_CURR_STAT,4,2  ## @BD70528_REG_CHG_CURR_STAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Charger state read failure %d\n"

	.comm	_BD70528_MASK_CHG_STAT,4,2      ## @BD70528_MASK_CHG_STAT
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.no_dead_strip	_bd70528_get_charger_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bd70528_get_charger_status
_bd70528_get_charger_status:            ; @bd70528_get_charger_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _BD70528_REG_CHG_CURR_STAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BD70528_REG_CHG_CURR_STAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_10
LBB0_2:
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _BD70528_MASK_CHG_STAT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BD70528_MASK_CHG_STAT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w8, w8, #128
	cmp	w8, #11
	b.hi	LBB0_7
; %bb.3:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #2535
	tst	w8, w9
	b.eq	LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	w9, #536
	tst	w8, w9
	b.eq	LBB0_8
; %bb.6:
Lloh10:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BD70528_REG_CHG_CURR_STAT,4,2  ; @BD70528_REG_CHG_CURR_STAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Charger state read failure %d\n"

	.comm	_BD70528_MASK_CHG_STAT,4,2      ; @BD70528_MASK_CHG_STAT
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.no_dead_strip	_bd70528_get_charger_status
.subsections_via_symbols
