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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x3f8,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x3e8(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rdi),%ecx
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  mov    $0x0,%ebp
  lea    D29(%rip),%r14
  test   %ecx,%ecx
  jg     L111
L85:
  mov    $0x0,%r15d
  mov    %rsp,%r14
  cmp    $0x1,%ecx
  je     L2
  jmp    L44
L49:
  mov    $0xffffffff,%r12d
L44:
  lea    D26(%rip),%rdi
  call   <puts@plt>
L87:
  mov    0x3e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  mov    %r12d,%eax
  add    $0x3f8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L128:
  mov    $0x1,%r13d
  jmp    L77
L22:
  mov    $0x1,%ebp
L77:
  mov    (%rbx),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,(%rbx)
  movzbl 0x1(%rax),%eax
  movsbl %al,%esi
  test   %esi,%esi
  je     L160
L48:
  cmp    $0x6e,%al
  je     L128
  cmp    $0x78,%al
  je     L22
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    (%rbx),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,(%rbx)
  movzbl 0x1(%rax),%eax
  movsbl %al,%esi
  test   %esi,%esi
  je     L49
  mov    $0xffffffff,%r12d
  mov    $0x0,%ecx
  jmp    L48
L160:
  sub    $0x1,%ecx
  test   %ecx,%ecx
  jle    L85
L111:
  add    $0x8,%rbx
  mov    (%rbx),%rax
  cmpb   $0x2d,(%rax)
  jne    L85
  lea    0x1(%rax),%rdx
  mov    %rdx,(%rbx)
  movzbl 0x1(%rax),%eax
  movsbl %al,%esi
  test   %esi,%esi
  jne    L48
  jmp    L160
L159:
  mov    %r14,%rsi
  lea    D8(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%r12d
L2:
  mov    $0x3e8,%esi
  mov    %r14,%rdi
  call   <getlin@plt>
  test   %rax,%rax
  jle    L87
  add    $0x1,%r15
  mov    (%rbx),%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  cmp    %ebp,%eax
  je     L2
  test   %r13d,%r13d
  je     L159
  mov    %r15,%rsi
  lea    D35(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L159
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D29
data_type: string
name: extract_symbolic_data
arguments: tag: D26
data_type: string
name: extract_symbolic_data
arguments: tag: D8
data_type: string
name: extract_symbolic_data
arguments: tag: D35
data_type: string

tool: D29: find: illegal option %c


tool: D26: Usage: find -x -n pattern

tool: D8: %s

tool: D35: %1d:

assistant: ```c
main(int argc, char *argv[]) {
  char line[1000];
  long lineno = 0;
  int c, except = 0, number = 0, found = 0;
  while (--argc > 0 && (*++argv)[0] == '-')
    while (c = *++argv[0])
      switch (c) {
      case 'x':
        except = 1;
        break;
      case 'n':
        number = 1;
        break;
      default:
        printf("find: illegal option %c\n", c);
        argc = 0;
        found = -1;
        break;
      }
  if (argc != 1)
    printf("Usage: find -x -n pattern\n");
  else
    while (getlin(line, 1000) > 0) {
      lineno++;
      if ((strstr(line, *argv) != NULL) != except) {
        if (number)
          printf("%1d:", lineno);
        printf("%s", line);
        found++;
      }
    }
  return found;
}
```