user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %r15
  lea    D78(%rip),%r15
  push   %r14
  mov    $0x1,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x148,%rsp
  mov    0x8(%rsi),%rdi
  lea    D110(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  lea    0x70(%rsp),%r13
  call   <fopen@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <assert@plt>
  jmp    L85
  nopl   0x0(%rax)
L112:
  cmp    $0xa,%r14d
  je     L14
L33:
  add    $0x1,%r14d
L85:
  mov    %r12,%rdx
  mov    $0x5a,%esi
  lea    -0x1(%r14),%ebx
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L112
  mov    %rbp,%rdi
  call   <atof@plt>
  cmp    $0x6,%ebx
  ja     L77
  cmp    $0x3,%ebx
  jg     L37
  cmp    $0x2,%ebx
  je     L106
  cmp    $0x3,%ebx
  jne    L112
  mulsd  D45(%rip),%xmm0
  mov    $0x64,%edi
  mov    $0x3e8,%ecx
  cvttsd2si %xmm0,%esi
  mov    %esi,%eax
  cltd
  idiv   %edi
  mov    %esi,%eax
  mov    %edx,%r9d
  cltd
  idiv   %ecx
  mov    $0x186a0,%ecx
  cltd
  idiv   %edi
  mov    %esi,%eax
  mov    %edx,%r8d
  cltd
  idiv   %ecx
  cltd
  idiv   %edi
  mov    %esi,%eax
  mov    $0x989680,%edi
  lea    D34(%rip),%rsi
  mov    %edx,%ecx
  cltd
  idiv   %edi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rsi
  lea    D139(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D114(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  jmp    L33
  nopl   0x0(%rax)
L77:
  cmp    $0xb,%r14d
  je     L33
  mov    %r15,%rdi
  mov    $0x1,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  movsd  0x8(%rsp),%xmm0
  lea    D109(%rip),%rsi
  movslq %eax,%rdi
  mov    $0x1,%eax
  add    %r13,%rdi
  call   <sprintf@plt>
  jmp    L112
  nop
L14:
  mov    %r12,%rdi
  call   <fclose@plt>
  xor    %eax,%eax
  mov    %r13,%rsi
  lea    D101(%rip),%rdi
  call   <printf@plt>
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L71
  add    $0x148,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L106:
  cvttsd2si %xmm0,%esi
  mov    $0x64,%edi
  mov    %esi,%eax
  cltd
  idiv   %edi
  mov    %edx,%r8d
  cltd
  idiv   %edi
  mov    %esi,%eax
  mov    $0x2710,%edi
  lea    D11(%rip),%rsi
  mov    %edx,%ecx
  cltd
  idiv   %edi
  mov    %rbp,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbp,%rsi
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  lea    D4(%rip),%rsi
  call   <sprintf@plt>
  jmp    L33
L37:
  mulsd  D45(%rip),%xmm0
  lea    D66(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <printf@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  movsd  0x8(%rsp),%xmm0
  lea    D38(%rip),%rsi
  movslq %eax,%rdi
  mov    $0x1,%eax
  add    %r13,%rdi
  call   <sprintf@plt>
  jmp    L112
L71:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D78
datatype: string
name: retrieve_data
arguments: data_tag: D110
datatype: string
name: retrieve_data
arguments: data_tag: D45
datatype: f64
name: retrieve_data
arguments: data_tag: D34
datatype: string
name: retrieve_data
arguments: data_tag: D139
datatype: string
name: retrieve_data
arguments: data_tag: D114
datatype: string
name: retrieve_data
arguments: data_tag: D109
datatype: string
name: retrieve_data
arguments: data_tag: D101
datatype: string
name: retrieve_data
arguments: data_tag: D11
datatype: string
name: retrieve_data
arguments: data_tag: D3
datatype: string
name: retrieve_data
arguments: data_tag: D4
datatype: string
name: retrieve_data
arguments: data_tag: D66
datatype: string
name: retrieve_data
arguments: data_tag: D38
datatype: string

tool: D78:   Vel  %f km/s


tool: D110: rb

tool: D45: 1000

tool: D34: %02d:%02d:%02d.%03d

tool: D139: Time : %s


tool: D114: -3h

tool: D109: ,%.7f

tool: D101: %s,eq,geo,km,s


tool: D11: %04d-%02d-%02d

tool: D3: Date : %s


tool: D4: find_orb -oSpektrRG -v%sT

tool: D66:   Posn %f km


tool: D38: ,%.2f

assistant: ```c
int main(const int argc, const char **argv) {
  FILE *ifile = fopen(argv[1], "rb");
  char buff[90];
  char command[200];
  int i;
  assert(ifile);
  for (i = 0; i < 10; i++)
    if (fgets(buff, sizeof(buff), ifile)) {
      const double ival = atof(buff);
      switch (i) {
      case 2: {
        const int day = (int)ival;
        sprintf(buff, "%04d-%02d-%02d", day / 10000, (day / 100) % 100, day % 100);
        printf("Date : %s\n", buff);
        sprintf(command, "find_orb -oSpektrRG -v%sT", buff);
      } break;
      case 3: {
        const int millisec = (int)(ival * 1000.);
        sprintf(buff, "%02d:%02d:%02d.%03d", millisec / 10000000, (millisec / 100000) % 100, (millisec / 1000) % 100, millisec % 100);
        printf("Time : %s\n", buff);
        strcat(command, buff);
        strcat(command, "-3h");
      } break;
      case 4:
      case 5:
      case 6:
        printf("  Posn %f km\n", ival * 1000.);
        sprintf(command + strlen(command), ",%.2f", ival * 1000.);
        break;
      case 7:
      case 8:
      case 9:
        printf("  Vel  %f km/s\n", ival);
        sprintf(command + strlen(command), ",%.7f", ival);
        break;
        break;
      }
    }
  fclose(ifile);
  printf("%s,eq,geo,km,s\n", command);
  return (0);
}
```