// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: load_PDB_allocate_memory(char*, char*)
void load_PDB_allocate_memory(char *xname, char *yname)
{    
    //------get length first------>
	xlen=get_PDB_len(xname);
	ylen=get_PDB_len(yname);
	minlen=min(xlen, ylen);

    //------allocate memory for x and y------>
	NewArray(&xa, xlen, 3);
    seqx   = new char[xlen+1];
	secx   = new int[xlen];
	xresno = new int[xlen];

	NewArray(&ya, ylen, 3);
	seqy    = new char[ylen+1];
	yresno  = new int[ylen];
	secy    = new int[ylen];

    
    
    //------load data------>  
    read_PDB(xname, xa, seqx, xresno);
    read_PDB(yname, ya, seqy, yresno);
    
    
    //------allocate memory for other temporary varialbes------>
 	NewArray(&r1, minlen, 3);
	NewArray(&r2, minlen, 3);
	NewArray(&xtm, minlen, 3);
	NewArray(&ytm, minlen, 3);
	NewArray(&xt, xlen, 3);

	NewArray(&score, xlen+1, ylen+1);
	NewArray(&path, xlen+1, ylen+1);
	NewArray(&val, xlen+1, ylen+1);  	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x404b21
movl %eax, 0x1fbb0b(%rip)    # 0x6025b0
movq %r14, %rdi
callq 0x404b21
movl %eax, 0x1fbb01(%rip)    # 0x6025b4
movl 0x1fbaf7(%rip), %esi    # 0x6025b0
cmpl %esi, %eax
cmovgel %esi, %eax
movl %eax, 0x1fbaf4(%rip)    # 0x6025b8
leaq 0x1fbaf5(%rip), %rdi    # 0x6025c0
pushq $0x3
popq %rbx
movl %ebx, %edx
callq 0x40af05
movslq 0x1fbad4(%rip), %r13    # 0x6025b0
leaq 0x1(%r13), %rdi
callq 0x40be00
leaq (,%r13,4), %r12
testq %r13, %r13
movq %rax, 0x1fbb01(%rip)    # 0x6025f8
pushq $-0x1
popq %r13
cmovsq %r13, %r12
movq %r12, %rdi
callq 0x40be00
movq %rax, 0x1fbafa(%rip)    # 0x602608
movq %r12, %rdi
callq 0x40be00
movq %rax, 0x1fbab3(%rip)    # 0x6025d0
movl 0x1fba91(%rip), %esi    # 0x6025b4
leaq 0x1fba9e(%rip), %rdi    # 0x6025c8
movl %ebx, %edx
callq 0x40af05
movslq 0x1fba7c(%rip), %rbp    # 0x6025b4
leaq 0x1(%rbp), %rdi
callq 0x40be00
leaq (,%rbp,4), %r12
testq %rbp, %rbp
movq %rax, 0x1fbaad(%rip)    # 0x602600
cmovsq %r13, %r12
movq %r12, %rdi
callq 0x40be00
movq %rax, 0x1fba72(%rip)    # 0x6025d8
movq %r12, %rdi
callq 0x40be00
movq %rax, 0x1fba9b(%rip)    # 0x602610
movq 0x1fba44(%rip), %rsi    # 0x6025c0
movq 0x1fba75(%rip), %rdx    # 0x6025f8
movq 0x1fba46(%rip), %rcx    # 0x6025d0
movq %r15, %rdi
callq 0x404d03
movq 0x1fba2f(%rip), %rsi    # 0x6025c8
movq 0x1fba60(%rip), %rdx    # 0x602600
movq 0x1fba31(%rip), %rcx    # 0x6025d8
movq %r14, %rdi
callq 0x404d03
movl 0x1fba03(%rip), %esi    # 0x6025b8
leaq 0x1fba5c(%rip), %rdi    # 0x602618
movl %ebx, %edx
callq 0x40af05
movl 0x1fb9ef(%rip), %esi    # 0x6025b8
leaq 0x1fba50(%rip), %rdi    # 0x602620
movl %ebx, %edx
callq 0x40af05
movl 0x1fb9db(%rip), %esi    # 0x6025b8
leaq 0x1fb9fc(%rip), %rdi    # 0x6025e0
movl %ebx, %edx
callq 0x40af05
movl 0x1fb9c7(%rip), %esi    # 0x6025b8
leaq 0x1fb9f0(%rip), %rdi    # 0x6025e8
movl %ebx, %edx
callq 0x40af05
movl 0x1fb9ab(%rip), %esi    # 0x6025b0
leaq 0x1fb9e4(%rip), %rdi    # 0x6025f0
movl %ebx, %edx
callq 0x40af05
movl 0x1fb997(%rip), %esi    # 0x6025b0
incl %esi
movl 0x1fb993(%rip), %edx    # 0x6025b4
incl %edx
leaq 0x1fb96e(%rip), %rdi    # 0x602598
callq 0x40af05
movl 0x1fb97b(%rip), %esi    # 0x6025b0
incl %esi
movl 0x1fb977(%rip), %edx    # 0x6025b4
incl %edx
leaq 0x1fb95a(%rip), %rdi    # 0x6025a0
callq 0x40af6b
movl 0x1fb95f(%rip), %esi    # 0x6025b0
incl %esi
movl 0x1fb95b(%rip), %edx    # 0x6025b4
incl %edx
leaq 0x1fb946(%rip), %rdi    # 0x6025a8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x40af05