user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L104
  cmp    $0xb,%edi
  je     L141
L125:
  lea    D254(%rip),%rdi
  call   <printf@plt>
  lea    D180(%rip),%rdi
  call   <printf@plt>
  lea    D314(%rip),%rdi
  call   <errorHandler@plt>
L201:
  lea    D262(%rip),%rsi
  lea    D60(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L33
L98:
  movsbl 0x56(%rsp),%edi
  call   <toupper@plt>
  mov    0x3c(%rsp),%ecx
  pxor   %xmm0,%xmm0
  movq   %rbx,%xmm1
  subsd  0x40(%rsp),%xmm1
  mov    0x20(%rsp),%edx
  mov    %al,0x56(%rsp)
  lea    -0x1(%rcx),%eax
  cvtsi2sd %eax,%xmm0
  lea    -0x1(%rdx),%eax
  divsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm1,0x48(%rsp)
  movq   %rbp,%xmm1
  subsd  0x10(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  test   %ecx,%ecx
  jle    L153
  test   %edx,%edx
  jle    L153
  movl   $0x0,0x38(%rsp)
  lea    0x56(%rsp),%rbp
  lea    D91(%rip),%r14
  nopl   0x0(%rax)
L219:
  pxor   %xmm0,%xmm0
  xor    %ebx,%ebx
  cvtsi2sdl 0x38(%rsp),%xmm0
  mulsd  0x48(%rsp),%xmm0
  addsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L3:
  call   <strcmp@plt>
  movsd  0x30(%rsp),%xmm1
  test   %rax,%rax
  jne    L206
  pxor   %xmm0,%xmm0
  movapd %xmm1,%xmm3
  mov    %r13,%rdi
  mov    $0x4,%eax
  cvtsi2sd %r15d,%xmm0
  movsd  0x8(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm1
  lea    D214(%rip),%rsi
  call   <fprintf@plt>
L115:
  add    $0x1,%ebx
  cmp    %ebx,0x20(%rsp)
  je     L5
L177:
  pxor   %xmm1,%xmm1
  mov    0x24(%rsp),%eax
  lea    (%rbx,%r12,1),%r15d
  mov    %r14,%rsi
  cvtsi2sd %ebx,%xmm1
  mulsd  0x18(%rsp),%xmm1
  mov    %rbp,%rdi
  addsd  0x10(%rsp),%xmm1
  test   %eax,%eax
  movsd  %xmm1,0x30(%rsp)
  jne    L3
  call   <strcmp@plt>
  movsd  0x30(%rsp),%xmm1
  test   %rax,%rax
  jne    L216
  movapd %xmm1,%xmm2
  movsd  0x28(%rsp),%xmm0
  mov    %r13,%rdi
  add    $0x1,%ebx
  movsd  0x8(%rsp),%xmm1
  lea    D224(%rip),%rsi
  mov    $0x3,%eax
  call   <fprintf@plt>
  cmp    %ebx,0x20(%rsp)
  jne    L177
L5:
  addl   $0x1,0x38(%rsp)
  add    0x20(%rsp),%r12d
  mov    0x38(%rsp),%eax
  cmp    %eax,0x3c(%rsp)
  jne    L219
L153:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L206:
  lea    D72(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm1,0x30(%rsp)
  call   <strcmp@plt>
  pxor   %xmm0,%xmm0
  movsd  0x30(%rsp),%xmm1
  test   %rax,%rax
  cvtsi2sd %r15d,%xmm0
  jne    L159
  movapd %xmm1,%xmm3
  movsd  0x28(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  mov    %r13,%rdi
  lea    D157(%rip),%rsi
  mov    $0x4,%eax
  call   <fprintf@plt>
  jmp    L115
  nopw   0x0(%rax,%rax,1)
L216:
  lea    D72(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm1,0x30(%rsp)
  call   <strcmp@plt>
  movsd  0x30(%rsp),%xmm1
  test   %rax,%rax
  jne    L222
  movapd %xmm1,%xmm2
  movsd  0x8(%rsp),%xmm0
  movsd  0x28(%rsp),%xmm1
  mov    %r13,%rdi
  lea    D267(%rip),%rsi
  mov    $0x3,%eax
  call   <fprintf@plt>
  jmp    L115
  nopl   0x0(%rax)
L159:
  movapd %xmm1,%xmm2
  movsd  0x28(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm1
  mov    %r13,%rdi
  lea    D285(%rip),%rsi
  mov    $0x4,%eax
  call   <fprintf@plt>
  jmp    L115
  nopl   0x0(%rax)
L222:
  movsd  0x28(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm0
  mov    %r13,%rdi
  mov    $0x3,%eax
  lea    D248(%rip),%rsi
  call   <fprintf@plt>
  jmp    L115
L141:
  mov    0x8(%rsi),%rdi
  lea    0x56(%rsp),%rbp
  call   <atoi@plt>
  mov    0x10(%r13),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <strcpy@plt>
  mov    0x18(%r13),%rdi
  call   <atoi@plt>
  mov    0x20(%r13),%rdi
  mov    %eax,0x3c(%rsp)
  call   <atoi@plt>
  mov    0x28(%r13),%rdi
  mov    %eax,0x20(%rsp)
  call   <atof@plt>
  mov    0x30(%r13),%rdi
  movsd  %xmm0,0x40(%rsp)
  call   <atof@plt>
  mov    0x38(%r13),%rdi
  movq   %xmm0,%rbx
  call   <atof@plt>
  mov    0x40(%r13),%rdi
  movsd  %xmm0,0x10(%rsp)
  call   <atof@plt>
  mov    0x48(%r13),%rdi
  movq   %xmm0,%rbp
  call   <atof@plt>
  mov    0x50(%r13),%rdi
  movsd  %xmm0,0x28(%rsp)
  call   <atoi@plt>
  mov    %eax,0x24(%rsp)
  jmp    L201
L104:
  mov    0x8(%rsi),%rdi
  lea    D62(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L125
  lea    D188(%rip),%rdi
  call   <printf@plt>
  lea    D50(%rip),%rdi
  call   <printf@plt>
  lea    D230(%rip),%rdi
  call   <printf@plt>
  lea    D76(%rip),%rdi
  call   <printf@plt>
  lea    D128(%rip),%rdi
  call   <printf@plt>
  lea    D87(%rip),%rdi
  call   <printf@plt>
  lea    D8(%rip),%rdi
  call   <printf@plt>
  lea    D281(%rip),%rdi
  call   <printf@plt>
  lea    D192(%rip),%rdi
  call   <printf@plt>
  lea    D73(%rip),%rdi
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <printf@plt>
  lea    D59(%rip),%rdi
  call   <printf@plt>
  lea    D199(%rip),%rdi
  call   <printf@plt>
  lea    D149(%rip),%rdi
  call   <printf@plt>
  lea    D69(%rip),%rdi
  call   <printf@plt>
  lea    D97(%rip),%rdi
  call   <printf@plt>
  lea    D251(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L201
L33:
  lea    D44(%rip),%rdi
  call   <errorHandler@plt>
  jmp    L98
L21:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D254
datatype: string
name: read_data
arguments: data_tag: D180
datatype: string
name: read_data
arguments: data_tag: D314
datatype: string
name: read_data
arguments: data_tag: D262
datatype: string
name: read_data
arguments: data_tag: D60
datatype: string
name: read_data
arguments: data_tag: D91
datatype: string
name: read_data
arguments: data_tag: D214
datatype: string
name: read_data
arguments: data_tag: D224
datatype: string
name: read_data
arguments: data_tag: D72
datatype: string
name: read_data
arguments: data_tag: D157
datatype: string
name: read_data
arguments: data_tag: D267
datatype: string
name: read_data
arguments: data_tag: D285
datatype: string
name: read_data
arguments: data_tag: D248
datatype: string
name: read_data
arguments: data_tag: D62
datatype: string
name: read_data
arguments: data_tag: D188
datatype: string
name: read_data
arguments: data_tag: D50
datatype: string
name: read_data
arguments: data_tag: D230
datatype: string
name: read_data
arguments: data_tag: D76
datatype: string
name: read_data
arguments: data_tag: D128
datatype: string
name: read_data
arguments: data_tag: D87
datatype: string
name: read_data
arguments: data_tag: D8
datatype: string
name: read_data
arguments: data_tag: D281
datatype: string
name: read_data
arguments: data_tag: D192
datatype: string
name: read_data
arguments: data_tag: D73
datatype: string
name: read_data
arguments: data_tag: D35
datatype: string
name: read_data
arguments: data_tag: D59
datatype: string
name: read_data
arguments: data_tag: D199
datatype: string
name: read_data
arguments: data_tag: D149
datatype: string
name: read_data
arguments: data_tag: D69
datatype: string
name: read_data
arguments: data_tag: D97
datatype: string
name: read_data
arguments: data_tag: D251
datatype: string
name: read_data
arguments: data_tag: D44
datatype: string

tool: D254: 

Correct syntaxis is:
meshgen a constantPlane nx ny xmin 

tool: D180: xmax ymin ymax r lineNumber


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


tool: D262: a

tool: D60: mesh.dat

tool: D91: X

tool: D214: %d %le %le %le


tool: D224: %le    %le %le


tool: D72: Y

tool: D157: %d    %le %le %le


tool: D267: %le   %le %le


tool: D285: %d   %le %le %le


tool: D248: %le  %le %le


tool: D62: -h

tool: D188: 

Call as:

	./meshgen a constantPlane 

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


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

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

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



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


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



tool: D281: Example:

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



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


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


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

tool: D59: starting with 1.

The output file is called 'mesh.dat' 

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

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


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

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

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



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

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;
}
```