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

```asm
<simplex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  lea    (%rsi,%rdi,1),%r13d
  push   %r12
  push   %rbx
  mov    %esi,%ebx
  sub    $0x48,%rsp
  mov    %rdx,-0x70(%rbp)
  lea    0x1(%rdi),%edx
  mov    %r9,-0x50(%rbp)
  lea    0x1(%r13),%r9d
  imul   %r9,%rdx
  mov    %rcx,-0x60(%rbp)
  mov    %edi,-0x44(%rbp)
  mov    %r8,-0x58(%rbp)
  lea    0xf(,%rdx,4),%rdx
  mov    %rdx,%rcx
  and    $0xfffffffffffff000,%rdx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %esi,%eax
  mov    %rsp,%rsi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdx,%rsi
  mov    %rax,-0x68(%rbp)
  mov    %r9,%rax
  cmp    %rsi,%rsp
  je     L49
L80:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L80
L49:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L95
L32:
  mov    -0x68(%rbp),%rdi
  mov    %rsp,%r12
  xor    %r14d,%r14d
  xor    %esi,%esi
  lea    0x0(,%rdi,4),%r10
  test   %eax,%eax
  je     L77
  mov    -0x44(%rbp),%r11d
  movss  D6(%rip),%xmm2
  pxor   %xmm1,%xmm1
  movss  D15(%rip),%xmm3
  nopl   (%rax)
L185:
  movaps %xmm1,%xmm0
  cmp    %esi,%ebx
  jbe    L200
  mov    -0x60(%rbp),%rax
  movss  (%rax,%r14,1),%xmm0
  xorps  %xmm3,%xmm0
L200:
  mov    -0x50(%rbp),%rax
  mov    %esi,%r15d
  movss  %xmm0,(%r12,%r14,1)
  xor    %edx,%edx
  mov    %esi,%r8d
  sub    %ebx,%r15d
  lea    (%rax,%r14,1),%rcx
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jne    L72
  jmp    L50
  cs nopw 0x0(%rax,%rax,1)
L75:
  movss  (%rcx),%xmm0
L126:
  imul   %r9,%rax
  add    $0x1,%rdx
  add    %r10,%rcx
  add    %r8,%rax
  movss  %xmm0,(%r12,%rax,4)
  cmp    %rdx,%r11
  je     L50
L72:
  lea    0x1(%rdx),%eax
  cmp    %esi,%ebx
  ja     L75
  cmp    %esi,%r13d
  je     L151
  movaps %xmm1,%xmm0
  cmp    %r15d,%edx
  jne    L126
  movaps %xmm2,%xmm0
  jmp    L126
  cs nopw 0x0(%rax,%rax,1)
L50:
  lea    0x1(%rsi),%eax
  add    $0x4,%r14
  cmp    %esi,%r13d
  je     L77
  mov    %eax,%esi
  jmp    L185
  nopl   0x0(%rax,%rax,1)
L151:
  mov    -0x58(%rbp),%rdi
  movss  (%rdi,%rdx,4),%xmm0
  jmp    L126
  nopl   0x0(%rax,%rax,1)
L77:
  mov    -0x44(%rbp),%edi
  mov    %r12,%rdx
  mov    %r13d,%esi
  call   <simplex2@plt>
  mov    %r13d,%eax
  mov    %rsp,%rdx
  lea    0xf(,%rax,4),%rax
  shr    $0x4,%rax
  shl    $0x4,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  cmp    %rdx,%rsp
  je     L16
L193:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L193
L16:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L28
L202:
  mov    %rsp,%r14
  mov    -0x44(%rbp),%edi
  mov    %r12,%rcx
  mov    %r13d,%esi
  mov    %r14,%rdx
  call   <solution@plt>
  test   %ebx,%ebx
  je     L167
  mov    -0x68(%rbp),%rdx
  mov    -0x70(%rbp),%rdi
  mov    %r14,%rsi
  shl    $0x2,%rdx
  call   <memcpy@plt>
L167:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L206
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L28:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L202
L95:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L32
L206:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D6
type: f32
name: disassemble_data
arguments: tag: D15
type: byte[4]

tool: D6: 1

tool: {"D15": [0x00,0x00,0x00,0x80]}

assistant: ```c
void(simplex)(unsigned int D, unsigned int N, float x[N], const float c[N], const float b[D], const float A[D][N]) {
  float A2[D + 1][N + D + 1];
  for (unsigned int i = 0; i < N + D + 1; i++) {
    A2[0][i] = (i < N) ? -c[i] : 0.;
    for (unsigned int j = 0; j < D; j++) {
      if (i < N)
        A2[1 + j][i] = A[j][i];
      else if (i == N + D)
        A2[1 + j][i] = b[j];
      else
        A2[1 + j][i] = (i - N == j) ? 1. : 0.;
    }
  }
  simplex2(D, N + D, A2);
  float x2[D + N];
  solution(D, D + N, x2, A2);
  for (unsigned int i = 0; i < N; i++)
    x[i] = x2[i];
}
```