user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<get_index>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x50,%rsp
  movdqa D2(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    D13(%rip),%rax
  mov    %rsp,%rsi
  movl   $0x4e494d,0x38(%rsp)
  movaps %xmm0,(%rsp)
  movdqa D10(%rip),%xmm0
  mov    %rax,0x30(%rsp)
  movaps %xmm0,0x10(%rsp)
  movdqa D31(%rip),%xmm0
  movaps %xmm0,0x20(%rsp)
  call   <strcmp@plt>
  test   %eax,%eax
  je     L51
  lea    0x4(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L88
  lea    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L247
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L32
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L102
  lea    0x14(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L36
  lea    0x18(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L163
  lea    0x1c(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L68
  lea    0x20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L18
  lea    0x24(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L207
  lea    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L245
  lea    0x2c(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L190
  lea    0x30(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L27
  lea    0x34(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L208
  lea    0x38(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xf,%eax
  sub    $0x1,%eax
L51:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L135
  add    $0x50,%rsp
  pop    %rbp
  ret
L88:
  mov    $0x1,%eax
  jmp    L51
L27:
  mov    $0xc,%eax
  jmp    L51
L247:
  mov    $0x2,%eax
  jmp    L51
L32:
  mov    $0x3,%eax
  jmp    L51
L102:
  mov    $0x4,%eax
  jmp    L51
L36:
  mov    $0x5,%eax
  jmp    L51
L163:
  mov    $0x6,%eax
  jmp    L51
L68:
  mov    $0x7,%eax
  jmp    L51
L18:
  mov    $0x8,%eax
  jmp    L51
L207:
  mov    $0x9,%eax
  jmp    L51
L245:
  mov    $0xa,%eax
  jmp    L51
L190:
  mov    $0xb,%eax
  jmp    L51
L208:
  mov    $0xd,%eax
  jmp    L51
L135:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D2
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D13
type: byte[8]
name: extract_symbolic_data
arguments: data_label: D10
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D31
type: byte[16]

tool: {"D2": [0x47,0x45,0x4e,0x00,0x4c,0x54,0x47,0x00,0x4d,0x4a,0x47,0x00,0x43,0x4f,0x4c,0x00]}

tool: {"D13": [0x45,0x4e,0x47,0x00,0x53,0x50,0x59,0x00]}

tool: {"D10": [0x4c,0x54,0x43,0x00,0x4d,0x41,0x4a,0x00,0x43,0x50,0x54,0x00,0x31,0x4c,0x54,0x00]}

tool: {"D31": [0x32,0x4c,0x54,0x00,0x50,0x4c,0x41,0x00,0x54,0x4e,0x4b,0x00,0x43,0x41,0x56,0x00]}

assistant: ```c
int get_index(char str[4]) {
  char names[15][4] = {
      "GEN", "LTG", "MJG", "COL", "LTC", "MAJ", "CPT", "1LT", "2LT", "PLA", "TNK", "CAV", "ENG", "SPY", "MIN",
  };
  int i;
  for (i = 0; i < 15; i++) {
    if (strcmp(str, names[i]) == 0) {
      return i;
    }
  }
  return -1;
}
```