	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max17040_get_status
_max17040_get_status:                   ## @max17040_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	movq	16(%rax), %rdx
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rax
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.1:
	movq	8(%rdx), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.2:
	cmpq	$0, (%rdx)
	je	LBB0_10
## %bb.3:
	xorl	%eax, %eax
	callq	*%rcx
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	16(%rbx), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rax
	movq	_MAX17040_BATTERY_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_11
## %bb.9:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_MAX17040_BATTERY_FULL,8,3      ## @MAX17040_BATTERY_FULL
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.no_dead_strip	_max17040_get_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max17040_get_status
_max17040_get_status:                   ; @max17040_get_status
	.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
	bl	_i2c_get_clientdata
	mov	x19, x0
	ldr	x9, [x0, #16]
	cbz	x9, LBB0_5
; %bb.1:
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x9, [x9]
	cbz	x9, LBB0_5
; %bb.3:
	blr	x8
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	blr	x8
Lloh0:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
Lloh2:
	adrp	x9, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_9
LBB0_5:
Lloh4:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh6:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _MAX17040_BATTERY_FULL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX17040_BATTERY_FULL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.10:
Lloh11:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_MAX17040_BATTERY_FULL,8,3      ; @MAX17040_BATTERY_FULL
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.no_dead_strip	_max17040_get_status
.subsections_via_symbols
