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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  movl   $0x45c7511d,0x48(%rsp)
  movl   $0x1,0x4c(%rsp)
  call   <setpar@plt>
  lea    0x30(%rsp),%r12
  mov    %r12,%rdx
  lea    D125(%rip),%rbx
  mov    %rbx,%rsi
  lea    D78(%rip),%rdi
  call   <mstpar@plt>
  lea    0x34(%rsp),%r13
  mov    %r13,%rdx
  mov    %rbx,%rsi
  lea    D69(%rip),%rdi
  call   <mstpar@plt>
  lea    0x2c(%rsp),%rbp
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  lea    D99(%rip),%rdi
  call   <mstpar@plt>
  lea    0x24(%rsp),%rdx
  mov    %rbx,%rsi
  lea    D24(%rip),%rdi
  call   <mstpar@plt>
  lea    0x28(%rsp),%rdx
  mov    %rbx,%rsi
  lea    D39(%rip),%rdi
  call   <mstpar@plt>
  lea    0x48(%rsp),%rdx
  mov    %rbx,%rsi
  lea    D158(%rip),%rdi
  mov    $0x0,%eax
  call   <getpar@plt>
  lea    0x4c(%rsp),%rdx
  lea    D118(%rip),%rsi
  lea    D112(%rip),%rdi
  mov    $0x0,%eax
  call   <getpar@plt>
  mov    $0x0,%eax
  call   <endpar@plt>
  lea    0xb0(%rsp),%rsi
  lea    0x60(%rsp),%rdi
  mov    %r13,%r8
  mov    %r12,%rcx
  mov    %rbp,%rdx
  call   <gen_matrices@plt>
  pxor   %xmm1,%xmm1
  cvtss2sd 0x48(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd 0x28(%rsp),%xmm0
  movsd  D145(%rip),%xmm2
  mulsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x50(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x24(%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x58(%rsp)
  cmpl   $0x0,0x4c(%rsp)
  je     L35
  lea    0x44(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x40(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L58
L35:
  lea    0x3c(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x38(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L24
L6:
  lea    0x50(%rsp),%r12
  lea    0x48(%rsp),%rbp
  lea    0x3c(%rsp),%rbx
  lea    0x38(%rsp),%rax
  push   $0x0
  lea    0xb8(%rsp),%r15
  push   %r15
  lea    0x70(%rsp),%r14
  push   %r14
  lea    0x70(%rsp),%r13
  push   %r13
  mov    %r12,%r9
  mov    %rbp,%r8
  mov    %rbx,%rcx
  mov    %rax,0x38(%rsp)
  mov    %rax,%rdx
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  call   <gcproj@plt>
  add    $0x20,%rsp
  movss  0x3c(%rsp),%xmm1
  movss  0x38(%rsp),%xmm0
  lea    D97(%rip),%rdi
  call   <printf@plt>
  push   $0x1
  push   %r15
  push   %r14
  push   %r13
  mov    %r12,%r9
  mov    %rbp,%r8
  mov    %rbx,%rcx
  mov    0x38(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  call   <gcproj@plt>
  add    $0x20,%rsp
  movss  0x44(%rsp),%xmm1
  movss  0x40(%rsp),%xmm0
  lea    D97(%rip),%rdi
  call   <printf@plt>
L58:
  mov    0x8(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  lea    D58(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x2,%eax
  je     L6
L25:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  mov    $0x0,%eax
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L49:
  lea    0x50(%rsp),%r12
  lea    0x48(%rsp),%rbp
  lea    0x44(%rsp),%rbx
  lea    0x40(%rsp),%rax
  push   $0x1
  lea    0xb8(%rsp),%r15
  push   %r15
  lea    0x70(%rsp),%r14
  push   %r14
  lea    0x70(%rsp),%r13
  push   %r13
  mov    %r12,%r9
  mov    %rbp,%r8
  mov    0x28(%rsp),%rcx
  mov    0x30(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rax,0x38(%rsp)
  mov    %rax,%rdi
  call   <gcproj@plt>
  add    $0x20,%rsp
  movss  0x44(%rsp),%xmm1
  movss  0x40(%rsp),%xmm0
  lea    D97(%rip),%rdi
  call   <printf@plt>
  push   $0x0
  push   %r15
  push   %r14
  push   %r13
  mov    %r12,%r9
  mov    %rbp,%r8
  mov    0x28(%rsp),%rcx
  mov    0x30(%rsp),%rdx
  mov    %rbx,%rsi
  mov    0x38(%rsp),%rdi
  call   <gcproj@plt>
  add    $0x20,%rsp
  movss  0x3c(%rsp),%xmm1
  movss  0x38(%rsp),%xmm0
  lea    D97(%rip),%rdi
  call   <printf@plt>
L24:
  mov    0x8(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  lea    D58(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x2,%eax
  je     L49
  jmp    L25
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D125
type: string
name: disassemble_data
arguments: label: D78
type: string
name: disassemble_data
arguments: label: D69
type: string
name: disassemble_data
arguments: label: D99
type: string
name: disassemble_data
arguments: label: D24
type: string
name: disassemble_data
arguments: label: D39
type: string
name: disassemble_data
arguments: label: D158
type: string
name: disassemble_data
arguments: label: D118
type: string
name: disassemble_data
arguments: label: D112
type: string
name: disassemble_data
arguments: label: D145
type: f64
name: disassemble_data
arguments: label: D97
type: string
name: disassemble_data
arguments: label: D58
type: string

tool: D125: f

tool: D78: ref_lon

tool: D69: ref_lat

tool: D99: alpha

tool: D24: xlen

tool: D39: ylen

tool: D158: ref_rad

tool: D118: d

tool: D112: input_xy

tool: D145: 0.5

tool: D97: %.5f %.5f


tool: D58: %f %f

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);
    }
  }
}
```