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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    D78(%rip),%rsi
  lea    D366(%rip),%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L106
  mov    %rax,%rbx
  lea    0x28(%rsp),%r13
  lea    0x38(%rsp),%r12
  lea    0x20(%rsp),%rbp
  lea    0x18(%rsp),%rax
  lea    0x30(%rsp),%r15
  push   %r15
  lea    0x48(%rsp),%r14
  push   %r14
  mov    %r13,%r9
  mov    %r12,%r8
  mov    %rbp,%rcx
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdx
  lea    D406(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  push   %r15
  push   %r14
  mov    %r13,%r9
  mov    %r12,%r8
  mov    %rbp,%rcx
  mov    0x28(%rsp),%rdx
  lea    D406(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  add    $0x20,%rsp
  mov    %rbx,%rdi
  call   <fclose@plt>
  lea    D78(%rip),%rsi
  lea    D132(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L127
  lea    0x1c(%rsp),%rdx
  lea    D95(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    0x1c(%rsp),%edi
  call   <srand@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
L84:
  lea    D371(%rip),%rbx
  mov    %rbx,%rsi
  lea    D132(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%edx
  lea    D95(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %rbx,%rsi
  lea    D429(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r15
  mov    %rbx,%rsi
  lea    D193(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  mov    %rbx,%rsi
  lea    D435(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  mov    %r15,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D137(%rip),%rdi
  call   <fwrite@plt>
  mov    $0x0,%ebp
  cmpl   $0x0,0x18(%rsp)
  jle    L72
  mov    %r15,0x8(%rsp)
  jmp    L65
L106:
  lea    D371(%rip),%rsi
  lea    D366(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rcx
  mov    $0x61,%edx
  mov    $0x1,%esi
  lea    D31(%rip),%rdi
  call   <fwrite@plt>
  lea    D397(%rip),%rdi
  call   <printf@plt>
  jmp    L223
L127:
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  jmp    L84
L70:
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x30(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x40(%rsp),%xmm0
  movq   %xmm0,%r14
  lea    0x1(%rbx),%r15d
  push   %rbp
  push   %r15
  mov    %ebp,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D317(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  movq   %r14,%xmm1
  mov    %ebp,%r9d
  mov    %r15d,%r8d
  movq   %r14,%xmm0
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D360(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  add    $0x10,%rsp
L221:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  add    $0x1,%ebx
  mov    0x18(%rsp),%eax
  sub    $0x1,%eax
  cmp    %ebx,%eax
  jle    L226
L176:
  lea    0x0(%rbp,%rbx,1),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  jne    L70
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x28(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x38(%rsp),%xmm0
  movq   %xmm0,%r14
  lea    0x1(%rbx),%r15d
  push   %rbp
  push   %r15
  mov    %ebp,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D162(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  push   %rbp
  push   %r15
  mov    %ebp,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D43(%rip),%rsi
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x20,%rsp
  movq   %r14,%xmm1
  mov    %ebp,%r9d
  mov    %r15d,%r8d
  movq   %r14,%xmm0
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D360(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  jmp    L221
L226:
  add    $0x1,%ebp
  cmp    %ebp,0x18(%rsp)
  jle    L208
L65:
  mov    $0x1,%ebx
  cmpl   $0x2,0x18(%rsp)
  jg     L176
  jmp    L226
L208:
  mov    0x8(%rsp),%r15
L72:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    $0x1,%r14d
  mov    $0x0,%ebp
  cmpl   $0x1,0x18(%rsp)
  jle    L224
  mov    %r15,0x8(%rsp)
  jmp    L23
L59:
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x30(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x40(%rsp),%xmm0
  movq   %xmm0,%r15
  push   %r14
  push   %rbx
  mov    %ebp,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D1(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  movq   %r15,%xmm1
  mov    %r14d,%r9d
  mov    %ebx,%r8d
  movq   %r15,%xmm0
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D360(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  add    $0x10,%rsp
L34:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  add    $0x1,%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L165
L147:
  lea    0x0(%rbp,%rbx,1),%eax
  test   $0x1,%al
  jne    L59
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x28(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x38(%rsp),%xmm0
  movq   %xmm0,%r15
  push   %r14
  push   %rbx
  mov    %ebp,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D339(%rip),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  push   %r14
  push   %rbx
  mov    %ebp,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D297(%rip),%rsi
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x20,%rsp
  movq   %r15,%xmm1
  mov    %r14d,%r9d
  mov    %ebx,%r8d
  movq   %r15,%xmm0
  mov    %ebp,%ecx
  mov    %ebx,%edx
  lea    D360(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  jmp    L34
L165:
  add    $0x1,%ebp
  add    $0x1,%r14d
  mov    0x18(%rsp),%eax
  sub    $0x1,%eax
  cmp    %ebp,%eax
  jle    L32
L23:
  mov    $0x1,%ebx
  cmpl   $0x1,0x18(%rsp)
  jg     L147
  jmp    L165
L32:
  mov    0x8(%rsp),%r15
L224:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  cmpl   $0x0,0x18(%rsp)
  jle    L55
  mov    $0x0,%ebx
  lea    D105(%rip),%r14
  jmp    L40
L235:
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x28(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x38(%rsp),%xmm0
  movq   %xmm0,%rbp
  mov    %ebx,%ecx
  mov    %ebx,%edx
  lea    D328(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    %ebx,%ecx
  mov    %ebx,%edx
  lea    D419(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  movq   %rbp,%xmm1
  mov    %ebx,%ecx
  movq   %rbp,%xmm0
  mov    %ebx,%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  jmp    L244
L177:
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x30(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x40(%rsp),%xmm0
  movq   %xmm0,%rbp
  mov    0x18(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %ebx,%r9d
  mov    %edx,%r8d
  mov    %ebx,%ecx
  lea    D37(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    0x18(%rsp),%r8d
  lea    -0x1(%r8),%edx
  movq   %rbp,%xmm1
  mov    %ebx,%r9d
  movq   %rbp,%xmm0
  mov    %ebx,%ecx
  lea    D360(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
L46:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  add    $0x1,%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L55
L40:
  mov    %ebx,%edx
  shr    $0x1f,%edx
  lea    (%rbx,%rdx,1),%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  je     L235
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x30(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x40(%rsp),%xmm0
  movq   %xmm0,%rbp
  mov    %ebx,%ecx
  mov    %ebx,%edx
  lea    D300(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  movq   %rbp,%xmm1
  mov    %ebx,%ecx
  movq   %rbp,%xmm0
  mov    %ebx,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
L244:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %r12,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %ebx,%eax
  add    0x18(%rsp),%eax
  test   $0x1,%al
  jne    L177
  mov    $0x0,%eax
  call   <gaus@plt>
  lea    (%rax,%rax,2),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x28(%rsp),%xmm0
  addsd  D368(%rip),%xmm0
  mulsd  0x38(%rsp),%xmm0
  movq   %xmm0,%rbp
  mov    0x18(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %ebx,%r9d
  mov    %edx,%r8d
  mov    %ebx,%ecx
  lea    D254(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    0x18(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %ebx,%r9d
  mov    %edx,%r8d
  mov    %ebx,%ecx
  lea    D122(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    0x18(%rsp),%r8d
  lea    -0x1(%r8),%edx
  movq   %rbp,%xmm1
  mov    %ebx,%r9d
  movq   %rbp,%xmm0
  mov    %ebx,%ecx
  lea    D360(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  jmp    L46
L55:
  mov    %r15,%rcx
  mov    $0x24,%edx
  mov    $0x1,%esi
  lea    D323(%rip),%rdi
  call   <fwrite@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
L223:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L110
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D78
type_guessed: string
name: unpack_data
arguments: tag: D366
type_guessed: string
name: unpack_data
arguments: tag: D406
type_guessed: string
name: unpack_data
arguments: tag: D132
type_guessed: string
name: unpack_data
arguments: tag: D95
type_guessed: string
name: unpack_data
arguments: tag: D371
type_guessed: string
name: unpack_data
arguments: tag: D429
type_guessed: string
name: unpack_data
arguments: tag: D193
type_guessed: string
name: unpack_data
arguments: tag: D435
type_guessed: string
name: unpack_data
arguments: tag: D137
type_guessed: string
name: unpack_data
arguments: tag: D31
type_guessed: string
name: unpack_data
arguments: tag: D397
type_guessed: string
name: unpack_data
arguments: tag: D368
type_guessed: byte[8]
name: unpack_data
arguments: tag: D317
type_guessed: string
name: unpack_data
arguments: tag: D360
type_guessed: string
name: unpack_data
arguments: tag: D162
type_guessed: string
name: unpack_data
arguments: tag: D43
type_guessed: string
name: unpack_data
arguments: tag: D1
type_guessed: string
name: unpack_data
arguments: tag: D339
type_guessed: string
name: unpack_data
arguments: tag: D297
type_guessed: string
name: unpack_data
arguments: tag: D105
type_guessed: string
name: unpack_data
arguments: tag: D328
type_guessed: string
name: unpack_data
arguments: tag: D419
type_guessed: string
name: unpack_data
arguments: tag: D37
type_guessed: string
name: unpack_data
arguments: tag: D300
type_guessed: string
name: unpack_data
arguments: tag: D254
type_guessed: string
name: unpack_data
arguments: tag: D122
type_guessed: string
name: unpack_data
arguments: tag: D323
type_guessed: string

tool: D78: r

tool: D366: parameters.ini

tool: D406: %d %lf %lf %lf %lf %lf

tool: D132: seed

tool: D95: %d

tool: D371: w

tool: D429: circuit.cir

tool: D193: capacitors.txt

tool: D435: resistors.txt

tool: D137: Random RC Network


tool: D31: 50 0.4 1 0.333 1 0.333
N_vert_comps ratio_C C0 sigma_C(fraction of C0) R0 sigma_R(fraction of R0)

tool: D397: Edit Values in "parameters.ini" then rerun

tool: {"D368": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D317: Rx%dy%dX x%dy%d x%dy%d %ek


tool: D360: %d %d %e
%d %d %e



tool: D162: Cx%dy%dX x%dy%d x%dy%d %en


tool: D43: Rx%dy%dX x%dy%d x%dy%d 1G


tool: D1: Rx%dy%dY x%dy%d x%dy%d %ek


tool: D339: Cx%dy%dY x%dy%d x%dy%d %en


tool: D297: Rx%dy%dY x%dy%d x%dy%d 1G


tool: D105: 0 %d %e
1 %d %e



tool: D328: Cx0y%dX 0 x1y%d %en


tool: D419: Rx0y%dX 0 x1y%d 1G


tool: D37: Rx%dy%dX x%dy%d VOUT %ek


tool: D300: Rx0y%dX 0 x1y%d %ek


tool: D254: Cx%dy%dX x%dy%d VOUT %en


tool: D122: Rx%dy%dX x%dy%d VOUT 1G


tool: D323: V1 R1_N 0 AC 50
R1 VOUT R1_N 100Meg


assistant: ```c
int main() {
  double rnd_x, rnd_y, gauss, ratioC, Csig, Rsig, Cn, Rn, C0, R0;
  double e = 2.7182818, rmax = 2147483647;
  int i, cy, cx, size, seed;
  FILE *f0, *f1, *f2, *f3;
  if (f0 = fopen("parameters.ini", "r"))
    fscanf(f0, "%d %lf %lf %lf %lf %lf", &size, &ratioC, &C0, &Csig, &R0, &Rsig);
  else {
    f0 = fopen("parameters.ini", "w");
    fprintf(f0, "50 0.4 1 0.333 1 0.333\nN_vert_comps ratio_C C0 sigma_C(fraction of C0) R0 sigma_R(fraction of R0)");
    printf("Edit Values in \"parameters.ini\" then rerun");
    return 0;
  }
  fscanf(f0, "%d %lf %lf %lf %lf %lf", &size, &ratioC, &C0, &Csig, &R0, &Rsig);
  fclose(f0);
  rmax = RAND_MAX;
  if (f1 = fopen("seed", "r")) {
    fscanf(f1, "%d", &seed);
    srand(seed);
    fclose(f1);
  } else
    srand(time(NULL));
  f1 = fopen("seed", "w");
  fprintf(f1, "%d", rand());
  fclose(f1);
  f0 = fopen("circuit.cir", "w");
  f2 = fopen("capacitors.txt", "w");
  f3 = fopen("resistors.txt", "w");
  fprintf(f0, "Random RC Network\n");
  for (cy = 0; cy < size; cy++)
    for (cx = 1; cx < size - 1; cx++) {
      if ((cy + cx) % 2 == 1) {
        Cn = C0 * (1 + gaus() * 3 * Csig);
        fprintf(f0, "Cx%dy%dX x%dy%d x%dy%d %en\n", cx, cy, cx, cy, cx + 1, cy, Cn);
        fprintf(f0, "Rx%dy%dX x%dy%d x%dy%d 1G\n", cx, cy, cx, cy, cx + 1, cy);
        fprintf(f2, "%d %d %e\n%d %d %e\n\n", cx, cy, Cn, cx + 1, cy, Cn);
      } else {
        Rn = R0 * (1 + gaus() * 3 * Rsig);
        fprintf(f0, "Rx%dy%dX x%dy%d x%dy%d %ek\n", cx, cy, cx, cy, cx + 1, cy, Rn);
        fprintf(f3, "%d %d %e\n%d %d %e\n\n", cx, cy, Rn, cx + 1, cy, Rn);
      }
      fprintf(f2, "\n");
      fprintf(f3, "\n");
    }
  fprintf(f2, "\n");
  fprintf(f3, "\n");
  for (cy = 0; cy < size - 1; cy++)
    for (cx = 1; cx < size; cx++) {
      if ((cy + cx) % 2 == 0) {
        Cn = C0 * (1 + gaus() * 3 * Csig);
        fprintf(f0, "Cx%dy%dY x%dy%d x%dy%d %en\n", cx, cy, cx, cy, cx, cy + 1, Cn);
        fprintf(f0, "Rx%dy%dY x%dy%d x%dy%d 1G\n", cx, cy, cx, cy, cx, cy + 1);
        fprintf(f2, "%d %d %e\n%d %d %e\n\n", cx, cy, Cn, cx, cy + 1, Cn);
      } else {
        Rn = R0 * (1 + gaus() * 3 * Rsig);
        fprintf(f0, "Rx%dy%dY x%dy%d x%dy%d %ek\n", cx, cy, cx, cy, cx, cy + 1, Rn);
        fprintf(f3, "%d %d %e\n%d %d %e\n\n", cx, cy, Rn, cx, cy + 1, Rn);
      }
      fprintf(f2, "\n");
      fprintf(f3, "\n");
    }
  fprintf(f2, "\n");
  fprintf(f3, "\n");
  for (cy = 0; cy < size; cy++) {
    if ((cy) % 2 == 1) {
      Cn = C0 * (1 + gaus() * 3 * Csig);
      fprintf(f0, "Cx0y%dX 0 x1y%d %en\n", cy, cy, Cn);
      fprintf(f0, "Rx0y%dX 0 x1y%d 1G\n", cy, cy);
      fprintf(f2, "0 %d %e\n1 %d %e\n\n", cy, Cn, cy, Cn);
    } else {
      Rn = R0 * (1 + gaus() * 3 * Rsig);
      fprintf(f0, "Rx0y%dX 0 x1y%d %ek\n", cy, cy, Rn);
      fprintf(f3, "0 %d %e\n1 %d %e\n\n", cy, Rn, cy, Rn);
    }
    fprintf(f2, "\n");
    fprintf(f3, "\n");
    if ((cy + size) % 2 == 0) {
      Cn = C0 * (1 + gaus() * 3 * Csig);
      fprintf(f0, "Cx%dy%dX x%dy%d VOUT %en\n", size - 1, cy, size - 1, cy, Cn);
      fprintf(f0, "Rx%dy%dX x%dy%d VOUT 1G\n", size - 1, cy, size - 1, cy);
      fprintf(f2, "%d %d %e\n%d %d %e\n\n", size - 1, cy, Cn, size, cy, Cn);
    } else {
      Rn = R0 * (1 + gaus() * 3 * Rsig);
      fprintf(f0, "Rx%dy%dX x%dy%d VOUT %ek\n", size - 1, cy, size - 1, cy, Rn);
      fprintf(f3, "%d %d %e\n%d %d %e\n\n", size - 1, cy, Rn, size, cy, Rn);
    }
    fprintf(f2, "\n");
    fprintf(f3, "\n");
  }
  fprintf(f0, "V1 R1_N 0 AC 50\nR1 VOUT R1_N 100Meg\n");
  fclose(f0);
  fclose(f2);
  fclose(f3);
  return 0;
}
```