user: 请将以下的汇编代码转换成C语言代码：

```asm
<grib_get_reduced_row>:
  endbr64
  movapd %xmm0,%xmm2
  movapd %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  mov    %rcx,%r8
  subsd  %xmm2,%xmm0
  comisd %xmm0,%xmm3
  movsd  D4(%rip),%xmm3
  jbe    L63
  addsd  %xmm3,%xmm0
  subsd  %xmm3,%xmm2
L63:
  pxor   %xmm4,%xmm4
  cvtsi2sd %rdi,%xmm4
  mulsd  %xmm4,%xmm0
  divsd  %xmm3,%xmm0
  addsd  D10(%rip),%xmm0
  cvttsd2si %xmm0,%rax
  movapd %xmm4,%xmm0
  mulsd  %xmm2,%xmm0
  mov    %rax,(%rsi)
  divsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%rax
  movapd %xmm4,%xmm0
  mulsd  %xmm1,%xmm0
  mov    %rax,(%rdx)
  divsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%rcx
  mov    %rcx,(%r8)
  mov    (%rdx),%rax
  mov    %rcx,%r9
  mov    (%rsi),%r10
  sub    %rax,%r9
  add    $0x1,%r9
  cmp    %r9,%r10
  je     L91
  jge    L71
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm0,%xmm2
  jbe    L111
  add    $0x1,%rax
  mov    %rax,(%rdx)
  mov    (%r8),%rcx
L111:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rcx,%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm1,%xmm0
  ja     L48
L54:
  mov    (%rdx),%rax
L69:
  test   %rax,%rax
  js     L43
L87:
  ret
  cs nopw 0x0(%rax,%rax,1)
L71:
  sub    $0x1,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm2,%xmm0
  jbe    L93
  mov    %rax,(%rdx)
  mov    (%r8),%rsi
  pxor   %xmm0,%xmm0
  lea    0x1(%rsi),%rcx
  cvtsi2sd %rcx,%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm0,%xmm1
  jbe    L69
L119:
  mov    %rcx,(%r8)
  mov    (%rdx),%rax
  test   %rax,%rax
  jns    L87
L43:
  add    %rax,%rdi
  mov    %rdi,(%rdx)
  ret
  xchg   %ax,%ax
L91:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm0,%xmm2
  jbe    L69
  add    $0x1,%rax
  mov    %rax,(%rdx)
  addq   $0x1,(%r8)
  jmp    L54
  nopw   0x0(%rax,%rax,1)
L48:
  sub    $0x1,%rcx
  mov    %rcx,(%r8)
  mov    (%rdx),%rax
  jmp    L69
  nop
L93:
  add    $0x1,%rcx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rcx,%xmm0
  mulsd  %xmm3,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm0,%xmm1
  ja     L119
  sub    $0x1,%r10
  mov    %r10,(%rsi)
  mov    (%rdx),%rax
  jmp    L69
```

tool_calls: name: unpack_data
arguments: tag: D4
type_guessed: f64
name: unpack_data
arguments: tag: D10
type_guessed: f32[2]

tool: D4: 360

tool: {"D10": [0.0,1.875]}

assistant: ```c
void grib_get_reduced_row(long pl, double lon_first, double lon_last, long *npoints, long *ilon_first, long *ilon_last) {
  double range = 0, dlon_first = 0, dlon_last = 0;
  long irange;
  range = lon_last - lon_first;
  if (range < 0) {
    range += 360;
    lon_first -= 360;
  }
  *npoints = (range * pl) / 360.0 + 1;
  *ilon_first = (lon_first * pl) / 360.0;
  *ilon_last = (lon_last * pl) / 360.0;
  irange = *ilon_last - *ilon_first + 1;
  if (irange != *npoints) {
    if (irange > *npoints) {
      dlon_first = ((*ilon_first) * 360.0) / pl;
      if (dlon_first < lon_first) {
        (*ilon_first)++;
        irange--;
      }
      dlon_last = ((*ilon_last) * 360.0) / pl;
      if (dlon_last > lon_last) {
        (*ilon_last)--;
        irange--;
      }
    } else {
      int ok = 0;
      dlon_first = ((*ilon_first - 1) * 360.0) / pl;
      if (dlon_first > lon_first) {
        (*ilon_first)--;
        irange++;
        ok = 1;
      }
      dlon_last = ((*ilon_last + 1) * 360.0) / pl;
      if (dlon_last < lon_last) {
        (*ilon_last)++;
        irange++;
        ok = 1;
      }
      if (!ok) {
        (*npoints)--;
      }
    }
  } else {
    dlon_first = ((*ilon_first) * 360.0) / pl;
    if (dlon_first < lon_first) {
      (*ilon_first)++;
      (*ilon_last)++;
    }
  }
  if (*ilon_first < 0)
    *ilon_first += pl;
  return;
}
```