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

```asm
<collapse_continuations>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r15
  mov    %rdi,0x8(%rsp)
  mov    $0xa,%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L282
  mov    %rax,%rbp
  mov    %rax,%rbx
  cmp    %rax,%r15
  jae    L27
L106:
  cmpb   $0x5c,-0x1(%rbx)
  jne    L27
  sub    $0x1,%rbx
  cmp    %rbx,0x8(%rsp)
  jne    L106
  mov    0x8(%rsp),%rbx
L27:
  cmpb   $0x0,0x0(%rbp)
  je     L109
  mov    0x8(%rsp),%rax
  sub    $0x1,%rax
  mov    %rax,(%rsp)
  jmp    L235
L252:
  sub    $0x1,%r12
  cmp    %r12,(%rsp)
  je     L7
L243:
  cmpb   $0x5c,(%r12)
  jne    L7
  cmp    $0x1,%r13d
  sbb    $0xffffffff,%r14d
  xor    $0x1,%r13d
  cmp    %r15,%rbp
  jne    L252
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L252
L7:
  lea    -0x1(%r14),%eax
  lea    0x1(%rbx,%rax,1),%r12
  test   %r14d,%r14d
  je     L44
L84:
  add    $0x1,%rbx
  movb   $0x5c,-0x1(%rbx)
  cmp    %rbx,%r12
  jne    L84
L180:
  lea    0x1(%rbp),%rdi
  test   %r13d,%r13d
  jne    L291
L302:
  lea    0x1(%r12),%rbx
  movb   $0xa,(%r12)
L94:
  movzbl (%rdi),%eax
  test   %al,%al
  jne    L25
L109:
  movb   $0x0,(%rbx)
L282:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L44:
  mov    %rbx,%r12
  jmp    L180
L291:
  call   <next_token@plt>
  mov    %rax,%rdi
  cmp    %r12,0x8(%rsp)
  jb     L239
  jmp    L13
L158:
  sub    $0x1,%r12
  cmp    %r12,0x8(%rsp)
  je     L114
L239:
  movzbl -0x1(%r12),%eax
  cmp    $0x20,%al
  je     L158
  cmp    $0x9,%al
  je     L158
L13:
  lea    0x1(%r12),%rbx
  movb   $0x20,(%r12)
  jmp    L94
L114:
  mov    0x8(%rsp),%r12
  jmp    L13
L54:
  lea    0x1(%rdi),%rbp
  movzbl 0x1(%rdi),%eax
  cmp    $0x5c,%al
  jne    L319
L62:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%eax
  cmp    $0x5c,%al
  je     L62
L319:
  cmp    $0xa,%al
  je     L155
  cmp    %rbp,%rdi
  jae    L140
  mov    %rbp,%rcx
  sub    %rdi,%rcx
  mov    $0x0,%edx
L18:
  movzbl (%rdi,%rdx,1),%eax
  mov    %al,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rcx,%rdx
  jne    L18
  add    %rcx,%rbx
  mov    %rbp,%rdi
L140:
  movzbl (%rdi),%eax
  test   %al,%al
  je     L109
L25:
  cmp    $0x5c,%al
  je     L54
  add    $0x1,%rdi
  mov    %al,(%rbx)
  lea    0x1(%rbx),%rbx
  jmp    L140
L155:
  cmpb   $0x0,0x0(%rbp)
  je     L109
L235:
  lea    -0x1(%rbp),%r12
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  lea    -0x1(%rbx),%r15
  cmp    %r12,0x8(%rsp)
  jbe    L243
  lea    0x1(%rbp),%rdi
  mov    %rbx,%r12
  jmp    L302
```

assistant: ```c
void collapse_continuations(char *line) {
  register char *in, *out, *p;
  register int backslash;
  register unsigned int bs_write;
  in = strchr(line, '\n');
  if (in == 0)
    return;
  out = in;
  while (out > line && out[-1] == '\\')
    --out;
  while (*in != '\0') {
    backslash = 0;
    bs_write = 0;
    for (p = in - 1; p >= line && *p == '\\'; --p) {
      if (backslash)
        ++bs_write;
      backslash = !backslash;
      if (in == out - 1)
        abort();
    }
    while (bs_write-- > 0)
      *out++ = '\\';
    ++in;
    if (backslash) {
      in = next_token(in);
      while (out > line && (((unsigned char)out[-1]) == ' ' || ((unsigned char)out[-1]) == '\t'))
        --out;
      *out++ = ' ';
    } else
      *out++ = '\n';
    while (*in != '\0')
      if (*in == '\\') {
        p = in + 1;
        while (*p == '\\')
          ++p;
        if (*p == '\n') {
          in = p;
          break;
        }
        while (in < p)
          *out++ = *in++;
      } else
        *out++ = *in++;
  }
  *out = '\0';
}
```