user: 请将以下的汇编代码转换成C语言代码:

```asm
<norm>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  mov    %rdx,%rdi
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x810,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x808(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  xor    %edi,%edi
  cmp    %r12d,%eax
  setle  %dil
  call   <assert@plt>
  movzbl (%rbx),%eax
  mov    %rbp,%rsi
  xor    %ecx,%ecx
  xor    %r8d,%r8d
  lea    D15(%rip),%r10
  lea    D24(%rip),%rdi
  lea    D2(%rip),%r9
  nopl   0x0(%rax)
L262:
  test   %al,%al
  je     L84
L128:
  cmp    $0x2e,%al
  je     L273
  cmp    $0x2f,%al
  jne    L141
  cmp    $0x4,%ecx
  ja     L128
  movslq (%r9,%rcx,4),%rdx
  add    %r9,%rdx
  notrack jmp *%rdx
  nopw   0x0(%rax,%rax,1)
L141:
  cmp    $0x4,%ecx
  ja     L262
  mov    %ecx,%edx
  movslq (%rdi,%rdx,4),%rdx
  add    %rdi,%rdx
  notrack jmp *%rdx
  nopl   0x0(%rax)
  mov    $0x2,%edx
L154:
  sub    $0x1,%edx
  cmp    $0x1,%edx
  jbe    L17
  cmp    $0x1,%r8d
  jbe    L31
  sub    $0x2,%r8d
  mov    $0x1,%ecx
  movslq %r8d,%rdx
  mov    (%rsp,%rdx,8),%rsi
  test   %al,%al
  jne    L128
  nopw   0x0(%rax,%rax,1)
L84:
  movb   $0x0,(%rsi)
  xor    %eax,%eax
L69:
  mov    0x808(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L56
  add    $0x810,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
  mov    $0x2,%ecx
L152:
  add    $0x1,%rbx
  cmp    $0x1,%ecx
  je     L115
  cmp    $0x2,%ecx
  jne    L85
  movslq %r8d,%rdx
  mov    %al,(%rsi)
  add    $0x1,%r8d
  movzbl (%rbx),%eax
  mov    %rsi,(%rsp,%rdx,8)
  mov    $0x4,%ecx
  add    $0x1,%rsi
  jmp    L262
  nopl   (%rax)
  mov    $0x2,%edx
L211:
  lea    0x1(%rsi),%rcx
  sub    $0x1,%edx
  mov    %al,(%rsi)
  add    $0x1,%rbx
  mov    %rcx,%rsi
  cmp    $0x1,%edx
  jbe    L226
L85:
  movzbl (%rbx),%eax
  mov    $0x1,%ecx
  jmp    L262
  nop
  cmp    $0x1,%ecx
  je     L173
  cmp    $0x2,%ecx
  je     L17
  test   %r8d,%r8d
  je     L31
  sub    $0x1,%r8d
  mov    $0x1,%ecx
  movslq %r8d,%rdx
  mov    (%rsp,%rdx,8),%rsi
  jmp    L262
  nopl   0x0(%rax)
L17:
  add    $0x1,%rbx
  mov    %al,(%rsi)
  mov    $0x4,%ecx
  add    $0x1,%rsi
  movzbl (%rbx),%eax
  jmp    L262
  nop
L226:
  movzbl (%rbx),%eax
  mov    $0x4,%ecx
  jmp    L262
  nopl   (%rax)
L173:
  add    $0x1,%rbx
  mov    %al,(%rsi)
  mov    $0x3,%ecx
  add    $0x1,%rsi
  movzbl (%rbx),%eax
  jmp    L262
  nopw   0x0(%rax,%rax,1)
L115:
  movslq %r8d,%rdx
  mov    %al,(%rsi)
  add    $0x1,%r8d
  movzbl (%rbx),%eax
  mov    %rsi,(%rsp,%rdx,8)
  mov    $0x2,%ecx
  add    $0x1,%rsi
  jmp    L262
L31:
  movb   $0x0,0x0(%rbp)
  mov    $0xffffffff,%eax
  jmp    L69
  nopl   0x0(%rax)
  add    $0x1,%rbx
  mov    %al,(%rsi)
  mov    $0x1,%ecx
  add    $0x1,%rsi
  movzbl (%rbx),%eax
  jmp    L262
  xor    %edx,%edx
  jmp    L211
L273:
  cmp    $0x4,%ecx
  ja     L128
  mov    %ecx,%edx
  movslq (%r10,%rdx,4),%rdx
  add    %r10,%rdx
  notrack jmp *%rdx
L56:
  call   <__stack_chk_fail@plt>
  mov    $0x1,%edx
  jmp    L154
  mov    $0x1,%edx
  jmp    L211
  xor    %edx,%edx
  jmp    L154
  xor    %ecx,%ecx
  jmp    L152
```

assistant: ```c
int norm(char *dest, int len, const char *src) {
  const char *s = src;
  char *d = dest;
  char *stk[256];
  int top = 0;
  enum { L0, L1, L2, L3, L4 } state = L0;
  assert(strlen(src) <= len);
  while (*s) {
    char c = *s;
    enum { slash, dot, other } cls;
    switch (c) {
    case '/': {
      cls = slash;
      break;
    }
    case '.': {
      cls = dot;
      break;
    }
    default: {
      cls = other;
    }
    }
    switch (state) {
    case L0: {
      switch (cls) {
      case slash: {
        do {
          *d++ = *s++;
        } while (0);
        state = L1;
        break;
      }
      case dot:
      case other: {
        dest[0] = '\0';
        return -1;
      }
      }
      break;
    }
    case L1: {
      switch (cls) {
      case slash: {
        do {
          s++;
        } while (0);
        break;
      }
      case dot: {
        do {
          do {
            stk[top++] = d;
          } while (0);
        } while (0);
        do {
          *d++ = *s++;
        } while (0);
        state = L2;
        break;
      }
      case other: {
        do {
          do {
            stk[top++] = d;
          } while (0);
        } while (0);
        do {
          *d++ = *s++;
        } while (0);
        state = L4;
        break;
      }
      }
      break;
    }
    case L2: {
      switch (cls) {
      case slash: {
        do {
          do {
            if (top == 0) {
              dest[0] = '\0';
              return -1;
            }
            d = stk[--top];
          } while (0);
        } while (0);
        state = L1;
        break;
      }
      case dot: {
        do {
          *d++ = *s++;
        } while (0);
        state = L3;
        break;
      }
      case other: {
        do {
          *d++ = *s++;
        } while (0);
        state = L4;
        break;
      }
      }
      break;
    }
    case L3: {
      switch (cls) {
      case slash: {
        do {
          do {
            if (top == 0) {
              dest[0] = '\0';
              return -1;
            }
            d = stk[--top];
          } while (0);
          do {
            if (top == 0) {
              dest[0] = '\0';
              return -1;
            }
            d = stk[--top];
          } while (0);
        } while (0);
        state = L1;
        break;
      }
      case dot:
      case other: {
        do {
          *d++ = *s++;
        } while (0);
        state = L4;
        break;
      }
      }
      break;
    }
    case L4: {
      switch (cls) {
      case slash: {
        do {
          *d++ = *s++;
        } while (0);
        state = L1;
        break;
      }
      case dot:
      case other: {
        do {
          *d++ = *s++;
        } while (0);
        break;
      }
      }
      break;
    }
    }
  }
  *d = '\0';
  return 0;
}
```