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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x618,%rsp
  mov    %edi,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x608(%rsp)
  xor    %eax,%eax
  movabs $0x7478742e666e69,%rcx
  mov    $0x0,%ebx
  mov    %rcx,(%rsp)
  mov    %rbx,0x8(%rsp)
  lea    0x10(%rsp),%rdi
  mov    $0x3e,%ecx
  rep stos %rax,%es:(%rdi)
  movabs $0x637461705f73665f,%rcx
  mov    $0x682e68,%ebx
  mov    %rcx,0x200(%rsp)
  mov    %rbx,0x208(%rsp)
  lea    0x210(%rsp),%rdi
  mov    $0x3e,%ecx
  rep stos %rax,%es:(%rdi)
  movabs $0x3030303178,%rcx
  mov    $0x0,%ebx
  mov    %rcx,0x400(%rsp)
  mov    %rbx,0x408(%rsp)
  lea    0x410(%rsp),%rdi
  mov    $0x3e,%ecx
  rep stos %rax,%es:(%rdi)
  cmp    $0x1,%edx
  je     L108
  lea    0x8(%rsi),%rbx
  mov    0x8(%rsi),%rdi
  test   %rdi,%rdi
  je     L92
  lea    D35(%rip),%rbp
  lea    D20(%rip),%r12
  lea    D10(%rip),%r13
  lea    D11(%rip),%r14
  jmp    L35
L108:
  call   <help@plt>
  jmp    L11
L46:
  mov    %r12,%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L129
  lea    0x8(%rbx),%r15
  mov    0x8(%rbx),%rsi
  test   %rsi,%rsi
  je     L92
  mov    %rsp,%rdi
  call   <strcpy@plt>
L13:
  lea    0x8(%r15),%rbx
  mov    0x8(%r15),%rdi
  test   %rdi,%rdi
  je     L92
L35:
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L46
  lea    0x8(%rbx),%r15
  mov    0x8(%rbx),%rsi
  test   %rsi,%rsi
  je     L92
  lea    0x200(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L13
L129:
  mov    %r13,%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L182
  mov    %r14,%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L16
  lea    0x8(%rbx),%r15
  mov    0x8(%rbx),%rsi
  test   %rsi,%rsi
  je     L92
  lea    0x400(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L13
L182:
  call   <help@plt>
  jmp    L11
L16:
  mov    %rbx,%r15
  jmp    L13
L92:
  lea    0x400(%rsp),%rdi
  lea    D8(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L79
  lea    0x200(%rsp),%rsi
  mov    %rsp,%rdi
  call   <fs_2_h_patch_sc66@plt>
L11:
  mov    0x608(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  mov    $0x0,%eax
  add    $0x618,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  lea    0x200(%rsp),%rsi
  mov    %rsp,%rdi
  call   <fs_2_h_patch_x1000@plt>
  jmp    L11
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D35
data_type: string
name: parse_data
arguments: tag: D20
data_type: string
name: parse_data
arguments: tag: D10
data_type: string
name: parse_data
arguments: tag: D11
data_type: string
name: parse_data
arguments: tag: D8
data_type: string

tool: D35: -o

tool: D20: -i

tool: D10: -v

tool: D11: -m

tool: D8: sc66

assistant: ```c
int main(int argc, const char *argv[]) {
  int ret = 0;
  int md5 = 0;
  char **pp = NULL;
  char in_path[512] = "inf.txt";
  char out_path[512] = "_fs_patch.h";
  char module[512] = "x1000";
  if (argc == 1) {
    help();
    return 0;
  }
  for (pp = (char **)(argv + 1); *pp; pp++) {
    if (strcmp(*pp, "-o") == 0) {
      pp++;
      if (*pp)
        strcpy(out_path, *pp);
      else
        break;
    } else if (strcmp(*pp, "-i") == 0) {
      pp++;
      if (*pp)
        strcpy(in_path, *pp);
      else
        break;
    } else if (strcmp(*pp, "-v") == 0) {
      help();
      return 0;
    } else if (strcmp(*pp, "-m") == 0) {
      pp++;
      if (*pp)
        strcpy(module, *pp);
      else
        break;
    }
  }
  if (strcmp(module, "sc66") == 0) {
    fs_2_h_patch_sc66(in_path, out_path);
  } else {
    fs_2_h_patch_x1000(in_path, out_path);
  }
  return ret;
}
```