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

```asm
<par_color>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  cmp    $0x1,%edi
  je     L111
  movl   $0x1,(%r8)
  movl   $0x1,(%rdx)
L133:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L111:
  mov    (%rdx),%eax
  mov    %rsi,%r12
  mov    %rcx,%rbp
  test   %eax,%eax
  je     L181
  movl   $0x1,(%r8)
  nopl   0x0(%rax,%rax,1)
L181:
  movl   $0x1,(%rdx)
  mov    (%r12),%rdi
  lea    D15(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L229
  movl   $0x0,0x0(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L229:
  mov    (%r12),%rdi
  lea    D11(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L100
  movl   $0x1,0x0(%rbp)
  jmp    L133
  xchg   %ax,%ax
L100:
  mov    (%r12),%rdi
  lea    D64(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L192
  movl   $0x2,0x0(%rbp)
  jmp    L133
L192:
  mov    (%r12),%rdi
  lea    D6(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L4
  movl   $0x3,0x0(%rbp)
  jmp    L133
L4:
  mov    (%r12),%rdi
  lea    D63(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L112
  movl   $0x4,0x0(%rbp)
  jmp    L133
L112:
  mov    (%r12),%rdi
  lea    D46(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L132
  movl   $0x5,0x0(%rbp)
  jmp    L133
L132:
  mov    (%r12),%rdi
  lea    D78(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L75
  movl   $0x6,0x0(%rbp)
  jmp    L133
L75:
  mov    (%r12),%rdi
  lea    D35(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L62
  movl   $0x7,0x0(%rbp)
  jmp    L133
L62:
  mov    (%r12),%rdi
  lea    D60(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L190
  movl   $0x9,0x0(%rbp)
  jmp    L133
L190:
  mov    (%r12),%rax
  movsbl (%rax),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L105
  movl   $0x1,(%rbx)
L143:
  mov    0x0(%rbp),%eax
  cmp    $0x9,%eax
  ja     L185
  cmp    $0x8,%eax
  jne    L133
L185:
  movl   $0x1,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L105:
  mov    (%r12),%rdi
  call   <atoi@plt>
  mov    %eax,0x0(%rbp)
  jmp    L143
```

tool_calls: name: disassemble_data
arguments: tag: D15
type_infered: string
name: disassemble_data
arguments: tag: D11
type_infered: string
name: disassemble_data
arguments: tag: D64
type_infered: string
name: disassemble_data
arguments: tag: D6
type_infered: string
name: disassemble_data
arguments: tag: D63
type_infered: string
name: disassemble_data
arguments: tag: D46
type_infered: string
name: disassemble_data
arguments: tag: D78
type_infered: string
name: disassemble_data
arguments: tag: D35
type_infered: string
name: disassemble_data
arguments: tag: D60
type_infered: string

tool: D15: black

tool: D11: red

tool: D64: green

tool: D6: yellow

tool: D63: blue

tool: D46: magenta

tool: D78: cyan

tool: D35: white

tool: D60: 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;
  }
}
```