user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D234(%rip),%r13
  push   %r12
  lea    D3(%rip),%r12
  mov    %r13,%rdi
  push   %rbp
  mov    %r12,%rsi
  push   %rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L132
  lea    0x40(%rsp),%r11
  lea    0x38(%rsp),%r9
  mov    %rax,%rbp
  mov    %rax,%rdi
  lea    0x48(%rsp),%rbx
  lea    0x30(%rsp),%r15
  xor    %eax,%eax
  lea    0x28(%rsp),%r14
  push   %r11
  lea    D161(%rip),%r13
  mov    %rbx,%r8
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  lea    0x58(%rsp),%r10
  mov    %r11,0x20(%rsp)
  push   %r10
  mov    %r10,0x20(%rsp)
  mov    %r9,0x18(%rsp)
  call   <fscanf@plt>
  mov    0x28(%rsp),%r11
  mov    %rbx,%r8
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  push   %r11
  mov    0x28(%rsp),%r10
  push   %r10
  mov    0x28(%rsp),%r9
  call   <fscanf@plt>
  mov    %rbp,%rdi
  add    $0x20,%rsp
  call   <fclose@plt>
  mov    %r12,%rsi
  lea    D213(%rip),%r12
  mov    %r12,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L79
  lea    D390(%rip),%r13
  mov    %rax,%rdi
  lea    0x2c(%rsp),%rdx
  xor    %eax,%eax
  mov    %r13,%rsi
  call   <fscanf@plt>
  mov    0x2c(%rsp),%edi
  call   <srand@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
L34:
  lea    D223(%rip),%rbp
  mov    %r12,%rdi
  xor    %r15d,%r15d
  mov    %rbp,%rsi
  call   <fopen@plt>
  mov    %rax,%r12
  xor    %eax,%eax
  call   <rand@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rdi
  mov    %r15d,%r12d
  call   <fclose@plt>
  mov    %rbp,%rsi
  lea    D226(%rip),%rdi
  call   <fopen@plt>
  mov    %rbp,%rsi
  lea    D316(%rip),%rdi
  mov    %rax,%r14
  call   <fopen@plt>
  mov    %rbp,%rsi
  lea    D276(%rip),%rdi
  mov    %rax,%r13
  call   <fopen@plt>
  mov    %r14,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D331(%rip),%rdi
  mov    %rax,%rbp
  call   <fwrite@plt>
  mov    0x28(%rsp),%eax
  test   %eax,%eax
  jle    L120
  cs nopw 0x0(%rax,%rax,1)
L167:
  cmp    $0x2,%eax
  jle    L120
  mov    $0x1,%r15d
  jmp    L7
  nopl   0x0(%rax)
