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

```asm
<gr_get_color_int>:
  endbr64
  test   %rdi,%rdi
  je     L200
  push   %rbp
  lea    D64(%rip),%rsi
  mov    %rdi,%rbp
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x1,%eax
  test   %r8d,%r8d
  je     L102
  lea    D67(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x2,%eax
  test   %r8d,%r8d
  je     L102
  lea    D181(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x3,%eax
  test   %r8d,%r8d
  je     L102
  lea    D25(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x4,%eax
  test   %r8d,%r8d
  je     L102
  lea    D173(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x5,%eax
  test   %r8d,%r8d
  je     L102
  lea    D131(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x6,%eax
  test   %r8d,%r8d
  je     L102
  lea    D166(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x7,%eax
  test   %r8d,%r8d
  je     L102
  lea    D149(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x8,%eax
  test   %r8d,%r8d
  je     L102
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x9,%eax
  test   %r8d,%r8d
  je     L102
  lea    D203(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0xa,%eax
  test   %r8d,%r8d
  je     L102
  lea    D74(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0xb,%eax
  test   %r8d,%r8d
  je     L102
  lea    D122(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0xc,%eax
  test   %r8d,%r8d
  je     L102
  lea    D155(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0xd,%eax
  test   %r8d,%r8d
  je     L102
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0xe,%eax
  test   %r8d,%r8d
  je     L102
  lea    D97(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0xf,%eax
  test   %r8d,%r8d
  je     L102
  lea    D106(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x10,%eax
  test   %r8d,%r8d
  je     L102
  lea    D201(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x11,%eax
  test   %r8d,%r8d
  je     L102
  lea    D36(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x12,%eax
  test   %r8d,%r8d
  je     L102
  lea    D40(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x13,%eax
  test   %r8d,%r8d
  je     L102
  lea    D50(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %eax,%r8d
  mov    $0x14,%eax
  test   %r8d,%r8d
  je     L102
  lea    D34(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0x15,%eax
L102:
  pop    %rbp
  ret
L200:
  mov    $0xffffffff,%eax
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D64
data_type: string
name: disassemble_data
arguments: tag: D67
data_type: string
name: disassemble_data
arguments: tag: D181
data_type: string
name: disassemble_data
arguments: tag: D25
data_type: string
name: disassemble_data
arguments: tag: D173
data_type: string
name: disassemble_data
arguments: tag: D131
data_type: string
name: disassemble_data
arguments: tag: D166
data_type: string
name: disassemble_data
arguments: tag: D149
data_type: string
name: disassemble_data
arguments: tag: D11
data_type: string
name: disassemble_data
arguments: tag: D203
data_type: string
name: disassemble_data
arguments: tag: D74
data_type: string
name: disassemble_data
arguments: tag: D122
data_type: string
name: disassemble_data
arguments: tag: D155
data_type: string
name: disassemble_data
arguments: tag: D153
data_type: string
name: disassemble_data
arguments: tag: D97
data_type: string
name: disassemble_data
arguments: tag: D106
data_type: string
name: disassemble_data
arguments: tag: D201
data_type: string
name: disassemble_data
arguments: tag: D36
data_type: string
name: disassemble_data
arguments: tag: D40
data_type: string
name: disassemble_data
arguments: tag: D50
data_type: string
name: disassemble_data
arguments: tag: D34
data_type: string

tool: D64: Green

tool: D67: Navy

tool: D181: Yellow

tool: D25: Magenta

tool: D173: Cyan

tool: D131: Gray

tool: D166: Orange

tool: D149: Black

tool: D11: Maroon

tool: D203: White

tool: D74: Blue

tool: D122: Pink

tool: D155: Brown

tool: D153: Grey

tool: D97: LimeGreen

tool: D106: Turquoise

tool: D201: Violet

tool: D36: Wheat

tool: D40: Purple

tool: D50: Beige

tool: D34: Red

assistant: ```c
short gr_get_color_int(char *colorstr) {
  if (!colorstr)
    return -1;
  if (!strcmp(colorstr, "Green"))
    return 1;
  if (!strcmp(colorstr, "Navy"))
    return 2;
  if (!strcmp(colorstr, "Yellow"))
    return 3;
  if (!strcmp(colorstr, "Magenta"))
    return 4;
  if (!strcmp(colorstr, "Cyan"))
    return 5;
  if (!strcmp(colorstr, "Gray"))
    return 6;
  if (!strcmp(colorstr, "Orange"))
    return 7;
  if (!strcmp(colorstr, "Black"))
    return 8;
  if (!strcmp(colorstr, "Maroon"))
    return 9;
  if (!strcmp(colorstr, "White"))
    return 10;
  if (!strcmp(colorstr, "Blue"))
    return 11;
  if (!strcmp(colorstr, "Pink"))
    return 12;
  if (!strcmp(colorstr, "Brown"))
    return 13;
  if (!strcmp(colorstr, "Grey"))
    return 14;
  if (!strcmp(colorstr, "LimeGreen"))
    return 15;
  if (!strcmp(colorstr, "Turquoise"))
    return 16;
  if (!strcmp(colorstr, "Violet"))
    return 17;
  if (!strcmp(colorstr, "Wheat"))
    return 18;
  if (!strcmp(colorstr, "Purple"))
    return 19;
  if (!strcmp(colorstr, "Beige"))
    return 20;
  if (!strcmp(colorstr, "Red"))
    return 21;
  return 0;
}
```