// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/contacts.c
// Function: Write_contact_list
void Write_contact_list(short **cont_i, short **cont_j,
			struct interaction *Int_list, int *N_int)
{
  int k, nc=0, res1=-1, res2=-1;
  for(k=0; k<*N_int; k++){
    if((Int_list[k].res1!=res1)||(Int_list[k].res2!=res2)){
      res1=Int_list[k].res1; res2=Int_list[k].res2; nc++;
    } 
  }

  *cont_i=malloc(nc*sizeof(int));
  *cont_j=malloc(nc*sizeof(int));
  nc=0; res1=-1; res2=-1;
  for(k=0; k<*N_int; k++){
    if((Int_list[k].res1!=res1)||(Int_list[k].res2!=res2)){
      res1=Int_list[k].res1; res2=Int_list[k].res2;
      (*cont_i)[nc]=res1;
      (*cont_j)[nc]=res2;
      nc++;
    } 
  }
  *N_int=nc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2bc0c
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x2c(%rbp), %eax
jne 0x2bbc3
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl -0x30(%rbp), %eax
je 0x2bbfc
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2bbfe
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2bb84
movslq -0x28(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movslq -0x28(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1180
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2bd0c
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x2c(%rbp), %eax
jne 0x2bc99
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl -0x30(%rbp), %eax
je 0x2bcfc
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x30(%rbp), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2bcfe
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2bc56
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)