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

```asm
<Decode_Trame_Brute>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L132
L216:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x4d,%al
  jne    L367
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x4f,%al
  jne    L367
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x9,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    0x48(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    0x50(%rbp),%rdx
  mov    %ax,(%rdx)
  jmp    L132
L367:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x41,%al
  jne    L369
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x44,%al
  jne    L369
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x1,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x2(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L369:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x4f,%al
  jne    L17
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x50,%al
  jne    L17
  mov    -0x40(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x8,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x2,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x4(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L17:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x42,%al
  jne    L21
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x41,%al
  jne    L21
  mov    -0x50(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x4,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x8(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L21:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x49,%al
  jne    L7
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x53,%eax
  je     L135
  cmp    $0x53,%eax
  jg     L14
  cmp    $0x49,%eax
  je     L40
  cmp    $0x4d,%eax
  je     L234
  jmp    L14
L135:
  mov    -0x48(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x7,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x3,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x6(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L40:
  mov    0x28(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x6,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x8,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x10(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L234:
  mov    0x30(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x9,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x12(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L14:
  addl   $0x1,-0x18(%rbp)
  jmp    L132
L7:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x48,%al
  jne    L344
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x3(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x50,%eax
  je     L109
  cmp    $0x50,%eax
  jg     L226
  cmp    $0x43,%eax
  je     L277
  cmp    $0x48,%eax
  je     L107
  jmp    L226
L277:
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    0x10(%rbp),%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x5,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0xa(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L109:
  mov    0x18(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x6,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0xc(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L107:
  mov    0x40(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x6,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0xb,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x16(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L226:
  addl   $0x1,-0x18(%rbp)
  jmp    L132
L344:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x50,%al
  jne    L333
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x41,%eax
  je     L398
  cmp    $0x54,%eax
  jne    L245
  mov    0x20(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0x7,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0xe(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L398:
  mov    0x38(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x5,%edx
  mov    %rax,%rdi
  call   <Extraire@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    0x48(%rbp),%rdx
  add    $0xa,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    0x50(%rbp),%rax
  lea    0x14(%rax),%rbx
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <Statu_Checksum@plt>
  mov    %ax,(%rbx)
  jmp    L132
L245:
  addl   $0x1,-0x18(%rbp)
  jmp    L132
L333:
  addl   $0x1,-0x18(%rbp)
L132:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L216
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void Decode_Trame_Brute(char *tab_recu_brut, char *Motdetat, char *Adeco, char *Optarif, char *Isousc, char *Base, char *Hchc, char *Hchp, char *Ptec, char *Iinst, char *Imax, char *Papp, char *Hhphc, char *Checksum, short *Statu_chcksm) {
  int indice = 0;
  int indice_deb = 0;
  while (tab_recu_brut[indice] != '\0') {
    indice_deb = indice;
    if (tab_recu_brut[indice] == 'M' && tab_recu_brut[indice + 1] == 'O') {
      indice = Extraire(tab_recu_brut, indice, 9, Motdetat);
      Checksum[0] = tab_recu_brut[indice];
      Statu_chcksm[0] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
    } else if (tab_recu_brut[indice] == 'A' && tab_recu_brut[indice + 1] == 'D') {
      indice = Extraire(tab_recu_brut, indice, 5, Adeco);
      Checksum[1] = tab_recu_brut[indice];
      Statu_chcksm[1] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
    } else if (tab_recu_brut[indice] == 'O' && tab_recu_brut[indice + 1] == 'P') {
      indice = Extraire(tab_recu_brut, indice, 8, Optarif);
      Checksum[2] = tab_recu_brut[indice];
      Statu_chcksm[2] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
    } else if (tab_recu_brut[indice] == 'B' && tab_recu_brut[indice + 1] == 'A') {
      indice = Extraire(tab_recu_brut, indice, 5, Base);
      Checksum[4] = tab_recu_brut[indice];
      Statu_chcksm[4] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
    } else if (tab_recu_brut[indice] == 'I') {
      switch (tab_recu_brut[indice + 1]) {
      case 'S':
        indice = Extraire(tab_recu_brut, indice, 7, Isousc);
        Checksum[3] = tab_recu_brut[indice];
        Statu_chcksm[3] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      case 'I':
        indice = Extraire(tab_recu_brut, indice, 6, Iinst);
        Checksum[8] = tab_recu_brut[indice];
        Statu_chcksm[8] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      case 'M':
        indice = Extraire(tab_recu_brut, indice, 5, Imax);
        Checksum[9] = tab_recu_brut[indice];
        Statu_chcksm[9] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      default:
        indice++;
      }
    } else if (tab_recu_brut[indice] == 'H') {
      switch (tab_recu_brut[indice + 3]) {
      case 'C':
        indice = Extraire(tab_recu_brut, indice, 5, Hchc);
        Checksum[5] = tab_recu_brut[indice];
        Statu_chcksm[5] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      case 'P':
        indice = Extraire(tab_recu_brut, indice, 5, Hchp);
        Checksum[6] = tab_recu_brut[indice];
        Statu_chcksm[6] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      case 'H':
        indice = Extraire(tab_recu_brut, indice, 6, Hhphc);
        Checksum[11] = tab_recu_brut[indice];
        Statu_chcksm[11] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      default:
        indice++;
      }
    } else if (tab_recu_brut[indice] == 'P') {
      switch (tab_recu_brut[indice + 1]) {
      case 'T':
        indice = Extraire(tab_recu_brut, indice, 5, Ptec);
        Checksum[7] = tab_recu_brut[indice];
        Statu_chcksm[7] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      case 'A':
        indice = Extraire(tab_recu_brut, indice, 5, Papp);
        Checksum[10] = tab_recu_brut[indice];
        Statu_chcksm[10] = Statu_Checksum(tab_recu_brut, indice_deb, indice);
        break;
      default:
        indice++;
      }
    } else {
      indice++;
    }
  }
}
```