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

```asm
<Code2Quality>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x10(%rsp)
  movzbl (%rsi),%r13d
  mov    $0x0,%ebp
  cmp    $0x20,%r13b
  jle    L167
  lea    -0x1(%rdx),%ecx
  mov    %ecx,0x1c(%rsp)
  movzbl 0x1(%rsi),%r14d
  cmp    $0x20,%r14b
  jle    L134
  mov    $0x1,%ebx
  mov    $0x1,%r15d
  mov    $0x0,%r12d
  jmp    L208
L224:
  add    $0x1,%ebx
L2:
  add    $0x1,%r15d
L136:
  movslq %r15d,%rax
  mov    0x10(%rsp),%rsi
  movzbl (%rsi,%rax,1),%r14d
  cmp    $0x20,%r14b
  jle    L268
L208:
  cmp    %r14b,%r13b
  je     L224
  cmp    %r14b,%r12b
  jne    L146
  cmp    $0x20,%ebx
  jle    L1
L146:
  cmp    %ebx,0x1c(%rsp)
  jge    L85
  cmp    $0xff,%ebx
  jg     L243
  mov    %r13d,%edx
  neg    %edx
  movsbl %dl,%edx
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  mov    %ebx,%ecx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  add    %eax,%ebp
  mov    %r13d,%r12d
  mov    %r14d,%r13d
  mov    $0x1,%ebx
  jmp    L2
L1:
  lea    0x2(%r15),%edx
  lea    0x1(%r15),%eax
  cltq
  mov    0x10(%rsp),%rcx
  cmp    %r14b,(%rcx,%rax,1)
  jne    L46
  lea    0x3(%r15),%eax
  cltq
  mov    $0x1,%ecx
L227:
  mov    %ecx,0x18(%rsp)
  add    $0x1,%ecx
  mov    %eax,%r15d
  add    $0x1,%rax
  mov    0x10(%rsp),%rsi
  cmp    %r14b,-0x2(%rsi,%rax,1)
  je     L227
  cmp    $0xff,%ecx
  jg     L378
L345:
  movsbl %bl,%edx
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  add    %eax,%ebp
  mov    $0x0,%r12d
  jmp    L136
L46:
  mov    %edx,%r15d
  mov    $0x1,%ecx
  jmp    L345
L378:
  movsbl %bl,%edx
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  mov    $0xff,%ecx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  add    %eax,%ebp
  mov    0x18(%rsp),%r14d
  sub    $0xfe,%r14d
  cmp    $0x100,%r14d
  jle    L118
  mov    %r12d,%eax
  neg    %eax
  movsbl %al,%eax
  mov    %eax,0x18(%rsp)
L325:
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  mov    $0xff,%ecx
  mov    0x18(%rsp),%edx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  add    %eax,%ebp
  sub    $0xff,%r14d
  cmp    $0x100,%r14d
  jg     L325
L118:
  cmp    %r14d,0x1c(%rsp)
  jge    L95
  mov    %r12d,%edx
  neg    %edx
  movsbl %dl,%edx
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  mov    %r14d,%ecx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  add    %eax,%ebp
  mov    $0x0,%r12d
  jmp    L136
L95:
  lea    -0x1(%rbx),%esi
  test   %ebx,%ebx
  jle    L219
  movslq %ebp,%rcx
  mov    0x8(%rsp),%rdi
  lea    (%rdi,%rcx,1),%rax
  lea    -0x1(%rbx),%edx
  lea    0x1(%rdi,%rdx,1),%rdx
  add    %rcx,%rdx
L258:
  mov    %r12b,(%rax)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L258
  lea    0x1(%rsi,%rbp,1),%ebp
  mov    $0xffffffff,%ebx
  mov    $0x0,%r12d
  jmp    L136
L219:
  mov    %esi,%ebx
  mov    $0x0,%r12d
  jmp    L136
L85:
  lea    -0x1(%rbx),%ecx
  test   %ebx,%ebx
  jle    L176
  movslq %ebp,%rdx
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rdx,1),%rax
  lea    0x1(%rsi,%rdx,1),%rdx
  lea    -0x1(%rbx),%esi
  add    %rsi,%rdx
L196:
  mov    %r13b,(%rax)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L196
  lea    0x1(%rcx,%rbp,1),%ebp
  mov    %r14d,%r13d
  mov    $0x1,%ebx
  mov    $0x0,%r12d
  jmp    L2
L176:
  mov    %r14d,%r13d
  mov    $0x1,%ebx
  mov    $0x0,%r12d
  jmp    L2
L243:
  mov    %r13d,%eax
  neg    %eax
  movsbl %al,%eax
  mov    %eax,0x18(%rsp)
L349:
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  mov    $0xff,%ecx
  mov    0x18(%rsp),%edx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  lea    0x0(%rbp,%rax,1),%r12d
  mov    %r12d,%ebp
  mov    %ebx,%edx
  sub    $0xff,%ebx
  cmp    $0xff,%ebx
  jg     L349
  cmp    %ebx,0x1c(%rsp)
  jge    L248
  movslq %r12d,%rdi
  add    0x8(%rsp),%rdi
  mov    %ebx,%ecx
  mov    0x18(%rsp),%edx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  lea    (%r12,%rax,1),%ebp
  mov    %r13d,%r12d
  mov    %r14d,%r13d
  mov    $0x1,%ebx
  jmp    L2
L248:
  movslq %r12d,%rcx
  add    0x8(%rsp),%rcx
  mov    %rcx,%rax
  lea    -0xff(%rdx,%rcx,1),%esi
  test   %ebx,%ebx
  jle    L63
L226:
  mov    %r13b,(%rax)
  add    $0x1,%rax
  mov    %esi,%ecx
  sub    %eax,%ecx
  test   %ecx,%ecx
  jg     L226
  mov    $0x100,%eax
  cmp    %eax,%edx
  cmovl  %eax,%edx
  lea    -0xff(%rbp,%rdx,1),%ebp
  mov    %r13d,%r12d
  mov    %r14d,%r13d
  mov    $0x1,%ebx
  jmp    L2
L63:
  mov    %r13d,%r12d
  mov    %r14d,%r13d
  mov    $0x1,%ebx
  jmp    L2
L134:
  mov    $0x0,%ebp
  mov    $0x1,%ebx
L268:
  cmp    %ebx,0x1c(%rsp)
  jl     L72
  lea    -0x1(%rbx),%ecx
  test   %ebx,%ebx
  jle    L167
  movslq %ebp,%rdx
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rdx,1),%rax
  lea    0x1(%rsi,%rdx,1),%rdx
  lea    -0x1(%rbx),%esi
  add    %rsi,%rdx
L22:
  mov    %r13b,(%rax)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L22
  lea    0x1(%rcx,%rbp,1),%ebp
L167:
  mov    %ebp,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L72:
  neg    %r13d
  movsbl %r13b,%edx
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  mov    %ebx,%ecx
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  add    %eax,%ebp
  jmp    L167
```

