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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %edi,-0x94(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x80(%rbp)
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  cmpl   $0x1,-0x94(%rbp)
  jle    L13
  mov    -0xa0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  lea    -0x60(%rbp),%rax
  lea    D0(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D117(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x60(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x78(%rbp)
  cmpq   $0x0,-0x78(%rbp)
  jne    L0
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L0:
  mov    -0xa0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  lea    -0x30(%rbp),%rax
  lea    D109(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D81(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x30(%rbp),%rax
  lea    D113(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x70(%rbp)
  cmpq   $0x0,-0x70(%rbp)
  jne    L40
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L40
L13:
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L40:
  movq   $0x0,-0x80(%rbp)
  jmp    L41
L29:
  movzbl -0x64(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,-0x84(%rbp)
  movzbl -0x61(%rbp),%eax
  mov    %al,-0x64(%rbp)
  mov    -0x84(%rbp),%eax
  mov    %al,-0x61(%rbp)
  movzbl -0x63(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,-0x84(%rbp)
  movzbl -0x62(%rbp),%eax
  mov    %al,-0x63(%rbp)
  mov    -0x84(%rbp),%eax
  mov    %al,-0x62(%rbp)
  mov    -0x70(%rbp),%rdx
  lea    -0x64(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <fwrite@plt>
  addq   $0x1,-0x80(%rbp)
L41:
  mov    -0x78(%rbp),%rdx
  lea    -0x64(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <fread@plt>
  test   %rax,%rax
  jne    L29
  mov    -0x80(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D5
type: string
name: read_data
arguments: data_label: D56
type: string
name: read_data
arguments: data_label: D0
type: string
name: read_data
arguments: data_label: D117
type: string
name: read_data
arguments: data_label: D45
type: string
name: read_data
arguments: data_label: D107
type: string
name: read_data
arguments: data_label: D109
type: string
name: read_data
arguments: data_label: D81
type: string
name: read_data
arguments: data_label: D113
type: string
name: read_data
arguments: data_label: D63
type: string
name: read_data
arguments: data_label: D41
type: string
name: read_data
arguments: data_label: D46
type: string
name: read_data
arguments: data_label: D2
type: string

tool: D5: 

Swap a Big-Endian Data file to Little Endian

tool: D56:           or vise-versa.  (32 bit data only)

tool: D0: %s

tool: D117: 
Reading data from "%s".


tool: D45: r+b

tool: D107: 
Can't open "%s", exiting.


tool: D109: %s_swapped

tool: D81: Writing data to "%s".



tool: D113: w+b

tool: D63: 
Can't open %s, exiting.


tool: D41: 

Please enter a filename for the input data file

tool: D46:  after "readdata".

tool: D2: Converted %ld points.



assistant: ```c
int main(int argc, char *argv[]) {
  unsigned char buffer[4];
  int tmp;
  long ct = 0;
  char innm[40], outnm[40];
  FILE *infile, *outfile;
  printf("\n\nSwap a Big-Endian Data file to Little Endian\n");
  printf("          or vise-versa.  (32 bit data only)\n");
  if (argc > 1) {
    sprintf(innm, "%s", argv[1]);
    printf("\nReading data from \"%s\".\n", innm);
    if (NULL == (infile = fopen(innm, "r+b"))) {
      printf("\nCan't open \"%s\", exiting.\n", innm);
      exit(1);
    }
    sprintf(outnm, "%s_swapped", argv[1]);
    printf("Writing data to \"%s\".\n\n", outnm);
    if (NULL == (outfile = fopen(outnm, "w+b"))) {
      printf("\nCan't open %s, exiting.\n", outnm);
      exit(1);
    }
  } else {
    printf("\n\nPlease enter a filename for the input data file");
    printf(" after \"readdata\".\n");
    exit(1);
  }
  ct = 0;
  while (fread(buffer, sizeof(unsigned char), 4, infile)) {
    tmp = buffer[0];
    buffer[0] = buffer[3];
    buffer[3] = tmp;
    tmp = buffer[1];
    buffer[1] = buffer[2];
    buffer[2] = tmp;
    fwrite(buffer, sizeof(unsigned char), 4, outfile);
    ct++;
  }
  printf("Converted %ld points.\n\n", ct);
  fclose(infile);
  fclose(outfile);
  exit(0);
}
```