LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/src/mustache-light.cpp
// Function: mustache::Mustache::ltrim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
inline string& Mustache::ltrim(string& s) {
    s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) {
        return !std::isspace(ch);
    }));
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %rsi
addq %r14, %rsi
movq %r14, %rdi
callq 0x25b70
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x252e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/src/mustache-light.cpp
// Function: mustache::Mustache::rtrim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
inline std::string& Mustache::rtrim(string& s) {
   s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) {
        return !std::isspace(ch);
    }).base(), s.end());
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
addq %rax, %rcx
leaq -0x20(%rbp), %rsi
movq %rcx, (%rsi)
leaq -0x18(%rbp), %rdx
movq %rax, (%rdx)
leaq -0x28(%rbp), %r14
movq %r14, %rdi
callq 0x25390
movq (%r14), %rsi
movq (%rbx), %rdx
addq 0x8(%rbx), %rdx
movq %rbx, %rdi
callq 0x252e0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/src/./../third-party/json/single_include/nlohmann/json.hpp
// Function: nlohmann::json_abi_v3_11_2::detail::serializer<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char)
static std::string hex_bytes(std::uint8_t byte)
    {
        std::string result = "FF";
        constexpr const char* nibble_to_hex = "0123456789ABCDEF";
        result[0] = nibble_to_hex[byte / 16];
        result[1] = nibble_to_hex[byte % 16];
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3e2e(%rip), %rsi      # 0x3d4fd
leaq -0x11(%rbp), %rdx
callq 0x25670
movl %ebx, %eax
shrl $0x4, %eax
leaq 0x752c(%rip), %rcx      # 0x40c10
movb (%rax,%rcx), %al
movq (%r14), %rdx
movb %al, (%rdx)
andl $0xf, %ebx
movb (%rbx,%rcx), %al
movq (%r14), %rcx
movb %al, 0x1(%rcx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/src/./../third-party/json/single_include/nlohmann/json.hpp
// Function: void nlohmann::json_abi_v3_11_2::detail::from_json<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&)
inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
    switch (static_cast<value_t>(j))
    {
        case value_t::number_unsigned:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
            break;
        }
        case value_t::number_integer:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
            break;
        }
        case value_t::number_float:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
            break;
        }
        case value_t::boolean:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
            break;
        }

        case value_t::null:
        case value_t::object:
        case value_t::array:
        case value_t::string:
        case value_t::binary:
        case value_t::discarded:
        default:
            JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x3a9a9
