	.file	"extr_ab3100.c_ab3100_get_best_voltage_index.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"requested %d<=x<=%d uV, out of range!\n"
	.text
	.p2align 4
	.type	ab3100_get_best_voltage_index, @function
ab3100_get_best_voltage_index:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rcx, QWORD PTR 8[rdi]
	mov	r9d, DWORD PTR INT_MAX[rip]
	mov	eax, DWORD PTR [rcx]
	test	eax, eax
	jle	.L2
	lea	ebx, -1[rax]
	mov	rbp, QWORD PTR 8[rcx]
	xor	eax, eax
	mov	r10d, -1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, r8
.L5:
	mov	r8d, DWORD PTR 0[rbp+rax*4]
	cmp	r8d, esi
	setge	cl
	cmp	r8d, edx
	setle	r11b
	test	cl, r11b
	je	.L3
	cmp	r8d, r9d
	cmovl	r10d, eax
	cmovl	r9d, r8d
.L3:
	lea	r8, 1[rax]
	cmp	rbx, rax
	jne	.L8
	cmp	r10d, -1
	je	.L2
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r10d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	ecx, edx
	mov	edx, esi
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
	mov	r10d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	r10d
	mov	eax, r10d
	ret
	.cfi_endproc
.LFE0:
	.size	ab3100_get_best_voltage_index, .-ab3100_get_best_voltage_index
	.comm	INT_MAX,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ab3100.c_ab3100_get_best_voltage_index.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"requested %d<=x<=%d uV, out of range!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ab3100_get_best_voltage_index, %function
ab3100_get_best_voltage_index:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, [r0, #4]
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [ip]
	mov	r7, r0
	ldr	r0, .L10
	cmp	r3, #0
	ldr	r5, [r0]
	ble	.L2
	mvn	r0, #0
	mov	lr, #0
	ldr	r6, [ip, #4]
	sub	r6, r6, #4
.L4:
	ldr	ip, [r6, #4]!
	cmp	ip, r1
	movlt	r4, #0
	movge	r4, #1
	cmp	ip, r2
	movgt	r4, #0
	cmp	ip, r5
	movge	r4, #0
	andlt	r4, r4, #1
	cmp	r4, #0
	movne	r0, lr
	add	lr, lr, #1
	movne	r5, ip
	cmp	lr, r3
	bne	.L4
	cmn	r0, #1
	popne	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r3, r2
	mov	r0, r7
	mov	r2, r1
	ldr	r1, .L10+4
	bl	dev_warn
	ldr	r3, .L10+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	INT_MAX
	.word	.LC0
	.word	EINVAL
	.size	ab3100_get_best_voltage_index, .-ab3100_get_best_voltage_index
	.comm	INT_MAX,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
