user: Converte this assembly snippet into its equivalent C code:

```asm
<get_extreme_sols>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %esi,%r15d
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  movslq %edx,%r12
  push   %rbx
  lea    0x0(,%r12,8),%rdx
  mov    %r12,%rdi
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0xf(%rdx),%rax
  mov    %rsp,%rsi
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L188
L215:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L215
L188:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L253
L146:
  mov    %edi,%esi
  mov    %rdx,-0x48(%rbp)
  mov    %rsp,%rbx
  call   <new_matrix_double@plt>
  mov    %rsp,%rsi
  mov    -0x48(%rbp),%rdx
  mov    %rax,%r8
  lea    0xf(,%r12,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L217
L19:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L19
L217:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L15
L213:
  mov    %rsp,%r13
  test   %r12,%r12
  je     L20
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %r8,-0x48(%rbp)
  call   <memset@plt>
  movslq %r15d,%rsi
  mov    -0x48(%rbp),%r8
  test   %rsi,%rsi
  je     L85
  lea    -0x1(%rsi),%r9
  mov    $0x1,%edi
  xor    %ecx,%ecx
  cmp    $0x2,%r15d
  jbe    L72
L12:
  mov    (%r14,%rcx,8),%r10
  mov    (%r14,%rdi,8),%rdx
  xor    %eax,%eax
  nopl   0x0(%rax)
L92:
  movsd  (%r10,%rax,8),%xmm0
  comisd (%rbx,%rax,8),%xmm0
  jbe    L251
  mov    %ecx,0x0(%r13,%rax,4)
  movsd  %xmm0,(%rbx,%rax,8)
L251:
  movsd  (%rdx,%rax,8),%xmm0
  comisd (%rbx,%rax,8),%xmm0
  jbe    L143
  mov    %edi,0x0(%r13,%rax,4)
  movsd  %xmm0,(%rbx,%rax,8)
L143:
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L92
  add    $0x2,%rdi
  add    $0x2,%rcx
  cmp    %r9,%rdi
  jb     L12
  nopl   0x0(%rax,%rax,1)
L72:
  mov    (%r14,%rcx,8),%rdx
  xor    %eax,%eax
  xchg   %ax,%ax
L236:
  movsd  (%rdx,%rax,8),%xmm0
  comisd (%rbx,%rax,8),%xmm0
  jbe    L105
  mov    %ecx,0x0(%r13,%rax,4)
  movsd  %xmm0,(%rbx,%rax,8)
L105:
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L236
  add    $0x1,%rcx
  cmp    %rcx,%rsi
  ja     L72
L85:
  mov    %r12,%rdi
  mov    %r12,%r11
  lea    -0x1(%r12),%r10
  xor    %r9d,%r9d
  shr    %rdi
  and    $0xfffffffffffffffe,%r11
  shl    $0x4,%rdi
  lea    0x0(,%r11,8),%rsi
  nopl   0x0(%rax)
L172:
  movslq 0x0(%r13,%r9,4),%rax
  mov    (%r8,%r9,8),%rcx
  mov    (%r14,%rax,8),%rdx
  cmp    $0x2,%r10
  jbe    L179
  lea    0x8(%rdx),%rbx
  xor    %eax,%eax
  cmp    %rbx,%rcx
  je     L179
  xchg   %ax,%ax
L11:
  movupd (%rdx,%rax,1),%xmm1
  movups %xmm1,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdi
  jne    L11
  cmp    %r11,%r12
  je     L94
  movsd  (%rdx,%rsi,1),%xmm0
  movsd  %xmm0,(%rcx,%rsi,1)
L94:
  add    $0x1,%r9
  cmp    %r9,%r12
  jne    L172
L20:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L234
  lea    -0x28(%rbp),%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L253:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L146
  cs nopw 0x0(%rax,%rax,1)
L179:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L59:
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L59
  jmp    L94
L15:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L213
L234:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
double **get_extreme_sols(double **front, int frontlen, int vlen) {
  size_t i, j;
  double max_fit[vlen], cur_fit;
  double **extreme_sols = new_matrix_double(vlen, vlen);
  int positions[vlen];
  for (i = 0; i < vlen; i++) {
    max_fit[i] = 0;
  }
  for (i = 0; i < frontlen; i++) {
    for (j = 0; j < vlen; j++) {
      cur_fit = front[i][j];
      if (cur_fit > max_fit[j]) {
        max_fit[j] = cur_fit;
        positions[j] = i;
      }
    }
  }
  for (i = 0; i < vlen; i++) {
    for (j = 0; j < vlen; j++) {
      extreme_sols[i][j] = front[positions[i]][j];
    }
  }
  return (extreme_sols);
}
```