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

```asm
<parse_name>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  mov    %rdi,%rsi
  push   %rbx
  mov    %r9,%rbx
  sub    $0x88,%rsp
  mov    %rdx,0x8(%rsp)
  lea    0x20(%rsp),%r13
  mov    %rcx,0x10(%rsp)
  mov    %r13,%rdi
  mov    %r13,%r15
  mov    %r8,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  call   <strcpy@plt>
  movzbl 0x20(%rsp),%eax
  test   %al,%al
  je     L338
  nopw   0x0(%rax,%rax,1)
L202:
  movsbl %al,%edi
  add    $0x1,%r15
  call   <tolower@plt>
  mov    %al,-0x1(%r15)
  movzbl (%r15),%eax
  test   %al,%al
  jne    L202
  cmpb   $0x0,0x20(%rsp)
  je     L338
  xor    %r14d,%r14d
  cs nopw 0x0(%rax,%rax,1)
L142:
  mov    (%rbx),%eax
  test   %eax,%eax
  jne    L338
  movslq %r14d,%r15
  lea    0x0(%r13,%r15,1),%r12
  cmpb   $0x72,(%r12)
  jne    L304
  cmpb   $0x65,0x1(%r12)
  jne    L304
  cmpb   $0x64,0x2(%r12)
  jne    L304
  mov    0x8(%rsp),%rax
  orl    $0x1,0x0(%rbp)
  addl   $0xff,(%rax)
L376:
  mov    (%rbx),%edx
  test   %edx,%edx
  jne    L142
  movzbl 0x20(%rsp,%r15,1),%eax
  cmp    $0x2c,%al
  je     L189
  cmp    $0x20,%al
  je     L189
  test   %al,%al
  je     L338
  lea    0x1(%r14),%edx
  movslq %edx,%rdx
  nopl   0x0(%rax,%rax,1)
L141:
  movzbl 0x0(%r13,%rdx,1),%eax
  mov    %edx,%r14d
  cmp    $0x2c,%al
  je     L189
  cmp    $0x20,%al
  je     L189
  add    $0x1,%rdx
  test   %al,%al
  jne    L141
L338:
  mov    $0x1,%eax
L299:
  mov    0x78(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L191
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L304:
  mov    $0x5,%edx
  lea    D36(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L173
  mov    0x10(%rsp),%rax
  orl    $0x2,0x0(%rbp)
  addl   $0xff,(%rax)
  jmp    L376
  nopl   0x0(%rax)
L173:
  mov    $0x4,%edx
  lea    D23(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L281
  mov    0x18(%rsp),%rax
  orl    $0x4,0x0(%rbp)
  addl   $0xff,(%rax)
  jmp    L376
  nopl   0x0(%rax)
L189:
  test   %al,%al
  je     L338
  movslq %r14d,%rax
  movzbl 0x20(%rsp,%rax,1),%edx
  cmp    $0x20,%dl
  je     L379
  cmp    $0x2c,%dl
  jne    L25
L379:
  add    $0x1,%r14d
  movslq %r14d,%rax
  nopl   0x0(%rax)
L41:
  movzbl 0x0(%r13,%rax,1),%edx
  mov    %eax,%r14d
  add    $0x1,%rax
  cmp    $0x2c,%dl
  je     L41
  cmp    $0x20,%dl
  je     L41
L25:
  test   %dl,%dl
  jne    L142
  jmp    L338
  nopl   0x0(%rax)
L281:
  mov    $0x5,%edx
  lea    D38(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L162
  mov    0x8(%rsp),%rax
  orl    $0x8,0x0(%rbp)
  addl   $0xff,(%rax)
  mov    0x10(%rsp),%rax
  addl   $0xff,(%rax)
  mov    0x18(%rsp),%rax
  addl   $0xff,(%rax)
  jmp    L376
  nopw   0x0(%rax,%rax,1)
L162:
  mov    $0x7,%edx
  lea    D48(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L301
  mov    0x8(%rsp),%rax
  orl    $0x10,0x0(%rbp)
  addl   $0xff,(%rax)
  mov    0x18(%rsp),%rax
  addl   $0xff,(%rax)
  jmp    L376
  nop
L301:
  mov    $0x6,%edx
  lea    D47(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L108
  mov    $0x4,%edx
  lea    D54(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L14
  mov    0x18(%rsp),%rax
  orl    $0x40,0x0(%rbp)
  addl   $0xff,(%rax)
  mov    0x10(%rsp),%rax
  addl   $0xff,(%rax)
  jmp    L376
L108:
  mov    0x8(%rsp),%rax
  orl    $0x20,0x0(%rbp)
  addl   $0xff,(%rax)
  mov    0x10(%rsp),%rax
  addl   $0xff,(%rax)
  jmp    L376
L14:
  mov    $0x5,%edx
  lea    D6(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L16
  mov    $0xb,%edx
  lea    D60(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L299
  movl   $0x1,(%rbx)
  jmp    L142
L16:
  orl    $0x80,0x0(%rbp)
  jmp    L376
L191:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D36
data_type: string
name: parse_data
arguments: tag: D23
data_type: string
name: parse_data
arguments: tag: D38
data_type: string
name: parse_data
arguments: tag: D48
data_type: string
name: parse_data
arguments: tag: D47
data_type: string
name: parse_data
arguments: tag: D54
data_type: string
name: parse_data
arguments: tag: D6
data_type: string
name: parse_data
arguments: tag: D60
data_type: string

tool: D36: green

tool: D23: blue

tool: D38: white

tool: D48: magenta

tool: D47: yellow

tool: D54: cyan

tool: D6: black

tool: D60: transparent

assistant: ```c
int parse_name(name, colors, R, G, B, transparent)
char name[];
int *colors, *R, *G, *B, *transparent;
{
  int i, stringptr = 0, badstring = 0;
  char c, tempstr[80];
  strcpy(tempstr, name);
  for (i = 0, c = tempstr[0]; c != '\0'; c = tempstr[++i])
    tempstr[i] = tolower(tempstr[i]);
  c = tempstr[0];
  while ((c != '\0') && !badstring && !(*transparent)) {
    if (strncmp(tempstr + stringptr, "red", 3) == 0) {
      *colors = *colors | 0x01;
      *R += 255;
    } else if (strncmp(tempstr + stringptr, "green", 5) == 0) {
      *colors = *colors | 0x02;
      *G += 255;
    } else if (strncmp(tempstr + stringptr, "blue", 4) == 0) {
      *colors = *colors | 0x04;
      *B += 255;
    } else if (strncmp(tempstr + stringptr, "white", 5) == 0) {
      *colors = *colors | 0x08;
      *R += 255;
      *G += 255;
      *B += 255;
    } else if (strncmp(tempstr + stringptr, "magenta", 7) == 0) {
      *colors = *colors | 0x10;
      *R += 255;
      *B += 255;
    } else if (strncmp(tempstr + stringptr, "yellow", 6) == 0) {
      *colors = *colors | 0x20;
      *R += 255;
      *G += 255;
    } else if (strncmp(tempstr + stringptr, "cyan", 4) == 0) {
      *colors = *colors | 0x40;
      *B += 255;
      *G += 255;
    } else if (strncmp(tempstr + stringptr, "black", 5) == 0) {
      *colors = *colors | 0x80;
    } else if (strncmp(tempstr + stringptr, "transparent", 11)) {
      *transparent = 1;
    } else {
      badstring = 1;
    }
    if (!badstring && !(*transparent)) {
      for (c = tempstr[stringptr]; ((c != ',') && (c != ' ') && (c != '\0'));)
        c = tempstr[++stringptr];
      if (c != '\0') {
        for (c = tempstr[stringptr]; ((c == ',') || (c == ' '));)
          c = tempstr[++stringptr];
      }
    }
  }
  return (!badstring);
}
```