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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x28,%rsp
  mov    %edi,(%rsp)
  mov    (%rsi),%rdi
  mov    %rsi,0x10(%rsp)
  call   <setprogname@plt>
  cmp    $0x1,%ebx
  jle    L131
  mov    0x10(%rsp),%rax
  xor    %r12d,%r12d
  xor    %ebp,%ebp
  mov    $0x1,%ebx
  add    $0x8,%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%r13
  nopl   0x0(%rax,%rax,1)
L95:
  mov    0x0(%r13),%r14
  movsbl (%r14),%edi
  lea    -0x2b(%rdi),%eax
  test   $0xfd,%al
  jne    L82
  test   %dil,%dil
  je     L201
  xor    %r15d,%r15d
  jmp    L112
  nopl   (%rax)
L60:
  cmp    $0x2b,%dil
  je     L66
  call   <pax_flag@plt>
  mov    %rax,%rcx
  cmp    $0xffffffffffffffff,%rax
  je     L115
L135:
  test   %r15d,%r15d
  je     L123
  or     %rcx,%r12
  nopl   0x0(%rax)
L55:
  movsbl (%r14),%edi
  test   %dil,%dil
  je     L201
L112:
  add    $0x1,%r14
  cmp    $0x2c,%dil
  je     L55
  cmp    $0x2d,%dil
  jne    L60
  movsbl (%r14),%edi
  mov    $0x1,%r15d
  test   %dil,%dil
  jne    L112
L201:
  add    $0x1,%ebx
  add    $0x8,%r13
  cmp    %ebx,(%rsp)
  jne    L95
L172:
  xor    %eax,%eax
  call   <usage@plt>
L197:
  xor    %eax,%eax
  jmp    L130
  nopw   0x0(%rax,%rax,1)
L66:
  xor    %r15d,%r15d
  jmp    L55
  nopl   (%rax)
L123:
  or     %rcx,%rbp
  jmp    L55
  nopl   (%rax)
L115:
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <usage@plt>
  mov    0x8(%rsp),%rcx
  jmp    L135
L82:
  mov    (%rsp),%edx
  mov    %rbp,%rax
  xor    %r13d,%r13d
  or     %r12,%rax
  lea    -0x1(%rdx),%eax
  sete   %r13b
  xor    %r15d,%r15d
  cmp    %ebx,%eax
  setne  %r15b
  cmp    %edx,%ebx
  jge    L197
  mov    0x10(%rsp),%rsi
  movslq %ebx,%rdx
  sub    %ebx,%eax
  xor    %ebx,%ebx
  add    %rdx,%rax
  lea    (%rsi,%rdx,8),%r14
  mov    0x18(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
  mov    %rax,(%rsp)
  nopl   0x0(%rax,%rax,1)
L194:
  mov    (%r14),%rdi
  mov    %r15d,%r8d
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  add    $0x8,%r14
  call   <process_one@plt>
  or     %eax,%ebx
  cmp    %r14,(%rsp)
  jne    L194
  test   %ebx,%ebx
  je     L197
  mov    D1(%rip),%rax
  mov    (%rax),%eax
L130:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L131:
  xor    %eax,%eax
  call   <usage@plt>
  cmpl   $0x1,(%rsp)
  je     L172
  jmp    L197
```

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;
}
```