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

```asm
<libirc_colorparser_irc2code>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D34(%rip),%rbx
  sub    $0x48,%rsp
  mov    %rdi,0x10(%rsp)
  xor    %edi,%edi
  mov    %esi,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x28(%rsp)
  movl   $0x0,0x2c(%rsp)
  movq   $0x0,0x30(%rsp)
  movl   $0x0,0x1c(%rsp)
  nopl   (%rax)
L249:
  test   %edi,%edi
  jne    L192
  movq   $0x0,0x8(%rsp)
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L205
L11:
  mov    0x10(%rsp),%r15
  lea    0x2c(%rsp),%r14
  lea    0x30(%rsp),%r13
  lea    0x28(%rsp),%r12
  nopl   (%rax)
L316:
  lea    0x1(%r15),%rbp
  cmp    $0x1f,%al
  ja     L89
  movzbl %al,%edx
  movslq (%rbx,%rdx,4),%rdx
  add    %rbx,%rdx
  notrack jmp *%rdx
  nopl   (%rax)
L89:
  cmpq   $0x0,0x8(%rsp)
  je     L3
  mov    0x30(%rsp),%rdx
  lea    0x1(%rdx),%rcx
  mov    %rcx,0x30(%rsp)
  mov    %al,(%rdx)
  movzbl 0x1(%r15),%eax
  test   %al,%al
  je     L100
  nopl   0x0(%rax)
L317:
  mov    %rbp,%r15
  jmp    L316
  nopl   (%rax)
  mov    0x4(%rsp),%edi
  test   %edi,%edi
  jne    L200
  lea    D4(%rip),%r9
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D47(%rip),%r8
  mov    $0x4,%ecx
  call   <libirc_colorparser_applymask@plt>
  nopl   0x0(%rax)
L200:
  movzbl 0x1(%r15),%eax
  test   %al,%al
  jne    L317
  mov    %r12,%rdi
  mov    %r14,%rdx
  mov    %r13,%rsi
  call   <libirc_colorparser_closetags@plt>
  mov    0x2c(%rsp),%eax
  cmpq   $0x0,0x8(%rsp)
  lea    0x1(%rax),%edi
  mov    %edi,0x2c(%rsp)
  je     L249
L69:
  mov    0x30(%rsp),%rax
  movb   $0x0,(%rax)
L347:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L264
  mov    0x8(%rsp),%rax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
  mov    0x4(%rsp),%esi
  test   %esi,%esi
  jne    L200
  lea    D63(%rip),%r9
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D2(%rip),%r8
  mov    $0x8,%ecx
  call   <libirc_colorparser_applymask@plt>
  jmp    L200
  xchg   %ax,%ax
  movsbl 0x1(%r15),%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L200
  movsbl 0x1(%r15),%ecx
  movsbl 0x2(%r15),%edi
  sub    $0x30,%ecx
  mov    %ecx,0x18(%rsp)
  call   <isdigit@plt>
  mov    0x18(%rsp),%ecx
  test   %eax,%eax
  je     L323
  movsbl 0x2(%r15),%eax
  add    $0x2,%r15
  lea    (%rcx,%rcx,4),%edx
  cmpb   $0x2c,0x1(%r15)
  lea    -0x30(%rax,%rdx,2),%ecx
  je     L0
L220:
  mov    0x4(%rsp),%eax
  lea    0x1(%r15),%rbp
  test   %eax,%eax
  jne    L200
  cmp    $0xf,%ecx
  jg     L200
L122:
  mov    0x1c(%rsp),%r8d
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_applycolor@plt>
L197:
  lea    0x1(%r15),%rbp
  jmp    L200
  nopl   0x0(%rax)
  mov    0x4(%rsp),%r8d
  test   %r8d,%r8d
  jne    L200
  lea    D54(%rip),%r9
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D0(%rip),%r8
  mov    $0x2,%ecx
  call   <libirc_colorparser_applymask@plt>
  jmp    L200
  nopl   0x0(%rax)
  mov    0x4(%rsp),%ecx
  test   %ecx,%ecx
  jne    L200
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_closetags@plt>
  jmp    L200
  nop
L3:
  addl   $0x1,0x2c(%rsp)
  jmp    L200
  nopw   0x0(%rax,%rax,1)
L192:
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L347
  mov    %rax,0x30(%rsp)
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L11
  lea    0x2c(%rsp),%rdx
  lea    0x30(%rsp),%rsi
  lea    0x28(%rsp),%rdi
  call   <libirc_colorparser_closetags@plt>
  jmp    L69
  nopl   0x0(%rax)
L323:
  mov    %rbp,%r15
  cmpb   $0x2c,0x1(%r15)
  jne    L220
L0:
  movsbl 0x2(%r15),%edi
  mov    %ecx,0x18(%rsp)
  call   <isdigit@plt>
  mov    0x18(%rsp),%ecx
  test   %eax,%eax
  je     L220
  movsbl 0x2(%r15),%edx
  movsbl 0x3(%r15),%edi
  lea    -0x30(%rdx),%ebp
  call   <isdigit@plt>
  mov    0x18(%rsp),%ecx
  test   %eax,%eax
  jne    L196
  add    $0x2,%r15
L151:
  cmp    $0xf,%ecx
  setle  %sil
  cmp    $0xf,%ebp
  setle  %al
  test   %al,%sil
  je     L197
  mov    0x4(%rsp),%edx
  test   %edx,%edx
  jne    L197
  cmp    $0xffffffff,%ebp
  cmove  0x1c(%rsp),%ebp
  mov    %ebp,0x1c(%rsp)
  jmp    L122
  nopl   (%rax)
L205:
  lea    0x2c(%rsp),%r14
  lea    0x30(%rsp),%r13
  lea    0x28(%rsp),%r12
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_closetags@plt>
  mov    0x2c(%rsp),%eax
  lea    0x1(%rax),%edi
  mov    %edi,0x2c(%rsp)
  jmp    L249
L100:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_closetags@plt>
  mov    0x30(%rsp),%rax
  movb   $0x0,(%rax)
  jmp    L347
L196:
  movsbl 0x3(%r15),%eax
  lea    0x0(%rbp,%rbp,4),%edx
  add    $0x3,%r15
  lea    -0x30(%rax,%rdx,2),%ebp
  jmp    L151
L264:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D4
type_guessed: string
name: disassemble_data
arguments: data_tag: D47
type_guessed: string
name: disassemble_data
arguments: data_tag: D63
type_guessed: string
name: disassemble_data
arguments: data_tag: D2
type_guessed: string
name: disassemble_data
arguments: data_tag: D54
type_guessed: string
name: disassemble_data
arguments: data_tag: D0
type_guessed: string

tool: D4: [/U]

tool: D47: [U]

tool: D63: [/I]

tool: D2: [I]

tool: D54: [/B]

tool: D0: [B]

assistant: ```c
char *libirc_colorparser_irc2code(const char *source, int strip) {
  unsigned int mask = 0, destlen = 0;
  char *destline = 0, *d = 0;
  const char *p;
  int current_bg = 0;
  while (destline == 0) {
    if (destlen > 0) {
      if ((destline = malloc(destlen)) == 0)
        return 0;
      d = destline;
    }
    for (p = source; *p; p++) {
      switch (*p) {
      case 0x02:
        if (strip)
          continue;
        libirc_colorparser_applymask(&mask, &d, &destlen, (1 << 1), "[B]", "[/B]");
        break;
      case 0x1F:
        if (strip)
          continue;
        libirc_colorparser_applymask(&mask, &d, &destlen, (1 << 2), "[U]", "[/U]");
        break;
      case 0x16:
        if (strip)
          continue;
        libirc_colorparser_applymask(&mask, &d, &destlen, (1 << 3), "[I]", "[/I]");
        break;
      case 0x0F:
        if (strip)
          continue;
        libirc_colorparser_closetags(&mask, &d, &destlen);
        break;
      case 0x03:
        if (isdigit(p[1])) {
          int bgcolor = -1, color = p[1] - 0x30;
          p++;
          if (isdigit(p[1])) {
            color = color * 10 + (p[1] - 0x30);
            p++;
          }
          if (p[1] == ',' && isdigit(p[2])) {
            bgcolor = p[2] - 0x30;
            p += 2;
            if (isdigit(p[1])) {
              bgcolor = bgcolor * 10 + (p[1] - 0x30);
              p++;
            }
          }
          if (color <= 15 && bgcolor <= 15) {
            if (strip)
              continue;
            if (bgcolor != -1)
              current_bg = bgcolor;
            libirc_colorparser_applycolor(&mask, &d, &destlen, color, current_bg);
          }
        }
        break;
      default:
        if (destline)
          *d++ = *p;
        else
          destlen++;
        break;
      }
    }
    libirc_colorparser_closetags(&mask, &d, &destlen);
    destlen++;
  }
  *d = '\0';
  return destline;
}
```