user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x278,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x268(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L15
  lea    D23(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
L15:
  mov    0x8(%rbx),%rdi
  lea    D18(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L37
L153:
  movb   $0x0,0xf(%rsp)
  lea    D64(%rip),%rbx
  jmp    L144
  nopl   (%rax)
L11:
  lea    0x160(%rsp),%rbp
  mov    %r12,%rdx
  mov    $0x100,%esi
  mov    %rbp,%rdi
  lea    0x60(%rsp),%r14
  lea    0x1c(%rsp),%r15
  call   <fgets@plt>
  lea    0x18(%rsp),%r13
  xor    %eax,%eax
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L4
L144:
  mov    %r12,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L11
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0x268(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L156
  add    $0x278,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L4:
  movabs $0x495441474956414e,%rax
  cmp    %rax,0x60(%rsp)
  je     L61
L12:
  cmpl   $0x535047,0x60(%rsp)
  jne    L113
  push   %rcx
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    %r13,%rdx
  lea    D36(%rip),%rsi
  mov    %rbp,%rdi
  lea    0x4c(%rsp),%rax
  push   %rax
  lea    0x50(%rsp),%rax
  push   %rax
  lea    0x54(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x5c(%rsp),%rax
  push   %rax
  lea    0x60(%rsp),%rax
  push   %rax
  lea    0x64(%rsp),%rax
  push   %rax
  lea    0x68(%rsp),%rax
  push   %rax
  lea    0x6c(%rsp),%rax
  push   %rax
  xor    %eax,%eax
  lea    0x70(%rsp),%r9
  call   <sscanf@plt>
  add    $0x50,%rsp
L113:
  movabs $0x4544555449545441,%rax
  cmp    %rax,0x60(%rsp)
  jne    L144
  cmpb   $0x0,0x68(%rsp)
  jne    L144
  lea    0x50(%rsp),%rax
  mov    %r13,%rdx
  mov    %r14,%r8
  mov    %r15,%rcx
  push   %rax
  lea    D62(%rip),%rsi
  mov    %rbp,%rdi
  lea    0x54(%rsp),%rax
  push   %rax
  xor    %eax,%eax
  lea    0x58(%rsp),%r9
  call   <sscanf@plt>
  pop    %rax
  pop    %rdx
  cmpb   $0x0,0xf(%rsp)
  je     L144
  mov    0x30(%rsp),%eax
  mov    $0x64,%esi
  mov    0x48(%rsp),%r8d
  lea    D3(%rip),%rdi
  cltd
  idiv   %esi
  mov    %eax,%ecx
  mov    0x28(%rsp),%eax
  cltd
  idiv   %esi
  sub    0x58(%rsp),%eax
  mov    %eax,%r9d
  mov    0x24(%rsp),%eax
  cltd
  idiv   %esi
  mov    %r9d,%edx
  sub    0x54(%rsp),%eax
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L144
L61:
  cmpl   $0x525f4e4f,0x68(%rsp)
  jne    L12
  cmpw   $0x4645,0x6c(%rsp)
  jne    L12
  cmpb   $0x0,0x6e(%rsp)
  jne    L12
  lea    0x5c(%rsp),%rax
  mov    %rbp,%rdi
  mov    %r14,%r8
  mov    %r15,%rcx
  push   %rax
  lea    D62(%rip),%rsi
  mov    %r13,%rdx
  lea    0x60(%rsp),%rax
  push   %rax
  xor    %eax,%eax
  lea    0x64(%rsp),%r9
  call   <sscanf@plt>
  pop    %rsi
  pop    %rdi
  movb   $0x1,0xf(%rsp)
  jmp    L12
L37:
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L153
L156:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D23
type_infered: string
name: disassemble_data
arguments: tag: D18
type_infered: string
name: disassemble_data
arguments: tag: D64
type_infered: string
name: disassemble_data
arguments: tag: D36
type_infered: string
name: disassemble_data
arguments: tag: D62
type_infered: string
name: disassemble_data
arguments: tag: D3
type_infered: string

tool: D23: plot3dparse 'flight_file.data' > output.dat

tool: D18: r

tool: D64: %e %i %s

tool: D36: %e %i %s %i %i %i %i %i %i %i %i %i %i


tool: D62: %e %i %s %i %i %i


tool: D3: %i %i %i %i



assistant: ```c
int main(int argc, char *argv[]) {
  char line_in[256];
  float rtime;
  char id_name[255];
  unsigned int ac_id;
  unsigned int byte_mask;
  int utm_east;
  int utm_north;
  int course;
  int alt;
  int speed;
  int climb;
  unsigned int itow;
  unsigned int utm_zone;
  unsigned int gps_nb_err;
  unsigned int phi;
  unsigned int psi;
  unsigned int theta;
  unsigned int nr_utm_east;
  unsigned int nr_utm_north;
  unsigned int nr_utm_zone;
  unsigned int humid;
  unsigned int temp;
  char got_navref = 0;
  FILE *fd;
  if (argc != 2) {
    printf("plot3dparse 'flight_file.data' > output.dat\n");
    exit(0);
  }
  fd = fopen(argv[1], "r");
  if (!fd)
    exit(0);
  while (!feof(fd)) {
    fgets(line_in, 256, fd);
    if (sscanf(line_in, "%e %i %s", &rtime, &ac_id, id_name)) {
      if (!strcmp("NAVIGATION_REF", id_name)) {
        sscanf(line_in, "%e %i %s %i %i %i\n", &rtime, &ac_id, id_name, &nr_utm_east, &nr_utm_north, &nr_utm_zone);
        got_navref = 1;
      }
      if (!strcmp("GPS", id_name)) {
        sscanf(line_in, "%e %i %s %i %i %i %i %i %i %i %i %i %i\n", &rtime, &ac_id, id_name, &byte_mask, &utm_east, &utm_north, &course, &alt, &speed, &climb, &itow, &utm_zone, &gps_nb_err);
      }
      if (!strcmp("ATTITUDE", id_name)) {
        sscanf(line_in, "%e %i %s %i %i %i\n", &rtime, &ac_id, id_name, &phi, &psi, &theta);
        if (got_navref)
          printf("%i %i %i %i\n\n", utm_east / 100 - nr_utm_east, utm_north / 100 - nr_utm_north, alt / 100, phi);
      }
    }
  }
  fclose(fd);
  return (0);
}
```