user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x3c000(%rsp),%r11
L177:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L177
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x3c008(%rsp)
  xor    %eax,%eax
  mov    %rsi,%rbx
  cmp    $0x2,%edi
  jle    L103
  mov    0x8(%rsi),%rdi
  call   <atoi@plt>
  mov    0x10(%rbx),%rdi
  mov    %eax,%r14d
  mov    %eax,0x5c(%rsp)
  call   <atoi@plt>
  or     %eax,%r14d
  mov    %eax,%r15d
  js     L65
  cmpl   $0x14,0x5c(%rsp)
  jg     L155
  cmp    $0x14,%eax
  jg     L155
L4:
  mov    0x5c(%rsp),%ecx
  mov    $0x15,%edx
  mov    %r15d,%r8d
  xor    %eax,%eax
  mov    $0x15,%esi
  lea    D49(%rip),%rdi
  call   <printf@plt>
  lea    D150(%rip),%rdi
  call   <puts@plt>
  mov    $0xa8,%edi
  call   <malloc@plt>
  mov    $0xdc8,%edi
  mov    %rax,%rbp
  call   <malloc@plt>
  lea    D125(%rip),%rdi
  mov    %rax,0x68(%rsp)
  call   <puts@plt>
  movsd  D24(%rip),%xmm1
  mov    %rbp,%rdx
  xor    %eax,%eax
L54:
  pxor   %xmm0,%xmm0
  add    $0x8,%rdx
  cvtsi2sd %eax,%xmm0
  add    $0x1,%eax
  mulsd  %xmm1,%xmm0
  subsd  D20(%rip),%xmm0
  movsd  %xmm0,-0x8(%rdx)
  cmp    $0x15,%eax
  jne    L54
  movsd  D188(%rip),%xmm1
  xor    %eax,%eax
  lea    0x70(%rsp),%r12
L129:
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  subsd  D20(%rip),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  add    $0x1,%rax
  cmp    $0x65,%rax
  jne    L129
  movq   $0x0,0x8(%rsp)
  mov    0x68(%rsp),%r14
  mov    %r15d,0x18(%rsp)
  mov    %rbp,0x10(%rsp)
  mov    %r12,0x20(%rsp)
L148:
  mov    0x8(%rsp),%rax
  mov    0x10(%rsp),%rbx
  xor    %ebp,%ebp
  mov    %eax,%r13d
  lea    (%rbx,%rax,8),%r12
  nopl   0x0(%rax,%rax,1)
L83:
  mov    %ebp,%edx
  mov    $0x15,%ecx
  mov    $0x15,%esi
  mov    %r13d,%edi
  call   <index_2D_to_1D@plt>
  movsd  (%rbx),%xmm1
  add    $0x1,%ebp
  add    $0x8,%rbx
  movsd  (%r12),%xmm0
  cltq
  lea    (%r14,%rax,8),%r15
  call   <xyn@plt>
  movsd  %xmm0,(%r15)
  cmp    $0x15,%ebp
  jne    L83
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    $0x15,%rax
  jne    L148
  mov    0x20(%rsp),%r12
  mov    0x10(%rsp),%rbp
  xor    %r13d,%r13d
  mov    0x18(%rsp),%r15d
  mov    %r12,0x50(%rsp)
  mov    %r12,%r14
  mov    %rbp,0x8(%rsp)
L26:
  xor    %ebp,%ebp
  nopl   0x0(%rax)
L120:
  mov    %ebp,%edx
  mov    $0x65,%ecx
  mov    $0x65,%esi
  mov    %r13d,%edi
  call   <index_2D_to_1D@plt>
  movsd  (%r12,%rbp,8),%xmm1
  movsd  (%r14),%xmm0
  add    $0x1,%rbp
  movslq %eax,%rbx
  call   <xyn@plt>
  movsd  %xmm0,0x3a0(%rsp,%rbx,8)
  cmp    $0x65,%rbp
  jne    L120
  add    $0x1,%r13d
  add    $0x8,%r14
  cmp    $0x65,%r13d
  jne    L26
  mov    0x8(%rsp),%rbp
  lea    D0(%rip),%rdi
  xor    %r14d,%r14d
  call   <puts@plt>
  pxor   %xmm7,%xmm7
  mov    %r12,0x48(%rsp)
  mov    %r12,0x60(%rsp)
  mov    0x68(%rsp),%r12
  movapd %xmm7,%xmm4
  mov    %rbp,%r13
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm7,0x8(%rsp)
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm7,0x10(%rsp)
L175:
  xor    %ebp,%ebp
  mov    %r13,%rax
  mov    %rbp,%r13
  mov    %rax,%rbp
  nopl   0x0(%rax)
