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

```asm
<wcshdo_util>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    0xd0(%rsp),%rax
  mov    0xb0(%rsp),%r15d
  mov    %edi,0x18(%rsp)
  mov    %r8,0x10(%rsp)
  mov    0xe8(%rsp),%r8
  mov    %ecx,0x1c(%rsp)
  mov    0xc0(%rsp),%r11
  mov    (%r8),%edi
  mov    %rax,0x8(%rsp)
  mov    0xc8(%rsp),%r14
  mov    0xd8(%rsp),%rbx
  mov    0xe0(%rsp),%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  test   %edi,%edi
  jne    L485
  mov    (%rbx),%eax
  mov    %rsi,%r10
  movslq %r9d,%r12
  movsbl %r15b,%r13d
  test   $0x1f,%al
  je     L611
L105:
  xor    %eax,%eax
  cmp    $0x20,%r15b
  mov    0xa0(%rsp),%r15d
  cmove  %eax,%r13d
  test   %r15d,%r15d
  setne  %cl
  test   %r12d,%r12d
  setg   %al
  and    %eax,%ecx
  mov    %cl,0x20(%rsp)
  mov    %ecx,%eax
  mov    0xb8(%rsp),%ecx
  test   %ecx,%ecx
  jne    L513
  test   %r11,%r11
  je     L450
  mov    (%r11),%ecx
  test   %ecx,%ecx
  je     L450
  cmpb   $0x0,0x20(%rsp)
  je     L47
  mov    0xa0(%rsp),%r10d
  movslq %r12d,%rax
  mov    -0x4(%r11,%rax,4),%ecx
  test   %r10d,%r10d
  jle    L77
  movslq 0xa0(%rsp),%rax
  mov    %r11,0x28(%rsp)
  lea    0x40(%rsp),%r15
  mov    %r13d,%r9d
  mov    -0x4(%r11,%rax,4),%r8d
L202:
  lea    D91(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    0x28(%rsp),%r11
L498:
  mov    %r15,%rdi
  mov    %r11,0x28(%rsp)
  call   <strlen@plt>
  cmp    $0x7,%rax
  ja     L327
  mov    0x10(%rsp),%rdx
  test   %rdx,%rdx
  je     L327
  mov    0x1c(%rsp),%edi
  test   %edi,0x18(%rsp)
  je     L327
  cmpb   $0x0,0x20(%rsp)
  mov    0x28(%rsp),%r11
  je     L303
  mov    0xa0(%rsp),%r8d
  mov    -0x4(%r11,%r12,4),%ecx
  test   %r8d,%r8d
  jle    L356
  movslq 0xa0(%rsp),%rax
  mov    %r13d,%r9d
  lea    D91(%rip),%rsi
  mov    %r15,%rdi
  mov    -0x4(%r11,%rax,4),%r8d
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L327
  nopw   0x0(%rax,%rax,1)
L346:
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    0x0(%rbp),%rdi
  mov    %r14,%rcx
  lea    D12(%rip),%rsi
  cmp    $0x15,%rax
  mov    (%rbx),%eax
  sbb    %r8d,%r8d
  sub    $0x8,%rsp
  lea    0x1(%rax),%edx
  lea    (%rax,%rax,4),%eax
  and    $0xffffffed,%r8d
  mov    %edx,(%rbx)
  shl    $0x4,%eax
  add    $0x42,%r8d
  mov    %r15,%rdx
  push   0x10(%rsp)
  cltq
  mov    %r8d,%r9d
  add    %rax,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  pop    %rax
  pop    %rdx
L485:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L152
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L513:
  lea    0x40(%rsp),%r15
  test   %al,%al
  jne    L175
  test   %r12d,%r12d
  jg     L603
  mov    0xa0(%rsp),%esi
  test   %esi,%esi
  jle    L25
  mov    %rdx,%rcx
  mov    0xb8(%rsp),%r8d
  mov    %r13d,%r9d
  xor    %eax,%eax
  mov    0xa0(%rsp),%edx
  lea    D190(%rip),%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  nopl   0x0(%rax,%rax,1)
L359:
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    $0x7,%rax
  ja     L327
  mov    0x10(%rsp),%r8
  test   %r8,%r8
  je     L327
  mov    0x1c(%rsp),%edi
  test   %edi,0x18(%rsp)
  je     L327
  cmpb   $0x0,0x20(%rsp)
  jne    L264
  test   %r12d,%r12d
  jg     L217
  mov    0xa0(%rsp),%r11d
  test   %r11d,%r11d
  jle    L284
  mov    0xb8(%rsp),%r8d
  mov    %r13d,%r9d
  mov    %r15,%rdi
  xor    %eax,%eax
  mov    0x10(%rsp),%rcx
  mov    0xa0(%rsp),%edx
  lea    D190(%rip),%rsi
  call   <sprintf@plt>
  jmp    L327
  nopl   0x0(%rax,%rax,1)
L611:
  test   %eax,%eax
  mov    %rsi,0x20(%rsp)
  lea    0x1f(%rax),%esi
  mov    0x0(%rbp),%rdi
  cmovns %eax,%esi
  mov    %r8,0x38(%rsp)
  mov    %r11,0x30(%rsp)
  sar    $0x5,%esi
  mov    %rdx,0x28(%rsp)
  add    $0x1,%esi
  imul   $0xb40,%esi,%esi
  movslq %esi,%rsi
  call   <realloc@plt>
  mov    0x20(%rsp),%r10
  mov    0x28(%rsp),%rdx
  test   %rax,%rax
  mov    0x30(%rsp),%r11
  mov    0x38(%rsp),%r8
  je     L420
  mov    %rax,0x0(%rbp)
  jmp    L105
  nopw   0x0(%rax,%rax,1)
L450:
  cmpb   $0x0,0x20(%rsp)
  lea    0x40(%rsp),%r15
  je     L549
  mov    0xa0(%rsp),%esi
  mov    %r13d,%r9d
  test   %esi,%esi
  jle    L21
  mov    0xa0(%rsp),%r8d
L86:
  mov    %r12d,%ecx
  mov    %r10,%rdx
  lea    D119(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  nopl   0x0(%rax)
L327:
  movzbl 0x1(%r14),%eax
  lea    0x1(%r14),%rsi
  test   %al,%al
  jne    L337
  jmp    L346
  nopw   0x0(%rax,%rax,1)
L430:
  mov    %rsi,%rcx
L109:
  movzbl 0x1(%rcx),%eax
  lea    0x1(%rcx),%rsi
  test   %al,%al
  je     L346
L337:
  lea    0x1(%rsi),%rdx
  mov    %rdx,%rcx
  cmp    $0x27,%al
  jne    L430
  movzbl 0x1(%rsi),%edi
  test   %dil,%dil
  je     L109
  cmpb   $0x0,(%rsi)
  jne    L402
  jmp    L109
  xchg   %ax,%ax
L348:
  mov    %edi,%eax
  add    $0x1,%rdx
  movzbl (%rdx),%edi
L402:
  mov    %al,(%rdx)
  test   %al,%al
  jne    L348
  jmp    L109
  nopl   0x0(%rax)
L175:
  mov    0xa0(%rsp),%r11d
  test   %r11d,%r11d
  jle    L59
  sub    $0x8,%rsp
  mov    %rdx,%r8
  lea    D187(%rip),%rsi
  xor    %eax,%eax
  push   %r13
  mov    0xc8(%rsp),%r9d
  mov    %r12d,%edx
  mov    %r15,%rdi
  mov    0xb0(%rsp),%ecx
  call   <sprintf@plt>
  pop    %r9
  pop    %r10
  jmp    L359
  xchg   %ax,%ax
L549:
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  test   %r12d,%r12d
  jg     L97
  mov    0xa0(%rsp),%ecx
  test   %ecx,%ecx
  jle    L130
  mov    0xa0(%rsp),%ecx
L97:
  mov    %r10,%rdx
  lea    D180(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L327
  nopw   0x0(%rax,%rax,1)
L603:
  mov    0xb8(%rsp),%r8d
  mov    %rdx,%rcx
  mov    %r13d,%r9d
  xor    %eax,%eax
  mov    %r12d,%edx
  lea    D190(%rip),%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  jmp    L359
  nopw   0x0(%rax,%rax,1)
L59:
  sub    $0x8,%rsp
  mov    %rdx,%rcx
  mov    %r15,%rdi
  mov    %r12d,%edx
  push   %r13
  mov    0xb8(%rsp),%r9d
  lea    D89(%rip),%rsi
  xor    %eax,%eax
  mov    0xc8(%rsp),%r8d
  call   <sprintf@plt>
  pop    %rdi
  pop    %r8
  jmp    L359
L47:
  movslq %r12d,%rax
  test   %r12d,%r12d
  jg     L579
  mov    0xa0(%rsp),%r9d
  test   %r9d,%r9d
  jle    L244
  movslq 0xa0(%rsp),%rax
L579:
  mov    -0x4(%r11,%rax,4),%ecx
  lea    0x40(%rsp),%r15
  mov    %r13d,%r8d
  xor    %eax,%eax
  lea    D192(%rip),%rsi
  mov    %r15,%rdi
  mov    %r11,0x28(%rsp)
  call   <sprintf@plt>
  mov    0x28(%rsp),%r11
  jmp    L498
L264:
  mov    0xa0(%rsp),%ecx
  test   %ecx,%ecx
  jle    L620
  sub    $0x8,%rsp
  mov    %r12d,%edx
  lea    D187(%rip),%rsi
  xor    %eax,%eax
  push   %r13
  mov    0xc8(%rsp),%r9d
  mov    %r15,%rdi
  mov    0xb0(%rsp),%ecx
  call   <sprintf@plt>
  pop    %rax
  pop    %rdx
  jmp    L327
L130:
  mov    %r13d,%ecx
  mov    %r10,%rdx
  lea    D27(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L327
L77:
  mov    %r11,0x28(%rsp)
  mov    0xa8(%rsp),%r8d
  lea    0x40(%rsp),%r15
  mov    %r13d,%r9d
  jmp    L202
L21:
  mov    0xa8(%rsp),%r8d
  jmp    L86
L25:
  mov    0xb8(%rsp),%ecx
  mov    %r13d,%r8d
  mov    %r15,%rdi
  xor    %eax,%eax
  lea    D180(%rip),%rsi
  call   <sprintf@plt>
  jmp    L359
L244:
  lea    0x40(%rsp),%r15
  mov    %r13d,%r8d
  xor    %eax,%eax
  mov    %r11,0x28(%rsp)
  lea    D180(%rip),%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  mov    0x28(%rsp),%r11
  jmp    L498
L620:
  sub    $0x8,%rsp
  mov    %r12d,%edx
  lea    D89(%rip),%rsi
  xor    %eax,%eax
  push   %r13
  mov    0xb8(%rsp),%r9d
  mov    %r15,%rdi
  mov    0xc8(%rsp),%r8d
  mov    0x20(%rsp),%rcx
  call   <sprintf@plt>
  pop    %r12
  pop    %r13
  jmp    L327
L217:
  mov    0xb8(%rsp),%r8d
  mov    %r13d,%r9d
  mov    %r12d,%edx
  xor    %eax,%eax
  mov    0x10(%rsp),%rcx
  lea    D190(%rip),%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  jmp    L327
L303:
  test   %r12d,%r12d
  jg     L157
  mov    0xa0(%rsp),%edi
  test   %edi,%edi
  jle    L44
  movslq 0xa0(%rsp),%rax
  mov    -0x4(%r11,%rax,4),%ecx
L523:
  mov    0x10(%rsp),%rdx
  mov    %r13d,%r8d
  mov    %r15,%rdi
  xor    %eax,%eax
  lea    D192(%rip),%rsi
  call   <sprintf@plt>
  jmp    L327
L284:
  mov    0xb8(%rsp),%ecx
  mov    %r13d,%r8d
L415:
  mov    0x10(%rsp),%rdx
  lea    D180(%rip),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L327
L356:
  mov    0xa8(%rsp),%r8d
  mov    %r13d,%r9d
  mov    %r15,%rdi
  xor    %eax,%eax
  mov    0x10(%rsp),%rdx
  lea    D91(%rip),%rsi
  call   <sprintf@plt>
  jmp    L327
L157:
  mov    -0x4(%r11,%r12,4),%ecx
  jmp    L523
L44:
  mov    (%r11),%ecx
  mov    %r13d,%r8d
  jmp    L415
L152:
  call   <__stack_chk_fail@plt>
L420:
  movl   $0x2,(%r8)
  jmp    L485
```

tool_calls: name: read_data
arguments: data_label: D91
data_type: string
name: read_data
arguments: data_label: D12
data_type: string
name: read_data
arguments: data_label: D190
data_type: string
name: read_data
arguments: data_label: D119
data_type: string
name: read_data
arguments: data_label: D187
data_type: string
name: read_data
arguments: data_label: D180
data_type: string
name: read_data
arguments: data_label: D89
data_type: string
name: read_data
arguments: data_label: D192
data_type: string
name: read_data
arguments: data_label: D27
data_type: string

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

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

tool: D190: %d%s%d%c

tool: D119: %s%d_%d%c

tool: D187: %d%d%s%d%c

tool: D180: %s%d%c

tool: D89: %d%s%d_%d%c

tool: D192: T%s%d%c

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