	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt9455_charger_get_status
_rt9455_charger_get_status:             ## @rt9455_charger_get_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, %r15
	movq	8(%rdi), %rax
	movq	_F_PWR_RDY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	-28(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_14
LBB0_2:
	cmpl	$0, -28(%rbp)
	je	LBB0_3
## %bb.4:
	movq	8(%r15), %rax
	movq	_F_STAT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	-32(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_14
LBB0_3:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	je	LBB0_11
## %bb.7:
	cmpl	$1, %eax
	je	LBB0_10
## %bb.8:
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_F_PWR_RDY,8,3                  ## @F_PWR_RDY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read PWR_RDY bit\n"

	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_F_STAT,8,3                     ## @F_STAT
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read STAT bits\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt9455_charger_get_status
_rt9455_charger_get_status:             ; @rt9455_charger_get_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	x8, [x0, #8]
Lloh0:
	adrp	x9, _F_PWR_RDY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _F_PWR_RDY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	add	x1, sp, #8
	bl	_regmap_field_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_2:
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_5
; %bb.3:
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _F_STAT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _F_STAT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	add	x1, sp, #12
	bl	_regmap_field_read
	cbz	w0, LBB0_8
; %bb.4:
	mov	x19, x0
	ldr	x0, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_5:
	mov	w19, #0
Lloh10:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_7:
	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
LBB0_8:
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #1
	b.eq	LBB0_13
; %bb.10:
	mov	w19, #0
	cbnz	w8, LBB0_14
; %bb.11:
Lloh12:
	adrp	x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
	b	LBB0_6
LBB0_12:
	mov	w19, #0
Lloh14:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	b	LBB0_6
LBB0_13:
	mov	w19, #0
Lloh16:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_6
LBB0_14:
Lloh18:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_F_PWR_RDY,8,3                  ; @F_PWR_RDY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read PWR_RDY bit\n"

	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_F_STAT,8,3                     ; @F_STAT
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read STAT bits\n"

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