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

```asm
<par_color>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    %r8,-0x28(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jne    L72
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L63
L72:
  mov    -0x28(%rbp),%rax
  movl   $0x1,(%rax)
L63:
  mov    -0x18(%rbp),%rax
  movl   $0x1,(%rax)
  cmpl   $0x1,-0x4(%rbp)
  jne    L73
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D10(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L231
  mov    -0x20(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L29
L231:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D33(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L126
  mov    -0x20(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L29
L126:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D28(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L162
  mov    -0x20(%rbp),%rax
  movl   $0x2,(%rax)
  jmp    L29
L162:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D20(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L128
  mov    -0x20(%rbp),%rax
  movl   $0x3,(%rax)
  jmp    L29
L128:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D39(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L5
  mov    -0x20(%rbp),%rax
  movl   $0x4,(%rax)
  jmp    L29
L5:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D60(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L27
  mov    -0x20(%rbp),%rax
  movl   $0x5,(%rax)
  jmp    L29
L27:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D32(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L152
  mov    -0x20(%rbp),%rax
  movl   $0x6,(%rax)
  jmp    L29
L152:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D59(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L45
  mov    -0x20(%rbp),%rax
  movl   $0x7,(%rax)
  jmp    L29
L45:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L252
  mov    -0x20(%rbp),%rax
  movl   $0x9,(%rax)
  jmp    L29
L252:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L190
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x20(%rbp),%rdx
  mov    %eax,(%rdx)
  jmp    L29
L190:
  mov    -0x28(%rbp),%rax
  movl   $0x1,(%rax)
L29:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L30
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x9,%eax
  jg     L30
  mov    -0x20(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x8,%eax
  jne    L73
L30:
  mov    -0x28(%rbp),%rax
  movl   $0x1,(%rax)
L73:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D10
datatype: string
name: parse_data
arguments: tag: D33
datatype: string
name: parse_data
arguments: tag: D28
datatype: string
name: parse_data
arguments: tag: D20
datatype: string
name: parse_data
arguments: tag: D39
datatype: string
name: parse_data
arguments: tag: D60
datatype: string
name: parse_data
arguments: tag: D32
datatype: string
name: parse_data
arguments: tag: D59
datatype: string
name: parse_data
arguments: tag: D2
datatype: string

tool: D10: black

tool: D33: red

tool: D28: green

tool: D20: yellow

tool: D39: blue

tool: D60: magenta

tool: D32: cyan

tool: D59: white

tool: D2: default

assistant: ```c
void par_color(int argc, char **argv, int *option, int *opt_color, int *bad_arg) {
  if (argc != 1 || *option)
    *bad_arg = 1;
  *option = 1;
  if (argc == 1) {
    if (strcmp(argv[0], "black") == 0)
      *opt_color = 0;
    else if (strcmp(argv[0], "red") == 0)
      *opt_color = 1;
    else if (strcmp(argv[0], "green") == 0)
      *opt_color = 2;
    else if (strcmp(argv[0], "yellow") == 0)
      *opt_color = 3;
    else if (strcmp(argv[0], "blue") == 0)
      *opt_color = 4;
    else if (strcmp(argv[0], "magenta") == 0)
      *opt_color = 5;
    else if (strcmp(argv[0], "cyan") == 0)
      *opt_color = 6;
    else if (strcmp(argv[0], "white") == 0)
      *opt_color = 7;
    else if (strcmp(argv[0], "default") == 0)
      *opt_color = 9;
    else if (isdigit(argv[0][0]))
      *opt_color = atoi(argv[0]);
    else
      *bad_arg = 1;
    if (*opt_color < 0 || *opt_color > 9 || *opt_color == 8)
      *bad_arg = 1;
  }
}
```