// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/anharmonic_tnm.c
// Function: Print_interactions
void Print_interactions(struct interaction *Int_list, int N_int,
			struct interaction **Int_KB,
			int *aa_seq, char *AA_code, int NA, char *name)
{
  // Prepare for printing
  char nameout[100];
  sprintf(nameout,"%s.Inter_SB_KB.dat",name);
  FILE *file_out=fopen(nameout, "w");
  printf("Writing %s\n", nameout);
  int printed[4]; for(int i=0; i<4; i++)printed[i]=0;
  fprintf(file_out, "# NPAR= %d\n#r V(r)\n", NPAR);

  int n, nprint=0; struct interaction *Int=Int_list;
  for(n=0; n<N_int; n++){
    int a=aa_seq[Int->res1], b=aa_seq[Int->res1];
    struct interaction *I_KB=Int_KB[a]+b;
    int type;
    if(Int->r0>I_KB->r0){type=0;}else{type=2;}
    if(I_KB->E_min>0)type++;
    if(printed[type]==0){
      Print_potential(file_out, Int, a, b, "Structure-based", AA_code);
      Print_potential(file_out, I_KB, a,b, "Knowledge-based", AA_code);
      printed[type]=1; nprint++;
      if(nprint==4)break;
    }
    Int++;
  }
  fclose(file_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
movq 0x10(%rbp), %rdx
leaq 0x526e0(%rip), %rsi     # 0x7d2b8
movb $0x0, %al
callq 0x1200
leaq -0x90(%rbp), %rdi
leaq 0x51785(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rsi
leaq 0x4c8e7(%rip), %rdi     # 0x774ee
movb $0x0, %al
callq 0x10d0
movl $0x0, -0xb4(%rbp)
cmpl $0x4, -0xb4(%rbp)
jge 0x2ac44
movslq -0xb4(%rbp), %rax
movl $0x0, -0xb0(%rbp,%rax,4)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x2ac18
movq -0x98(%rbp), %rdi
movl 0x611ef(%rip), %edx     # 0x8be40
leaq 0x52673(%rip), %rsi     # 0x7d2cb
movb $0x0, %al
callq 0x1150
movl $0x0, -0xbc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x0, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2adfa
movq -0x20(%rbp), %rax
movq -0xc8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xcc(%rbp)
movq -0x20(%rbp), %rax
movq -0xc8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xd0(%rbp)
movq -0x18(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xd0(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq -0xc8(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0xd8(%rbp), %rax
ucomisd 0x20(%rax), %xmm0
jbe 0x2ad0a
movl $0x0, -0xdc(%rbp)
jmp 0x2ad14
movl $0x2, -0xdc(%rbp)
movq -0xd8(%rbp), %rax
movsd 0xb8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2ad3b
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
movslq -0xdc(%rbp), %rax
cmpl $0x0, -0xb0(%rbp,%rax,4)
jne 0x2add2
movq -0x98(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movl -0xcc(%rbp), %edx
movl -0xd0(%rbp), %ecx
movq -0x28(%rbp), %r9
leaq 0x5256a(%rip), %r8      # 0x7d2df
callq 0x2ae10
movq -0x98(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movl -0xcc(%rbp), %edx
movl -0xd0(%rbp), %ecx
movq -0x28(%rbp), %r9
leaq 0x52550(%rip), %r8      # 0x7d2ef
callq 0x2ae10
movslq -0xdc(%rbp), %rax
movl $0x1, -0xb0(%rbp,%rax,4)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
cmpl $0x4, -0xbc(%rbp)
jne 0x2add0
jmp 0x2adfa
jmp 0x2add2
movq -0xc8(%rbp), %rax
addq $0xc8, %rax
movq %rax, -0xc8(%rbp)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x2ac7e
movq -0x98(%rbp), %rdi
callq 0x10a0
addq $0xe0, %rsp
popq %rbp
retq
nop