user: What would the C source look like for the assembly code provided here?

```asm
<checkconvnet>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0xf8,%rsp
  mov    0x148(%rsp),%rax
  mov    0x170(%rsp),%rsi
  mov    %rcx,0x18(%rsp)
  mov    0x190(%rsp),%rcx
  mov    %r8,0x20(%rsp)
  mov    %rax,(%rsp)
  mov    0x150(%rsp),%rax
  mov    %rsi,0x28(%rsp)
  mov    0x178(%rsp),%rsi
  mov    %rax,0x10(%rsp)
  mov    0x158(%rsp),%rax
  mov    %rsi,0x8(%rsp)
  mov    0x188(%rsp),%rsi
  mov    %rax,0x78(%rsp)
  mov    0x160(%rsp),%rax
  mov    %rsi,0x30(%rsp)
  mov    0x198(%rsp),%rsi
  mov    %rax,0x48(%rsp)
  mov    0x130(%rsp),%r11
  mov    0x168(%rsp),%rax
  mov    %rsi,0x90(%rsp)
  mov    %rcx,0x88(%rsp)
  mov    0x138(%rsp),%rbp
  mov    0x140(%rsp),%rdi
  mov    0x180(%rsp),%r8
  mov    0x1a0(%rsp),%rcx
  mov    0x1a8(%rsp),%rsi
  movsd  0x38(%rax),%xmm6
  movsd  0x108(%rax),%xmm7
  mov    %rcx,0xa0(%rsp)
  mov    0x1b0(%rsp),%rcx
  mov    %rsi,0x80(%rsp)
  mov    0x1b8(%rsp),%rsi
  mov    %rcx,0x58(%rsp)
  mov    0x1c0(%rsp),%rcx
  mov    %rsi,0xb8(%rsp)
  mov    0x1c8(%rsp),%rsi
  mov    %rcx,0x40(%rsp)
  mov    0x1d0(%rsp),%rcx
  mov    %rsi,0x60(%rsp)
  mov    0x1d8(%rsp),%rsi
  mov    %rcx,0x68(%rsp)
  mov    0x1e0(%rsp),%rcx
  movsd  %xmm6,0x50(%rsp)
  movsd  0x110(%rax),%xmm6
  cvttsd2si 0x18(%rax),%r14d
  movsd  %xmm7,0xb0(%rsp)
  movsd  0x130(%rax),%xmm7
  movsd  0x50(%rax),%xmm14
  mov    %rsi,0x70(%rsp)
  movsd  0x118(%rax),%xmm0
  movsd  0x100(%rax),%xmm10
  mov    %rcx,0x38(%rsp)
  movsd  0x120(%rax),%xmm13
  cvttsd2si (%rax),%ecx
  movsd  %xmm6,0xd0(%rsp)
  movsd  0x128(%rax),%xmm12
  movsd  %xmm7,0x98(%rsp)
  movsd  0x140(%rax),%xmm5
  movsd  0x148(%rax),%xmm6
  movsd  0x150(%rax),%xmm7
  movsd  0x158(%rax),%xmm11
  movq   D21(%rip),%xmm1
  movsd  %xmm5,0xa8(%rsp)
  movsd  %xmm6,0xc8(%rsp)
  movsd  0x160(%rax),%xmm5
  movsd  0x168(%rax),%xmm6
  movsd  %xmm7,0xd8(%rsp)
  movsd  0x170(%rax),%xmm7
  movslq (%rbx),%rax
  movsd  %xmm5,0xc0(%rsp)
  movsd  %xmm6,0xe0(%rsp)
  mov    %rax,%rsi
  imul   $0x51eb851f,%rax,%rax
  movsd  %xmm7,0xe8(%rsp)
  mov    %esi,%r12d
  sar    $0x1f,%r12d
  sar    $0x24,%rax
  sub    %r12d,%eax
  imul   $0x32,%eax,%r12d
  mov    %esi,%eax
  sub    %r12d,%eax
  jne    L503
  movsd  (%rdi),%xmm5
  movsd  (%rdx),%xmm9
  pxor   %xmm1,%xmm1
  mov    $0x1,%r15d
  movapd %xmm5,%xmm2
  mulsd  %xmm9,%xmm2
  comisd %xmm1,%xmm2
  jb     L703
  movsd  (%r9),%xmm2
  xor    %r15d,%r15d
  mulsd  %xmm5,%xmm2
  comisd %xmm1,%xmm2
  setb   %r15b
L703:
  mov    (%rsp),%r10
  movsd  (%r10),%xmm4
  mov    0x18(%rsp),%r10
  movsd  (%r10),%xmm8
  movapd %xmm4,%xmm2
  mulsd  %xmm8,%xmm2
  comisd %xmm1,%xmm2
  jb     L191
  movsd  (%r11),%xmm2
  mulsd  %xmm4,%xmm2
  comisd %xmm1,%xmm2
  jae    L441
L191:
  add    $0x1,%r15d
L441:
  mov    0x10(%rsp),%r10
  movsd  (%r10),%xmm3
  mov    0x20(%rsp),%r10
  movsd  (%r10),%xmm7
  movapd %xmm3,%xmm2
  mulsd  %xmm7,%xmm2
  comisd %xmm1,%xmm2
  jb     L438
  movsd  0x0(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  comisd %xmm1,%xmm2
  jb     L438
L169:
  mov    0x28(%rsp),%r10
  movsd  (%r8),%xmm2
  movsd  (%r10),%xmm6
  movapd %xmm2,%xmm15
  mulsd  %xmm6,%xmm15
  comisd %xmm1,%xmm15
  jb     L716
  mov    0x8(%rsp),%r10
  movsd  (%r10),%xmm15
  mulsd  %xmm2,%xmm15
  comisd %xmm1,%xmm15
  jb     L716
L342:
  movq   D21(%rip),%xmm1
  mov    $0x1,%r10d
  andpd  %xmm1,%xmm9
  andpd  %xmm1,%xmm5
  comisd %xmm5,%xmm9
  jb     L288
  movsd  (%r9),%xmm5
  xor    %r10d,%r10d
  andpd  %xmm1,%xmm5
  comisd %xmm9,%xmm5
  setb   %r10b
L288:
  andpd  %xmm1,%xmm8
  andpd  %xmm1,%xmm4
  comisd %xmm4,%xmm8
  jb     L259
  movsd  (%r11),%xmm4
  andpd  %xmm1,%xmm4
  comisd %xmm8,%xmm4
  jb     L259
L447:
  andpd  %xmm1,%xmm7
  andpd  %xmm1,%xmm3
  comisd %xmm3,%xmm7
  jb     L630
  movsd  0x0(%rbp),%xmm3
  andpd  %xmm1,%xmm3
  comisd %xmm7,%xmm3
  jb     L630
  andpd  %xmm1,%xmm6
  andpd  %xmm1,%xmm2
  comisd %xmm2,%xmm6
  jb     L192
L218:
  mov    0x8(%rsp),%r12
  movsd  (%r12),%xmm2
  andpd  %xmm1,%xmm2
  comisd %xmm6,%xmm2
  jb     L192
  nopl   0x0(%rax)
L503:
  mov    0x38(%rsp),%r12
  cmpl   $0x1,(%r12)
  jne    L385
  mov    0x40(%rsp),%r12
  movq   $0x0,(%r12)
  mov    0x60(%rsp),%r12
  movq   $0x0,(%r12)
  mov    0x68(%rsp),%r12
  movq   $0x0,(%r12)
L385:
  movsd  (%rdi),%xmm2
  mov    0x30(%rsp),%rdi
  mulsd  (%rdi),%xmm0
  andpd  %xmm1,%xmm2
  comisd %xmm2,%xmm0
  jb     L5
  mov    0x40(%rsp),%rdi
  movsd  (%rdi),%xmm3
  mov    0x58(%rsp),%rdi
  mulsd  (%rdi),%xmm10
  comisd %xmm3,%xmm10
  jbe    L5
  comisd %xmm2,%xmm11
  jb     L5
  movsd  0xa8(%rsp),%xmm5
  comisd %xmm3,%xmm5
  jbe    L5
  mov    (%rsp),%rdi
  movsd  (%rdi),%xmm3
  mov    0x88(%rsp),%rdi
  movsd  (%rdi),%xmm4
  andpd  %xmm1,%xmm3
  mulsd  %xmm13,%xmm4
  comisd %xmm3,%xmm4
  jb     L5
  movsd  0xb0(%rsp),%xmm5
  mov    0x60(%rsp),%rdi
  movsd  (%rdi),%xmm4
  mov    0xb8(%rsp),%rdi
  mulsd  (%rdi),%xmm5
  comisd %xmm4,%xmm5
  jbe    L5
  movsd  0xc0(%rsp),%xmm5
  comisd %xmm3,%xmm5
  jb     L5
  movsd  0xc8(%rsp),%xmm5
  comisd %xmm4,%xmm5
  jbe    L5
  mov    0x10(%rsp),%rdi
  movsd  (%rdi),%xmm3
  mov    0x90(%rsp),%rdi
  movsd  (%rdi),%xmm4
  andpd  %xmm1,%xmm3
  mulsd  %xmm12,%xmm4
  comisd %xmm3,%xmm4
  jb     L5
  movsd  0xd0(%rsp),%xmm5
  mov    0x68(%rsp),%rdi
  movsd  (%rdi),%xmm4
  comisd %xmm4,%xmm5
  jbe    L5
  movsd  0xe0(%rsp),%xmm5
  comisd %xmm3,%xmm5
  jbe    L5
  movsd  0xd8(%rsp),%xmm5
  comisd %xmm4,%xmm5
  jbe    L5
  mov    0xa0(%rsp),%rdi
  movsd  (%r8),%xmm3
  movsd  0x98(%rsp),%xmm4
  mulsd  (%rdi),%xmm4
  andpd  %xmm1,%xmm3
  comisd %xmm3,%xmm4
  jb     L5
  movsd  0xe8(%rsp),%xmm5
  comisd %xmm3,%xmm5
  jb     L5
  mov    0x70(%rsp),%rdi
  cmpl   $0x1,(%rdi)
  jne    L5
  cmp    $0x3,%esi
  jle    L5
  lea    D75(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x78(%rsp),%rax
  movl   $0x1,(%rax)
  movl   $0x0,0x0(%r13)
  jmp    L734
  nopl   0x0(%rax)
L5:
  lea    (%rcx,%rcx,4),%ecx
  shl    $0x2,%ecx
  cmp    %ecx,%esi
  jl     L445
  movsd  (%r9),%xmm3
  movsd  (%rdx),%xmm4
  andpd  %xmm1,%xmm3
  andpd  %xmm1,%xmm4
  comisd %xmm3,%xmm4
  jb     L701
  comisd %xmm3,%xmm2
  jae    L524
L701:
  xor    %edx,%edx
L596:
  mov    0x18(%rsp),%rdi
  movsd  (%r11),%xmm2
  movsd  (%rdi),%xmm0
  andpd  %xmm1,%xmm2
  andpd  %xmm1,%xmm0
  comisd %xmm2,%xmm0
  jb     L156
  mov    (%rsp),%rdi
  movsd  (%rdi),%xmm0
  andpd  %xmm1,%xmm0
  comisd %xmm2,%xmm0
  jae    L667
L156:
  mov    0x20(%rsp),%rdi
  movsd  0x0(%rbp),%xmm0
  movsd  (%rdi),%xmm2
  andpd  %xmm1,%xmm0
  andpd  %xmm1,%xmm2
  comisd %xmm0,%xmm2
  jb     L495
  mov    0x10(%rsp),%rdi
  movsd  (%rdi),%xmm2
  andpd  %xmm1,%xmm2
L309:
  comisd %xmm0,%xmm2
  jb     L609
  mov    0x90(%rsp),%rdi
  movsd  (%rdi),%xmm0
  mov    $0x1,%edi
  mulsd  %xmm12,%xmm0
  ucomisd %xmm0,%xmm2
  cmova  %edi,%edx
L609:
  cmp    %ecx,%esi
  jge    L495
  movsd  D23(%rip),%xmm3
L499:
  movsd  (%r8),%xmm0
  andpd  %xmm1,%xmm0
  comisd %xmm3,%xmm0
  jbe    L721
L495:
  mov    0x8(%rsp),%rdi
  movsd  (%rdi),%xmm0
  mov    0x28(%rsp),%rdi
  movsd  (%rdi),%xmm2
  andpd  %xmm1,%xmm0
  andpd  %xmm1,%xmm2
  comisd %xmm0,%xmm2
  jb     L721
  movsd  (%r8),%xmm2
  andpd  %xmm2,%xmm1
  comisd %xmm0,%xmm1
  jae    L361
L721:
  lea    (%r14,%r14,4),%ecx
  shl    $0x2,%ecx
  cmp    %ecx,%esi
  setg   %cl
  test   %esi,%esi
  sete   %dil
  or     %dil,%cl
  jne    L245
  and    $0x1,%edx
  je     L646
L245:
  mov    0x48(%rsp),%rax
  lea    D28(%rip),%rdi
  movsd  (%rax),%xmm0
  mulsd  %xmm14,%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x1,%eax
  call   <printf@plt>
  lea    D15(%rip),%rdi
  call   <puts@plt>
  cvttsd2si 0x50(%rsp),%edx
  movl   $0x0,(%rbx)
  mov    0x0(%r13),%eax
  add    $0x1,%eax
  mov    %eax,0x0(%r13)
  cmp    %edx,%eax
  jle    L734
  mov    0x80(%rsp),%rax
  mov    D2(%rip),%rbx
  mov    %rbx,0x10(%rax)
  mov    0x78(%rsp),%rax
  movl   $0x1,(%rax)
L734:
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L445:
  movsd  D23(%rip),%xmm3
  comisd %xmm3,%xmm2
  jbe    L513
  movsd  (%r9),%xmm4
  movsd  (%rdx),%xmm5
  andpd  %xmm1,%xmm4
  andpd  %xmm1,%xmm5
  comisd %xmm4,%xmm5
  jae    L28
L513:
  xor    %edx,%edx
L357:
  mov    (%rsp),%rdi
  movsd  (%rdi),%xmm0
  andpd  %xmm1,%xmm0
  comisd %xmm3,%xmm0
  jbe    L233
  mov    0x18(%rsp),%rdi
  movsd  (%r11),%xmm2
  movsd  (%rdi),%xmm4
  andpd  %xmm1,%xmm2
  andpd  %xmm1,%xmm4
  comisd %xmm2,%xmm4
  jae    L275
L233:
  mov    0x10(%rsp),%rdi
  movsd  (%rdi),%xmm2
  andpd  %xmm1,%xmm2
  comisd %xmm3,%xmm2
  jbe    L499
  mov    0x20(%rsp),%rdi
  movsd  0x0(%rbp),%xmm0
  movsd  (%rdi),%xmm4
  andpd  %xmm1,%xmm0
  andpd  %xmm1,%xmm4
  comisd %xmm0,%xmm4
  jb     L499
  jmp    L309
  nopl   0x0(%rax)
L630:
  andpd  %xmm1,%xmm6
  andpd  %xmm1,%xmm2
  add    $0x1,%r10d
  comisd %xmm2,%xmm6
  jae    L218
L192:
  add    $0x1,%r10d
  jmp    L503
  nop
L259:
  add    $0x1,%r10d
  jmp    L447
  nopl   0x0(%rax)
L716:
  add    $0x1,%r15d
  jmp    L342
  nopl   0x0(%rax)
L438:
  add    $0x1,%r15d
  jmp    L169
  nopl   0x0(%rax)
L646:
  test   %eax,%eax
  jne    L21
  mov    %r15d,%eax
  or     %r10d,%eax
  je     L526
  test   %r15d,%r15d
  je     L21
  test   %r10d,%r10d
  je     L21
  mov    0x70(%rsp),%rax
  cmpl   $0x1,(%rax)
  je     L21
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x48(%rsp),%rax
  movsd  D87(%rip),%xmm0
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L734
  nopl   0x0(%rax,%rax,1)
L526:
  mov    0x70(%rsp),%rax
  cmpl   $0x1,(%rax)
  je     L139
L21:
  add    $0xf8,%rsp
  lea    D76(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <puts@plt>
  nopl   0x0(%rax,%rax,1)
L361:
  mov    0xa0(%rsp),%rdi
  movsd  0x98(%rsp),%xmm0
  mulsd  (%rdi),%xmm0
  comisd %xmm0,%xmm1
  ja     L245
  jmp    L721
  nopl   0x0(%rax)
L275:
  comisd %xmm2,%xmm0
  jb     L233
L667:
  mov    0x88(%rsp),%rdi
  movsd  D23(%rip),%xmm3
  movsd  (%rdi),%xmm2
  mov    $0x1,%edi
  mulsd  %xmm13,%xmm2
  ucomisd %xmm2,%xmm0
  cmova  %edi,%edx
  cmp    %ecx,%esi
  jge    L156
  jmp    L233
  nopl   0x0(%rax)
L28:
  comisd %xmm4,%xmm2
  jb     L513
  xor    %edx,%edx
  comisd %xmm0,%xmm2
  seta   %dl
  jmp    L357
L524:
  xor    %edx,%edx
  comisd %xmm0,%xmm2
  seta   %dl
  jmp    L596
  xchg   %ax,%ax
L139:
  lea    D127(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x48(%rsp),%rax
  movsd  D131(%rip),%xmm2
  movsd  D115(%rip),%xmm1
  mulsd  (%rax),%xmm2
  movapd %xmm1,%xmm0
  cmplesd %xmm2,%xmm0
  andpd  %xmm0,%xmm1
  andnpd %xmm2,%xmm0
  orpd   %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L734
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D21
data_type: qword
name: extract_symbolic_data
arguments: data_tag: D75
data_type: string
name: extract_symbolic_data
arguments: data_tag: D23
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D28
data_type: string
name: extract_symbolic_data
arguments: data_tag: D15
data_type: string
name: extract_symbolic_data
arguments: data_tag: D2
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D38
data_type: string
name: extract_symbolic_data
arguments: data_tag: D87
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D76
data_type: string
name: extract_symbolic_data
arguments: data_tag: D127
data_type: string
name: extract_symbolic_data
arguments: data_tag: D131
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D115
data_type: f64

tool: D21: 9223372036854775807

tool: D75:       flow network: convergence in gas iteration %d 



tool: D23: 1e+20

tool: D28: 
 network divergence; the under-relaxation parameter is decreased to %e


tool: D15:  the network iteration for the increment is reattempted


tool: D2: 0.25

tool: D38:       bad convergence progression --> *dtheta is decreased %d


tool: D87: 0.8

tool: D76:       no convergence


tool: D127:       good convergence --> *dtheta is increased %d


tool: D131: 1.2

tool: D115: 1

assistant: ```c
void checkconvnet(int *icutb, int *iin, double *cam1t, double *cam1f, double *cam1p, double *cam2t, double *cam2f, double *cam2p, double *camt, double *camf, double *camp, int *icntrl, double *dtheta, double *ctrl, double *cam1a, double *cam2a, double *cama, double *vamt, double *vamf, double *vamp, double *vama, double *qa, double *qamt, double *qamf, double *ramt, double *ramf, double *ramp, int *iplausi, int *ichannel) {
  int i0, ir, ip, ic, il, ig, ia, idivergence, iin_dyn, dyna_flag_1, dyna_flag_2;
  double c2t, c2f, c2p, c2a, c1t, c1f, c1p, a2t, a2f, a2p, a2a, a1t, a1f, a1p, qamp = 1., df, dc, db, dd, ran, can, rap, ea, cae, ral;
  i0 = ctrl[0];
  ir = ctrl[1];
  ip = ctrl[2];
  ic = ctrl[3];
  il = ctrl[4];
  ig = ctrl[5];
  ia = ctrl[7];
  df = ctrl[10];
  dc = ctrl[11];
  db = ctrl[12];
  dd = ctrl[16];
  ran = ctrl[18];
  can = ctrl[19];
  rap = ctrl[22];
  ea = ctrl[23];
  cae = ctrl[24];
  ral = ctrl[25];
  c1t = ctrl[32];
  c1f = ctrl[33];
  c1p = ctrl[34];
  c2t = ctrl[35];
  c2f = ctrl[36];
  c2p = ctrl[37];
  c2a = ctrl[38];
  a1t = ctrl[40];
  a1f = ctrl[41];
  a1p = ctrl[42];
  a2t = ctrl[43];
  a2f = ctrl[44], a2p = ctrl[45];
  a2a = ctrl[46];
  iin_dyn = 50;
  if (*iin % iin_dyn == 0) {
    dyna_flag_1 = 0;
    if (*camt * *cam1t >= 0 && *camt * *cam2t >= 0) {
      dyna_flag_1 = dyna_flag_1;
    } else {
      dyna_flag_1 = dyna_flag_1 + 1;
    }
    if (*camf * *cam1f >= 0 && *camf * *cam2f >= 0) {
      dyna_flag_1 = dyna_flag_1;
    } else {
      dyna_flag_1 = dyna_flag_1 + 1;
    }
    if (*camp * *cam1p >= 0 && *camp * *cam2p >= 0) {
      dyna_flag_1 = dyna_flag_1;
    } else {
      dyna_flag_1 = dyna_flag_1 + 1;
    }
    if (*cama * *cam1a >= 0 && *cama * *cam2a >= 0) {
      dyna_flag_1 = dyna_flag_1;
    } else {
      dyna_flag_1 = dyna_flag_1 + 1;
    }
    dyna_flag_2 = 0;
    if (fabs(*camt) <= fabs(*cam1t) && fabs(*cam1t) <= fabs(*cam2t)) {
      dyna_flag_2 = dyna_flag_2;
    } else {
      dyna_flag_2 = dyna_flag_2 + 1;
    }
    if (fabs(*camf) <= fabs(*cam1f) && fabs(*cam1f) <= fabs(*cam2f)) {
      dyna_flag_2 = dyna_flag_2;
    } else {
      dyna_flag_2 = dyna_flag_2 + 1;
    }
    if (fabs(*camp) <= fabs(*cam1p) && fabs(*cam1p) <= fabs(*cam2p)) {
      dyna_flag_2 = dyna_flag_2;
    } else {
      dyna_flag_2 = dyna_flag_2 + 1;
    }
    if (fabs(*cama) <= fabs(*cam1a) && fabs(*cam1a) <= fabs(*cam2a)) {
      dyna_flag_2 = dyna_flag_2;
    } else {
      dyna_flag_2 = dyna_flag_2 + 1;
    }
  }
  if (*ichannel == 1) {
    *ramt = 0.;
    *ramf = 0.;
    *ramp = 0.;
  }
  if ((fabs(*camt) <= c2t * *vamt) && (*ramt < c1t * *qamt) && (fabs(*camt) <= a2t) && (*ramt < a1t) && (fabs(*camf) <= c2f * *vamf) && (*ramf < c1f * *qamf) && (fabs(*camf) <= a2f) && (*ramf < a1f) && (fabs(*camp) <= c2p * *vamp) && (*ramp < c1p * qamp) && (fabs(*camp) < a2p) && (*ramp < a1p) && (fabs(*cama) <= c2a * *vama) && (fabs(*cama) <= a2a) && (*iplausi == 1) && (*iin > 3)) {
    printf("      flow network: convergence in gas iteration %"
           "d"
           " \n\n",
           *iin);
    *icntrl = 1;
    *icutb = 0;
  } else {
    idivergence = 0;
    if ((*iin >= 20 * i0) || (fabs(*camt) > 1.e20)) {
      if ((fabs(*cam1t) >= fabs(*cam2t)) && (fabs(*camt) >= fabs(*cam2t)) && (fabs(*camt) > c2t * *vamt)) {
        idivergence = 1;
      }
    }
    if ((*iin >= 20 * i0) || (fabs(*camf) > 1.e20)) {
      if ((fabs(*cam1f) >= fabs(*cam2f)) && (fabs(*camf) >= fabs(*cam2f)) && (fabs(*camf) > c2f * *vamf)) {
        idivergence = 1;
      }
    }
    if ((*iin >= 20 * i0) || (fabs(*camp) > 1.e20)) {
      if ((fabs(*cam1p) >= fabs(*cam2p)) && (fabs(*camp) >= fabs(*cam2p)) && (fabs(*camp) > c2p * *vamp)) {
        idivergence = 1;
      }
    }
    if ((*iin >= 20 * i0) || (fabs(*cama) > 1.e20)) {
      if ((fabs(*cam1a) >= fabs(*cam2a)) && (fabs(*cama) >= fabs(*cam2a)) && (fabs(*cama) > c2a * *vama)) {
        idivergence = 1;
      }
    }
    if (*iin > 20 * ic)
      idivergence = 1;
    if (*iin == 0)
      idivergence = 1;
    if (idivergence == 1) {
      *dtheta = *dtheta * df;
      printf("\n network divergence; the under-relaxation parameter is decreased to %e\n", *dtheta);
      printf(" the network iteration for the increment is reattempted\n\n");
      *iin = 0;
      (*icutb)++;
      if (*icutb > ia) {
        qa[2] = 0.25;
        *icntrl = 1;
      }
    } else {
      if (*iin % iin_dyn == 0) {
        if (dyna_flag_1 == 0 && dyna_flag_2 == 0 && *iplausi == 1) {
          printf("      good convergence --> *dtheta is increased %"
                 "d"
                 "\n",
                 *iin);
          *dtheta = *dtheta * (1.2);
          if (*dtheta >= 1) {
            *dtheta = 1.;
          }
        } else if (dyna_flag_1 != 0 && dyna_flag_2 != 0 && *iplausi != 1) {
          printf("      bad convergence progression --> *dtheta is decreased %"
                 "d"
                 "\n",
                 *iin);
          *dtheta = *dtheta * (0.8);
        } else {
          printf("      no convergence\n\n");
        }
      } else {
        printf("      no convergence\n\n");
      }
    }
  }
  return;
}
```