L72:
  mov    %r13d,%edx
  mov    $0x65,%ecx
  mov    $0x65,%esi
  mov    %r14d,%edi
  movsd  %xmm4,0x40(%rsp)
  call   <index_2D_to_1D@plt>
  sub    $0x8,%rsp
  mov    %rbp,%r8
  mov    %rbp,%rdx
  movslq %eax,%rbx
  mov    0x68(%rsp),%rax
  mov    $0x15,%ecx
  mov    %r15d,%esi
  mov    $0x15,%r9d
  movsd  (%rax,%r13,8),%xmm1
  mov    0x50(%rsp),%rax
  add    $0x1,%r13
  movsd  (%rax),%xmm2
  push   %r12
  mov    0x6c(%rsp),%edi
  movapd %xmm2,%xmm0
  movsd  %xmm1,0x48(%rsp)
  movsd  %xmm2,0x40(%rsp)
  call   <lagrange_interp_2Dfo@plt>
  mov    %rbp,%rdx
  mov    %r12,%r8
  mov    $0x15,%ecx
  movsd  0x40(%rsp),%xmm2
  movsd  0x48(%rsp),%xmm1
  movsd  %xmm0,0x38(%rsp)
  mov    %rbp,%rdi
  movsd  %xmm0,0x28150(%rsp,%rbx,8)
  mov    $0x15,%esi
  movapd %xmm2,%xmm0
  call   <lagrange_interp_2D@plt>
  movsd  0x38(%rsp),%xmm3
  movsd  0x3b0(%rsp,%rbx,8),%xmm1
  movapd %xmm0,%xmm2
  movsd  D20(%rip),%xmm5
  addsd  0x18(%rsp),%xmm5
  movsd  %xmm0,0x14280(%rsp,%rbx,8)
  subsd  %xmm1,%xmm3
  subsd  %xmm1,%xmm2
  movsd  %xmm5,0x18(%rsp)
  movapd %xmm3,%xmm1
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x38(%rsp)
  mulsd  %xmm3,%xmm1
  addsd  0x20(%rsp),%xmm1
  movsd  %xmm1,0x20(%rsp)
  movapd %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  0x28(%rsp),%xmm1
  movsd  %xmm1,0x28(%rsp)
  movsd  0x30(%rsp),%xmm1
  call   <fmax@plt>
  movsd  0x50(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm2
  movsd  %xmm0,0x30(%rsp)
  movapd %xmm4,%xmm1
  movapd %xmm2,%xmm0
  call   <fmax@plt>
  pop    %rax
  pop    %rdx
  movapd %xmm0,%xmm4
  cmp    $0x65,%r13
  jne    L72
  add    $0x1,%r14d
  addq   $0x8,0x48(%rsp)
  mov    %rbp,%r13
  cmp    $0x65,%r14d
  jne    L175
  mov    0x60(%rsp),%r12
  movsd  %xmm0,0x28(%rsp)
  movsd  0x10(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  lea    D71(%rip),%r13
  movsd  %xmm0,0x10(%rsp)
  movsd  0x18(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm3
  lea    D28(%rip),%rdi
  movsd  0x20(%rsp),%xmm2
  movapd %xmm0,%xmm1
  mov    $0x4,%eax
  movapd %xmm4,%xmm0
  call   <printf@plt>
  lea    D84(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  lea    D107(%rip),%rdi
  call   <fopen@plt>
  mov    %r13,%rsi
  lea    D149(%rip),%rdi
  lea    D72(%rip),%r13
  mov    %rax,%rbx
  mov    %rax,0x20(%rsp)
  call   <fopen@plt>
  mov    %rbx,%rcx
  mov    %r13,%rdi
  mov    $0x14,%edx
  mov    %rax,%r15
  mov    $0x1,%esi
  mov    %rax,0x30(%rsp)
  call   <fwrite@plt>
  mov    %r15,%rcx
  mov    %r13,%rdi
  mov    $0x14,%edx
  lea    D140(%rip),%r13
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x65,%edx
  xor    %eax,%eax
  xor    %ebx,%ebx
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    $0x65,%edx
  mov    %r15,%rdi
  xor    %eax,%eax
  lea    D178(%rip),%r13
  call   <fprintf@plt>
  mov    %rbp,0x38(%rsp)
  mov    %r12,0x28(%rsp)
L94:
  xor    %r12d,%r12d
  nopl   0x0(%rax)
L27:
  mov    %r12d,%edx
  mov    $0x65,%ecx
  mov    $0x65,%esi
  mov    %ebx,%edi
  call   <index_2D_to_1D@plt>
  mov    %r12d,%ecx
  mov    %ebx,%edx
  mov    %r13,%rsi
  movslq %eax,%rbp
  mov    0x28(%rsp),%rax
  mov    %r15,%rdi
  movsd  0x3a0(%rsp,%rbp,8),%xmm2
  movsd  0x28140(%rsp,%rbp,8),%xmm3
  movsd  (%rax,%r12,8),%xmm1
  mov    0x50(%rsp),%rax
  movsd  %xmm2,0x18(%rsp)
  movsd  (%rax),%xmm0
  mov    $0x4,%eax
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <fprintf@plt>
  movsd  0x18(%rsp),%xmm2
  mov    %r12d,%ecx
  mov    %ebx,%edx
  movsd  0x14270(%rsp,%rbp,8),%xmm3
  movsd  0x10(%rsp),%xmm1
  mov    %r13,%rsi
  mov    $0x4,%eax
  movsd  0x8(%rsp),%xmm0
  mov    0x20(%rsp),%rdi
  add    $0x1,%r12
  call   <fprintf@plt>
  cmp    $0x65,%r12
  jne    L27
  add    $0x1,%ebx
  addq   $0x8,0x50(%rsp)
  cmp    $0x65,%ebx
  jne    L94
  mov    0x30(%rsp),%rdi
  mov    0x38(%rsp),%rbp
  call   <fclose@plt>
  mov    0x20(%rsp),%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x68(%rsp),%rdi
  call   <free@plt>
  xor    %eax,%eax
L121:
  mov    0x3c008(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L125
  add    $0x3c018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L103:
  mov    (%rsi),%rsi
  lea    D79(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L121
L65:
  lea    D41(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L121
L155:
  mov    $0x14,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L4
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D49
datatype: string
name: retrieve_data
arguments: data_tag: D150
datatype: string
name: retrieve_data
arguments: data_tag: D125
datatype: string
name: retrieve_data
arguments: data_tag: D24
datatype: byte[8]
name: retrieve_data
arguments: data_tag: D20
datatype: f64
name: retrieve_data
arguments: data_tag: D188
datatype: byte[8]
name: retrieve_data
arguments: data_tag: D0
datatype: string
name: retrieve_data
arguments: data_tag: D71
datatype: string
name: retrieve_data
arguments: data_tag: D28
datatype: string
name: retrieve_data
arguments: data_tag: D84
datatype: string
name: retrieve_data
arguments: data_tag: D107
datatype: string
name: retrieve_data
arguments: data_tag: D149
datatype: string
name: retrieve_data
arguments: data_tag: D72
datatype: string
name: retrieve_data
arguments: data_tag: D140
datatype: string
name: retrieve_data
arguments: data_tag: D178
datatype: string
name: retrieve_data
arguments: data_tag: D79
datatype: string
name: retrieve_data
arguments: data_tag: D41
datatype: string
name: retrieve_data
arguments: data_tag: D54
datatype: string

tool: D49: We compare to the analytic function
x^4 - y^4 + 0.5*(x*y)**4
on the domain [-1,1]x[-1,1].
For FULL Lagrange polynomials of order:
	%d in x
	%d in y
and FIXED ORDER Lagrange polynomials of order:
	%d in x
	%d in y


tool: D150: Preparing grids.

tool: D125: Writing to grids.

tool: {"D24": [0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f]}

tool: D20: 1

tool: {"D188": [0x7b,0x14,0xae,0x47,0xe1,0x7a,0x94,0x3f]}

tool: D0: Interpolating.

tool: D71: w

tool: D28: 	Max error = %lf
	L2 error = %lf
	Max error fixed order %lf
	L2 error fixed order %lf


tool: D84: Creating output files.

tool: D107: test_full.out

tool: D149: test_fo.out

tool: D72: #i	j	x	y	z	z_interp


tool: D140: #NX = NY = %d


tool: D178: %d	%d	%lf	%lf	%lf	%lf


tool: D79: usage %s order_x order_y


tool: D41: Interpolation order must be at least 0

tool: D54: Interpolation order can be no greater than %d


assistant: ```c
int main(int argc, char *argv[]) {
  int iflat;
  int nz_coarse = 21 * 21;
  double *x_coarse;
  double *z_coarse;
  double x_fine[101];
  double z_fine[101 * 101];
  double z_interp_full[101 * 101];
  double z_interp_fo[101 * 101];
  double error_fo, error_full;
  double l2_error_fo = 0.;
  double l2_error_full = 0.;
  double l2_error_denom = 0.;
  double max_error_full = 0.;
  double max_error_fo = 0.;
  if (argc < 3) {
    printf("usage %s order_x order_y\n", argv[0]);
    return 1;
  }
  int order_x = atoi(argv[1]);
  int order_y = atoi(argv[2]);
  if (order_x < 0 || order_y < 0) {
    printf("Interpolation order must be at least 0\n");
    return 1;
  }
  if (order_x >= 21 || order_y >= 21) {
    printf("Interpolation order can be no greater than %d\n", 21 - 1);
  }
  printf("We compare to the analytic function\n"
         "x^4 - y^4 + 0.5*(x*y)**4\n"
         "on the domain [-1,1]x[-1,1].\n"
         "For FULL Lagrange polynomials of order:\n"
         "\t%d in x\n\t%d in y\n"
         "and FIXED ORDER Lagrange polynomials of order:\n"
         "\t%d in x\n\t%d in y\n",
         21, 21, order_x, order_y);
  printf("Preparing grids.\n");
  x_coarse = (double *)malloc(sizeof(double) * 21);
  z_coarse = (double *)malloc(sizeof(double) * nz_coarse);
  printf("Writing to grids.\n");
  for (int i = 0; i < 21; i++) {
    x_coarse[i] = -1.0 + (1.0 - -1.0) / (21 - 1) * i;
  }
  for (int i = 0; i < 101; i++) {
    x_fine[i] = -1.0 + (1.0 - -1.0) / (101 - 1) * i;
  }
  for (int i = 0; i < 21; i++) {
    for (int j = 0; j < 21; j++) {
      iflat = index_2D_to_1D(i, 21, j, 21);
      z_coarse[iflat] = xyn(x_coarse[i], x_coarse[j]);
    }
  }
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      iflat = index_2D_to_1D(i, 101, j, 101);
      z_fine[iflat] = xyn(x_fine[i], x_fine[j]);
    }
  }
  printf("Interpolating.\n");
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      iflat = index_2D_to_1D(i, 101, j, 101);
      z_interp_fo[iflat] = lagrange_interp_2Dfo(x_fine[i], x_fine[j], order_x, order_y, x_coarse, 21, x_coarse, 21, z_coarse);
      z_interp_full[iflat] = lagrange_interp_2D(x_fine[i], x_fine[j], x_coarse, 21, x_coarse, 21, z_coarse);
      error_fo = z_interp_fo[iflat] - z_fine[iflat];
      error_full = z_interp_full[iflat] - z_fine[iflat];
      l2_error_fo += error_fo * error_fo;
      l2_error_full += error_full * error_full;
      l2_error_denom += 1. * 1.;
      max_error_fo = fmax(error_fo, max_error_fo);
      max_error_full = fmax(error_full, max_error_full);
    }
  }
  l2_error_fo = sqrt(l2_error_fo / l2_error_denom);
  l2_error_full = sqrt(l2_error_full / l2_error_denom);
  printf("\tMax error = %lf\n\tL2 error = %lf\n"
         "\tMax error fixed order %lf\n"
         "\tL2 error fixed order %lf\n",
         max_error_full, l2_error_full, max_error_fo, l2_error_fo);
  printf("Creating output files.\n");
  FILE *fp_full;
  FILE *fp_fo;
  fp_full = fopen("test_full.out", "w");
  fp_fo = fopen("test_fo.out", "w");
  fprintf(fp_full, "#i\tj\tx\ty\tz\tz_interp\n");
  fprintf(fp_fo, "#i\tj\tx\ty\tz\tz_interp\n");
  fprintf(fp_full, "#NX = NY = %d\n", 101);
  fprintf(fp_fo, "#NX = NY = %d\n", 101);
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      iflat = index_2D_to_1D(i, 101, j, 101);
      fprintf(fp_fo, "%d\t%d\t%lf\t%lf\t%lf\t%lf\n", i, j, x_fine[i], x_fine[j], z_fine[iflat], z_interp_fo[iflat]);
      fprintf(fp_full, "%d\t%d\t%lf\t%lf\t%lf\t%lf\n", i, j, x_fine[i], x_fine[j], z_fine[iflat], z_interp_full[iflat]);
    }
  }
  fclose(fp_fo);
  fclose(fp_full);
  free(x_coarse);
  free(z_coarse);
  return 0;
}
```