user: What is the c source code of the assembly code below?

```asm
<Tcl_ConvertElement>:
  endbr64
  mov    %edx,%eax
  and    $0x3,%eax
  cmp    $0x2,%eax
  je     L157
  movzbl (%rdi),%ecx
  test   %cl,%cl
  jne    L279
  lea    0x2(%rsi),%rax
  mov    $0x305c,%ecx
  mov    $0x2,%r8d
  mov    %cx,(%rsi)
  movb   $0x0,(%rax)
  mov    %r8d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L279:
  and    $0x4,%edx
  mov    %rsi,%rax
  je     L37
  movabs $0x800001500000000,%r8
  mov    $0x1,%r9d
  jmp    L105
  cs nopw 0x0(%rax,%rax,1)
L202:
  cmp    $0xa,%cl
  je     L196
  cmp    $0xb,%cl
  jne    L303
  mov    $0x765c,%edx
  add    $0x2,%rax
  mov    %dx,-0x2(%rax)
  nop
L193:
  movzbl 0x1(%rdi),%ecx
  add    $0x1,%rdi
  test   %cl,%cl
  je     L372
L105:
  cmp    $0x3b,%cl
  jg     L62
  cmp    $0xb,%cl
  jle    L202
  mov    %r9,%rdx
  shl    %cl,%rdx
  test   %r8,%rdx
  jne    L292
  cmp    $0xd,%cl
  je     L18
  cmp    $0xc,%cl
  je     L123
L305:
  mov    %cl,(%rax)
  add    $0x1,%rax
  jmp    L193
  nopw   0x0(%rax,%rax,1)
L157:
  movb   $0x7b,(%rsi)
  movzbl (%rdi),%edx
  lea    0x1(%rsi),%rax
  test   %dl,%dl
  je     L222
  xchg   %ax,%ax
L295:
  add    $0x1,%rdi
  mov    %dl,(%rax)
  add    $0x1,%rax
  movzbl (%rdi),%edx
  test   %dl,%dl
  jne    L295
L222:
  movb   $0x7d,(%rax)
  add    $0x1,%rax
  mov    %eax,%r8d
  sub    %esi,%r8d
  movb   $0x0,(%rax)
  mov    %r8d,%eax
  ret
  nopl   (%rax)
L37:
  movabs $0x3800000008000015,%r9
  lea    D2(%rip),%r8
  nopl   0x0(%rax)
L68:
  cmp    $0xd,%cl
  jg     L217
  cmp    $0x8,%cl
  jle    L225
  sub    $0xa,%ecx
  cmp    $0x3,%cl
  ja     L177
  movzbl %cl,%ecx
  movslq (%r8,%rcx,4),%rdx
  add    %r8,%rdx
  notrack jmp *%rdx
  nopl   0x0(%rax,%rax,1)
  mov    $0x765c,%r10d
  add    $0x2,%rax
  mov    %r10w,-0x2(%rax)
  nop
L350:
  movzbl 0x1(%rdi),%ecx
  add    $0x1,%rdi
  test   %cl,%cl
  jne    L68
L372:
  mov    %eax,%r8d
  movb   $0x0,(%rax)
  sub    %esi,%r8d
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax)
  mov    $0x665c,%r10d
  add    $0x2,%rax
  mov    %r10w,-0x2(%rax)
  jmp    L350
  nopl   0x0(%rax)
  mov    $0x725c,%edx
  add    $0x2,%rax
  mov    %dx,-0x2(%rax)
  jmp    L350
  nopw   0x0(%rax,%rax,1)
  mov    $0x6e5c,%r11d
  add    $0x2,%rax
  mov    %r11w,-0x2(%rax)
  jmp    L350
  nopl   0x0(%rax)
L217:
  lea    -0x20(%rcx),%edx
  cmp    $0x3d,%dl
  ja     L225
  bt     %rdx,%r9
  jb     L85
L225:
  mov    %cl,(%rax)
  add    $0x1,%rax
  jmp    L350
  nopl   (%rax)
L62:
  cmp    $0x7b,%cl
  je     L112
  jle    L260
  cmp    $0x7d,%cl
  jne    L305
L112:
  movb   $0x5c,(%rax)
  add    $0x1,%rax
  movzbl (%rdi),%ecx
  jmp    L305
  nopw   0x0(%rax,%rax,1)
L303:
  cmp    $0x9,%cl
  jne    L305
  mov    $0x745c,%ecx
  add    $0x2,%rax
  mov    %cx,-0x2(%rax)
  jmp    L193
L260:
  lea    -0x5b(%rcx),%edx
  cmp    $0x2,%dl
  ja     L305
L292:
  movb   $0x5c,(%rax)
  add    $0x1,%rax
  movzbl (%rdi),%ecx
  jmp    L305
  cs nopw 0x0(%rax,%rax,1)
L196:
  mov    $0x6e5c,%r11d
  add    $0x2,%rax
  mov    %r11w,-0x2(%rax)
  jmp    L193
L123:
  mov    $0x665c,%edx
  add    $0x2,%rax
  mov    %dx,-0x2(%rax)
  jmp    L193
  cs nopw 0x0(%rax,%rax,1)
L85:
  movb   $0x5c,(%rax)
  add    $0x1,%rax
  movzbl (%rdi),%ecx
  jmp    L225
L18:
  mov    $0x725c,%r10d
  add    $0x2,%rax
  mov    %r10w,-0x2(%rax)
  jmp    L193
  nopl   0x0(%rax,%rax,1)
L177:
  mov    $0x745c,%ecx
  add    $0x2,%rax
  mov    %cx,-0x2(%rax)
  jmp    L350
```

assistant: ```c
int Tcl_ConvertElement(src, dst, flags)
register char *src;
char *dst;
int flags;
{
  register char *p = dst;
  if ((flags & 2) && !(flags & 1)) {
    *p = '{';
    p++;
    for (; *src != 0; src++, p++) {
      *p = *src;
    }
    *p = '}';
    p++;
  } else if (*src == 0) {
    p[0] = '\\';
    p[1] = '0';
    p += 2;
  } else {
    for (; *src != 0; src++) {
      switch (*src) {
      case ']':
      case '[':
      case '$':
      case ';':
      case ' ':
      case '\\':
      case '"':
        *p = '\\';
        p++;
        break;
      case '{':
      case '}':
        if (flags & 4) {
          *p = '\\';
          p++;
        }
        break;
      case '\f':
        *p = '\\';
        p++;
        *p = 'f';
        p++;
        continue;
      case '\n':
        *p = '\\';
        p++;
        *p = 'n';
        p++;
        continue;
      case '\r':
        *p = '\\';
        p++;
        *p = 'r';
        p++;
        continue;
      case '\t':
        *p = '\\';
        p++;
        *p = 't';
        p++;
        continue;
      case '\v':
        *p = '\\';
        p++;
        *p = 'v';
        p++;
        continue;
      }
      *p = *src;
      p++;
    }
  }
  *p = '\0';
  return p - dst;
}
```