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

  if( Cmd->NActive && !ChInStr(Cmd->Active,SpaceToDash(Buffer[19])) )
     return(SUCCESS);
     
  for( CC=0; CC < *ChainNumber && Chain[CC]->Id != Buffer[19]; CC++ );

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

  HC = Chain[CC]->NHelix;
  Chain[CC]->Helix[HC] =  (HELIX *)ckalloc(sizeof(HELIX));

  SplitString(Buffer+15,Field,1);

  strcpy(Chain[CC]->Helix[HC]->Res1,Field[0]);

  SplitString(Buffer+27,Field,1);

  strcpy(Chain[CC]->Helix[HC]->Res2,Field[0]);

  strcpy(Tmp,Buffer);
  Tmp[25] = ' ';
  Tmp[37] = ' ';
  SplitString(Tmp+21,Field,1);
  strcpy(Chain[CC]->Helix[HC]->PDB_ResNumb1,Field[0]);
  SplitString(Tmp+33,Field,1);
  strcpy(Chain[CC]->Helix[HC]->PDB_ResNumb2,Field[0]);

  Chain[CC]->Helix[HC]->InsCode1 = Buffer[25];
  Chain[CC]->Helix[HC]->InsCode2 = Buffer[37];

  Tmp[40] = ' ';
  SplitString(Tmp+38,Field,1);
  Chain[CC]->Helix[HC]->Class = atoi(Field[0]);

  Chain[CC]->NHelix++;

  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 0x1a12e
movq 0x5c0(%rsp), %rax
addq $0x1c08, %rax           # imm = 0x1C08
movq %rax, 0x8(%rsp)
movq 0x5d8(%rsp), %rax
movsbl 0x13(%rax), %edi
callq 0x6550
movq 0x8(%rsp), %rdi
movsbl %al, %esi
callq 0x6580
cmpl $0x0, %eax
jne 0x1a12e
movl $0x1, 0x5e4(%rsp)
jmp 0x1a4a5
movl $0x0, 0x5bc(%rsp)
movl 0x5bc(%rsp), %ecx
movq 0x5c8(%rsp), %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, 0x7(%rsp)
jge 0x1a17f
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x40(%rax), %eax
movq 0x5d8(%rsp), %rcx
movsbl 0x13(%rcx), %ecx
cmpl %ecx, %eax
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1a189
jmp 0x1a19e
jmp 0x1a18b
movl 0x5bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5bc(%rsp)
jmp 0x1a139
movl 0x5bc(%rsp), %eax
movq 0x5c8(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x1a1fe
movq 0x5d0(%rsp), %rdi
movslq 0x5bc(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x43a0
movq 0x5d8(%rsp), %rax
movb 0x13(%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 0x1c(%rax), %eax
movl %eax, 0x5b8(%rsp)
movl $0x20, %edi
callq 0x7360
movq %rax, %rdx
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x5d8(%rsp), %rdi
addq $0xf, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x420(%rsp), %rsi
callq 0x2060
movq 0x5d8(%rsp), %rdi
addq $0x1b, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x6, %rdi
movq 0x420(%rsp), %rsi
callq 0x2060
leaq 0x10(%rsp), %rdi
movq 0x5d8(%rsp), %rsi
callq 0x2060
movb $0x20, 0x29(%rsp)
movb $0x20, 0x35(%rsp)
leaq 0x10(%rsp), %rdi
addq $0x15, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0xc, %rdi
movq 0x420(%rsp), %rsi
callq 0x2060
leaq 0x10(%rsp), %rdi
addq $0x21, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x12, %rdi
movq 0x420(%rsp), %rsi
callq 0x2060
movq 0x5d8(%rsp), %rax
movb 0x19(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0x18(%rax)
movq 0x5d8(%rsp), %rax
movb 0x25(%rax), %cl
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movb %cl, 0x19(%rax)
movb $0x20, 0x38(%rsp)
leaq 0x10(%rsp), %rdi
addq $0x26, %rdi
leaq 0x420(%rsp), %rsi
movl $0x1, %edx
callq 0x37c0
movq 0x420(%rsp), %rdi
callq 0x21d0
movl %eax, %ecx
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x80(%rax), %rax
movslq 0x5b8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x1c(%rax)
movq 0x5d0(%rsp), %rax
movslq 0x5bc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
movl $0x1, 0x5e4(%rsp)
movl 0x5e4(%rsp), %eax
addq $0x5e8, %rsp            # imm = 0x5E8
retq
nopw %cs:(%rax,%rax)
nop