// File: /workspace/github_cpp_makefile_star2_O2/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: convert_cube_to_gadget(cube*, bool)
cube *convert_cube_to_gadget(cube *C, bool upright)
{
	output_debugging("convert", 3);
	
	manifold *M = C->home;
	int layer_number = M->get_num_layers();  // We will need this a lot, so better remember it.
	
	cube *C2 = new cube(*M, layer_number);
	
	tetra *topleft = C->get_tetra(top, left)->get_child();
	tetra *midleft = C->get_tetra(mid, left)->get_child();
	tetra *lowleft = C->get_tetra(low, left)->get_child();
	tetra *topright = C->get_tetra(top, right)->get_child();
	tetra *midright = C->get_tetra(mid, right)->get_child();
	tetra *lowright = C->get_tetra(low, right)->get_child();
	
	tetra *topleft2 = C2->get_tetra(top, left);
	tetra *midleft2 = C2->get_tetra(mid, left);
	tetra *lowleft2 = C2->get_tetra(low, left);
	tetra *topright2 = C2->get_tetra(top, right);
	tetra *midright2 = C2->get_tetra(mid, right);
	tetra *lowright2 = C2->get_tetra(low, right);
	
	topleft2->set_parent(topleft);
	midleft2->set_parent(midleft);
	lowleft2->set_parent(lowleft);
	topright2->set_parent(topright);
	midright2->set_parent(midright);
	lowright2->set_parent(lowright);
	
	for (int i = 0; i < 6; i++)
	{
		C->get_tetra(i)->get_child()->set_category(gadget_left);  // Remember, the old pieces are now part of the gadget too.
		C2->get_tetra(i)->set_category(gadget_right);  // Remember, the new pieces are now part of the gadget too.
	}
	
	// Subbedby the RHS of the duplicant in.
	int toglue = (upright) ? 2 : 1;  // Which face is on the right depends on the orientation.
	tetra *side_tetra = (upright) ? midright : topright;
	tetra *side_tetra2 = (upright) ? midright2 : topright2;
	side_tetra->subbedby(side_tetra2, toglue, perm(0,1,2,3));
	
	side_tetra = (upright) ? lowright : lowright;
	side_tetra2 = (upright) ? lowright2 : lowright2;
	side_tetra->subbedby(side_tetra2, toglue, perm(0,1,2,3));
	
	// These will form the gadget_pups above & below.
	tetra *newfront = new tetra(M, gadget_pup, top, neither, layer_number, topleft2);
	tetra *newmid = new tetra(M, gadget_pup, top, neither, layer_number, midleft2);
	tetra *newback = new tetra(M, gadget_pup, top, neither, layer_number, lowleft2);
	tetra *newfront2 = new tetra(M, gadget_pup, low, neither, layer_number, topright2);
	tetra *newmid2 = new tetra(M, gadget_pup, low, neither, layer_number, midright2);
	tetra *newback2 = new tetra(M, gadget_pup, low, neither, layer_number, lowright2);
	
	/*
	---================= Travellers Beware ==================---
	---=== You are now entering the Land of Hard - Coding ===---
	
	Over the next 100 lines or so we will build and insert the 
	upper and lower pup-gadgets. These individually hand 
	crafted pup-gadgets have 32+ hard-coded gluings and permutations.
	
	Due to its extreme nature, this ride is NOT suitable for 
	guests with heart conditions, vertigo or high blood pressure.
	
	Please keep your arms and legs inside the vehicle at ALL times.
	---================ You have been warned =================---
	*/
	
	// Pup-gadgets have been designed this way for a good reason. See (*1*).
	if (upright)
	{
		// First the upper gadget_pup.
		
		// Glue up the gadget pup.
		newfront->gluesym(newmid, 1, perm(0,1,3,2));
		newmid->gluesym(newback, 2, perm(1,2,3,0));
		
		// Subbedby the gadget pup into the top.
		topleft->subbedby(newfront, 1, perm(2,3,0,1));
		topright->subbedby(newback, 2, perm(3,0,2,1));
		
		// Glue down gadget pup left side (it's a good job that subbedby gave us some free faces).
		newfront->gluesym(topleft, 2, perm(2,3,1,0));
		newmid->gluesym(topright, 3, perm(3,0,1,2));
		
		// Glue down gadget pup right side.
		newmid->gluesym(topleft2, 0, perm(1,2,3,0));
		newback->gluesym(topright2, 1, perm(1,2,3,0));
		
		// Now for the bottom gadget_pup.
		
		// Glue up the gadget pup.
		newfront2->gluesym(newmid2, 2, perm(0,2,1,3));
		newmid2->gluesym(newback2, 3, perm(3,2,0,1));
		
		// Subbedby the gadget pup into the bottom.
		lowleft->subbedby(newfront2, 3, perm(1,2,0,3));
		lowright->subbedby(newback2, 3, perm(1,0,3,2));
		
		// Glue down gadget pup left side (it's a good job that subbedby gave us some free faces).
		newfront2->gluesym(lowleft, 1, perm(2,3,1,0));
		newmid2->gluesym(lowright, 2, perm(2,0,3,1));
		
		// Glue down gadget pup right side.
		newmid2->gluesym(lowleft2, 0, perm(3,2,0,1));
		newback2->gluesym(lowright2, 3, perm(1,0,2,3));
	}
	else
	{
		// First the upper gadget_pup.
		
		// Glue up the gadget pup.
		newfront->gluesym(newmid, 2, perm(0,2,1,3));
		newmid->gluesym(newback, 3, perm(3,2,0,1));
		
		// Subbedby the gadget pup into the top.
		topleft->subbedby(newback, 1, perm(0,2,3,1));
		topright->subbedby(newfront, 2, perm(2,1,3,0));
		
		// Glue down gadget pup left side (it's a good job that subbedby gave us some free faces).
		newback->gluesym(topleft, 3, perm(0,3,2,1));
		newmid->gluesym(topright, 0, perm(2,3,1,0));
		
		// Glue down gadget pup right side.
		newmid->gluesym(topleft2, 2, perm(2,3,1,0));
		newfront->gluesym(topright2, 1, perm(3,2,0,1));
		
		// Now for the bottom gadget_pup.
		
		// Glue up the gadget pup.
		newfront2->gluesym(newmid2, 1, perm(0,1,3,2));
		newmid2->gluesym(newback2, 2, perm(1,2,3,0));
		
		// Subbedby the gadget pup into the bottom.
		lowleft->subbedby(newback2, 3, perm(0,3,1,2));
		lowright->subbedby(newfront2, 3, perm(1,2,0,3));
		
		// Glue down gadget pup left side (it's a good job that subbedby gave us some free faces).
		newback2->gluesym(lowleft, 1, perm(0,3,2,1));
		newmid2->gluesym(lowright, 0, perm(3,2,0,1));
		
		// Glue down gadget pup right side.
		newmid2->gluesym(lowleft2, 3, perm(2,1,0,3));
		newfront2->gluesym(lowright2, 2, perm(2,0,3,1));
	}
	
	/*
	---=== You are now leaving the Land of Hard - Coding ===---
		 Please ensure you have all your belongings with you.
				We hope you enjoyed your stay.
	*/
	
	return C2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %esi, 0x3c(%rsp)
movq %rdi, %r15
leaq 0x6858(%rip), %rsi      # 0x11553
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3e82
leaq 0xa8(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x3d1a
leaq 0xa8(%rsp), %rdi
callq 0x3458
movq 0x38(%r15), %r14
movl 0x38(%r14), %ebp
pushq $0x40
popq %rdi
callq 0x3240
movq %rax, %rbx
xorl %r13d, %r13d
movq %rax, %rdi
movq %r14, 0xa0(%rsp)
movq %r14, %rsi
movl %ebp, 0x84(%rsp)
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xa926
movq (%r15), %rax
movq 0x8(%r15), %rcx
movq 0x88(%rax), %r9
movq 0x88(%rcx), %rax
movq 0x10(%r15), %rcx
movq 0x88(%rcx), %rdi
movq 0x18(%r15), %rcx
movq 0x88(%rcx), %rbp
movq 0x20(%r15), %rcx
movq 0x88(%rcx), %r12
movq 0x28(%r15), %rcx
movq 0x88(%rcx), %rsi
movq (%rbx), %r8
movq 0x8(%rbx), %r11
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %r14
movq 0x20(%rbx), %r10
movq 0x28(%rbx), %rcx
movq %r9, 0x80(%r8)
movq %r8, 0x68(%rsp)
movq %r9, 0x88(%rsp)
movq %r8, 0x88(%r9)
movq %rax, 0x80(%r11)
movq %r11, 0x20(%rsp)
movq %r11, 0x88(%rax)
movq %rdi, 0x80(%rdx)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x98(%rsp)
movq %rdx, 0x88(%rdi)
movq %rbp, 0x80(%r14)
movq %r14, 0x88(%rbp)
movq %r12, 0x80(%r10)
movq %r10, 0x28(%rsp)
movq %r10, 0x88(%r12)
movq %rsi, 0x80(%rcx)
movq %rcx, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rcx, 0x88(%rsi)
cmpl $0x6, %r13d
je 0xae6f
movq %r15, %rdi
movl %r13d, %esi
callq 0xf07a
movq 0x88(%rax), %rax
movl $0x4, 0x70(%rax)
movq %rbx, %rdi
movl %r13d, %esi
callq 0xf07a
movl $0x5, 0x70(%rax)
incl %r13d
jmp 0xae39
movzbl 0x3c(%rsp), %eax
testb %al, %al
movq %rbp, 0x90(%rsp)
cmoveq %rbp, %r12
leal 0x1(%rax), %r13d
movq %r14, 0x58(%rsp)
movq %r14, %r15
cmovneq 0x28(%rsp), %r15
leaq 0x10(%rsp), %r14
pushq $0x1
popq %rbp
pushq $0x2
popq %rcx
pushq $0x3
popq %r8
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x6790
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r14, %rcx
callq 0xa734
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
pushq $0x2
popq %rbp
movl %ebp, %ecx
pushq $0x3
popq %r8
callq 0x6790
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %r12
movq %r12, %rsi
movl %r13d, %edx
movq %r14, %rcx
callq 0xa734
movl $0xc0, %edi
callq 0x3240
movq %rax, %rdi
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
pushq $0x6
popq %rdx
movq %rdi, 0x50(%rsp)
movq 0xa0(%rsp), %r13
movq %r13, %rsi
xorl %ecx, %ecx
movl %ebp, %r8d
movl 0x84(%rsp), %r15d
movl %r15d, %r9d
callq 0xa3fa
movl $0xc0, %edi
callq 0x3240
movq 0x20(%rsp), %rcx
movq %rcx, (%rsp)
pushq $0x6
popq %rdx
pushq $0x2
popq %r8
movq %rax, 0x30(%rsp)
movq %rax, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
movl %r15d, %r9d
callq 0xa3fa
movl $0xc0, %edi
callq 0x3240
movq %rax, %rdi
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
pushq $0x6
popq %rdx
pushq $0x2
popq %r8
movq %rdi, 0x48(%rsp)
movq %r13, %rsi
xorl %ecx, %ecx
movl %r15d, %r9d
callq 0xa3fa
movl $0xc0, %edi
callq 0x3240
movq %rax, %rdi
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
pushq $0x6
popq %rdx
pushq $0x2
popq %rcx
movq %rdi, 0x40(%rsp)
movq %r13, %rsi
movl %ecx, %r8d
movl %r15d, %r9d
callq 0xa3fa
movl $0xc0, %edi
callq 0x3240
movq 0x28(%rsp), %rcx
movq %rcx, (%rsp)
pushq $0x6
popq %rdx
pushq $0x2
popq %rcx
movq %rax, 0x20(%rsp)
movq %rax, %rdi
movq %r13, %rsi
movl %ecx, %r8d
movl %r15d, %r9d
callq 0xa3fa
movq %r13, %rbp
movl $0xc0, %edi
callq 0x3240
movq %rax, %r13
movq %r12, (%rsp)
pushq $0x6
popq %rdx
pushq $0x2
popq %rcx
movq %rax, %rdi
movq %rbp, %rsi
movl %ecx, %r8d
movl %r15d, %r9d
callq 0xa3fa
movq %r13, 0x28(%rsp)
cmpb $0x0, 0x3c(%rsp)
je 0xb325
leaq 0x10(%rsp), %r13
pushq $0x1
popq %r14
pushq $0x3
popq %rcx
pushq $0x2
popq %r12
movq %r13, %rdi
xorl %esi, %esi
movl %r14d, %edx
movl %r12d, %r8d
callq 0x6790
movq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq 0x30(%rsp), %r15
movq %r15, %rsi
movl %r14d, %edx
movq %r13, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl %r14d, %esi
movl %r12d, %edx
pushq $0x3
popq %rcx
xorl %r8d, %r8d
callq 0x6790
movq %r15, %rdi
movq 0x48(%rsp), %r14
movq %r14, %rsi
movl %r12d, %edx
movq %r13, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
pushq $0x3
popq %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r13
movl %r13d, %r8d
callq 0x6790
movq 0x88(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movl %r13d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x6790
movq %r14, %rsi
movq 0x90(%rsp), %r14
movq %r14, %rdi
movl %r12d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl %r12d, %esi
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
callq 0x6790
movq %rbp, %rdi
movq %r15, %rsi
movl %r12d, %edx
movq %r13, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r13
movq %r13, %rdi
pushq $0x3
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
pushq $0x1
popq %rcx
movl %r12d, %r8d
callq 0x6790
movq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %r13, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r13
movq %r13, %rdi
pushq $0x1
popq %rsi
movl %esi, %r14d
movl %r12d, %edx
movl %ebp, %ecx
movl %ebp, %r12d
xorl %r8d, %r8d
callq 0x6790
movq %r15, %rdi
movq 0x68(%rsp), %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
pushq $0x2
popq %rbp
movl %ebp, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x6790
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl %r14d, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl %r12d, %r8d
callq 0x6790
movq 0x40(%rsp), %r14
movq %r14, %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
movl %ebp, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movl %r12d, %esi
pushq $0x2
popq %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r8
callq 0x6790
movq %r13, %rdi
movq 0x28(%rsp), %r15
movq %r15, %rsi
movl %r12d, %edx
movl %r12d, %r13d
movq %rbp, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
movl %esi, %r12d
pushq $0x2
popq %rdx
xorl %ecx, %ecx
movl %r13d, %r8d
callq 0x6790
movq 0x98(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movl %r13d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %rdi
movl %r12d, %esi
xorl %edx, %edx
movl %r13d, %ecx
pushq $0x2
popq %r12
movl %r12d, %r8d
callq 0x6790
movq 0x70(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
pushq $0x3
popq %rdx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
callq 0x6790
movq %r14, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rdx
movl %edx, %ebp
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
xorl %edx, %edx
pushq $0x3
popq %rcx
movl %ebp, %r8d
callq 0x6790
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
pushq $0x3
popq %rsi
movl %esi, %r13d
movl %r12d, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x6790
movq %r14, %rdi
movq 0x60(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x6790
movq 0x28(%rsp), %rdi
movq 0x78(%rsp), %rsi
movl %r13d, %edx
jmp 0xb63b
leaq 0x10(%rsp), %r13
pushq $0x2
popq %r14
pushq $0x1
popq %rcx
pushq $0x3
popq %r15
movq %r13, %rdi
xorl %esi, %esi
movl %r14d, %edx
movl %r15d, %r8d
callq 0x6790
movq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq 0x30(%rsp), %r12
movq %r12, %rsi
movl %r14d, %edx
movq %r13, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %r14d, %r13d
xorl %ecx, %ecx
pushq $0x1
popq %r8
callq 0x6790
movq %r12, %rdi
movq 0x48(%rsp), %r14
movq %r14, %rsi
movl %r15d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa5d2
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl %r13d, %edx
movl %r15d, %ecx
pushq $0x1
popq %r8
movl %r8d, %r13d
callq 0x6790
movq 0x88(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %r13d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
movl %r13d, %edx
movl %r15d, %ecx
movl %r15d, %r13d
xorl %r8d, %r8d
callq 0x6790
movq %r14, %r15
movq 0x90(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
pushq $0x2
popq %rdx
movl %edx, %ebp
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl %r13d, %edx
movl %ebp, %ecx
pushq $0x1
popq %rbp
movl %ebp, %r8d
callq 0x6790
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
pushq $0x2
popq %rsi
movl %r13d, %edx
movl %ebp, %ecx
movl %ebp, %r12d
xorl %r8d, %r8d
callq 0x6790
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r14
movq %r14, %rdi
pushq $0x2
popq %r15
movl %r15d, %esi
pushq $0x3
popq %rdx
movl %edx, %ebp
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x6790
movq %r13, %rdi
movq 0x68(%rsp), %rsi
movl %r15d, %edx
movl %r15d, %r13d
movq %r14, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebp, %r14d
movl %ebp, %esi
movl %r13d, %ebp
movl %r13d, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
callq 0x6790
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %r14d, %ecx
movl %r13d, %r8d
callq 0x6790
movq 0x40(%rsp), %r14
movq %r14, %rdi
movq 0x20(%rsp), %r13
movq %r13, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %ebp, %r12d
pushq $0x3
popq %rcx
xorl %r8d, %r8d
callq 0x6790
movq %r13, %rdi
movq 0x28(%rsp), %rbp
movq %rbp, %rsi
movl %r12d, %r13d
movl %r12d, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
pushq $0x3
popq %r12
movl %r12d, %edx
pushq $0x1
popq %rcx
movl %r13d, %r8d
callq 0x6790
movq 0x98(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movl %r12d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
callq 0x6790
movq 0x70(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %r12d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa734
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl %r12d, %edx
pushq $0x2
popq %r14
movl %r14d, %ecx
pushq $0x1
popq %r12
movl %r12d, %r8d
callq 0x6790
movq %rbp, %rdi
movq %r15, %rsi
movl %r12d, %edx
leaq 0x10(%rsp), %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
pushq $0x3
popq %rsi
movl %r14d, %edx
movl %r14d, %ebp
xorl %ecx, %ecx
movl %r12d, %r8d
callq 0x6790
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %r12d, %r13d
xorl %ecx, %ecx
pushq $0x3
popq %r12
movl %r12d, %r8d
callq 0x6790
movq %r14, %rdi
movq 0x60(%rsp), %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0xa5d2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x6790
movq 0x40(%rsp), %rdi
movq 0x78(%rsp), %rsi
movl %ebp, %edx
movq %r15, %rcx
callq 0xa5d2
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0xc0, %esi
movq %r13, %rdi
jmp 0xb6b9
movq %rax, %r14
movl $0xc0, %esi
movq 0x20(%rsp), %rdi
jmp 0xb6b9
movq %rax, %r14
movl $0xc0, %esi
movq 0x40(%rsp), %rdi
jmp 0xb6b9
movq %rax, %r14
movl $0xc0, %esi
movq 0x48(%rsp), %rdi
jmp 0xb6b9
movq %rax, %r14
movl $0xc0, %esi
movq 0x30(%rsp), %rdi
jmp 0xb6b9
movq %rax, %r14
movl $0xc0, %esi
movq 0x50(%rsp), %rdi
jmp 0xb6b9
movq %rax, %r14
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x3250
movq %r14, %rdi
callq 0x33d0
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0x3458
jmp 0xb6be
movq %rax, %r14
jmp 0xb6be
nop