	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_volt_to_regval
_ab8500_volt_to_regval:                 ## @ab8500_volt_to_regval
	.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
	movl	%edi, %r14d
	movq	_ab8500_fg_lowbat_voltage_map@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	cmpl	%r14d, (%rdi)
	jle	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_2:
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r14d, (%rdi,%rbx,4)
	jg	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_6:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movslq	%eax, %rbx
LBB0_7:
	decq	%rbx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ab8500_fg_lowbat_voltage_map,8,3 ## @ab8500_fg_lowbat_voltage_map
	.no_dead_strip	_ab8500_volt_to_regval
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_volt_to_regval
_ab8500_volt_to_regval:                 ; @ab8500_volt_to_regval
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x20, _ab8500_fg_lowbat_voltage_map@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ab8500_fg_lowbat_voltage_map@GOTPAGEOFF]
	ldr	x0, [x20]
	ldr	w8, [x0]
	cmp	w8, w19
	b.le	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_8
LBB0_2:
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w8, [x0, x21, lsl #2]
	cmp	w8, w19
	b.gt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x0, x8, #1
	b	LBB0_8
LBB0_7:
	sub	x0, x21, #1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ab8500_fg_lowbat_voltage_map,8,3 ; @ab8500_fg_lowbat_voltage_map
	.no_dead_strip	_ab8500_volt_to_regval
.subsections_via_symbols
