// File: /workspace/github_c_makefile_star2_O0/asford[P]tmalign/./basic_fun.h
// Function: read_PDB(char*, double**, char*, int*)
int read_PDB(char *filename, double **a, char *seq, int *resno)
{
    int i=0;
    string line, str;    
    string atom ("ATOM "); 
    
    
    ifstream fin (filename);
    if (fin.is_open())
    {
        while ( fin.good() )
        {
            getline(fin, line);
            if(line.compare(0, atom.length(), atom)==0)
            {
                if( line.compare(12, 4, "CA  ")==0 ||\
                    line.compare(12, 4, " CA ")==0 ||\
                    line.compare(12, 4, "  CA")==0 )
                {
                    if( line.compare(16, 1, " ")==0 ||\
                        line.compare(16, 1, "A")==0 )
                    {  
                        get_xyz(line, &a[i][0], &a[i][1], &a[i][2], &seq[i], &resno[i]);
                        i++;
                    }
                }                  
            }            
        }
        fin.close();
    }
    else
    {
		char message[5000];
		sprintf(message, "Can not open file: %s\n", filename);
        PrintErrorAndQuit(message);
    } 
    seq[i]='\0';   
    
    return i;
}

// Assembly:
subq $0x1698, %rsp           # imm = 0x1698
movq %rdi, 0x1690(%rsp)
movq %rsi, 0x1688(%rsp)
movq %rdx, 0x1680(%rsp)
movq %rcx, 0x1678(%rsp)
movl $0x0, 0x1674(%rsp)
leaq 0x1650(%rsp), %rdi
callq 0x480130
leaq 0x1630(%rsp), %rdi
callq 0x480130
leaq 0x160f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x411ca0
movq 0x38(%rsp), %rdx
leaq 0x186e2a(%rip), %rsi    # 0x58c1d4
leaq 0x1610(%rsp), %rdi
callq 0x410690
jmp 0x4053b9
leaq 0x160f(%rsp), %rdi
callq 0x411cc0
movq 0x1690(%rsp), %rsi
leaq 0x13f0(%rsp), %rdi
movl $0x8, %edx
callq 0x456700
jmp 0x4053e2
leaq 0x13f0(%rsp), %rdi
callq 0x4528b0
movb %al, 0x37(%rsp)
jmp 0x4053f5
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x405402
jmp 0x405685
jmp 0x405404
movq 0x13f0(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x13f0(%rsp,%rax), %rdi
callq 0x45a830
movb %al, 0x36(%rsp)
jmp 0x405423
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0x405430
jmp 0x405674
leaq 0x13f0(%rsp), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x482c80
jmp 0x405447
leaq 0x1610(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x480470
movq 0x28(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x1650(%rsp), %rdi
callq 0x482300
movl %eax, 0x30(%rsp)
jmp 0x405478
movl 0x30(%rsp), %eax
cmpl $0x0, %eax
jne 0x40566f
leaq 0x186d4e(%rip), %rcx    # 0x58c1da
leaq 0x1650(%rsp), %rdi
movl $0xc, %esi
movl $0x4, %edx
callq 0x4824c0
movl %eax, 0x24(%rsp)
jmp 0x4054a9
movl 0x24(%rsp), %eax
cmpl $0x0, %eax
je 0x405510
leaq 0x186d26(%rip), %rcx    # 0x58c1df
leaq 0x1650(%rsp), %rdi
movl $0xc, %esi
movl $0x4, %edx
callq 0x4824c0
movl %eax, 0x20(%rsp)
jmp 0x4054d6
movl 0x20(%rsp), %eax
cmpl $0x0, %eax
je 0x405510
leaq 0x186cfe(%rip), %rcx    # 0x58c1e4
leaq 0x1650(%rsp), %rdi
movl $0xc, %esi
movl $0x4, %edx
callq 0x4824c0
movl %eax, 0x1c(%rsp)
jmp 0x405503
movl 0x1c(%rsp), %eax
cmpl $0x0, %eax
jne 0x40566d
leaq 0x187b5c(%rip), %rcx    # 0x58d073
leaq 0x1650(%rsp), %rdi
movl $0x10, %esi
movl $0x1, %edx
callq 0x4824c0
movl %eax, 0x18(%rsp)
jmp 0x405534
movl 0x18(%rsp), %eax
cmpl $0x0, %eax
je 0x40556e
leaq 0x18793c(%rip), %rcx    # 0x58ce80
leaq 0x1650(%rsp), %rdi
movl $0x10, %esi
movl $0x1, %edx
callq 0x4824c0
movl %eax, 0x14(%rsp)
jmp 0x405561
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jne 0x40566b
leaq 0x13d0(%rsp), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x4829d0
jmp 0x405585
movq 0x1688(%rsp), %rax
movslq 0x1674(%rsp), %rdi
movq (%rax,%rdi,8), %rsi
movq %rsi, %rdx
addq $0x8, %rdx
movq %rsi, %rcx
addq $0x10, %rcx
movq 0x1680(%rsp), %r8
addq %rdi, %r8
movq 0x1678(%rsp), %rax
leaq (%rax,%rdi,4), %r9
leaq 0x13d0(%rsp), %rdi
callq 0x404d70
jmp 0x4055cd
leaq 0x13d0(%rsp), %rdi
callq 0x480240
movl 0x1674(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1674(%rsp)
jmp 0x40566b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1600(%rsp)
movl %eax, 0x15fc(%rsp)
leaq 0x160f(%rsp), %rdi
callq 0x411cc0
jmp 0x40572c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1600(%rsp)
movl %eax, 0x15fc(%rsp)
jmp 0x40571f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1600(%rsp)
movl %eax, 0x15fc(%rsp)
jmp 0x405712
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1600(%rsp)
movl %eax, 0x15fc(%rsp)
leaq 0x13d0(%rsp), %rdi
callq 0x480240
jmp 0x405712
jmp 0x40566d
jmp 0x40566f
jmp 0x405404
leaq 0x13f0(%rsp), %rdi
callq 0x456cb0
jmp 0x405683
jmp 0x4056b3
movq 0x1690(%rsp), %rdx
leaq 0x186b55(%rip), %rsi    # 0x58c1e9
xorl %eax, %eax
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4e1e10
movq 0x8(%rsp), %rdi
callq 0x404740
jmp 0x4056b1
jmp 0x4056b3
movq 0x1680(%rsp), %rax
movslq 0x1674(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movl 0x1674(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x13f0(%rsp), %rdi
callq 0x457060
leaq 0x1610(%rsp), %rdi
callq 0x480240
leaq 0x1630(%rsp), %rdi
callq 0x480240
leaq 0x1650(%rsp), %rdi
callq 0x480240
movl 0x4(%rsp), %eax
addq $0x1698, %rsp           # imm = 0x1698
retq
leaq 0x13f0(%rsp), %rdi
callq 0x457060
leaq 0x1610(%rsp), %rdi
callq 0x480240
leaq 0x1630(%rsp), %rdi
callq 0x480240
leaq 0x1650(%rsp), %rdi
callq 0x480240
movq 0x1600(%rsp), %rdi
callq 0x4bafd0
nopw %cs:(%rax,%rax)