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

```asm
<SplitByLine>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L63
  mov    $0x0,%eax
  jmp    L81
L63:
  movq   $0x0,-0x20(%rbp)
  jmp    L176
L13:
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L155
  addq   $0x1,-0x8(%rbp)
L155:
  addq   $0x1,-0x20(%rbp)
L176:
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L13
  mov    -0x20(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L171
  addq   $0x1,-0x8(%rbp)
L171:
  mov    -0x8(%rbp),%rax
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  movq   $0x0,-0x18(%rbp)
  jmp    L45
L59:
  movq   $0x0,-0x20(%rbp)
  jmp    L69
L33:
  addq   $0x1,-0x20(%rbp)
L69:
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L30
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L33
L30:
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L3
  subq   $0x1,-0x20(%rbp)
L3:
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    -0x30(%rbp),%rdx
  mov    (%rdx),%rcx
  mov    -0x18(%rbp),%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movq   $0x0,-0x20(%rbp)
  jmp    L124
L143:
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
  addq   $0x1,-0x20(%rbp)
L124:
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L39
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L164
L39:
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L164
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L143
L164:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x20(%rbp),%rax
  add    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x28(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L115
  addq   $0x1,-0x10(%rbp)
L115:
  addq   $0x1,-0x18(%rbp)
L45:
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L59
  mov    -0x8(%rbp),%rax
L81:
  leave
  ret
```

assistant: ```c
unsigned long SplitByLine(char *text, char ***list) {
  unsigned long x, y, pos = 0, lines = 0;
  if (text == NULL)
    return 0;
  for (x ^= x; text[x] != 0; x++) {
    if (text[x] == '\n')
      lines++;
  }
  if (text[x - 1] != '\n')
    lines++;
  *list = (char **)malloc(lines * sizeof(char **));
  for (y ^= y; y < lines; y++) {
    for (x ^= x; text[pos + x] != '\n' && text[pos + x] != 0; x++)
      ;
    if (text[pos + x - 1] == '\r')
      x--;
    (*list)[y] = (char *)malloc(x + 1);
    for (x ^= x; !(text[pos + x] == '\r' && text[pos + x + 1] == '\n') && text[pos + x] != '\n' && text[pos + x] != 0; x++)
      *((*list)[y] + x) = text[pos + x];
    *((*list)[y] + x) = 0;
    pos += x;
    if (text[pos++] == '\r')
      pos++;
  }
  return lines;
}
```