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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L125
  cmp    $0xb,%edi
  je     L86
L208:
  lea    D51(%rip),%rdi
  call   <printf@plt>
  lea    D59(%rip),%rdi
  call   <printf@plt>
  lea    D127(%rip),%rdi
  call   <errorHandler@plt>
L120:
  lea    D30(%rip),%rsi
  lea    D221(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L166
L127:
  movsbl 0x56(%rsp),%edi
  call   <toupper@plt>
  mov    %al,0x56(%rsp)
  movq   %rbx,%xmm1
  subsd  0x40(%rsp),%xmm1
  mov    0x3c(%rsp),%ecx
  lea    -0x1(%rcx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x48(%rsp)
  movsd  0x8(%rsp),%xmm1
  subsd  0x20(%rsp),%xmm1
  lea    -0x1(%r14),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x28(%rsp)
  test   %ecx,%ecx
  jle    L80
  movl   $0x0,0x38(%rsp)
  mov    %r15,0x18(%rsp)
  jmp    L9
L125:
  mov    0x8(%rsi),%rdi
  lea    D150(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L208
  lea    D303(%rip),%rdi
  call   <printf@plt>
  lea    D145(%rip),%rdi
  call   <printf@plt>
  lea    D38(%rip),%rdi
  call   <printf@plt>
  lea    D284(%rip),%rdi
  call   <printf@plt>
  lea    D322(%rip),%rdi
  call   <printf@plt>
  lea    D184(%rip),%rdi
  call   <printf@plt>
  lea    D168(%rip),%rdi
  call   <printf@plt>
  lea    D181(%rip),%rdi
  call   <printf@plt>
  lea    D231(%rip),%rdi
  call   <printf@plt>
  lea    D144(%rip),%rdi
  call   <printf@plt>
  lea    D107(%rip),%rdi
  call   <printf@plt>
  lea    D122(%rip),%rdi
  call   <printf@plt>
  lea    D101(%rip),%rdi
  call   <printf@plt>
  lea    D296(%rip),%rdi
  call   <printf@plt>
  lea    D176(%rip),%rdi
  call   <printf@plt>
  lea    D259(%rip),%rdi
  call   <printf@plt>
  lea    D171(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L120
L86:
  mov    0x8(%rsi),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  mov    0x10(%r12),%rsi
  lea    0x56(%rsp),%rdi
  call   <strcpy@plt>
  mov    0x18(%r12),%rdi
  call   <atoi@plt>
  mov    %eax,0x3c(%rsp)
  mov    0x20(%r12),%rdi
  call   <atoi@plt>
  mov    %eax,%r14d
  mov    0x28(%r12),%rdi
  call   <atof@plt>
  movsd  %xmm0,0x40(%rsp)
  mov    0x30(%r12),%rdi
  call   <atof@plt>
  movq   %xmm0,%rbx
  mov    0x38(%r12),%rdi
  call   <atof@plt>
  movsd  %xmm0,0x20(%rsp)
  mov    0x40(%r12),%rdi
  call   <atof@plt>
  movsd  %xmm0,0x8(%rsp)
  mov    0x48(%r12),%rdi
  call   <atof@plt>
  movsd  %xmm0,0x30(%rsp)
  mov    0x50(%r12),%rdi
  call   <atoi@plt>
  mov    %eax,%r13d
  jmp    L120
L166:
  lea    D88(%rip),%rdi
  call   <errorHandler@plt>
  jmp    L127
L188:
  lea    0x56(%rsp),%rdi
  lea    D216(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L170
  pxor   %xmm0,%xmm0
  cvtsi2sd %r15d,%xmm0
  movq   %rbx,%xmm3
  movsd  0x30(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  lea    D210(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x4,%eax
  call   <fprintf@plt>
  jmp    L160
L170:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r15d,%xmm0
  movsd  0x30(%rsp),%xmm3
  movq   %rbx,%xmm2
  movsd  0x8(%rsp),%xmm1
  lea    D247(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x4,%eax
  call   <fprintf@plt>
  jmp    L160
L84:
  lea    0x56(%rsp),%rdi
  lea    D32(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L147
  movq   %rbx,%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  0x30(%rsp),%xmm0
  lea    D187(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x3,%eax
  call   <fprintf@plt>
L160:
  add    $0x1,%r12d
  cmp    %r12d,%r14d
  je     L157
L81:
  mov    %ebp,0x14(%rsp)
  lea    (%r12,%rbp,1),%r15d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  mulsd  0x28(%rsp),%xmm0
  addsd  0x20(%rsp),%xmm0
  movq   %xmm0,%rbx
  test   %r13d,%r13d
  je     L84
  lea    0x56(%rsp),%rdi
  lea    D32(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L188
  pxor   %xmm0,%xmm0
  cvtsi2sd %r15d,%xmm0
  movq   %rbx,%xmm3
  movsd  0x8(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm1
  lea    D146(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x4,%eax
  call   <fprintf@plt>
  jmp    L160
L147:
  lea    0x56(%rsp),%rdi
  lea    D216(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L231
  movq   %rbx,%xmm2
  movsd  0x30(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm0
  lea    D254(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x3,%eax
  call   <fprintf@plt>
  jmp    L160
L231:
  movsd  0x30(%rsp),%xmm2
  movq   %rbx,%xmm1
  movsd  0x8(%rsp),%xmm0
  lea    D100(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x3,%eax
  call   <fprintf@plt>
  jmp    L160
L157:
  mov    0x14(%rsp),%ebp
  add    %r12d,%ebp
L172:
  addl   $0x1,0x38(%rsp)
  mov    0x38(%rsp),%eax
  cmp    %eax,0x3c(%rsp)
  je     L103
L9:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x38(%rsp),%xmm0
  mulsd  0x48(%rsp),%xmm0
  addsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  test   %r14d,%r14d
  jle    L172
  mov    $0x0,%r12d
  jmp    L81
L103:
  mov    0x18(%rsp),%r15
L80:
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L140
  mov    $0x0,%eax
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L140:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D51
datatype: string
name: unpack_data
arguments: data_label: D59
datatype: string
name: unpack_data
arguments: data_label: D127
datatype: string
name: unpack_data
arguments: data_label: D30
datatype: string
name: unpack_data
arguments: data_label: D221
datatype: string
name: unpack_data
arguments: data_label: D150
datatype: string
name: unpack_data
arguments: data_label: D303
datatype: string
name: unpack_data
arguments: data_label: D145
datatype: string
name: unpack_data
arguments: data_label: D38
datatype: string
name: unpack_data
arguments: data_label: D284
datatype: string
name: unpack_data
arguments: data_label: D322
datatype: string
name: unpack_data
arguments: data_label: D184
datatype: string
name: unpack_data
arguments: data_label: D168
datatype: string
name: unpack_data
arguments: data_label: D181
datatype: string
name: unpack_data
arguments: data_label: D231
datatype: string
name: unpack_data
arguments: data_label: D144
datatype: string
name: unpack_data
arguments: data_label: D107
datatype: string
name: unpack_data
arguments: data_label: D122
datatype: string
name: unpack_data
arguments: data_label: D101
datatype: string
name: unpack_data
arguments: data_label: D296
datatype: string
name: unpack_data
arguments: data_label: D176
datatype: string
name: unpack_data
arguments: data_label: D259
datatype: string
name: unpack_data
arguments: data_label: D171
datatype: string
name: unpack_data
arguments: data_label: D88
datatype: string
name: unpack_data
arguments: data_label: D216
datatype: string
name: unpack_data
arguments: data_label: D210
datatype: string
name: unpack_data
arguments: data_label: D247
datatype: string
name: unpack_data
arguments: data_label: D32
datatype: string
name: unpack_data
arguments: data_label: D187
datatype: string
name: unpack_data
arguments: data_label: D146
datatype: string
name: unpack_data
arguments: data_label: D254
datatype: string
name: unpack_data
arguments: data_label: D100
datatype: string

tool: D51: 

Correct syntaxis is:
meshgen a constantPlane nx ny xmin 

tool: D59: xmax ymin ymax r lineNumber


tool: D127: Call 'mesh -h' for help.


tool: D30: a

tool: D221: mesh.dat

tool: D150: -h

tool: D303: 

Call as:

	./meshgen a constantPlane 

tool: D145: nx ny xmin xmax ymin ymax r lineNumber


tool: D38: 
Generates a regular 2d mesh with limits [(xmin,xmax),

tool: D284: (ymin,ymax)] in the
plane constantPlane = r, where 

tool: D322: constantPlane takes the values x, y or z.



tool: D184: lineNumber == 0 : the line number is not recorded in the file


tool: D168: lineNumber == 1 : the line number is recorded in the file



tool: D181: Example:

	mesh 1 z 100 20 -50 50 -10 10 0.0 1



tool: D231: Produces a mesh in the plane z = 0.0 in the range x = (-50,50),


tool: D144: y = (-10,10), with 100 points in the x direction and 20 in the y


tool: D107: direction. The line number is saved to the ouput file 

tool: D122: starting with 1.

The output file is called 'mesh.dat' 

tool: D101: for convenience. It can be called
sucesively in order to 

tool: D296: produce a single file with all the necessary points,


tool: D176: as long as 'a' contains the correct number of the first 

tool: D259: element of the
plane (1 in the first call, 442 in the second 

tool: D171: if n = 21, et...).



tool: D88: Error: Can't open output file mesh.dat

tool: D216: Y

tool: D210: %d    %le %le %le


tool: D247: %d   %le %le %le


tool: D32: X

tool: D187: %le    %le %le


tool: D146: %d %le %le %le


tool: D254: %le   %le %le


tool: D100: %le  %le %le


assistant: ```c
int main(int argc, char *argv[]) {
  FILE *fout;
  char constantPlane[2];
  int a, count, i, j, nx, ny, nz, n, lines;
  double dx, dy, r, x, xmin, xmax, y, ymin, ymax, z;
  if (argc == 2 && strcmp(argv[1], "-h") == 0) {
    printf("\n\nCall as:\n\n\t./meshgen a constantPlane ");
    printf("nx ny xmin xmax ymin ymax r lineNumber\n");
    printf("\nGenerates a regular 2d mesh with limits [(xmin,xmax),");
    printf("(ymin,ymax)] in the\nplane constantPlane = r, where ");
    printf("constantPlane takes the values x, y or z.\n\n");
    printf("lineNumber == 0 : the line number is not recorded in the file\n");
    printf("lineNumber == 1 : the line number is recorded in the file\n\n");
    printf("Example:\n\n\tmesh 1 z 100 20 -50 50 -10 10 0.0 1\n\n");
    printf("Produces a mesh in the plane z = 0.0 in the range x = (-50,50),\n");
    printf("y = (-10,10), with 100 points in the x direction and 20 in the y\n");
    printf("direction. The line number is saved to the ouput file ");
    printf("starting with 1.\n\nThe output file is called 'mesh.dat' ");
    printf("for convenience. It can be called\nsucesively in order to ");
    printf("produce a single file with all the necessary points,\n");
    printf("as long as 'a' contains the correct number of the first ");
    printf("element of the\nplane (1 in the first call, 442 in the second ");
    printf("if n = 21, et...).\n\n");
    exit(0);
  } else if (argc != 11) {
    printf("\n\nCorrect syntaxis is:\nmeshgen a constantPlane nx ny xmin ");
    printf("xmax ymin ymax r lineNumber\n");
    errorHandler("Call 'mesh -h' for help.\n");
  } else {
    a = atoi(argv[1]);
    strcpy(constantPlane, argv[2]);
    nx = atoi(argv[3]);
    ny = atoi(argv[4]);
    xmin = atof(argv[5]);
    xmax = atof(argv[6]);
    ymin = atof(argv[7]);
    ymax = atof(argv[8]);
    r = atof(argv[9]);
    lines = atoi(argv[10]);
  }
  if ((fout = fopen("mesh.dat", "a")) == NULL)
    errorHandler("Error: Can't open output file mesh.dat");
  constantPlane[0] = toupper(constantPlane[0]);
  dx = (xmax - xmin) / (nx - 1);
  dy = (ymax - ymin) / (ny - 1);
  count = a;
  for (i = 0; i < nx; i++) {
    x = xmin + i * dx;
    for (j = 0; j < ny; j++) {
      y = ymin + j * dy;
      if (lines) {
        if (strcmp(constantPlane, "X") == 0)
          fprintf(fout, "%d %le %le %le\n", count, r, x, y);
        else if (strcmp(constantPlane, "Y") == 0)
          fprintf(fout, "%d    %le %le %le\n", count, x, r, y);
        else
          fprintf(fout, "%d   %le %le %le\n", count, x, y, r);
      } else {
        if (strcmp(constantPlane, "X") == 0)
          fprintf(fout, "%le    %le %le\n", r, x, y);
        else if (strcmp(constantPlane, "Y") == 0)
          fprintf(fout, "%le   %le %le\n", x, r, y);
        else
          fprintf(fout, "%le  %le %le\n", x, y, r);
      }
      count++;
    }
  }
  fclose(fout);
  return 0;
}
```