tool_calls: name: extract_symbolic_data
arguments: label: D69
datatype: string

tool: D69: %c%c

assistant: ```c
int Code2Quality(char *buf, char *str, int n) {
  char prech, ch, pprech = 0;
  int i, count = 1, len = 0, countch = 1;
  n--;
  if ((prech = *str) < 33)
    return len;
  for (i = 1; (ch = *(str + i)) > 32;) {
    if (prech == ch)
      count++;
    else {
      if (ch == pprech) {
        if (count < 33) {
          i++;
          while (ch == *(str + i++))
            countch++;
          if (countch < 256)
            len += sprintf(buf + len, "%c%c", count, countch);
          else {
            len += sprintf(buf + len, "%c%c", count, 255);
            countch -= 255;
            while (countch > 256) {
              len += sprintf(buf + len, "%c%c", -pprech, 255);
              countch -= 255;
            }
            if (countch > n)
              len += sprintf(buf + len, "%c%c", -pprech, countch);
            else
              while (count-- > 0)
                *(buf + len++) = pprech;
          }
          pprech = 0;
          countch = 1;
          continue;
        }
      }
      if (count > n) {
        if (count < 256)
          len += sprintf(buf + len, "%c%c", -prech, count);
        else {
          do {
            len += sprintf(buf + len, "%c%c", -prech, 255);
            count -= 255;
          } while (count > 255);
          if (count > n)
            len += sprintf(buf + len, "%c%c", -prech, count);
          else
            while (count-- > 0)
              *(buf + len++) = prech;
        }
        pprech = prech;
      } else {
        while (count-- > 0)
          *(buf + len++) = prech;
        pprech = 0;
      }
      count = 1;
      prech = ch;
    }
    i++;
  }
  if (count > n)
    len += sprintf(buf + len, "%c%c", -prech, count);
  else
    while (count-- > 0)
      *(buf + len++) = prech;
  return len;
}
```