user: 这段汇编代码用C语言表示是什么样的：

```asm
<write_data>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  mov    %rcx,-0x38(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L46
L43:
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <vlistInqVarGrid@plt>
  mov    %eax,%edi
  call   <gridInqSize@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <vlistInqVarMissval@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x14(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <pstreamDefRecord@plt>
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L21
L13:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L151
  ucomisd %xmm1,%xmm0
  jne    L151
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x8(%rbp),%xmm0
  jnp    L85
L151:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L100
  ucomisd %xmm1,%xmm0
  je     L74
L100:
  movsd  -0x8(%rbp),%xmm0
  ucomisd -0x8(%rbp),%xmm0
  jnp    L74
  mov    $0x1,%eax
  jmp    L26
L74:
  mov    $0x0,%eax
L26:
  and    $0x1,%eax
  jmp    L112
L85:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x8(%rbp),%xmm0
  comisd %xmm1,%xmm0
  seta   %al
  xor    $0x1,%eax
  test   %al,%al
  je     L149
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x8(%rbp),%xmm0
  seta   %al
  xor    $0x1,%eax
  test   %al,%al
  je     L149
  mov    $0x1,%eax
  jmp    L103
L149:
  mov    $0x0,%eax
L103:
  and    $0x1,%eax
L112:
  test   %al,%al
  je     L95
  addl   $0x1,-0x10(%rbp)
L95:
  addl   $0x1,-0x18(%rbp)
L21:
  mov    -0x18(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L13
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x10(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <pstreamWriteRecord@plt>
  addl   $0x1,-0x14(%rbp)
L46:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L43
  nop
  nop
  leave
  ret
```

assistant: ```c
void write_data(int streamID, int vlistID, int nvars, double *data[]) {
  int i;
  int varID;
  int nmiss;
  int gridsize;
  double missval;
  for (varID = 0; varID < nvars; ++varID) {
    gridsize = gridInqSize(vlistInqVarGrid(vlistID, varID));
    missval = vlistInqVarMissval(vlistID, varID);
    pstreamDefRecord(streamID, varID, 0);
    nmiss = 0;
    for (i = 0; i < gridsize; ++i)
      if ((((data[varID][i]) != (data[varID][i])) || ((missval) != (missval)) ? (((data[varID][i]) != (data[varID][i])) && ((missval) != (missval)) ? 1 : 0) : !(data[varID][i] < missval || missval < data[varID][i])))
        nmiss++;
    pstreamWriteRecord(streamID, data[varID], nmiss);
  }
}
```