user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<Code2Quality>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  movb   $0x0,-0x12(%rbp)
  movl   $0x1,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x1,-0x4(%rbp)
  subl   $0x1,-0x34(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x13(%rbp)
  cmpb   $0x20,-0x13(%rbp)
  jg     L291
  mov    -0x8(%rbp),%eax
  jmp    L282
L291:
  movl   $0x1,-0x10(%rbp)
  jmp    L223
L116:
  movzbl -0x13(%rbp),%eax
  cmp    -0x11(%rbp),%al
  jne    L92
  addl   $0x1,-0xc(%rbp)
  jmp    L193
L92:
  movzbl -0x11(%rbp),%eax
  cmp    -0x12(%rbp),%al
  jne    L125
  cmpl   $0x20,-0xc(%rbp)
  jg     L125
  addl   $0x1,-0x10(%rbp)
  jmp    L39
L51:
  addl   $0x1,-0x4(%rbp)
L39:
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x11(%rbp)
  je     L51
  cmpl   $0xff,-0x4(%rbp)
  jg     L163
  mov    -0xc(%rbp),%eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L87
L163:
  mov    -0xc(%rbp),%eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    $0xff,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  subl   $0xff,-0x4(%rbp)
  jmp    L216
L132:
  movzbl -0x12(%rbp),%eax
  neg    %eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    $0xff,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  subl   $0xff,-0x4(%rbp)
L216:
  cmpl   $0x100,-0x4(%rbp)
  jg     L132
  mov    -0x4(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L146
  movzbl -0x12(%rbp),%eax
  neg    %eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L87
L15:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x12(%rbp),%eax
  mov    %al,(%rdx)
L146:
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  test   %eax,%eax
  jg     L15
L87:
  movb   $0x0,-0x12(%rbp)
  movl   $0x1,-0x4(%rbp)
  jmp    L223
L125:
  mov    -0xc(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L70
  cmpl   $0xff,-0xc(%rbp)
  jg     L103
  movzbl -0x13(%rbp),%eax
  neg    %eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    -0xc(%rbp),%edx
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L161
L103:
  movzbl -0x13(%rbp),%eax
  neg    %eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    $0xff,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  subl   $0xff,-0xc(%rbp)
  cmpl   $0xff,-0xc(%rbp)
  jg     L103
  mov    -0xc(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L24
  movzbl -0x13(%rbp),%eax
  neg    %eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    -0xc(%rbp),%edx
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L161
L240:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x13(%rbp),%eax
  mov    %al,(%rdx)
L24:
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  test   %eax,%eax
  jg     L240
L161:
  movzbl -0x13(%rbp),%eax
  mov    %al,-0x12(%rbp)
  jmp    L190
L13:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x13(%rbp),%eax
  mov    %al,(%rdx)
L70:
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  test   %eax,%eax
  jg     L13
  movb   $0x0,-0x12(%rbp)
L190:
  movl   $0x1,-0xc(%rbp)
  movzbl -0x11(%rbp),%eax
  mov    %al,-0x13(%rbp)
L193:
  addl   $0x1,-0x10(%rbp)
L223:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x11(%rbp)
  cmpb   $0x20,-0x11(%rbp)
  jg     L116
  mov    -0xc(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L110
  movzbl -0x13(%rbp),%eax
  neg    %eax
  movsbl %al,%eax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    -0xc(%rbp),%edx
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  call   <sprintf@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L281
L93:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x13(%rbp),%eax
  mov    %al,(%rdx)
L110:
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  test   %eax,%eax
  jg     L93
L281:
  mov    -0x8(%rbp),%eax
L282:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D15
type_infered: string

tool: D15: %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;
}
```