	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_fg_capacity_level
_ab8500_fg_capacity_level:              ## @ab8500_fg_capacity_level
	.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	%rdi, %rbx
	movl	16(%rdi), %edi
	movl	$10, %esi
	callq	_DIV_ROUND_CLOSEST
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPCREL(%rip), %rcx
	cmpl	(%rdx), %eax
	jle	LBB0_9
## %bb.1:
	cmpq	$0, 8(%rbx)
	jne	LBB0_9
## %bb.2:
	cmpl	4(%rdx), %eax
	jle	LBB0_3
## %bb.4:
	cmpl	8(%rdx), %eax
	jle	LBB0_5
## %bb.6:
	cmpl	12(%rdx), %eax
	jle	LBB0_7
## %bb.8:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_3:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_5:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_HIGH@GOTPCREL(%rip), %rcx
LBB0_9:
	movl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_LOW,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_HIGH,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_HIGH
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_FULL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.no_dead_strip	_ab8500_fg_capacity_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_fg_capacity_level
_ab8500_fg_capacity_level:              ; @ab8500_fg_capacity_level
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
	mov	w1, #10
	bl	_DIV_ROUND_CLOSEST
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w0, w9
	b.le	LBB0_2
; %bb.1:
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w9, [x8, #4]
	cmp	w0, w9
	b.le	LBB0_7
; %bb.5:
	ldr	w9, [x8, #8]
	cmp	w0, w9
	b.le	LBB0_8
; %bb.6:
	ldr	w8, [x8, #12]
Lloh2:
	adrp	x9, _POWER_SUPPLY_CAPACITY_LEVEL_HIGH@GOTPAGE
Lloh3:
	ldr	x9, [x9, _POWER_SUPPLY_CAPACITY_LEVEL_HIGH@GOTPAGEOFF]
Lloh4:
	adrp	x10, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGE
Lloh5:
	ldr	x10, [x10, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGEOFF]
	cmp	w0, w8
	csel	x8, x10, x9, gt
	b	LBB0_3
LBB0_7:
Lloh6:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPAGEOFF]
	b	LBB0_3
LBB0_8:
Lloh8:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_LOW,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_HIGH,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_HIGH
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_FULL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.no_dead_strip	_ab8500_fg_capacity_level
.subsections_via_symbols
