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

```asm
<normalizePath>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  je     L150
  mov    %rdi,%r13
  mov    %esi,%r12d
  lea    0x1(%rsi),%edi
  mov    %edx,%ebx
  cmp    $0x2,%edx
  jle    L183
  call   <malloc@plt>
  mov    %ebx,%edx
  mov    %r13,%rsi
  movl   $0x0,0x4(%rsp)
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <memcpy@plt>
  add    %ebx,0x4(%rsp)
L18:
  cmp    %ebx,%r12d
  jg     L6
  jmp    L140
  nopl   0x0(%rax)
L148:
  movslq 0x4(%rsp),%rax
  lea    0x1(%rax),%edx
  mov    %edx,0x4(%rsp)
  mov    %bl,(%r14,%rax,1)
  mov    %r15d,%ebx
  cmp    %r12d,%ebx
  jge    L140
L6:
  lea    0x1(%rbx),%r15d
  movslq %ebx,%rbx
  movsbl 0x0(%r13,%rbx,1),%edi
  mov    %edi,%ebx
  call   <isSlash@plt>
  test   %rax,%rax
  je     L148
  cmp    %r15d,%r12d
  jle    L225
  movslq %r15d,%rbp
  mov    %r15d,%ebx
  add    %r13,%rbp
  jmp    L106
  nopl   (%rax)
L4:
  add    $0x1,%ebx
  add    $0x1,%rbp
  cmp    %ebx,%r12d
  je     L94
L106:
  movsbl 0x0(%rbp),%edi
  call   <isSlash@plt>
  test   %rax,%rax
  jne    L4
L26:
  movslq 0x4(%rsp),%rax
  cmp    %ebx,%r12d
  je     L33
  lea    0x1(%rax),%edx
  mov    %edx,0x4(%rsp)
  movb   $0x5c,(%r14,%rax,1)
  cmp    %r12d,%ebx
  jl     L6
L140:
  movslq 0x4(%rsp),%rax
L2:
  movb   $0x0,(%r14,%rax,1)
L150:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0x18,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L183:
  call   <malloc@plt>
  lea    0x4(%rsp),%rcx
  mov    %r12d,%esi
  mov    %r13,%rdi
  mov    %rax,%rdx
  movl   $0x0,0x4(%rsp)
  mov    %rax,%r14
  call   <normalizePrefix@plt>
  mov    %eax,%ebx
  jmp    L18
L225:
  mov    %r15d,%ebx
  jmp    L26
  nopw   0x0(%rax,%rax,1)
L94:
  movslq 0x4(%rsp),%rax
L33:
  cmp    $0x2,%eax
  je     L167
  test   %eax,%eax
  jne    L20
  movl   $0x1,0x4(%rsp)
  movb   $0x5c,(%r14)
  movslq 0x4(%rsp),%rax
  jmp    L2
L167:
  cmpb   $0x3a,0x1(%r14)
  jne    L2
  movl   $0x3,0x4(%rsp)
  movb   $0x5c,0x2(%r14)
  movslq 0x4(%rsp),%rax
  jmp    L2
L20:
  cmp    $0x1,%eax
  jne    L2
  movsbl (%r14),%edi
  call   <isSlash@plt>
  test   %rax,%rax
  movslq 0x4(%rsp),%rax
  je     L2
  lea    0x1(%rax),%edx
  mov    %edx,0x4(%rsp)
  movb   $0x5c,(%r14,%rax,1)
  movslq 0x4(%rsp),%rax
  jmp    L2
L54:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *normalizePath(const char *path, int len, int off) {
  int src;
  char *sb;
  int sbLen;
  if (len == 0)
    return (char *)path;
  if (off < 3)
    off = 0;
  sb = (char *)malloc(len + 1);
  sbLen = 0;
  if (off == 0) {
    src = normalizePrefix(path, len, sb, &sbLen);
  } else {
    src = off;
    memcpy(sb + sbLen, path, off);
    sbLen += off;
  }
  while (src < len) {
    char c = path[src++];
    if (isSlash(c)) {
      while ((src < len) && isSlash(path[src]))
        src++;
      if (src == len) {
        if ((sbLen == 2) && (sb[1] == ':')) {
          sb[sbLen++] = '\\';
          break;
        }
        if (sbLen == 0) {
          sb[sbLen++] = '\\';
          break;
        }
        if ((sbLen == 1) && (isSlash(sb[0]))) {
          sb[sbLen++] = '\\';
          break;
        }
        break;
      } else {
        sb[sbLen++] = '\\';
      }
    } else {
      sb[sbLen++] = c;
    }
  }
  sb[sbLen] = '\0';
  return sb;
}
```