// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/queues.cpp
// Function: IntegerQueue::issue(int)
Instruction IntegerQueue::issue(int idx){
	switch(idx){
		case 0:
		// prefer branch
		for(size_t i=0; i < _q.size(); ++i){
			Instruction temp = _q[i];
			auto type = temp.type();
			if(temp.is_valid() && (std::get<0>(type) == OPCODE["beq"] || std::get<0>(type) == OPCODE["bne"])){
				auto regs = temp.physical_regs();
				if(!*(b + std::get<0>(regs)) && !*(b + std::get<1>(regs))){
					_q.erase(_q.begin() + i);
					return temp;
				}
			}
		}

		// send only an addition or subtraction operation
		for(size_t i=0; i < _q.size(); ++i){
			Instruction temp = _q[i];
			auto type = temp.type();
			if(temp.is_valid() && (std::get<1>(type) == FUNCT["add"] || std::get<1>(type) == FUNCT["sub"])){
				auto regs = temp.physical_regs();
				if(!*(b + std::get<0>(regs)) && !*(b + std::get<1>(regs))){
					_q.erase(_q.begin() + i);
					return temp;
				}
			}
		}
		break;

		case 1:
		// first preference to division and multiplication
		for(size_t i=0; i < _q.size(); ++i){
			Instruction temp = _q[i];
			auto type = temp.type();
			if(temp.is_valid() && (std::get<1>(type) == FUNCT["div"] || std::get<1>(type) == FUNCT["mult"])){
				auto regs = temp.physical_regs();
				if(!*(b + std::get<0>(regs)) && !*(b + std::get<1>(regs))){
					_q.erase(_q.begin() + i);
					return temp;
				}
			}
		}
		// but if neither operation is present, send addition or subtraction
		for(size_t i=0; i < _q.size(); ++i){
			Instruction temp = _q[i];
			auto type = temp.type();
			if(temp.is_valid() && (std::get<1>(type) == FUNCT["add"] || std::get<1>(type) == FUNCT["sub"])){
				auto regs = temp.physical_regs();
				if(!*(b + std::get<0>(regs)) && !*(b + std::get<1>(regs))){
					_q.erase(_q.begin() + i);
					return temp;
				}
			}
		}
		break;

		default:
		break;
	}
	// send an invalid operation/instruction if no match is found
	return Instruction();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
movq %rdi, 0x28(%rsp)
je 0x12986
cmpl $0x1, %edx
jne 0x13324
leaq 0x50(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x60(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %edi, %edi
xorl %eax, %eax
movq %rax, %r12
movq 0x48(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%r14), %rcx
subq 0x38(%r14), %rcx
sarq $0x3, %rcx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rcx
leaq (%rcx,%rdx,4), %rcx
movq 0x10(%r14), %rbp
movq 0x20(%r14), %r13
subq %rbp, %r13
sarq $0x3, %r13
imulq %rsi, %r13
addq %rcx, %r13
cmpq %r13, %r12
jae 0x12cd4
movq %rbp, %rcx
subq 0x18(%r14), %rcx
sarq $0x3, %rcx
imulq %rsi, %rcx
leaq (%r12,%rcx), %rdx
cmpq $0x3, %rdx
movq %rdi, 0x20(%rsp)
ja 0x126e1
addq %rdi, %rbp
jmp 0x12715
movq %rdx, %rsi
shrq $0x2, %rsi
movq %rsi, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rdx, %rdx
cmovgq %rsi, %rdi
leaq (,%rdi,4), %rdx
subq %rdx, %rcx
addq %r12, %rcx
imulq $0x78, %rcx, %rbp
addq (%rax,%rdi,8), %rbp
movl $0xa, %ecx
movq %rbx, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rbx)
movq 0x50(%rbp), %rsi
movq 0x58(%rbp), %rdx
addq %rsi, %rdx
movq 0x18(%rsp), %rdi
callq 0x52b6
movq 0x70(%rbp), %rax
movq %rax, 0x70(%rbx)
leaq 0xe8(%rsp), %rdi
movq %rbx, %rsi
callq 0xac8c
cmpl $-0x1, 0x4(%rbx)
setne %al
cmpl $-0x1, (%rbx)
setne %bpl
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x127b8
movl 0xe8(%rsp), %ebx
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %r15
movq %r15, %rdi
leaq 0x4886(%rip), %rsi      # 0x17019
leaq 0x4882(%rip), %rdx      # 0x1701c
callq 0x5346
leaq 0xaa9a(%rip), %rdi      # 0x1d240
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
jne 0x127be
movb $0x1, %bl
xorl %eax, %eax
jmp 0x12809
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x12809
movl 0xe8(%rsp), %ebx
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
leaq 0x482d(%rip), %rsi      # 0x17014
leaq 0x482a(%rip), %rdx      # 0x17018
callq 0x5346
leaq 0xaa46(%rip), %rdi      # 0x1d240
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
sete %bl
movb $0x1, %al
testb %al, %al
je 0x12832
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x12832
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x12859
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x12859
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bl, %bl
je 0x12890
leaq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0xac5a
movq 0x50(%r14), %rax
movslq 0x3c(%rsp), %rcx
movb $0x1, %bpl
cmpb $0x0, (%rax,%rcx)
jne 0x1288c
movslq 0x38(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x128d9
xorl %eax, %eax
jmp 0x1289a
movb $0x1, %bpl
xorl %eax, %eax
movq 0x28(%rsp), %rbx
testb %al, %al
jne 0x128bd
movq 0x18(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x128bd
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3200
leaq 0x1(%r12), %rax
movq 0x20(%rsp), %rdi
addq $0x78, %rdi
testb %bpl, %bpl
jne 0x12664
jmp 0x12ccb
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq 0x18(%r14), %rdx
sarq $0x3, %rdx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rdx
leaq (%r12,%rdx), %rsi
cmpq $0x3, %rsi
ja 0x1290b
addq 0x20(%rsp), %rcx
jmp 0x1293e
movq %rsi, %rcx
shrq $0x2, %rcx
movq %rcx, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
leaq (%rax,%rdi,8), %rax
shlq $0x2, %rdi
subq %rdi, %rdx
addq %r12, %rdx
imulq $0x78, %rdx, %rcx
addq (%rax), %rcx
movq %rcx, 0x98(%rsp)
movq (%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq $0x1e0, %rcx            # imm = 0x1E0
movq %rcx, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
leaq 0x98(%rsp), %rdx
callq 0x6a0a
movb $0x1, %al
xorl %ebp, %ebp
jmp 0x1289a
leaq 0x50(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x60(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %edi, %edi
xorl %eax, %eax
movq %rax, %r12
movq 0x48(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%r14), %rcx
subq 0x38(%r14), %rcx
sarq $0x3, %rcx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rcx
leaq (%rcx,%rdx,4), %rcx
movq 0x10(%r14), %rbp
movq 0x20(%r14), %r13
subq %rbp, %r13
sarq $0x3, %r13
imulq %rsi, %r13
addq %rcx, %r13
cmpq %r13, %r12
jae 0x12ffe
movq %rbp, %rcx
subq 0x18(%r14), %rcx
sarq $0x3, %rcx
imulq %rsi, %rcx
leaq (%r12,%rcx), %rdx
cmpq $0x3, %rdx
movq %rdi, 0x20(%rsp)
ja 0x12a26
addq %rdi, %rbp
jmp 0x12a5a
movq %rdx, %rsi
shrq $0x2, %rsi
movq %rsi, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rdx, %rdx
cmovgq %rsi, %rdi
leaq (,%rdi,4), %rdx
subq %rdx, %rcx
addq %r12, %rcx
imulq $0x78, %rcx, %rbp
addq (%rax,%rdi,8), %rbp
movl $0xa, %ecx
movq %rbx, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rbx)
movq 0x50(%rbp), %rsi
movq 0x58(%rbp), %rdx
addq %rsi, %rdx
movq 0x18(%rsp), %rdi
callq 0x52b6
movq 0x70(%rbp), %rax
movq %rax, 0x70(%rbx)
leaq 0xe8(%rsp), %rdi
movq %rbx, %rsi
callq 0xac8c
cmpl $-0x1, 0x4(%rbx)
setne %al
cmpl $-0x1, (%rbx)
setne %bpl
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x12afd
movl 0xec(%rsp), %ebx
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %r15
movq %r15, %rdi
leaq 0x4534(%rip), %rsi      # 0x1700c
leaq 0x4530(%rip), %rdx      # 0x1700f
callq 0x5346
leaq 0xa725(%rip), %rdi      # 0x1d210
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
jne 0x12b03
movb $0x1, %bl
xorl %eax, %eax
jmp 0x12b4e
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x12b4e
movl 0xec(%rsp), %ebx
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
leaq 0x44e4(%rip), %rsi      # 0x17010
leaq 0x44e0(%rip), %rdx      # 0x17013
callq 0x5346
leaq 0xa6d1(%rip), %rdi      # 0x1d210
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
sete %bl
movb $0x1, %al
testb %al, %al
je 0x12b77
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x12b77
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x12b9e
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x12b9e
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bl, %bl
je 0x12bd5
leaq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0xac5a
movq 0x50(%r14), %rax
movslq 0x3c(%rsp), %rcx
movb $0x1, %bpl
cmpb $0x0, (%rax,%rcx)
jne 0x12bd1
movslq 0x38(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x12c1e
xorl %eax, %eax
jmp 0x12bdf
movb $0x1, %bpl
xorl %eax, %eax
movq 0x28(%rsp), %rbx
testb %al, %al
jne 0x12c02
movq 0x18(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x12c02
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3200
leaq 0x1(%r12), %rax
movq 0x20(%rsp), %rdi
addq $0x78, %rdi
testb %bpl, %bpl
jne 0x129a9
jmp 0x12ff5
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq 0x18(%r14), %rdx
sarq $0x3, %rdx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rdx
leaq (%r12,%rdx), %rsi
cmpq $0x3, %rsi
ja 0x12c50
addq 0x20(%rsp), %rcx
jmp 0x12c83
movq %rsi, %rcx
shrq $0x2, %rcx
movq %rcx, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
leaq (%rax,%rdi,8), %rax
shlq $0x2, %rdi
subq %rdi, %rdx
addq %r12, %rdx
imulq $0x78, %rdx, %rcx
addq (%rax), %rcx
movq %rcx, 0x98(%rsp)
movq (%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq $0x1e0, %rcx            # imm = 0x1E0
movq %rcx, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
leaq 0x98(%rsp), %rdx
callq 0x6a0a
movb $0x1, %al
xorl %ebp, %ebp
jmp 0x12bdf
cmpq %r13, %r12
jb 0x1332c
leaq 0x60(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %edi, %edi
xorl %eax, %eax
movq %rax, %r12
movq 0x48(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%r14), %rcx
subq 0x38(%r14), %rcx
sarq $0x3, %rcx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rcx
leaq (%rcx,%rdx,4), %rcx
movq 0x10(%r14), %rbp
movq 0x20(%r14), %r13
subq %rbp, %r13
sarq $0x3, %r13
imulq %rsi, %r13
addq %rcx, %r13
cmpq %r13, %r12
jae 0x13324
movq %rbp, %rcx
subq 0x18(%r14), %rcx
sarq $0x3, %rcx
imulq %rsi, %rcx
leaq (%r12,%rcx), %rdx
cmpq $0x3, %rdx
movq %rdi, 0x20(%rsp)
ja 0x12d68
addq %rdi, %rbp
jmp 0x12d9c
movq %rdx, %rsi
shrq $0x2, %rsi
movq %rsi, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rdx, %rdx
cmovgq %rsi, %rdi
leaq (,%rdi,4), %rdx
subq %rdx, %rcx
addq %r12, %rcx
imulq $0x78, %rcx, %rbp
addq (%rax,%rdi,8), %rbp
movl $0xa, %ecx
movq %rbx, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rbx)
movq 0x50(%rbp), %rsi
movq 0x58(%rbp), %rdx
addq %rsi, %rdx
movq 0x18(%rsp), %rdi
callq 0x52b6
movq 0x70(%rbp), %rax
movq %rax, 0x70(%rbx)
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0xac8c
cmpl $-0x1, 0x4(%rbx)
setne %al
cmpl $-0x1, (%rbx)
setne %bpl
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x12e36
movl 0x70(%rsp), %ebx
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rsp), %r15
movq %r15, %rdi
leaq 0x41f3(%rip), %rsi      # 0x17004
leaq 0x41ef(%rip), %rdx      # 0x17007
callq 0x5346
leaq 0xa41c(%rip), %rdi      # 0x1d240
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
jne 0x12e3c
movb $0x1, %bl
xorl %eax, %eax
jmp 0x12e7b
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x12e7b
movl 0x70(%rsp), %ebx
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x41af(%rip), %rsi      # 0x17008
leaq 0x41ab(%rip), %rdx      # 0x1700b
callq 0x5346
leaq 0xa3d4(%rip), %rdi      # 0x1d240
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
sete %bl
movb $0x1, %al
testb %al, %al
je 0x12e9b
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x12e9b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x12ebc
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x12ebc
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bl, %bl
je 0x12efc
leaq 0xd8(%rsp), %rdi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0xac5a
movq 0x50(%r14), %rax
movslq 0xe4(%rsp), %rcx
movb $0x1, %bpl
cmpb $0x0, (%rax,%rcx)
jne 0x12ef8
movslq 0xe0(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x12f45
xorl %eax, %eax
jmp 0x12f06
movb $0x1, %bpl
xorl %eax, %eax
movq 0x28(%rsp), %rbx
testb %al, %al
jne 0x12f29
movq 0x18(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x12f29
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3200
leaq 0x1(%r12), %rax
movq 0x20(%rsp), %rdi
addq $0x78, %rdi
testb %bpl, %bpl
jne 0x12ceb
jmp 0x1331f
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq 0x18(%r14), %rdx
sarq $0x3, %rdx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rdx
leaq (%r12,%rdx), %rsi
cmpq $0x3, %rsi
ja 0x12f77
addq 0x20(%rsp), %rcx
jmp 0x12faa
movq %rsi, %rcx
shrq $0x2, %rcx
movq %rcx, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
leaq (%rax,%rdi,8), %rax
shlq $0x2, %rdi
subq %rdi, %rdx
addq %r12, %rdx
imulq $0x78, %rdx, %rcx
addq (%rax), %rcx
movq %rcx, 0x98(%rsp)
movq (%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq $0x1e0, %rcx            # imm = 0x1E0
movq %rcx, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
leaq 0xe8(%rsp), %rdi
movq %r14, %rsi
leaq 0x98(%rsp), %rdx
callq 0x6a0a
movb $0x1, %al
xorl %ebp, %ebp
jmp 0x12f06
cmpq %r13, %r12
jb 0x1332c
leaq 0x60(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %edi, %edi
xorl %eax, %eax
movq %rax, %r12
movq 0x48(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%r14), %rcx
subq 0x38(%r14), %rcx
sarq $0x3, %rcx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rcx
leaq (%rcx,%rdx,4), %rcx
movq 0x10(%r14), %rbp
movq 0x20(%r14), %r13
subq %rbp, %r13
sarq $0x3, %r13
imulq %rsi, %r13
addq %rcx, %r13
cmpq %r13, %r12
jae 0x13324
movq %rbp, %rcx
subq 0x18(%r14), %rcx
sarq $0x3, %rcx
imulq %rsi, %rcx
leaq (%r12,%rcx), %rdx
cmpq $0x3, %rdx
movq %rdi, 0x20(%rsp)
ja 0x13092
addq %rdi, %rbp
jmp 0x130c6
movq %rdx, %rsi
shrq $0x2, %rsi
movq %rsi, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rdx, %rdx
cmovgq %rsi, %rdi
leaq (,%rdi,4), %rdx
subq %rdx, %rcx
addq %r12, %rcx
imulq $0x78, %rcx, %rbp
addq (%rax,%rdi,8), %rbp
movl $0xa, %ecx
movq %rbx, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rbx)
movq 0x50(%rbp), %rsi
movq 0x58(%rbp), %rdx
addq %rsi, %rdx
movq 0x18(%rsp), %rdi
callq 0x52b6
movq 0x70(%rbp), %rax
movq %rax, 0x70(%rbx)
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0xac8c
cmpl $-0x1, 0x4(%rbx)
setne %al
cmpl $-0x1, (%rbx)
setne %bpl
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x13160
movl 0x70(%rsp), %ebx
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rsp), %r15
movq %r15, %rdi
leaq 0x3ec9(%rip), %rsi      # 0x17004
leaq 0x3ec5(%rip), %rdx      # 0x17007
callq 0x5346
leaq 0xa0f2(%rip), %rdi      # 0x1d240
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
jne 0x13166
movb $0x1, %bl
xorl %eax, %eax
jmp 0x131a5
xorl %eax, %eax
xorl %ebx, %ebx
jmp 0x131a5
movl 0x70(%rsp), %ebx
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x3e85(%rip), %rsi      # 0x17008
leaq 0x3e81(%rip), %rdx      # 0x1700b
callq 0x5346
leaq 0xa0aa(%rip), %rdi      # 0x1d240
movq %r15, %rsi
callq 0x517a
cmpl (%rax), %ebx
sete %bl
movb $0x1, %al
testb %al, %al
je 0x131c5
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x131c5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x131e6
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x131e6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bl, %bl
je 0x13226
leaq 0xd8(%rsp), %rdi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0xac5a
movq 0x50(%r14), %rax
movslq 0xe4(%rsp), %rcx
movb $0x1, %bpl
cmpb $0x0, (%rax,%rcx)
jne 0x13222
movslq 0xe0(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x1326f
xorl %eax, %eax
jmp 0x13230
movb $0x1, %bpl
xorl %eax, %eax
movq 0x28(%rsp), %rbx
testb %al, %al
jne 0x13253
movq 0x18(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x13253
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3200
leaq 0x1(%r12), %rax
movq 0x20(%rsp), %rdi
addq $0x78, %rdi
testb %bpl, %bpl
jne 0x13015
jmp 0x1331f
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq 0x18(%r14), %rdx
sarq $0x3, %rdx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rdx
leaq (%r12,%rdx), %rsi
cmpq $0x3, %rsi
ja 0x132a1
addq 0x20(%rsp), %rcx
jmp 0x132d4
movq %rsi, %rcx
shrq $0x2, %rcx
movq %rcx, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rsi, %rsi
cmovgq %rcx, %rdi
leaq (%rax,%rdi,8), %rax
shlq $0x2, %rdi
subq %rdi, %rdx
addq %r12, %rdx
imulq $0x78, %rdx, %rcx
addq (%rax), %rcx
movq %rcx, 0x98(%rsp)
movq (%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq $0x1e0, %rcx            # imm = 0x1E0
movq %rcx, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
leaq 0xe8(%rsp), %rdi
movq %r14, %rsi
leaq 0x98(%rsp), %rdx
callq 0x6a0a
movb $0x1, %al
xorl %ebp, %ebp
jmp 0x13230
cmpq %r13, %r12
jb 0x1332c
movq %rbx, %rdi
callq 0x7c0a
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13431
jmp 0x13431
jmp 0x13431
jmp 0x13431
jmp 0x13357
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x133ed
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x133ed
jmp 0x13384
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x133ed
jmp 0x13395
movq %rax, %rbx
leaq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1340d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x1340d
jmp 0x133ce
movq %rax, %rbx
leaq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1340d
jmp 0x13431
jmp 0x13431
jmp 0x13431
jmp 0x13431
jmp 0x133ea
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq 0x10(%rsp), %rdi
je 0x13434
movq 0x60(%rsp), %rsi
jmp 0x13421
jmp 0x13431
jmp 0x13431
jmp 0x13431
jmp 0x13431
jmp 0x1340a
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq 0x10(%rsp), %rdi
je 0x13434
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x13434
jmp 0x13431
jmp 0x13431
jmp 0x13431
movq %rax, %rbx
movq 0x18(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x13453
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop