LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/JD557[P]Wolf/grammar.cpp
// Function: f(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool f(string& in) {
	if (in[0]=='F') {consume(in);}
	else {return false;}

	Interval i=inter(in);
	if (i.start<0 || i.end<0) {return false;}

	cout << "STRING INPUT:";
	string input;
	cin >> input;

	string converted_input;
	for (size_t x=0;x<input.size();++x) {
		for (int y=7;y>=0;--y) {
			converted_input+=((input[x]&(1<<y))!=0?'1':'0');
		}
	}

	write(converted_input,i.start,i.end);

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq (%rdi), %rax
cmpb $0x46, (%rax)
jne 0x3798
movq %rdi, %rbx
callq 0x2d34
movq %rbx, %rdi
callq 0x2ebd
movq %rax, %rbx
movabsq $-0x7fffffff80000000, %rax # imm = 0x8000000080000000
testq %rax, %rbx
je 0x37a9
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4818(%rip), %rdi      # 0x7fc8
leaq 0x20ad(%rip), %rsi      # 0x5864
callq 0x2160
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x4805(%rip), %rdi      # 0x7fd8
leaq -0x50(%rbp), %rsi
callq 0x21c0
movq %rbx, %rax
shrq $0x20, %rax
movq %rax, -0x30(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r12d, %r12d
pushq $0x7
popq %r14
leaq -0x70(%rbp), %r15
cmpq -0x48(%rbp), %r12
jae 0x3837
movl %r14d, %r13d
testl %r13d, %r13d
js 0x3832
movq -0x50(%rbp), %rax
movsbl (%rax,%r12), %eax
btl %r13d, %eax
movl $0x0, %esi
adcl $0x30, %esi
movq %r15, %rdi
callq 0x2130
decl %r13d
jmp 0x380b
incq %r12
jmp 0x3802
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x21e0
leaq -0x90(%rbp), %rdi
movl %ebx, %esi
movq -0x30(%rbp), %rdx
callq 0x2e10
leaq -0x90(%rbp), %rdi
callq 0x2090
leaq -0x70(%rbp), %rdi
callq 0x2090
leaq -0x50(%rbp), %rdi
callq 0x2090
movb $0x1, %al
jmp 0x379a
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2090
jmp 0x3899
jmp 0x3896
movq %rax, %rbx
jmp 0x38a2
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2090
leaq -0x50(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/useBlob.cc
// Function: main
int main()
{
	StrBlob b1;
	{
		// StrBlob(initializer_list<string> il)
		StrBlob b2 = { "a", "an", "the" };
		b1 = b2; // assign
		b2.push_back("about");
		cout << b2.size() << endl;
	}
	cout << b1.size() << endl;

	// auto == StrBlobPtr
	for (auto it = b1.begin(); neq(it, b1.end()); it.incr())
		cout << it.deref() << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq -0x40(%rbp), %rdi
callq 0x26bf
leaq 0x1ce4(%rip), %rsi      # 0x4004
leaq -0xb8(%rbp), %r14
leaq -0x29(%rbp), %rdx
movq %r14, %rdi
callq 0x2060
leaq -0x98(%rbp), %r15
leaq 0x1cc5(%rip), %rsi      # 0x4006
leaq -0x2b(%rbp), %rdx
movq %r15, %rdi
callq 0x2060
leaq -0x78(%rbp), %r15
leaq 0x1cb1(%rip), %rsi      # 0x4009
leaq -0x2a(%rbp), %rdx
movq %r15, %rdi
callq 0x2060
leaq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
pushq $0x3
popq %rdx
callq 0x2554
pushq $0x40
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xb8, %rdi
callq 0x2080
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x237a
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2b86
leaq 0x1c65(%rip), %rsi      # 0x400d
leaq -0xb8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2060
movq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x2c72
leaq -0xb8(%rbp), %rdi
callq 0x2080
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x4bd6(%rip), %rdi      # 0x6fc0
callq 0x20c0
movq %rax, %rdi
callq 0x2090
leaq -0x50(%rbp), %rdi
callq 0x2e5c
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x4baa(%rip), %rdi      # 0x6fc0
callq 0x20c0
movq %rax, %rdi
callq 0x2090
leaq -0xb8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2576
leaq -0x58(%rbp), %rbx
leaq -0x40(%rbp), %r15
leaq -0xb8(%rbp), %r12
movq 0x4b77(%rip), %r13      # 0x6fc0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x25a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2593
movl %eax, %r14d
leaq -0x50(%rbp), %rdi
callq 0x2fa4
testb %r14b, %r14b
je 0x2495
movq %r12, %rdi
callq 0x25ca
movq %r13, %rdi
movq %rax, %rsi
callq 0x2100
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
callq 0x264a
jmp 0x2449
leaq -0xb0(%rbp), %rdi
callq 0x2fa4
leaq -0x38(%rbp), %rdi
callq 0x2e5c
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2510
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x2080
jmp 0x2518
jmp 0x2515
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0xb8, %rdi
callq 0x2080
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x24da
jmp 0x2542
jmp 0x24f8
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x2080
cmpq %r14, %r15
jne 0x24fb
jmp 0x2542
jmp 0x2510
movq %rax, %rbx
jmp 0x2542
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2e5c
jmp 0x2542
jmp 0x2533
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2fa4
jmp 0x2536
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x2fa4
leaq -0x38(%rbp), %rdi
callq 0x2e5c
movq %rbx, %rdi
callq 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/./StrBlob.h
// Function: StrBlobPtr::incr()
inline
StrBlobPtr& StrBlobPtr::incr()
{
	// if curr already points past the end of the container, can't increment it
	check(curr, "increment past end of StrBlobPtr");
	++curr;	// advance the current state
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %r14
leaq 0x1a21(%rip), %rsi      # 0x4086
leaq -0x50(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
callq 0x2060
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2fec
leaq -0x28(%rbp), %rdi
callq 0x2e5c
leaq -0x50(%rbp), %rdi
callq 0x2080
incq 0x10(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/./StrBlob.h
// Function: eq(StrBlobPtr const&, StrBlobPtr const&)
inline
bool eq(const StrBlobPtr& lhs, const StrBlobPtr& rhs)
{
	auto l = lhs.wptr.lock();
	auto r = rhs.wptr.lock();
	// if the underlying vector is the same
	if (l == r)
		// then they're equal if they're both null or
		// if they point to the same element
		return (!r || lhs.curr == rhs.curr);
	else
		return false;	// if they point to difference vectors, they're not equal
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f22
leaq -0x30(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2f22
movq (%r15), %rax
cmpq (%r12), %rax
je 0x2eee
xorl %ebx, %ebx
jmp 0x2f01
testq %rax, %rax
sete %al
movq 0x10(%r14), %rcx
cmpq %rcx, 0x10(%rbx)
sete %bl
orb %al, %bl
leaq -0x28(%rbp), %rdi
callq 0x2e5c
leaq -0x38(%rbp), %rdi
callq 0x2e5c
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH08_TheIOLibrary/examples/buf.cc
// Function: main
int main()
{
	// writes hi and a newline, then flushes the buffer
    cout << "hi!" << endl;  

	// writes hi, then flushes the buffer; adds no data
    cout << "hi!" << flush; 

	// writes hi and a null, then flushes the buffer
    cout << "hi!" << ends;  

    cout << unitbuf;         // all writes will be flushed immediately

	// any output is flushed immediately, no buffering
    cout << "first" << " second" << endl;

	cout << nounitbuf;       // returns to normal buffering

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x2dfe(%rip), %rbx      # 0x3fd8
leaq 0xe23(%rip), %r14       # 0x2004
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1070
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1070
movq %rax, %rdi
callq 0x1050
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1070
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x2000, 0x18(%rbx,%rax) # imm = 0x2000
leaq 0xdd8(%rip), %rsi       # 0x2008
movq %rbx, %rdi
callq 0x1070
leaq 0xdcf(%rip), %rsi       # 0x200e
movq %rax, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1040
movq (%rbx), %rax
movq -0x18(%rax), %rax
andl $0xffffdfff, 0x18(%rbx,%rax) # imm = 0xFFFFDFFF
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/base64_dec.c
// Function: main
int main(int argc, char *argv[])
{
	if (argc < 2)
	{
		printf("Usage: base64_dec file.base64\r\n");
		return -1;
	}

	unsigned int size = 0;

	char *buffer = get_file(argv[1], &size);
	if (buffer == NULL)
	{
		printf("Unable to open %s\r\n", argv[1]);
		return -1;
	}

	unsigned char *decode = (unsigned char *)malloc(size);
	if (decode == NULL)
	{
		perror("malloc failed");
		return -1;
	}
	memset(decode, 0, size);
	size_t length = size;



	printf("Base64: %s\n", buffer);
	base64decode(buffer, strlen(buffer), decode, &length);
	printf("decode: %s\nlength %d\n", decode, (int)length);


	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x1, %edi
jg 0x1348
leaq 0xd4c(%rip), %rdi       # 0x208a
callq 0x1040
jmp 0x13d6
movq %rsi, %rbx
leaq -0x24(%rbp), %rsi
andl $0x0, (%rsi)
movq 0x8(%rbx), %rdi
callq 0x11fc
testq %rax, %rax
je 0x13c4
movq %rax, %r14
movl -0x24(%rbp), %ebx
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x1090
testq %rax, %rax
je 0x13e8
movq %rax, %r15
leaq -0x30(%rbp), %r12
movq %rbx, (%r12)
leaq 0xcc4(%rip), %rdi       # 0x204c
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x1080
movq %r14, %rdi
callq 0x1070
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1537
movl (%r12), %edx
leaq 0xca0(%rip), %rdi       # 0x2058
movq %r15, %rsi
xorl %eax, %eax
callq 0x1080
jmp 0x13d9
movq 0x8(%rbx), %rsi
leaq 0xc5b(%rip), %rdi       # 0x202a
xorl %eax, %eax
callq 0x1080
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc4f(%rip), %rdi       # 0x203e
callq 0x10e0
jmp 0x13d6
nop
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/base64.c
// Function: base64decode
int base64decode(char *in, size_t inLen, unsigned char *out, size_t *outLen)
{
	char *end = in + inLen;
	char iter = 0;
	uint32_t buf = 0;
	size_t len = 0;

	while (in < end) {
		unsigned char c = d[*in++];

		switch (c) {
		case WHITESPACE: continue;   /* skip whitespace */
		case INVALID:    return 1;   /* invalid input, return error */
		case EQUALS:                 /* pad character, end of data */
			in = end;
			continue;
		default:
			buf = buf << 6 | c;
			iter++; // increment the number of iteration
					/* If the buffer is full, split it into bytes */
			if (iter == 4) {
				if ((len += 3) > *outLen) return 1; /* buffer overflow */
				*(out++) = (buf >> 16) & 255;
				*(out++) = (buf >> 8) & 255;
				*(out++) = buf & 255;
				buf = 0; iter = 0;

			}
		}
	}

	if (iter == 3) {
		if ((len += 2) > *outLen) return 1; /* buffer overflow */
		*(out++) = (buf >> 10) & 255;
		*(out++) = (buf >> 2) & 255;
	}
	else if (iter == 2) {
		if (++len > *outLen) return 1; /* buffer overflow */
		*(out++) = (buf >> 4) & 255;
	}

	*outLen = len; /* modify to reflect the actual output size */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %r8
addq %rdi, %rsi
xorl %r9d, %r9d
leaq 0xbb2(%rip), %rcx       # 0x2100
movl $0x1, %r14d
xorl %r11d, %r11d
xorl %r10d, %r10d
movq %rdi, %rax
cmpq %rsi, %rax
jae 0x15b8
movsbq (%rax), %rbx
movq %rax, %rdi
incq %rdi
movzbl (%rbx,%rcx), %ebx
movq %rdi, %rax
cmpl $0x40, %ebx
je 0x155d
movq %rsi, %rax
cmpl $0x41, %ebx
je 0x155d
cmpl $0x42, %ebx
je 0x15fb
movl %r10d, %eax
shll $0x6, %eax
orl %eax, %ebx
incb %r11b
movl %ebx, %r10d
cmpb $0x4, %r11b
jne 0x155a
addq $0x3, %r9
cmpq (%r8), %r9
ja 0x15fb
movl %eax, %r10d
shrl $0x10, %r10d
movb %r10b, (%rdx)
movb %ah, 0x1(%rdx)
movb %bl, 0x2(%rdx)
addq $0x3, %rdx
jmp 0x1554
cmpb $0x2, %r11b
je 0x15e2
movzbl %r11b, %ecx
cmpl $0x3, %ecx
jne 0x15f5
addq $0x2, %r9
cmpq (%r8), %r9
ja 0x15fb
movl %r10d, %eax
shrl $0xa, %eax
movb %al, (%rdx)
incq %rdx
movl $0x2, %ecx
jmp 0x15ef
incq %r9
cmpq (%r8), %r9
ja 0x15fb
movl $0x4, %ecx
shrl %cl, %r10d
movb %r10b, (%rdx)
movq %r9, (%r8)
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/testClient/testBenchmark.cpp
// Function: sync_worker(void*)
static void *sync_worker(void *p)
{
	int id = (int)(long)p;
	char tag[128]; snprintf(tag, sizeof tag, "thread-%d", id);

	size_t msize = sizeof(struct proto_h16_head) + pkgSize;
	char *reqbuf = new char[msize];
	char *rspbuf = new char[msize];

	memset(reqbuf, 0, msize);
	memset(rspbuf, 0, msize);

	int fd = -1; 

	while (true) {	
		if (fd < 0) {
			fd = beyondy::XbsClient(host, O_NONBLOCK, timeout);
			if (fd < 0) {
				fprintf(stdout, "%s connect failed: %m\n", tag);
				continue;
			}
		}

		if (__send_req(fd, cmd, reqbuf, pkgSize, tag) < 0) {
			fprintf(stdout, "%s send req failed: %m\n", tag);
			close(fd); fd = -1;
			continue;
		}
		else {
			++pkgSent[id];
			byteSent[id] += pkgSize;
		}

		if (__read_rsp(fd, rspbuf, pkgSize, tag) < 0) {
			fprintf(stdout, "%s read rsp failed: %m\n", tag);
			close(fd); fd = -1;
			continue;	
		}
		else {
			++pkgRspd[id];
			byteRspd[id] += pkgSize;
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r12
leaq 0x19bc(%rip), %rdx      # 0x413e
movq %rsp, %rbx
movl $0x80, %esi
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2240
movslq 0x39d2(%rip), %r13      # 0x6170
addq $0x10, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, %r14
movq %r13, %rdi
callq 0x2030
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2100
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2100
movslq %r12d, %rbp
pushq $-0x1
popq %r12
movq 0x37d8(%rip), %r13      # 0x5fb8
testl %r12d, %r12d
jns 0x2806
movq 0x398c(%rip), %rdi      # 0x6178
movl $0x2710, %edx           # imm = 0x2710
movl $0x800, %esi            # imm = 0x800
callq 0x3353
movl %eax, %r12d
testl %eax, %eax
js 0x28a8
movl 0x395c(%rip), %esi      # 0x6168
movl 0x395e(%rip), %ecx      # 0x6170
movl %r12d, %edi
movq %r14, %rdx
movq %rbx, %r8
callq 0x2a55
testl %eax, %eax
js 0x2875
movq 0x395d(%rip), %rax      # 0x6188
incq (%rax,%rbp,8)
movslq 0x393a(%rip), %rdx      # 0x6170
movq 0x3953(%rip), %rax      # 0x6190
addq %rdx, (%rax,%rbp,8)
movl %r12d, %edi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x2aeb
testl %eax, %eax
js 0x2882
movq 0x393e(%rip), %rax      # 0x6198
incq (%rax,%rbp,8)
movslq 0x390b(%rip), %rax      # 0x6170
movq 0x3934(%rip), %rcx      # 0x61a0
addq %rax, (%rcx,%rbp,8)
jmp 0x27e0
movq (%r13), %rdi
leaq 0x18df(%rip), %rsi      # 0x415f
jmp 0x288d
movq (%r13), %rdi
leaq 0x18ea(%rip), %rsi      # 0x4177
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2200
movl %r12d, %edi
callq 0x22a0
pushq $-0x1
popq %r12
jmp 0x27e0
movq (%r13), %rdi
leaq 0x1895(%rip), %rsi      # 0x4148
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2200
jmp 0x27e0
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/testClient/testBenchmark.cpp
// Function: _send_req(int, int, char*, int, char const*)
static int __send_req(int fd, int cmd, char *reqbuf, int size, const char *tag)
{
	struct proto_h16_head *h = (struct proto_h16_head *)reqbuf;
	int msize = size + sizeof(*h);

	h->len = msize;
	h->cmd = cmd;
	h->ver = 1;
	h->syn = 2;
	h->ack = 3;
	*(int *)(h + 1) = 0; // to tell echo rsp immediately

	while (true) {
		ssize_t wlen = beyondy::XbsWriteN(fd, reqbuf, msize, timeout);
		if (wlen < 0 && errno == EINTR) continue;
		if (wlen != msize) {
			fprintf(stdout, "FAIL: %s pkg-size=%d, write req failed: %m\n", tag, size);
			return -1;	
		}

		break;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %edi, %ebp
leal 0x10(%r14), %eax
movl %eax, (%rdx)
movw %si, 0x4(%rdx)
movw $0x1, 0x6(%rdx)
movabsq $0x300000002, %rcx      # imm = 0x300000002
movq %rcx, 0x8(%rdx)
andl $0x0, 0x10(%rdx)
movslq %eax, %r12
movl $0x2710, %ecx           # imm = 0x2710
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2bec
movq %rax, %r13
testq %rax, %rax
jns 0x2ab4
callq 0x2040
cmpl $0x4, (%rax)
je 0x2a90
xorl %eax, %eax
cmpq %r12, %r13
je 0x2adc
movq 0x34f6(%rip), %rax      # 0x5fb8
movq (%rax), %rdi
leaq 0x16c3(%rip), %rsi      # 0x418f
movq %rbx, %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2200
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberty65[P]bServer/frame/testClient/testBenchmark.cpp
// Function: _read_rsp(int, char*, int, char const*)
static int __read_rsp(int fd, char *rspbuf, int size, const char *tag)
{
	while (true) {
		int msize = size + sizeof(struct proto_h16_head);
		ssize_t rlen = beyondy::XbsReadN(fd, rspbuf, msize, timeout);

		if (rlen != msize) {
			fprintf(stdout, "FAIL: %s pkg-size=%d, read rsp failed: %m\n", tag, msize);
			return -1;	
		}

		break;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
addl $0x10, %ebp
movslq %ebp, %rbx
movl $0x2710, %ecx           # imm = 0x2710
movq %rbx, %rdx
callq 0x2dc0
movq %rax, %r15
cmpq %rbx, %rax
je 0x2b2f
movq 0x349f(%rip), %rax      # 0x5fb8
movq (%rax), %rdi
leaq 0x1698(%rip), %rsi      # 0x41bb
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2200
xorl %eax, %eax
cmpq %rbx, %r15
setne %al
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/base64_enc.c
// Function: main
int main(int argc, char *argv[])
{
	if (argc < 2)
	{
		printf("Usage: base64_enc file.bin\r\n");
		return -1;
	}

	unsigned int size = 0;

	char *encode = get_file(argv[1], &size);
	int buf_size = (size / 3) * 4;
	if (size % 3)
		buf_size += 4;

	char *buffer = (char *)malloc(buf_size);
	if (buffer == NULL)
	{
		perror("malloc failed");
		return -1;
	}

	memset(buffer, 0, buf_size);
	base64encode(encode, size, buffer, buf_size);
	buffer[buf_size] = 0;
	printf("Base64: %s\n", buffer);

	write_file((char *)"file.base64", buffer, buf_size);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jg 0x133a
leaq 0xd3f(%rip), %rdi       # 0x206c
callq 0x1040
pushq $-0x1
popq %rbx
jmp 0x13c2
leaq -0x2c(%rbp), %rbx
andl $0x0, (%rbx)
movq 0x8(%rsi), %rdi
movq %rbx, %rsi
callq 0x11ec
movq %rax, %r15
movl (%rbx), %r14d
pushq $0x3
popq %rcx
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
xorl %ebx, %ebx
leal (,%rax,4), %ecx
testl %edx, %edx
leal 0x4(,%rax,4), %eax
cmovel %ecx, %eax
movslq %eax, %r12
pushq $0x1
popq %rdi
movq %r12, %rsi
callq 0x1080
testq %rax, %rax
je 0x13d3
movq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x13e4
movb $0x0, (%r13,%r12)
leaq 0xc92(%rip), %rdi       # 0x2038
movq %r13, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0xc8d(%rip), %rdi       # 0x2044
movq %r13, %rsi
movl %r12d, %edx
callq 0x129a
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc50(%rip), %rdi       # 0x202a
callq 0x10d0
jmp 0x1332
// File: /workspace/github_cpp_makefile_star2_O2/eschwabe[P]interview-practice/src/towers.cpp
// Function: PrintStacks(Adapter<std::stack<int, std::deque<int, std::allocator<int>>>>&, Adapter<std::stack<int, std::deque<int, std::allocator<int>>>>&, Adapter<std::stack<int, std::deque<int, std::allocator<int>>>>&)
void PrintStacks(MyStack& source, MyStack& dest, MyStack& temp) {

    cout << "SRC: ";
    for(auto i : source.get_container()) {
        cout << i << " ";
    }
    cout << endl;

    cout << "DEST: ";
    for(auto i : dest.get_container()) {
        cout << i << " ";
    }
    cout << endl;

    cout << "TEMP: ";
    for(auto i : temp.get_container()) {
        cout << i << " ";
    }
    cout << endl;
    cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movq 0x2cfa(%rip), %r15      # 0x3fd8
leaq 0xd1f(%rip), %rsi       # 0x2004
movq %r15, %rdi
callq 0x10a0
movq 0x10(%r12), %r13
movq 0x20(%r12), %r14
movq 0x28(%r12), %rbp
movq 0x30(%r12), %rbx
leaq 0xd00(%rip), %r12       # 0x2008
cmpq %rbx, %r13
je 0x133e
movl (%r13), %esi
movq %r15, %rdi
callq 0x1110
movq %rax, %rdi
movq %r12, %rsi
callq 0x10a0
addq $0x4, %r13
cmpq %r14, %r13
jne 0x1308
movq 0x8(%rbp), %r13
addq $0x8, %rbp
leaq 0x200(%r13), %r14
jmp 0x1308
movq 0x2c93(%rip), %r15      # 0x3fd8
movq %r15, %rdi
callq 0x1060
leaq 0xcb6(%rip), %rsi       # 0x200a
movq %r15, %rdi
callq 0x10a0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %r12
movq 0x20(%rax), %rbx
movq 0x28(%rax), %r13
movq 0x30(%rax), %rbp
leaq 0xc90(%rip), %r14       # 0x2008
cmpq %rbp, %r12
je 0x13af
movl (%r12), %esi
movq %r15, %rdi
callq 0x1110
movq %rax, %rdi
movq %r14, %rsi
callq 0x10a0
addq $0x4, %r12
cmpq %rbx, %r12
jne 0x1378
movq 0x8(%r13), %r12
addq $0x8, %r13
leaq 0x200(%r12), %rbx
jmp 0x1378
movq 0x2c22(%rip), %r14      # 0x3fd8
movq %r14, %rdi
callq 0x1060
leaq 0xc4c(%rip), %rsi       # 0x2011
movq %r14, %rdi
callq 0x10a0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r15
movq 0x20(%rax), %rbp
movq 0x28(%rax), %r12
movq 0x30(%rax), %r13
leaq 0xc1f(%rip), %rbx       # 0x2008
cmpq %r13, %r15
je 0x141f
movl (%r15), %esi
movq %r14, %rdi
callq 0x1110
movq %rax, %rdi
movq %rbx, %rsi
callq 0x10a0
addq $0x4, %r15
cmpq %rbp, %r15
jne 0x13e9
movq 0x8(%r12), %r15
addq $0x8, %r12
leaq 0x200(%r15), %rbp
jmp 0x13e9
movq 0x2bb2(%rip), %rbx      # 0x3fd8
movq %rbx, %rdi
callq 0x1060
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_cpp_makefile_star2_O2/eschwabe[P]interview-practice/src/towers.cpp
// Function: MoveDisc(Adapter<std::stack<int, std::deque<int, std::allocator<int>>>>&, Adapter<std::stack<int, std::deque<int, std::allocator<int>>>>&, Adapter<std::stack<int, std::deque<int, std::allocator<int>>>>&, int)
void MoveDisc(MyStack& source, MyStack& dest, MyStack& temp, int count) {
    if(count == 0) {
        return;
    }
    if(count > 1) {
        MoveDisc(source, dest, temp, count-1);
    }

    MoveDisc(dest, temp, source, count-1);
    dest.push(source.top());
    source.pop();
    PrintStacks(s_source, s_dest, s_temp);
    MoveDisc(temp, dest, source, count-1);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x2d04(%rip), %r12      # 0x4160
leaq 0x2cad(%rip), %r13      # 0x4110
testl %ecx, %ecx
je 0x14e0
movq %rdi, %rbp
leal -0x1(%rcx), %r15d
cmpl $0x2, %ecx
jl 0x1484
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r15d, %ecx
callq 0x1444
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movl %r15d, %ecx
callq 0x1444
movq 0x30(%rbp), %rsi
cmpq 0x38(%rbp), %rsi
jne 0x14af
movq 0x48(%rbp), %rax
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x4, %rsi
movq %rbx, %rdi
callq 0x17d4
movq %rbp, %rdi
callq 0x1a08
leaq 0x2bf6(%rip), %rdi      # 0x40c0
movq %r12, %rsi
movq %r13, %rdx
callq 0x12bc
movq %r14, %rdi
movq %rbp, %r14
movl %r15d, %ecx
jmp 0x1463
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/eschwabe[P]interview-practice/src/towers.cpp
// Function: main
int main()
{

    const int N = 3;
    for(int i = N; i > 0; --i) {
        s_source.push(i);
    }

    PrintStacks(s_source, s_dest, s_temp);

    MoveDisc(s_source, s_dest, s_temp, N);

    PrintStacks(s_source, s_dest, s_temp);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x3
popq %rax
leaq 0x2bbe(%rip), %rbx      # 0x40c0
leaq 0xc(%rsp), %r14
movl %eax, 0xc(%rsp)
testl %eax, %eax
jle 0x1522
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17d4
movl 0xc(%rsp), %eax
decl %eax
jmp 0x1507
leaq 0x2b97(%rip), %rbx      # 0x40c0
leaq 0x2c30(%rip), %r14      # 0x4160
leaq 0x2bd9(%rip), %r15      # 0x4110
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12bc
pushq $0x3
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1444
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12bc
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: u::getline[abi:cxx11](u::file&)
u::optional<u::string> getline(u::file &fp) {
    u::string s;
    for (;;) {
        char buf[256];
        if (!fgets(buf, sizeof(buf), fp.get())) {
            if (feof(fp.get())) {
                if (s.empty())
                    return u::none;
                else
                    return u::move(s);
            }
            abort();
        }
        size_t n = strlen(buf);
        if (n && buf[n - 1] == '\n')
            --n;
        s.append(buf, n);
        if (n < sizeof(buf) - 1)
            return u::move(s);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rsi, %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq (%r14), %rdx
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2210
testq %rax, %rax
je 0x2460
movq %r15, %rdi
callq 0x2080
testq %rax, %rax
je 0x2439
movq %rax, %r13
cmpb $0xa, 0x1f(%rsp,%rax)
jne 0x243c
decq %r13
jmp 0x243c
xorl %r13d, %r13d
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2040
cmpq $0xfe, %r13
ja 0x2408
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4336
jmp 0x2484
movq (%r14), %rdi
callq 0x21f0
testl %eax, %eax
je 0x24a0
cmpq $0x0, 0x8(%rsp)
je 0x2481
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4336
jmp 0x2484
movb $0x0, (%rbx)
movq %rsp, %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x20d0
jmp 0x24a9
jmp 0x24a9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheData::findTriangle(unsigned long)
size_t vertexCacheData::findTriangle(size_t triangle) {
    for (size_t i = 0; i < indices.size(); i++)
        if (indices[i] == triangle)
            return i;
    return (size_t)-1;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %edi, %edi
pushq $-0x1
popq %rax
cmpq %rdx, %rdi
jae 0x24e8
cmpq %rsi, (%rcx,%rdi,8)
je 0x24e5
incq %rdi
jmp 0x24d5
movq %rdi, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheData::moveTriangle(unsigned long)
void vertexCacheData::moveTriangle(size_t triangle) {
    size_t index = findTriangle(triangle);
    assert(index != (size_t)-1);

    // Erase the index and add it to the end
    indices.erase(indices.begin() + index,
                  indices.begin() + index + 1);
    indices.push_back(triangle);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
callq 0x24c2
cmpq $-0x1, %rax
je 0x252c
movq (%rbx), %rcx
leaq (%rcx,%rax,8), %rsi
leaq (%rcx,%rax,8), %rdx
addq $0x8, %rdx
movq %rbx, %rdi
callq 0x4342
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4348
addq $0x10, %rsp
popq %rbx
retq
leaq 0x3ba5(%rip), %rdi      # 0x60d8
leaq 0x3bb2(%rip), %rsi      # 0x60ec
leaq 0x3bb4(%rip), %rcx      # 0x60f5
movl $0x324, %edx            # imm = 0x324
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCache::findVertex(unsigned long)
size_t vertexCache::findVertex(size_t vertex) {
    for (size_t i = 0; i < 32; i++)
        if (m_cache[i] == vertex)
            return i;
    return (size_t)-1;
}

// Assembly:
xorl %ecx, %ecx
pushq $-0x1
popq %rax
cmpq $0x20, %rcx
je 0x259d
cmpq %rsi, (%rdi,%rcx,8)
je 0x259a
incq %rcx
jmp 0x2589
movq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCache::addVertex(unsigned long)
void vertexCache::addVertex(size_t vertex) {
    size_t w = findVertex(vertex);
    // remove the vertex for later reinsertion at the top
    if (w != (size_t)-1)
        removeVertex(w);
    else // not found, cache miss!
        m_misses++;
    // shift all vertices down to make room for the new top vertex
    for (size_t i = 39; i != 0; i--)
        m_cache[i] = m_cache[i - 1];
    // add new vertex to cache
    m_cache[0] = vertex;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2584
cmpq $-0x1, %rax
je 0x25d6
movq %r14, %rdi
movq %rax, %rsi
callq 0x259e
jmp 0x25dd
incq 0x140(%r14)
movl $0x138, %eax            # imm = 0x138
testq %rax, %rax
je 0x25f6
movq -0x8(%r14,%rax), %rcx
movq %rcx, (%r14,%rax)
addq $-0x8, %rax
jmp 0x25e2
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCache::getCacheMissCount(std::vector<unsigned long, std::allocator<unsigned long>> const&)
size_t vertexCache::getCacheMissCount(const u::vector<size_t> &indices) {
    clear();
    for (auto &it : indices)
        addVertex(it);
    return m_misses;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2602
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x2653
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x25b4
addq $0x8, %r15
jmp 0x263d
movq 0x140(%rbx), %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::optimize(std::vector<unsigned long, std::allocator<unsigned long>>&)
vertexCacheOptimizer::result vertexCacheOptimizer::optimize(u::vector<size_t> &indices) {
    size_t find = (size_t)-1;
    for (size_t i = 0; i < indices.size(); i++)
        if (find == (size_t)-1 || (find != (size_t)-1 && indices[i] > find))
            find = indices[i];
    if (find == (size_t)-1)
        return kErrorNoVertices;

    result begin = init(indices, find + 1);
    if (begin != kSuccess)
        return begin;

    // Process
    while (process())
        ;

    // Rewrite the indices
    for (size_t i = 0; i < m_drawList.size(); i++)
        for (size_t j = 0; j < 3; j++)
            indices[3 * i + j] = m_triangles[m_drawList[i]].vertices[j];

    return kSuccess;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
pushq $-0x1
popq %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x26de
movq (%rax,%rsi,8), %rdi
cmpq %rdx, %rdi
movq %rdx, %r8
cmovaq %rdi, %r8
cmpq $-0x1, %rdx
cmoveq %rdi, %r8
incq %rsi
movq %r8, %rdx
jmp 0x26bb
cmpq $-0x1, %rdx
je 0x2751
incq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x275c
testl %eax, %eax
je 0x26fa
pushq $0x1
jmp 0x2753
movq %r14, %rdi
callq 0x438a
testb %al, %al
jne 0x26fa
movq 0x50(%r14), %rcx
movq 0x18(%r14), %rdx
movq 0x48(%r14), %rsi
subq %rsi, %rcx
sarq $0x3, %rcx
movq (%rbx), %rdi
addq $0x8, %rdx
xorl %eax, %eax
xorl %r8d, %r8d
cmpq %rcx, %r8
je 0x2754
xorl %r9d, %r9d
cmpq $0x3, %r9
je 0x2748
imulq $0x28, (%rsi,%r8,8), %r10
addq %rdx, %r10
movq (%r10,%r9,8), %r10
movq %r10, (%rdi,%r9,8)
incq %r9
jmp 0x272d
incq %r8
addq $0x18, %rdi
jmp 0x2725
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::fullScoreRecalculation()
size_t vertexCacheOptimizer::fullScoreRecalculation() {
    // Calculate score for all vertices
    for (size_t i = 0; i < m_vertices.size(); i++)
        m_vertices[i].currentScore = calcVertexScore(i);

    // Calculate scores for all active triangles
    float maxScore = 0.0f;
    size_t maxScoreTriangle = (size_t)-1;
    bool firstTime = true;

    for (size_t i = 0; i < m_triangles.size(); i++) {
        auto &it = m_triangles[i];
        if (it.rendered)
            continue;

        // Sum the score of all the triangle's vertices
        float sum = m_vertices[it.vertices[0]].currentScore +
                    m_vertices[it.vertices[1]].currentScore +
                    m_vertices[it.vertices[2]].currentScore;
        it.currentScore = sum;

        if (firstTime || sum > maxScore) {
            firstTime = false;
            maxScore = sum;
            maxScoreTriangle = i;
        }
    }

    return maxScoreTriangle;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rsi
pushq $0x20
popq %r15
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x6, %rax
cmpq %rax, %r14
jae 0x2a27
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2910
movq (%rbx), %rsi
movss %xmm0, (%rsi,%r15)
incq %r14
addq $0x40, %r15
jmp 0x29fa
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rax
subq %rdi, %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
xorps %xmm0, %xmm0
movb $0x1, %r8b
pushq $-0x1
popq %rcx
xorl %edx, %edx
cmpq %rdx, %rax
je 0x2aa7
cmpb $0x0, (%rdi)
jne 0x2a9e
movq 0x8(%rdi), %r9
movq 0x10(%rdi), %r10
shlq $0x6, %r9
movss 0x20(%rsi,%r9), %xmm1
shlq $0x6, %r10
addss 0x20(%rsi,%r10), %xmm1
movq 0x18(%rdi), %r9
shlq $0x6, %r9
addss 0x20(%rsi,%r9), %xmm1
movss %xmm1, 0x4(%rdi)
ucomiss %xmm0, %xmm1
seta %r9b
orb %r9b, %r8b
testb $0x1, %r8b
cmovneq %rdx, %rcx
jne 0x2a98
movaps %xmm0, %xmm1
xorl %r8d, %r8d
movaps %xmm1, %xmm0
incq %rdx
addq $0x28, %rdi
jmp 0x2a45
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::initialPass()
vertexCacheOptimizer::result vertexCacheOptimizer::initialPass() {
    for (size_t i = 0; i < m_indices.size(); i++) {
        size_t index = m_indices[i];
        if (index == (size_t)-1 || index >= m_vertices.size())
            return kErrorInvalidIndex;
        m_vertices[index].totalValence++;
        m_vertices[index].remainingValence++;
        m_vertices[index].indices.push_back(i / 3);
    }
    m_bestTriangle = fullScoreRecalculation();
    return kSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x1
popq %rbx
pushq $0x3
popq %r13
leaq 0x8(%rsp), %r12
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jae 0x2b36
movq (%rax,%r15,8), %rax
cmpq $-0x1, %rax
je 0x2b47
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
sarq $0x6, %rdx
cmpq %rdx, %rax
jae 0x2b47
shlq $0x6, %rax
leaq (%rcx,%rax), %rdi
movdqu 0x28(%rcx,%rax), %xmm0
psubq 0x34fa(%rip), %xmm0     # 0x6010
movdqu %xmm0, 0x28(%rcx,%rax)
movq %r15, %rax
xorl %edx, %edx
divq %r13
movq %rax, 0x8(%rsp)
movq %r12, %rsi
callq 0x5608
incq %r15
jmp 0x2acf
movq %r14, %rdi
callq 0x29e8
movq %rax, 0x1a8(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::addTriangle(unsigned long)
void vertexCacheOptimizer::addTriangle(size_t triangle) {
    // reset all cache positions
    for (size_t i = 0; i < 32; i++) {
        size_t find = m_vertexCache.getCachedVertex(i);
        if (find == (size_t)-1)
            continue;
        m_vertices[find].cachePosition = (size_t)-1;
    }

    triangleCacheData *t = &m_triangles[triangle];
    if (t->rendered)
        return;

    for (size_t i = 0; i < 3; i++) {
        // Add all the triangle's vertices to the cache
        m_vertexCache.addVertex(t->vertices[i]);
        vertexCacheData *v = &m_vertices[t->vertices[i]];

        // Decrease the remaining valence.
        v->remainingValence--;

        // Move the added triangle to the end of the vertex's triangle index
        // list such that the first `remainingValence' triangles in the index
        // list are only the active ones.
        v->moveTriangle(triangle);
    }

    // It's been rendered, mark it
    m_drawList.push_back(triangle);
    t->rendered = true;

    // Update all the vertex cache positions
    for (size_t i = 0; i < 32; i++) {
        size_t index = m_vertexCache.getCachedVertex(i);
        if (index == (size_t)-1)
            continue;
        m_vertices[index].cachePosition = i;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
leaq 0x60(%rdi), %rbx
movq (%rdi), %rax
pushq $0xc
popq %rcx
cmpq $0x2c, %rcx
je 0x2b99
movq (%r14,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x2b94
shlq $0x6, %rdx
orq $-0x1, 0x18(%rax,%rdx)
incq %rcx
jmp 0x2b7a
movq 0x18(%r14), %r12
imulq $0x28, %r15, %rax
cmpb $0x0, (%r12,%rax)
je 0x2bb6
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq %rax, %r12
pushq $0x1
popq %r13
cmpq $0x4, %r13
je 0x2bf0
movq (%r12,%r13,8), %rsi
movq %rbx, %rdi
callq 0x25b4
movq (%r12,%r13,8), %rax
movq (%r14), %rcx
shlq $0x6, %rax
leaq (%rcx,%rax), %rdi
decq 0x30(%rcx,%rax)
movq %r15, %rsi
callq 0x24ea
incq %r13
jmp 0x2bbd
leaq 0x48(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4348
movb $0x1, (%r12)
movq (%r14), %rax
xorl %ecx, %ecx
cmpq $0x20, %rcx
je 0x2ba8
movq (%rbx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x2c21
shlq $0x6, %rdx
movq %rcx, 0x18(%rax,%rdx)
incq %rcx
jmp 0x2c08
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::cleanFlags()
bool vertexCacheOptimizer::cleanFlags() {
    bool found = false;
    for (size_t i = 0; i < 32; i++) {
        size_t find = m_vertexCache.getCachedVertex(i);
        if (find == (size_t)-1)
            continue;

        vertexCacheData *v = &m_vertices[find];
        for (size_t j = 0; j < v->remainingValence; j++) {
            triangleCacheData *t = &m_triangles[v->indices[j]];
            found = true;
            // Clear flags
            t->calculated = false;
            for (size_t k = 0; k < 3; k++)
                m_vertices[t->vertices[k]].calculated = false;
        }
    }
    return found;
}

// Assembly:
pushq %r14
pushq %rbx
movq (%rdi), %rcx
xorl %edx, %edx
movabsq $0x1, %rsi
xorl %eax, %eax
cmpq $0x20, %rdx
je 0x2c9e
movq 0x60(%rdi,%rdx,8), %r9
cmpq $-0x1, %r9
je 0x2c99
shlq $0x6, %r9
leaq (%rcx,%r9), %r8
movq 0x30(%rcx,%r9), %r9
movq 0x18(%rdi), %r10
xorl %r11d, %r11d
cmpq %r9, %r11
je 0x2c99
movq (%r8), %rax
imulq $0x28, (%rax,%r11,8), %rbx
leaq (%r10,%rbx), %rax
movb $0x0, 0x20(%r10,%rbx)
movq %rsi, %rbx
cmpq $0x4, %rbx
je 0x2c92
movq (%rax,%rbx,8), %r14
shlq $0x6, %r14
movb $0x0, 0x38(%rcx,%r14)
incq %rbx
jmp 0x2c79
incq %r11
movb $0x1, %al
jmp 0x2c5f
incq %rdx
jmp 0x2c3a
andb $0x1, %al
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::triangleScoreRecalculation(unsigned long)
void vertexCacheOptimizer::triangleScoreRecalculation(size_t triangle) {
    triangleCacheData *t = &m_triangles[triangle];

    // Calculate vertex scores
    float sum = 0.0f;
    for (size_t i = 0; i < 3; i++) {
        vertexCacheData *v = &m_vertices[t->vertices[i]];
        float score = v->calculated ? v->currentScore : calcVertexScore(t->vertices[i]);
        v->currentScore = score;
        v->calculated = true;
        sum += score;
    }

    t->currentScore = sum;
    t->calculated = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
imulq $0x28, %rsi, %r14
addq 0x18(%rdi), %r14
xorps %xmm1, %xmm1
pushq $0x1
popq %r15
cmpq $0x4, %r15
je 0x2d10
movq (%r14,%r15,8), %rsi
movq (%rbx), %rax
movq %rsi, %rcx
shlq $0x6, %rcx
leaq (%rax,%rcx), %r12
cmpb $0x1, 0x38(%rax,%rcx)
jne 0x2ce6
movss 0x20(%r12), %xmm0
jmp 0x2cfa
movq %rbx, %rdi
movss %xmm1, 0x4(%rsp)
callq 0x2910
movss 0x4(%rsp), %xmm1
movss %xmm0, 0x20(%r12)
movb $0x1, 0x38(%r12)
addss %xmm0, %xmm1
incq %r15
jmp 0x2cbe
movss %xmm1, 0x4(%r14)
movb $0x1, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::partialScoreRecalculation()
size_t vertexCacheOptimizer::partialScoreRecalculation() {
    // Iterate through all the vertices of the cache
    bool firstTime = true;
    float maxScore = 0.0f;
    size_t maxScoreTriangle = (size_t)-1;
    for (size_t i = 0; i < 32; i++) {
        size_t find = m_vertexCache.getCachedVertex(i);
        if (find == (size_t)-1)
            continue;

        vertexCacheData *v = &m_vertices[find];

        // Iterate through all the active triangles of this vertex
        for (size_t j = 0; j < v->remainingValence; j++) {
            size_t triangle = v->indices[j];
            triangleCacheData *t = &m_triangles[triangle];

            // Calculate triangle score if it isn't already calculated
            if (!t->calculated)
                triangleScoreRecalculation(triangle);

            float score = t->currentScore;
            // Found a triangle to process
            if (firstTime || score > maxScore) {
                firstTime = false;
                maxScore = score;
                maxScoreTriangle = triangle;
            }
        }
    }
    return maxScoreTriangle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r13
movb $0x1, %dl
xorps %xmm1, %xmm1
pushq $-0x1
popq %rbp
xorl %ecx, %ecx
cmpq $0x20, %rcx
je 0x2ddf
movq 0x60(%r13,%rcx,8), %rsi
cmpq $-0x1, %rsi
je 0x2dd7
movq %rcx, 0x8(%rsp)
shlq $0x6, %rsi
addq (%r13), %rsi
xorl %r12d, %r12d
movq %rsi, 0x10(%rsp)
cmpq 0x30(%rsi), %r12
jae 0x2dd2
movq (%rsi), %rcx
movq (%rcx,%r12,8), %r15
movq 0x18(%r13), %rbx
imulq $0x28, %r15, %r14
cmpb $0x0, 0x20(%rbx,%r14)
jne 0x2dac
movq %r13, %rdi
movq %r15, %rsi
movss %xmm1, 0x4(%rsp)
movl %edx, (%rsp)
callq 0x2ca4
movq 0x10(%rsp), %rsi
movl (%rsp), %edx
movss 0x4(%rsp), %xmm1
addq %r14, %rbx
movss 0x4(%rbx), %xmm0
ucomiss %xmm1, %xmm0
seta %cl
orb %cl, %dl
testb $0x1, %dl
cmovneq %r15, %rbp
jne 0x2dc8
movaps %xmm1, %xmm0
incq %r12
xorl %edx, %edx
movaps %xmm0, %xmm1
jmp 0x2d6d
movq 0x8(%rsp), %rcx
incq %rcx
jmp 0x2d43
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::process()
float vertexCacheOptimizer::calcVertexScore(size_t vertex) {
    vertexCacheData *v = &m_vertices[vertex];
    if (v->remainingValence == (size_t)-1 || v->remainingValence == 0)
        return -1.0f; // No triangle needs this vertex

    float value = 0.0f;
    if (v->cachePosition == (size_t)-1) {
        // Vertex is not in FIFO cache.
    } else {
        if (v->cachePosition < 3) {
            // This vertex was used in the last triangle. It has fixed score
            // in whichever of the tree it's in.
            value = kLastTriScore;
        } else {
            // Points for being heigh in the cache
            const float scale = 1.0f / (32 - 3);
            value = 1.0f - (v->cachePosition - 3) * scale;
            value = powf(value, kCacheDecayPower);
        }
    }

    // Bonus points for having a low number of triangles.
    float valenceBoost = powf(float(v->remainingValence), -kValenceBoostPower);
    value += kValenceBoostScale * valenceBoost;
    return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x20(%rdi), %rax
movq 0x50(%rdi), %r15
subq 0x48(%rdi), %r15
sarq $0x3, %r15
subq 0x18(%rdi), %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
movq %rax, %r14
cmpq %rax, %r15
je 0x43e4
movq %rdi, %rbx
movq 0x1a8(%rdi), %rsi
callq 0x2b58
movq %rbx, %rdi
callq 0x2c26
movq %rbx, %rdi
testb %al, %al
je 0x43d8
callq 0x2d28
jmp 0x43dd
callq 0x29e8
movq %rax, 0x1a8(%rbx)
cmpq %r14, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: u::sscanf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*, ...)
inline int sscanf(const u::string &thing, const char *fmt, ...) {
    va_list va;
    va_start(va, fmt);
    int value = detail::c99vsscanf(thing.c_str(), fmt, va);
    va_end(va);
    return value;
}

// Assembly:
subq $0xd8, %rsp
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x4674
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %r10, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%rdi), %rdi
callq 0x2190
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/graphitemaster[P]smbf/smbf.cpp
// Function: u::split[abi:cxx11](char const*, char)
inline u::vector<u::string> split(const char *str, char ch = ' ') {
    u::vector<u::string> result;
    do {
        const char *begin = str;
        while (*str != ch && *str)
            str++;
        result.push_back(u::string(begin, str));
    } while (*str++);
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r14
movq %rsi, %r13
movb (%r13), %al
incq %r13
cmpb %bpl, %al
je 0x484b
testb %al, %al
jne 0x483b
movq %r12, 0x8(%rsp)
leaq -0x1(%r13), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x5116
movq %rbx, %rdi
movq %r14, %rsi
callq 0x48b0
movq %r14, %rdi
callq 0x20a0
cmpb $0x0, (%r15)
movq %r13, %rsi
jne 0x483b
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x489f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x46d6
movq %r14, %rdi
callq 0x2240
nop
// File: /workspace/github_cpp_makefile_star2_O2/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: Parser::findOption(char)
BaseOption*
Parser::findOption(char shortOption) {

    // iterate over the array and search for the short option
    for(int index=0; index < options.size(); ++index) {

        BaseOption* option = options.at(index);

        if ( option->matches( shortOption ) )
            return option;

    }

    return NULL;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x60(%rdi), %r15
xorl %r12d, %r12d
movq 0x68(%r14), %rax
subq 0x60(%r14), %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x2aec
movq %r15, %rdi
movq %r12, %rsi
callq 0x383e
movq (%rax), %rax
incq %r12
cmpb %bl, 0x8(%rax)
jne 0x2ac3
jmp 0x2aee
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop