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

```asm
<monthlyClimate2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  lea    -0xa000(%rsp),%r11
L0:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L0
  sub    $0x98,%rsp
  mov    %edi,-0xa094(%rbp)
  mov    %rsi,-0xa0a0(%rbp)
  mov    %rdx,-0xa0a8(%rbp)
  mov    %rcx,-0xa0b0(%rbp)
  mov    %r8d,-0xa098(%rbp)
  mov    %r9d,-0xa0b4(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0xa0b4(%rbp),%eax
  mov    %eax,-0xa078(%rbp)
  mov    -0xa098(%rbp),%eax
  mov    %eax,-0xa074(%rbp)
  cmpl   $0x0,0x10(%rbp)
  jne    L49
  lea    -0xa050(%rbp),%rax
  lea    D160(%rip),%rdx
  mov    %rdx,%rcx
  lea    D173(%rip),%rdx
  lea    D4(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L217
L49:
  cmpl   $0x1,0x10(%rbp)
  jne    L103
  lea    -0xa050(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rcx
  lea    D173(%rip),%rdx
  lea    D4(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L217
L103:
  cmpl   $0x2,0x10(%rbp)
  jne    L217
  lea    -0xa050(%rbp),%rax
  lea    D97(%rip),%rdx
  mov    %rdx,%rcx
  lea    D173(%rip),%rdx
  lea    D4(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L217:
  lea    -0xa050(%rbp),%rdx
  lea    -0x8050(%rbp),%rax
  lea    D185(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  movl   $0x0,-0xa088(%rbp)
  jmp    L242
L224:
  mov    -0xa088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0a0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xa088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0a8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  lea    -0x8050(%rbp),%rdx
  lea    -0x8050(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rcx,%xmm0
  lea    D108(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <sprintf@plt>
  addl   $0x1,-0xa088(%rbp)
L242:
  mov    -0xa088(%rbp),%eax
  cmp    -0xa094(%rbp),%eax
  jl     L224
  lea    -0x8050(%rbp),%rdx
  lea    -0x8050(%rbp),%rax
  lea    D58(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  cmpl   $0x0,0x10(%rbp)
  jne    L288
  lea    -0x8050(%rbp),%rdx
  lea    -0x8050(%rbp),%rax
  lea    D171(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L251
L288:
  cmpl   $0x1,0x10(%rbp)
  jne    L377
  lea    -0x8050(%rbp),%rdx
  lea    -0x8050(%rbp),%rax
  lea    D249(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L251
L377:
  cmpl   $0x2,0x10(%rbp)
  jne    L251
  lea    -0x8050(%rbp),%rdx
  lea    -0x8050(%rbp),%rax
  lea    D27(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L251:
  lea    -0x8050(%rbp),%rax
  mov    %rax,%rdi
  call   <system@plt>
  mov    -0xa094(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xa060(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L312:
  cmp    %rdx,%rsp
  je     L107
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L312
L107:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L291
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L291:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0xa058(%rbp)
  movl   $0x0,-0xa088(%rbp)
  jmp    L21
L374:
  cmpl   $0x0,0x10(%rbp)
  jne    L230
  mov    -0xa088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0b0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  lea    -0xa050(%rbp),%rax
  lea    D73(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L400
L230:
  cmpl   $0x1,0x10(%rbp)
  jne    L395
  mov    -0xa088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0b0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  lea    -0xa050(%rbp),%rax
  lea    D39(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L400
L395:
  cmpl   $0x2,0x10(%rbp)
  jne    L400
  mov    -0xa088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0b0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  lea    -0xa050(%rbp),%rax
  lea    D182(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L400:
  lea    -0xa050(%rbp),%rax
  lea    D138(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <OpenFile@plt>
  mov    -0xa058(%rbp),%rdx
  mov    -0xa088(%rbp),%ecx
  movslq %ecx,%rcx
  mov    %rax,(%rdx,%rcx,8)
  addl   $0x1,-0xa088(%rbp)
L21:
  mov    -0xa088(%rbp),%eax
  cmp    -0xa094(%rbp),%eax
  jl     L374
  cmpl   $0x0,0x10(%rbp)
  jne    L76
  lea    -0xa050(%rbp),%rax
  lea    D94(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L316
L76:
  cmpl   $0x1,0x10(%rbp)
  jne    L60
  lea    -0xa050(%rbp),%rax
  lea    D16(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L316
L60:
  cmpl   $0x2,0x10(%rbp)
  jne    L316
  lea    -0xa050(%rbp),%rax
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L316:
  lea    -0xa050(%rbp),%rax
  lea    D52(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <OpenFile@plt>
  mov    %rax,-0xa068(%rbp)
  cmpl   $0x7da,-0xa078(%rbp)
  jne    L31
  movl   $0x7d9,-0xa078(%rbp)
  cmpl   $0x7da,-0xa098(%rbp)
  jne    L31
  movl   $0x7d9,-0xa074(%rbp)
L31:
  movl   $0x0,-0xa084(%rbp)
  mov    -0xa084(%rbp),%eax
  mov    %eax,-0xa088(%rbp)
  movl   $0x1,-0xa07c(%rbp)
  movl   $0x7bb,-0xa080(%rbp)
  jmp    L234
L133:
  lea    -0xa070(%rbp),%rdx
  lea    -0x9050(%rbp),%rax
  lea    D44(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    -0xa080(%rbp),%eax
  cmp    -0xa074(%rbp),%eax
  jl     L40
  mov    -0xa070(%rbp),%rdx
  mov    -0xa058(%rbp),%rax
  mov    -0xa088(%rbp),%ecx
  movslq %ecx,%rcx
  mov    (%rax,%rcx,8),%rax
  movq   %rdx,%xmm0
  lea    D207(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
L40:
  addl   $0x1,-0xa088(%rbp)
  mov    -0xa088(%rbp),%eax
  cmp    -0xa094(%rbp),%eax
  jl     L234
  movl   $0x0,-0xa088(%rbp)
  cmpl   $0x1,0x10(%rbp)
  jne    L304
  addl   $0x1,-0xa084(%rbp)
  cmpl   $0x1,-0xa084(%rbp)
  jle    L409
  addl   $0x1,-0xa07c(%rbp)
  movl   $0x0,-0xa084(%rbp)
  jmp    L409
L304:
  addl   $0x1,-0xa07c(%rbp)
L409:
  cmpl   $0xc,-0xa07c(%rbp)
  jle    L234
  movl   $0x1,-0xa07c(%rbp)
  addl   $0x1,-0xa080(%rbp)
L234:
  mov    -0xa068(%rbp),%rax
  lea    -0x9050(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <GetALine@plt>
  test   %rax,%rax
  je     L257
  mov    -0xa080(%rbp),%eax
  cmp    -0xa078(%rbp),%eax
  jle    L133
L257:
  movl   $0x0,-0xa088(%rbp)
  jmp    L17
L42:
  mov    -0xa088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa058(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <CloseFile@plt>
  addl   $0x1,-0xa088(%rbp)
L17:
  mov    -0xa088(%rbp),%eax
  cmp    -0xa094(%rbp),%eax
  jl     L42
  lea    -0xa068(%rbp),%rax
  mov    %rax,%rdi
  call   <CloseFile@plt>
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L140
  call   <__stack_chk_fail@plt>
L140:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D160
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D173
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D4
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D0
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D97
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D185
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D108
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D58
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D171
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D249
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D27
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D73
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D39
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D182
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D138
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D94
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D16
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D26
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D52
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D44
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D207
type_guessed: string

tool: D160: pgbh06.gdas.R_H.2m.grb2

tool: D173: griblargeC2//

tool: D4: %s%s

tool: D0: flxf06.gdas.WND.10m.grb2

tool: D97: flxf06.gdas.T_CDC.EATM.grb2

tool: D185: ./wgrib2 %s

tool: D108: %s -lon %5.4f %5.4f

tool: D58: %s | grep -o ',val=[\-]*[0-9.0-9]\{1,\}[e]*[\-]*[0-9]*'

tool: D171: %s > temporary_dy//rh.txt

tool: D249: %s > temporary_dy//ws.txt

tool: D27: %s > temporary_dy//cc.txt

tool: D73: %s//rh.txt

tool: D39: %s//ws.txt

tool: D182: %s//cc.txt

tool: D138: w

tool: D94: temporary_dy//rh.txt

tool: D16: temporary_dy//ws.txt

tool: D26: temporary_dy//cc.txt

tool: D52: r

tool: D44: ,val=%lf

tool: D207: %5.6f


assistant: ```c
void monthlyClimate2(int nSites, double latitudes[], double longitudes[], char *siteDirs[], int yearLow, int yearHigh, int type, int printdebug) {
  char temp[4096], inBuf[4096], systemCall[32784];
  int i, j, yr, mo, yrHigh = yearHigh, yrLow = yearLow;
  double value;
  if (type == 0)
    sprintf(temp, "%s%s", "griblargeC2//", "pgbh06.gdas.R_H.2m.grb2");
  else if (type == 1)
    sprintf(temp, "%s%s", "griblargeC2//", "flxf06.gdas.WND.10m.grb2");
  else if (type == 2)
    sprintf(temp, "%s%s", "griblargeC2//", "flxf06.gdas.T_CDC.EATM.grb2");
  sprintf(systemCall, "./wgrib2 %s", temp);
  for (i = 0; i < nSites; i++) {
    sprintf(systemCall, "%s -lon %5.4f %5.4f", systemCall, longitudes[i], latitudes[i]);
  }
  sprintf(systemCall, "%s | grep -o ',val=[\\-]*[0-9.0-9]\\{1,\\}[e]*[\\-]*[0-9]*'", systemCall);
  if (type == 0)
    sprintf(systemCall, "%s > temporary_dy//rh.txt", systemCall);
  else if (type == 1)
    sprintf(systemCall, "%s > temporary_dy//ws.txt", systemCall);
  else if (type == 2)
    sprintf(systemCall, "%s > temporary_dy//cc.txt", systemCall);
  system(systemCall);
  FILE *siteFiles[nSites];
  for (i = 0; i < nSites; i++) {
    if (type == 0)
      sprintf(temp, "%s//rh.txt", siteDirs[i]);
    else if (type == 1)
      sprintf(temp, "%s//ws.txt", siteDirs[i]);
    else if (type == 2)
      sprintf(temp, "%s//cc.txt", siteDirs[i]);
    siteFiles[i] = OpenFile(temp, "w");
  }
  if (type == 0)
    sprintf(temp, "temporary_dy//rh.txt");
  else if (type == 1)
    sprintf(temp, "temporary_dy//ws.txt");
  else if (type == 2)
    sprintf(temp, "temporary_dy//cc.txt");
  FILE *inFile = OpenFile(temp, "r");
  if (yrHigh == 2010) {
    yrHigh = 2009;
    if (yearLow == 2010)
      yrLow = 2009;
  }
  i = j = 0;
  mo = 1;
  yr = 1979;
  while (GetALine(inFile, inBuf) && (yr <= yrHigh)) {
    sscanf(inBuf, ",val=%lf", &value);
    if (yr >= yrLow)
      fprintf(siteFiles[i], "%5.6f\n", value);
    i++;
    if (i >= nSites) {
      i = 0;
      if (type == 1) {
        j++;
        if (j > 1) {
          mo++;
          j = 0;
        }
      } else
        mo++;
      if (mo > 12) {
        mo = 1;
        yr++;
      }
    }
  }
  for (i = 0; i < nSites; i++)
    CloseFile(&siteFiles[i]);
  CloseFile(&inFile);
}
```