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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x50000(%rsp),%r11
L176:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L176
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x50008(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  je     L51
  mov    %rsi,%rbp
  mov    $0x1,%eax
  cmp    $0x2,%edi
  je     L103
L237:
  mov    0x50008(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L76
  add    $0x50018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L51:
  lea    D3(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L237
L103:
  mov    0x8(%rsi),%rcx
  mov    $0x0,%esi
L4:
  mov    %esi,%r9d
  movzbl (%rcx,%rsi,1),%eax
  test   %al,%al
  jne    L223
  mov    $0x0,%r13d
  mov    $0x0,%ebx
  lea    D4(%rip),%r12
  jmp    L144
L223:
  cmp    $0x5b,%al
  je     L299
L220:
  add    $0x1,%rsi
  jmp    L4
L299:
  lea    0x1(%rsi),%eax
  cltq
  mov    $0x0,%edi
  jmp    L177
L75:
  add    $0x1,%edi
L269:
  add    $0x1,%rax
L177:
  movzbl (%rcx,%rax,1),%edx
  cmp    $0x5b,%dl
  je     L75
  cmp    $0x5d,%dl
  jne    L269
  test   %edi,%edi
  jle    L69
  sub    $0x1,%edi
  jmp    L269
L69:
  mov    %eax,(%rsp,%rsi,4)
  movslq %eax,%r8
  mov    %r9d,(%rsp,%r8,4)
  jmp    L220
  add    $0x1,%r13d
L141:
  add    $0x1,%ebx
L144:
  movslq %ebx,%rax
  mov    0x8(%rbp),%rdx
  movzbl (%rdx,%rax,1),%eax
  test   %al,%al
  je     L71
  lea    -0x2b(%rax),%edx
  cmp    $0x32,%dl
  ja     L141
  ja     L141
  movzbl %dl,%eax
  movslq (%r12,%rax,4),%rax
  add    %r12,%rax
  notrack jmp *%rax
  sub    $0x1,%r13d
  jmp    L141
  movslq %r13d,%rax
  addb   $0x1,0x40000(%rsp,%rax,1)
  jmp    L141
  movslq %r13d,%rax
  subb   $0x1,0x40000(%rsp,%rax,1)
  jmp    L141
  movslq %r13d,%rax
  cmpb   $0x0,0x40000(%rsp,%rax,1)
  jne    L141
  movslq %ebx,%rbx
  mov    (%rsp,%rbx,4),%ebx
  jmp    L141
  movslq %r13d,%rax
  cmpb   $0x0,0x40000(%rsp,%rax,1)
  je     L141
  movslq %ebx,%rbx
  mov    (%rsp,%rbx,4),%ebx
  jmp    L141
  movslq %r13d,%rax
  movzbl 0x40000(%rsp,%rax,1),%edi
  call   <putchar@plt>
  jmp    L141
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xd,%al
  je     L273
  movslq %r13d,%rdx
  mov    %al,0x40000(%rsp,%rdx,1)
  jmp    L141
L273:
  movslq %r13d,%rax
  movb   $0xa,0x40000(%rsp,%rax,1)
  jmp    L141
L71:
  mov    $0x0,%eax
  jmp    L237
L76:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D3
data_type: string

tool: D3: usage bfi ">[brainfuckcode]<.,+-"


assistant: ```c
int main(int argc, char **argv) {
  if (argc == 1) {
    puts("usage bfi \">[brainfuckcode]<.,+-\"\n");
    return 0;
  } else if (argc == 2) {
    int i, ptr = 0;
    unsigned char data[65536];
    unsigned int jump[65536];
    for (i = 0;; i++) {
      if (!argv[1][i])
        break;
      if (argv[1][i] == '[') {
        int o = i, skip = 0;
        for (;;) {
          i++;
          if (argv[1][i] == '[')
            skip++;
          else if (argv[1][i] == ']') {
            if (skip > 0) {
              skip--;
            } else {
              jump[o] = i;
              jump[i] = o;
              i = o;
              break;
            }
          }
        }
      }
    }
    for (i = 0;; i++) {
      switch (argv[1][i]) {
      case '>':
        ptr++;
        break;
      case '<':
        ptr--;
        break;
      case '+':
        data[ptr]++;
        break;
      case '-':
        data[ptr]--;
        break;
      case '[':
        if (data[ptr] == 0)
          i = jump[i];
        break;
      case ']':
        if (data[ptr] != 0)
          i = jump[i];
        break;
      case '.':
        putchar(data[ptr]);
        break;
      case ',':
        data[ptr] = getchar();
        if (data[ptr] == 13)
          data[ptr] = 10;
        break;
      case 0:
        return 0;
      }
    }
  }
  return 1;
}
```