user: Translate the below assembly code into C programming language:

```asm
<getline_wrapped>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r12
  mov    $0x100,%edi
  call   <malloc@plt>
  mov    %eax,%edi
  lea    D55(%rip),%rcx
  mov    $0x1a,%edx
  lea    D44(%rip),%rsi
  call   <do_nofail@plt>
  mov    %rax,%rbp
  mov    $0x0,%ebx
  mov    $0x100,%r14d
L61:
  mov    %r13,%rdi
  call   <getc_unlocked@plt>
  cmp    $0x5c,%eax
  je     L99
  cmp    $0x80,%eax
  je     L15
  cmp    $0xa,%eax
  je     L106
L74:
  lea    0x1(%rbx),%r15d
  movslq %ebx,%rbx
  mov    %al,0x0(%rbp,%rbx,1)
  cmp    %r15d,%r14d
  je     L6
L23:
  mov    %r15d,%ebx
  jmp    L61
L15:
  test   %ebx,%ebx
  je     L11
L106:
  test   %r12,%r12
  je     L77
  addl   $0x1,(%r12)
L77:
  cmp    %ebx,%r14d
  je     L12
L36:
  movslq %ebx,%rbx
  movb   $0x0,0x0(%rbp,%rbx,1)
L49:
  mov    %rbp,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L11:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0x0,%ebp
  jmp    L49
L12:
  lea    0x1(%r14),%esi
  mov    %rbp,%rdi
  call   <realloc@plt>
  mov    %eax,%edi
  lea    D24(%rip),%rcx
  mov    $0x2a,%edx
  lea    D44(%rip),%rsi
  call   <do_nofail@plt>
  mov    %rax,%rbp
  jmp    L36
L99:
  mov    %r13,%rdi
  call   <getc_unlocked@plt>
  cmp    $0xa,%eax
  jne    L74
  mov    %ebx,%r15d
  test   %r12,%r12
  je     L23
  addl   $0x1,(%r12)
  jmp    L23
L6:
  add    %r14d,%r14d
  mov    %r14d,%esi
  mov    %rbp,%rdi
  call   <realloc@plt>
  mov    %eax,%edi
  lea    D40(%rip),%rcx
  mov    $0x3d,%edx
  lea    D44(%rip),%rsi
  call   <do_nofail@plt>
  mov    %rax,%rbp
  jmp    L23
```

tool_calls: name: disassemble_data
arguments: label: D55
data_type: string
name: disassemble_data
arguments: label: D44
data_type: string
name: disassemble_data
arguments: label: D24
data_type: string
name: disassemble_data
arguments: label: D40
data_type: string

tool: D55: malloc(size)

tool: D44: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Distrotech/module-init-tools/refs/heads/master/usermode/module-init-tools-3.12/util.c

tool: D24: realloc(buf, size + 1)

tool: D40: realloc(buf, size)

assistant: ```c
char *getline_wrapped(FILE *file, unsigned int *linenum) {
  int size = 256;
  int i = 0;
  char *buf = do_nofail((malloc(size)), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Distrotech/module-init-tools/refs/heads/master/usermode/module-init-tools-3.12/util.c", 26, "malloc(size)");
  for (;;) {
    int ch = getc_unlocked(file);
    switch (ch) {
    case EOF:
      if (i == 0) {
        free(buf);
        return NULL;
      }
    case '\n':
      if (linenum)
        (*linenum)++;
      if (i == size)
        buf = do_nofail((realloc(buf, size + 1)), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Distrotech/module-init-tools/refs/heads/master/usermode/module-init-tools-3.12/util.c", 42, "realloc(buf, size + 1)");
      buf[i] = '\0';
      return buf;
    case '\\':
      ch = getc_unlocked(file);
      if (ch == '\n') {
        if (linenum)
          (*linenum)++;
        continue;
      }
    default:
      buf[i++] = ch;
      if (i == size) {
        size *= 2;
        buf = do_nofail((realloc(buf, size)), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Distrotech/module-init-tools/refs/heads/master/usermode/module-init-tools-3.12/util.c", 61, "realloc(buf, size)");
      }
    }
  }
}
```