user: Demonstrate the C code that generates the assembly output below:

```asm
<usage>:
  endbr64
  push   %r13
  lea    D34(%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    D64(%rip),%rsi
  xor    %eax,%eax
  mov    %r13,%rdx
  call   <fprintf@plt>
  mov    %r12,%rcx
  mov    $0x37,%edx
  mov    $0x1,%esi
  lea    D24(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x3a,%edx
  mov    $0x1,%esi
  lea    D7(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x5b,%edx
  mov    $0x1,%esi
  lea    D53(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x4f,%edx
  mov    $0x1,%esi
  lea    D52(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x4d,%edx
  mov    $0x1,%esi
  lea    D55(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x3f,%edx
  mov    $0x1,%esi
  lea    D109(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x55,%edx
  mov    $0x1,%esi
  lea    D17(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x4b,%edx
  mov    $0x1,%esi
  lea    D23(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D54(%rip),%rdi
  call   <fwrite@plt>
  add    $0x8,%rsp
  mov    %r12,%rcx
  mov    $0x3a,%edx
  pop    %r12
  mov    $0x1,%esi
  lea    D47(%rip),%rdi
  pop    %r13
  jmp    1090 <fwrite@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D34
datatype: string
name: retrieve_data
arguments: data_label: D64
datatype: string
name: retrieve_data
arguments: data_label: D24
datatype: string
name: retrieve_data
arguments: data_label: D7
datatype: string
name: retrieve_data
arguments: data_label: D53
datatype: string
name: retrieve_data
arguments: data_label: D52
datatype: string
name: retrieve_data
arguments: data_label: D55
datatype: string
name: retrieve_data
arguments: data_label: D109
datatype: string
name: retrieve_data
arguments: data_label: D17
datatype: string
name: retrieve_data
arguments: data_label: D23
datatype: string
name: retrieve_data
arguments: data_label: D54
datatype: string
name: retrieve_data
arguments: data_label: D47
datatype: string

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


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


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


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


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


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


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


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


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


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


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



tool: D47: 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");
}
```