user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<libirc_colorparser_irc2code>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D4(%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)
L72:
  test   %edi,%edi
  jne    L93
  movq   $0x0,0x8(%rsp)
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L326
L169:
  mov    0x10(%rsp),%r15
  lea    0x2c(%rsp),%r14
  lea    0x30(%rsp),%r13
  lea    0x28(%rsp),%r12
  nopl   (%rax)
L338:
  lea    0x1(%r15),%rbp
  cmp    $0x1f,%al
  ja     L196
  movzbl %al,%edx
  movslq (%rbx,%rdx,4),%rdx
  add    %rbx,%rdx
  notrack jmp *%rdx
  nopl   (%rax)
L196:
  cmpq   $0x0,0x8(%rsp)
  je     L21
  mov    0x30(%rsp),%rdx
  lea    0x1(%rdx),%rcx
  mov    %rcx,0x30(%rsp)
  mov    %al,(%rdx)
  movzbl 0x1(%r15),%eax
  test   %al,%al
  je     L193
  nopl   0x0(%rax)
L221:
  mov    %rbp,%r15
  jmp    L338
  nopl   (%rax)
  mov    0x4(%rsp),%edi
  test   %edi,%edi
  jne    L2
  lea    D58(%rip),%r9
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D60(%rip),%r8
  mov    $0x4,%ecx
  call   <libirc_colorparser_applymask@plt>
  nopl   0x0(%rax)
L2:
  movzbl 0x1(%r15),%eax
  test   %al,%al
  jne    L221
  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     L72
L123:
  mov    0x30(%rsp),%rax
  movb   $0x0,(%rax)
L217:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L325
  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    L2
  lea    D55(%rip),%r9
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D42(%rip),%r8
  mov    $0x8,%ecx
  call   <libirc_colorparser_applymask@plt>
  jmp    L2
  xchg   %ax,%ax
  movsbl 0x1(%r15),%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L2
  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     L138
  movsbl 0x2(%r15),%eax
  add    $0x2,%r15
  lea    (%rcx,%rcx,4),%edx
  cmpb   $0x2c,0x1(%r15)
  lea    -0x30(%rax,%rdx,2),%ecx
  je     L140
L242:
  mov    0x4(%rsp),%eax
  lea    0x1(%r15),%rbp
  test   %eax,%eax
  jne    L2
  cmp    $0xf,%ecx
  jg     L2
L276:
  mov    0x1c(%rsp),%r8d
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_applycolor@plt>
L145:
  lea    0x1(%r15),%rbp
  jmp    L2
  nopl   0x0(%rax)
  mov    0x4(%rsp),%r8d
  test   %r8d,%r8d
  jne    L2
  lea    D2(%rip),%r9
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  lea    D61(%rip),%r8
  mov    $0x2,%ecx
  call   <libirc_colorparser_applymask@plt>
  jmp    L2
  nopl   0x0(%rax)
  mov    0x4(%rsp),%ecx
  test   %ecx,%ecx
  jne    L2
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_closetags@plt>
  jmp    L2
  nop
L21:
  addl   $0x1,0x2c(%rsp)
  jmp    L2
  nopw   0x0(%rax,%rax,1)
L93:
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L217
  mov    %rax,0x30(%rsp)
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L169
  lea    0x2c(%rsp),%rdx
  lea    0x30(%rsp),%rsi
  lea    0x28(%rsp),%rdi
  call   <libirc_colorparser_closetags@plt>
  jmp    L123
  nopl   0x0(%rax)
L138:
  mov    %rbp,%r15
  cmpb   $0x2c,0x1(%r15)
  jne    L242
L140:
  movsbl 0x2(%r15),%edi
  mov    %ecx,0x18(%rsp)
  call   <isdigit@plt>
  mov    0x18(%rsp),%ecx
  test   %eax,%eax
  je     L242
  movsbl 0x2(%r15),%edx
  movsbl 0x3(%r15),%edi
  lea    -0x30(%rdx),%ebp
  call   <isdigit@plt>
  mov    0x18(%rsp),%ecx
  test   %eax,%eax
  jne    L167
  add    $0x2,%r15
L147:
  cmp    $0xf,%ecx
  setle  %sil
  cmp    $0xf,%ebp
  setle  %al
  test   %al,%sil
  je     L145
  mov    0x4(%rsp),%edx
  test   %edx,%edx
  jne    L145
  cmp    $0xffffffff,%ebp
  cmove  0x1c(%rsp),%ebp
  mov    %ebp,0x1c(%rsp)
  jmp    L276
  nopl   (%rax)
L326:
  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    L72
L193:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <libirc_colorparser_closetags@plt>
  mov    0x30(%rsp),%rax
  movb   $0x0,(%rax)
  jmp    L217
L167:
  movsbl 0x3(%r15),%eax
  lea    0x0(%rbp,%rbp,4),%edx
  add    $0x3,%r15
  lea    -0x30(%rax,%rdx,2),%ebp
  jmp    L147
L325:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D58
datatype: string
name: parse_data
arguments: tag: D60
datatype: string
name: parse_data
arguments: tag: D55
datatype: string
name: parse_data
arguments: tag: D42
datatype: string
name: parse_data
arguments: tag: D2
datatype: string
name: parse_data
arguments: tag: D61
datatype: string

tool: D58: [/U]

tool: D60: [U]

tool: D55: [/I]

tool: D42: [I]

tool: D2: [/B]

tool: D61: [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;
}
```