user: Demonstrate the C code that generates the assembly output below:

```asm
<paint_rval_text>:
  endbr64
  push   %r15
  mov    %esi,%r9d
  lea    0xb(%r8),%r15d
  push   %r14
  shr    $0x3,%r9d
  mov    %ecx,%r14d
  push   %r13
  and    $0x1,%r9d
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  mov    %esi,%edx
  push   %rbp
  and    $0x30,%edx
  push   %rbx
  mov    %esi,%ebx
  sub    $0x18,%rsp
  and    $0x1,%ebx
  je     L3
  test   %edx,%edx
  je     L84
L31:
  xor    %eax,%eax
  mov    %r12d,%edi
  mov    %r9d,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  call   <cmalloc@plt>
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%r9d
  movslq %eax,%rbp
  cmp    $0x10,%edx
  je     L345
  cmp    $0x20,%edx
  je     L132
L43:
  sub    $0x8,%rsp
  xor    %eax,%eax
  mov    %ebx,%r8d
  mov    %r12d,%ecx
  push   $0x1
  mov    %r13,%rdx
  mov    %r15d,%esi
  mov    %r14d,%edi
  mov    %r9d,0x18(%rsp)
  call   <omshell_terminaldrawimagestring@plt>
  test   %ebx,%ebx
  pop    %r9
  pop    %r10
  mov    0x8(%rsp),%r9d
  jne    L336
L320:
  add    $0x18,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free@plt>
  nopl   0x0(%rax,%rax,1)
L3:
  test   %edx,%edx
  jne    L31
  sub    $0x8,%rsp
  mov    %rdi,%rdx
  mov    %r12d,%ecx
  mov    %r15d,%esi
  push   $0x0
  mov    %r14d,%edi
  xor    %r8d,%r8d
  xor    %eax,%eax
  call   <omshell_terminaldrawimagestring@plt>
  pop    %rax
  pop    %rdx
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L345:
  test   %r12d,%r12d
  jle    L43
  lea    0x1(%r13),%rcx
  mov    %rbp,%rdx
  mov    %rbp,%rax
  sub    %rcx,%rdx
  cmp    $0xe,%rdx
  jbe    L155
  lea    -0x1(%r12),%edx
  cmp    $0xe,%edx
  jbe    L155
  mov    %r12d,%edx
  mov    %r13,%rcx
  movdqa D4(%rip),%xmm2
  movdqa D0(%rip),%xmm3
  shr    $0x4,%edx
  sub    %rbp,%rcx
  shl    $0x4,%rdx
  add    %rbp,%rdx
  nopl   0x0(%rax)
L312:
  movdqu (%rax,%rcx,1),%xmm0
  movdqu (%rax,%rcx,1),%xmm4
  movdqa %xmm3,%xmm1
  add    $0x10,%rax
  pcmpeqb %xmm2,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm4,%xmm0
  por    %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L312
  mov    %r12d,%eax
  and    $0xfffffff0,%eax
  test   $0xf,%r12b
  je     L43
  mov    %eax,%esi
  mov    $0x1e,%edx
  movzbl 0x0(%r13,%rsi,1),%ecx
  cmp    $0x23,%cl
  cmove  %edx,%ecx
  mov    %cl,0x0(%rbp,%rsi,1)
  lea    0x1(%rax),%ecx
  cmp    %ecx,%r12d
  jle    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  mov    %sil,0x0(%rbp,%rcx,1)
  lea    0x2(%rax),%ecx
  cmp    %r12d,%ecx
  jge    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  mov    %sil,0x0(%rbp,%rcx,1)
  lea    0x3(%rax),%ecx
  cmp    %ecx,%r12d
  jle    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  mov    %sil,0x0(%rbp,%rcx,1)
  lea    0x4(%rax),%ecx
  cmp    %ecx,%r12d
  jle    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  mov    %sil,0x0(%rbp,%rcx,1)
  lea    0x5(%rax),%ecx
  cmp    %ecx,%r12d
  jle    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  mov    %sil,0x0(%rbp,%rcx,1)
  lea    0x6(%rax),%ecx
  cmp    %ecx,%r12d
  jle    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  mov    %sil,0x0(%rbp,%rcx,1)
  lea    0x7(%rax),%ecx
  cmp    %ecx,%r12d
  jle    L43
  movslq %ecx,%rcx
  movzbl 0x0(%r13,%rcx,1),%esi
  cmp    $0x23,%sil
  cmove  %edx,%esi
  lea    0x8(%rax),%edx
  mov    %sil,0x0(%rbp,%rcx,1)
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  mov    $0x1e,%ecx
  movzbl 0x0(%r13,%rdx,1),%esi
  cmp    $0x23,%sil
  cmove  %ecx,%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x9(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%esi
  cmp    $0x23,%sil
  cmove  %ecx,%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xa(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%esi
  cmp    $0x23,%sil
  cmove  %ecx,%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xb(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%esi
  cmp    $0x23,%sil
  cmove  %ecx,%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xc(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%esi
  cmp    $0x23,%sil
  cmove  %ecx,%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0xd(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%esi
  cmp    $0x23,%sil
  cmove  %ecx,%esi
  add    $0xe,%eax
  mov    %sil,0x0(%rbp,%rdx,1)
  cmp    %eax,%r12d
  jle    L43
  cltq
  movzbl 0x0(%r13,%rax,1),%edx
  cmp    $0x23,%dl
  cmove  %ecx,%edx
  mov    %dl,0x0(%rbp,%rax,1)
  jmp    L43
  nopw   0x0(%rax,%rax,1)
L84:
  sub    $0x8,%rsp
  mov    %r12d,%ecx
  mov    %rdi,%rdx
  mov    %r15d,%esi
  push   $0x0
  mov    %r14d,%edi
  mov    $0x1,%r8d
  xor    %eax,%eax
  mov    %r9d,0x18(%rsp)
  call   <omshell_terminaldrawimagestring@plt>
  mov    0x18(%rsp),%r9d
  mov    %r12d,%ecx
  mov    %r15d,%esi
  lea    0x1(%r14),%edi
  mov    %r13,%rdx
  mov    $0x1,%r8d
  xor    %eax,%eax
  movl   $0x0,(%rsp)
  call   <omshell_terminaldrawimagestring@plt>
  pop    %rcx
  pop    %rsi
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L336:
  sub    $0x8,%rsp
  lea    0x1(%r14),%edi
  mov    $0x1,%r8d
  xor    %eax,%eax
  push   $0x1
  mov    %r12d,%ecx
  mov    %r13,%rdx
  mov    %r15d,%esi
  call   <omshell_terminaldrawimagestring@plt>
  pop    %rdi
  pop    %r8
  jmp    L320
  nopl   0x0(%rax,%rax,1)
L155:
  mov    %r12d,%ecx
  mov    %r13,%rsi
  mov    %rbp,%rax
  add    %rbp,%rcx
  sub    %rbp,%rsi
L489:
  movzbl (%rsi,%rax,1),%edx
  cmp    $0x23,%dl
  je     L348
  mov    %dl,(%rax)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L489
  jmp    L43
  nopl   0x0(%rax)
L132:
  test   %r12d,%r12d
  jle    L43
  lea    0x1(%r13),%rcx
  mov    %rbp,%rdx
  mov    %rbp,%rax
  sub    %rcx,%rdx
  cmp    $0xe,%rdx
  jbe    L478
  lea    -0x1(%r12),%edx
  cmp    $0xe,%edx
  jbe    L478
  mov    %r12d,%edx
  mov    %r13,%rcx
  movdqa D0(%rip),%xmm3
  movdqa D38(%rip),%xmm7
  shr    $0x4,%edx
  movdqa D45(%rip),%xmm6
  sub    %rbp,%rcx
  pxor   %xmm4,%xmm4
  shl    $0x4,%rdx
  movdqa D25(%rip),%xmm5
  add    %rbp,%rdx
  nopl   (%rax)
L59:
  movdqu (%rax,%rcx,1),%xmm2
  add    $0x10,%rax
  movdqa %xmm2,%xmm0
  movdqa %xmm2,%xmm1
  paddb  %xmm7,%xmm0
  pand   %xmm6,%xmm1
  psubusb %xmm3,%xmm0
  paddb  %xmm5,%xmm1
  pcmpeqb %xmm4,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm2,%xmm0
  por    %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L59
  mov    %r12d,%eax
  and    $0xfffffff0,%eax
  test   $0xf,%r12b
  je     L43
  mov    %eax,%esi
  movzbl 0x0(%r13,%rsi,1),%edx
  mov    %edx,%ecx
  lea    -0x60(%rdx),%edi
  and    $0x1f,%ecx
  add    $0x1,%ecx
  cmp    $0x1f,%dil
  cmovb  %ecx,%edx
  mov    %dl,0x0(%rbp,%rsi,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x6(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x7(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x8(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x9(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0xa(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0xb(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0xc(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0xd(%rax),%edx
  cmp    %edx,%r12d
  jle    L43
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %ecx,%esi
  lea    -0x60(%rcx),%edi
  and    $0x1f,%esi
  add    $0x1,%esi
  cmp    $0x1f,%dil
  cmovb  %esi,%ecx
  add    $0xe,%eax
  mov    %cl,0x0(%rbp,%rdx,1)
  cmp    %eax,%r12d
  jle    L43
  cltq
  movzbl 0x0(%r13,%rax,1),%edx
  mov    %edx,%ecx
  lea    -0x60(%rdx),%esi
  and    $0x1f,%ecx
  add    $0x1,%ecx
  cmp    $0x1f,%sil
  cmovb  %ecx,%edx
  mov    %dl,0x0(%rbp,%rax,1)
  jmp    L43
  xchg   %ax,%ax
L478:
  mov    %r12d,%ecx
  mov    %r13,%rdi
  mov    %rbp,%rax
  add    %rbp,%rcx
  sub    %rbp,%rdi
L182:
  movzbl (%rdi,%rax,1),%edx
  lea    -0x60(%rdx),%esi
  cmp    $0x1e,%sil
  ja     L318
  and    $0x1f,%edx
  add    $0x1,%rax
  add    $0x1,%edx
  mov    %dl,-0x1(%rax)
  cmp    %rcx,%rax
  jne    L182
  jmp    L43
  nopl   0x0(%rax,%rax,1)
L348:
  movb   $0x1e,(%rax)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L489
  jmp    L43
  nopl   (%rax)
L318:
  mov    %dl,(%rax)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L182
  jmp    L43
```

