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

```asm
<Viterbi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9,-0x80(%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    -0x40(%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    -0x40(%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,-0x48(%rbp)
  jmp    L150
L192:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  D9(%rip),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  D9(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x48(%rbp)
L150:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L192
  mov    -0x30(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  movl   $0x0,-0x4c(%rbp)
  jmp    L202
L21:
  movl   $0x0,-0x50(%rbp)
  jmp    L188
L38:
  mov    0x18(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x50(%rbp)
L188:
  mov    -0x50(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L38
  movl   $0x0,-0x50(%rbp)
  jmp    L49
L30:
  mov    0x18(%rbp),%edx
  mov    -0x50(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Gamma@plt>
  mov    %eax,%edx
  mov    -0x50(%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,-0x50(%rbp)
L49:
  mov    -0x50(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jl     L30
  movl   $0x0,-0x48(%rbp)
  jmp    L52
L13:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%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    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%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    L82
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%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)
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x68(%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    -0x48(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x68(%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)
L82:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x48(%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    -0x48(%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    L138
  mov    -0x48(%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)
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%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    -0x48(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%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   $0x1,(%rax)
L138:
  addl   $0x1,-0x48(%rbp)
L52:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L13
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x44(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L169
L121:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x44(%rbp),%xmm0
  jbe    L35
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x44(%rbp)
L35:
  addl   $0x1,-0x48(%rbp)
L169:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L121
  movl   $0x0,-0x48(%rbp)
  jmp    L9
L159:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  subss  -0x44(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  D9(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x48(%rbp)
L9:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L159
  addl   $0x1,-0x4c(%rbp)
L202:
  mov    0x20(%rbp),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x4c(%rbp)
  jl     L21
  movl   $0x0,-0x48(%rbp)
  mov    0x20(%rbp),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L184
L55:
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x48(%rbp)
  subl   $0x1,-0x4c(%rbp)
L184:
  mov    -0x4c(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jge    L55
  mov    0x20(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L77
L46:
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x4c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x48(%rbp)
  subl   $0x1,-0x4c(%rbp)
L77:
  cmpl   $0x0,-0x4c(%rbp)
  jns    L46
  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: extract_symbolic_data
arguments: tag: D9
type_guessed: byte[4]

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

assistant: ```c
void Viterbi(int output_u_int[], int out0[], int state0[], int out1[], int state1[], double input_c[], int KK, int nn, int LL) {
  int i, t, state, mm, states;
  int number_symbols;
  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 = (float *)calloc(states, sizeof(float));
  next_section = (float *)calloc(states, sizeof(float));
  prev_bit = (int *)calloc(states * (LL + mm), sizeof(int));
  prev_state = (int *)calloc(states * (LL + mm), sizeof(int));
  rec_array = (float *)calloc(nn, sizeof(float));
  metric_c = (float *)calloc(number_symbols, sizeof(float));
  for (state = 0; state < states; state++) {
    prev_section[state] = -1e7;
    next_section[state] = -1e7;
  }
  prev_section[0] = 0;
  for (t = 0; t < LL + mm; t++) {
    for (i = 0; i < nn; i++)
      rec_array[i] = (float)input_c[nn * t + 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;
        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;
        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];
      }
    }
    for (state = 0; state < states; state++) {
      prev_section[state] = next_section[state] - max_val;
      next_section[state] = -1e7;
    }
  }
  state = 0;
  for (t = LL + mm - 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);
}
```