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

```asm
<test_P_A1_or_A2_in_C>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D63(%rip),%rax
  movl   $0x12,0x4(%rsp)
  movl   $0x12,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  movl   $0x3e8,0xc(%rsp)
  cmp    $0x2,%edi
  jle    L128
  lea    -0x3(%rdi),%eax
  mov    %rsi,%r13
  lea    0x10(%rsi),%r15
  lea    0x18(%rsi,%rax,8),%r12
  lea    0x4(%rsp),%rbx
  lea    D46(%rip),%rbp
  lea    D22(%rip),%r14
  jmp    L91
  nopl   0x0(%rax,%rax,1)
L58:
  mov    0x4(%rsp),%eax
  mov    %eax,0x8(%rsp)
L99:
  add    $0x8,%r15
  cmp    %r12,%r15
  je     L7
L91:
  mov    (%r15),%rdi
  xor    %eax,%eax
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L99
  mov    (%r15),%rdi
  xor    %eax,%eax
  lea    0x8(%rsp),%rdx
  mov    %r14,%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L99
  mov    (%r15),%rdi
  xor    %eax,%eax
  mov    %rbx,%rdx
  lea    D60(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L58
  mov    (%r15),%rdi
  xor    %eax,%eax
  lea    0x10(%rsp),%rdx
  lea    D16(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L99
  mov    (%r15),%rdi
  xor    %eax,%eax
  lea    0xc(%rsp),%rdx
  lea    D53(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L99
  mov    0x8(%r13),%rsi
  mov    0x0(%r13),%rdi
  xor    %edx,%edx
  add    $0x8,%r15
  call   <usage@plt>
  cmp    %r12,%r15
  jne    L91
  nopl   0x0(%rax,%rax,1)
L7:
  cmpl   $0x2,0x4(%rsp)
  jle    L65
  mov    0x8(%rsp),%esi
  cmp    $0x2,%esi
  jg     L53
L65:
  mov    0x8(%r13),%rsi
  mov    0x0(%r13),%rdi
  mov    $0x1,%edx
  call   <usage@plt>
  mov    0x8(%rsp),%esi
L53:
  mov    0x4(%rsp),%edi
  xor    %edx,%edx
  lea    0x20(%rsp),%r14
  lea    0x18(%rsp),%rbx
  call   <allocate_matrix@plt>
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%edi
  xor    %edx,%edx
  mov    %rax,%r13
  call   <allocate_matrix@plt>
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%edi
  mov    $0x2e,%edx
  mov    %rax,%r12
  call   <allocate_matrix@plt>
  mov    0x8(%rsp),%ecx
  mov    0x4(%rsp),%edx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    %rax,%rbp
  call   <set_A1_A2@plt>
  push   %r14
  mov    %r12,%rdx
  mov    %r13,%rsi
  push   %rbx
  mov    0x1c(%rsp),%r9d
  mov    %rbp,%rdi
  mov    0x18(%rsp),%r8d
  mov    0x14(%rsp),%ecx
  movsd  0x20(%rsp),%xmm0
  call   <P_A1_or_A2_in_C@plt>
  mov    0x1c(%rsp),%ecx
  mov    0x18(%rsp),%edx
  lea    D14(%rip),%rdi
  movapd %xmm0,%xmm1
  mov    0x14(%rsp),%esi
  movsd  0x20(%rsp),%xmm0
  call   <printf@plt>
  mov    0x18(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %r13,%rdi
  call   <free_matrix@plt>
  mov    0x18(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %r12,%rdi
  call   <free_matrix@plt>
  mov    0x18(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %rbp,%rdi
  call   <free_matrix@plt>
  pop    %rax
  pop    %rdx
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L128:
  mov    $0x12,%esi
  jmp    L53
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D63
type_guessed: f64
name: parse_data
arguments: data_label: D46
type_guessed: string
name: parse_data
arguments: data_label: D22
type_guessed: string
name: parse_data
arguments: data_label: D60
type_guessed: string
name: parse_data
arguments: data_label: D16
type_guessed: string
name: parse_data
arguments: data_label: D53
type_guessed: string
name: parse_data
arguments: data_label: D14
type_guessed: string

tool: D63: 0.6

tool: D46: M=%d

tool: D22: N=%d

tool: D60: MN=%d

tool: D16: p=%lf

tool: D53: reps=%d

tool: D14: M=%d N=%d p=%.4lf reps=%d PU2inC=%11.7lf


assistant: ```c
void test_P_A1_or_A2_in_C(int argc, char **argv) {
  int M = 18;
  int N = 18;
  double p = 0.6;
  int argi;
  int **vbonds;
  int **hbonds;
  int **site_marks;
  int A1[2], A2[2];
  int reps = 1000;
  double P;
  for (argi = 2; argi < argc; argi++) {
    if (sscanf(argv[argi], "M=%d", &M) == 1)
      ;
    else if (sscanf(argv[argi], "N=%d", &N) == 1)
      ;
    else if (sscanf(argv[argi], "MN=%d", &M) == 1)
      N = M;
    else if (sscanf(argv[argi], "p=%lf", &p) == 1)
      ;
    else if (sscanf(argv[argi], "reps=%d", &reps) == 1)
      ;
    else
      usage(argv[0], argv[1], 0);
  }
  if ((M < 3) || (N < 3))
    usage(argv[0], argv[1], 1);
  vbonds = allocate_matrix(M, N, 0);
  hbonds = allocate_matrix(M, N, 0);
  site_marks = allocate_matrix(M, N, '.');
  set_A1_A2(A1, A2, M, N);
  P = P_A1_or_A2_in_C(site_marks, vbonds, hbonds, M, N, p, reps, A1, A2);
  printf("M=%d N=%d p=%.4lf reps=%d PU2inC=%11.7lf\n", M, N, p, reps, P);
  free_matrix(vbonds, M, N);
  free_matrix(hbonds, M, N);
  free_matrix(site_marks, M, N);
}
```