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

```asm
<wcshdo_util>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,0x38(%rsp)
  mov    %rsi,0x30(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %ecx,0x3c(%rsp)
  mov    %r8,0x18(%rsp)
  mov    %r9d,0xc(%rsp)
  mov    0xb0(%rsp),%r12d
  mov    0xc0(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    0xc8(%rsp),%rbx
  mov    0xd0(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    0xd8(%rsp),%rbp
  mov    0xe0(%rsp),%r13
  mov    0xe8(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  cmpl   $0x0,(%r14)
  jne    L67
  mov    %r12d,%r15d
  mov    0x0(%rbp),%eax
  test   $0x1f,%al
  je     L429
L264:
  cmp    $0x20,%r12b
  mov    $0x0,%eax
  cmove  %eax,%r15d
  cmpl   $0x0,0xb8(%rsp)
  je     L166
  mov    0xc(%rsp),%esi
  test   %esi,%esi
  setg   %dl
  cmpl   $0x0,0xa0(%rsp)
  setne  %al
  mov    %edx,%r12d
  and    %al,%r12b
  je     L110
  cmpl   $0x0,0xa0(%rsp)
  jle    L492
  lea    0x40(%rsp),%rdi
  sub    $0x8,%rsp
  movsbl %r15b,%eax
  push   %rax
  mov    0xc8(%rsp),%r9d
  mov    0x30(%rsp),%r8
  mov    0xb0(%rsp),%ecx
  mov    %esi,%edx
  lea    D138(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x10,%rsp
L349:
  lea    0x40(%rsp),%rdi
  call   <strlen@plt>
  mov    0x18(%rsp),%r8
  test   %r8,%r8
  je     L275
  cmp    $0x7,%rax
  ja     L275
  mov    0x3c(%rsp),%edi
  test   %edi,0x38(%rsp)
  je     L275
  test   %r12b,%r12b
  je     L186
  cmpl   $0x0,0xa0(%rsp)
  jle    L486
  lea    0x40(%rsp),%rdi
  sub    $0x8,%rsp
  movsbl %r15b,%eax
  push   %rax
  mov    0xc8(%rsp),%r9d
  mov    0xb0(%rsp),%ecx
  mov    0x1c(%rsp),%edx
  lea    D138(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x10,%rsp
  jmp    L275
L429:
  lea    0x1f(%rax),%esi
  test   %eax,%eax
  cmovns %eax,%esi
  sar    $0x5,%esi
  add    $0x1,%esi
  imul   $0xb40,%esi,%esi
  movslq %esi,%rsi
  mov    0x0(%r13),%rdi
  call   <realloc@plt>
  test   %rax,%rax
  je     L212
  mov    %rax,0x0(%r13)
  jmp    L264
L212:
  movl   $0x2,(%r14)
  jmp    L67
L492:
  lea    0x40(%rsp),%rdi
  sub    $0x8,%rsp
  movsbl %r15b,%eax
  push   %rax
  mov    0xb8(%rsp),%r9d
  mov    0xc8(%rsp),%r8d
  mov    0x30(%rsp),%rcx
  mov    0x1c(%rsp),%edx
  lea    D76(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x10,%rsp
  jmp    L349
L110:
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jg     L223
  cmpl   $0x0,0xa0(%rsp)
  jle    L52
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xb8(%rsp),%r8d
  mov    0x20(%rsp),%rcx
  mov    0xa0(%rsp),%edx
  lea    D206(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L349
L223:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xb8(%rsp),%r8d
  mov    0x20(%rsp),%rcx
  lea    D206(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L349
L52:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0xb8(%rsp),%ecx
  mov    0x20(%rsp),%rdx
  lea    D49(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L349
L486:
  lea    0x40(%rsp),%rdi
  sub    $0x8,%rsp
  movsbl %r15b,%eax
  push   %rax
  mov    0xb8(%rsp),%r9d
  mov    0xc8(%rsp),%r8d
  mov    0x28(%rsp),%rcx
  mov    0x1c(%rsp),%edx
  lea    D76(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x10,%rsp
  jmp    L275
L186:
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jg     L5
  cmpl   $0x0,0xa0(%rsp)
  jle    L339
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xb8(%rsp),%r8d
  mov    0x18(%rsp),%rcx
  mov    0xa0(%rsp),%edx
  lea    D206(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L5:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xb8(%rsp),%r8d
  mov    0x18(%rsp),%rcx
  lea    D206(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L339:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0xb8(%rsp),%ecx
  mov    0x18(%rsp),%rdx
  lea    D49(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L166:
  mov    0x28(%rsp),%rdi
  test   %rdi,%rdi
  je     L437
  mov    (%rdi),%ecx
  test   %ecx,%ecx
  je     L437
  mov    0xc(%rsp),%esi
  test   %esi,%esi
  setg   %dl
  cmpl   $0x0,0xa0(%rsp)
  setne  %al
  and    %al,%dl
  mov    %edx,%r12d
  je     L445
  cmpl   $0x0,0xa0(%rsp)
  jle    L536
  movslq 0xa0(%rsp),%rax
  movslq %esi,%rdx
  mov    %rdi,%rsi
  mov    -0x4(%rdi,%rdx,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    -0x4(%rsi,%rax,4),%r8d
  mov    0x20(%rsp),%rdx
  lea    D157(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L122:
  lea    0x40(%rsp),%rdi
  call   <strlen@plt>
  mov    0x18(%rsp),%rsi
  test   %rsi,%rsi
  je     L275
  cmp    $0x7,%rax
  ja     L275
  mov    0x3c(%rsp),%edi
  test   %edi,0x38(%rsp)
  je     L275
  test   %r12b,%r12b
  je     L109
  cmpl   $0x0,0xa0(%rsp)
  jle    L464
  movslq 0xa0(%rsp),%rax
  movslq 0xc(%rsp),%rdx
  mov    0x28(%rsp),%r10
  mov    -0x4(%r10,%rdx,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    -0x4(%r10,%rax,4),%r8d
  mov    %rsi,%rdx
  lea    D157(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L536:
  movslq 0xc(%rsp),%rax
  mov    0x28(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xa8(%rsp),%r8d
  mov    0x20(%rsp),%rdx
  lea    D157(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L122
L445:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jg     L61
  cmpl   $0x0,0xa0(%rsp)
  jle    L263
  movslq 0xa0(%rsp),%rax
  mov    0x28(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x20(%rsp),%rdx
  lea    D108(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L122
L61:
  cltq
  mov    0x28(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x20(%rsp),%rdx
  lea    D108(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L122
L263:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x20(%rsp),%rdx
  lea    D49(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L122
L464:
  movslq 0xc(%rsp),%rax
  mov    0x28(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xa8(%rsp),%r8d
  mov    0x18(%rsp),%rdx
  lea    D157(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L109:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jg     L119
  cmpl   $0x0,0xa0(%rsp)
  jle    L266
  movslq 0xa0(%rsp),%rax
  mov    0x28(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x18(%rsp),%rdx
  lea    D108(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L119:
  cltq
  mov    0x28(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ecx
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x18(%rsp),%rdx
  lea    D108(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L266:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x28(%rsp),%rax
  mov    (%rax),%ecx
  mov    0x18(%rsp),%rdx
  lea    D49(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L437:
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jle    L85
  cmpl   $0x0,0xa0(%rsp)
  je     L85
  cmpl   $0x0,0xa0(%rsp)
  jle    L385
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xa0(%rsp),%r8d
  mov    0x30(%rsp),%rdx
  lea    D62(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L275:
  lea    0x1(%rbx),%rax
  movzbl 0x1(%rbx),%edx
  test   %dl,%dl
  jne    L107
L558:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x15,%rax
  sbb    %r8d,%r8d
  and    $0xffffffed,%r8d
  add    $0x42,%r8d
  mov    0x0(%r13),%rdi
  mov    0x0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x0(%rbp)
  lea    0x40(%rsp),%rdx
  lea    (%rax,%rax,4),%eax
  shl    $0x4,%eax
  cltq
  add    %rax,%rdi
  sub    $0x8,%rsp
  push   0x18(%rsp)
  mov    %r8d,%r9d
  mov    %rbx,%rcx
  lea    D166(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x10,%rsp
L67:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L347
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L385:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r9d
  mov    0xa8(%rsp),%r8d
  mov    0xc(%rsp),%ecx
  mov    0x30(%rsp),%rdx
  lea    D62(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L85:
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jg     L643
  cmpl   $0x0,0xa0(%rsp)
  jle    L66
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0xa0(%rsp),%ecx
  mov    0x30(%rsp),%rdx
  lea    D49(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L643:
  lea    0x40(%rsp),%rdi
  movsbl %r15b,%r8d
  mov    0x30(%rsp),%rdx
  lea    D49(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L66:
  movsbl %r15b,%ecx
  lea    0x40(%rsp),%rdi
  mov    0x30(%rsp),%rdx
  lea    D182(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L275
L35:
  lea    0x1(%rcx),%rax
  movzbl 0x1(%rcx),%edx
  test   %dl,%dl
  je     L558
L107:
  mov    %rax,%rcx
  cmp    $0x27,%dl
  jne    L35
  lea    0x1(%rax),%rcx
  cmpb   $0x0,0x1(%rax)
  je     L35
  cmpb   $0x0,(%rax)
  je     L35
L612:
  add    $0x1,%rax
  mov    %edx,%esi
  movzbl (%rax),%edx
  mov    %sil,(%rax)
  test   %sil,%sil
  jne    L612
  jmp    L35
L347:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D138
datatype: string
name: parse_data
arguments: tag: D76
datatype: string
name: parse_data
arguments: tag: D206
datatype: string
name: parse_data
arguments: tag: D49
datatype: string
name: parse_data
arguments: tag: D157
datatype: string
name: parse_data
arguments: tag: D108
datatype: string
name: parse_data
arguments: tag: D62
datatype: string
name: parse_data
arguments: tag: D166
datatype: string
name: parse_data
arguments: tag: D182
datatype: string

tool: D138: %d%d%s%d%c

tool: D76: %d%s%d_%d%c

tool: D206: %d%s%d%c

tool: D49: %s%d%c

tool: D157: T%s%d_%d%c

tool: D108: T%s%d%c

tool: D62: %s%d_%d%c

tool: D166: %-8.8s= %-20s / %-*.*s

tool: D182: %s%c

assistant: ```c
void wcshdo_util(int relax, const char pikey[], const char tbkey[], int level, const char tlkey[], int i, int j, int m, char alt, int btcol, int plcol[], char keyvalue[], const char keycomment[], int *nkeyrec, char **header, int *status) {
  char ch0, ch1, *hptr, keyword[16], *kptr;
  int nbyte, nc = 47, nv;
  if (*status)
    return;
  if ((*nkeyrec) % 32 == 0) {
    nbyte = ((*nkeyrec) / 32 + 1) * 2880;
    if (!(hptr = realloc(*header, nbyte))) {
      *status = 2;
      return;
    }
    *header = hptr;
  }
  if (alt == ' ')
    alt = '\0';
  if (btcol) {
    if (i > 0 && j) {
      if (j > 0) {
        sprintf(keyword, "%d%d%s%d%c", i, j, tbkey, btcol, alt);
      } else {
        sprintf(keyword, "%d%s%d_%d%c", i, tbkey, btcol, m, alt);
      }
    } else if (i > 0) {
      sprintf(keyword, "%d%s%d%c", i, tbkey, btcol, alt);
    } else if (j > 0) {
      sprintf(keyword, "%d%s%d%c", j, tbkey, btcol, alt);
    } else {
      sprintf(keyword, "%s%d%c", tbkey, btcol, alt);
    }
    if ((strlen(keyword) < 8) && tlkey && (relax & level)) {
      if (i > 0 && j) {
        if (j > 0) {
          sprintf(keyword, "%d%d%s%d%c", i, j, tlkey, btcol, alt);
        } else {
          sprintf(keyword, "%d%s%d_%d%c", i, tlkey, btcol, m, alt);
        }
      } else if (i > 0) {
        sprintf(keyword, "%d%s%d%c", i, tlkey, btcol, alt);
      } else if (j > 0) {
        sprintf(keyword, "%d%s%d%c", j, tlkey, btcol, alt);
      } else {
        sprintf(keyword, "%s%d%c", tlkey, btcol, alt);
      }
    }
  } else if (plcol && plcol[0]) {
    if (i > 0 && j) {
      if (j > 0) {
        sprintf(keyword, "T%s%d_%d%c", tbkey, plcol[i - 1], plcol[j - 1], alt);
      } else {
        sprintf(keyword, "T%s%d_%d%c", tbkey, plcol[i - 1], m, alt);
      }
    } else if (i > 0) {
      sprintf(keyword, "T%s%d%c", tbkey, plcol[i - 1], alt);
    } else if (j > 0) {
      sprintf(keyword, "T%s%d%c", tbkey, plcol[j - 1], alt);
    } else {
      sprintf(keyword, "%s%d%c", tbkey, plcol[0], alt);
    }
    if ((strlen(keyword) < 8) && tlkey && (relax & level)) {
      if (i > 0 && j) {
        if (j > 0) {
          sprintf(keyword, "T%s%d_%d%c", tlkey, plcol[i - 1], plcol[j - 1], alt);
        } else {
          sprintf(keyword, "T%s%d_%d%c", tlkey, plcol[i - 1], m, alt);
        }
      } else if (i > 0) {
        sprintf(keyword, "T%s%d%c", tlkey, plcol[i - 1], alt);
      } else if (j > 0) {
        sprintf(keyword, "T%s%d%c", tlkey, plcol[j - 1], alt);
      } else {
        sprintf(keyword, "%s%d%c", tlkey, plcol[0], alt);
      }
    }
  } else {
    if (i > 0 && j) {
      if (j > 0) {
        sprintf(keyword, "%s%d_%d%c", pikey, i, j, alt);
      } else {
        sprintf(keyword, "%s%d_%d%c", pikey, i, m, alt);
      }
    } else if (i > 0) {
      sprintf(keyword, "%s%d%c", pikey, i, alt);
    } else if (j > 0) {
      sprintf(keyword, "%s%d%c", pikey, j, alt);
    } else {
      sprintf(keyword, "%s%c", pikey, alt);
    }
  }
  hptr = keyvalue + 1;
  while (*hptr) {
    if (*hptr == '\'') {
      kptr = hptr++;
      if (*hptr) {
        ch0 = *kptr;
        while (*kptr) {
          ch1 = *(++kptr);
          *kptr = ch0;
          ch0 = ch1;
        }
      }
    }
    hptr++;
  }
  if ((nv = strlen(keyvalue) > 20)) {
    nc -= (nv - 20);
  }
  hptr = *header + (80 * ((*nkeyrec)++));
  sprintf(hptr, "%-8.8s= %-20s / %-*.*s", keyword, keyvalue, nc, nc, keycomment);
}
```