// File: /workspace/github_cpp_makefile_star2_O1/martinferianc[P]CPUSimulator-EIE2/src/mips_cpu_execute.cpp
// Function: mips_execute_R_X(mips_cpu_impl*, unsigned int&, unsigned int&, unsigned int const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int&, unsigned int&)
mips_error mips_execute_R_X(mips_cpu_h state, uint32_t& hi, uint32_t& lo, const uint32_t* instruction_data, const string& op, string& instruction, uint32_t& pcN, uint32_t& pc){

	stringstream ss;

	mips_error err = mips_ExceptionInvalidInstruction;;
	uint32_t* source1 = new uint32_t;
	uint32_t* source2 = new uint32_t;
	uint32_t destination = instruction_data[3];
	uint32_t shift = instruction_data[4];

	err = mips_cpu_get_register(state, (unsigned)instruction_data[1], source1);
	if (err==mips_Success)
		err = mips_cpu_get_register(state, (unsigned)instruction_data[2], source2);
	if (err!=mips_Success)
		return mips_ExceptionAccessViolation;

	if (op.compare("ADDU")==0)
		err = mips_cpu_set_register(state, destination, *source1 + *source2);

	if (op.compare("SRL")==0)
		err = mips_cpu_set_register(state, destination, uint32_t(*source2) >> shift);

	if (op.compare("SRA")==0)
		err = mips_cpu_set_register(state, destination, int32_t(*source2) >> shift);

	if (op.compare("SRAV")==0)
		err = mips_cpu_set_register(state, destination, int32_t(*source2) >> (*source1 & 0x1F));

	if (op.compare("SRLV")==0)
		err = mips_cpu_set_register(state, destination, uint32_t(*source2) >> (*source1 & 0x1F));

	if (op.compare("SLL")==0)
		err = mips_cpu_set_register(state, destination, *source2 << shift);

	if (op.compare("SLLV")==0)
		err = mips_cpu_set_register(state, destination, *source2 << (*source1 & 0x1F));

	if (op.compare("SUBU")==0)
		err = mips_cpu_set_register(state, destination, *source1 - *source2);

	if (op.compare("SUB")==0){
		if (!subtraction_overflow(*source1,*source2))
			err = mips_cpu_set_register(state, destination, int32_t(*source1) - int32_t(*source2));
		else
			err = mips_ExceptionArithmeticOverflow;
	}

	if (op.compare("AND")==0)
		err = mips_cpu_set_register(state, destination, *source1 & *source2);

	if (op.compare("OR")==0)
		err = mips_cpu_set_register(state, destination, *source1 | *source2);

	if (op.compare("XOR")==0)
		err = mips_cpu_set_register(state, destination, uint32_t(*source1 ^ *source2));

	if(op.compare("SLT")==0)
		err = mips_cpu_set_register(state, destination, int((int32_t(*source1) < int32_t(*source2))));

	if (op.compare("SLTU")==0)
		err = mips_cpu_set_register(state, destination, int(*source1 < *source2));

	if (op.compare("ADD")==0){
		if (!addition_overflow(*source1 ,*source2))
			err = mips_cpu_set_register(state, destination, *source1 + *source2);
		else
			err = mips_ExceptionArithmeticOverflow;
	}
	if (op.compare("MFLO")==0)
		err = mips_cpu_set_register(state, destination, lo);

	if (op.compare("MTLO")==0){
		lo = *source1;
		err = mips_Success;
	}
	if (op.compare("MFHI")==0)
		err = mips_cpu_set_register(state, destination, hi);

	if (op.compare("MTHI")==0){
		hi = *source1;
		err = mips_Success;
	}
	if (op.compare("MULT")==0){
		int64_t result =  int64_t(*source1) * int64_t(*source2);
		lo = uint32_t(result & 0xFFFFFFFF);
		hi = int32_t((result & 0xFFFFFFFF00000000) >> 32);
		err = mips_Success;
	}
	if (op.compare("MULTU")==0){
		uint64_t result =  uint64_t(*source1) * uint64_t(*source2);
		lo = uint32_t(result & 0xFFFFFFFF);
		hi = (uint32_t(result >> 32 ) & 0xFFFFFFFF);
		err = mips_Success;
	}

	if (op.compare("DIV")==0){
		if (*source2!=0) {
			lo = (int32_t(*source1) / int32_t(*source2));
			hi = (int32_t(*source1) % int32_t(*source2));
			err = mips_Success;
		} else {
			err = mips_ExceptionInvalidInstruction;
		}
	}

	if (op.compare("DIVU")==0){
		if (*source2!=0){
			lo = (uint32_t(*source1) / uint32_t(*source2));
			hi = (uint32_t(*source1) % uint32_t(*source2));
			err = mips_Success;
		} else {
			err = mips_ExceptionInvalidInstruction;
		}
	}

	if (op.compare("JR")==0){
		pc = pcN;
		pcN = *source1;
		err = mips_ExceptionBreak;
	}

	if (op.compare("JALR")==0){
		mips_cpu_set_register(state, destination, pc + 8 );
		pc = pcN;
		pcN = *source1;
		err = mips_ExceptionBreak;
	}


	//COUT OUTPUT
	if ((err==mips_Success) || (err == mips_ExceptionBreak)) {
		if ((op.compare("MTHI")==0) || (op.compare("MTLO")==0) || (op.compare("JR")==0))
		ss <<op<<" R["<<instruction_data[1]<<"]";
		if (op.compare("JALR")==0)
		ss <<op<<" R["<<instruction_data[3]<<"] , R["<<instruction_data[1]<<"]";
		if ((op.compare("MFHI")==0) || (op.compare("MFLO")==0))
		ss <<op<<" R["<<instruction_data[3]<<"]";
		if ((op.compare("SLL")==0)  || (op.compare("SRL")==0) || (op.compare("SRA")==0))
		ss <<op<<" R["<<instruction_data[3]<<"] , R["<<instruction_data[2]<<"], #"<<instruction_data[4];
		if ((op.compare("SLLV")==0) || (op.compare("SRAV")==0) || (op.compare("SRLV")==0))
		ss <<op<<" R["<<instruction_data[3]<<"] , R["<<instruction_data[2]<<"] , R["<<instruction_data[1]<<"]";
		if ((op.compare("SLT")==0) || (op.compare("SLTU")==0))
		ss <<op<<" R["<<instruction_data[3]<<"] , R["<<instruction_data[1]<<"] , R["<<instruction_data[2]<<"]";
		if ((op.compare("MULT")==0) || (op.compare("MULTU")==0) || (op.compare("DIV")==0) || (op.compare("DIVU")==0))
		ss <<op<<" R["<<instruction_data[1]<<"] , R["<<instruction_data[2]<<"]";
		if (ss.str().empty())
		ss <<op<<" R["<<instruction_data[3]<<"] , R["<<instruction_data[1]<<"] , R["<<instruction_data[2]<<"]";
		instruction = ss.str();
	} else
		instruction = "Invalid instruction";


	delete source1; delete source2;
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %r9, %rbx
movq %r8, %r13
movq %rcx, %r12
movq %rdx, 0x18(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %r15
leaq 0x50(%rsp), %rdi
callq 0x3150
movl $0x4, %edi
callq 0x31d0
movq %rax, 0x8(%rsp)
movq %rbx, 0x20(%rsp)
movl $0x4, %edi
callq 0x31d0
movq %rax, 0x10(%rsp)
movl 0x4(%r12), %esi
movl 0xc(%r12), %r14d
movl 0x10(%r12), %ebx
movq %r15, %rdi
movq 0x8(%rsp), %rdx
callq 0x4c44
movl $0x2004, %ebp           # imm = 0x2004
testl %eax, %eax
jne 0x717c
movl 0x8(%r12), %esi
movq %r15, %rdi
movq 0x10(%rsp), %rdx
callq 0x4c44
testl %eax, %eax
jne 0x717c
leaq 0x3ea1(%rip), %rsi      # 0xa594
movq %r13, %rdi
callq 0x30a0
xorl %ebp, %ebp
testl %eax, %eax
jne 0x671c
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
addl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x4297(%rip), %rsi      # 0xa9ba
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6747
movq 0x10(%rsp), %rax
movl (%rax), %edx
movl %ebx, %ecx
shrl %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x422c(%rip), %rsi      # 0xa97a
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6772
movq 0x10(%rsp), %rax
movl (%rax), %edx
movl %ebx, %ecx
sarl %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x421c(%rip), %rsi      # 0xa995
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x67a2
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
movb (%rax), %cl
sarl %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x4229(%rip), %rsi      # 0xa9d2
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x67d2
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
movb (%rax), %cl
shrl %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x40d9(%rip), %rsi      # 0xa8b2
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x67fd
movq 0x10(%rsp), %rax
movl (%rax), %edx
movl %ebx, %ecx
shll %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x40c5(%rip), %rsi      # 0xa8c9
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x682d
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
movb (%rax), %cl
shll %cl, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x41cd(%rip), %rsi      # 0xaa01
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x685b
movq 0x8(%rsp), %rax
movl (%rax), %edx
movq 0x10(%rsp), %rax
subl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x4192(%rip), %rsi      # 0xa9f4
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x68a5
movq 0x8(%rsp), %rax
movl (%rax), %edi
movq 0x10(%rsp), %rax
movl (%rax), %esi
callq 0x8013
movl $0x2006, %ebp           # imm = 0x2006
testb %al, %al
jne 0x68a5
movq 0x8(%rsp), %rax
movl (%rax), %edx
movq 0x10(%rsp), %rax
subl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x3d08(%rip), %rsi      # 0xa5b4
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x68d3
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
andl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x414d(%rip), %rsi      # 0xaa27
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6901
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
orl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x411e(%rip), %rsi      # 0xaa26
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x692f
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
xorl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x3fb4(%rip), %rsi      # 0xa8ea
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6962
movq 0x8(%rsp), %rax
movl (%rax), %eax
xorl %edx, %edx
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
setl %dl
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x3ff2(%rip), %rsi      # 0xa95b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6995
movq 0x8(%rsp), %rax
movl (%rax), %eax
xorl %edx, %edx
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
setb %dl
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x3b92(%rip), %rsi      # 0xa52e
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x69df
movq 0x8(%rsp), %rax
movl (%rax), %edi
movq 0x10(%rsp), %rax
movl (%rax), %esi
callq 0x805c
movl $0x2006, %ebp           # imm = 0x2006
testb %al, %al
jne 0x69df
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
addl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x3e33(%rip), %rsi      # 0xa819
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6a06
movq 0x18(%rsp), %rax
movl (%rax), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
leaq 0x3e2e(%rip), %rsi      # 0xa83b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6a29
movq 0x8(%rsp), %rax
movl (%rax), %eax
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
xorl %ebp, %ebp
leaq 0x3dd7(%rip), %rsi      # 0xa807
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
movq 0x28(%rsp), %rbx
jne 0x6a55
movl (%rbx), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl %eax, %ebp
movq 0x28(%rsp), %rbx
leaq 0x3dcf(%rip), %rsi      # 0xa82b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6a73
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, (%rbx)
xorl %ebp, %ebp
leaq 0x3dd1(%rip), %rsi      # 0xa84b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6aa7
movq 0x8(%rsp), %rax
movl (%rax), %eax
movq 0x10(%rsp), %rcx
movl (%rcx), %ecx
imulq %rax, %rcx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
shrq $0x20, %rcx
movl %ecx, (%rbx)
xorl %ebp, %ebp
leaq 0x3dab(%rip), %rsi      # 0xa859
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6adb
movq 0x8(%rsp), %rax
movl (%rax), %eax
movq 0x10(%rsp), %rcx
movl (%rcx), %ecx
imulq %rax, %rcx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
shrq $0x20, %rcx
movl %ecx, (%rbx)
xorl %ebp, %ebp
leaq 0x3c20(%rip), %rsi      # 0xa702
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6b15
movq 0x10(%rsp), %rax
movl (%rax), %ecx
testl %ecx, %ecx
je 0x6b10
movq 0x8(%rsp), %rax
movl (%rax), %eax
cltd
idivl %ecx
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movl %edx, (%rbx)
xorl %ebp, %ebp
jmp 0x6b15
movl $0x2005, %ebp           # imm = 0x2005
leaq 0x3bf1(%rip), %rsi      # 0xa70d
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6b50
movq 0x10(%rsp), %rax
movl (%rax), %ecx
testl %ecx, %ecx
je 0x6b4b
movq 0x8(%rsp), %rax
movl (%rax), %eax
xorl %edx, %edx
divl %ecx
xorl %ebp, %ebp
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movl %edx, (%rbx)
jmp 0x6b50
movl $0x2005, %ebp           # imm = 0x2005
movq 0x210(%rsp), %rbx
leaq 0x3bf8(%rip), %rsi      # 0xa757
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6b85
movl (%rbx), %eax
movq 0x218(%rsp), %rcx
movl %eax, (%rcx)
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, (%rbx)
movl $0x2000, %ebp           # imm = 0x2000
leaq 0x3baf(%rip), %rsi      # 0xa73b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6bc4
movq 0x218(%rsp), %rbp
movl (%rbp), %edx
addl $0x8, %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x4c64
movl (%rbx), %eax
movl %eax, (%rbp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, (%rbx)
movl $0x2000, %ebp           # imm = 0x2000
testl $0xffffdfff, %ebp       # imm = 0xFFFFDFFF
je 0x6bee
movq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x40fc(%rip), %rcx      # 0xacd8
movl $0x13, %r8d
xorl %esi, %esi
callq 0x32d0
jmp 0x715e
leaq 0x3c36(%rip), %rsi      # 0xa82b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6c27
leaq 0x3c33(%rip), %rsi      # 0xa83b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6c27
leaq 0x3b3c(%rip), %rsi      # 0xa757
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6c71
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x408c(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3e88(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x3ac3(%rip), %rsi      # 0xa73b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6cf2
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x402f(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x4008(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3e07(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x3b0e(%rip), %rsi      # 0xa807
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6d18
leaq 0x3b0d(%rip), %rsi      # 0xa819
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6d62
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x3f9b(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3d97(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x3b49(%rip), %rsi      # 0xa8b2
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6d9b
leaq 0x3c3e(%rip), %rsi      # 0xa9ba
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6d9b
leaq 0x3beb(%rip), %rsi      # 0xa97a
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6e19
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x3f18(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3ef1(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x8(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3ed4(%rip), %rsi      # 0xacd3
movl $0x4, %edx
movq %rax, %rdi
callq 0x3210
movl 0x10(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3aa9(%rip), %rsi      # 0xa8c9
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6e56
leaq 0x3b62(%rip), %rsi      # 0xa995
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6e56
leaq 0x3b8c(%rip), %rsi      # 0xa9d2
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6ee8
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x3e5d(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3e36(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x8(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3e12(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3c11(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x39fb(%rip), %rsi      # 0xa8ea
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6f12
leaq 0x3a59(%rip), %rsi      # 0xa95b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6fa4
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x3da1(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3d7a(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3d56(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x8(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3b55(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x38a0(%rip), %rsi      # 0xa84b
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6ff0
leaq 0x389b(%rip), %rsi      # 0xa859
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6ff0
leaq 0x3731(%rip), %rsi      # 0xa702
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
je 0x6ff0
leaq 0x3729(%rip), %rsi      # 0xa70d
movq %r13, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x705e
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %rbx
leaq 0x3cc3(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x3c9c(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x8(%r12), %esi
movq %rbx, %rdi
callq 0x3120
leaq 0x3a9b(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x68(%rsp), %rbx
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x32f0
leaq 0x40(%rsp), %r15
movq -0x10(%r15), %rdi
movq -0x8(%r15), %r14
cmpq %r15, %rdi
je 0x708f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x31e0
testq %r14, %r14
jne 0x712a
leaq 0x60(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3210
movq %rax, %r14
leaq 0x3c1b(%rip), %rsi      # 0xaccf
movl $0x3, %edx
movq %rax, %rdi
callq 0x3210
movl 0xc(%r12), %esi
movq %r14, %rdi
callq 0x3120
movq %rax, %r14
leaq 0x3bf4(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x4(%r12), %esi
movq %r14, %rdi
callq 0x3120
movq %rax, %r14
leaq 0x3bd0(%rip), %rsi      # 0xaccc
movl $0x6, %edx
movq %rax, %rdi
callq 0x3210
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x3120
leaq 0x39cf(%rip), %rsi      # 0xaaec
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x32f0
leaq 0x30(%rsp), %rbx
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x3250
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x715e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x31e0
movl $0x4, %esi
movq 0x8(%rsp), %rdi
callq 0x31e0
movl $0x4, %esi
movq 0x10(%rsp), %rdi
callq 0x31e0
movq 0x7e2d(%rip), %rsi      # 0xefb0
leaq 0x50(%rsp), %rdi
callq 0x3170
leaq 0xd0(%rsp), %rdi
callq 0x30b0
movl %ebp, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71b6
jmp 0x71b6
jmp 0x71b6
jmp 0x71b6
movq %rax, %rbx
movq 0x7df0(%rip), %rsi      # 0xefb0
leaq 0x50(%rsp), %rdi
callq 0x3170
leaq 0xd0(%rsp), %rdi
callq 0x30b0
movq %rbx, %rdi
callq 0x3330