user: 请从给定的汇编指令推导出C源代码：

```asm
<read_arcinfo_mask>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x268,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r13
  mov    %rdx,(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x20(%rsp)
  mov    %r9,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x258(%rsp)
  xor    %eax,%eax
  mov    $0x0,%ebx
  lea    0x50(%rsp),%r12
  lea    0x4c(%rsp),%rax
  mov    %rax,0x10(%rsp)
  lea    D56(%rip),%r14
  lea    D20(%rip),%r15
  jmp    L281
L140:
  lea    0x34(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
L277:
  cmp    $0x3,%ebx
  je     L238
L137:
  cmp    $0x4,%ebx
  je     L286
L174:
  cmp    $0x5,%ebx
  je     L274
L216:
  add    $0x1,%ebx
  cmp    $0x6,%ebx
  je     L291
L281:
  mov    %rbp,%rdx
  mov    $0x200,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %ebx,%ebx
  je     L140
  cmp    $0x1,%ebx
  je     L108
  cmp    $0x2,%ebx
  jne    L277
  lea    0x44(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  jmp    L174
L108:
  lea    0x38(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  jmp    L137
L238:
  lea    0x48(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  jmp    L216
L286:
  mov    0x10(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  add    $0x1,%ebx
  jmp    L281
L274:
  lea    0x3c(%rsp),%rdx
  lea    0x50(%rsp),%rdi
  lea    D20(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
L291:
  movl   $0x0,0x0(%r13)
  mov    $0x0,%r14d
  lea    D19(%rip),%r12
  cmpl   $0x0,0x38(%rsp)
  jg     L130
L212:
  mov    $0x4,%esi
  mov    0x0(%r13),%edi
  call   <calloc@plt>
  mov    (%rsp),%rsi
  mov    %rax,(%rsi)
  mov    $0x4,%esi
  mov    0x0(%r13),%edi
  call   <calloc@plt>
  mov    0x8(%rsp),%rdi
  mov    %rax,(%rdi)
  mov    $0x4,%esi
  mov    0x0(%r13),%edi
  call   <calloc@plt>
  mov    0x20(%rsp),%rsi
  mov    %rax,(%rsi)
  mov    $0x4,%esi
  mov    0x0(%r13),%edi
  call   <calloc@plt>
  mov    0x28(%rsp),%rdi
  mov    %rax,(%rdi)
  mov    %rbp,%rdi
  call   <rewind@plt>
  mov    $0x6,%ebx
  lea    0x50(%rsp),%r12
L257:
  mov    %rbp,%rdx
  mov    $0x200,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  sub    $0x1,%ebx
  jne    L257
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  jle    L177
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  lea    D19(%rip),%r12
  mov    %r14d,0x18(%rsp)
  mov    %rbp,0x10(%rsp)
  mov    (%rsp),%r14
  mov    0x8(%rsp),%rbp
  jmp    L142
L150:
  add    $0x1,%ebx
  cmp    %ebx,0x34(%rsp)
  jle    L80
L278:
  lea    0x40(%rsp),%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <fscanf@plt>
  mov    0x40(%rsp),%eax
  test   %eax,%eax
  jle    L150
  cmp    0x3c(%rsp),%eax
  je     L150
  addl   $0x1,0x0(%r13)
  jmp    L150
L80:
  add    $0x1,%r14d
  cmp    %r14d,0x38(%rsp)
  jle    L212
L130:
  mov    $0x0,%ebx
  cmpl   $0x0,0x34(%rsp)
  jg     L278
  jmp    L80
L42:
  add    $0x1,%ebx
  cmp    %ebx,0x34(%rsp)
  jle    L61
L97:
  movss  0x4c(%rsp),%xmm1
  movss  %xmm1,(%rsp)
  movss  0x48(%rsp),%xmm2
  movss  %xmm2,0x8(%rsp)
  mov    %r15,%rdx
  mov    %r12,%rsi
  mov    0x10(%rsp),%rdi
  call   <fscanf@plt>
  mov    0x40(%rsp),%eax
  test   %eax,%eax
  jle    L42
  cmp    0x3c(%rsp),%eax
  je     L42
  movslq %r13d,%rax
  mov    (%r14),%rdx
  movss  0x1c(%rsp),%xmm3
  movss  %xmm3,(%rdx,%rax,4)
  mov    0x0(%rbp),%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  addsd  D59(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mulss  (%rsp),%xmm0
  addss  0x8(%rsp),%xmm0
  movss  %xmm0,(%rdx,%rax,4)
  mov    0x20(%rsp),%rcx
  mov    (%rcx),%rdx
  mov    0x18(%rsp),%ecx
  mov    %ecx,(%rdx,%rax,4)
  mov    0x28(%rsp),%rcx
  mov    (%rcx),%rdx
  mov    %ebx,(%rdx,%rax,4)
  add    $0x1,%r13d
  jmp    L42
L61:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%ecx
  mov    0x38(%rsp),%eax
  cmp    %ecx,%eax
  jle    L177
L142:
  sub    0x18(%rsp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  subsd  D59(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mulss  0x4c(%rsp),%xmm0
  addss  0x44(%rsp),%xmm0
  movss  %xmm0,0x1c(%rsp)
  cmpl   $0x0,0x34(%rsp)
  jle    L61
  mov    $0x0,%ebx
  lea    0x40(%rsp),%r15
  jmp    L97
L177:
  mov    0x258(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L161
  add    $0x268,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L161:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D56
type_guessed: string
name: disassemble_data
arguments: tag: D20
type_guessed: string
name: disassemble_data
arguments: tag: D19
type_guessed: string
name: disassemble_data
arguments: tag: D59
type_guessed: f64

tool: D56: %*s %f

tool: D20: %*s %i

tool: D19: %i

tool: D59: 0.5

assistant: ```c
void read_arcinfo_mask(FILE *fmask, int *Ncells, float **cell_lat, float **cell_lng, int **cell_row, int **cell_col) {
  char tmpstr[512];
  int ncol, nrow, NoData_value;
  int cell, i, j;
  int tmpvalue;
  float ll_lat, ll_lng, cellsize;
  float tmp_lat, tmp_lng;
  for (i = 0; i < 6; i++) {
    fgets(tmpstr, 512, fmask);
    if (i == 0)
      sscanf(tmpstr, "%*s %i", &ncol);
    if (i == 1)
      sscanf(tmpstr, "%*s %i", &nrow);
    if (i == 2)
      sscanf(tmpstr, "%*s %f", &ll_lat);
    if (i == 3)
      sscanf(tmpstr, "%*s %f", &ll_lng);
    if (i == 4)
      sscanf(tmpstr, "%*s %f", &cellsize);
    if (i == 5)
      sscanf(tmpstr, "%*s %i", &NoData_value);
  }
  (*Ncells) = 0;
  for (j = 0; j < nrow; j++) {
    for (i = 0; i < ncol; i++) {
      fscanf(fmask, "%i", &tmpvalue);
      if (tmpvalue > 0 && tmpvalue != NoData_value)
        (*Ncells)++;
    }
  }
  (*cell_lat) = (float *)calloc((*Ncells), sizeof(float));
  (*cell_lng) = (float *)calloc((*Ncells), sizeof(float));
  (*cell_row) = (int *)calloc((*Ncells), sizeof(int));
  (*cell_col) = (int *)calloc((*Ncells), sizeof(int));
  rewind(fmask);
  for (i = 0; i < 6; i++)
    fgets(tmpstr, 512, fmask);
  cell = 0;
  for (j = 0; j < nrow; j++) {
    tmp_lat = ll_lat + (float)(nrow - j - 0.5) * cellsize;
    for (i = 0; i < ncol; i++) {
      tmp_lng = ll_lng + (float)(i + 0.5) * cellsize;
      fscanf(fmask, "%i", &tmpvalue);
      if (tmpvalue > 0 && tmpvalue != NoData_value) {
        (*cell_lat)[cell] = tmp_lat;
        (*cell_lng)[cell] = tmp_lng;
        (*cell_row)[cell] = j;
        (*cell_col)[cell] = i;
        cell++;
      }
    }
  }
}
```