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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <setprogname@plt>
  cmpl   $0x1,-0x44(%rbp)
  jg     L257
  mov    $0x0,%eax
  call   <usage@plt>
L257:
  movl   $0x1,-0x34(%rbp)
  jmp    L234
L105:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L180
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L113
L180:
  movl   $0x0,-0x28(%rbp)
  jmp    L80
L141:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x2d,%eax
  je     L194
  cmp    $0x2d,%eax
  jg     L124
  cmp    $0x2b,%eax
  je     L123
  cmp    $0x2c,%eax
  je     L241
  jmp    L124
L123:
  movl   $0x0,-0x28(%rbp)
  addq   $0x1,-0x20(%rbp)
  jmp    L80
L194:
  movl   $0x1,-0x28(%rbp)
  addq   $0x1,-0x20(%rbp)
  jmp    L80
L241:
  addq   $0x1,-0x20(%rbp)
  jmp    L80
L124:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <pax_flag@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0xffffffffffffffff,-0x8(%rbp)
  jne    L17
  mov    $0x0,%eax
  call   <usage@plt>
L17:
  cmpl   $0x0,-0x28(%rbp)
  je     L40
  mov    -0x8(%rbp),%rax
  or     %rax,-0x10(%rbp)
  jmp    L231
L40:
  mov    -0x8(%rbp),%rax
  or     %rax,-0x18(%rbp)
L231:
  nop
L80:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L141
  addl   $0x1,-0x34(%rbp)
L234:
  mov    -0x34(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L105
L113:
  mov    -0x34(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jne    L79
  mov    $0x0,%eax
  call   <usage@plt>
L79:
  cmpq   $0x0,-0x18(%rbp)
  jne    L239
  cmpq   $0x0,-0x10(%rbp)
  je     L195
L239:
  cmpl   $0x0,-0x30(%rbp)
  je     L183
  mov    $0x0,%eax
  call   <usage@plt>
  jmp    L183
L195:
  movl   $0x1,-0x30(%rbp)
L183:
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x34(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,-0x24(%rbp)
  jmp    L178
L1:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x24(%rbp),%edi
  mov    -0x30(%rbp),%ecx
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%rsi
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <process_one@plt>
  or     %eax,-0x2c(%rbp)
  addl   $0x1,-0x34(%rbp)
L178:
  mov    -0x34(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L1
  cmpl   $0x0,-0x2c(%rbp)
  je     L186
  mov    D4(%rip),%rax
  mov    (%rax),%eax
  jmp    L245
L186:
  mov    $0x0,%eax
L245:
  leave
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  char *opt;
  int i, list = 0, bad = 0, many, minus;
  uint32_t add_flags = 0, del_flags = 0;
  setprogname(argv[0]);
  if (argc < 2)
    usage();
  for (i = 1; i < argc; i++) {
    opt = argv[i];
    if (*opt == '-' || *opt == '+') {
      uint32_t t;
      minus = 0;
      while (*opt) {
        switch (*opt) {
        case '+':
          minus = 0;
          opt++;
          break;
        case '-':
          minus = 1;
          opt++;
          break;
        case ',':
          opt++;
          break;
        default:
          t = pax_flag(*opt++);
          if (t == (uint32_t)-1)
            usage();
          if (minus)
            del_flags |= t;
          else
            add_flags |= t;
          break;
        }
      }
    } else
      break;
  }
  if (i == argc)
    usage();
  if (add_flags || del_flags) {
    if (list)
      usage();
  } else
    list = 1;
  many = i != argc - 1;
  for (; i < argc; i++)
    bad |= process_one(argv[i], add_flags, del_flags, list, many);
  return bad ? EXIT_FAILURE : 0;
}
```