user: Converte this assembly snippet into its equivalent C code:

```asm
<compare_grid_unstructured>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0xc(%rsp)
  mov    %edi,0x10(%rsp)
  mov    $0x0,%eax
  call   <gridInqSize@plt>
  mov    %eax,%ebp
  movslq %eax,%rbx
  shl    $0x3,%rbx
  mov    %rbx,%rcx
  mov    $0x5f,%edx
  lea    D53(%rip),%r13
  mov    %r13,%rsi
  lea    D23(%rip),%r12
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  mov    %eax,0x14(%rsp)
  movslq %eax,%r15
  mov    %rbx,%rcx
  mov    $0x60,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  mov    %eax,0x18(%rsp)
  movslq %eax,%r14
  mov    %rbx,%rcx
  mov    $0x61,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  mov    %eax,0x1c(%rsp)
  cltq
  mov    %rax,(%rsp)
  mov    %rbx,%rcx
  mov    $0x62,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  movslq %eax,%rbx
  mov    %r15,%rsi
  mov    0x10(%rsp),%r13d
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <gridInqXvals@plt>
  mov    %r14,%rsi
  mov    0xc(%rsp),%edi
  mov    $0x0,%eax
  call   <gridInqXvals@plt>
  mov    (%rsp),%rsi
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <gridInqYvals@plt>
  mov    %rbx,%rsi
  mov    0xc(%rsp),%edi
  mov    $0x0,%eax
  call   <gridInqYvals@plt>
  test   %ebp,%ebp
  jle    L49
  movslq 0x14(%rsp),%rdi
  lea    -0x1(%rbp),%eax
  lea    0x8(%rdi,%rax,8),%rcx
  mov    %rdi,%rax
  movslq 0x18(%rsp),%rdx
  sub    %rdi,%rdx
  movq   D12(%rip),%xmm2
  movsd  D13(%rip),%xmm1
  movslq 0x1c(%rsp),%rsi
  sub    %rdi,%rsi
  mov    %rbx,%r12
  sub    %rdi,%r12
  movapd %xmm2,%xmm4
  movapd %xmm1,%xmm3
L13:
  movsd  (%rax),%xmm0
  subsd  (%rdx,%rax,1),%xmm0
  andpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  ja     L39
  movsd  (%rsi,%rax,1),%xmm0
  subsd  (%r12,%rax,1),%xmm0
  andpd  %xmm4,%xmm0
  comisd %xmm3,%xmm0
  ja     L39
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L13
  jmp    L49
L39:
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <cdoWarning@plt>
L49:
  mov    %r15,%rcx
  mov    $0x70,%edx
  lea    D53(%rip),%r12
  mov    %r12,%rsi
  lea    D23(%rip),%rbp
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  mov    %r14,%rcx
  mov    $0x71,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  mov    (%rsp),%rcx
  mov    $0x72,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  mov    %rbx,%rcx
  mov    $0x73,%edx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_label: D53
type_guessed: string
name: read_data
arguments: data_label: D23
type_guessed: string
name: read_data
arguments: data_label: D12
type_guessed: qword
name: read_data
arguments: data_label: D13
type_guessed: byte[8]
name: read_data
arguments: data_label: D0
type_guessed: string

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

tool: D23: compare_grid_unstructured

tool: D12: 9223372036854775807

tool: {"D13": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

tool: D0: Geographic location of some grid points differ!

assistant: ```c
void compare_grid_unstructured(int gridID1, int gridID2) {
  double *xvals1, *xvals2;
  double *yvals1, *yvals2;
  int gridsize;
  gridsize = gridInqSize(gridID1);
  xvals1 = (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/cdo_vlist.c", 95, (gridsize * sizeof(double)));
  xvals2 = (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/cdo_vlist.c", 96, (gridsize * sizeof(double)));
  yvals1 = (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/cdo_vlist.c", 97, (gridsize * sizeof(double)));
  yvals2 = (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/cdo_vlist.c", 98, (gridsize * sizeof(double)));
  gridInqXvals(gridID1, xvals1);
  gridInqXvals(gridID2, xvals2);
  gridInqYvals(gridID1, yvals1);
  gridInqYvals(gridID2, yvals2);
  for (int i = 0; i < gridsize; ++i)
    if (fabs(xvals1[i] - xvals2[i]) > 1.e-5 || fabs(yvals1[i] - yvals2[i]) > 1.e-5) {
      cdoWarning("Geographic location of some grid points differ!");
      break;
    }
  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/cdo_vlist.c", 112, (xvals1));
  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/cdo_vlist.c", 113, (xvals2));
  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/cdo_vlist.c", 114, (yvals1));
  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/cdo_vlist.c", 115, (yvals2));
}
```