user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    0x8(%rsi),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L49
  lea    0x40(%rsp),%r12
  mov    %rsi,%rbx
  lea    D59(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    0x8(%rbx),%rdi
  lea    D47(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L131
  lea    D7(%rip),%rsi
  mov    %r12,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L131
  lea    0x30(%rsp),%rax
  lea    0x60(%rsp),%rbx
  mov    %rax,0x18(%rsp)
  lea    0x2e(%rsp),%rax
  lea    D56(%rip),%r14
  mov    %rax,0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L101:
  mov    %rbp,%rdx
  mov    $0x64,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L129
  cmpb   $0x3a,0x68(%rsp)
  jne    L101
  cmpb   $0x20,0x69(%rsp)
  jne    L101
  mov    0x18(%rsp),%rdi
  mov    $0x10,%edx
  xor    %esi,%esi
  xor    %r12d,%r12d
  call   <memset@plt>
  mov    %rbx,%rdi
L64:
  mov    %r14,%rsi
  call   <strtok@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L127
L86:
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    $0x3,%eax
  jg     L108
  movzbl (%r15),%eax
  mov    0x10(%rsp),%rdi
  mov    %al,0x2e(%rsp)
  movzbl 0x1(%r15),%eax
  mov    %al,0x2f(%rsp)
  call   <AtoH@plt>
  lea    0x1(%r12),%ecx
  mov    %r15,%rdi
  mov    %ecx,0xc(%rsp)
  mov    %al,0x30(%rsp,%r12,1)
  call   <strlen@plt>
  mov    %r14,%rsi
  movslq 0xc(%rsp),%r12
  add    $0x1,%eax
  cltq
  lea    (%r15,%rax,1),%rdi
  call   <strtok@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L86
L127:
  cmpb   $0x0,0x30(%rsp)
  je     L101
  mov    0x18(%rsp),%rdi
  mov    %r13,%rcx
  mov    $0x10,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  jmp    L101
  nopl   (%rax)
L129:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  xor    %eax,%eax
L23:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L83
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L108:
  mov    %r15,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  cltq
  lea    (%r15,%rax,1),%rdi
  jmp    L64
L131:
  lea    D23(%rip),%rdi
  call   <printf@plt>
  or     $0xffffffff,%eax
  jmp    L23
L49:
  lea    D33(%rip),%rdi
  call   <printf@plt>
  or     $0xffffffff,%eax
  jmp    L23
L83:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D59
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D47
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D7
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D56
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D23
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D33
type_guessed: string

tool: D59: %s_v.bin

tool: D47: r

tool: D7: w+

tool: D56: 
 

tool: D23: open src/dst fail


tool: D33: no src file


assistant: ```c
int main(int argc, char *argv[]) {
  char dst_file[20], line[100], *p, xb[2];
  FILE *fp_s, *fp_d;
  unsigned char x, x6[16];
  int i = 0;
  int j = 0;
  if (!argv[1]) {
    printf("no src file\n");
    return -1;
  } else {
    sprintf(dst_file, "%s_v.bin", argv[1]);
  }
  if (((fp_s = fopen(argv[1], "r")) == NULL) || ((fp_d = fopen(dst_file, "w+")) == NULL)) {
    printf("open src/dst fail\n");
    return -1;
  }
  while (fgets(line, sizeof(line), fp_s) != (char *)0) {
    if (line[8] == ':' && line[9] == ' ') {
      p = line;
      i = 0;
      memset(x6, 0, sizeof(x6));
      while (p) {
        p = strtok(p, "\r\n ");
        if (p == NULL)
          break;
        if (strlen(p) > 3) {
          p += strlen(p) + 1;
          continue;
        }
        xb[0] = *p;
        xb[1] = *(p + 1);
        x = AtoH(xb);
        x6[i++] = x;
        p += strlen(p) + 1;
      }
      if (*x6)
        fwrite(x6, 1, sizeof(x6), fp_d);
    }
  }
  fclose(fp_s);
  fclose(fp_d);
  return 0;
}
```