// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]optimal-seed-solver/getReference.cc
// Function: main
int main(int argc, const char* argv[]) {
	RefDB refDB;
	if (argc != 2) {
		cerr << "Please also put the reference file name" << endl;
		exit(1);
	}

	refDB.loadRefFile(argv[1]);

	int chromo_number = -1;
	int location;
	int length;

	cout << "Num of chromosomes: " << refDB.getNumOfChromo() << endl;

	while (1) {
		cout << "please input chromo number: " << endl;
		int tempChromoNum;
		cin >> tempChromoNum;
		if (tempChromoNum != chromo_number) {
			chromo_number = tempChromoNum;
			refDB.loadChromo(chromo_number);
		}

		cout << "please input location: " << endl;
		cin >> location;
		cout << "please input length: " << endl;
		cin >> length;

		cout << refDB.getRefSeq(location, length) << endl;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x50(%rsp), %rdi
callq 0x27d4
cmpl $0x2, %ebp
jne 0x2658
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x2700
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2896
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24a2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x3b1f(%rip), %rdi      # 0x5fc8
leaq 0x1b7c(%rip), %rsi      # 0x402c
movl $0x14, %edx
callq 0x2200
leaq 0x50(%rsp), %rdi
callq 0x2ece
movl %eax, %esi
movq 0x3afb(%rip), %rbx      # 0x5fc8
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20d0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x3aee(%rip), %r15      # 0x5fd8
leaq 0x10(%rsp), %r13
leaq 0x50(%rsp), %rbp
movl $0x1c, %edx
movq %rbx, %rdi
leaq 0x1b3e(%rip), %rsi      # 0x4041
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x2100
movl 0x4(%rsp), %r14d
cmpl %r12d, %r14d
je 0x2554
movq %rbp, %rdi
movl %r14d, %esi
callq 0x2c76
movl %r14d, %r12d
movl $0x17, %edx
movq %rbx, %rdi
leaq 0x1afb(%rip), %rsi      # 0x405e
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x2100
movl $0x15, %edx
movq %rbx, %rdi
leaq 0x1acb(%rip), %rsi      # 0x4076
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2100
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2f0c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x2200
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x24f4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x24f4
movq 0x3991(%rip), %rbx      # 0x5ff0
leaq 0x199e(%rip), %rsi      # 0x4004
movl $0x27, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x395f(%rip), %rdi      # 0x5ff0
callq 0x2030
movq %rax, %rdi
callq 0x2130
movl $0x1, %edi
callq 0x2220
jmp 0x26eb
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x26ee
movq 0x20(%rsp), %rsi
jmp 0x26df
jmp 0x26eb
jmp 0x26eb
jmp 0x26eb
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26ee
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x26ee
jmp 0x26eb
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2832
movq %rbx, %rdi
callq 0x22a0