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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D33(%rip),%rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%r14
  lea    0x44(%rsp),%r15
  movl   $0x45c7511d,0x58(%rsp)
  movl   $0x1,0x5c(%rsp)
  lea    0x3c(%rsp),%r13
  lea    0x58(%rsp),%r12
  call   <setpar@plt>
  mov    %rbp,%rsi
  mov    %r14,%rdx
  lea    0x70(%rsp),%rbx
  lea    D137(%rip),%rdi
  call   <mstpar@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdx
  lea    D131(%rip),%rdi
  call   <mstpar@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdx
  lea    D108(%rip),%rdi
  call   <mstpar@plt>
  mov    %rbp,%rsi
  lea    0x34(%rsp),%rdx
  lea    D15(%rip),%rdi
  call   <mstpar@plt>
  mov    %rbp,%rsi
  lea    0x38(%rsp),%rdx
  lea    D70(%rip),%rdi
  call   <mstpar@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdx
  xor    %eax,%eax
  lea    D91(%rip),%rdi
  lea    0xc0(%rsp),%rbp
  call   <getpar@plt>
  lea    0x5c(%rsp),%rdx
  lea    D109(%rip),%rsi
  xor    %eax,%eax
  lea    D77(%rip),%rdi
  call   <getpar@plt>
  xor    %eax,%eax
  call   <endpar@plt>
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <gen_matrices@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  movsd  D5(%rip),%xmm2
  cvtss2sd 0x38(%rsp),%xmm0
  cvtss2sd 0x58(%rsp),%xmm1
  mov    0x5c(%rsp),%eax
  mulsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x60(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x34(%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x68(%rsp)
  test   %eax,%eax
  je     L29
  mov    %rbx,0x10(%rsp)
  lea    D28(%rip),%rax
  mov    %r12,%rbx
  lea    0x54(%rsp),%r14
  mov    %rax,0x8(%rsp)
  lea    0x50(%rsp),%r13
  lea    D50(%rip),%r15
  jmp    L64
  nopl   0x0(%rax)
L6:
  lea    0x60(%rsp),%r9
  lea    0x4c(%rsp),%rcx
  mov    %rbx,%r8
  mov    %r14,%rsi
  lea    0x48(%rsp),%r12
  push   $0x0
  mov    %r13,%rdi
  push   %rbp
  mov    %r12,%rdx
  push   0x20(%rsp)
  lea    0x80(%rsp),%r10
  push   %r10
  mov    %r10,0x48(%rsp)
  mov    %r9,0x40(%rsp)
  mov    %rcx,0x38(%rsp)
  call   <gcproj@plt>
  movss  0x6c(%rsp),%xmm1
  add    $0x20,%rsp
  mov    %r15,%rdi
  movss  0x48(%rsp),%xmm0
  call   <printf@plt>
  push   $0x1
  mov    %r13,%rdi
  mov    %rbx,%r8
  push   %rbp
  mov    %r12,%rdx
  mov    %r14,%rsi
  push   0x20(%rsp)
  mov    0x40(%rsp),%r10
  push   %r10
  mov    0x40(%rsp),%r9
  mov    0x38(%rsp),%rcx
  call   <gcproj@plt>
  movss  0x74(%rsp),%xmm1
  add    $0x20,%rsp
  mov    %r15,%rdi
  movss  0x50(%rsp),%xmm0
  call   <printf@plt>
L64:
  mov    0x8(%rsp),%rdi
  mov    %r14,%rdx
  mov    %r13,%rsi
  call   <scanf@plt>
  cmp    $0x2,%eax
  je     L6
L51:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L59
  add    $0x118,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  lea    D28(%rip),%rax
  lea    0x4c(%rsp),%r14
  mov    %rax,0x8(%rsp)
  lea    0x48(%rsp),%r13
  lea    D50(%rip),%r15
  jmp    L31
  nopw   0x0(%rax,%rax,1)
L10:
  lea    0x50(%rsp),%r10
  lea    0x60(%rsp),%r9
  mov    %r12,%r8
  mov    %r14,%rcx
  lea    0x54(%rsp),%rsi
  push   $0x1
  mov    %r10,%rdi
  mov    %r13,%rdx
  push   %rbp
  push   %rbx
  lea    0x80(%rsp),%r11
  push   %r11
  mov    %r10,0x30(%rsp)
  mov    %r11,0x48(%rsp)
  mov    %r9,0x40(%rsp)
  mov    %rsi,0x38(%rsp)
  call   <gcproj@plt>
  movss  0x74(%rsp),%xmm1
  add    $0x20,%rsp
  mov    %r15,%rdi
  movss  0x50(%rsp),%xmm0
  call   <printf@plt>
  push   $0x0
  mov    %r12,%r8
  mov    %r14,%rcx
  push   %rbp
  mov    %r13,%rdx
  push   %rbx
  mov    0x40(%rsp),%r11
  push   %r11
  mov    0x30(%rsp),%rdi
  mov    0x40(%rsp),%r9
  mov    0x38(%rsp),%rsi
  call   <gcproj@plt>
  movss  0x6c(%rsp),%xmm1
  add    $0x20,%rsp
  mov    %r15,%rdi
  movss  0x48(%rsp),%xmm0
  call   <printf@plt>
L31:
  mov    0x8(%rsp),%rdi
  mov    %r14,%rdx
  mov    %r13,%rsi
  call   <scanf@plt>
  cmp    $0x2,%eax
  je     L10
  jmp    L51
L59:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D33
datatype: string
name: retrieve_data
arguments: data_tag: D137
datatype: string
name: retrieve_data
arguments: data_tag: D131
datatype: string
name: retrieve_data
arguments: data_tag: D108
datatype: string
name: retrieve_data
arguments: data_tag: D15
datatype: string
name: retrieve_data
arguments: data_tag: D70
datatype: string
name: retrieve_data
arguments: data_tag: D91
datatype: string
name: retrieve_data
arguments: data_tag: D109
datatype: string
name: retrieve_data
arguments: data_tag: D77
datatype: string
name: retrieve_data
arguments: data_tag: D5
datatype: f64
name: retrieve_data
arguments: data_tag: D28
datatype: string
name: retrieve_data
arguments: data_tag: D50
datatype: string

tool: D33: f

tool: D137: ref_lon

tool: D131: ref_lat

tool: D108: alpha

tool: D15: xlen

tool: D70: ylen

tool: D91: ref_rad

tool: D109: d

tool: D77: input_xy

tool: D5: 0.5

tool: D28: %f %f

tool: D50: %.5f %.5f


assistant: ```c
main(int ac, char **av) {
  FILE *fpw, *fpr, *fopfile();
  float xlen, ylen, alpha, ref_lon, ref_lat, rlon, rlat;
  float dx, dy, xf, yf;
  double g0, b0;
  double amat[9], ainv[9];
  float ref_rad = 6378.139;
  int input_xy = 1;
  setpar(ac, av);
  mstpar("ref_lon", "f", &ref_lon);
  mstpar("ref_lat", "f", &ref_lat);
  mstpar("alpha", "f", &alpha);
  mstpar("xlen", "f", &xlen);
  mstpar("ylen", "f", &ylen);
  getpar("ref_rad", "f", &ref_rad);
  getpar("input_xy", "d", &input_xy);
  endpar();
  gen_matrices(amat, ainv, &alpha, &ref_lon, &ref_lat);
  g0 = (double)(0.5 * ylen) / (double)(ref_rad);
  b0 = (double)(0.5 * xlen) / (double)(ref_rad);
  if (input_xy) {
    while (scanf("%f %f", &xf, &yf) == 2) {
      gcproj(&xf, &yf, &rlon, &rlat, &ref_rad, &g0, &b0, amat, ainv, 0);
      printf("%.5f %.5f\n", rlon, rlat);
      gcproj(&xf, &yf, &rlon, &rlat, &ref_rad, &g0, &b0, amat, ainv, 1);
      printf("%.5f %.5f\n", xf, yf);
    }
  } else {
    while (scanf("%f %f", &rlon, &rlat) == 2) {
      gcproj(&xf, &yf, &rlon, &rlat, &ref_rad, &g0, &b0, amat, ainv, 1);
      printf("%.5f %.5f\n", xf, yf);
      gcproj(&xf, &yf, &rlon, &rlat, &ref_rad, &g0, &b0, amat, ainv, 0);
      printf("%.5f %.5f\n", rlon, rlat);
    }
  }
}
```