tool_calls: name: retrieve_data
arguments: tag: D4
type: byte[16]
name: retrieve_data
arguments: tag: D0
type: byte[16]
name: retrieve_data
arguments: tag: D38
type: byte[16]
name: retrieve_data
arguments: tag: D45
type: byte[16]
name: retrieve_data
arguments: tag: D25
type: byte[16]

tool: {"D4": [0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23]}

tool: {"D0": [0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e]}

tool: {"D38": [0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0]}

tool: {"D45": [0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f]}

tool: {"D25": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

assistant: ```c
void paint_rval_text(str, rval, len, x, y) unsigned char *str;
int rval;
int len, x, y;
{
  unsigned char *buf;
  int overstrike;
  int i;
  int b = 0, inverso = 0;
  if (rval & 0x08) {
    inverso = 1;
  }
  overstrike = 0;
  if (rval & 0x01) {
    b = 1;
    if (0) {
      y += 11;
    } else {
      overstrike = 1;
      y += 11;
    }
  } else
    y += 11;
  if ((rval & 0x30) == 0x00) {
    omshell_terminaldrawimagestring(x, y, str, len, b, inverso, 0);
    if (overstrike) {
      omshell_terminaldrawimagestring(x + 1, y, str, len, b, inverso, 0);
    }
  } else {
    buf = (unsigned char *)cmalloc(len);
    if ((rval & 0x30) == 0x10) {
      for (i = 0; i < len; i++)
        buf[i] = (str[i] == '#') ? 036 : str[i];
    } else if ((rval & 0x30) == 0x20) {
      for (i = 0; i < len; i++)
        if (str[i] >= 0140 && str[i] <= 0176)
          buf[i] = (str[i] & 037) + 1;
        else
          buf[i] = str[i];
    }
    omshell_terminaldrawimagestring(x, y, str, len, b, inverso, 1);
    if (overstrike)
      omshell_terminaldrawimagestring(x + 1, y, str, len, b, inverso, 1);
    free((void *)buf);
  }
  y++;
  if (rval & 0x02) {
  }
  if (rval & 0x08) {
  }
  if (rval & 0x01) {
  }
}
```