	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq25890_find_idx
_bq25890_find_idx:                      ## @bq25890_find_idx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_TBL_TREG@GOTPCREL(%rip), %rax
	movq	_bq25890_tables@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%esi, %edx
	cmpl	%esi, (%rax)
	jbe	LBB0_1
## %bb.6:
	shlq	$5, %rdx
	movl	(%rcx,%rdx), %eax
	movslq	4(%rcx,%rdx), %rsi
	subl	%esi, %eax
	movslq	8(%rcx,%rdx), %rcx
	cltd
	idivl	%ecx
	movl	%eax, %edx
	incl	%edx
	movl	$1, %eax
	cmpl	$2, %edx
	jb	LBB0_11
## %bb.7:
	movslq	%edx, %rdx
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rcx, %rsi
	cmpq	%rdi, %rsi
	ja	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	cmpq	%rax, %rdx
	jne	LBB0_8
## %bb.10:
	movq	%rdx, %rax
	jmp	LBB0_11
LBB0_1:
	shlq	$5, %rdx
	movq	24(%rcx,%rdx), %rsi
	movl	$1, %eax
	cmpq	$2, %rsi
	jb	LBB0_11
## %bb.2:
	movq	16(%rcx,%rdx), %rcx
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, (%rcx,%rax,8)
	ja	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
	cmpq	%rax, %rsi
	jne	LBB0_3
## %bb.5:
	movq	%rsi, %rax
LBB0_11:
	decq	%rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TBL_TREG,4,2                   ## @TBL_TREG
	.comm	_bq25890_tables,8,3             ## @bq25890_tables
	.no_dead_strip	_bq25890_find_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq25890_find_idx
_bq25890_find_idx:                      ; @bq25890_find_idx
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _TBL_TREG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TBL_TREG@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
Lloh3:
	adrp	x8, _bq25890_tables@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bq25890_tables@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, w1
	add	x8, x8, x9, lsl #5
	cmp	w10, w1
	b.ls	LBB0_7
; %bb.1:
	ldp	w10, w9, [x8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	sub	w11, w10, w9
	ldrsw	x10, [x8, #8]
	sdiv	w8, w11, w10
	add	w8, w8, #1
	cmp	w8, #2
	b.lo	LBB0_12
; %bb.2:
	sxtw	x11, w8
	mov	w8, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x9, x9, x10
	cmp	x9, x0
	b.hi	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	cmp	x11, x8
	b.ne	LBB0_3
; %bb.5:
	mov	x8, x11
LBB0_6:
	sub	x0, x8, #1
	ret
LBB0_7:
	ldr	x9, [x8, #24]
	cmp	x9, #2
	b.lo	LBB0_12
; %bb.8:
	ldr	x10, [x8, #16]
	mov	w8, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x8, lsl #3]
	cmp	x11, x0
	b.hi	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.11:
	sub	x0, x9, #1
	ret
LBB0_12:
	mov	w8, #1
	sub	x0, x8, #1
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TBL_TREG,4,2                   ; @TBL_TREG
	.comm	_bq25890_tables,8,3             ; @bq25890_tables
	.no_dead_strip	_bq25890_find_idx
.subsections_via_symbols
