LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/mittman[P]project254/cycle.cpp
// Function: Cycle::plusType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Cycle::plusType(const string cycle, const string direction) {
	if(direction == "D-to-S" && cycle == "Read") {
		++dsReads;
	}
	else if(direction == "D-to-S" && cycle == "Write") {
		++dsWrites;
	}
	else if(direction == "S-to-D" && cycle == "Read") {
		++sdReads;
	}
	else if(direction == "S-to-D" && cycle == "Write") {
		++sdWrites;
	}
	else {
		++errors;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7161(%rip), %rsi      # 0xa056
movq %rdx, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2f14
leaq 0x713c(%rip), %rsi      # 0xa044
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2f8b
leaq 0x713b(%rip), %rsi      # 0xa056
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2f3a
leaq 0x710d(%rip), %rsi      # 0xa03b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2f8f
leaq 0x711c(%rip), %rsi      # 0xa05d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2f60
leaq 0x70f0(%rip), %rsi      # 0xa044
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2f94
leaq 0x70f6(%rip), %rsi      # 0xa05d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2f86
leaq 0x70c1(%rip), %rsi      # 0xa03b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2f99
incl 0x10(%rbx)
jmp 0x2f9c
incl (%rbx)
jmp 0x2f9c
incl 0x4(%rbx)
jmp 0x2f9c
incl 0x8(%rbx)
jmp 0x2f9c
incl 0xc(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mittman[P]project254/cycle.cpp
// Function: Cycle::getBits(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Cycle::getBits(const string cycle, const string direction) {
	if(direction == "D-to-S" && cycle == "Read") {
		return dsReads * 32;
	}
	else if(direction == "D-to-S" && cycle == "Write") {
		return dsWrites * 32;
	}
	else if(direction == "S-to-D" && cycle == "Read") {
		return sdReads * 32;
	}
	else if(direction == "S-to-D" && cycle == "Write") {
		return sdWrites * 32;
	}
	else {
		return errors * 32;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x709f(%rip), %rsi      # 0xa056
movq %rdx, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2fd6
leaq 0x707a(%rip), %rsi      # 0xa044
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x304c
leaq 0x7079(%rip), %rsi      # 0xa056
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2ffc
leaq 0x704b(%rip), %rsi      # 0xa03b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x3057
leaq 0x705a(%rip), %rsi      # 0xa05d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x3022
leaq 0x702e(%rip), %rsi      # 0xa044
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x305d
leaq 0x7034(%rip), %rsi      # 0xa05d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x3048
leaq 0x6fff(%rip), %rsi      # 0xa03b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x3063
addq $0x10, %rbx
movl (%rbx), %eax
shll $0x5, %eax
popq %rbx
popq %r14
popq %r15
retq
addq $0x4, %rbx
jmp 0x304c
addq $0x8, %rbx
jmp 0x304c
addq $0xc, %rbx
jmp 0x304c
nop
// File: /workspace/github_cpp_makefile_star2_O3/mittman[P]project254/cycle.cpp
// Function: Cycle::getElapsed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
long Cycle::getElapsed(const string cycle, const string direction) {
	if(direction == "D-to-S" && cycle == "Read") {
		return dsrTime;
	}
	else if(direction == "D-to-S" && cycle == "Write") {
		return dswTime;
	}
	else if(direction == "S-to-D" && cycle == "Read") {
		return sdrTime;
	}
	else if(direction == "S-to-D" && cycle == "Write") {
		return sdwTime;
	}
	else {
		return errTime;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6fd7(%rip), %rsi      # 0xa056
movq %rdx, %rdi
callq 0x2070
testl %eax, %eax
jne 0x309e
leaq 0x6fb2(%rip), %rsi      # 0xa044
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x3117
leaq 0x6fb1(%rip), %rsi      # 0xa056
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x30c4
leaq 0x6f83(%rip), %rsi      # 0xa03b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x311e
leaq 0x6f92(%rip), %rsi      # 0xa05d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x30ea
leaq 0x6f66(%rip), %rsi      # 0xa044
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x3125
leaq 0x6f6c(%rip), %rsi      # 0xa05d
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x3110
leaq 0x6f37(%rip), %rsi      # 0xa03b
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x312c
movl $0x38, %eax
jmp 0x3131
movl $0x18, %eax
jmp 0x3131
movl $0x20, %eax
jmp 0x3131
movl $0x28, %eax
jmp 0x3131
movl $0x30, %eax
movq (%rbx,%rax), %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/elarielcl[P]ArielsSequitur/TestSequitur.cpp
// Function: numberOfRulesTest(char*, int)
void numberOfRulesTest(char string[], int expectedNOR) {
  cout << "INPUT=" << string << endl;
  SequiturGrammar* grammar = new SequiturGrammar();
  for (int i = 0; string[i]!=0; ++i)
    grammar->put(string[i]);
  if (grammar->numberOfRules == expectedNOR) cout << "SUCCESSFUL TEST (GrammarSize == expected)" << endl;
  else {
    cout << "WRONG TEST (NumberOfRules(" << grammar->numberOfRules << ") != expected("<< expectedNOR << "))" << endl;
    exit(1);
  }

  cout << "================" << endl << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %r15
movq 0x615f(%rip), %rbx      # 0x8fd8
leaq 0x327f(%rip), %rsi      # 0x60ff
movl $0x6, %edx
movq %rbx, %rdi
callq 0x2190
testq %r15, %r15
je 0x2eae
movq %r15, %rdi
callq 0x20a0
movq 0x6137(%rip), %rdi      # 0x8fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2190
jmp 0x2ec5
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl $0x28, %edi
callq 0x2160
movq %rax, %r12
movq %rax, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x774dfe0, %edx        # imm = 0x774DFE0
callq 0x42dc
movb (%r15), %al
testb %al, %al
je 0x2f2a
incq %r15
movsbl %al, %esi
movq %r12, %rdi
callq 0x4372
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x2f15
cmpl %r14d, 0x18(%r12)
jne 0x2fdd
leaq 0x3203(%rip), %rsi      # 0x613f
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
leaq 0x313e(%rip), %rsi      # 0x60b5
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20d0
movq 0x5ff4(%rip), %rdi      # 0x8fd8
leaq 0x31a9(%rip), %rsi      # 0x6194
callq 0x2150
movl 0x18(%r12), %esi
movq %rax, %rdi
callq 0x2200
leaq 0x317e(%rip), %rsi      # 0x6182
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movl %r14d, %esi
callq 0x2200
leaq 0x3173(%rip), %rsi      # 0x6191
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20b0
movl $0x1, %edi
callq 0x21a0
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/elarielcl[P]ArielsSequitur/TestSequitur.cpp
// Function: grammarSizeTest(char*, int)
void grammarSizeTest(char string[], int expectedGrammarSize) {
  cout << "INPUT=" << string << endl;
  SequiturGrammar* grammar = new SequiturGrammar();
  for (int i = 0; string[i]!=0; ++i)
    grammar->put(string[i]);
  if (grammar->grammarSize == expectedGrammarSize) cout << "SUCCESSFUL TEST (GrammarSize == expected)" << endl;
  else {
    cout << "WRONG TEST (GrammarSize(" << grammar->grammarSize << ") != expected("<< expectedGrammarSize << "))" << endl;
    exit(1);
  }

  cout << "================" << endl << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %r15
movq 0x5f70(%rip), %rbx      # 0x8fd8
leaq 0x3090(%rip), %rsi      # 0x60ff
movl $0x6, %edx
movq %rbx, %rdi
callq 0x2190
testq %r15, %r15
je 0x309d
movq %r15, %rdi
callq 0x20a0
movq 0x5f48(%rip), %rdi      # 0x8fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2190
jmp 0x30b4
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl $0x28, %edi
callq 0x2160
movq %rax, %r12
movq %rax, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x774dfe0, %edx        # imm = 0x774DFE0
callq 0x42dc
movb (%r15), %al
testb %al, %al
je 0x3119
incq %r15
movsbl %al, %esi
movq %r12, %rdi
callq 0x4372
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x3104
cmpl %r14d, 0x10(%r12)
jne 0x31cc
leaq 0x3014(%rip), %rsi      # 0x613f
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
leaq 0x2f4f(%rip), %rsi      # 0x60b5
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20d0
movq 0x5e05(%rip), %rdi      # 0x8fd8
leaq 0x2f8f(%rip), %rsi      # 0x6169
callq 0x2150
movl 0x10(%r12), %esi
movq %rax, %rdi
callq 0x2200
leaq 0x2f8f(%rip), %rsi      # 0x6182
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movl %r14d, %esi
callq 0x2200
leaq 0x2f84(%rip), %rsi      # 0x6191
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20b0
movl $0x1, %edi
callq 0x21a0
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/ridgelab[P]Kmer-SSR/test/src/task.cpp
// Function: main
int main()
{
	Task task1 = Task();
	Task task2("SomeSeqID", "ACGTGTACGATCGACTACGATCACACACGT", 237, 946);

	//cout << task1.toString() << endl;
	//cout << task2.toString() << endl;
	
	cout << "\n\033[0;34mTask Test: ";

	bool pass = true;

	if (pass)
	{
		cout << "\033[0;32mOK\033[0m" << endl;
	}
	else
	{
		cout << "\033[0;31mFAIL\033[0m" << endl;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
leaq 0x88(%rsp), %rdi
callq 0x251c
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xcdf(%rip), %rsi       # 0x3004
leaq 0xce1(%rip), %rdx       # 0x300d
leaq 0x20(%rsp), %rdi
callq 0x2484
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xcc8(%rip), %rsi       # 0x300e
leaq 0xcdf(%rip), %rdx       # 0x302c
movq %rsp, %rdi
callq 0x2484
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movl $0xed, %ecx
movl $0x3b2, %r8d            # imm = 0x3B2
callq 0x2540
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2388
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20f0
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x239f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20f0
movq 0x2c32(%rip), %rdi      # 0x4fd8
leaq 0xc80(%rip), %rsi       # 0x302d
movl $0x13, %edx
callq 0x2130
movq 0x2c1a(%rip), %rbx      # 0x4fd8
leaq 0xc7c(%rip), %rsi       # 0x3041
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2130
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq 0x2be8(%rip), %rdi      # 0x4fd8
callq 0x2030
movq %rax, %rdi
callq 0x2080
leaq 0x40(%rsp), %rdi
callq 0x25d0
leaq 0x88(%rsp), %rdi
callq 0x25d0
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2461
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2443
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20f0
jmp 0x2443
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x246e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20f0
jmp 0x246e
movq %rax, %rbx
jmp 0x246e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x25d0
leaq 0x88(%rsp), %rdi
callq 0x25d0
movq %rbx, %rdi
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/global.cpp
// Function: set_globals_to_defaults()
void set_globals_to_defaults()
{
	// Reset the global options to their defaults.
	GLOBAL_debugging_level = 0;
	GLOBAL_warnings = true;
	GLOBAL_optimise = true;
	GLOBAL_calculate_peripheral_curves = true;
	GLOBAL_message_stream = "";
}

// Assembly:
movl $0x0, 0x1a13a(%rip)     # 0x1e330
movb $0x1, %al
movb %al, 0x1a02a(%rip)      # 0x1e228
movb %al, 0x1a025(%rip)      # 0x1e229
movb %al, 0x1a020(%rip)      # 0x1e22a
movq 0x1a12f(%rip), %rdx     # 0x1e340
leaq 0x1a120(%rip), %rdi     # 0x1e338
leaq 0x1311a(%rip), %rcx     # 0x17339
xorl %esi, %esi
xorl %r8d, %r8d
jmp 0x3340
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/global.cpp
// Function: output_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void output_error(const std::string strn)
{
	if (GLOBAL_warnings)
		GLOBAL_message_stream += "Error: " + strn + "\n";
	
	throw -1;
	return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpb $0x1, 0x19e6a(%rip)     # 0x1e228
jne 0x4471
movq %rdi, %rdx
leaq 0x12c88(%rip), %rsi     # 0x17056
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x44d4
leaq 0x12c72(%rip), %rsi     # 0x17054
movq %rbx, %rdi
callq 0x3420
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
jne 0x440e
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
jmp 0x441b
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19efe(%rip), %rdi     # 0x1e338
callq 0x30d0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4456
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4471
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3220
movl $0x4, %edi
callq 0x3130
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x19b18(%rip), %rsi     # 0x1dfa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x33b0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x44b1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0x44b1
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x44cc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.h
// Function: perm::perm(int, int, int, int)
perm(int im0, int im1, int im2, int im3)
	{
		image[0] = im0;
		image[1] = im1;
		image[2] = im2;
		image[3] = im3;
		
		// Make sure the thing that we've just made is a permutation.
		// As users have no direct control over permutations, this is to check hard coded permutations are valid.
		for (int i=0; i<4; i++)
			for (int j=i+1; j<4; j++)
				if (image[i] == image[j]) output_error("Invalid permutation.");
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movl %r8d, 0xc(%rdi)
movl $0x1, %r15d
leaq 0x18(%rsp), %r13
xorl %r14d, %r14d
leaq 0x8(%rsp), %r12
cmpq $0x2, %r14
ja 0x88e5
movq %r15, %rbp
movl (%rbx,%r14,4), %eax
cmpl (%rbx,%rbp,4), %eax
jne 0x88dc
movq %r13, 0x8(%rsp)
movq %r12, %rdi
leaq 0xe99e(%rip), %rsi      # 0x1724f
leaq 0xe9ab(%rip), %rdx      # 0x17263
callq 0x892e
movq %r12, %rdi
callq 0x43b0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x88dc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
incq %rbp
cmpq $0x4, %rbp
jne 0x8899
incq %r14
incq %r15
cmpq $0x4, %r14
jne 0x8890
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x891a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/parsing.cpp
// Function: load_file_contents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string load_file_contents(const std::string file)
{
	std::ifstream myfile(file.c_str());
	if (! myfile.is_open())
		output_error("Unknown file requested.");
	
	std::string line = "";
	std::string contents = "";
	while (myfile.good())
	{
		getline (myfile, line);
		contents += line + "\n";
	}
	myfile.close();
	
	return contents;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rbx
movq (%rsi), %rsi
leaq 0x70(%rsp), %rdi
movl $0x8, %edx
callq 0x3400
leaq 0xe8(%rsp), %rdi
callq 0x3090
testb %al, %al
jne 0xa275
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xd0da(%rip), %rsi      # 0x1731d
leaq 0xd0ea(%rip), %rdx      # 0x17334
leaq 0x50(%rsp), %rdi
callq 0x892e
leaq 0x50(%rsp), %rdi
callq 0x43b0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa275
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xd0b4(%rip), %rdx      # 0x17339
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x892e
leaq 0x10(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rbx)
leaq 0xd094(%rip), %rdx      # 0x17339
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x892e
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x90(%rsp,%rax)
jne 0xa367
leaq (%rsp,%rax), %rdi
addq $0x70, %rdi
leaq 0x20(%rsp), %rbp
leaq 0x70(%rsp), %r14
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xcd6a(%rip), %r13      # 0x17054
movl $0xa, %esi
callq 0x3200
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3410
movq %rbp, 0x10(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x89c4
movq %r12, %rdi
movq %r13, %rsi
callq 0x3420
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x30d0
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa350
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3220
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x70, %rdi
cmpl $0x0, 0x20(%rdi)
je 0xa2ea
leaq 0x70(%rsp), %rdi
callq 0x3080
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa38d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x70(%rsp), %rdi
callq 0x30a0
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa427
movq 0x60(%rsp), %rsi
jmp 0xa41f
jmp 0xa3c9
jmp 0xa3ee
movq %rax, %r14
jmp 0xa40b
movq %rax, %r14
jmp 0xa427
jmp 0xa3ee
jmp 0xa3d2
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa3f1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3220
jmp 0xa3f1
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xa40b
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3220
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa427
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x70(%rsp), %rdi
callq 0x30a0
movq %r14, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/parsing.cpp
// Function: count_substring(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int count_substring(const std::string inpt, const std::string search_for)
{
	int count = 0;
	for (size_t pos = inpt.find(search_for); pos != std::string::npos; count++)
		pos = inpt.find(search_for, pos + 1);
	
	return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
movq 0x8(%rbx), %rcx
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x33d0
cmpq $-0x1, %rax
je 0xa47c
xorl %r15d, %r15d
incq %rax
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rdx
callq 0x33d0
incl %r15d
cmpq $-0x1, %rax
jne 0xa45e
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/parsing.cpp
// Function: remove_whitespace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string remove_whitespace(const std::string inpt)
{
	std::string output = "";
	output.reserve(inpt.size());
	size_t marker = 0, next_marker = 0;
	
	do
	{
		next_marker = inpt.find_first_of(" \t", marker);  // Could filter out more characters here.
		output += inpt.substr(marker, next_marker - marker);
		marker = next_marker + 1;  // Skip over the bad character.
	} while (marker != 0);  // When next_marker == std::string::npos, marker == std::string::npos + 1 == 0.
	
	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
leaq 0xcdd2(%rip), %rdx      # 0x17339
movq %rdx, %rsi
callq 0x892e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x3360
xorl %ebp, %ebp
leaq 0xcdb3(%rip), %r15      # 0x17337
leaq 0x8(%rsp), %r12
movl $0x2, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x3320
movq %rax, %r13
movq %rax, %rcx
subq %rbp, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x3240
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x30d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa5e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
incq %r13
movq %r13, %rbp
jne 0xa589
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa5fd
movq %rax, %r14
jmp 0xa621
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa621
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0xa639
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3220
movq %r14, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/parsing.cpp
// Function: digit_length(int)
int digit_length(int n)
{
	int c = 0;
	if (n <= 0) c++;
	while (n != 0)
	{
	   n  /= 10;
	   c++;
	}
	return c;
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
setle %al
je 0xa9b6
movslq %edi, %rcx
imulq $0x66666667, %rcx, %rdi # imm = 0x66666667
movq %rdi, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rdi
addl %edx, %edi
incl %eax
addl $0x9, %ecx
cmpl $0x12, %ecx
ja 0xa995
retq
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: perm::inverse() const
perm perm::inverse() const
{
	perm outp;
	
	for (int i = 0; i < 4; i++)
		outp.image[image[i]] = i;
	
	return outp;
}

// Assembly:
movq %rdi, %rax
movaps 0x968e(%rip), %xmm0     # 0x174b0
movups %xmm0, (%rdi)
xorl %ecx, %ecx
movslq (%rsi,%rcx,4), %rdx
movl %ecx, (%rax,%rdx,4)
incq %rcx
cmpq $0x4, %rcx
jne 0xde27
retq
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: perm::of(perm const&) const
perm perm::of(const perm &other) const
{
	perm outp;
	
	for (int i=0; i<4; i++)
		outp.image[i] = image[other.image[i]];
	
	return outp;
}

// Assembly:
movq %rdi, %rax
movaps 0x966e(%rip), %xmm0     # 0x174b0
movups %xmm0, (%rdi)
xorl %ecx, %ecx
movslq (%rdx,%rcx,4), %rdi
movl (%rsi,%rdi,4), %edi
movl %edi, (%rax,%rcx,4)
incq %rcx
cmpq $0x4, %rcx
jne 0xde47
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: tetra::tetra(manifold*, Category, Position, Side, int, tetra*)
tetra::tetra(manifold *M, Category mycategory, Position myposition, Side myside, int mylayer, tetra *my_parent)
{
	output_debugging("tet", 3);
	
	for (int i = 0; i < 4; i++)
		gluedto[i] = NULL;
	
	// There's nothing canonical to put in gluing[],
	// so we put in the identity permutation.
	for (int i = 0; i < 4; i++)
		gluing[i] = perm(1,0,2,3);
	
	next = NULL;
	prev = NULL;
	
	parent = my_parent;
	if (my_parent != NULL) my_parent->child = this;
	child = NULL;
	
	M->onemore(this);  // Add this new tetra to the doubly linked list of tetras.
	
	category = mycategory;
	position = myposition;
	side = myside;
	layer = mylayer;
	
	snap_index = -1;  // Index only determined when snap_print is called.
	cusp_number = -1;  // The cusp number of vertex 3 because vertices 0, 1 and 2 are always material.
	temp = -1;
	for (int i = 0; i < 4; i++)
	{
		peripheral_curves[longitude][i] = 0;
		peripheral_curves[meridian][i] = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movq 0x80(%rsp), %r14
movl $0x30, %eax
movaps 0x961b(%rip), %xmm0     # 0x174b0
movups %xmm0, (%rbx,%rax)
addq $0x10, %rax
cmpq $0x70, %rax
jne 0xde95
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x968f(%rip), %rsi      # 0x17542
leaq 0x968b(%rip), %rdx      # 0x17545
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x892e
movq %rbp, %rdi
movl $0x3, %esi
callq 0x4229
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0xdeeb
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3220
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movl $0x30, %r15d
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
movl $0x1, %esi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x3, %r8d
callq 0x8860
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rbx,%r15)
addq $0x10, %r15
cmpq $0x70, %r15
jne 0xdf01
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %r14, 0x80(%rbx)
testq %r14, %r14
je 0xdf48
movq %rbx, 0x88(%r14)
movq $0x0, 0x88(%rbx)
movq 0x8(%r13), %rax
testq %rax, %rax
je 0xdf65
movq %rbx, (%rax)
movq %rax, 0x8(%rbx)
jmp 0xdf69
movq %rbx, (%r13)
movq %rbx, 0x8(%r13)
movl %r12d, 0x70(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x74(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x78(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0x90(%rbx)
movl $0xffffffff, 0xbc(%rbx) # imm = 0xFFFFFFFF
movq $-0x1, 0xb4(%rbx)
movups %xmm0, 0x94(%rbx)
movups %xmm0, 0xa4(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0xdfd5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: tetra::gluesym(tetra*, int, perm const&)
void tetra::gluesym(tetra *whereglue, int whichface, const perm &how)
{
	if ( (gluedto[whichface] != NULL) || (whereglue->gluedto[how[whichface]] != NULL) )
		output_error("Invalid gluing. Possible causes; self-intersecting curves, intersecting 2-handles.");
	
	this->set_gluedto(whichface, whereglue);
	this->set_gluing(whichface,how);
	
	whereglue->set_gluedto(how[whichface], this);
	whereglue->set_gluing(how[whichface], how.inverse());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movslq %edx, %r12
cmpq $0x0, 0x10(%rdi,%r12,8)
jne 0xe07c
movslq (%r14,%r12,4), %rax
cmpq $0x0, 0x10(%rbx,%rax,8)
je 0xe0bf
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x94ba(%rip), %rsi      # 0x17546
leaq 0x9505(%rip), %rdx      # 0x17598
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x892e
movq %r13, %rdi
callq 0x43b0
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0xe0bf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, 0x10(%r15,%r12,8)
movups (%r14), %xmm0
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
movq %r15, %rdi
movl %r12d, %esi
callq 0x13a5e
movslq (%r14,%r12,4), %rsi
movq %r15, 0x10(%rbx,%rsi,8)
movaps 0x93c5(%rip), %xmm0     # 0x174b0
movaps %xmm0, (%rsp)
xorl %eax, %eax
movslq (%r14,%rax,4), %rcx
movl %eax, (%rsp,%rcx,4)
incq %rax
cmpq $0x4, %rax
jne 0xe0f1
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x13a5e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0xe135
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: tetra::ungluesym(int)
void tetra::ungluesym(int whichface)
{
	if (gluedto[whichface] == NULL) 
		return;  // This is correct as it simplifies later loops.
	
	if (gluedto[whichface]->get_gluedto(gluing[whichface][whichface]) == NULL)
		output_error("Non-symmetric gluing detected.");
	
	gluedto[whichface]->set_gluedto(gluing[whichface][whichface], NULL);  // Unglue him from me.
	this->set_gluedto(whichface, NULL);  // Then unglue me from him.
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movslq %esi, %r15
movq 0x10(%rdi,%r15,8), %rax
testq %rax, %rax
je 0xe1d0
movq %rdi, %rbx
movq %r15, %r12
shlq $0x4, %r12
leaq (%rdi,%r12), %rcx
movslq 0x30(%rcx,%r15,4), %rcx
cmpq $0x0, 0x10(%rax,%rcx,8)
jne 0xe1b3
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x9416(%rip), %rsi      # 0x17599
leaq 0x942d(%rip), %rdx      # 0x175b7
movq %rsp, %r14
movq %r14, %rdi
callq 0x892e
movq %r14, %rdi
callq 0x43b0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xe1b3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3220
leaq (%rbx,%r12), %rax
addq $0x30, %rax
movq 0x10(%rbx,%r15,8), %rcx
movslq (%rax,%r15,4), %rax
xorl %edx, %edx
movq %rdx, 0x10(%rcx,%rax,8)
movq %rdx, 0x10(%rbx,%r15,8)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xe1f7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: tetra::subbedby(tetra*, int, perm const&)
void tetra::subbedby(tetra *whereglue, int whichface, const perm &how)
{
	// before:    A-B   D free
	// after:     A free   D-B
	
	// A: this
	// D: whereglue
	// B: *gluedto[whichface]
	
	// "how" maps vertices of A to vertices of D
	// (Identity means glue D to B just like A was glued)
	// "how" should be an even permutation.
	
	if (gluedto[whichface] == NULL)
		return;
	if (whereglue->gluedto[how[whichface]] != NULL)
		output_error("Invalid subbedby. Attempted to substitute non-free face.");
	
	perm AtoB = gluing[whichface];
	
	tetra *B = gluedto[whichface];
	ungluesym(whichface);  // Separate A & B.
	B->gluesym(whereglue, AtoB[whichface], how.of(AtoB.inverse()));  // Glue B to D.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movslq %edx, %r15
cmpq $0x0, 0x10(%rdi,%r15,8)
je 0xe2e6
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movslq (%rcx,%r15,4), %rax
cmpq $0x0, 0x10(%rsi,%rax,8)
je 0xe275
leaq 0x48(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x9376(%rip), %rsi      # 0x175b8
leaq 0x93a7(%rip), %rdx      # 0x175f0
leaq 0x38(%rsp), %r13
movq %r13, %rdi
callq 0x892e
movq %r13, %rdi
callq 0x43b0
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0xe275
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3220
movq %r15, %rax
shlq $0x4, %rax
movups 0x30(%r12,%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x10(%r12,%r15,8), %r13
movq %r12, %rdi
movl %r15d, %esi
callq 0xe13e
movl 0x20(%rsp,%r15,4), %edx
movaps 0x920d(%rip), %xmm0     # 0x174b0
movaps %xmm0, (%rsp)
xorl %eax, %eax
movslq 0x20(%rsp,%rax,4), %rcx
movl %eax, (%rsp,%rcx,4)
incq %rax
cmpq $0x4, %rax
jne 0xe2a9
movaps %xmm0, 0x10(%rsp)
xorl %eax, %eax
movslq (%rsp,%rax,4), %rcx
movl (%r14,%rcx,4), %ecx
movl %ecx, 0x10(%rsp,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0xe2c1
leaq 0x10(%rsp), %rcx
movq %r13, %rdi
movq %rbx, %rsi
callq 0xe04e
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0xe30f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: tetra::walk_about(int)
void tetra::walk_about(int fromface)
{
	output_debugging("walk", 3);
	
	if (gluedto[fromface] != NULL)
		return;
	
	// Here's how we start.
	tetra *currenttetra = this;
	perm init_how = perm_walk_about_list[fromface];
	perm how = init_how;
	
	// Now walk around the edge.
	while ((currenttetra->gluedto[how[fromface]]) != NULL)
	{
		int dir = how[fromface];
		how = (currenttetra->get_gluing(dir)).of(how.of(init_how));  // Composition of 3 odd permutations is also odd.
		currenttetra = currenttetra->get_gluedto(dir);
	}
	
	// We've found the last tetra next to the edge
	// so glue it to the first one.
	gluesym(currenttetra, fromface, how);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x92b8(%rip), %rsi      # 0x175f1
leaq 0x92b5(%rip), %rdx      # 0x175f5
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x892e
movq %r15, %rdi
movl $0x3, %esi
callq 0x4229
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xe371
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3220
movslq %ebx, %rax
cmpq $0x0, 0x10(%r14,%rax,8)
jne 0xe424
movq %rax, %rcx
shlq $0x4, %rcx
leaq 0x10292(%rip), %rdx     # 0x1e620
movups (%rcx,%rdx), %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, (%rsp)
movslq (%rsp,%rax,4), %rcx
movq 0x10(%r14,%rcx,8), %rdx
movq %r14, %rsi
testq %rdx, %rdx
je 0xe417
movaps 0x90fd(%rip), %xmm0     # 0x174b0
movq %r14, %rsi
shlq $0x4, %rcx
movups 0x30(%rsi,%rcx), %xmm1
movq %rdx, %rsi
movaps %xmm1, 0x50(%rsp)
movaps %xmm0, 0x10(%rsp)
xorl %ecx, %ecx
movslq 0x60(%rsp,%rcx,4), %rdx
movl (%rsp,%rdx,4), %edx
movl %edx, 0x10(%rsp,%rcx,4)
incq %rcx
cmpq $0x4, %rcx
jne 0xe3ce
movaps %xmm0, 0x20(%rsp)
xorl %ecx, %ecx
movslq 0x10(%rsp,%rcx,4), %rdx
movl 0x50(%rsp,%rdx,4), %edx
movl %edx, 0x20(%rsp,%rcx,4)
incq %rcx
cmpq $0x4, %rcx
jne 0xe3ea
movaps 0x20(%rsp), %xmm1
movaps %xmm1, (%rsp)
movslq (%rsp,%rax,4), %rcx
movq 0x10(%rsi,%rcx,8), %rdx
testq %rdx, %rdx
jne 0xe3b6
movq %rsp, %rcx
movq %r14, %rdi
movl %ebx, %edx
callq 0xe04e
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xe44a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: glue_cubes(cube*, cube*, bool, bool)
void glue_cubes(cube *c1, cube *c2, bool u1, bool u2)
{
	// Depending on the orientations of c1 and c2, glue some
	// vertical face of cube c1 to some vertical face of cube c2.
	int toface = u1 ? 1 : 0;
	perm howto = u1 ? perm(0,2,1,3) : perm(2,1,0,3);
	
	if (u1 && u2)
	{
		(c1->get_tetra(low, right))->gluesym(c2->get_tetra(low, left), toface, howto);
		(c1->get_tetra(top, right))->gluesym(c2->get_tetra(top, left), toface, howto);
	}
	else if (u1 && !u2)
	{
		(c1->get_tetra(low, right))->gluesym(c2->get_tetra(low, right), toface, howto);
		(c1->get_tetra(top, right))->gluesym(c2->get_tetra(mid, right), toface, howto);
	}
	else if (!u1 && u2)
	{
		(c1->get_tetra(mid, left))->gluesym(c2->get_tetra(low, left), toface, howto);
		(c1->get_tetra(top, left))->gluesym(c2->get_tetra(top, left), toface, howto);
	}
	else if (!u1 && !u2)
	{
		(c1->get_tetra(mid, left))->gluesym(c2->get_tetra(low, right), toface, howto);
		(c1->get_tetra(top, left))->gluesym(c2->get_tetra(mid, right), toface, howto);
	}
	
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
testl %edx, %edx
je 0xe80f
xorl %esi, %esi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x3, %r8d
callq 0x8860
movq 0x28(%r15), %rdi
addq $0x18, %r15
jmp 0xe82a
movl $0x2, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x3, %r8d
callq 0x8860
movq 0x8(%r15), %rdi
testb %bpl, %bpl
je 0xe841
movq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rcx
movl %ebx, %edx
callq 0xe04e
jmp 0xe855
movq 0x28(%r14), %rsi
leaq 0x8(%rsp), %rcx
movl %ebx, %edx
callq 0xe04e
addq $0x20, %r14
movq (%r15), %rdi
movq (%r14), %rsi
leaq 0x8(%rsp), %rcx
movl %ebx, %edx
callq 0xe04e
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: annulus::annulus(std::vector<cube*, std::allocator<cube*>> const&, std::vector<bool, std::allocator<bool>> const&)
annulus::annulus(const std::vector<cube*> &sq_in, const std::vector<bool> &upright_in)
{
	length = int(sq_in.size());
	
	sq = new cube*[length];
	upright = new bool[length];
	
	for (int i = 0; i < length; i++)
	{
		sq[i] = sq_in[i];
		upright[i] = upright_in[i];
	}
	
	// Check for self-intersection.
	for (int i = 0; i < length; i++)
		for (int j = i + 1; j < length; j++)
			if (sq[i] == sq[j])
				output_error("An annulus must not intersect itself.");
	
	// Now glue the cubes together.
	for (int i = 0; i < length; i++)
		glue_cubes(sq[i], sq[(i+1) % length], upright[i], upright[(i+1) % length]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq %rax, %r13
shrq $0x3, %r13
movl %r13d, (%rdi)
shlq $0x1d, %rax
movq %rax, %rcx
sarq $0x1d, %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x3030
movq %rax, 0x8(%rbx)
movslq %r13d, %r12
movq %r12, %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
testl %r12d, %r12d
jle 0xf53a
movl %r13d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movq (%r15), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x8(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
movq (%r14), %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rdx,%rsi,8), %rdx
btq %rcx, %rdx
movq 0x10(%rbx), %rdx
setb (%rdx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xf43c
testl %r13d, %r13d
jle 0xf53a
movl $0x1, %ebp
xorl %ecx, %ecx
leaq 0x8(%rsp), %r12
movq %rcx, %r15
incq %rcx
movslq %r13d, %rax
cmpq %rax, %rcx
jge 0xf4f4
movq %rcx, (%rsp)
movq %rbp, %r14
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rcx
cmpq (%rax,%r14,8), %rcx
jne 0xf4e2
leaq 0x18(%rsp), %r13
movq %r13, 0x8(%rsp)
movq %r12, %rdi
leaq 0x814c(%rip), %rsi      # 0x17603
leaq 0x816a(%rip), %rdx      # 0x17628
callq 0x892e
movq %r12, %rdi
callq 0x43b0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf4e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
incq %r14
movl (%rbx), %r13d
cmpl %r14d, %r13d
jg 0xf495
movslq %r13d, %rax
movq (%rsp), %rcx
incq %rbp
cmpq %rax, %rcx
jl 0xf480
testl %r13d, %r13d
jle 0xf53a
xorl %ecx, %ecx
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %r8
movq (%rsi,%rcx,8), %rdi
leaq 0x1(%rcx), %r14
movl %r14d, %eax
cltd
idivl %r13d
movq (%rsi,%rdx,8), %rsi
movzbl (%r8,%rcx), %eax
movzbl (%r8,%rdx), %ecx
movl %eax, %edx
callq 0xe7d1
movslq (%rbx), %r13
movq %r14, %rcx
cmpq %r13, %r14
jl 0xf503
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf563
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: annulus::annulus(annulus const&)
annulus::annulus(const annulus &a)
{
	length = a.length;
	
	sq = new cube*[length];
	upright = new bool[length];
	
	for (int i = 0; i < length; i++)
	{
		sq[i] = a.sq[i];
		upright[i] = a.upright[i];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rsi), %r15
leaq (,%r15,8), %rax
testq %r15, %r15
movl %r15d, (%rdi)
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0x3030
movq %rax, 0x10(%r14)
testq %r15, %r15
jle 0xf5d5
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x8(%r14), %rdx
movq %rcx, (%rdx,%rax,8)
movq 0x10(%rbx), %rcx
movb (%rcx,%rax), %cl
movq 0x10(%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0xf5af
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: rectangle::rectangle(std::vector<cube*, std::allocator<cube*>> const&, std::vector<bool, std::allocator<bool>> const&)
rectangle::rectangle(const std::vector<cube*> &sq_in, const std::vector<bool> &upright_in)
{
	front = -1;
	back = -1;
	one_ended = false;
	
	length = int(sq_in.size());
	
	sq = new cube*[length];
	upright = new bool[length];
	
	for (int i = 0; i < length; i++)
	{
		sq[i] = sq_in[i];
		upright[i] = upright_in[i];
	}
	
	// Check for self-intersection.
	for (int i = 0; i < length; i++)
		for (int j = i + 1; j < length; j++)
			if (sq[i] == sq[j])
				output_error("A rectangle must not intersect itself.");
	
	// Now glue the cubes together.
	for (int i = 0; i < length - 1; i++)
		glue_cubes(sq[i], sq[i+1], upright[i], upright[i+1]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq $-0x1, %rax
movq %rax, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
movq 0x8(%rsi), %rcx
subq (%rsi), %rcx
movq %rcx, %r13
shrq $0x3, %r13
movl %r13d, (%rdi)
shlq $0x1d, %rcx
movq %rcx, %rdi
sarq $0x1d, %rdi
testq %rcx, %rcx
cmovsq %rax, %rdi
callq 0x3030
movq %rax, 0x8(%rbx)
movslq %r13d, %r12
movq %r12, %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
testl %r12d, %r12d
jle 0x10b29
movl %r13d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movq (%r15), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x8(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
movq (%r14), %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rdx,%rsi,8), %rdx
btq %rcx, %rdx
movq 0x10(%rbx), %rdx
setb (%rdx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x10a2e
testl %r13d, %r13d
jle 0x10b29
movl $0x1, %ebp
xorl %ecx, %ecx
leaq 0x8(%rsp), %r12
movq %rcx, %r15
incq %rcx
movslq %r13d, %rax
cmpq %rax, %rcx
jge 0x10ae6
movq %rcx, (%rsp)
movq %rbp, %r14
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rcx
cmpq (%rax,%r14,8), %rcx
jne 0x10ad4
leaq 0x18(%rsp), %r13
movq %r13, 0x8(%rsp)
movq %r12, %rdi
leaq 0x6bf5(%rip), %rsi      # 0x1769e
leaq 0x6c14(%rip), %rdx      # 0x176c4
callq 0x892e
movq %r12, %rdi
callq 0x43b0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x10ad4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
incq %r14
movl (%rbx), %r13d
cmpl %r14d, %r13d
jg 0x10a87
movslq %r13d, %rax
movq (%rsp), %rcx
incq %rbp
cmpq %rax, %rcx
jl 0x10a72
cmpl $0x2, %r13d
jl 0x10b29
xorl %eax, %eax
leaq 0x1(%rax), %r14
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movq (%rcx,%rax,8), %rdi
movq 0x8(%rcx,%rax,8), %rsi
movzbl (%rax,%r8), %edx
movzbl 0x1(%rax,%r8), %ecx
callq 0xe7d1
movslq (%rbx), %rcx
decq %rcx
movq %r14, %rax
cmpq %rcx, %r14
jl 0x10af6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x10b52
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: rectangle::rectangle(rectangle const&)
rectangle::rectangle(const rectangle &r)
{
	length = r.length;
	
	sq = new cube*[length];
	upright = new bool[length];
	
	for (int i = 0; i < length; i++)
	{
		sq[i] = r.sq[i];
		upright[i] = r.upright[i];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rsi), %r15
leaq (,%r15,8), %rax
testq %r15, %r15
movl %r15d, (%rdi)
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0x3030
movq %rax, 0x10(%r14)
testq %r15, %r15
jle 0x10bc3
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x8(%r14), %rdx
movq %rcx, (%rdx,%rax,8)
movq 0x10(%rbx), %rcx
movb (%rcx,%rax), %cl
movq 0x10(%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x10b9d
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MarkCBell[P]twister/./twister/kernel/twister.cpp
// Function: swirl(manifold*, tetra*, int)
tetra *swirl(manifold *M, tetra *current, int layer_number)
{
	for (int i = 0; i < 3; i++)
	{
		if (current->get_gluedto(i) != NULL)
			continue;  // Stop us going backwards.
		
		current->walk_about(i);
		
		if ((current->get_gluedto(i))->get_layer() != layer_number) 
			current->ungluesym(i);  // Nope, don't want to go out of the layer.
		else if (current->get_gluedto(i)->get_category() == gadget_pup)
		{
			tetra *next_tetra = new tetra(M, filler);
			current->subbedby(next_tetra, i, perm_walk_list[i]);
			current->walk_about(i);
			current = next_tetra;
			break;
		}
		else
			current->ungluesym(i);  // Nope, don't want to go that way.
	}
	
	for (int i = 0; i < 3; i++)
	{
		if (current->get_gluedto(i) != NULL)
			continue;  // Stop us going backwards.
		
		current->walk_about(i);
		
		if (current->get_gluedto(i)->get_layer() != layer_number)
			current->ungluesym(i);  // Nope, don't want to go out of the layer.
		else if (current->get_gluedto(i)->get_category() != gadget_pup)
		{
			tetra *next_tetra = new tetra(M, filler);
			current->subbedby(next_tetra, i, perm_walk_list[i]);
			current->walk_about(i);
			current = next_tetra;
			break;
		}
		else
			current->ungluesym(i);  // Nope, don't want to go that way.
	}
	return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xd799(%rip), %r13      # 0x1e650
xorl %r12d, %r12d
cmpq $0x0, 0x10(%r15,%r12,8)
jne 0x10eeb
movq %r15, %rdi
movl %r12d, %esi
callq 0xe318
movq 0x10(%r15,%r12,8), %rax
cmpl %ebp, 0x90(%rax)
jne 0x10ee0
cmpl $0x6, 0x70(%rax)
je 0x10f5c
movq %r15, %rdi
movl %r12d, %esi
callq 0xe13e
incq %r12
addq $0x10, %r13
cmpq $0x3, %r12
jne 0x10eba
movq %r15, %r14
leaq 0xd74e(%rip), %r12      # 0x1e650
xorl %r15d, %r15d
cmpq $0x0, 0x10(%r14,%r15,8)
jne 0x10f3a
movq %r14, %rdi
movl %r15d, %esi
callq 0xe318
movq 0x10(%r14,%r15,8), %rax
cmpl %ebp, 0x90(%rax)
jne 0x10f2f
cmpl $0x6, 0x70(%rax)
jne 0x10fb3
movq %r14, %rdi
movl %r15d, %esi
callq 0xe13e
incq %r15
addq $0x10, %r12
cmpq $0x3, %r15
jne 0x10f05
movq %r14, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xc0, %edi
callq 0x3210
movq %rax, %r14
movq $0x0, (%rsp)
movq %rax, %rdi
movq %rbx, %rsi
movl $0x7, %edx
movl $0x3, %ecx
movl $0x2, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xde5c
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
movq %r13, %rcx
callq 0xe200
movq %r15, %rdi
movl %r12d, %esi
callq 0xe318
jmp 0x10efb
movl $0xc0, %edi
callq 0x3210
movq %rax, %r13
movq $0x0, (%rsp)
movq %rax, %rdi
movq %rbx, %rsi
movl $0x7, %edx
movl $0x3, %ecx
movl $0x2, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0xde5c
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
movq %r12, %rcx
callq 0xe200
movq %r14, %rdi
movl %r15d, %esi
callq 0xe318
jmp 0x10f4a
movq %rax, %rbx
movq %r13, %r14
jmp 0x11015
movq %rax, %rbx
movl $0xc0, %esi
movq %r14, %rdi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0