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

```asm
<GScr_StrTokByPixLen>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x818,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x808(%rsp)
  xor    %eax,%eax
  call   <Scr_GetNumParam@plt>
  cmp    $0x2,%eax
  je     L44
  lea    D8(%rip),%rdi
  call   <Scr_Error@plt>
L44:
  xor    %edi,%edi
  call   <Scr_GetString@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L181
  mov    %rsp,%r12
  mov    $0x800,%edx
  mov    %r12,%rdi
  call   <Q_strncpyz@plt>
  mov    $0x1,%edi
  call   <Scr_GetFloat@plt>
  xor    %eax,%eax
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%ebx
  call   <Scr_MakeArray@plt>
  movzbl (%rsp),%eax
  test   %al,%al
  je     L181
  movslq %ebx,%rbp
  mov    %ebx,%edx
  xor    %esi,%esi
  xor    %r8d,%r8d
  imul   $0x55555556,%rbp,%rbp
  sar    $0x1f,%edx
  xor    %r15d,%r15d
  mov    %r12,%r13
  mov    %r12,%rdi
  lea    D7(%rip),%r14
  shr    $0x20,%rbp
  sub    %edx,%ebp
L297:
  cmp    $0x6e,%al
  jg     L104
  cmp    $0x1f,%al
  jle    L284
  sub    $0x20,%eax
  cmp    $0x4e,%al
  ja     L284
  movzbl %al,%eax
  movslq (%r14,%rax,4),%rax
  add    %r14,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L256:
  cmp    $0x7c,%al
  je     L172
  jle    L91
  cmp    $0x7d,%al
  je     L81
  cmp    $0x7e,%al
  jne    L284
  add    $0xb,%esi
  nopl   0x0(%rax)
L184:
  cmp    %ebx,%esi
  jl     L262
L78:
  cmp    $0x1f,%r15d
  jg     L2
  cmp    %r8d,%ebp
  jg     L363
  movb   $0x0,(%r12)
  call   <Scr_AddString@plt>
  xor    %eax,%eax
  call   <Scr_AddArray@plt>
  lea    0x1(%r12),%rdi
L193:
  add    $0x1,%r15d
  mov    %rdi,%r13
  xor    %esi,%esi
  xor    %r8d,%r8d
L97:
  movzbl 0x0(%r13),%eax
  test   %al,%al
  jne    L297
L2:
  cmpb   $0x0,(%rdi)
  jne    L366
L181:
  mov    0x808(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L368
  add    $0x818,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  mov    %esi,%r8d
  mov    %r13,%r12
  cs nopw 0x0(%rax,%rax,1)
  add    $0xa,%esi
  cmp    %ebx,%esi
  jge    L78
  nopl   0x0(%rax,%rax,1)
L262:
  add    $0x1,%r13
  jmp    L97
  cs nopw 0x0(%rax,%rax,1)
L69:
  add    $0x9,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
  add    $0x4,%esi
  jmp    L184
L91:
  cmp    $0x7b,%al
  je     L81
  nopl   0x0(%rax)
L284:
  add    $0xc,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
L84:
  add    $0x6,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
  add    $0x7,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
L172:
  add    $0x5,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
  add    $0xe,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
L81:
  add    $0x8,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
  add    $0xf,%esi
  add    $0xc,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
L104:
  cmp    $0x7a,%al
  jg     L256
  cmp    $0x71,%al
  jle    L284
  lea    -0x72(%rax),%ecx
  mov    $0x1,%edx
  shl    %cl,%rdx
  test   $0x152,%edx
  jne    L69
  and    $0x5,%edx
  jne    L84
  cmp    $0x77,%al
  jne    L284
  add    $0xd,%esi
  jmp    L184
  nopl   0x0(%rax)
  add    $0x2,%esi
  jmp    L184
  nopl   0x0(%rax,%rax,1)
L363:
  movb   $0x0,0x0(%r13)
  call   <Scr_AddString@plt>
  xor    %eax,%eax
  call   <Scr_AddArray@plt>
  lea    0x1(%r13),%rdi
  jmp    L193
  nopw   0x0(%rax,%rax,1)
L366:
  call   <Scr_AddString@plt>
  xor    %eax,%eax
  call   <Scr_AddArray@plt>
  jmp    L181
L368:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D8
type_infered: string

tool: D8: Usage: StrTokByPixLen(<string>, <float>)

assistant: ```c
void GScr_StrTokByPixLen() {
  char buffer[2048];
  char *string = buffer;
  if (Scr_GetNumParam() != 2) {
    Scr_Error("Usage: StrTokByPixLen(<string>, <float>)");
  }
  char *src = Scr_GetString(0);
  if (!src)
    return;
  else
    Q_strncpyz(buffer, src, sizeof(buffer));
  char *countstring = string;
  char *lastWordSpace = string;
  int lineBreakIndex = 0;
  int lWSHalfPixelCounter = 0;
  int halfPixelCounter = 0;
  int maxHalfPixel = 2.0 * Scr_GetFloat(1);
  Scr_MakeArray();
  while (*countstring) {
    switch (*countstring) {
    case '\'':
      halfPixelCounter += 2;
      break;
    case 'i':
    case 'j':
    case 'l':
    case '.':
    case ',':
    case ':':
    case ';':
    case '_':
    case '%':
      halfPixelCounter += 4;
      break;
    case 'f':
    case 'I':
    case '-':
    case '|':
      halfPixelCounter += 5;
      break;
    case 't':
    case 'r':
    case '!':
    case '/':
    case '\\':
    case '"':
      halfPixelCounter += 6;
      break;
    case '(':
    case ')':
    case '[':
    case ']':
      halfPixelCounter += 7;
      break;
    case 'T':
    case '{':
    case '}':
    case '*':
      halfPixelCounter += 8;
      break;
    case 'a':
    case 'c':
    case 'g':
    case 'k':
    case 's':
    case 'v':
    case 'x':
    case 'z':
    case 'F':
    case 'J':
    case 'L':
    case 'Y':
    case 'Z':
      halfPixelCounter += 9;
      break;
    case ' ':
      lWSHalfPixelCounter = halfPixelCounter;
      lastWordSpace = countstring;
    case 'd':
    case 'h':
    case 'n':
    case 'A':
    case 'P':
    case 'S':
    case 'V':
    case 'X':
    case '?':
      halfPixelCounter += 10;
      break;
    case 'B':
    case 'D':
    case 'G':
    case 'K':
    case 'O':
    case 'Q':
    case 'R':
    case 'U':
    case '0':
    case '1':
    case '2':
    case '3':
    case '4':
    case '5':
    case '6':
    case '7':
    case '8':
    case '9':
    case '$':
    case '<':
    case '>':
    case '=':
    case '+':
    case '^':
    case '~':
      halfPixelCounter += 11;
      break;
    case 'H':
    case 'N':
    case '#':
      halfPixelCounter += 12;
      break;
    case 'w':
    case '&':
      halfPixelCounter += 13;
      break;
    case 'W':
    case 'M':
    case '@':
      halfPixelCounter += 14;
      break;
    case 'm':
      halfPixelCounter += 15;
    default:
      halfPixelCounter += 12;
    }
    if (halfPixelCounter >= maxHalfPixel) {
      if (lineBreakIndex >= 32) {
        break;
      }
      if (lWSHalfPixelCounter >= maxHalfPixel / 3) {
        *lastWordSpace = 0;
        Scr_AddString(string);
        Scr_AddArray();
        string = &lastWordSpace[1];
        countstring = &lastWordSpace[1];
        lWSHalfPixelCounter = 0;
        halfPixelCounter = 0;
      } else {
        *countstring = 0;
        Scr_AddString(string);
        Scr_AddArray();
        string = &countstring[1];
        countstring = &countstring[1];
        lWSHalfPixelCounter = 0;
        halfPixelCounter = 0;
      }
      lineBreakIndex++;
    } else {
      countstring++;
    }
  }
  if (*string) {
    Scr_AddString(string);
    Scr_AddArray();
  }
}
```