// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/p_ssbond.c
// Function: Process_SSBOND
int Process_SSBOND(BUFFER Buffer, CHAIN **Chain, int *ChainNumber, COMMAND *Cmd)
{
  int CC, BC;
  char *Field[MAX_FIELD];
  BUFFER Tmp;

  if( Cmd->NActive && !ChInStr(Cmd->Active,SpaceToDash(Buffer[15])) )
     return(SUCCESS);

  CC = 0;

  if( *ChainNumber == 0 ) {
    InitChain(&Chain[CC]); 
    Chain[CC]->Id = Buffer[15];
    (*ChainNumber)++;
  }

  BC = Chain[CC]->NBond;
  Chain[CC]->SSbond[BC] =  (SSBOND *)ckalloc(sizeof(SSBOND));

  strcpy(Tmp,Buffer);
  Tmp[21] = ' ';
  Tmp[35] = ' ';
  SplitString(Tmp+17,Field,1);
  strcpy(Chain[CC]->SSbond[BC]->PDB_ResNumb1,Field[0]);
  SplitString(Tmp+31,Field,1);
  strcpy(Chain[CC]->SSbond[BC]->PDB_ResNumb2,Field[0]);

  Chain[CC]->SSbond[BC]->ChainId1 = Buffer[15];
  Chain[CC]->SSbond[BC]->ChainId2 = Buffer[29];

  Chain[CC]->SSbond[BC]->InsCode1 = Buffer[21];
  Chain[CC]->SSbond[BC]->InsCode2 = Buffer[35];

  Chain[CC]->SSbond[BC]->AsnSource = Pdb;

  Chain[CC]->NBond++;

  return(SUCCESS);
}

// Assembly:
subq $0x5e8, %rsp            # imm = 0x5E8
movq %rdi, 0x5d8(%rsp)
movq %rsi, 0x5d0(%rsp)
movq %rdx, 0x5c8(%rsp)
movq %rcx, 0x5c0(%rsp)
movq 0x5c0(%rsp), %rax
cmpl $0x0, 0x1cf8(%rax)
je 0x1b2fe
movq 0x5c0(%rsp), %rax
addq $0x1c08, %rax           # imm = 0x1C08
movq %rax, 0x8(%rsp)
movq 0x5d8(%rsp), %rax
movsbl 0xf(%rax), %edi
callq 0x6550
movq 0x8(%rsp), %rdi
movsbl %al, %esi
callq 0x6580
cmpl $0x0, %eax
jne 0x1b2fe
movl $0x1, 0x5e4(%rsp)
jmp 0x1b59d
movl $0x0, 0x5bc(%rsp)
movq 0x5c8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x1b363
movq 0x5d0(%rsp), %rdi
movslq 0x5bc(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x43a0
movq 0x5d8(%rsp), %rax
movb 0xf(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0x40(%rax)
movq 0x5c8(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x2c(%rax), %eax
movl %eax, 0x5b8(%rsp)
movl $0x14, %edi
callq 0x7360
movq %rax, %rdx
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
leaq 0x10(%rsp), %rdi
movq 0x5d8(%rsp), %rsi
callq 0x2060
movb $0x20, 0x25(%rsp)
movb $0x20, 0x33(%rsp)
leaq 0x10(%rsp), %rdi
addq $0x11, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x420(%rsp), %rsi
callq 0x2060
leaq 0x10(%rsp), %rdi
addq $0x1f, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x6, %rdi
movq 0x420(%rsp), %rsi
callq 0x2060
movq 0x5d8(%rsp), %rax
movb 0xf(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0xe(%rax)
movq 0x5d8(%rsp), %rax
movb 0x1d(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0xf(%rax)
movq 0x5d8(%rsp), %rax
movb 0x15(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0xc(%rax)
movq 0x5d8(%rsp), %rax
movb 0x23(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0xd(%rax)
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa0(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl $0x1, 0x10(%rax)
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movl $0x1, 0x5e4(%rsp)
movl 0x5e4(%rsp), %eax
addq $0x5e8, %rsp            # imm = 0x5E8
retq
nopl (%rax)