// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/read.c
// Function: Read_ligand
int Read_ligand(char *pdb_name, int *nmr, struct residue *seq, atom *atoms,
	       char *chain_to_read, int *ANISOU)
{
  int N_res=0, n_exo=0, Compression=0, start=0;
  FILE *file_in;
  char string[200], command[200];
  atom *atom_ptr=atoms, *first_atom=NULL;

  short i_atom=0, alternative=0;
  int hetatm=0, hetatm_old=0;
  int i, j, res_num, res_num_old=10000;
  char altloc, altloc_sel=' ';
  char chain_old='#', chain=' ';
  char res_type[5], res_type_old[5], icode=' ', icode_old='U';
  float x, y, z;
  char file_name[500];
  int nchains=1, ic, ichain=0, ini_chain=0;
  n_atom=0;

  /* Open file */
  Compression=Get_compression(pdb_name);
  if(Compression){
    sprintf(command, "%s %s > %s\n", PDBCAT, pdb_name, PDBTMP);
    system(command); strcpy(file_name, PDBTMP);
  }else{
    sprintf(file_name, "%s", pdb_name);
  }
  file_in=fopen(file_name, "r");
  if(file_in==NULL){
    printf("\nERROR, %s not found\n", file_name); return(0);
  }

  // Count chains to read
  for(i=0; i<sizeof(chain_to_read); i++){
    nchains=i; if(chain_to_read[i]=='\0')break;
  }
  nchains++; if(nchains==0)nchains=1;

  *nmr=0;
  strcpy(res_type_old,"xxx");
  while(fgets(string, sizeof(string), file_in)!=NULL){

    if(strncmp(string,"ATOM", 4)==0){
      /* Standard residue or DNA basis */
      hetatm=0; if(ini_chain==0)ini_chain=1;
    }else if(strncmp(string,"HETATM", 6)==0){
      if(ini_chain==0)continue;
      hetatm=1;
      /* Cofactor or exotic residue */

    }else if(strncmp(string,"EXPDTA", 6)==0){
      if(strncmp(string+10, "NMR", 3)==0)*nmr=1;
      continue;
      /* NMR structure */

    }else if((strncmp(string,"TER",3)==0)&&(N_res>0)){
      Next_residue(&N_res, &start, seq, first_atom, &i_atom,
		   res_type_old, &res_num_old, &icode_old,
		   &chain_old, &hetatm_old, n_exo,
		   res_type, res_num, icode, chain, hetatm);
      ini_chain=0;
      continue;

    }else if(strncmp(string,"MODRES", 6)==0){
      res_exo[n_exo][0]=string[12]; res_std[n_exo][0]=string[24];
      res_exo[n_exo][1]=string[13]; res_std[n_exo][1]=string[25];
      res_exo[n_exo][2]=string[14]; res_std[n_exo][2]=string[26];
      for(j=0; j<n_exo; j++){
	if(strncmp(res_exo[j],res_exo[n_exo],3)==0)break;
      }
      if(j==n_exo)n_exo++;
      continue;

    }else if(strncmp(string,"ENDMDL", 6)==0){
      break;                                    /* end model */
    }else if(strncmp(string,"ANISOU", 6)==0){
      // Anisotropic structure factor
      int i, j;
      if(*ANISOU==0)*ANISOU=1;
      sscanf(string+28, "%f %f %f %f %f %f",
	     &(atom_ptr->anisou[0][0]), &(atom_ptr->anisou[1][1]),
	     &(atom_ptr->anisou[2][2]), &(atom_ptr->anisou[0][1]),
	     &(atom_ptr->anisou[0][2]), &(atom_ptr->anisou[1][2]));
      for(i=0; i<3; i++){
	for(j=i; j<3; j++){
	  atom_ptr->anisou[i][j]*=0.0001;
	  if(j!=i)atom_ptr->anisou[j][i]=atom_ptr->anisou[i][j];
	}
      }
      // Check
      //for(i=0; i<3; i++)B+=aniso[i][i]; B*=26.319; // 8pi^2/2
      //printf("B= %.2f %.2f %d\n", atom_ptr->B_factor, B, n_atom);
      continue;

      /*}else if(strncmp(string,"HELIX ", 6)==0){
	Read_sec_str(string, chain, 'H'); continue;
	}else if(strncmp(string,"SHEET ", 6)==0){
	Read_sec_str(string, chain, 'E'); continue;
	}else if(strncmp(string,"TURN ", 5)==0){
	Read_sec_str(string, chain, 'T'); continue;*/
    }else{
      continue;
    }

    chain=string[21];
    if(*chain_to_read!='*'){
      if((*chain_to_read==' ')||(*chain_to_read=='\0'))*chain_to_read=chain;
      for(ic=0; ic<nchains; ic++)if(chain==chain_to_read[ic])goto read;
      continue;
    }

  read:
    /* Read atom name */
    if((string[13]=='H')||(string[12]=='H') ||
       (string[13]=='D') ||(string[12]=='D'))continue;

    /* Read residue; check if water molecule */
    res_type[0]=string[17]; res_type[1]=string[18]; res_type[2]=string[19];
    res_type[3]='\0';
    if((hetatm==1)&&((strncmp(res_type,"HOH",3)==0)||
		     (strncmp(res_type,"DOD",3)==0)))continue;

    icode=string[26]; string[26]=' ';


    /* Read coordinates */
    sscanf(string+22,"%d %f %f %f", &res_num, &x, &y, &z);

    /* Check if alternative conformation */
    if((string[72]=='A')&&(string[73]=='L')&&(string[74]=='T')&&
       (string[75]!='1')&&(string[75]!=' '))continue;

    altloc=string[16];
    if(altloc!=' '){
      if(altloc_sel==' ')altloc_sel=altloc;
      if(altloc!=altloc_sel)continue;
    }

    if((icode!=icode_old)&&(res_num==res_num_old)){
      if(alternative==1){
	continue;
      }else{
	atom *atom_old=first_atom;
	float dx, dy, dz;
	dx=x-atom_old->r[0]; dy=y-atom_old->r[1]; dz=z-atom_old->r[2];
	if((dx*dx+dy*dy+dz*dz)<.5){
	  alternative=1; continue;
	}
      }
    }

    /* New residue */
    if((res_num!=res_num_old)||(icode!=icode_old)||
       (strncmp(res_type, res_type_old, 3)!=0)){
      Next_residue(&N_res, &start, seq, first_atom, &i_atom,
		   res_type_old, &res_num_old, &icode_old,
		   &chain_old, &hetatm_old, n_exo,
		   res_type, res_num, icode, chain, hetatm);
    }
    atom_ptr=atoms+n_atom;

    if(i_atom==0)first_atom=atom_ptr;
    i_atom++; n_atom++;
    atom_ptr->r[0] = x;
    atom_ptr->r[1] = y;
    atom_ptr->r[2] = z;
    if(string[12]!=' '){ // Hydrogen atoms
      for(ic=0; ic<4; ic++)atom_ptr->name[ic]=string[12+ic];
    }else{
      for(ic=0; ic<3; ic++)atom_ptr->name[ic]=string[13+ic];
      atom_ptr->name[3]=' ';
    }
    sscanf(string+56, "%f", &atom_ptr->occupancy);
    sscanf(string+60, "%f", &atom_ptr->B_factor);
    atom_ptr->chain=ichain;
  }
  Next_residue(&N_res, &start, seq, first_atom, &i_atom,
	       res_type_old, &res_num_old, &icode_old,
	       &chain_old, &hetatm_old, n_exo,
	       res_type, res_num, icode, chain, hetatm);
  if(N_res > L_MAX){
    printf("\n ERROR, more than %d residues found\n", L_MAX); exit(8);
  }
  fclose(file_in);
  if(Verbose)printf("%3d residues\n", N_res);
  if(Compression){
    sprintf(command, "rm -f %s\n", PDBTMP); system(command);
  }
  return(N_res);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %r9, 0x78(%rsp)
andl $0x0, 0x28(%rsp)
movq %r8, 0x90(%rsp)
andl $0x0, 0x3c(%rsp)
movq %rcx, %r13
andw $0x0, 0xc(%rsp)
movq %rdx, 0x68(%rsp)
andl $0x0, 0x38(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdi, %rbx
movl $0x2710, 0x24(%rsp)     # imm = 0x2710
movb $0x23, 0x7(%rsp)
movb $0x55, 0x6(%rsp)
andl $0x0, 0x573fa(%rip)     # 0x64f78
callq 0xe52a
movl %eax, %ebp
testl %eax, %eax
je 0xdbcf
leaq 0x421c7(%rip), %rsi     # 0x4fd57
leaq 0x421cc(%rip), %rdx     # 0x4fd63
leaq 0x421ca(%rip), %r8      # 0x4fd68
leaq 0x180(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2260
movq %r14, %rdi
callq 0x20e0
movabsq $0x7461642e626470, %rax # imm = 0x7461642E626470
movq %rax, 0x250(%rsp)
jmp 0xdbdf
leaq 0x250(%rsp), %rdi
movq %rbx, %rsi
callq 0x2080
leaq 0x461f8(%rip), %rsi     # 0x53dde
leaq 0x250(%rsp), %rdi
callq 0x2210
movq %rax, 0x98(%rsp)
testq %rax, %rax
je 0xdc25
pushq $0x1
popq %rax
xorl %ecx, %ecx
movq 0x90(%rsp), %rdx
movq %rax, %r15
cmpq $0x8, %rcx
je 0xdc45
movq %rcx, %rax
cmpb $0x0, (%rdx,%rcx)
je 0xdc42
leaq 0x1(%rax), %rcx
jmp 0xdc0d
leaq 0x42144(%rip), %rdi     # 0x4fd70
xorl %ebx, %ebx
leaq 0x250(%rsp), %rsi
xorl %eax, %eax
callq 0x20f0
jmp 0xe500
movq %rax, %r15
movl %ebp, 0x74(%rsp)
movq 0x88(%rsp), %rax
andl $0x0, (%rax)
leaq 0x2c(%rsp), %rax
movl $0x787878, (%rax)       # imm = 0x787878
incq %r15
movb $0x20, %al
movl %eax, 0x14(%rsp)
movb $0x20, %r14b
movb $0x20, 0x5(%rsp)
movq $0x0, 0x18(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x40(%rsp)
movl $0x0, 0x8(%rsp)
movq %r13, 0xa0(%rsp)
movq %r13, 0x80(%rsp)
movq $0x0, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movw %cx, 0x2(%rsp)
leaq 0xb0(%rsp), %rdi
movl $0xc8, %esi
movq 0x98(%rsp), %rdx
callq 0x2170
movsbl %r14b, %ebx
movsbl 0x5(%rsp), %r13d
testq %rax, %rax
je 0xe43f
movl 0xb0(%rsp), %r12d
xorl %ebp, %ebp
cmpl $0x4d4f5441, %r12d      # imm = 0x4D4F5441
jne 0xde8f
movb 0xc5(%rsp), %r14b
movq 0x90(%rsp), %rdx
movzbl (%rdx), %eax
testl %eax, %eax
je 0xdd14
cmpl $0x2a, %eax
je 0xdd2f
cmpl $0x20, %eax
jne 0xdd17
movb %r14b, (%rdx)
xorl %eax, %eax
cmpq %rax, %r15
je 0xdf66
leaq 0x1(%rax), %rcx
cmpb (%rdx,%rax), %r14b
movq %rcx, %rax
jne 0xdd19
movd 0xbc(%rsp), %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x5, %xmm0, %xmm0      # xmm0 = xmm0[1,1,0,0,4,5,6,7]
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
pcmpeqb 0x41db2(%rip), %xmm0    # 0x4fb00
movmskps %xmm0, %eax
movl %ebp, %ecx
movq %rcx, 0x18(%rsp)
movzwl 0x2(%rsp), %ecx
pushq $0x1
popq %rdx
movl %edx, 0x8(%rsp)
testl %eax, %eax
jne 0xdcaa
movb 0xc1(%rsp), %al
movb %al, 0xf(%rsp)
movzwl 0xc2(%rsp), %eax
movw %ax, 0x10(%rsp)
movb $0x0, 0x12(%rsp)
cmpl $0x4d4f5441, %r12d      # imm = 0x4D4F5441
je 0xddf0
leaq 0xf(%rsp), %rdi
leaq 0x41e95(%rip), %rsi     # 0x4fc33
pushq $0x3
popq %rdx
callq 0x2200
pushq $0x1
popq %rdx
movl %edx, %ecx
movq %rcx, 0x18(%rsp)
movzwl 0x2(%rsp), %ecx
movl %edx, 0x8(%rsp)
testl %eax, %eax
je 0xdcaa
leaq 0xf(%rsp), %rdi
leaq 0x41e6a(%rip), %rsi     # 0x4fc37
pushq $0x3
popq %rdx
callq 0x2200
pushq $0x1
popq %rdx
movl %edx, %ecx
movq %rcx, 0x18(%rsp)
movzwl 0x2(%rsp), %ecx
movl %edx, 0x8(%rsp)
testl %eax, %eax
je 0xdcaa
movb 0xca(%rsp), %al
movb %al, 0x5(%rsp)
movb $0x20, 0xca(%rsp)
leaq 0xc6(%rsp), %rdi
leaq 0x41e29(%rip), %rsi     # 0x4fc3b
leaq 0x34(%rsp), %rdx
leaq 0x64(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x5c(%rsp), %r9
xorl %eax, %eax
callq 0x21f0
cmpb $0x41, 0xf8(%rsp)
jne 0xde71
cmpb $0x4c, 0xf9(%rsp)
jne 0xde71
cmpb $0x54, 0xfa(%rsp)
jne 0xde71
movb 0xfb(%rsp), %al
cmpb $0x31, %al
je 0xde71
movl %ebp, %ecx
movq %rcx, 0x18(%rsp)
movzwl 0x2(%rsp), %ecx
pushq $0x1
popq %rdx
movl %edx, 0x8(%rsp)
cmpb $0x20, %al
jne 0xdcaa
movb 0xc0(%rsp), %r13b
cmpb $0x20, %r13b
jne 0xe1b5
movl 0x14(%rsp), %eax
movl %eax, %r13d
jmp 0xe1e8
leaq 0xb0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x41d80(%rip), %rsi     # 0x4fc21
pushq $0x6
popq %r15
movq %r15, %rdx
callq 0x2200
testl %eax, %eax
je 0xdf80
movq %rbp, %rdi
leaq 0x41e0e(%rip), %rsi     # 0x4fccd
movq %r15, %rdx
callq 0x2200
testl %eax, %eax
je 0xdfa9
movq %rbp, %rdi
leaq 0x41d4f(%rip), %rsi     # 0x4fc28
pushq $0x3
popq %r12
movq %r12, %rdx
callq 0x2200
testl %eax, %eax
jne 0xdfec
cmpl $0x0, 0x28(%rsp)
jle 0xdfec
movl 0x34(%rsp), %eax
leaq 0x28(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x2c(%rsp), %r9
pushq 0x18(%rsp)
pushq %rbx
pushq %r13
pushq %rax
leaq 0x2f(%rsp), %rax
pushq %rax
pushq 0x70(%rsp)
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x3f(%rsp), %rax
pushq %rax
leaq 0x46(%rsp), %rax
pushq %rax
leaq 0x6c(%rsp), %rax
pushq %rax
callq 0xd8aa
addq $0x50, %rsp
movl $0x0, 0x8(%rsp)
movzwl 0x2(%rsp), %eax
movl %eax, %ecx
movq 0x50(%rsp), %r15
jmp 0xdcaa
movl %ebp, %eax
movq %rax, 0x18(%rsp)
movzwl 0x2(%rsp), %eax
movl %eax, %ecx
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
jmp 0xdcaa
movzwl 0x2(%rsp), %eax
movl %eax, %ecx
pushq $0x1
popq %rax
movl %eax, %ebp
cmpl $0x0, 0x8(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x50(%rsp), %r15
jne 0xdcf3
jmp 0xdcaa
leaq 0xba(%rsp), %rdi
leaq 0x41d1c(%rip), %rsi     # 0x4fcd4
pushq $0x3
popq %rdx
callq 0x2200
movzwl 0x2(%rsp), %ecx
testl %eax, %eax
movq 0x50(%rsp), %r15
jne 0xdcaa
movq 0x88(%rsp), %rax
movl $0x1, (%rax)
movzwl 0x2(%rsp), %eax
movl %eax, %ecx
jmp 0xdcaa
movq %rbp, %rdi
leaq 0x41ce2(%rip), %rsi     # 0x4fcd8
pushq $0x6
popq %r15
movq %r15, %rdx
callq 0x2200
testl %eax, %eax
je 0xe0f5
movq %rbp, %rdi
leaq 0x41c18(%rip), %rsi     # 0x4fc2c
movq %r15, %rdx
callq 0x2200
testl %eax, %eax
movq 0x50(%rsp), %r15
je 0xe43f
movq %rbp, %rdi
leaq 0x41cac(%rip), %rsi     # 0x4fcdf
pushq $0x6
popq %rdx
callq 0x2200
movzwl 0x2(%rsp), %ecx
testl %eax, %eax
jne 0xdcaa
movq 0x78(%rsp), %rax
cmpl $0x0, (%rax)
jne 0xe05d
movq 0x78(%rsp), %rax
movl $0x1, (%rax)
movq 0x80(%rsp), %rbx
leaq 0x20(%rbx), %rdx
leaq 0x30(%rbx), %rcx
leaq 0x40(%rbx), %r8
leaq 0x24(%rbx), %r9
leaq 0x28(%rbx), %r10
leaq 0x34(%rbx), %r11
leaq 0xcc(%rsp), %rdi
leaq 0x41c5a(%rip), %rsi     # 0x4fce6
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x21f0
addq $0x10, %rsp
movq %rbx, %rax
xorl %ecx, %ecx
movsd 0x41a70(%rip), %xmm1    # 0x4fb18
pushq $0x8
popq %r8
cmpq $0x3, %rcx
je 0xdfe0
movq %r8, %rdx
movq %r8, %rsi
leaq (%rcx,%rsi), %rdi
cmpq $0xb, %rdi
je 0xe0ec
cvtss2sd (%rax,%rsi,4), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rax,%rsi,4)
cmpq $0x8, %rdx
je 0xe0e3
movss %xmm0, (%rax,%rdx,4)
incq %rsi
addq $0x3, %rdx
jmp 0xe0bc
incq %rcx
addq $0x10, %rax
jmp 0xe0ac
movb 0xbc(%rsp), %al
movq 0x48(%rsp), %rdx
movslq %edx, %rbp
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
leaq 0x56e6a(%rip), %r13     # 0x64f80
leaq (%r13,%rcx), %rsi
movq %rsi, 0xa8(%rsp)
movb %al, (%r13,%rcx)
movb 0xc8(%rsp), %al
leaq 0x5761a(%rip), %rsi     # 0x65750
movb %al, (%rsi,%rcx)
movb 0xbd(%rsp), %al
movb %al, 0x1(%r13,%rcx)
movb 0xc9(%rsp), %al
movb %al, 0x1(%rsi,%rcx)
movb 0xbe(%rsp), %al
movb %al, 0x2(%r13,%rcx)
movb 0xca(%rsp), %al
movb %al, 0x2(%rsi,%rcx)
testl %ebp, %ebp
movl $0x0, %eax
cmovgl %edx, %eax
movl %eax, 0x70(%rsp)
testq %rbp, %rbp
movl $0x0, %eax
cmovleq %rax, %rbp
xorl %ebx, %ebx
movq 0x50(%rsp), %r15
cmpq %rbx, %rbp
je 0xe39e
movq %r13, %rdi
movq 0xa8(%rsp), %rsi
movq %r12, %rdx
callq 0x2070
testl %eax, %eax
je 0xe3a4
incq %rbx
addq $0x5, %r13
jmp 0xe188
movl 0x14(%rsp), %edx
cmpb $0x20, %dl
movzbl %r13b, %eax
movzbl %dl, %edx
cmovel %eax, %edx
movl %ebp, %eax
movq %rax, 0x18(%rsp)
movzwl 0x2(%rsp), %eax
movl %eax, %ecx
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
movl %edx, 0x14(%rsp)
cmpb %dl, %r13b
jne 0xdcaa
movb 0x6(%rsp), %al
movl 0x34(%rsp), %ebx
movl 0x24(%rsp), %ecx
movb 0x5(%rsp), %dl
cmpb %al, %dl
jne 0xe22d
cmpl %ecx, %ebx
setne %cl
cmpb %al, %dl
setne %al
orb %cl, %al
jne 0xe2c5
leaq 0xf(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
pushq $0x3
popq %rdx
callq 0x2070
testl %eax, %eax
jne 0xe2c5
jmp 0xe31d
cmpl %ecx, %ebx
jne 0xe2c5
movw $0x1, %cx
movl %ebp, %eax
movq %rax, 0x18(%rsp)
movl %r13d, %eax
movl %eax, 0x14(%rsp)
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
cmpw $0x0, 0x2(%rsp)
jne 0xdcaa
cvtss2sd 0x64(%rsp), %xmm0
movq 0x40(%rsp), %rax
subsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd 0x60(%rsp), %xmm1
subsd 0x8(%rax), %xmm1
cvtsd2ss %xmm1, %xmm1
cvtss2sd 0x5c(%rsp), %xmm2
subsd 0x10(%rax), %xmm2
cvtsd2ss %xmm2, %xmm2
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
mulss %xmm2, %xmm2
addss %xmm0, %xmm2
movss 0x4186d(%rip), %xmm0    # 0x4fb14
ucomiss %xmm2, %xmm0
movl %ebp, %eax
movq %rax, 0x18(%rsp)
movl %r13d, %eax
movl %eax, 0x14(%rsp)
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
ja 0xdcaa
movsbl %r14b, %eax
movsbl 0x5(%rsp), %r10d
leaq 0x28(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x2c(%rsp), %r9
pushq %rbp
pushq %rax
pushq %r10
pushq %rbx
leaq 0x2f(%rsp), %rax
pushq %rax
pushq 0x70(%rsp)
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x3f(%rsp), %rax
pushq %rax
leaq 0x46(%rsp), %rax
pushq %rax
leaq 0x6c(%rsp), %rax
pushq %rax
callq 0xd8aa
addq $0x50, %rsp
movslq 0x56c54(%rip), %rax     # 0x64f78
imulq $0x70, %rax, %rcx
movq 0xa0(%rsp), %rsi
leaq (%rsi,%rcx), %r12
movzwl 0xc(%rsp), %edx
testw %dx, %dx
movq 0x40(%rsp), %rdi
cmoveq %r12, %rdi
movq %rdi, 0x40(%rsp)
incl %edx
movw %dx, 0xc(%rsp)
incl %eax
movss 0x60(%rsp), %xmm0
movss 0x64(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtps2pd %xmm1, %xmm0
movl %eax, 0x56c0d(%rip)     # 0x64f78
movups %xmm0, (%rsi,%rcx)
cvtss2sd 0x5c(%rsp), %xmm0
movsd %xmm0, 0x10(%rsi,%rcx)
cmpb $0x20, 0xbc(%rsp)
jne 0xe3c3
xorl %eax, %eax
cmpq $0x3, %rax
je 0xe3dc
movb 0xbd(%rsp,%rax), %cl
movb %cl, 0x18(%r12,%rax)
incq %rax
jmp 0xe387
movl 0x70(%rsp), %edx
jmp 0xe3a6
movl %ebx, %edx
xorl %eax, %eax
movq 0x48(%rsp), %rcx
cmpl %ecx, %edx
sete %al
addl %ecx, %eax
movzwl 0x2(%rsp), %ecx
movq %rax, 0x48(%rsp)
jmp 0xdcaa
xorl %eax, %eax
cmpq $0x4, %rax
je 0xe3e2
movb 0xbc(%rsp,%rax), %cl
movb %cl, 0x18(%r12,%rax)
incq %rax
jmp 0xe3c5
movb $0x20, 0x1b(%r12)
leaq 0x44(%r12), %rdx
leaq 0xe8(%rsp), %rdi
leaq 0x4184e(%rip), %rbx     # 0x4fc44
movq %rbx, %rsi
xorl %eax, %eax
callq 0x21f0
leaq 0x1c(%r12), %rdx
leaq 0xec(%rsp), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x21f0
movq %r12, 0x80(%rsp)
andl $0x0, 0x6c(%r12)
movl %ebp, %eax
movq %rax, 0x18(%rsp)
movzwl 0x2(%rsp), %eax
movl %eax, %ecx
movl %r13d, %eax
movl %eax, 0x14(%rsp)
jmp 0xdf74
movl 0x34(%rsp), %eax
leaq 0x28(%rsp), %r14
leaq 0x3c(%rsp), %rsi
leaq 0xc(%rsp), %r8
leaq 0x2c(%rsp), %r9
movq %r14, %rdi
movq 0x68(%rsp), %rdx
movq 0x40(%rsp), %rcx
pushq 0x18(%rsp)
pushq %rbx
pushq %r13
pushq %rax
leaq 0x2f(%rsp), %rax
pushq %rax
pushq 0x70(%rsp)
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x3f(%rsp), %rax
pushq %rax
leaq 0x46(%rsp), %rax
pushq %rax
leaq 0x6c(%rsp), %rax
pushq %rax
callq 0xd8aa
addq $0x50, %rsp
movl (%r14), %ebx
leaq 0x569ef(%rip), %rax     # 0x64e90
movl (%rax), %esi
cmpl %esi, %ebx
jg 0xe514
movq 0x98(%rsp), %rdi
callq 0x20c0
leaq 0x55c3d(%rip), %rax     # 0x640f8
cmpl $0x0, (%rax)
movl 0x74(%rsp), %ebp
je 0xe4d4
leaq 0x4177c(%rip), %rdi     # 0x4fc47
movl %ebx, %esi
xorl %eax, %eax
callq 0x20f0
testl %ebp, %ebp
je 0xe500
leaq 0x418a7(%rip), %rsi     # 0x4fd86
leaq 0x41882(%rip), %rdx     # 0x4fd68
leaq 0x180(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2260
movq %r14, %rdi
callq 0x20e0
movl %ebx, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x417ef(%rip), %rdi     # 0x4fd0a
xorl %eax, %eax
callq 0x20f0
pushq $0x8
popq %rdi
callq 0x2270