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

```asm
<ViterbiTb>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  mov    %r8,-0x88(%rbp)
  mov    %r9,-0x90(%rbp)
  mov    0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    0x18(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    0x20(%rbp),%edx
  mov    0x28(%rbp),%eax
  add    %edx,%eax
  imul   -0x3c(%rbp),%eax
  cltq
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    0x20(%rbp),%edx
  mov    0x28(%rbp),%eax
  add    %edx,%eax
  imul   -0x3c(%rbp),%eax
  cltq
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    0x18(%rbp),%eax
  cltq
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L115
L43:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  D13(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x50(%rbp)
L115:
  mov    -0x50(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L43
  mov    0x28(%rbp),%eax
  neg    %eax
  mov    %eax,-0x54(%rbp)
  jmp    L244
L236:
  mov    -0x54(%rbp),%eax
  cltd
  idivl  0x20(%rbp)
  mov    0x18(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x48(%rbp)
  cmpl   $0x0,-0x48(%rbp)
  jns    L56
  mov    0x18(%rbp),%eax
  imul   0x20(%rbp),%eax
  add    %eax,-0x48(%rbp)
L56:
  movl   $0x0,-0x58(%rbp)
  jmp    L240
L221:
  mov    -0x48(%rbp),%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x58(%rbp)
L240:
  mov    -0x58(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L221
  movl   $0x0,-0x58(%rbp)
  jmp    L24
L79:
  mov    0x18(%rbp),%edx
  mov    -0x58(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Gamma@plt>
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x58(%rbp)
L24:
  mov    -0x58(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jl     L79
  movl   $0x0,-0x50(%rbp)
  jmp    L12
L205:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x34(%rbp)
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x34(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L71
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  -0x34(%rbp),%xmm0
  movss  %xmm0,(%rax)
  cmpl   $0x0,-0x54(%rbp)
  js     L71
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
L71:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x34(%rbp)
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x34(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L185
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  -0x34(%rbp),%xmm0
  movss  %xmm0,(%rax)
  cmpl   $0x0,-0x54(%rbp)
  js     L185
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x88(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x88(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
L185:
  addl   $0x1,-0x50(%rbp)
L12:
  mov    -0x50(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L205
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x44(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L113
L211:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x44(%rbp),%xmm0
  jbe    L66
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x44(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
L66:
  addl   $0x1,-0x50(%rbp)
L113:
  mov    -0x50(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L211
  movl   $0x0,-0x50(%rbp)
  jmp    L117
L39:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  subss  -0x44(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  D13(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x50(%rbp)
L117:
  mov    -0x50(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L39
  addl   $0x1,-0x54(%rbp)
L244:
  mov    0x20(%rbp),%edx
  mov    0x28(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x54(%rbp)
  jl     L236
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x44(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movl   $0x1,-0x50(%rbp)
  jmp    L48
L242:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x44(%rbp),%xmm0
  jbe    L173
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x44(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
L173:
  addl   $0x1,-0x50(%rbp)
L48:
  mov    -0x50(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L242
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  mov    0x20(%rbp),%edx
  mov    0x28(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x54(%rbp)
  jmp    L216
L258:
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x50(%rbp)
  subl   $0x1,-0x54(%rbp)
L216:
  mov    -0x54(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jge    L258
  mov    0x20(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x54(%rbp)
  jmp    L146
L83:
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x54(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x50(%rbp)
  subl   $0x1,-0x54(%rbp)
L146:
  cmpl   $0x0,-0x54(%rbp)
  jns    L83
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D13
type: byte[4]

tool: {"D13": [0x80,0x96,0x18,0xcb]}

assistant: ```c
void ViterbiTb(int output_u_int[], int out0[], int state0[], int out1[], int state1[], float input_c[], int KK, int nn, int LL, int depth) {
  int i, t, state, mm, states, max_state;
  int number_symbols, starting_bit;
  float metric;
  float *prev_section, *next_section;
  int *prev_bit;
  int *prev_state;
  float *metric_c;
  float *rec_array;
  float max_val;
  mm = KK - 1;
  states = 1 << mm;
  number_symbols = 1 << nn;
  prev_section = calloc(states, sizeof(float));
  next_section = calloc(states, sizeof(float));
  prev_bit = calloc(states * (LL + depth), sizeof(int));
  prev_state = calloc(states * (LL + depth), sizeof(int));
  rec_array = calloc(nn, sizeof(float));
  metric_c = calloc(number_symbols, sizeof(float));
  for (state = 0; state < states; state++) {
    prev_section[state] = 0;
    next_section[state] = -1e7;
  }
  for (t = -depth; t < LL + depth; t++) {
    starting_bit = nn * (t % LL);
    if (starting_bit < 0)
      starting_bit = nn * LL + starting_bit;
    for (i = 0; i < nn; i++) {
      rec_array[i] = input_c[starting_bit + i];
    }
    for (i = 0; i < number_symbols; i++)
      metric_c[i] = Gamma(rec_array, i, nn);
    for (state = 0; state < states; state++) {
      metric = prev_section[state] + metric_c[out0[state]];
      if (metric > next_section[state0[state]]) {
        next_section[state0[state]] = metric;
        if (t >= 0) {
          prev_state[t * states + state0[state]] = state;
          prev_bit[t * states + state0[state]] = 0;
        }
      }
      metric = prev_section[state] + metric_c[out1[state]];
      if (metric > next_section[state1[state]]) {
        next_section[state1[state]] = metric;
        if (t >= 0) {
          prev_state[t * states + state1[state]] = state;
          prev_bit[t * states + state1[state]] = 1;
        }
      }
    }
    max_val = 0;
    for (state = 0; state < states; state++) {
      if (next_section[state] > max_val) {
        max_val = next_section[state];
        max_state = state;
      }
    }
    for (state = 0; state < states; state++) {
      prev_section[state] = next_section[state] - max_val;
      next_section[state] = -1e7;
    }
  }
  max_val = prev_section[0];
  max_state = 0;
  for (state = 1; state < states; state++) {
    if (prev_section[state] > max_val) {
      max_val = prev_section[state];
      max_state = state;
    }
  }
  state = max_state;
  for (t = LL + depth - 1; t >= LL; t--) {
    state = prev_state[t * states + state];
  }
  for (t = LL - 1; t >= 0; t--) {
    output_u_int[t] = prev_bit[t * states + state];
    state = prev_state[t * states + state];
  }
  free(prev_section);
  free(next_section);
  free(prev_bit);
  free(prev_state);
  free(rec_array);
  free(metric_c);
}
```