L191:
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r12d,%r9d
  mov    %r15d,%r8d
  lea    (%rax,%rax,2),%eax
  mov    %r12d,%ecx
  mov    %r15d,%edx
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x40(%rsp),%xmm1
  lea    D339(%rip),%rsi
  mov    $0x1,%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x50(%rsp),%xmm1
  push   %r12
  push   %rbx
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x18(%rsp)
  call   <fprintf@plt>
  mov    %r15d,%edx
  mov    %r12d,%r9d
  mov    %ebx,%r8d
  movsd  0x18(%rsp),%xmm1
  mov    %r12d,%ecx
  lea    D6(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x2,%eax
  movapd %xmm1,%xmm0
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x38(%rsp),%eax
  pop    %rsi
  pop    %rdi
  lea    -0x1(%rax),%edx
  cmp    %ebx,%edx
  jle    L233
L45:
  mov    %ebx,%r15d
L7:
  lea    (%r12,%r15,1),%eax
  lea    0x1(%r15),%ebx
  test   $0x1,%al
  mov    $0x0,%eax
  je     L191
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r12d,%r9d
  mov    %r15d,%r8d
  lea    (%rax,%rax,2),%eax
  mov    %r12d,%ecx
  mov    %r15d,%edx
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x38(%rsp),%xmm1
  lea    D31(%rip),%rsi
  mov    $0x1,%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x48(%rsp),%xmm1
  push   %r12
  push   %rbx
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x18(%rsp)
  call   <fprintf@plt>
  push   %r12
  mov    %r12d,%r9d
  mov    %r15d,%r8d
  push   %rbx
  mov    %r12d,%ecx
  mov    %r15d,%edx
  lea    D324(%rip),%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  add    $0x20,%rsp
  mov    %r15d,%edx
  mov    %r12d,%r9d
  movsd  0x8(%rsp),%xmm1
  mov    %ebx,%r8d
  mov    %r12d,%ecx
  mov    %r13,%rdi
  lea    D6(%rip),%rsi
  mov    $0x2,%eax
  movapd %xmm1,%xmm0
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x28(%rsp),%eax
  lea    -0x1(%rax),%edx
  cmp    %edx,%ebx
  jl     L45
L233:
  add    $0x1,%r12d
  cmp    %r12d,%eax
  jg     L167
  nopl   0x0(%rax,%rax,1)
L120:
  mov    %r13,%rsi
  mov    $0xa,%edi
  xor    %r12d,%r12d
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x28(%rsp),%eax
  cmp    $0x1,%eax
  jle    L143
  nopw   0x0(%rax,%rax,1)
L103:
  mov    %r12d,0x8(%rsp)
  mov    %r12d,%ebx
  add    $0x1,%r12d
  cmp    $0x1,%eax
  jle    L143
  mov    $0x1,%r15d
  nopl   0x0(%rax,%rax,1)
L213:
  mov    0x8(%rsp),%eax
  add    %r15d,%eax
  test   $0x1,%al
  mov    $0x0,%eax
  jne    L124
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r15d,%r8d
  mov    %r15d,%edx
  lea    (%rax,%rax,2),%eax
  mov    %ebx,%r9d
  mov    %ebx,%ecx
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x38(%rsp),%xmm1
  lea    D180(%rip),%rsi
  mov    $0x1,%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x48(%rsp),%xmm1
  push   %r12
  push   %r15
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <fprintf@plt>
  push   %r12
  mov    %r15d,%r8d
  mov    %r15d,%edx
  push   %r15
  mov    %ebx,%r9d
  mov    %ebx,%ecx
  lea    D155(%rip),%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  movsd  0x30(%rsp),%xmm1
  mov    %r15d,%r8d
  mov    %ebx,%ecx
  add    $0x20,%rsp
  mov    %r15d,%edx
  mov    %r12d,%r9d
  mov    %r13,%rdi
  movapd %xmm1,%xmm0
  lea    D6(%rip),%rsi
  mov    $0x2,%eax
  add    $0x1,%r15d
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x28(%rsp),%eax
  cmp    %r15d,%eax
  jg     L213
  lea    -0x1(%rax),%edx
  cmp    %edx,%r12d
  jl     L103
  nopl   0x0(%rax)
L143:
  mov    %r13,%rsi
  mov    $0xa,%edi
  xor    %r15d,%r15d
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  lea    D6(%rip),%rbx
  call   <fputc@plt>
  mov    0x28(%rsp),%eax
  lea    D365(%rip),%r12
  test   %eax,%eax
  jg     L83
  jmp    L87
  nopl   0x0(%rax)
L261:
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r15d,%r9d
  mov    %r15d,%ecx
  lea    (%rax,%rax,2),%eax
  lea    D368(%rip),%rsi
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x38(%rsp),%xmm1
  mov    0x28(%rsp),%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x48(%rsp),%xmm1
  lea    -0x1(%rax),%edx
  mov    $0x1,%eax
  mov    %edx,%r8d
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <fprintf@plt>
  mov    0x28(%rsp),%eax
  mov    %r15d,%r9d
  mov    %r15d,%ecx
  lea    D267(%rip),%rsi
  mov    %r14,%rdi
  lea    -0x1(%rax),%edx
  xor    %eax,%eax
  mov    %edx,%r8d
  call   <fprintf@plt>
  mov    0x28(%rsp),%r8d
  mov    %r15d,%r9d
  mov    %r15d,%ecx
  movsd  0x8(%rsp),%xmm1
  mov    %rbx,%rsi
  mov    %r13,%rdi
  lea    -0x1(%r8),%edx
  movapd %xmm1,%xmm0
L204:
  mov    $0x2,%eax
  add    $0x1,%r15d
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  cmp    %r15d,0x28(%rsp)
  jle    L87
L83:
  xor    %eax,%eax
  test   $0x1,%r15b
  jne    L216
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r15d,%ecx
  mov    %r15d,%edx
  lea    (%rax,%rax,2),%eax
  lea    D306(%rip),%rsi
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x40(%rsp),%xmm1
  mov    $0x1,%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x50(%rsp),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <fprintf@plt>
  mov    %r15d,%ecx
  mov    %r15d,%edx
  mov    %r12,%rsi
  movsd  0x8(%rsp),%xmm1
  mov    %rbp,%rdi
  mov    $0x2,%eax
  movapd %xmm1,%xmm0
  call   <fprintf@plt>
L231:
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x28(%rsp),%eax
  add    %r15d,%eax
  test   $0x1,%al
  mov    $0x0,%eax
  je     L261
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r15d,%r9d
  mov    %r15d,%ecx
  lea    (%rax,%rax,2),%eax
  lea    D381(%rip),%rsi
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x40(%rsp),%xmm1
  mov    0x28(%rsp),%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x50(%rsp),%xmm1
  lea    -0x1(%rax),%edx
  mov    $0x1,%eax
  mov    %edx,%r8d
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <fprintf@plt>
  mov    0x28(%rsp),%r8d
  mov    %r15d,%r9d
  mov    %r15d,%ecx
  movsd  0x8(%rsp),%xmm1
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  lea    -0x1(%r8),%edx
  movapd %xmm1,%xmm0
  jmp    L204
  nopl   (%rax)
L124:
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r15d,%r8d
  mov    %r15d,%edx
  lea    (%rax,%rax,2),%eax
  mov    %ebx,%r9d
  mov    %ebx,%ecx
  mov    %r14,%rdi
  cvtsi2sd %eax,%xmm1
  mulsd  0x40(%rsp),%xmm1
  lea    D372(%rip),%rsi
  mov    $0x1,%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x50(%rsp),%xmm1
  push   %r12
  push   %r15
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x20(%rsp)
  call   <fprintf@plt>
  movsd  0x20(%rsp),%xmm1
  mov    %r15d,%edx
  mov    %ebx,%ecx
  mov    %r15d,%r8d
  mov    %r12d,%r9d
  lea    D6(%rip),%rsi
  mov    %rbp,%rdi
  movapd %xmm1,%xmm0
  mov    $0x2,%eax
  add    $0x1,%r15d
  call   <fprintf@plt>
  mov    %r13,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    0x38(%rsp),%eax
  pop    %rdx
  pop    %rcx
  cmp    %r15d,%eax
  jg     L213
  lea    -0x1(%rax),%edx
  cmp    %edx,%r12d
  jl     L103
  jmp    L143
  nopl   0x0(%rax,%rax,1)
L216:
  call   <gaus@plt>
  pxor   %xmm1,%xmm1
  mov    %r15d,%ecx
  mov    %r15d,%edx
  lea    (%rax,%rax,2),%eax
  mov    %r14,%rdi
  lea    D315(%rip),%rsi
  cvtsi2sd %eax,%xmm1
  mulsd  0x38(%rsp),%xmm1
  mov    $0x1,%eax
  addsd  D323(%rip),%xmm1
  mulsd  0x48(%rsp),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <fprintf@plt>
  mov    %r15d,%ecx
  mov    %r15d,%edx
  mov    %r14,%rdi
  lea    D34(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r15d,%ecx
  mov    %r15d,%edx
  mov    %r12,%rsi
  movsd  0x8(%rsp),%xmm1
  mov    %r13,%rdi
  mov    $0x2,%eax
  movapd %xmm1,%xmm0
  call   <fprintf@plt>
  jmp    L231
  nopl   0x0(%rax)
L87:
  mov    %r14,%rcx
  mov    $0x24,%edx
  mov    $0x1,%esi
  lea    D239(%rip),%rdi
  call   <fwrite@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
L80:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L175
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  xor    %edi,%edi
  lea    D390(%rip),%r13
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  jmp    L34
L132:
  mov    %r13,%rdi
  lea    D223(%rip),%rsi
  call   <fopen@plt>
  mov    $0x61,%edx
  mov    $0x1,%esi
  lea    D375(%rip),%rdi
  mov    %rax,%rcx
  call   <fwrite@plt>
  lea    D104(%rip),%rdi
  call   <printf@plt>
  jmp    L80
L175:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D234
type: string
name: disassemble_data
arguments: label: D3
type: string
name: disassemble_data
arguments: label: D161
type: string
name: disassemble_data
arguments: label: D213
type: string
name: disassemble_data
arguments: label: D390
type: string
name: disassemble_data
arguments: label: D223
type: string
name: disassemble_data
arguments: label: D226
type: string
name: disassemble_data
arguments: label: D316
type: string
name: disassemble_data
arguments: label: D276
type: string
name: disassemble_data
arguments: label: D331
type: string
name: disassemble_data
arguments: label: D339
type: string
name: disassemble_data
arguments: label: D323
type: byte[8]
name: disassemble_data
arguments: label: D6
type: string
name: disassemble_data
arguments: label: D31
type: string
name: disassemble_data
arguments: label: D324
type: string
name: disassemble_data
arguments: label: D180
type: string
name: disassemble_data
arguments: label: D155
type: string
name: disassemble_data
arguments: label: D365
type: string
name: disassemble_data
arguments: label: D368
type: string
name: disassemble_data
arguments: label: D267
type: string
name: disassemble_data
arguments: label: D306
type: string
name: disassemble_data
arguments: label: D381
type: string
name: disassemble_data
arguments: label: D372
type: string
name: disassemble_data
arguments: label: D315
type: string
name: disassemble_data
arguments: label: D34
type: string
name: disassemble_data
arguments: label: D239
type: string
name: disassemble_data
arguments: label: D375
type: string
name: disassemble_data
arguments: label: D104
type: string

tool: D234: parameters.ini

tool: D3: r

tool: D161: %d %lf %lf %lf %lf %lf

tool: D213: seed

tool: D390: %d

tool: D223: w

tool: D226: circuit.cir

tool: D316: capacitors.txt

tool: D276: resistors.txt

tool: D331: Random RC Network


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


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

tool: D6: %d %d %e
%d %d %e



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


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


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


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


tool: D365: 0 %d %e
1 %d %e



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


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


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


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


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


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


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


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


tool: D375: 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: D104: Edit Values in "parameters.ini" then rerun

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