// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::nearest_vertex(float*, int, int, int, int)
int ImageProc::nearest_vertex(float distance[8], int i, int j, int k, int l)
{
	if 		(distance[i] < distance[j] && distance[i] < distance[k] && distance[i] < distance[l])	return i;
	else if (distance[j] < distance[i] && distance[i] < distance[k] && distance[i] < distance[l])	return j;
	else if (distance[k] < distance[i] && distance[i] < distance[j] && distance[i] < distance[l])	return k;
	else if (distance[l] < distance[i] && distance[i] < distance[j] && distance[i] < distance[k])	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1605d
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1605d
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1605d
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16197
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x160c5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x160c5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x160c5
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16197
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1612a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1612a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1612a
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16197
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1618f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1618f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1618f
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16197
jmp 0x16191
jmp 0x16193
jmp 0x16195
ud2
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)