user: Translate the below assembly code into C programming language:

```asm
<get_next_tle_time>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r15
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %rcx,%rbp
  mov    %r8,%r13
  mov    %r9,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x0,0xc(%rsp)
  mov    %rdi,%rdx
  mov    $0x100,%esi
  mov    %r8,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L33
L40:
  cmpb   $0x31,0x0(%r13)
  jne    L59
L9:
  mov    %r15,%rdx
  mov    $0x100,%esi
  mov    %r14,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L44
L75:
  cmpb   $0x32,(%r14)
  jne    L76
L46:
  lea    0x1a(%rsp),%rcx
  lea    0xc(%rsp),%rdx
  lea    0x10(%rsp),%r9
  lea    0x21(%rsp),%r8
  lea    D10(%rip),%rsi
  mov    %r13,%rdi
  call   <sscanf@plt>
  movsd  0x10(%rsp),%xmm0
  cvttsd2si %xmm0,%edx
  movslq %edx,%rax
  imul   $0x10624dd3,%rax,%rax
  sar    $0x26,%rax
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,(%rbx)
  imul   $0x3e8,%eax,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  cvttsd2si %xmm1,%eax
  mov    %eax,(%r12)
  imul   $0x3e8,(%rbx),%edx
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  D11(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,0x0(%rbp)
  addl   $0x76c,(%rbx)
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L33:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L40
L59:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L9
L44:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L75
L76:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L46
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D10
datatype: string
name: extract_symbolic_data
arguments: data_label: D11
datatype: byte[8]
name: extract_symbolic_data
arguments: data_label: D30
datatype: string

tool: D10: %1i %s %s %lf

tool: {"D11": [0x00,0x00,0x00,0x00,0x70,0x99,0x94,0x41]}

tool: D30: ERROR:bad get from tle file


assistant: ```c
void get_next_tle_time(FILE *fpin, int *this_year, int *this_day, int *this_msec, char *line1, char *line2) {
  int max = 256;
  int line_no = 0;
  char tmp1[7];
  char tmp2[7];
  double full_time;
  long msec_per_day = 24 * 60 * 60 * 1000;
  if (fgets(line1, max, fpin) == NULL) {
    printf("ERROR:bad get from tle file\n");
    exit(1);
  }
  if (line1[0] != '1') {
    printf("ERROR:bad get from tle file\n");
    exit(1);
  }
  if (fgets(line2, max, fpin) == NULL) {
    printf("ERROR:bad get from tle file\n");
    exit(1);
  }
  if (line2[0] != '2') {
    printf("ERROR:bad get from tle file\n");
    exit(1);
  }
  sscanf(line1, "%1i %s %s %lf", &line_no, tmp1, tmp2, &full_time);
  *this_year = (int)full_time / 1000;
  *this_day = (int)(full_time - (*this_year * 1000));
  *this_msec = (int)((full_time - (*this_year * 1000) - *this_day) * msec_per_day);
  *this_year = *this_year + 1900;
}
```