user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<invertLatData>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  mov    %edx,%edi
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  call   <gridInqXsize@plt>
  mov    %r12d,%edi
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <gridInqYsize@plt>
  test   %eax,%eax
  jg     L46
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,(%rbx)
L5:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L46:
  movslq %eax,%r9
  lea    D13(%rip),%r14
  mov    %eax,0x1c(%rsp)
  mov    $0x125,%edx
  lea    0x0(,%r9,8),%rcx
  mov    %r14,%rsi
  lea    D46(%rip),%rdi
  xor    %eax,%eax
  mov    %rcx,(%rsp)
  call   <Malloc@plt>
  mov    (%rsp),%rcx
  mov    %r14,%rsi
  mov    $0x126,%edx
  movslq %eax,%r12
  mov    %eax,0xc(%rsp)
  lea    D46(%rip),%rdi
  xor    %eax,%eax
  mov    %rcx,0x10(%rsp)
  mov    %r12,%r15
  call   <Malloc@plt>
  mov    0x1c(%rsp),%r8d
  movslq %r13d,%rdx
  mov    %rbx,%rsi
  movslq %eax,%rcx
  mov    %eax,0x18(%rsp)
  lea    0x0(,%rdx,8),%r13
  mov    %r12,%rax
  mov    %rcx,(%rsp)
  sub    %r12,%rcx
  lea    (%r12,%r8,8),%rbx
  mov    %rcx,%rdi
  mov    0x10(%rsp),%rcx
  nopl   0x0(%rax)
L7:
  mov    %rbp,(%rax)
  add    %r13,%rbp
  mov    %rsi,(%rdi,%rax,1)
  add    $0x8,%rax
  add    %r13,%rsi
  cmp    %rbx,%rax
  jne    L7
  mov    (%rsp),%rax
  add    %r12,%rax
  lea    -0x8(%rcx,%rax,1),%rbp
  nopw   0x0(%rax,%rax,1)
L59:
  mov    %rbp,%rax
  mov    (%r15),%rsi
  mov    %r13,%rdx
  sub    %r15,%rax
  add    $0x8,%r15
  mov    (%rax),%rdi
  call   <memcpy@plt>
  cmp    %rbx,%r15
  jne    L59
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jne    L25
L28:
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  je     L5
  mov    (%rsp),%rcx
  add    $0x28,%rsp
  mov    %r14,%rsi
  mov    $0x132,%edx
  pop    %rbx
  lea    D46(%rip),%rdi
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <Free@plt>
  nopl   0x0(%rax)
L25:
  mov    %r12,%rcx
  mov    $0x131,%edx
  mov    %r14,%rsi
  xor    %eax,%eax
  lea    D46(%rip),%rdi
  call   <Free@plt>
  jmp    L28
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D13
type: string
name: extract_symbolic_data
arguments: data_label: D46
type: string

tool: D13: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Invert.c

tool: D46: invertLatData

assistant: ```c
void invertLatData(double *array1, double *array2, int gridID1) {
  int nlat, nlon;
  int ilat;
  double **field1, **field2;
  nlon = gridInqXsize(gridID1);
  nlat = gridInqYsize(gridID1);
  if (nlat > 0) {
    field1 = (double **)Malloc(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Invert.c", 293, (nlat * sizeof(double *)));
    field2 = (double **)Malloc(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Invert.c", 294, (nlat * sizeof(double *)));
    for (ilat = 0; ilat < nlat; ilat++) {
      field1[ilat] = array1 + ilat * nlon;
      field2[ilat] = array2 + ilat * nlon;
    }
    for (ilat = 0; ilat < nlat; ilat++)
      memcpy(field2[nlat - ilat - 1], field1[ilat], nlon * sizeof(double));
    if (field1)
      Free(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Invert.c", 305, (field1));
    if (field2)
      Free(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/Invert.c", 306, (field2));
  } else {
    array2[0] = array1[0];
  }
}
```