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
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  cmp    $0x1,%edi
  jle    L57
  lea    0x8(%rsi),%rax
  mov    %rax,(%rsp)
  lea    -0x2(%rdi),%eax
  lea    0x10(%rsi,%rax,8),%rax
  mov    %rax,0x8(%rsp)
  lea    0x20(%rsp),%r15
  lea    0x18(%rsp),%r14
  jmp    L183
L141:
  mov    %eax,%edi
  call   <putchar@plt>
  jmp    L198
L12:
  mov    %eax,%edi
  shr    $0xc,%edi
  or     $0xe0,%dil
  call   <putchar@plt>
  mov    %ebp,%edi
  shr    $0x6,%edi
  and    $0x3f,%edi
  or     $0x80,%dil
  call   <putchar@plt>
  mov    %ebp,%edi
  and    $0x3f,%edi
  or     $0x80,%dil
  call   <putchar@plt>
  jmp    L198
L99:
  lea    0x1(%rbx),%rbp
  movsbl (%rbx),%edi
  call   <putchar@plt>
  mov    %rbp,%rbx
L30:
  mov    %r12,%rax
  add    0x18(%rsp),%rax
  cmp    %rax,%rbx
  jae    L127
L35:
  cmpb   $0x3c,(%rbx)
  jne    L99
  cmpb   $0x55,0x1(%rbx)
  jne    L99
  movsbl 0x2(%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L99
  movsbl 0x3(%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L99
  movsbl 0x4(%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L99
  movsbl 0x5(%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L99
  cmpb   $0x3e,0x6(%rbx)
  jne    L99
  lea    0x2(%rbx),%rdi
  mov    $0x10,%edx
  mov    $0x0,%esi
  call   <strtoul@plt>
  mov    %eax,%ebp
  cmp    $0x7f,%eax
  jbe    L141
  cmp    $0x7ff,%eax
  ja     L12
  mov    %eax,%edi
  shr    $0x6,%edi
  or     $0xc0,%dil
  call   <putchar@plt>
  mov    %ebp,%edi
  and    $0x3f,%edi
  or     $0x80,%dil
  call   <putchar@plt>
L198:
  add    $0x7,%rbx
  jmp    L30
L208:
  mov    %r13,%rdi
  call   <fclose@plt>
L109:
  addq   $0x8,(%rsp)
  mov    (%rsp),%rax
  cmp    0x8(%rsp),%rax
  je     L57
L183:
  lea    D3(%rip),%rsi
  mov    (%rsp),%rax
  mov    (%rax),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L109
L127:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L208
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <getline@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L208
  mov    0x18(%rsp),%rbx
  jmp    L35
L57:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L201
  mov    $0x0,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L201:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D3
type_infered: string

tool: D3: r

assistant: ```c
int main(int argc, char *argv[]) {
  int n;
  char *line = NULL;
  size_t len = 0;
  for (n = 1; n < argc; ++n) {
    FILE *fp = fopen(argv[n], "r");
    if (fp == NULL)
      continue;
    while (!feof(fp)) {
      ssize_t cnt = getline(&line, &len, fp);
      char *runp;
      if (cnt <= 0)
        break;
      runp = line;
      do {
        if (runp[0] == '<' && runp[1] == 'U' && isxdigit(runp[2]) && isxdigit(runp[3]) && isxdigit(runp[4]) && isxdigit(runp[5]) && runp[6] == '>') {
          unsigned int val = strtoul(runp + 2, NULL, 16);
          if (val < 128)
            putchar(val);
          else if (val < 0x800) {
            putchar(0xc0 | (val >> 6));
            putchar(0x80 | (val & 0x3f));
          } else {
            putchar(0xe0 | (val >> 12));
            putchar(0x80 | ((val >> 6) & 0x3f));
            putchar(0x80 | (val & 0x3f));
          }
          runp += 7;
        } else
          putchar(*runp++);
      } while (runp < &line[cnt]);
    }
    fclose(fp);
  }
  return 0;
}
```