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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x190,%rsp
  mov    %edi,-0x174(%rbp)
  mov    %rsi,-0x180(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x170(%rbp)
  cmpl   $0x3,-0x174(%rbp)
  je     L36
  lea    D173(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L36:
  mov    -0x180(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D219(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x168(%rbp)
  cmpq   $0x0,-0x168(%rbp)
  jne    L15
  lea    D212(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L15:
  mov    -0x180(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D51(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x160(%rbp)
  cmpq   $0x0,-0x160(%rbp)
  jne    L56
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L56:
  mov    -0x168(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    $0x100,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L45
  lea    -0x110(%rbp),%rax
  lea    D112(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  add    $0x3,%rax
  mov    $0x3,%edx
  lea    D206(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L56
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rcx
  lea    -0x118(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x116(%rbp)
  lea    -0x118(%rbp),%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movsd  %xmm0,-0x188(%rbp)
  mov    -0x158(%rbp),%rax
  add    $0x2,%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  movsd  D87(%rip),%xmm1
  movq   %rax,%xmm4
  divsd  %xmm1,%xmm4
  movapd %xmm4,%xmm0
  addsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x150(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x53,%al
  jne    L30
  movsd  -0x150(%rbp),%xmm0
  movq   D146(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x150(%rbp)
L30:
  movsd  -0x150(%rbp),%xmm0
  movsd  D229(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x150(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rcx
  lea    -0x118(%rbp),%rax
  mov    $0x3,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x115(%rbp)
  lea    -0x118(%rbp),%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movsd  %xmm0,-0x188(%rbp)
  mov    -0x158(%rbp),%rax
  add    $0x3,%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  movsd  D87(%rip),%xmm1
  movq   %rax,%xmm5
  divsd  %xmm1,%xmm5
  movapd %xmm5,%xmm0
  addsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x148(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x57,%al
  jne    L84
  movsd  -0x148(%rbp),%xmm0
  movq   D146(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x148(%rbp)
L84:
  movsd  -0x148(%rbp),%xmm0
  movsd  D229(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x148(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x140(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  lea    D112(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x158(%rbp)
  mov    -0x158(%rbp),%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movsd  -0x140(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x140(%rbp)
  lea    -0x130(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <llh2xyz@plt>
  movsd  -0x120(%rbp),%xmm2
  movsd  -0x128(%rbp),%xmm1
  movsd  -0x130(%rbp),%xmm0
  mov    -0x170(%rbp),%rdx
  mov    -0x160(%rbp),%rax
  movapd %xmm2,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  lea    D139(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  movsd  -0x170(%rbp),%xmm1
  movsd  D194(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x170(%rbp)
  jmp    L56
L45:
  nop
  mov    -0x168(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x160(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L73
  call   <__stack_chk_fail@plt>
L73:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D173
type: string
name: unpack_data
arguments: data_tag: D219
type: string
name: unpack_data
arguments: data_tag: D212
type: string
name: unpack_data
arguments: data_tag: D51
type: string
name: unpack_data
arguments: data_tag: D183
type: string
name: unpack_data
arguments: data_tag: D112
type: string
name: unpack_data
arguments: data_tag: D206
type: string
name: unpack_data
arguments: data_tag: D87
type: f64
name: unpack_data
arguments: data_tag: D146
type: f32[2]
name: unpack_data
arguments: data_tag: D229
type: f64
name: unpack_data
arguments: data_tag: D139
type: string
name: unpack_data
arguments: data_tag: D194
type: f64

tool: D173: Usage: nmea2um <nmea_gga> <user_motion>


tool: D219: rt

tool: D212: Failed to open NMEA file.


tool: D51: wt

tool: D183: Failed to open user motion file.


tool: D112: ,

tool: D206: GGA

tool: D87: 60

tool: {"D146": [0.0,-0.0]}

tool: D229: 57.2957795131

tool: D139: %5.1f,%12.3f,%12.3f,%12.3f


tool: D194: 0.1

assistant: ```c
int main(int argc, char *argv[]) {
  FILE *inp, *outp;
  char str[256];
  char *token;
  double llh[3], xyz[3], t = 0.0;
  char tmp[8];
  if (argc != 3) {
    printf("Usage: nmea2um <nmea_gga> <user_motion>\n");
    exit(1);
  }
  if ((inp = fopen(argv[1], "rt")) == NULL) {
    printf("Failed to open NMEA file.\n");
    exit(1);
  }
  if ((outp = fopen(argv[2], "wt")) == NULL) {
    printf("Failed to open user motion file.\n");
    exit(1);
  }
  while (1) {
    if (fgets(str, 256, inp) == NULL)
      break;
    token = strtok(str, ",");
    if (strncmp(token + 3, "GGA", 3) == 0) {
      token = strtok(NULL, ",");
      token = strtok(NULL, ",");
      strncpy(tmp, token, 2);
      tmp[2] = 0;
      llh[0] = atof(tmp) + atof(token + 2) / 60.0;
      token = strtok(NULL, ",");
      if (token[0] == 'S')
        llh[0] *= -1.0;
      llh[0] /= 57.2957795131;
      token = strtok(NULL, ",");
      strncpy(tmp, token, 3);
      tmp[3] = 0;
      llh[1] = atof(tmp) + atof(token + 3) / 60.0;
      token = strtok(NULL, ",");
      if (token[0] == 'W')
        llh[1] *= -1.0;
      llh[1] /= 57.2957795131;
      token = strtok(NULL, ",");
      token = strtok(NULL, ",");
      token = strtok(NULL, ",");
      token = strtok(NULL, ",");
      llh[2] = atof(token);
      token = strtok(NULL, ",");
      token = strtok(NULL, ",");
      llh[2] += atof(token);
      llh2xyz(llh, xyz);
      fprintf(outp, "%5.1f,%12.3f,%12.3f,%12.3f\n", t, xyz[0], xyz[1], xyz[2]);
      t += 0.1;
    }
  }
  fclose(inp);
  fclose(outp);
  return (0);
}
```