// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]Register-Interval/./src/implementation/RegisterIntervalCreation.cpp
// Function: RegisterIntervalCreationPass::registerIntervalCreationPassOne(std::vector<basicBlock*, std::allocator<basicBlock*>>, int)
vector<registerInterval*> RegisterIntervalCreationPass::registerIntervalCreationPassOne(vector<basicBlock*> BB_vector, int N){ //N is the maximum number of registers allowed in a register-interval 
        basic_blocks = BB_vector;
    
        /* Initialization */
	for (auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
		(*b)->clear_input_list();
		(*b)->set_registerInterval(nullptr);
	}

	RegisterIntervals.clear();
	for(auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
		auto Predecessors = (*b)->get_predecessors();
		if(Predecessors.size() == 0){ // each basic block with no predecessors is assumed as an entry basicBlock
			auto temp = new registerInterval();
			RegisterIntervals.push_back(temp);
			(*b)->set_registerInterval(temp);
			WS.push(*b);// The entry basic block is added to the working set of registerInterval creation algorithm
		}
	}

	while (!WS.empty()){
		auto BB = WS.front(); //Get one basic blocks from working set
		WS.pop();
		auto i = BB->RegisterInterval(); //Get the register-interval that this basic block belongs to
		traverse(BB, N); //Traversing the basic block and splitting it if it has more than the allowed number of registers
		if (BB->numberOfRegisters() < N){
                        //In this loop we will add all eligible basic blocks to the current registerInterval (i)
			for (auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
				set<string> Union;//The set that will contain the union of register sets of all basic blocks of i
                                Union.clear();
				bool C = true;//This boolean determines that the basicBlock is reachable only from the current register-interval (in other words, its all predecessors should belong to the current register-interval)

				visit_all_predecessors(*b);//marks all basic blocks that can reach this basic block

				Union = (*b)->get_output_list();
                                //This loop will add all registers of marked basic blocks that belong to the current register-interval (i)
				for(auto bb = basic_blocks.begin(); bb != basic_blocks.end(); bb++){
					if(mark[(*bb)->getID()]){
						if((*bb)->RegisterInterval() == i){
							auto s = (*bb)->get_output_list();
							for (auto it = s.begin(); it != s.end(); it++){
								Union.insert(*it);
							}
						}
					}
				}
		
				//This loop determines the boolean value of C
				auto P = (*b)->get_predecessors();
                                for(auto p = P.begin(); p != P.end(); p++){
                                        if((*p)->RegisterInterval() != i)
                                                C = false;
                                }

				//If this basic block is eligible, it will be added to the current register-interval
				if ((*b)->RegisterInterval() == nullptr //the basic block should not belong to another register-interval
                                        && C  //All predecessors of the basic block should belong to the current register-interval
                                        && Union.size() < N //The union of all registers of the basic block and current register-interval should not be more than the allowed number
                                        )
                                {
					(*b)->set_registerInterval(i);
					(*b)->set_input_list(Union);
					traverse((*b), N);
				}
			}
		}
                //At this point no more basic blocks can be added to the current register-interval

                set<basicBlock*> Successors; //Successors will contain all successors of the current register-interval (i)
		Successors.clear();
                
                //This loop will add all successors of the current registerInterval to Successors set
		for (auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
			if ((*b)->RegisterInterval() == i){
				auto S = (*b)->get_successors();
				for (auto s = S.begin(); s != S.end(); s++){
					if ((*s)->RegisterInterval() != i)
						Successors.insert(*s);
				}
			}
		}
                
                //This loop will assign new register-intervals to the successors of the current register-interval
		set<basicBlock*>::iterator it2;
		for (auto s = Successors.begin(); s != Successors.end(); s++){
			if ((*s)->RegisterInterval() == nullptr){
				auto temp = new registerInterval();
				RegisterIntervals.push_back(temp);
				(*s)->set_registerInterval(temp);
				(*s)->clear_input_list();
				WS.push(*s);
			}
		}
	}
        
        /*At this point all register-interval are created
         *      and the rest of the function just sets the register list of register-intervals
         *      and forms the new CFG that its nodes are register-intervals*/

        //This loop will set the register list of all register-intervals
	for (auto i = RegisterIntervals.begin(); i != RegisterIntervals.end(); i++){
                set<string> regList;//the register list of register-interval
		regList.clear();
		for (auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
			if ((*b)->RegisterInterval() == *i){
				auto s = (*b)->get_output_list();
				for (auto it = s.begin(); it != s.end(); it++){
					regList.insert(*it);
				}
			}
		}
		(*i)->set_register_list(regList);
	}

	//This loop sets the series of instructions of all register-intervals
	string code;
	for (auto i = RegisterIntervals.begin(); i != RegisterIntervals.end(); i++){
		code = "";
		for (auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
			if ((*b)->RegisterInterval() == *i){
				code = code + (*b)->get_code();
			}
		}
		(*i)->set_code(code);
	}

	//This loop sets the predecessors and successors of all register-intervals
	for (auto i = RegisterIntervals.begin(); i != RegisterIntervals.end(); i++){
		for (auto b = basic_blocks.begin(); b != basic_blocks.end(); b++){
			if ((*b)->RegisterInterval() == *i){
				auto P = (*b)->get_predecessors();
				for (auto p = P.begin(); p != P.end(); p++){
					if ((*p)->RegisterInterval() != *i)
						(*i)->add_predecessor((*p)->RegisterInterval());
				}
                                
                                auto S = (*b)->get_successors();
				for (auto s = S.begin(); s != S.end(); s++){
					if ((*s)->RegisterInterval() != *i)
						(*i)->add_successors((*s)->RegisterInterval());
				}
			}
		}
	}
        
        return RegisterIntervals;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %edx, -0x8c(%rbp)
movq %rdi, -0xc0(%rbp)
leaq 0xc01e(%rip), %rdi      # 0xf210
callq 0x8d6a
movq 0xc012(%rip), %rbx      # 0xf210
cmpq 0xc013(%rip), %rbx      # 0xf218
je 0x3233
movl $0x90, %r14d
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x9512
movq (%rbx), %rax
movq $0x0, 0xf0(%rax)
addq $0x8, %rbx
cmpq 0xbfe7(%rip), %rbx      # 0xf218
jne 0x320d
movq 0xbfee(%rip), %rax      # 0xf228
cmpq %rax, 0xbfef(%rip)      # 0xf230
je 0x324a
movq %rax, 0xbfe6(%rip)      # 0xf230
movq 0xbfbf(%rip), %rbx      # 0xf210
cmpq 0xbfc0(%rip), %rbx      # 0xf218
je 0x33a1
leaq -0x88(%rbp), %r15
xorl %r14d, %r14d
leaq -0x58(%rbp), %r13
leaq 0xbfcd(%rip), %r12      # 0xf240
movq (%rbx), %rsi
addq $0x60, %rsi
movq %r15, %rdi
callq 0x8e42
movq -0x80(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x337f
movl $0xc0, %edi
callq 0x21e0
movq %r14, 0x8(%rax)
movl %r14d, 0x10(%rax)
movq %r14, 0x18(%rax)
movl %r14d, 0x20(%rax)
movq %r14, 0x28(%rax)
leaq 0x48(%rax), %rcx
movq %rcx, 0x38(%rax)
movq %r14, 0x40(%rax)
movb $0x0, 0x48(%rax)
movq %rax, %rcx
addq $0x68, %rcx
movl %r14d, 0x68(%rax)
movq %r14, 0x70(%rax)
movq %rcx, 0x78(%rax)
movq %rcx, 0x80(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rax)
movups %xmm0, 0x98(%rax)
movups %xmm0, 0xa8(%rax)
movq %r14, 0xb8(%rax)
movl 0xbf04(%rip), %ecx      # 0xf204
leal 0x1(%rcx), %edx
movl %edx, 0xbefb(%rip)      # 0xf204
movl %ecx, (%rax)
movl %r14d, 0x58(%rax)
movq %rax, -0x58(%rbp)
movq 0xbf16(%rip), %rsi      # 0xf230
cmpq 0xbf17(%rip), %rsi      # 0xf238
je 0x3330
movq %rax, (%rsi)
addq $0x8, 0xbf02(%rip)      # 0xf230
jmp 0x333f
leaq 0xbef1(%rip), %rdi      # 0xf228
movq %r13, %rdx
callq 0x9bb6
movq (%rbx), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0xf0(%rax)
movq 0xbf1c(%rip), %rax      # 0xf270
movq 0xbf25(%rip), %rcx      # 0xf280
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3374
movq (%rbx), %rcx
movq %rcx, (%rax)
addq $0x8, 0xbefe(%rip)      # 0xf270
jmp 0x337f
movq %r12, %rdi
movq %rbx, %rsi
callq 0xa116
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x3390
callq 0x21c0
addq $0x8, %rbx
cmpq 0xbe7d(%rip), %rbx      # 0xf218
jne 0x3273
movq 0xbea8(%rip), %rax      # 0xf250
cmpq %rax, 0xbec1(%rip)      # 0xf270
je 0x384f
leaq -0x50(%rbp), %r13
movslq -0x8c(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
leaq -0x88(%rbp), %r12
movq (%rax), %r15
leaq 0xbe68(%rip), %rdi      # 0xf240
callq 0xa320
movq 0xf0(%r15), %rbx
movq %r15, %rdi
movl -0x8c(%rbp), %r14d
movl %r14d, %esi
callq 0x3d26
cmpl %r14d, 0xe8(%r15)
leaq -0x80(%rbp), %r14
movl $0x0, %r15d
jge 0x3673
movq 0xbdfc(%rip), %rax      # 0xf210
cmpq 0xbdfd(%rip), %rax      # 0xf218
je 0x3673
movl $0x0, -0x80(%rbp)
movq %r15, -0x78(%rbp)
movq %r14, -0x70(%rbp)
movq %r14, -0x68(%rbp)
movq %r15, -0x60(%rbp)
movq %rax, %r14
movq %r12, %rdi
callq 0x9512
movq (%r14), %rdi
callq 0x4944
movq %r14, -0x98(%rbp)
movq (%r14), %rsi
movl $0xc0, %eax
addq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x8fd0
movq %r12, %rdi
callq 0x9512
movq -0x48(%rbp), %rax
testq %rax, %rax
je 0x34a9
movl -0x50(%rbp), %ecx
movl %ecx, -0x80(%rbp)
movq %rax, -0x78(%rbp)
movups -0x40(%rbp), %xmm0
movups %xmm0, -0x70(%rbp)
leaq -0x80(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %r15, -0x48(%rbp)
movq %r13, -0x40(%rbp)
movq %r13, -0x38(%rbp)
movq %r15, -0x30(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x8f66
movq 0xbd57(%rip), %r14      # 0xf210
cmpq 0xbd58(%rip), %r14      # 0xf218
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
je 0x3574
movq (%r14), %rax
movslq (%rax), %rcx
leaq 0x3f(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
shlq $0x3, %rdx
addq 0xbda0(%rip), %rdx      # 0xf290
leaq 0x3f(%r8), %rsi
andq %rcx, %rsi
xorl %edi, %edi
cmpq %r8, %rsi
setbe %dil
movq -0x8(%rdx,%rdi,8), %rdx
btq %rcx, %rdx
jae 0x3563
cmpq %rbx, 0xf0(%rax)
jne 0x3563
movq (%r14), %rsi
movl $0xc0, %eax
addq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x8fd0
movq -0x40(%rbp), %r15
cmpq %r13, %r15
je 0x354d
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x9cf0
movq %r15, %rdi
callq 0x2240
movq %rax, %r15
cmpq %r13, %rax
jne 0x3531
leaq -0x58(%rbp), %rdi
callq 0x8f66
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
xorl %r15d, %r15d
addq $0x8, %r14
cmpq 0xbcaa(%rip), %r14      # 0xf218
jne 0x34d0
movq -0x98(%rbp), %rax
movq (%rax), %rsi
addq $0x60, %rsi
leaq -0x58(%rbp), %rdi
callq 0x8e42
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rdx
movb $0x1, %al
leaq -0x80(%rbp), %r14
cmpq %rdx, %rcx
je 0x35c1
movq -0x98(%rbp), %rdi
movq (%rcx), %rsi
cmpq %rbx, 0xf0(%rsi)
movzbl %al, %eax
cmovnel %r15d, %eax
addq $0x8, %rcx
cmpq %rdx, %rcx
jne 0x35a5
jmp 0x35c8
movq -0x98(%rbp), %rdi
movq (%rdi), %rcx
cmpq $0x0, 0xf0(%rcx)
jne 0x363f
movq -0xc8(%rbp), %rdx
cmpq %rdx, -0x60(%rbp)
setb %dl
andb %dl, %al
cmpb $0x1, %al
jne 0x363f
movq %rbx, 0xf0(%rcx)
movq -0x98(%rbp), %rax
movq (%rax), %r15
leaq -0x118(%rbp), %rdi
movq %r12, %rsi
callq 0x8fd0
addq $0x90, %r15
movq %r15, %rdi
leaq -0x118(%rbp), %r15
movq %r15, %rsi
callq 0x91ea
movq %r15, %rdi
callq 0x8f66
movq -0x98(%rbp), %rax
movq (%rax), %rdi
movl -0x8c(%rbp), %esi
callq 0x3d26
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x364d
callq 0x21c0
movq %r12, %rdi
callq 0x8f66
movq -0x98(%rbp), %rax
addq $0x8, %rax
cmpq 0xbbb1(%rip), %rax      # 0xf218
movl $0x0, %r15d
jne 0x3421
movl $0x0, -0x80(%rbp)
movq %r15, -0x78(%rbp)
movq %r14, -0x70(%rbp)
movq %r14, -0x68(%rbp)
movq %r15, -0x60(%rbp)
movq %r12, %rdi
callq 0xa374
movq 0xbb77(%rip), %r14      # 0xf210
cmpq 0xbb78(%rip), %r14      # 0xf218
je 0x36f9
movq (%r14), %rax
cmpq %rbx, 0xf0(%rax)
jne 0x36f3
movq (%r14), %rsi
addq $0x78, %rsi
leaq -0x58(%rbp), %rdi
callq 0x8e42
movq -0x58(%rbp), %r15
cmpq -0x50(%rbp), %r15
je 0x36e5
movq (%r15), %rax
cmpq %rbx, 0xf0(%rax)
je 0x36df
movq %r12, %rdi
movq %r15, %rsi
callq 0xa3ac
addq $0x8, %r15
jmp 0x36c2
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x36f3
callq 0x21c0
addq $0x8, %r14
jmp 0x3699
movq -0x70(%rbp), %r15
leaq -0x80(%rbp), %r14
cmpq %r14, %r15
je 0x3833
movq 0x20(%r15), %rax
cmpq $0x0, 0xf0(%rax)
jne 0x381f
movl $0xc0, %edi
callq 0x21e0
xorl %esi, %esi
movq %rsi, 0x8(%rax)
movl %esi, 0x10(%rax)
movq %rsi, 0x18(%rax)
movl %esi, 0x20(%rax)
movq %rsi, 0x28(%rax)
leaq 0x48(%rax), %rcx
movq %rcx, 0x38(%rax)
movq %rsi, 0x40(%rax)
movb $0x0, 0x48(%rax)
movq %rax, %rcx
addq $0x68, %rcx
movl %esi, 0x68(%rax)
movq %rsi, 0x70(%rax)
movq %rcx, 0x78(%rax)
movq %rcx, 0x80(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rax)
movups %xmm0, 0x98(%rax)
movups %xmm0, 0xa8(%rax)
movq %rsi, 0xb8(%rax)
movl 0xba7c(%rip), %ecx      # 0xf204
leal 0x1(%rcx), %edx
movl %edx, 0xba73(%rip)      # 0xf204
movl %ecx, (%rax)
movl %esi, 0x58(%rax)
movq %rax, -0x58(%rbp)
movq 0xba8f(%rip), %rsi      # 0xf230
cmpq 0xba90(%rip), %rsi      # 0xf238
je 0x37b7
movq %rax, (%rsi)
addq $0x8, 0xba7b(%rip)      # 0xf230
jmp 0x37c7
leaq 0xba6a(%rip), %rdi      # 0xf228
leaq -0x58(%rbp), %rdx
callq 0x9bb6
leaq 0x20(%r15), %rbx
movq (%rbx), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0xf0(%rax)
movq (%rbx), %rdi
movl $0x90, %eax
addq %rax, %rdi
callq 0x9512
movq 0xba80(%rip), %rax      # 0xf270
movq 0xba89(%rip), %rcx      # 0xf280
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3810
movq (%rbx), %rcx
movq %rcx, (%rax)
addq $0x8, 0xba62(%rip)      # 0xf270
jmp 0x381f
leaq 0xba29(%rip), %rdi      # 0xf240
movq %rbx, %rsi
callq 0xa116
movq %r15, %rdi
callq 0x2240
movq %rax, %r15
cmpq %r14, %rax
jne 0x370a
movq %r12, %rdi
callq 0x954a
movq 0xba0e(%rip), %rax      # 0xf250
cmpq %rax, 0xba27(%rip)      # 0xf270
jne 0x33ce
movq 0xb9d2(%rip), %r13      # 0xf228
cmpq 0xb9d3(%rip), %r13      # 0xf230
je 0x393e
leaq -0x50(%rbp), %r14
leaq -0x88(%rbp), %rbx
movl $0x0, -0x80(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x78(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rax, -0x68(%rbp)
movq %rcx, -0x60(%rbp)
movq %rbx, %rdi
callq 0x9512
movq 0xb976(%rip), %r15      # 0xf210
cmpq 0xb977(%rip), %r15      # 0xf218
je 0x38fc
movq (%r15), %rax
movq 0xf0(%rax), %rax
cmpq (%r13), %rax
jne 0x38f6
movq (%r15), %rsi
movl $0xc0, %eax
addq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x8fd0
movq -0x40(%rbp), %r12
cmpq %r14, %r12
je 0x38ed
leaq 0x20(%r12), %rsi
movq %rbx, %rdi
callq 0x9cf0
movq %r12, %rdi
callq 0x2240
movq %rax, %r12
cmpq %r14, %rax
jne 0x38d0
leaq -0x58(%rbp), %rdi
callq 0x8f66
addq $0x8, %r15
jmp 0x389a
movq (%r13), %r12
leaq -0x148(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8fd0
movq %r12, %rdi
movq %r15, %rsi
callq 0x2828
movq %r15, %rdi
callq 0x8f66
movq %rbx, %rdi
callq 0x8f66
addq $0x8, %r13
cmpq 0xb8f8(%rip), %r13      # 0xf230
jne 0x386e
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xb8d0(%rip), %r13      # 0xf228
cmpq 0xb8d1(%rip), %r13      # 0xf230
je 0x3ac9
leaq -0xa8(%rbp), %r15
leaq -0x48(%rbp), %r14
leaq -0xb8(%rbp), %r12
movq -0x80(%rbp), %rdx
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
leaq 0x772b(%rip), %rcx      # 0xb0b6
xorl %r8d, %r8d
callq 0x2300
movq 0xb876(%rip), %rbx      # 0xf210
cmpq 0xb877(%rip), %rbx      # 0xf218
je 0x3a65
movq (%rbx), %rax
movq 0xf0(%rax), %rax
cmpq (%r13), %rax
jne 0x3a5c
movq (%rbx), %rax
movq %r15, -0xb8(%rbp)
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x96ba
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
movq %r14, -0x58(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3a0f
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x3a16
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x88(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2270
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x3a4b
callq 0x21c0
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x3a5c
callq 0x21c0
addq $0x8, %rbx
jmp 0x399a
movq (%r13), %rbx
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x96ba
movq %rbx, %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2754
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x3ab8
callq 0x21c0
addq $0x8, %r13
cmpq 0xb76d(%rip), %r13      # 0xf230
jne 0x3977
movq 0xb758(%rip), %r15      # 0xf228
cmpq 0xb759(%rip), %r15      # 0xf230
je 0x3bbf
leaq -0x58(%rbp), %rbx
leaq -0xb8(%rbp), %r14
movq 0xb721(%rip), %r12      # 0xf210
cmpq 0xb722(%rip), %r12      # 0xf218
je 0x3bae
movq (%r12), %rax
movq 0xf0(%rax), %rax
cmpq (%r15), %rax
jne 0x3ba5
movq (%r12), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x8e42
movq -0x58(%rbp), %r13
cmpq -0x50(%rbp), %r13
je 0x3b48
movq (%r13), %rax
movq 0xf0(%rax), %rsi
movq (%r15), %rdi
cmpq %rdi, %rsi
je 0x3b42
callq 0x29d6
addq $0x8, %r13
jmp 0x3b24
movq (%r12), %rsi
addq $0x78, %rsi
movq %r14, %rdi
callq 0x8e42
movq -0xb8(%rbp), %r13
cmpq -0xb0(%rbp), %r13
je 0x3b86
movq (%r13), %rax
movq 0xf0(%rax), %rsi
movq (%r15), %rdi
cmpq %rdi, %rsi
je 0x3b80
callq 0x2a5e
addq $0x8, %r13
jmp 0x3b5f
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x3b97
callq 0x21c0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3ba5
callq 0x21c0
addq $0x8, %r12
jmp 0x3aef
addq $0x8, %r15
cmpq 0xb677(%rip), %r15      # 0xf230
jne 0x3ae8
leaq 0xb662(%rip), %rsi      # 0xf228
movq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x8cd6
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3bea
callq 0x21c0
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c92
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
jne 0x3cfd
jmp 0x3d1e
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
jmp 0x3d0d
jmp 0x3ca2
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
jne 0x3ce8
jmp 0x3ced
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x8f66
jmp 0x3c62
jmp 0x3c92
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3d12
callq 0x21c0
jmp 0x3d12
jmp 0x3c9d
jmp 0x3cdc
jmp 0x3c92
jmp 0x3ca2
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x3ce8
jmp 0x3ced
movq %rax, %rbx
jmp 0x3ced
jmp 0x3ca2
jmp 0x3ca2
jmp 0x3ca2
movq %rax, %rbx
jmp 0x3cb8
movq %rax, %rbx
jmp 0x3d12
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3cb8
callq 0x21c0
leaq -0x88(%rbp), %rdi
callq 0x954a
jmp 0x3d1e
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x3cdf
callq 0x21c0
jmp 0x3cdf
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3ced
callq 0x21c0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3d1e
callq 0x21c0
jmp 0x3d1e
jmp 0x3d06
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x8f66
leaq -0x88(%rbp), %rdi
callq 0x8f66
movq %rbx, %rdi
callq 0x2370