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

```asm
<usage>:
  endbr64
  push   %r13
  lea    D81(%rip),%rax
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  sub    $0x8,%rsp
  test   %rsi,%rsi
  cmove  %rax,%r13
  call   <version@plt>
  mov    %r12,%rdi
  lea    D2(%rip),%rsi
  xor    %eax,%eax
  mov    %r13,%rdx
  call   <fprintf@plt>
  mov    %r12,%rcx
  mov    $0x37,%edx
  mov    $0x1,%esi
  lea    D32(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x3a,%edx
  mov    $0x1,%esi
  lea    D103(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x5b,%edx
  mov    $0x1,%esi
  lea    D47(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x4f,%edx
  mov    $0x1,%esi
  lea    D73(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x4d,%edx
  mov    $0x1,%esi
  lea    D26(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x3f,%edx
  mov    $0x1,%esi
  lea    D116(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x55,%edx
  mov    $0x1,%esi
  lea    D12(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x4b,%edx
  mov    $0x1,%esi
  lea    D49(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D99(%rip),%rdi
  call   <fwrite@plt>
  add    $0x8,%rsp
  mov    %r12,%rcx
  mov    $0x3a,%edx
  pop    %r12
  mov    $0x1,%esi
  lea    D96(%rip),%rdi
  pop    %r13
  jmp    1090 <fwrite@plt>
```

tool_calls: name: read_data
arguments: data_tag: D81
datatype: string
name: read_data
arguments: data_tag: D2
datatype: string
name: read_data
arguments: data_tag: D32
datatype: string
name: read_data
arguments: data_tag: D103
datatype: string
name: read_data
arguments: data_tag: D47
datatype: string
name: read_data
arguments: data_tag: D73
datatype: string
name: read_data
arguments: data_tag: D26
datatype: string
name: read_data
arguments: data_tag: D116
datatype: string
name: read_data
arguments: data_tag: D12
datatype: string
name: read_data
arguments: data_tag: D49
datatype: string
name: read_data
arguments: data_tag: D99
datatype: string
name: read_data
arguments: data_tag: D96
datatype: string

tool: D81: Purpose:
  Create RTEMS nios2 BSP configuration from Altera SOPC description


tool: D2: 
%s
Usage: nios2gen [OPTIONS] <SOPC PTF> [CONFIG PTF] [CONFIG PTF]...


tool: D32:    -h         --help               Print help and exit


tool: D103:    -V         --version            Print version and exit


tool: D47:    -bFILENAME --bspheader=FILENAME Output BSP configuration header file (default='sopc.h')


tool: D73:    -B         --no-bspheader       Do not output BSP configuration header file


tool: D26:    -lFILENAME --linkcmds=FILENAME  Output linker script (default='linkcmds')


tool: D116:    -L         --no-linkcmds        Do not output linker script


tool: D12:    -pFILENAME --parsed=FILENAME    Output PTF contents as long list (default: don't)


tool: D49:    -P         --no-parsed          Do not output PTF contents as long list


tool: D99:    -q         --quiet              Do not print progress info to stdout



tool: D96: Using "-" as the FILENAME means standard output (stdout).


assistant: ```c
void usage(FILE *f, char *errmsg) {
  char *info = "Purpose:\n  Create RTEMS nios2 BSP configuration from Altera SOPC description\n";
  if (errmsg)
    info = errmsg;
  version(f);
  fprintf(f, "\n%s\nUsage: nios2gen [OPTIONS] <SOPC PTF> [CONFIG PTF] [CONFIG PTF]...\n", info);
  fprintf(f, "   -h         --help               Print help and exit\n");
  fprintf(f, "   -V         --version            Print version and exit\n");
  fprintf(f, "   -bFILENAME --bspheader=FILENAME Output BSP configuration header file (default='sopc.h')\n");
  fprintf(f, "   -B         --no-bspheader       Do not output BSP configuration header file\n");
  fprintf(f, "   -lFILENAME --linkcmds=FILENAME  Output linker script (default='linkcmds')\n");
  fprintf(f, "   -L         --no-linkcmds        Do not output linker script\n");
  fprintf(f, "   -pFILENAME --parsed=FILENAME    Output PTF contents as long list (default: don't)\n");
  fprintf(f, "   -P         --no-parsed          Do not output PTF contents as long list\n");
  fprintf(f, "   -q         --quiet              Do not print progress info to stdout\n\n");
  fprintf(f, "Using \"-\" as the FILENAME means standard output (stdout).\n");
}
```