// File: 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
movq %rsp, %rbp
subq $0x5d0, %rsp            # imm = 0x5D0
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x3560
movq -0x330(%rbp), %rdx
leaq 0xf142(%rip), %rsi      # 0x27537
leaq -0x30(%rbp), %rdi
callq 0x4e10
jmp 0x18400
leaq -0x30(%rbp), %rdi
movl $0x3, %esi
callq 0x4c10
jmp 0x18410
leaq -0x30(%rbp), %rdi
callq 0x35f8
leaq -0x31(%rbp), %rdi
callq 0x3360
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x20e40
movl %eax, -0x54(%rbp)
movl $0x40, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x338(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x179a0
jmp 0x18463
movq -0x338(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x20bc0
movq %rax, %rdi
callq 0x20e60
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x20bc0
movq %rax, %rdi
callq 0x20e60
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x20bc0
movq %rax, %rdi
callq 0x20e60
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x20bc0
movq %rax, %rdi
callq 0x20e60
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x20bc0
movq %rax, %rdi
callq 0x20e60
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x20bc0
movq %rax, %rdi
callq 0x20e60
movq %rax, -0x90(%rbp)
movq -0x60(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x20bc0
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x20bc0
movq %rax, -0xa0(%rbp)
movq -0x60(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x20bc0
movq %rax, -0xa8(%rbp)
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x20bc0
movq %rax, -0xb0(%rbp)
movq -0x60(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x20bc0
movq %rax, -0xb8(%rbp)
movq -0x60(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x20bc0
movq %rax, -0xc0(%rbp)
movq -0x98(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x20e80
movq -0xa0(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x20e80
movq -0xa8(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x20e80
movq -0xb0(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x20e80
movq -0xb8(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x20e80
movq -0xc0(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x20e80
movl $0x0, -0xc4(%rbp)
cmpl $0x6, -0xc4(%rbp)
jge 0x186c7
movq -0x8(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x20eb0
movq %rax, %rdi
callq 0x20e60
movq %rax, %rdi
movl $0x4, %esi
callq 0x20f50
movq -0x60(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x20eb0
movq %rax, %rdi
movl $0x5, %esi
callq 0x20f50
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x18616
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x18697
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x35f8
leaq -0x31(%rbp), %rdi
callq 0x3360
jmp 0x19638
movq -0x338(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x40, %esi
callq 0x3310
jmp 0x19638
movb -0x9(%rbp), %dl
movl $0x1, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0xc8(%rbp)
testb $0x1, -0x9(%rbp)
je 0x186f6
movq -0x88(%rbp), %rax
movq %rax, -0x340(%rbp)
jmp 0x18701
movq -0x80(%rbp), %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rax
movq %rax, -0xd0(%rbp)
testb $0x1, -0x9(%rbp)
je 0x18725
movq -0xb8(%rbp), %rax
movq %rax, -0x348(%rbp)
jmp 0x18733
movq -0xb0(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x360(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x358(%rbp)
movl -0xc8(%rbp), %eax
movl %eax, -0x34c(%rbp)
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
movl $0x2, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x360(%rbp), %rdi
movq -0x358(%rbp), %rsi
movl -0x34c(%rbp), %edx
leaq -0xe8(%rbp), %rcx
callq 0x17650
testb $0x1, -0x9(%rbp)
je 0x187bd
movq -0x90(%rbp), %rax
movq %rax, -0x368(%rbp)
jmp 0x187cb
movq -0x90(%rbp), %rax
movq %rax, -0x368(%rbp)
movq -0x368(%rbp), %rax
movq %rax, -0xd0(%rbp)
testb $0x1, -0x9(%rbp)
je 0x187ef
movq -0xc0(%rbp), %rax
movq %rax, -0x370(%rbp)
jmp 0x187fd
movq -0xc0(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x370(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x398(%rbp)
movl -0xc8(%rbp), %eax
movl %eax, -0x38c(%rbp)
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x388(%rbp)
xorl %esi, %esi
movl %esi, -0x380(%rbp)
movl $0x1, %edx
movl $0x2, %ecx
movl %ecx, -0x37c(%rbp)
movl $0x3, %r8d
callq 0x9cc0
movq -0x3a0(%rbp), %rdi
movq -0x398(%rbp), %rsi
movl -0x38c(%rbp), %edx
movq -0x388(%rbp), %rcx
callq 0x17650
movl $0xc0, %edi
callq 0x3300
movl -0x380(%rbp), %ecx
movl -0x37c(%rbp), %r8d
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x378(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %r9d
movq -0x98(%rbp), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
movl $0x6, %edx
callq 0x17070
jmp 0x188c9
movq -0x378(%rbp), %rax
movq %rax, -0x100(%rbp)
movl $0xc0, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3a8(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %r9d
movq -0xa0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movl $0x6, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x17070
jmp 0x18917
movq -0x3a8(%rbp), %rax
movq %rax, -0x108(%rbp)
movl $0xc0, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3b0(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %r9d
movq -0xa8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movl $0x6, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x17070
jmp 0x18965
movq -0x3b0(%rbp), %rax
movq %rax, -0x110(%rbp)
movl $0xc0, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3b8(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %r9d
movq -0xb0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movl $0x6, %edx
movl $0x2, %r8d
movl %r8d, %ecx
callq 0x17070
jmp 0x189b4
movq -0x3b8(%rbp), %rax
movq %rax, -0x118(%rbp)
movl $0xc0, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3c0(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %r9d
movq -0xb8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movl $0x6, %edx
movl $0x2, %r8d
movl %r8d, %ecx
callq 0x17070
jmp 0x18a03
movq -0x3c0(%rbp), %rax
movq %rax, -0x120(%rbp)
movl $0xc0, %edi
callq 0x3300
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3c8(%rbp)
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %r9d
movq -0xc0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movl $0x6, %edx
movl $0x2, %r8d
movl %r8d, %ecx
callq 0x17070
jmp 0x18a52
movq -0x3c8(%rbp), %rax
movq %rax, -0x128(%rbp)
testb $0x1, -0x9(%rbp)
je 0x190b3
movq -0x100(%rbp), %rax
movq %rax, -0x4c8(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x4c0(%rbp)
leaq -0x138(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x2, %r8d
callq 0x9cc0
movq -0x4c8(%rbp), %rdi
movq -0x4c0(%rbp), %rsi
movl $0x1, %edx
leaq -0x138(%rbp), %rcx
callq 0x17390
movq -0x108(%rbp), %rax
movq %rax, -0x4b8(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x4b0(%rbp)
leaq -0x148(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x4b8(%rbp), %rdi
movq -0x4b0(%rbp), %rsi
movl $0x2, %edx
leaq -0x148(%rbp), %rcx
callq 0x17390
movq -0x68(%rbp), %rax
movq %rax, -0x4a8(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x4a0(%rbp)
leaq -0x158(%rbp), %rdi
movl $0x2, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x4a8(%rbp), %rdi
movq -0x4a0(%rbp), %rsi
movl $0x1, %edx
leaq -0x158(%rbp), %rcx
callq 0x17650
movq -0x80(%rbp), %rax
movq %rax, -0x498(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x490(%rbp)
leaq -0x168(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x498(%rbp), %rdi
movq -0x490(%rbp), %rsi
movl $0x2, %edx
leaq -0x168(%rbp), %rcx
callq 0x17650
movq -0x100(%rbp), %rax
movq %rax, -0x488(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x480(%rbp)
leaq -0x178(%rbp), %rdi
movl $0x2, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x488(%rbp), %rdi
movq -0x480(%rbp), %rsi
movl $0x2, %edx
leaq -0x178(%rbp), %rcx
callq 0x17390
movq -0x108(%rbp), %rax
movq %rax, -0x478(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x470(%rbp)
leaq -0x188(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x9cc0
movq -0x478(%rbp), %rdi
movq -0x470(%rbp), %rsi
movl $0x3, %edx
leaq -0x188(%rbp), %rcx
callq 0x17390
movq -0x108(%rbp), %rax
movq %rax, -0x468(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x460(%rbp)
leaq -0x198(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x468(%rbp), %rdi
movq -0x460(%rbp), %rsi
xorl %edx, %edx
leaq -0x198(%rbp), %rcx
callq 0x17390
movq -0x110(%rbp), %rax
movq %rax, -0x458(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x450(%rbp)
leaq -0x1a8(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x458(%rbp), %rdi
movq -0x450(%rbp), %rsi
movl $0x1, %edx
leaq -0x1a8(%rbp), %rcx
callq 0x17390
movq -0x118(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x440(%rbp)
leaq -0x1b8(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x448(%rbp), %rdi
movq -0x440(%rbp), %rsi
movl $0x2, %edx
leaq -0x1b8(%rbp), %rcx
callq 0x17390
movq -0x120(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x430(%rbp)
leaq -0x1c8(%rbp), %rdi
movl $0x3, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x438(%rbp), %rdi
movq -0x430(%rbp), %rsi
movl $0x3, %edx
leaq -0x1c8(%rbp), %rcx
callq 0x17390
movq -0x78(%rbp), %rax
movq %rax, -0x428(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x1d8(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x428(%rbp), %rdi
movq -0x420(%rbp), %rsi
movl $0x3, %edx
leaq -0x1d8(%rbp), %rcx
callq 0x17650
movq -0x90(%rbp), %rax
movq %rax, -0x418(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x410(%rbp)
leaq -0x1e8(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
movl $0x3, %ecx
movl $0x2, %r8d
callq 0x9cc0
movq -0x418(%rbp), %rdi
movq -0x410(%rbp), %rsi
movl $0x3, %edx
leaq -0x1e8(%rbp), %rcx
callq 0x17650
movq -0x118(%rbp), %rax
movq %rax, -0x408(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x400(%rbp)
leaq -0x1f8(%rbp), %rdi
movl $0x2, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x408(%rbp), %rdi
movq -0x400(%rbp), %rsi
movl $0x1, %edx
leaq -0x1f8(%rbp), %rcx
callq 0x17390
movq -0x120(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x3f0(%rbp)
leaq -0x208(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x3f8(%rbp), %rdi
movq -0x3f0(%rbp), %rsi
movl $0x2, %edx
leaq -0x208(%rbp), %rcx
callq 0x17390
movq -0x120(%rbp), %rax
movq %rax, -0x3e8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x3e0(%rbp)
leaq -0x218(%rbp), %rdi
movl $0x3, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x3e8(%rbp), %rdi
movq -0x3e0(%rbp), %rsi
xorl %edx, %edx
leaq -0x218(%rbp), %rcx
callq 0x17390
movq -0x128(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x3d0(%rbp)
leaq -0x228(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x3d8(%rbp), %rdi
movq -0x3d0(%rbp), %rsi
movl $0x3, %edx
leaq -0x228(%rbp), %rcx
callq 0x17390
jmp 0x1962b
movq -0x378(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xc0, %esi
callq 0x3310
jmp 0x19638
movq -0x3a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xc0, %esi
callq 0x3310
jmp 0x19638
movq -0x3b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xc0, %esi
callq 0x3310
jmp 0x19638
movq -0x3b8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xc0, %esi
callq 0x3310
jmp 0x19638
movq -0x3c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xc0, %esi
callq 0x3310
jmp 0x19638
movq -0x3c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xc0, %esi
callq 0x3310
jmp 0x19638
movq -0x100(%rbp), %rax
movq %rax, -0x5c8(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x5c0(%rbp)
leaq -0x238(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x5c8(%rbp), %rdi
movq -0x5c0(%rbp), %rsi
movl $0x2, %edx
leaq -0x238(%rbp), %rcx
callq 0x17390
movq -0x108(%rbp), %rax
movq %rax, -0x5b8(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x5b0(%rbp)
leaq -0x248(%rbp), %rdi
movl $0x3, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x5b8(%rbp), %rdi
movq -0x5b0(%rbp), %rsi
movl $0x3, %edx
leaq -0x248(%rbp), %rcx
callq 0x17390
movq -0x68(%rbp), %rax
movq %rax, -0x5a8(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x5a0(%rbp)
leaq -0x258(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x5a8(%rbp), %rdi
movq -0x5a0(%rbp), %rsi
movl $0x1, %edx
leaq -0x258(%rbp), %rcx
callq 0x17650
movq -0x80(%rbp), %rax
movq %rax, -0x598(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x590(%rbp)
leaq -0x268(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x598(%rbp), %rdi
movq -0x590(%rbp), %rsi
movl $0x2, %edx
leaq -0x268(%rbp), %rcx
callq 0x17650
movq -0x110(%rbp), %rax
movq %rax, -0x588(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x580(%rbp)
leaq -0x278(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x2, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x588(%rbp), %rdi
movq -0x580(%rbp), %rsi
movl $0x3, %edx
leaq -0x278(%rbp), %rcx
callq 0x17390
movq -0x108(%rbp), %rax
movq %rax, -0x578(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x570(%rbp)
leaq -0x288(%rbp), %rdi
movl $0x2, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x578(%rbp), %rdi
movq -0x570(%rbp), %rsi
xorl %edx, %edx
leaq -0x288(%rbp), %rcx
callq 0x17390
movq -0x108(%rbp), %rax
movq %rax, -0x568(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x560(%rbp)
leaq -0x298(%rbp), %rdi
movl $0x2, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x568(%rbp), %rdi
movq -0x560(%rbp), %rsi
movl $0x2, %edx
leaq -0x298(%rbp), %rcx
callq 0x17390
movq -0x100(%rbp), %rax
movq %rax, -0x558(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x550(%rbp)
leaq -0x2a8(%rbp), %rdi
movl $0x3, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x558(%rbp), %rdi
movq -0x550(%rbp), %rsi
movl $0x1, %edx
leaq -0x2a8(%rbp), %rcx
callq 0x17390
movq -0x118(%rbp), %rax
movq %rax, -0x548(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0x2b8(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x2, %r8d
callq 0x9cc0
movq -0x548(%rbp), %rdi
movq -0x540(%rbp), %rsi
movl $0x1, %edx
leaq -0x2b8(%rbp), %rcx
callq 0x17390
movq -0x120(%rbp), %rax
movq %rax, -0x538(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x530(%rbp)
leaq -0x2c8(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x9cc0
movq -0x538(%rbp), %rdi
movq -0x530(%rbp), %rsi
movl $0x2, %edx
leaq -0x2c8(%rbp), %rcx
callq 0x17390
movq -0x78(%rbp), %rax
movq %rax, -0x528(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x520(%rbp)
leaq -0x2d8(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x9cc0
movq -0x528(%rbp), %rdi
movq -0x520(%rbp), %rsi
movl $0x3, %edx
leaq -0x2d8(%rbp), %rcx
callq 0x17650
movq -0x90(%rbp), %rax
movq %rax, -0x518(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x510(%rbp)
leaq -0x2e8(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x518(%rbp), %rdi
movq -0x510(%rbp), %rsi
movl $0x3, %edx
leaq -0x2e8(%rbp), %rcx
callq 0x17650
movq -0x128(%rbp), %rax
movq %rax, -0x508(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x500(%rbp)
leaq -0x2f8(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x2, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x508(%rbp), %rdi
movq -0x500(%rbp), %rsi
movl $0x1, %edx
leaq -0x2f8(%rbp), %rcx
callq 0x17390
movq -0x120(%rbp), %rax
movq %rax, -0x4f8(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x4f0(%rbp)
leaq -0x308(%rbp), %rdi
movl $0x3, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x4f8(%rbp), %rdi
movq -0x4f0(%rbp), %rsi
xorl %edx, %edx
leaq -0x308(%rbp), %rcx
callq 0x17390
movq -0x120(%rbp), %rax
movq %rax, -0x4e8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x4e0(%rbp)
leaq -0x318(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x3, %r8d
callq 0x9cc0
movq -0x4e8(%rbp), %rdi
movq -0x4e0(%rbp), %rsi
movl $0x3, %edx
leaq -0x318(%rbp), %rcx
callq 0x17390
movq -0x118(%rbp), %rax
movq %rax, -0x4d8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x4d0(%rbp)
leaq -0x328(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x9cc0
movq -0x4d8(%rbp), %rdi
movq -0x4d0(%rbp), %rsi
movl $0x2, %edx
leaq -0x328(%rbp), %rcx
callq 0x17390
movq -0x60(%rbp), %rax
addq $0x5d0, %rsp            # imm = 0x5D0
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3550
nopw %cs:(%rax,%rax)