leaq 0x2208(%rip), %rcx      # 0x3cb88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x3a99c
movzbl 0x8(%r14), %eax
jmp 0x3a99c
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x25840
movq %rax, %rbx
movq %r14, %rdi
callq 0x25fb0
leaq -0x20(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x6eef(%rip), %rsi      # 0x418b9
leaq -0x40(%rbp), %rdi
callq 0x253b0
movb $0x1, %r15b
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi            # imm = 0x12E
movq %r14, %rcx
callq 0x27100
xorl %r15d, %r15d
movq 0x114e4(%rip), %rsi     # 0x4bed8
movq 0x114e5(%rip), %rdx     # 0x4bee0
movq %rbx, %rdi
callq 0x27240
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x27788
testb %r15b, %r15b
jne 0x3aa19
jmp 0x3aa21
movq %rax, %r14
movq %rbx, %rdi
callq 0x25d70
movq %r14, %rdi
callq 0x27310
nop
// File: /workspace/github_cpp_makefile_star2_O2/joncampbell123[P]floppytools/kryoflux1.cpp
// Function: main
int main(int argc,char **argv) {
    if (argc < 2) {
        fprintf(stderr,"%s <raw>\n",argv[0]);
        return 1;
    }

    FILE *fp = fopen(argv[1],"rb");
    if (fp == NULL) return 1;

    struct kryoflux_event ev;
    struct kryoflux_stream_info si;

    while (kryoflux_read(ev,fp)) {
        fprintf(stderr,"flux=%lu(0x%lx) oob=%u ooblen=%zu offset=%lu\n",
                ev.flux_interval,ev.flux_interval,ev.oob_code,ev.msg.size(),ev.offset);

        if (ev.msg.size() != 0 && ev.oob_code == 4) {
            fprintf(stderr,"  oobmsg='");
            fwrite(&ev.msg[0],ev.msg.size(),1,stderr);
            fprintf(stderr,"'\n");

            kryoflux_update_stream_info(si,ev.msg);
            fprintf(stderr,"Updated stream info: name='%s' sck=%.19f ick=%.19f\n",
                si.name.c_str(),si.sck,si.ick);
        }
    }

    fclose(fp);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0x1, %edi
jle 0x13e8
movq 0x8(%rsi), %rdi
leaq 0x1d3d(%rip), %rsi      # 0x300e
callq 0x1100
testq %rax, %rax
je 0x1403
movq %rax, %r14
leaq -0x40(%rbp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq -0x80(%rbp), %rdi
callq 0x1a3e
leaq -0x50(%rbp), %r15
movq 0x3cdb(%rip), %r13      # 0x4fe0
leaq 0x1d05(%rip), %r12      # 0x3011
movq %r15, %rdi
movq %r14, %rsi
callq 0x144c
testb %al, %al
je 0x13cb
movq (%r13), %rdi
movl -0x50(%rbp), %ecx
movzbl -0x4b(%rbp), %r8d
movq -0x38(%rbp), %r9
subq -0x40(%rbp), %r9
movq -0x48(%rbp), %rax
movq %rax, (%rsp)
movq %r12, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x1150
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x130c
cmpb $0x4, -0x4b(%rbp)
jne 0x130c
movq (%r13), %rcx
leaq 0x1cdd(%rip), %rdi      # 0x303f
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
movq (%r13), %rcx
pushq $0x1
popq %rdx
callq 0x11a0
movq (%r13), %rcx
leaq 0x1cbb(%rip), %rdi      # 0x304a
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
leaq -0x80(%rbp), %rdi
movq %rbx, %rsi
callq 0x1b41
movq (%r13), %rdi
movq -0x80(%rbp), %rdx
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
leaq 0x1c8e(%rip), %rsi      # 0x304d
movb $0x2, %al
callq 0x1150
jmp 0x130c
movq %r14, %rdi
callq 0x10d0
leaq -0x80(%rbp), %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1436
xorl %eax, %eax
jmp 0x1406
movq 0x3bf1(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
movq (%rsi), %rdx
leaq 0x1c08(%rip), %rsi      # 0x3004
xorl %eax, %eax
callq 0x1150
pushq $0x1
popq %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x1426
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1436
movq %r14, %rdi
callq 0x1180
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/./kmer.h
// Function: kmercounting::int_to_str[abi:cxx11](unsigned long)
string int_to_str(uint64_t kmer)
	{
		uint8_t base;
		string str;
		for (int i=K; i>0; i--) {
			base = (kmer >> (i*2-2)) & 3ULL;
			char chr = kmer::map_int(base);
			str.push_back(chr);
		}
		return str;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
pushq $0x36
popq %r15
cmpq $-0x2, %r15
je 0x58fc
movq %r14, %rdi
movl %r15d, %ecx
shrq %cl, %rdi
andl $0x3, %edi
callq 0x73ee
movsbl %al, %esi
movq %rbx, %rdi
callq 0x52a0
addq $-0x2, %r15
jmp 0x58d4
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5130
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/./kmer.h
// Function: kmercounting::int_to_str_node[abi:cxx11](unsigned long)
string int_to_str_node(uint64_t kmer)
	{
		uint8_t base;
		string str;
		for (int i=K-1; i>0; i--) {
			base = (kmer >> (i*2-2)) & 3ULL;
			char chr = kmer::map_int(base);
			str.push_back(chr);
		}
		return str;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
pushq $0x34
popq %r15
cmpq $-0x2, %r15
je 0x595f
movq %r14, %rdi
movl %r15d, %ecx
shrq %cl, %rdi
andl $0x3, %edi
callq 0x73ee
movsbl %al, %esi
movq %rbx, %rdi
callq 0x52a0
addq $-0x2, %r15
jmp 0x5937
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5130
movq %r14, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/./kmer.h
// Function: kmercounting::kmer::reverse_complement(unsigned long)
uint64_t kmer::reverse_complement(uint64_t kmer)
	{
		uint64_t rc = 0;
		uint8_t base = 0;
		for (int i=0; i<K; i++) {
			base = kmer & 3ULL;
			base = reverse_complement_base(base);
			kmer >>= 2;
			rc |= base;
			rc <<= 2;
		}
		rc >>=2;
		return rc;
	}

// Assembly:
pushq $0x1c
popq %rcx
xorl %eax, %eax
subl $0x1, %ecx
jb 0x599f
movl %edi, %edx
andl $0x3, %edx
shrq $0x2, %rdi
addq %rax, %rdx
shlq $0x2, %rdx
xorq $0xc, %rdx
movq %rdx, %rax
jmp 0x5981
shrq $0x2, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/./kmer.h
// Function: kmercounting::kmer::reverse_complement_node(unsigned long)
uint64_t kmer::reverse_complement_node(uint64_t kmer)
	{
		uint64_t rc = 0;
		uint8_t base = 0;
		for (int i=0; i<K-1; i++) {
			base = kmer & 3ULL;
			base = reverse_complement_base(base);
			kmer >>= 2;
			rc |= base;
			rc <<= 2;
		}
		rc >>=2;
		return rc;
	}

// Assembly:
pushq $0x1b
popq %rcx
xorl %eax, %eax
subl $0x1, %ecx
jb 0x59c7
movl %edi, %edx
andl $0x3, %edx
shrq $0x2, %rdi
addq %rax, %rdx
shlq $0x2, %rdx
xorq $0xc, %rdx
movq %rdx, %rax
jmp 0x59a9
shrq $0x2, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: count_distinct_kmers(std::multiset<unsigned long, std::less<unsigned long>, std::allocator<unsigned long>>)
uint64_t count_distinct_kmers(multiset<uint64_t> kmers)
{
	uint64_t cnt = 0;
	uint64_t curr_kmer = 0;

	for(uint64_t kmer: kmers) {
		if (kmer != curr_kmer) {
			curr_kmer = kmer;
			cnt++;
		}
	}
	return cnt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
addq $0x8, %rbx
xorl %ecx, %ecx
xorl %r14d, %r14d
cmpq %rbx, %rax
je 0x5a1e
movq 0x20(%rax), %r15
xorl %edx, %edx
cmpq %rcx, %r15
setne %dl
addq %rdx, %r14
movq %rax, %rdi
callq 0x53c0
movq %r15, %rcx
jmp 0x59fd
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: skip_next_eol(char*, long&, long)
bool skip_next_eol(char *part, int64_t &pos, int64_t max_pos)
{
	int64_t i;
	for(i = pos; i < max_pos-2; ++i)
		if((part[i] == '\n' || part[i] == '\r') && !(part[i+1] == '\n' ||
																								 part[i+1] == '\r'))
			break;

	if(i >= max_pos-2)
		return false;
	pos = i+1;

	return true;
}

// Assembly:
movq (%rsi), %rax
addq $-0x2, %rdx
incq %rax
leaq -0x1(%rax), %rcx
cmpq %rdx, %rcx
jge 0x5b2f
movzbl -0x1(%rdi,%rax), %r8d
cmpl $0xd, %r8d
je 0x5b1b
cmpl $0xa, %r8d
jne 0x5afd
movzbl (%rdi,%rax), %r8d
cmpl $0xd, %r8d
je 0x5afd
cmpl $0xa, %r8d
je 0x5afd
movq %rax, (%rsi)
cmpq %rdx, %rcx
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: is_duplex_edge(unsigned long, unsigned long)
bool is_duplex_edge(uint64_t n, uint64_t e) {
	bool lefty = false, righty = false;
	for (const auto b : bases) {
		righty |= (e == node_r_edge(n, b));
		lefty |= (e == node_l_edge(n, b));
	}
	return righty && lefty;
}

// Assembly:
leaq (,%rdi,4), %rcx
xorl %edx, %edx
leaq 0x7ebc(%rip), %r8       # 0xda90
xorl %eax, %eax
xorl %r9d, %r9d
cmpq $0x10, %rdx
je 0x5c0a
movl (%rdx,%r8), %r10d
movq %rcx, %r11
orq %r10, %r11
cmpq %rsi, %r11
sete %r11b
orb %r11b, %al
shlq $0x36, %r10
orq %rdi, %r10
cmpq %rsi, %r10
sete %r10b
orb %r10b, %r9b
addq $0x4, %rdx
jmp 0x5bd9
andb %r9b, %al
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: is_left_edge(unsigned long, unsigned long)
bool is_left_edge(uint64_t n, uint64_t e) {
	for (const auto b : bases)
		if (e == canonicalize(node_l_edge(n, b)))
			return !is_duplex_edge(n, e);
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ecx, %ecx
leaq 0x7e69(%rip), %r12      # 0xda90
movq %rcx, %r15
cmpq $0x10, %rcx
je 0x5c56
movl (%r15,%r12), %edi
shlq $0x36, %rdi
orq %r14, %rdi
callq 0x5b36
leaq 0x4(%r15), %rcx
cmpq %rbx, %rax
jne 0x5c27
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5bc3
xorb $0x1, %al
cmpq $0x10, %r15
setne %cl
andb %al, %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: is_right_edge(unsigned long, unsigned long)
bool is_right_edge(uint64_t n, uint64_t e) {
	for (const auto b : bases)
		if (e == canonicalize(node_r_edge(n, b)))
			return !is_duplex_edge(n, e);
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rdi,4), %r12
xorl %ecx, %ecx
leaq 0x7e03(%rip), %r13      # 0xda90
movq %rcx, %r15
cmpq $0x10, %rcx
je 0x5cb8
movl (%r15,%r13), %edi
orq %r12, %rdi
callq 0x5b36
leaq 0x4(%r15), %rcx
cmpq %rbx, %rax
jne 0x5c8d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5bc3
xorb $0x1, %al
cmpq $0x10, %r15
setne %cl
andb %al, %cl
movl %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: record_end(unsigned long, unsigned long, flush_object*)
void record_end(uint64_t n, uint64_t e, flush_object *obj) {
	uint64_t hash = HashUtil::hash_64(n, BITMASK(2*(K-1)));
	if (is_left_edge(n, e)) {
		qf_insert(obj->first_qf, hash, 0, 1, true, true);
		//cout << "Begin node: " << int_to_str_node(n) << endl;
		//cout << "Begin edge: " << int_to_str(e) << endl;
	}
	else if (is_right_edge(n, e)) {
		qf_insert(obj->last_qf, hash, 0, 1, true, true);
		//cout << "End node: " << int_to_str_node(n) << endl;
		//cout << "End edge: " << int_to_str(e) << endl;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movabsq $0x3fffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFF
callq 0xa0a4
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0x5c10
testb %al, %al
jne 0x5d12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5c6d
testb %al, %al
je 0x5d34
addq $0x8, %rbx
movq (%rbx), %rdi
pushq $0x1
popq %rcx
pushq $0x1
popq %r8
movq %r14, %rsi
xorl %edx, %edx
movl %r8d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa8b1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: dump_local_qf_to_main(flush_object*)
static void dump_local_qf_to_main(flush_object *obj)
{
	QFi local_cfi;

	if (qf_iterator(obj->local_qf, &local_cfi, 0)) {
		do {
			uint64_t key = 0, value = 0, count = 0;
			qfi_get(&local_cfi, &key, &value, &count);
			qf_insert(obj->main_qf, key, 0, count, true, true);
		} while (!qfi_next(&local_cfi));
		qf_reset(obj->local_qf);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0xbce1
testb %al, %al
je 0x6286
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %rsp, %r13
pushq $0x1
popq %rbp
andq $0x0, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
andq $0x0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xbe9e
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rcx
xorl %edx, %edx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0xa8b1
movq %r14, %rdi
callq 0xbf26
testl %eax, %eax
je 0x6235
movq 0x10(%rbx), %rdi
callq 0xa734
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: getFileReader(int, char*, kmercounting::reader*)
bool getFileReader(int mode, char* fastq_file, reader* file_reader) 
{
	uint64_t gzip_buffer_size = 1ULL << 26;
	uint64_t bzip2_buffer_size = 1ULL << 26;

	if (mode == 0) {
		if ((file_reader->in = fopen(fastq_file, "rb")) == NULL)
			return false;
	} else if (mode == 1) {
		if ((file_reader->in_gzip = gzopen(fastq_file, "rb")) == NULL)
			return false;
		gzbuffer(file_reader->in_gzip, gzip_buffer_size);
	} else if (mode == 2) {
		file_reader->in = fopen(fastq_file, "rb");
		if (!file_reader->in)
			return false;
		setvbuf(file_reader->in, NULL, _IOFBF, bzip2_buffer_size);
		if ((file_reader->in_bzip2 = BZ2_bzReadOpen(&file_reader->bzerror,
																								file_reader->in, 0, 0, NULL,
																								0)) == NULL) {
			fclose(file_reader->in);
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
cmpl $0x2, %edi
je 0x62f4
cmpl $0x1, %edi
je 0x62ca
testl %edi, %edi
jne 0x633e
leaq 0x6d9b(%rip), %rax      # 0xd04d
movq %rsi, %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, (%rbx)
testq %rax, %rax
jne 0x633e
jmp 0x634a
leaq 0x6d7c(%rip), %rax      # 0xd04d
movq %rsi, %rdi
movq %rax, %rsi
callq 0x54e0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x634a
movq %rax, %rdi
movl $0x4000000, %esi        # imm = 0x4000000
callq 0x5230
jmp 0x633e
leaq 0x6d52(%rip), %rax      # 0xd04d
movq %rsi, %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, (%rbx)
testq %rax, %rax
je 0x634a
movl $0x4000000, %ecx        # imm = 0x4000000
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5050
leaq 0x18(%rbx), %rdi
movq (%rbx), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5560
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x6342
movb $0x1, %al
jmp 0x634c
movq (%rbx), %rdi
callq 0x5330
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/splatlab[P]debgr/main.cc
// Function: is_eof(kmercounting::reader&, int)
inline bool is_eof(reader &file_reader, int mode)
{
	if (mode == 0)
		return feof(file_reader.in) != 0;
	else if (mode == 1)
		return gzeof(file_reader.in_gzip) != 0;
	else if (mode == 2)
		return file_reader.bzerror == BZ_STREAM_END;

	return true;
}

// Assembly:
pushq %rax
cmpl $0x2, %esi
je 0x8f36
cmpl $0x1, %esi
je 0x8f26
movb $0x1, %al
testl %esi, %esi
jne 0x8f3d
movq (%rdi), %rdi
callq 0x5530
jmp 0x8f2f
movq 0x8(%rdi), %rdi
callq 0x50d0
testl %eax, %eax
setne %al
jmp 0x8f3d
cmpl $0x4, 0x18(%rdi)
sete %al
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ldionne[P]hawick_circuits/hawick_circuits.cpp
// Function: main
int main(int argc, char const* argv[]) {
    if (argc < 2) {
        std::cout << "usage: " << argv[0] << " num_vertices < input\n";
        return EXIT_FAILURE;
    }

    unsigned int num_vertices = boost::lexical_cast<unsigned int>(argv[1]);
    std::istream_iterator<unsigned int> first_vertex(std::cin), last_vertex;
    boost::directed_graph<> graph;
    build_graph(graph, num_vertices, first_vertex, last_vertex);

    cycle_printer<std::ostream> visitor(std::cout);
    boost::hawick_circuits(graph, visitor);

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
cmpl $0x1, %edi
jg 0x2459
movq 0x7b9d(%rip), %rdi      # 0x9fc8
leaq 0x2bd2(%rip), %rsi      # 0x5004
callq 0x2170
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x2170
leaq 0x2bc3(%rip), %rsi      # 0x500c
movq %rax, %rdi
callq 0x2170
pushq $0x1
popq %rax
jmp 0x24e7
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x250e
movl %eax, %ebx
movq 0x7b72(%rip), %rsi      # 0x9fe0
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x2534
leaq -0xa8(%rbp), %r15
leaq -0x20(%rbp), %rsi
movq %r15, %rdi
callq 0x2546
movq (%r14), %rax
leaq -0x40(%rbp), %rdx
movq %rax, (%rdx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rdx)
movb 0xc(%r14), %al
movb %al, 0xc(%rdx)
leaq -0x30(%rbp), %rcx
andq $0x0, (%rcx)
andl $0x0, 0x8(%rcx)
movb $0x0, 0xc(%rcx)
movq %r15, %rdi
movl %ebx, %esi
callq 0x2566
movq 0x7b02(%rip), %rax      # 0x9fc8
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
leaq -0xa8(%rbp), %rdi
callq 0x3a63
leaq -0xa8(%rbp), %rdi
callq 0x271c
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24f7
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x271c
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/ldionne[P]hawick_circuits/boost/graph/hawick_circuits.hpp
// Function: boost::hawick_circuits_detail::hawick_circuits_from<boost::directed_graph<boost::no_property, boost::no_property, boost::no_property>, cycle_printer<std::ostream>, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::bidirectionalS, boost::property<boost::vertex_index_t, unsigned int, boost::no_property>, boost::property<boost::edge_index_t, unsigned int, boost::no_property>, boost::no_property, boost::listS>, unsigned int, unsigned int const&, boost::vertex_index_t>, std::vector<void*, std::allocator<void*>>, std::vector<std::vector<void*, std::allocator<void*>>, std::allocator<std::vector<void*, std::allocator<void*>>>>, boost::hawick_circuits_detail::get_all_adjacent_vertices>::blocked_map_starts_all_unblocked() const
bool blocked_map_starts_all_unblocked() const {
        BOOST_FOREACH(Vertex v, vertices(graph_))
            if (is_blocked(v))
                return false;
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r12
addq $0x18, %r12
movb $0x1, %cl
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
setne %r14b
andb %cl, %r14b
cmpb $0x1, %r14b
jne 0x4013
movq 0x10(%r13), %r15
xorl %ecx, %ecx
testb $0x1, %cl
jne 0x3fe3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4194
movb $0x1, %cl
testb %al, %al
je 0x3ffd
xorb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ldionne[P]hawick_circuits/boost/graph/hawick_circuits.hpp
// Function: boost::hawick_circuits_detail::hawick_circuits_from<boost::directed_graph<boost::no_property, boost::no_property, boost::no_property>, cycle_printer<std::ostream>, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::bidirectionalS, boost::property<boost::vertex_index_t, unsigned int, boost::no_property>, boost::property<boost::edge_index_t, unsigned int, boost::no_property>, boost::no_property, boost::listS>, unsigned int, unsigned int const&, boost::vertex_index_t>, std::vector<void*, std::allocator<void*>>, std::vector<std::vector<void*, std::allocator<void*>>, std::allocator<std::vector<void*, std::allocator<void*>>>>, boost::hawick_circuits_detail::get_all_adjacent_vertices>::all_closed_rows_are_empty() const
bool all_closed_rows_are_empty() const {
        BOOST_FOREACH(typename ClosedMatrix::reference row, closed_)
            if (!row.empty())
                return false;
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rax
movq %rdx, %rcx
cmpq %rax, %rdx
je 0x404e
movq (%rcx), %rsi
leaq 0x18(%rcx), %rdx
cmpq 0x8(%rcx), %rsi
je 0x4039
cmpq %rax, %rcx
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ldionne[P]hawick_circuits/hawick_circuits.cpp
// Function: void cycle_printer<std::ostream>::cycle<std::vector<void*, std::allocator<void*>>, boost::directed_graph<boost::no_property, boost::no_property, boost::no_property>>(std::vector<void*, std::allocator<void*>> const&, boost::directed_graph<boost::no_property, boost::no_property, boost::no_property> const&)
void cycle(Path const& p, Graph const& g)
    {
        if (p.empty())
            return;

        // Get the property map containing the vertex indices
        // so we can print them.
        typedef typename boost::property_map<
                    Graph, boost::vertex_index_t
                >::const_type IndexMap;

        IndexMap indices = get(boost::vertex_index, g);

        // Iterate over path printing each vertex that forms the cycle.
        typename Path::const_iterator i, before_end = boost::prior(p.end());
        for (i = p.begin(); i != before_end; ++i) {
            os << get(indices, *i) << " ";
        }
        os << get(indices, *i) << '\n';
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %r12
cmpq %r12, %r15
je 0x4424
movq %rdi, %rbx
addq $-0x8, %r12
leaq 0xc1d(%rip), %r14       # 0x500a
movq (%rbx), %rdi
movq (%r15), %rax
movl 0x30(%rax), %esi
callq 0x2120
cmpq %r12, %r15
je 0x4411
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
addq $0x8, %r15
jmp 0x43ed
pushq $0xa
popq %rsi
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21b0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ldionne[P]hawick_circuits/boost/graph/hawick_circuits.hpp
// Function: boost::hawick_circuits_detail::hawick_circuits_from<boost::directed_graph<boost::no_property, boost::no_property, boost::no_property>, cycle_printer<std::ostream>, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::bidirectionalS, boost::property<boost::vertex_index_t, unsigned int, boost::no_property>, boost::property<boost::edge_index_t, unsigned int, boost::no_property>, boost::no_property, boost::listS>, unsigned int, unsigned int const&, boost::vertex_index_t>, std::vector<void*, std::allocator<void*>>, std::vector<std::vector<void*, std::allocator<void*>>, std::allocator<std::vector<void*, std::allocator<void*>>>>, boost::hawick_circuits_detail::get_all_adjacent_vertices>::unblock(void*)
void unblock(Vertex u) {
        typedef typename ClosedMatrix::reference VertexList;

        put(blocked_, u, blocked_false_color());
        VertexList closed_to_u = closed_[index_of(u)];

        while (!closed_to_u.empty()) {
            Vertex const w = closed_to_u.back();
            closed_to_u.pop_back();
            if (is_blocked(w))
                unblock(w);
        }
        BOOST_ASSERT(closed_to_u.empty());
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x28, %rdi
xorl %edx, %edx
callq 0x4630
movq 0x20(%rbx), %rax
movl 0x30(%r14), %ecx
imulq $0x18, %rcx, %r15
addq (%rax), %r15
movq 0x8(%r15), %rax
cmpq %rax, (%r15)
je 0x4489
movq -0x8(%rax), %r14
addq $-0x8, %rax
movq %rax, 0x8(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4194
testb %al, %al
je 0x4458
movq %rbx, %rdi
movq %r14, %rsi
callq 0x442e
jmp 0x4458
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::reset()
void Cryptogram::reset()
{
    cyphertext = SAMPLE_TEXT;
    plaintext = "";
    memset(alphabet, ' ', sizeof(alphabet));
    calcPlaintext();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1b37(%rip), %rsi      # 0x4020
callq 0x2350
leaq 0x20(%rbx), %rdi
leaq 0x1cd4(%rip), %rsi      # 0x41cd
callq 0x2350
movaps 0x1b0b(%rip), %xmm0     # 0x4010
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x4a(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x252c
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::calcPlaintext()
void Cryptogram::calcPlaintext()
{
    if (plaintext.length() != cyphertext.length())
        plaintext = string(" ", cyphertext.length());
    string::iterator p = plaintext.begin();
    string::iterator c = cyphertext.begin();
    char ch;
    while (c != cyphertext.end())
    {
        // Get the character
        ch = *c;
        // Normalize it to uppercase
        ch = normalize(ch);
        // Calc the plaintext
        if (isKey(ch))
        {
            *p = alphabet[ch - 'A'];
            if (*p == ' ')
                *p = '_';
        } else {
            *p = *c;
        }
        p++;
        c++;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
cmpq %rdx, 0x28(%rdi)
je 0x2577
leaq 0x20(%rbx), %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1d0a(%rip), %rsi      # 0x4260
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x3402
movq %r14, %rdi
movq %r15, %rsi
callq 0x2260
movq %r15, %rdi
callq 0x20f0
movq (%rbx), %rsi
movq 0x20(%rbx), %rax
pushq $0x5f
popq %rcx
movq %rsi, %rdx
addq 0x8(%rbx), %rsi
cmpq %rsi, %rdx
je 0x25cd
movzbl (%rdx), %esi
leal -0x61(%rsi), %edi
leal -0x20(%rsi), %r8d
cmpb $0x1a, %dil
movzbl %r8b, %edi
cmovael %esi, %edi
leal -0x41(%rdi), %r8d
cmpb $0x19, %r8b
ja 0x25bf
movzbl %dil, %esi
movzbl -0x1(%rbx,%rsi), %edi
movl %ecx, %esi
cmpb $0x20, %dil
je 0x25bf
movl %edi, %esi
movb %sil, (%rax)
incq %rax
incq %rdx
movq (%rbx), %rsi
jmp 0x2584
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::loadFile(char const*)
void Cryptogram::loadFile(const char *filename)
{
    FILE *f;
    char block[4096];
    int size;
    
    cyphertext = SAMPLE_TEXT;
    plaintext = "";
    memset(alphabet, ' ', sizeof(alphabet));

    f = fopen(filename, "rb");
    if (!f)
    {
        reset();
        return;
    }
    size = fread(block, 1, 4096, f);
    block[4095] = 0;
    block[size] = 0;
    fclose(f);

    if (strncmp(block, FILE_HEADER, strlen(FILE_HEADER) + 1) == 0)
    {
        memcpy(alphabet, block + strlen(FILE_HEADER) + 1, sizeof(alphabet));
        cyphertext = strdup(block + strlen(FILE_HEADER) + 1 + sizeof(alphabet));
    } else {
        cyphertext = strdup(block);
    }
    calcPlaintext();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1a2f(%rip), %rsi      # 0x4020
callq 0x2350
leaq 0x20(%rbx), %rdi
leaq 0x1bcc(%rip), %rsi      # 0x41cd
callq 0x2350
movaps 0x1a03(%rip), %xmm0     # 0x4010
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x4a(%rbx)
leaq 0x1ba1(%rip), %rsi      # 0x41bd
movq %r14, %rdi
callq 0x2230
testq %rax, %rax
je 0x26a8
movq %rax, %r15
movq %rsp, %r14
pushq $0x1
popq %rsi
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
movq %rax, %rcx
callq 0x22e0
xorl %ecx, %ecx
movb %cl, 0xfff(%r14)
cltq
movb %cl, (%rsp,%rax)
movq %r15, %rdi
callq 0x21a0
movabsq $0x31454c49464743, %rax # imm = 0x31454C49464743
cmpq %rax, (%r14)
jne 0x2681
leaq 0x40(%rbx), %rax
leaq 0x22(%rsp), %r14
movups -0x1a(%r14), %xmm0
movups -0x10(%r14), %xmm1
movups %xmm1, 0xa(%rax)
movups %xmm0, (%rax)
movq %r14, %rdi
callq 0x2330
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2350
movq %rbx, %rdi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
jmp 0x252c
movq %rbx, %rdi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
jmp 0x24de
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::saveFileText(char const*)
void Cryptogram::saveFileText(const char *filename)
{
    FILE *f;
    
    f = fopen(filename, "wb");
    if (!f)
        return;
    fwrite(plaintext.c_str(), 1, plaintext.length(), f);
    fwrite("\n\n", 1, 2, f);
    fwrite(cyphertext.c_str(), 1, cyphertext.length(), f);
    fclose(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %r14
leaq 0x1afa(%rip), %rsi      # 0x41c8
movq %rax, %rdi
callq 0x2230
testq %rax, %rax
je 0x2729
movq %rax, %rbx
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rdx
pushq $0x1
popq %r15
movq %r15, %rsi
movq %rax, %rcx
callq 0x2360
leaq 0x1acf(%rip), %rdi      # 0x41cb
pushq $0x2
popq %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2360
movq (%r14), %rdi
movq 0x8(%r14), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2360
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::saveFileBinary(char const*)
void Cryptogram::saveFileBinary(const char *filename)
{
    FILE *f;
    
    f = fopen(filename, "wb");
    if (!f)
        return;
    // Write the header
    fwrite(FILE_HEADER, 1, strlen(FILE_HEADER) + 1, f);
    // Write the alphabet
    fwrite(alphabet, 1, sizeof(alphabet), f);
    // Write the cyphertext
    fwrite(cyphertext.c_str(), 1, cyphertext.length(), f);
    fclose(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %r14
leaq 0x1a86(%rip), %rsi      # 0x41c8
movq %rax, %rdi
callq 0x2230
testq %rax, %rax
je 0x279c
movq %rax, %rbx
leaq 0x1a67(%rip), %rdi      # 0x41c0
pushq $0x1
popq %r15
pushq $0x8
popq %rdx
movq %r15, %rsi
movq %rax, %rcx
callq 0x2360
leaq 0x40(%r14), %rdi
pushq $0x1a
popq %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2360
movq (%r14), %rdi
movq 0x8(%r14), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2360
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::saveKeys(char const*)
void Cryptogram::saveKeys(const char *filename)
{
    FILE *f;
    f = fopen(filename, "wb");
    if (!f)
        return;
    fwrite(alphabet, 1, sizeof(alphabet), f);
    fclose(f);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x1a15(%rip), %rsi      # 0x41c8
movq %rax, %rdi
callq 0x2230
testq %rax, %rax
je 0x27e7
movq %rax, %r14
addq $0x40, %rbx
pushq $0x1
popq %rsi
pushq $0x1a
popq %rdx
movq %rbx, %rdi
movq %rax, %rcx
callq 0x2360
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::loadKeys(char const*)
void Cryptogram::loadKeys(const char *filename)
{
    FILE *f;
    unsigned int i;
    f = fopen(filename, "rb");
    if (!f)
        return;
    for (i=0; i<sizeof(alphabet); i++)
        alphabet[i] = ' ';
    fread(alphabet, 1, sizeof(alphabet), f);
    fclose(f);
    for (i=0; i<sizeof(alphabet); i++)
        if ((alphabet[i] < 'A') || (alphabet[i] > 'Z'))
            alphabet[i] = ' ';
    calcPlaintext();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x19bc(%rip), %rsi      # 0x41bd
movq %rax, %rdi
callq 0x2230
testq %rax, %rax
je 0x2869
movq %rax, %r14
leaq 0x40(%rbx), %rdi
pushq $0x40
popq %rax
cmpq $0x5a, %rax
je 0x2827
movb $0x20, (%rbx,%rax)
incq %rax
jmp 0x2818
pushq $0x1
popq %rsi
pushq $0x1a
popq %rdx
movq %r14, %rcx
callq 0x22e0
movq %r14, %rdi
callq 0x21a0
pushq $0x40
popq %rax
cmpq $0x5a, %rax
je 0x285a
movb (%rbx,%rax), %cl
addb $-0x5b, %cl
cmpb $-0x1b, %cl
ja 0x2855
movb $0x20, (%rbx,%rax)
incq %rax
jmp 0x2840
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x252c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::set(char, char)
char Cryptogram::normalize(char letter)
{
    if ( (letter >= 'a') && (letter <= 'z') )
        return letter - ('a' - 'A');
    else
        return letter;
}

// Assembly:
leal -0x61(%rsi), %eax
leal -0x20(%rsi), %ecx
cmpb $0x1a, %al
movzbl %cl, %eax
cmovael %esi, %eax
leal -0x41(%rax), %ecx
cmpb $0x19, %cl
ja 0x28a2
leal -0x61(%rdx), %ecx
leal -0x20(%rdx), %esi
cmpb $0x1a, %cl
movzbl %dl, %ecx
movzbl %sil, %edx
cmovael %ecx, %edx
movzbl %al, %eax
movb %dl, -0x1(%rax,%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::randomizeKeys()
void Cryptogram::randomizeKeys()
{
    // Probably a better way of doing this....
    int r1, r2;
    char temp;
    for (int i=0; i<26; i++)
        alphabet[i] = i + 'A';
    srand(time(NULL));
    for (int i=0; i<1000; i++)
    {
        r1 = rand() % 26;
        r2 = rand() % 26;
        temp = alphabet[r1];
        alphabet[r1] = alphabet[r2];
        alphabet[r2] = temp;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x1a, %rax
je 0x28e6
leal 0x41(%rax), %ecx
movb %cl, 0x40(%rbx,%rax)
incq %rax
jmp 0x28d4
xorl %edi, %edi
callq 0x2180
movl %eax, %edi
callq 0x2190
movl $0x3e8, %r14d           # imm = 0x3E8
pushq $0x1a
popq %r15
subl $0x1, %r14d
jb 0x2932
callq 0x2080
cltd
idivl %r15d
movl %edx, %ebp
callq 0x2080
cltd
idivl %r15d
movslq %ebp, %rax
movb 0x40(%rbx,%rax), %cl
movslq %edx, %rdx
movb 0x40(%rbx,%rdx), %sil
movb %sil, 0x40(%rbx,%rax)
movb %cl, 0x40(%rbx,%rdx)
jmp 0x28fe
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::newRandomMessage()
void Cryptogram::newRandomMessage()
{
    int lines;
    do{
        system("fortune > tmp.tmp");
        loadFile("tmp.tmp");
        lines = 0;
        for (string::iterator c = cyphertext.begin(); 
             c != cyphertext.end(); 
             c++)
        {
            if (*c == '\n')
                lines++;
        }
    }while((lines < 3) || (lines > 8));
    randomizeMessage();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1797(%rip), %r14      # 0x41ce
leaq 0x179a(%rip), %r15      # 0x41d8
movq %r14, %rdi
callq 0x2170
movq %rbx, %rdi
movq %r15, %rsi
callq 0x25d8
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
xorl %esi, %esi
xorl %edx, %edx
cmpq %rsi, %rcx
je 0x2a72
xorl %edi, %edi
cmpb $0xa, (%rax,%rsi)
sete %dil
addl %edi, %edx
incq %rsi
jmp 0x2a5c
addl $-0x9, %edx
cmpl $-0x6, %edx
jb 0x2a3e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x293e
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::letterDistribution(char*, int*)
void Cryptogram::letterDistribution(char letters[], int counts[])
{
    char letter;
    for (char c = 'A'; c <= 'Z'; c++)
    {
        letters[c-'A'] = c;
        counts[c-'A'] = 0;
    }
    for (string::iterator t = cyphertext.begin(); t != cyphertext.end(); t++)
    {
        letter = normalize(*t);
        if (isKey(letter))
            counts[letter-'A']++;
    }
    // BUBBLESORT!  YEAY!
    int tempInt;
    char tempChar;
    for (int i=0; i < 26; i++)
        for (int j = i; j < 26; j++)
            if (counts[j] > counts[i])
            {
                tempChar = letters[i];
                letters[i] = letters[j];
                letters[j] = tempChar;
                tempInt = counts[i];
                counts[i] = counts[j];
                counts[j] = tempInt;
            }
}

// Assembly:
xorl %eax, %eax
cmpq $0x1a, %rax
je 0x2a9f
leal 0x41(%rax), %ecx
movb %cl, (%rsi,%rax)
andl $0x0, (%rdx,%rax,4)
incq %rax
jmp 0x2a8a
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x2ae1
movzbl (%rax,%rdi), %r9d
leal -0x61(%r9), %r8d
leal -0x20(%r9), %r10d
cmpb $0x1a, %r8b
movzbl %r10b, %r8d
cmovael %r9d, %r8d
leal -0x41(%r8), %r9d
cmpb $0x19, %r9b
ja 0x2adc
movzbl %r8b, %r8d
incl -0x104(%rdx,%r8,4)
incq %rdi
jmp 0x2aa8
xorl %eax, %eax
movq %rax, %rcx
cmpq $0x1a, %rax
je 0x2b22
cmpq $0x1a, %rcx
je 0x2b1d
movl (%rdx,%rcx,4), %edi
cmpl (%rdx,%rax,4), %edi
jle 0x2b18
movb (%rsi,%rax), %dil
movb (%rsi,%rcx), %r8b
movb %r8b, (%rsi,%rax)
movb %dil, (%rsi,%rcx)
movl (%rdx,%rax,4), %edi
movl (%rdx,%rcx,4), %r8d
movl %r8d, (%rdx,%rax,4)
movl %edi, (%rdx,%rcx,4)
incq %rcx
jmp 0x2aec
incq %rax
jmp 0x2ae3
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::paintAlphabet(_win_st*)
void Cryptogram::paintAlphabet(WINDOW *w)
{
    // Print the alphabet...
    char used[26];
    bool duplicates = false;
    char letter;
    
    for (int i=0; i<26; i++)
        used[i] = 0;

    wcolor_set(w, 2, NULL);
    wmove(w, 0, 0);
    wprintw(w, "Cyphertext: ");
    for (char c='A'; c <= 'Z'; c++)
        wprintw(w, "%c", c);
    wprintw(w, "\nPlaintext:  ");
    for (int i=0; i<26; i++)
    {
        letter = alphabet[i];
        wprintw(w, "%c", letter);
        if (isKey(letter))
        {
            if (used[letter-'A'] == 1)
                duplicates = true;
            else
                used[letter-'A'] = 1;
        }
    }
    if (duplicates)
        wprintw(w, " <-- Warning: duplicates");
    else
        wprintw(w, "                        ");
    mvwprintw(w, 2, 0, "%s %s by %s", PROGNAME, PROGVER, BYLINE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
xorl %eax, %eax
cmpq $0x1a, %rax
je 0x2ff4
movb $0x0, 0x10(%rsp,%rax)
incq %rax
jmp 0x2fe4
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x22a0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
leaq 0x11fe(%rip), %rsi      # 0x4212
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
pushq $0x41
popq %rbp
leaq 0x11f7(%rip), %r15      # 0x421f
cmpl $0x5b, %ebp
je 0x3040
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2030
incl %ebp
jmp 0x3028
leaq 0x11db(%rip), %rsi      # 0x4222
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
pushq $-0x1a
popq %r13
leaq 0x11c1(%rip), %r15      # 0x421f
leaq 0x10(%rsp), %r14
testq %r13, %r13
je 0x30a6
movq 0x8(%rsp), %rax
movsbl 0x5a(%rax,%r13), %r12d
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2030
leal -0x41(%r12), %eax
cmpb $0x19, %al
ja 0x30a1
movslq %r12d, %rax
cmpb $0x1, -0x41(%rax,%r14)
sete %cl
movb $0x1, -0x41(%rax,%r14)
orb %cl, %bpl
incq %r13
jmp 0x3063
leaq 0x1183(%rip), %rax      # 0x4230
leaq 0x1195(%rip), %rsi      # 0x4249
testb $0x1, %bpl
cmovneq %rax, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
leaq 0x11b1(%rip), %rax      # 0x427e
movq %rax, (%rsp)
leaq 0x118a(%rip), %rcx      # 0x4262
leaq 0x118f(%rip), %r8       # 0x426e
leaq 0x1193(%rip), %r9       # 0x4279
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2070
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/BrianEnigma[P]cryptoslam/src/cryptogram.cpp
// Function: Cryptogram::paintMessage(_win_st*)
void Cryptogram::paintMessage(WINDOW *w)
{
    // 911:enigma THIS NEEDS WORK!
    int here=0, newHere=0, max;
    char *line;
    // Print the message, interlaced...
    wclear(w);
    wmove(w, 0, 0);
    // Find next \n
    wcolor_set(w, 3, NULL);
    max = cyphertext.length();
    // Traverse the string, one line at a time
    while (here != max)
    {
        // Print plaintext line
        line = strdup(plaintext.c_str() + here);
        for (char *c = line; *c; c++)
            if (*c == '\n') *c = 0;
        wattron(w, A_BOLD);
        wprintw(w, "%s\n", line);
        wattroff(w, A_BOLD);
        free(line);
        // Print cyphertext line
        line = strdup(cyphertext.c_str() + here);
        for (char *c = line; *c; c++)
            if (*c == '\n') *c = 0;
        wattron(w, A_DIM);
        wprintw(w, "%s\n", line);
        wattroff(w, A_DIM);
        free(line);
        // Move on to next line
        newHere = cyphertext.find('\n', here);
        // If no more newlines, ensure we are at the end
        if (newHere == -1)
            newHere = max;
        else
            here = newHere + 1;
        //else
        //    here = newHere;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x21c0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x22a0
movl 0x8(%r14), %ebp
xorl %r15d, %r15d
cmpl %ebp, %r15d
je 0x3222
movslq %r15d, %r12
movq 0x20(%r14), %rdi
addq %r12, %rdi
callq 0x2330
movq %rax, %r13
movzbl (%rax), %ecx
cmpl $0xa, %ecx
je 0x3166
testl %ecx, %ecx
jne 0x3169
jmp 0x316e
movb $0x0, (%rax)
incq %rax
jmp 0x3158
movq %rbx, %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x2100
movq %rbx, %rdi
leaq 0x1119(%rip), %rsi      # 0x42a0
movq %r13, %rdx
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x2270
movq %r13, %rdi
callq 0x2240
movq (%r14), %rdi
addq %r12, %rdi
callq 0x2330
movq %rax, %r13
movzbl (%rax), %ecx
cmpl $0xa, %ecx
je 0x31c4
testl %ecx, %ecx
jne 0x31c7
jmp 0x31cc
movb $0x0, (%rax)
incq %rax
jmp 0x31b6
movq %rbx, %rdi
movl $0x100000, %esi         # imm = 0x100000
xorl %edx, %edx
callq 0x2100
movq %rbx, %rdi
leaq 0x10bb(%rip), %rsi      # 0x42a0
movq %r13, %rdx
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
movl $0x100000, %esi         # imm = 0x100000
xorl %edx, %edx
callq 0x2270
movq %r13, %rdi
callq 0x2240
movq %r14, %rdi
pushq $0xa
popq %rsi
movq %r12, %rdx
callq 0x2290
incl %eax
cmovel %r15d, %eax
movl %eax, %r15d
jmp 0x313d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop