	.file	"extr_max8973-regulator.c_find_voltage_set_register.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	find_voltage_set_register, @function
find_voltage_set_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movsx	r8, DWORD PTR MAX8973_MAX_VOUT_REG[rip]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	r9, QWORD PTR [rdi]
	lea	ebp, -1[r8]
	mov	ebx, DWORD PTR -4[r9+r8*4]
	test	r8d, r8d
	jle	.L6
	mov	r10, QWORD PTR 8[rdi]
	mov	r11d, ebp
	xor	eax, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rdi, 1[rax]
	cmp	rax, r11
	je	.L6
	mov	rax, rdi
.L3:
	movsx	r8, DWORD PTR [r9+rax*4]
	cmp	DWORD PTR [r10+r8*4], esi
	jne	.L12
	mov	ebp, eax
	mov	ebx, r8d
	mov	r8d, 1
	test	ebp, ebp
	jg	.L13
.L4:
	mov	DWORD PTR [r9], ebx
	mov	eax, r8d
	mov	DWORD PTR [rcx], ebx
	add	ebx, DWORD PTR MAX8973_VOUT[rip]
	mov	DWORD PTR [rdx], ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
.L2:
	endbr64
	xor	r8d, r8d
	test	ebp, ebp
	jle	.L4
.L13:
	movsx	rsi, ebp
	sal	rsi, 2
	lea	rdi, -4[r9+rsi]
	lea	rax, [r9+rsi]
	lea	esi, -1[rbp]
	sal	rsi, 2
	sub	rdi, rsi
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR -4[rax]
	sub	rax, 4
	mov	DWORD PTR 4[rax], esi
	cmp	rdi, rax
	jne	.L5
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	find_voltage_set_register, .-find_voltage_set_register
	.comm	MAX8973_VOUT,4,4
	.comm	MAX8973_MAX_VOUT_REG,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_max8973-regulator.c_find_voltage_set_register.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_voltage_set_register, %function
find_voltage_set_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, .L14
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r7, [ip]
	ldr	r6, [r0]
	sub	ip, r7, #-1073741823
	cmp	r7, #0
	ldr	r9, [r6, ip, lsl #2]
	sub	ip, r7, #1
	ble	.L6
	ldr	r8, [r0, #4]
	mov	lr, #0
	sub	r0, r6, #4
	b	.L3
.L12:
	add	lr, lr, #1
	cmp	r7, lr
	beq	.L6
.L3:
	ldr	r4, [r0, #4]!
	ldr	r5, [r8, r4, lsl #2]
	cmp	r5, r1
	bne	.L12
	mov	ip, lr
	cmp	ip, #0
	mov	r9, r4
	mov	r0, #1
	bgt	.L13
.L4:
	ldr	r1, .L14+4
	str	r9, [r6]
	str	r9, [r3]
	ldr	r3, [r1]
	add	r9, r3, r9
	str	r9, [r2]
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L6:
.L2:
	cmp	ip, #0
	mov	r0, #0
	ble	.L4
.L13:
	add	r1, r6, ip, lsl #2
.L5:
	ldr	ip, [r1, #-4]
	str	ip, [r1], #-4
	cmp	r6, r1
	bne	.L5
	b	.L4
.L15:
	.align	2
.L14:
	.word	MAX8973_MAX_VOUT_REG
	.word	MAX8973_VOUT
	.size	find_voltage_set_register, .-find_voltage_set_register
	.comm	MAX8973_VOUT,4,4
	.comm	MAX8973_MAX_VOUT_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
