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

```asm
<txt2html>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rcx,%rcx
  jle    L74
  mov    %rsi,%r14
  mov    %rdi,%rbx
  lea    D57(%rip),%rsi
  mov    %rdx,%rdi
  mov    %rdx,%r15
  mov    %rcx,%r13
  call   <strcpy@plt>
  test   %r14,%r14
  jle    L154
  lea    (%rbx,%r14,1),%rax
  mov    $0x1,%r12d
  xor    %r11d,%r11d
  mov    %rax,0x8(%rsp)
  jmp    L79
  nopl   0x0(%rax,%rax,1)
L29:
  cmp    $0x3c,%dl
  je     L67
  ja     L44
  lea    D68(%rip),%rsi
  mov    $0x5,%ebp
  cmp    $0xa,%dl
  je     L155
  cmp    $0x26,%dl
  lea    D3(%rip),%rsi
  sete   %bpl
  cmovne %rbx,%rsi
  movzbl %bpl,%ebp
  lea    0x1(,%rbp,4),%ebp
L155:
  lea    0x0(%rbp,%r11,1),%r14d
  movslq %r14d,%rax
  cmp    %r13,%rax
  jge    L152
L91:
  mov    %ebp,%edx
  mov    %r15,%rdi
  movslq %ebp,%rbp
  add    $0x1,%rbx
  call   <strncpy@plt>
  add    %rbp,%r15
  mov    %r12d,%ecx
  mov    %r12,%rdx
  add    $0x1,%r12
  cmp    0x8(%rsp),%rbx
  je     L153
  mov    %r14d,%r11d
L79:
  movzbl (%rbx),%edx
  lea    -0x1(%r12),%ecx
  cmp    $0x9f,%dl
  jbe    L29
  lea    0x21(%rsp),%rbp
  lea    D39(%rip),%rsi
  mov    %ecx,0x14(%rsp)
  mov    %rbp,%rdi
  mov    %r11d,0x10(%rsp)
  call   <sprintf@plt>
  mov    0x10(%rsp),%r11d
  mov    %rbp,%rsi
  mov    0x14(%rsp),%ecx
  mov    $0x6,%ebp
  lea    0x0(%rbp,%r11,1),%r14d
  movslq %r14d,%rax
  cmp    %r13,%rax
  jl     L91
L152:
  movslq %ecx,%rdx
  mov    %r11d,%r13d
  mov    %rdx,%r14
L148:
  lea    D57(%rip),%rsi
  mov    %r15,%rdi
  mov    %rdx,0x8(%rsp)
  call   <strcpy@plt>
  mov    0x8(%rsp),%rdx
  jmp    L27
  cs nopw 0x0(%rax,%rax,1)
L44:
  cmp    $0x3e,%dl
  lea    D16(%rip),%rsi
  sete   %bpl
  cmovne %rbx,%rsi
  movzbl %bpl,%ebp
  lea    0x1(%rbp,%rbp,2),%ebp
  jmp    L155
  nop
L67:
  lea    D33(%rip),%rsi
  mov    $0x4,%ebp
  jmp    L155
  nopl   0x0(%rax)
L74:
  xor    %edx,%edx
  xor    %r13d,%r13d
  xor    %r14d,%r14d
L27:
  mov    %r14d,%r10d
  neg    %r10d
  cmp    %rdx,0x18(%rsp)
  cmovg  %r10d,%r13d
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  add    $0x38,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L153:
  mov    %r14d,%r13d
  mov    %ecx,%r14d
  jmp    L148
L154:
  xor    %edx,%edx
  xor    %r13d,%r13d
  xor    %r14d,%r14d
  jmp    L148
L60:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D57
datatype: string
name: parse_data
arguments: label: D68
datatype: string
name: parse_data
arguments: label: D3
datatype: string
name: parse_data
arguments: label: D39
datatype: string
name: parse_data
arguments: label: D16
datatype: string
name: parse_data
arguments: label: D33
datatype: string

tool: 

tool: D68: <BR>


tool: D3: &amp;

tool: D39: &#%d;

tool: D16: &gt;

tool: D33: &lt;

assistant: ```c
int txt2html(unsigned char *src, long srclen, unsigned char *dst, long dstlen) {
  int si, di, substrlen;
  unsigned char *substr;
  unsigned char tmpstr[7];
  unsigned char *lt = "&lt;";
  unsigned char *gt = "&gt;";
  unsigned char *amp = "&amp;";
  unsigned char *nl = "<BR>\n";
  di = 0;
  si = 0;
  if (dstlen < 0 + 0 + 1)
    goto term;
  strcpy(dst, "");
  dst += 0;
  di += 0;
  for (; si < srclen && di < dstlen; si++, src++) {
    if (*src >= 160) {
      substrlen = 6;
      sprintf(tmpstr, "&#%d;", *src);
      substr = tmpstr;
    } else
      switch (*src) {
      case '<':
        substrlen = 4;
        substr = lt;
        break;
      case '>':
        substrlen = 4;
        substr = gt;
        break;
      case '&':
        substrlen = 5;
        substr = amp;
        break;
      case '\n':
        substrlen = 5;
        substr = nl;
        break;
      default:
        substrlen = 1;
        substr = src;
      }
    if (substrlen + di <= dstlen - 0 - 1) {
      strncpy(dst, substr, substrlen);
      dst += substrlen;
      di += substrlen;
    } else {
      break;
    }
  }
  strcpy(dst, "");
  dst += 0;
  di += 0;
term:
  if (si < srclen) {
    return -si;
  } else {
    return di;
  }
}
```