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

```asm
<new_grid_lambertc>:
  endbr64
  push   %r15
  movq   %xmm7,%r15
  pxor   %xmm7,%xmm7
  push   %r14
  movq   %xmm6,%r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x68,%rsp
  movsd  D58(%rip),%xmm6
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  mulsd  %xmm6,%xmm0
  mulsd  %xmm6,%xmm1
  mulsd  %xmm6,%xmm2
  mulsd  %xmm6,%xmm3
  mulsd  %xmm6,%xmm4
  mulsd  %xmm6,%xmm5
  movsd  %xmm0,0x28(%rsp)
  movapd %xmm7,%xmm6
  movq   %r14,%xmm0
  movsd  %xmm1,0x20(%rsp)
  movq   %r15,%xmm1
  movsd  %xmm2,(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm5,0x18(%rsp)
  call   <lamccforint@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %rax,%rax
  movsd  0x10(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm5
  movsd  0x20(%rsp),%xmm9
  movsd  0x28(%rsp),%xmm8
  jne    L54
L78:
  lea    0x40(%rsp),%rsi
  lea    0x38(%rsp),%rdi
  movapd %xmm9,%xmm1
  movsd  %xmm5,0x18(%rsp)
  movapd %xmm8,%xmm0
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <lamccfor@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %rax,%rax
  movsd  0x10(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm5
  jne    L94
L42:
  sub    $0x1,%r12d
  pxor   %xmm0,%xmm0
  pxor   %xmm7,%xmm7
  sub    $0x1,%r13d
  cvtsi2sd %r12d,%xmm0
  movsd  D56(%rip),%xmm6
  movsd  0x38(%rsp),%xmm1
  mulsd  %xmm6,%xmm0
  mulsd  0xa0(%rsp),%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  movsd  %xmm1,0x38(%rsp)
  movsd  0x40(%rsp),%xmm1
  mulsd  %xmm6,%xmm0
  movapd %xmm7,%xmm6
  mulsd  0xa8(%rsp),%xmm0
  subsd  %xmm0,%xmm1
  movq   %r14,%xmm0
  movsd  %xmm1,0x40(%rsp)
  movq   %r15,%xmm1
  call   <lamccinvint@plt>
  test   %rax,%rax
  jne    L82
L97:
  movsd  0x40(%rsp),%xmm1
  movsd  0x38(%rsp),%xmm0
  lea    0x50(%rsp),%rsi
  lea    0x48(%rsp),%rdi
  call   <lamccinv@plt>
  test   %rax,%rax
  jne    L4
L37:
  movsd  D25(%rip),%xmm1
  movsd  0x48(%rsp),%xmm0
  pxor   %xmm2,%xmm2
  mulsd  %xmm1,%xmm0
  mulsd  0x50(%rsp),%xmm1
  comisd %xmm0,%xmm2
  movsd  D15(%rip),%xmm2
  jbe    L27
  addsd  %xmm2,%xmm0
L27:
  comisd %xmm2,%xmm0
  jb     L52
  subsd  %xmm2,%xmm0
L52:
  movsd  %xmm0,0x0(%rbp)
  movsd  %xmm1,(%rbx)
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L4:
  mov    %rax,%rsi
  lea    D48(%rip),%rdi
  call   <fatal_error_i@plt>
  jmp    L37
  nopl   0x0(%rax)
L94:
  mov    %rax,%rsi
  lea    D64(%rip),%rdi
  call   <fatal_error_i@plt>
  movsd  0x18(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L42
  nopl   0x0(%rax,%rax,1)
L54:
  mov    %rax,%rsi
  lea    D31(%rip),%rdi
  movsd  %xmm9,0x28(%rsp)
  movsd  %xmm8,0x20(%rsp)
  call   <fatal_error_i@plt>
  movsd  0x18(%rsp),%xmm5
  movsd  (%rsp),%xmm2
  movsd  0x28(%rsp),%xmm9
  movsd  0x20(%rsp),%xmm8
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  jmp    L78
  nopw   0x0(%rax,%rax,1)
L82:
  mov    %rax,%rsi
  lea    D1(%rip),%rdi
  call   <fatal_error_i@plt>
  jmp    L97
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D58
type_guessed: byte[8]
name: unpack_data
arguments: data_label: D56
type_guessed: f64
name: unpack_data
arguments: data_label: D25
type_guessed: byte[8]
name: unpack_data
arguments: data_label: D15
type_guessed: f64
name: unpack_data
arguments: data_label: D48
type_guessed: string
name: unpack_data
arguments: data_label: D64
type_guessed: string
name: unpack_data
arguments: data_label: D31
type_guessed: string
name: unpack_data
arguments: data_label: D1
type_guessed: string

tool: {"D58": [0x39,0x9d,0x52,0xa2,0x46,0xdf,0x91,0x3f]}

tool: D56: 0.5

tool: {"D25": [0xf8,0xc1,0x63,0x1a,0xdc,0xa5,0x4c,0x40]}

tool: D15: 360

tool: D48: new_grid_lambertc lamccinv: returns %ld

tool: D64: new_grid_lambertc lamccfor: returns %ld

tool: D31: new_grid_lambertc lamccforint: returns %ld

tool: D1: new_grid_lambertc lamccinvint: returns %ld

assistant: ```c
int new_grid_lambertc(int nx, int ny, double center_lon, double center_lat, double true_lat1, double true_lat2, double stand_lon, double stand_lat, double r_maj, double r_min, double dx, double dy, double *lon_0, double *lat_0) {
  double x_0, y_0, rlon, rlat;
  double false_east, false_north;
  long long_i;
  true_lat1 *= (3.14159265358979323846 / 180.0);
  true_lat2 *= (3.14159265358979323846 / 180.0);
  stand_lon *= (3.14159265358979323846 / 180.0);
  stand_lat *= (3.14159265358979323846 / 180.0);
  center_lon *= (3.14159265358979323846 / 180.0);
  center_lat *= (3.14159265358979323846 / 180.0);
  false_east = false_north = 0.0;
  long_i = lamccforint(r_maj, r_min, true_lat1, true_lat2, stand_lon, stand_lat, false_east, false_north);
  if (long_i)
    fatal_error_i("new_grid_lambertc lamccforint: returns %ld", long_i);
  long_i = lamccfor(center_lon, center_lat, &x_0, &y_0);
  if (long_i)
    fatal_error_i("new_grid_lambertc lamccfor: returns %ld", long_i);
  x_0 = x_0 - dx * ((nx - 1) * 0.5);
  y_0 = y_0 - dy * ((ny - 1) * 0.5);
  long_i = lamccinvint(r_maj, r_min, true_lat1, true_lat2, stand_lon, stand_lat, false_east, false_north);
  if (long_i)
    fatal_error_i("new_grid_lambertc lamccinvint: returns %ld", long_i);
  long_i = lamccinv(x_0, y_0, &rlon, &rlat);
  if (long_i)
    fatal_error_i("new_grid_lambertc lamccinv: returns %ld", long_i);
  rlon *= (180.0 / 3.14159265358979323846);
  rlat *= (180.0 / 3.14159265358979323846);
  if (rlon < 0.0)
    rlon += 360.0;
  if (rlon >= 360.0)
    rlon -= 360.0;
  *lon_0 = rlon;
  *lat_0 = rlat;
  return 0;
}
```