LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cannam[P]mini-cpp-convnet/flower.cpp
// Function: flatten(std::vector<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>, std::allocator<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>>> const&)
vector<float>
flatten(const vector<vector<vector<float>>> &in)
{
    size_t height = in.size();
    if (height < 1) {
        throw runtime_error("Input too small in flatten");
    }

    size_t width = in[0].size();
    if (width < 1) {
        throw runtime_error("Input too small in flatten");
    }
    
    size_t depth = in[0][0].size();

#ifdef VERBOSE
    cerr << "flatten: input size " << in[0].size() << "x" << in.size()
         << " and depth " << depth << ", output length "
         << width * height * depth << endl;
#endif
    
    vector<float> out(width * height * depth, 0.f);

    size_t i = 0;
    
    for (size_t y = 0; y < height; ++y) {
        for (size_t x = 0; x < width; ++x) {
            for (size_t c = 0; c < depth; ++c) {
                out[i++] = in[y][x][c];
            }
        }
    }

    return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rcx
movq %rcx, %rax
subq %rdi, %rax
pushq $0x18
popq %rsi
cqto
idivq %rsi
cmpq %rdi, %rcx
je 0x1b851
movq %rax, %r15
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
movq %rdi, %rax
subq %rcx, %rax
cqto
idivq %rsi
cmpq %rcx, %rdi
je 0x1b86d
movq %rax, %r12
movq 0x8(%rcx), %r13
subq (%rcx), %r13
sarq $0x2, %r13
movq %rax, %rsi
imulq %r15, %rsi
imulq %r13, %rsi
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0xb(%rsp), %rcx
movq %rbx, %rdi
callq 0x1ca80
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %r15, %rcx
je 0x1b840
imulq $0x18, %rcx, %rdx
xorl %esi, %esi
cmpq %r12, %rsi
je 0x1b83b
movq (%r14), %rdi
addq %rdx, %rdi
leaq (,%rax,4), %r8
addq (%rbx), %r8
imulq $0x18, %rsi, %r10
xorl %r9d, %r9d
cmpq %r9, %r13
je 0x1b833
movq (%rdi), %r11
movq (%r11,%r10), %r11
movss (%r11,%r9,4), %xmm0
movss %xmm0, (%r8,%r9,4)
incq %r9
jmp 0x1b816
incq %rsi
addq %r9, %rax
jmp 0x1b7f9
incq %rcx
jmp 0x1b7ee
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x386e(%rip), %rsi      # 0x1f0d1
movq %rax, %rdi
callq 0x2090
jmp 0x1b887
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x3852(%rip), %rsi      # 0x1f0d1
movq %rax, %rdi
callq 0x2090
movq 0x96762(%rip), %rsi     # 0xb1ff0
movq 0x9671b(%rip), %rdx     # 0xb1fb0
movq %rbx, %rdi
callq 0x22c0
jmp 0x1b89f
movq %rax, %r14
movq %rbx, %rdi
callq 0x2160
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/cannam[P]mini-cpp-convnet/flower.cpp
// Function: activation(std::vector<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>, std::allocator<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<vector<vector<float>>>
activation(const vector<vector<vector<float>>> &in,
           string type)
{
    auto out(in);

    if (type == "relu") {
        for (size_t i = 0; i < out.size(); ++i) {
            for (size_t j = 0; j < out[i].size(); ++j) {
                for (size_t k = 0; k < out[i][j].size(); ++k) {
                    if (out[i][j][k] < 0.f) {
                        out[i][j][k] = 0.f;
                    }
                }
            }
        }
    } else {
        throw runtime_error("Unknown activation function '" + type + "'");
    }
        
    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rdi, %rbx
callq 0x1cbc6
leaq 0x3688(%rip), %rsi      # 0x1f14c
movq %r15, %rdi
callq 0x1cc20
testb %al, %al
je 0x1bb55
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
pushq $0x18
popq %rdi
cqto
idivq %rdi
movq %rax, %rcx
xorl %r8d, %r8d
xorps %xmm0, %xmm0
cmpq %rcx, %r8
je 0x1bb47
imulq $0x18, %r8, %rax
movq (%rsi,%rax), %r9
movq 0x8(%rsi,%rax), %rax
subq %r9, %rax
cqto
idivq %rdi
xorl %edx, %edx
cmpq %rax, %rdx
je 0x1bb42
imulq $0x18, %rdx, %r11
movq (%r9,%r11), %r10
movq 0x8(%r9,%r11), %r11
subq %r10, %r11
sarq $0x2, %r11
xorl %r14d, %r14d
cmpq %r14, %r11
je 0x1bb3d
ucomiss (%r10,%r14,4), %xmm0
jbe 0x1bb38
andl $0x0, (%r10,%r14,4)
incq %r14
jmp 0x1bb27
incq %rdx
jmp 0x1bb0b
incq %r8
jmp 0x1baef
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x35ea(%rip), %rsi      # 0x1f151
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0x1cc4c
leaq 0x35f2(%rip), %rdx      # 0x1f16d
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1cc2d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x2280
xorl %ebp, %ebp
movq 0x9644d(%rip), %rsi     # 0xb1ff0
movq 0x96406(%rip), %rdx     # 0xb1fb0
movq %r14, %rdi
callq 0x22c0
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x20c0
jmp 0x1bbc7
movq %rax, %r15
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x20c0
testb %bpl, %bpl
jne 0x1bbdb
jmp 0x1bbe3
movq %rax, %r15
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x1cba4
movq %r15, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/cannam[P]mini-cpp-convnet/flower.cpp
// Function: activation(std::vector<float, std::allocator<float>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<float>
activation(const vector<float> &in,
           string type)
{
    auto out(in);
    size_t sz = out.size();

    if (type == "relu") {
        for (size_t i = 0; i < sz; ++i) {
            if (out[i] < 0.f) {
                out[i] = 0.f;
            }
        }
    } else if (type == "softmax") {
        float sum = 0.f;
        for (size_t i = 0; i < sz; ++i) {
            out[i] = exp(out[i]);
            sum += out[i];
        }
        if (sum != 0.f) {
            for (size_t i = 0; i < sz; ++i) {
                out[i] /= sum;
            }
        }
    } else {
        throw runtime_error("Unknown activation function '" + type + "'");
    }

    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r15
movq %rdi, %rbx
callq 0x1ccc2
movq 0x8(%rbx), %r14
subq (%rbx), %r14
sarq $0x2, %r14
leaq 0x3530(%rip), %rsi      # 0x1f14c
movq %r15, %rdi
callq 0x1cc20
testb %al, %al
je 0x1bc44
movq (%rbx), %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cmpq %rcx, %r14
je 0x1bcb2
ucomiss (%rax,%rcx,4), %xmm0
jbe 0x1bc3f
andl $0x0, (%rax,%rcx,4)
incq %rcx
jmp 0x1bc30
leaq 0x3524(%rip), %rsi      # 0x1f16f
movq %r15, %rdi
callq 0x1cc20
testb %al, %al
je 0x1bcc2
movq (%rbx), %r15
xorps %xmm1, %xmm1
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x1bc8b
movss (%r15,%r12,4), %xmm0
movss %xmm1, 0xc(%rsp)
callq 0x22b0
movss 0xc(%rsp), %xmm1
movss %xmm0, (%r15,%r12,4)
addss %xmm0, %xmm1
incq %r12
jmp 0x1bc60
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x1bc95
jnp 0x1bcb2
movq (%rbx), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x1bcb2
movss (%rax,%rcx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
incq %rcx
jmp 0x1bc9a
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x347d(%rip), %rsi      # 0x1f151
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x1cc4c
leaq 0x3485(%rip), %rdx      # 0x1f16d
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1cc2d
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x2280
xorl %ebp, %ebp
movq 0x962e0(%rip), %rsi     # 0xb1ff0
movq 0x96299(%rip), %rdx     # 0xb1fb0
movq %r14, %rdi
callq 0x22c0
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x20c0
jmp 0x1bd34
movq %rax, %r15
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x20c0
testb %bpl, %bpl
jne 0x1bd48
jmp 0x1bd50
movq %rax, %r15
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x1cef2
movq %r15, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: BeginWith_icase(char const*, char const*)
bool BeginWith_icase(const char *s1, const char *s2)
{
	bool ok = true;
	for (; *s1 && *s2; ++ s1, ++ s2) {
		if (toupper(*s1) != toupper(*s2)) { // case-insensitive
			ok = false;
			break;
		}
	}
	return ok && *s2 == 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movsbl (%r14,%r12), %edi
movb (%rbx,%r12), %al
testl %edi, %edi
je 0x250a
testb %al, %al
je 0x250a
movsbl %al, %ebp
callq 0x2350
movl %eax, %r15d
movl %ebp, %edi
callq 0x2350
cmpl %eax, %r15d
jne 0x2511
incq %r12
jmp 0x24dd
testb %al, %al
sete %al
jmp 0x2513
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: BeginWith_case(char const*, char const*)
bool BeginWith_case(const char *s1, const char *s2)
{
	bool ok = true;
	for (; *s1 && *s2; ++ s1, ++ s2) {
		if (*s1 != *s2) { // case-sensitive
			ok = false;
			break;
		}
	}
	return ok && *s2 == 0;
}

// Assembly:
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb (%rsi,%rax), %dl
testb %cl, %cl
je 0x2535
testb %dl, %dl
je 0x2535
cmpb %dl, %cl
jne 0x253b
incq %rax
jmp 0x251e
testb %dl, %dl
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: NewSymbol(char*)
SfSymbol *NewSymbol(char *buf) 
{
	int len = sizeof(SfSymbol) + strlen(buf) +1;
	char *p = ALLOC_N(char, len);
	SfSymbol *sym = (SfSymbol*)p;
	char *p1 = p + sizeof(SfSymbol);
	strcpy(p1, buf);

	const char *sep = "\t\r\n";
	sym->nameoff = strtok_offset(p1, sep, p1);
	sym->lineoff = strtok_offset(NULL, sep, p1);
	sym->kindoff = strtok_offset(NULL, sep, p1);
	sym->extraoff = strtok_offset(NULL, sep, p1);
	return sym;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
callq 0x20b0
addl $0x11, %eax
movslq %eax, %rdi
callq 0x2250
movq %rax, %rbx
leaq 0x10(%rax), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
leaq 0x3d4c(%rip), %r15      # 0x62f0
movq %r14, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2554
movw %ax, (%rbx)
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2554
movw %ax, 0x2(%rbx)
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2554
movw %ax, 0x4(%rbx)
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2554
movw %ax, 0x6(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: RootExists(char const*)
bool RootExists(const char *root)
{
	SfRepoIter it(g_repos);
	while (it.Next()) {
		if (strcmp(it.Value()->root, root) == 0)
			return true;
	}
	return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x6c5e(%rip), %rax      # 0x9260
leaq 0x8(%rsp), %r14
movq %rax, 0x18(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
andq $0x0, 0x38(%r14)
movq 0x18(%r14), %r14
testq %r14, %r14
je 0x2630
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2260
testl %eax, %eax
jne 0x2618
testq %r14, %r14
setne %al
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: LoadRepofiles(int, char const**)
int LoadRepofiles(int filecnt, const char *files[])
{
	for (int i=0; i<filecnt; ++i) {
		FILE *fp = NULL;
		const char *file = files[i];
		int len = strlen(file);
		bool isgz = len > 3 && strcasecmp(file+len-3, ".gz") == 0;
		if (isgz) {
			char buf[1024];
			sprintf(buf, "gzip -dc \"%s\"", file);
		// 	printf("cmd: '%s'\n", buf);
			fp = popen(buf, "r");
		}
		else {
			fp = fopen(file, "r");
		}
		if (fp == NULL) {
			printf("*** cannot open repo-file \"%s\"!\n", file);
			continue;
		}
		printf("=== loading %s...\n", file);
		LoadRepofile(fp);
		if (isgz)
			pclose(fp);
		else
			fclose(fp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
leaq 0x3af0(%rip), %r13      # 0x64f4
xorl %r14d, %r14d
movq (%rbx,%r14,8), %r12
movq %r12, %rdi
callq 0x20b0
cmpl $0x4, %eax
jl 0x2a35
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq (%r12,%rax), %rdi
addq $-0x3, %rdi
leaq 0x3936(%rip), %rsi      # 0x6362
callq 0x21d0
testl %eax, %eax
je 0x2a93
movq %r12, %rdi
movq %r13, %rsi
callq 0x21f0
movq %rax, %rbp
xorl %r15d, %r15d
testq %rbp, %rbp
je 0x2a73
leaq 0x3943(%rip), %rdi      # 0x6395
movq %r12, %rsi
xorl %eax, %eax
callq 0x2030
movq %rbp, %rdi
callq 0x263e
movq %rbp, %rdi
testb %r15b, %r15b
je 0x2a86
callq 0x2270
jmp 0x2a8b
leaq 0x38fa(%rip), %rdi      # 0x6374
movq %r12, %rsi
xorl %eax, %eax
callq 0x2030
jmp 0x2a8b
callq 0x2190
incq %r14
jmp 0x2a07
movq %rsp, %r15
movq %r15, %rdi
leaq 0x38c6(%rip), %rsi      # 0x6366
movq %r12, %rdx
xorl %eax, %eax
callq 0x2040
movq %r15, %rdi
movq %r13, %rsi
callq 0x2070
movq %rax, %rbp
movb $0x1, %r15b
jmp 0x2a46
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: FreeRepos()
void FreeRepos()
{
	void *p;
	for (SfRepo *repo = g_repos; repo; ) {
		for (SfFolder *folder = repo->folders; folder; ) {
			for (SfFile *file = folder->files; file; ) {
				for (SfSymbol *symbol = file->symbols; symbol; ) {
					p = symbol;
					symbol = symbol->next;
					FREE(p);
				}
				FREE(file->name);
				p = file;
				file = file->next;
				FREE(p);
			}
			FREE(folder->name);
			p = folder;
			folder = folder->next;
			FREE(p);
		}
		FREE(repo->root);
		FREE(repo->tagscan_pat);
		p = repo;
		repo = repo->next;
		FREE(p);
	}
	g_repos = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x6794(%rip), %rbx      # 0x9260
testq %rbx, %rbx
je 0x2b55
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x2b30
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x2b17
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x2afe
movq 0x8(%rdi), %r12
callq 0x2200
movq %r12, %rdi
jmp 0x2aeb
movq (%r15), %rdi
callq 0x2200
movq 0x10(%r15), %r12
movq %r15, %rdi
callq 0x2200
movq %r12, %r15
jmp 0x2ae2
movq (%r14), %rdi
callq 0x2200
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x2200
movq %r15, %r14
jmp 0x2ad9
movq (%rbx), %rdi
callq 0x2200
movq 0x8(%rbx), %rdi
callq 0x2200
movq 0x18(%rbx), %r14
movq %rbx, %rdi
callq 0x2200
movq %r14, %rbx
jmp 0x2acc
andq $0x0, 0x6703(%rip)      # 0x9260
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: GetFullName(char*, char const*, char const*, char const*)
char *GetFullName(char *buf, const char *root, const char *dirname, const char *file = NULL)
{
// 	static char buf[1024];
	// 1. replace root
	root = g_rootsubs.Substitue(root);

	char quote[2] = {0,0};
	if (file && (strchr(root, ' ') != NULL || strchr(dirname, ' ') != NULL || strchr(file, ' ') != NULL))
		quote[0] = '"';

	// 2. remove ./ at the beginning of dirname
	const char *p = dirname;
	if (*p == '.') {
		++ p;
		if (*p == '/' || *p == '\\') // './xxx'
		{
			++p;
			dirname = p;
		}
		else if (*p == 0) // '.'
			dirname = p;
	}
	if (dirname[0] == 0) {
		if (file == NULL)
			sprintf(buf, "%s%s%s", quote, root, quote);
		else 
			sprintf(buf, "%s%s%c%s%s", quote, root, SEP, file, quote);
	}
	else {
		if (file == NULL)
			sprintf(buf, "%s%s%c%s%s", quote, root, SEP, dirname, quote);
		else 
			sprintf(buf, "%s%s%c%s%c%s%s", quote, root, SEP, dirname, SEP, file, quote);
	}
	return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %rbx
movq 0x6714(%rip), %rdi      # 0x9298
addq $0x8, %rdi
callq 0x2c90
movq %rax, %r14
andw $0x0, 0x26(%rsp)
testq %r12, %r12
je 0x2bd0
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x2090
testq %rax, %rax
jne 0x2bcb
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x2090
testq %rax, %rax
jne 0x2bcb
pushq $0x20
popq %rsi
movq %r12, %rdi
callq 0x2090
testq %rax, %rax
je 0x2bd0
movb $0x22, 0x26(%rsp)
movb (%r15), %al
cmpb $0x2e, %al
jne 0x2bf2
movzbl 0x1(%r15), %eax
testl %eax, %eax
je 0x2c1f
cmpl $0x5c, %eax
je 0x2bea
cmpl $0x2f, %eax
jne 0x2bf6
movb 0x2(%r15), %al
addq $0x2, %r15
testb %al, %al
je 0x2c1f
movsbl 0x6642(%rip), %r8d      # 0x9240
leaq 0x26(%rsp), %rdx
testq %r12, %r12
je 0x2c47
movq %rdx, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movl %r8d, (%rsp)
leaq 0x379d(%rip), %rsi      # 0x63ba
jmp 0x2c52
testq %r12, %r12
je 0x2c71
movsbl 0x6614(%rip), %r8d      # 0x9240
leaq 0x26(%rsp), %rdx
movq %rdx, (%rsp)
leaq 0x3773(%rip), %rsi      # 0x63af
movq %rbx, %rdi
movq %r14, %rcx
movq %r12, %r9
jmp 0x2c5b
movq %rdx, (%rsp)
leaq 0x375d(%rip), %rsi      # 0x63af
movq %rbx, %rdi
movq %r14, %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x2040
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3730(%rip), %rsi      # 0x63a8
leaq 0x26(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
movq %rdx, %r8
xorl %eax, %eax
callq 0x2040
jmp 0x2c62
nop
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: RootSubs::Substitue(char const*)
const char *RootSubs::Substitue(const char *s) 
{
	static char buf[1024];
	for (auto &sub: m_subs) {
		// note: windows path is case-insensitive; linux path is case-sensitive
#ifdef _WINDOWS
		const char *p = stristr(s, sub.first);
#else
		const char *p = strstr(s, sub.first);
#endif
		if (p) {
			sprintf(buf, "%.*s%s%s", p-s, s, sub.second, p+strlen(sub.first));
			return buf;
		}
	}
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x3e8(%rdi), %r13
movq 0x3f0(%rdi), %r12
cmpq %r12, %r13
je 0x2d08
movq (%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2050
testq %rax, %rax
jne 0x2cc9
addq $0x10, %r13
jmp 0x2caa
movq %rax, %r14
movq %rax, %r12
subq %rbx, %r12
movq 0x8(%r13), %r13
movq %r15, %rdi
callq 0x20b0
addq %rax, %r14
leaq 0x65d8(%rip), %r15      # 0x92c0
leaq 0x37d7(%rip), %rsi      # 0x64c6
movq %r15, %rdi
movq %r12, %rdx
movq %rbx, %rcx
movq %r13, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x2040
movq %r15, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: GotoResult(char const*, char const*)
void GotoResult(const char *cmd, const char *arg)
{
	int idx = g_result.curidx;
	if (arg == NULL) {
		if (cmd[0] == 'N')
			-- idx;
		else
			++ idx;
	}
	else {
		idx = atoi(arg)-1;
	}
	if (idx >= 0 && idx < g_result.items.size()) {
		g_result.curidx = idx;
		
		char buf[1024], *p = buf;
		p += sprintf(p, "%s ", EDITOR);

		const SfContext &ctx = g_result.items[idx];
		const char *line = g_result.kind == 's'? ctx.symbol->line(): NULL;
		if (line) {
			p += sprintf(p, "+%s ", line);
		}
		GetFullName(p, ctx.repo->root, ctx.folder->name, ctx.file->name);
		printf("go %d: %s\n", idx+1, buf);
		system(buf);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
testq %rsi, %rsi
je 0x330e
movq %rsi, %rdi
callq 0x22c0
movl %eax, %ebx
jmp 0x331d
movl 0x5f74(%rip), %ebx      # 0x9288
cmpb $0x4e, (%rdi)
jne 0x33ec
decl %ebx
testl %ebx, %ebx
js 0x33df
movl %ebx, %r15d
movq 0x5f47(%rip), %rax      # 0x9278
subq 0x5f38(%rip), %rax      # 0x9270
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x33df
movl %ebx, 0x5f3d(%rip)      # 0x9288
leaq 0x30cb(%rip), %rsi      # 0x641d
leaq 0x5e77(%rip), %rdx      # 0x91d0
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2040
cltq
leaq (%rsp,%rax), %r14
shlq $0x5, %r15
addq 0x5efc(%rip), %r15      # 0x9270
cmpb $0x73, 0x5eed(%rip)     # 0x9268
jne 0x33a3
movq 0x18(%r15), %rax
movzwl 0x2(%rax), %ecx
leaq (%rax,%rcx), %rdx
addq $0x10, %rdx
leaq 0x3088(%rip), %rsi      # 0x641c
movq %r14, %rdi
xorl %eax, %eax
callq 0x2040
cltq
addq %rax, %r14
movq (%r15), %rax
movq 0x8(%r15), %rcx
movq (%rax), %rsi
movq (%rcx), %rdx
movq 0x10(%r15), %rax
movq (%rax), %rcx
movq %r14, %rdi
callq 0x2b69
incl %ebx
leaq 0x3059(%rip), %rdi      # 0x6421
movq %rsp, %r14
movl %ebx, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
callq 0x2150
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
incl %ebx
jmp 0x331f
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: GetTagscanPats(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void GetTagscanPats(vector<string> &pats)
{
	pats.clear();

	// "*.cpp;*.h;" -> ["*.cpp", "*.h"]
	SfRepoIter it(g_repos);
	while (it.Next()) {
		const char *p = it.Value()->tagscan_pat, *p2 = p;
		if (p == NULL)
			continue;
		for (; *p2 != 0; ++p2) {
			if (*p2 == ';') {
				if (p2 > p)
					pats.push_back(string(p, 0, p2-p));
				p = p2 +1;
			}
		}
		if (p2 > p)
			pats.push_back(string(p, 0, p2-p));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
callq 0x4156
movq 0x5e50(%rip), %rcx      # 0x9260
leaq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
xorps %xmm0, %xmm0
andq $0x0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %r12
testq %rax, %rax
je 0x34ed
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x34ed
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x34e3
movq %rax, %r13
movq %rax, %rbp
movzbl (%rbp), %ecx
cmpl $0x3b, %ecx
je 0x3476
testl %ecx, %ecx
jne 0x34ad
jmp 0x34b5
cmpq %rax, %rbp
jbe 0x34a4
movq %r13, %rcx
subq %rax, %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %r8
callq 0x415e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a06
movq %r14, %rdi
callq 0x20c0
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%rsp)
incq %rbp
incq %r13
jmp 0x3467
cmpq %rax, %rbp
jbe 0x34e3
subq %rax, %r13
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r13, %rcx
movq %r12, %r8
callq 0x415e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a06
movq %r14, %rdi
callq 0x20c0
movq 0x58(%rsp), %rax
jmp 0x3434
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3505
jmp 0x3500
movq %rax, %rbx
jmp 0x3512
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: RootSubs::Set(char const*)
void RootSubs::Set(const char *pattern) 
{
	strcpy(m_buf, pattern);
	char *p = m_buf, *p1 = m_buf, *p2 = NULL;
	m_subs.clear();
	for (; ; ++p) {
		if (*p == '=') {
			*p++ = 0;
			p2 = p;
		}
		else if (*p == ';' || *p == 0) {
			if (*p1 && p2 && *p2)
				m_subs.push_back(make_pair(p1, p2));
			if (*p == 0)
				break;
			*p++ = 0;
			p1 = p;
			p2 = NULL;
		}
	}
	if (m_subs.size() > 0)
		strcpy(this->pattern, pattern);
	else
		strcpy(this->pattern, "(empty)");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1f4(%rdi), %r13
movq %r13, %rdi
callq 0x2180
movq 0x3e8(%rbx), %rax
cmpq %rax, 0x3f0(%rbx)
je 0x3a18
movq %rax, 0x3f0(%rbx)
leaq 0x3e8(%rbx), %r15
xorl %eax, %eax
leaq 0x8(%rsp), %r12
movq %r13, %rbp
movzbl (%rbp), %ecx
testl %ecx, %ecx
je 0x3a44
cmpl $0x3b, %ecx
je 0x3a44
cmpl $0x3d, %ecx
jne 0x3a81
leaq 0x1(%rbp), %rax
movq %rax, %rcx
jmp 0x3a7a
cmpb $0x0, (%r13)
je 0x3a6d
testq %rax, %rax
je 0x3a6d
cmpb $0x0, (%rax)
je 0x3a6d
movq %r13, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4c02
movb (%rbp), %cl
testb %cl, %cl
je 0x3a86
leaq 0x1(%rbp), %r13
xorl %eax, %eax
movq %r13, %rcx
movb $0x0, (%rbp)
movq %rcx, %rbp
incq %rbp
jmp 0x3a29
movq 0x3f0(%rbx), %rax
cmpq 0x3e8(%rbx), %rax
je 0x3aa3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
jmp 0x3ab0
movabsq $0x297974706d6528, %rax # imm = 0x297974706D6528
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: InitSession(int)
void InitSession(int id)
{
	if (g_sessions.size() == 0) {
		Session ses;
		ses.id = 0;
		ses.maxFound = DEF_MAX_FOUND;
		g_sessions.push_back(ses);
		g_curSession = &g_sessions[0];
	}

	if (g_curSession->id == id)
		return;

	SessionIter it;
	for (it=g_sessions.begin(); it!=g_sessions.end(); ++it) {
		if (it->id == id)
			break;
	}

	// not found, create it based on session 0:
	if (it == g_sessions.end()) {
		g_sessions.push_back(g_sessions[0]);
		g_curSession = &g_sessions.back();
		g_curSession->id = id;
	}
	else {
		g_curSession = & *it;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %edi, %ebx
movq 0x57d6(%rip), %rax      # 0x92a8
cmpq 0x57c7(%rip), %rax      # 0x92a0
jne 0x3b1e
movq %rsp, %r14
movq %r14, %rdi
callq 0x4266
andl $0x0, (%r14)
movl 0x56d0(%rip), %eax      # 0x91c0
movl %eax, 0x4(%r14)
leaq 0x57a5(%rip), %rdi      # 0x92a0
movq %r14, %rsi
callq 0x4276
movq 0x5796(%rip), %rax      # 0x92a0
movq %rax, 0x5787(%rip)      # 0x9298
leaq 0x3f0(%rsp), %rdi
callq 0x44ee
movq 0x5773(%rip), %rax      # 0x9298
cmpl %ebx, (%rax)
je 0x3b7b
movq 0x5770(%rip), %rsi      # 0x92a0
movq 0x5771(%rip), %rcx      # 0x92a8
movq %rsi, %rax
cmpq %rcx, %rax
je 0x3b4b
cmpl %ebx, (%rax)
je 0x3b74
addq $0x408, %rax            # imm = 0x408
jmp 0x3b3a
leaq 0x574e(%rip), %rdi      # 0x92a0
callq 0x4276
movq 0x574a(%rip), %rax      # 0x92a8
leaq -0x408(%rax), %rcx
movq %rcx, 0x572c(%rip)      # 0x9298
movl %ebx, -0x408(%rax)
jmp 0x3b7b
movq %rax, 0x571d(%rip)      # 0x9298
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x3f0(%rsp), %rdi
callq 0x44ee
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: main
int main(int argc, const char *argv[])
{
	if (argc <= 1) {
		printf("Usage: symfind <repo>\n");
		return -1;
	}
	if (argv[1][0] == '-') {
		const char *opt = argv[1]+1;
		if (STR_EQ(opt, "v") || STR_EQ(opt, "version") || STR_EQ(opt, "-version")) {
			printf("symfind version %s\n", VERSION);
			return 0;
		}
		else {
			printf("*** unknown option: '%s'\n", opt);
			return 1;
		}
	}
	if (g_forsvr) {
		fputs("(for symsvr)\n", stdout);
		setbuf(stdout, NULL);
		setbuf(stderr, NULL);
	}
	-- argc;
	++ argv;
	LoadRepofiles(argc, argv);

// 	printf("for attach (pid=%d)...\n", getpid());
// 	sleep(10);

	// !!! to debug the loading and iterator, run: $ SF_TEST=1 symfind 1.repo.gz
	if (getenv("SF_TEST") != NULL)
		return TestShow();

	char buf[1024];
	FILE *fp;
	char rcfile[1024] = RC_FILE;
	fp = fopen(rcfile, "r");
	if (fp == NULL) {
		sprintf(rcfile, "%s/%s", getenv("HOME"), RC_FILE);
		fp = fopen(rcfile, "r");
	}
	if (fp)
	{
		const char *prompt = "rc> ";
		printf("(load rc file: %s)\n", rcfile);
		fputs(prompt, stdout);
		while (fgets(buf, 1024, fp)) {
			fputs(buf, stdout);
			if (ExecCmd(buf, prompt))
				break;
		}
		fclose(fp);
	}

	fputs("> ", stdout);
	if (g_forsvr)
		fputs("\n", stdout);
	while (fgets(buf, 1024, stdin)) {
		if (ExecCmd(buf))
			break;
	}
	FreeRepos();
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jg 0x3efa
leaq 0x27e0(%rip), %rdi      # 0x66d1
callq 0x22b0
pushq $-0x1
jmp 0x3f51
movq %rsi, %rbx
movq 0x8(%rsi), %r14
cmpb $0x2d, (%r14)
jne 0x3f72
cmpb $0x76, 0x1(%r14)
jne 0x3f15
cmpb $0x0, 0x2(%r14)
je 0x3f54
incq %r14
leaq 0x263e(%rip), %rsi      # 0x655d
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x3f54
leaq 0x262a(%rip), %rsi      # 0x655c
movq %r14, %rdi
callq 0x2260
testl %eax, %eax
je 0x3f54
leaq 0x2638(%rip), %rdi      # 0x657d
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
pushq $0x1
popq %rbx
jmp 0x3f6b
leaq 0x260a(%rip), %rdi      # 0x6565
leaq 0x2617(%rip), %rsi      # 0x6579
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2030
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %edi, %ebp
addq $0x8, %rbx
cmpb $0x1, 0x5311(%rip)      # 0x9290
jne 0x3fb2
movq 0x5040(%rip), %r14      # 0x8fc8
movq (%r14), %rsi
leaq 0x2605(%rip), %rdi      # 0x6597
callq 0x21e0
movq (%r14), %rdi
xorl %esi, %esi
callq 0x2280
movq 0x5038(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2280
decl %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x29e9
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfPattern::SfPattern(char*)
SfPattern(char *pat) {
		matchBegin =false;
		matchEnd = false;
		logicalNot = false;
		patlen = 0;

		char *p = pat;
		if (*p == '!' && *(p+1) != 0) {
			++ p;
			logicalNot = true;
		}

		if (*p == '^' && *(p+1) != 0) {
			++ p;
			matchBegin = true;
		}
		char *p1 = strchr(p, 0);
		if (p1 - p > 1 && *(p1-1) == '$') {
			*--p1 = 0;
			matchEnd = true;
		}
		patlen = p1 -p;
		this->pat = p;

		fnMatch = ContainsUpper(p)? &SfPattern::Match_case: &SfPattern::Match_icase;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andw $0x0, 0x8(%rdi)
movb $0x0, 0xa(%rdi)
andl $0x0, 0xc(%rdi)
movq %rsi, %r14
movb (%rsi), %al
cmpb $0x21, %al
jne 0x4018
cmpb $0x0, 0x1(%r14)
je 0x402a
incq %r14
movb $0x1, 0xa(%rbx)
movb (%r14), %al
cmpb $0x5e, %al
jne 0x402a
cmpb $0x0, 0x1(%r14)
je 0x402a
incq %r14
movb $0x1, 0x8(%rbx)
movq %r14, %rdi
callq 0x20b0
leaq (%r14,%rax), %rcx
cmpq $0x2, %rax
jl 0x404c
cmpb $0x24, -0x1(%rcx)
jne 0x404c
decq %rcx
movb $0x0, (%rcx)
movb $0x1, 0x9(%rbx)
subl %r14d, %ecx
movl %ecx, 0xc(%rbx)
movq %r14, (%rbx)
movq %r14, %rdi
callq 0x41bc
leaq 0x280(%rip), %rcx       # 0x42e4
leaq 0x323(%rip), %rdx       # 0x438e
testb %al, %al
cmovneq %rcx, %rdx
movq %rdx, 0x10(%rbx)
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfFileIter::Next()
SfFile *Next() {
		if (m_ctx.file && m_ctx.file->next)
			m_ctx.file = m_ctx.file->next;
		else 
			m_ctx.file = NextLink();
		return m_ctx.file;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x4098
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x40a0
movq %rbx, %rdi
callq 0x444c
movq %rax, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfSymbolIter::Next()
SfSymbol *Next() {
		if (m_ctx.symbol && m_ctx.symbol->next)
			m_ctx.symbol = m_ctx.symbol->next;
		else
			m_ctx.symbol = NextLink();
		return m_ctx.symbol;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x4148
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x4150
movq %rbx, %rdi
callq 0x446c
movq %rax, 0x38(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: ContainsUpper(char const*)
inline bool ContainsUpper(const char *p)
{
	for (; *p; ++p) {
		if (isupper(*p))
			return true;
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbl (%rbx), %ebp
testl %ebp, %ebp
je 0x41d7
movl %ebp, %edi
callq 0x2120
incq %rbx
testl %eax, %eax
je 0x41c2
testb %bpl, %bpl
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfFolderIter::Next()
SfFolder *Next() {
		if (m_ctx.folder && m_ctx.folder->next)
			m_ctx.folder = m_ctx.folder->next;
		else
			m_ctx.folder = NextLink();
		return m_ctx.folder;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x4258
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x4260
movq %rbx, %rdi
callq 0x448c
movq %rax, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfPattern::Match_case(char const*)
bool Match_case(const char *s) {
		if (patlen <= 0)
			return true;
		int slen = strlen(s);
		if (slen < patlen)
			return false;

		if (matchBegin || matchEnd) {
			if (matchBegin && matchEnd)
				return strcmp(s, pat) == 0;
			return BeginWith_case((matchBegin? s: s+slen-patlen), pat);
		}
		else {
			for (; *s; ++s) {
				if (*s == *pat && BeginWith_case(s+1, pat+1))
					return true;
			}
		}
		return false;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq 0xc(%rdi), %r15
testq %r15, %r15
jle 0x430b
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20b0
cmpl %eax, %r15d
jle 0x431b
xorl %ebp, %ebp
jmp 0x430e
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb 0x8(%r14), %cl
movb 0x9(%r14), %dl
testb %cl, %cl
je 0x433e
testb %dl, %dl
je 0x4342
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2260
testl %eax, %eax
sete %bpl
jmp 0x430e
testb %dl, %dl
je 0x4362
movl %eax, %edi
addq %rbx, %rdi
subq %r15, %rdi
testb %cl, %cl
cmovneq %rbx, %rdi
movq (%r14), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x251c
movq (%r14), %r15
leaq 0x1(%r15), %r14
incq %rbx
movb -0x1(%rbx), %al
testb %al, %al
setne %bpl
je 0x430e
cmpb (%r15), %al
jne 0x4369
movq %rbx, %rdi
movq %r14, %rsi
callq 0x251c
testb %al, %al
je 0x4369
jmp 0x430e
nop
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfPattern::Match_icase(char const*)
bool Match_icase(const char *s) {
		if (patlen <= 0)
			return true;
		int slen = strlen(s);
		if (slen < patlen)
			return false;

		if (matchBegin || matchEnd) {
			if (matchBegin && matchEnd)
				return strcasecmp(s, pat) == 0;
			return BeginWith_icase((matchBegin? s: s+slen-patlen), pat);
		}
		else {
			for (; *s; ++s) {
				if (toupper(*s) == toupper(*pat) && BeginWith_icase(s+1, pat+1))
					return true;
			}
		}
		return false;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq 0xc(%rdi), %r15
testq %r15, %r15
jle 0x43b6
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20b0
cmpl %eax, %r15d
jle 0x43c4
xorl %ebp, %ebp
jmp 0x43b9
movb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb 0x8(%r14), %cl
movb 0x9(%r14), %dl
testb %cl, %cl
je 0x43e7
testb %dl, %dl
je 0x43eb
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
sete %bpl
jmp 0x43b9
testb %dl, %dl
je 0x4409
movl %eax, %edi
addq %rbx, %rdi
subq %r15, %rdi
testb %cl, %cl
cmovneq %rbx, %rdi
movq (%r14), %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24cc
movq (%r14), %r12
leaq 0x1(%r12), %r14
incq %rbx
movsbl -0x1(%rbx), %edi
testl %edi, %edi
setne %bpl
je 0x43b9
callq 0x2350
movl %eax, %r15d
movsbl (%r12), %edi
callq 0x2350
cmpl %eax, %r15d
jne 0x4411
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24cc
testb %al, %al
je 0x4411
jmp 0x43b9
nop
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfFileIter::NextLink()
SfFile *NextLink() {
		SfFolder *folder;
		while (folder = SfFolderIter::Next()) {
			if (folder->files)
				break;
		}
		return folder? folder->files: NULL;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x4242
testq %rax, %rax
je 0x4468
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x4450
jmp 0x446a
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfSymbolIter::NextLink()
SfSymbol *NextLink() {
		SfFile *file;
		while (file = SfFileIter::Next()) {
			if (file->symbols)
				break;
		}
		return file? file->symbols: NULL;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x4082
testq %rax, %rax
je 0x4488
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x4470
jmp 0x448a
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/skyshore2001[P]symfind/symfind.cpp
// Function: SfFolderIter::NextLink()
SfFolder *NextLink() {
		SfRepo *repo;
		while (repo = SfRepoIter::Next()) {
			if (repo->folders)
				break;
		}
		return repo? repo->folders: NULL;
	}

// Assembly:
movq 0x20(%rdi), %rcx
testq %rcx, %rcx
je 0x44ac
movq 0x18(%rcx), %rcx
movq %rcx, 0x20(%rdi)
testq %rcx, %rcx
je 0x44ac
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x4490
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tkrobatsch[P]YAML_Maker/yaml_data.cpp
// Function: serialize_encaps(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string serialize_encaps(std::string input) {
	std::string serialize;
	serialize += "'";
	for (int i = 0; i < input.length(); i++) {
		if (!((input[i] < 0) || (input[i] > 255))) {
			serialize += input[i];
		}
	}
	//clear any spaces at end
	serialize.erase(std::find_if(serialize.rbegin(), serialize.rend(),
		std::not1(std::ptr_fun<int, int>(std::isspace))).base(), serialize.end());
	serialize += "'";
	return serialize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x3bb2(%rip), %rsi      # 0x6004
callq 0x22d0
xorl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x247b
movq (%r14), %rax
movb (%rax,%r15), %al
testb %al, %al
js 0x2476
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2150
incq %r15
jmp 0x245a
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
addq %rax, %rcx
leaq 0x18(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq 0x6b1c(%rip), %rcx      # 0x8fb8
leaq 0x8(%rsp), %rdi
callq 0x4665
movq 0x8(%rsp), %rsi
movq (%rbx), %rdx
addq 0x8(%rbx), %rdx
movq %rbx, %rdi
callq 0x2060
leaq 0x3b43(%rip), %rsi      # 0x6004
movq %rbx, %rdi
callq 0x22d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x24dc
jmp 0x24dc
jmp 0x24dc
movq %rax, %r14
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/tkrobatsch[P]YAML_Maker/yaml_data.cpp
// Function: serialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string serialize(std::string input) {
	std::string serialize;
	for (int i = 0; i < input.length(); i++) {
		if (!((input[i] < 0) || (input[i] > 255))) {
			serialize += input[i];
		}
	}
	//clear any spaces at end
	serialize.erase(std::find_if(serialize.rbegin(), serialize.rend(),
		std::not1(std::ptr_fun<int, int>(std::isspace))).base(), serialize.end());
	return serialize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x2532
movq (%r14), %rax
movb (%rax,%r15), %al
testb %al, %al
js 0x252d
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2150
incq %r15
jmp 0x2511
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
addq %rax, %rcx
leaq 0x18(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq 0x6a65(%rip), %rcx      # 0x8fb8
leaq 0x8(%rsp), %rdi
callq 0x4665
movq 0x8(%rsp), %rsi
movq (%rbx), %rdx
addq 0x8(%rbx), %rdx
movq %rbx, %rdi
callq 0x2060
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2582
jmp 0x2582
movq %rax, %r14
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk/exprtk_simple_example_19.cpp
// Function: randu<double>::operator()(unsigned long const&, exprtk::type_store<double>::parameter_list)
inline T operator()(const std::size_t& ps_index, parameter_list_t parameters)
   {
      vector_t v(parameters[0]);

      std::size_t r0 = 0;
      std::size_t r1 = v.size() - 1;

      using namespace exprtk::rtl::vecops::helper;

      if (
           (1 == ps_index) &&
           !load_vector_range<T>::process(parameters, r0, r1, 1, 2, 0)
         )
         return T(0);

      for (std::size_t i = r0; i <= r1; ++i)
      {
         v[i] = rnd();
      }

      return T(1);
   }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rdx, 0x18(%rsp)
movq (%rdx), %rax
movq (%rax), %r14
andq $0x0, 0x10(%rsp)
movq 0x8(%rax), %rax
decq %rax
movq %rax, 0x8(%rsp)
cmpq $0x1, (%rsi)
jne 0x1119fb
leaq 0x28(%rsp), %rcx
movq $0x1, (%rcx)
leaq 0x20(%rsp), %r8
movq $0x2, (%r8)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
xorl %r9d, %r9d
callq 0x111a34
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
testb %al, %al
je 0x111a25
movq 0x10(%rsp), %r15
jmp 0x1119fe
xorl %r15d, %r15d
movsd 0x124672(%rip), %xmm0   # 0x236078
movsd %xmm0, (%rsp)
cmpq 0x8(%rsp), %r15
ja 0x111a25
movq %rbx, %rdi
callq 0x111b00
movsd %xmm0, (%r14,%r15,8)
incq %r15
jmp 0x111a0b
movsd (%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/wo3kie[P]calc/calc.cpp
// Function: double calc<int, int, int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, int)
double calc(
    std::string const & expr,
    TDoubles... ds
)
{
    std::string::const_iterator iter = expr.begin();
    std::string::const_iterator end = expr.end();

    Calculator< std::string::const_iterator > calc;
    
    boost::spirit::ascii::space_type space;

    ast::Expression expression;

    bool const r = phrase_parse( iter, end, calc, space, expression );

    if( r && iter == end )
    {
        ast::Calc calc( std::forward< TDoubles >( ds )... );
        return calc( expression );
    }
    
    throw std::runtime_error( "Parsing failed: " + std::string( iter, end ) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r15d
movq (%rdi), %r14
leaq 0x10(%rsp), %r12
movq %r14, (%r12)
addq 0x8(%rdi), %r14
leaq 0xb8(%rsp), %r13
movq %r13, %rdi
callq 0x6ef2
leaq 0x50(%rsp), %rax
andl $0x0, -0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xf(%rsp), %rcx
leaq 0x40(%rsp), %r8
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x78da
cmpq %r14, 0x10(%rsp)
sete %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x5d41
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
leaq 0x68(%rsp), %rdi
cvtsi2sd %r15d, %xmm0
movq %rax, (%rdi)
movsd %xmm0, 0x8(%rdi)
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x10(%rdi)
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x18(%rdi)
leaq 0x40(%rsp), %rsi
callq 0x78e6
movsd %xmm0, 0x18(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x7944
leaq 0xb8(%rsp), %rdi
callq 0x795a
movsd 0x18(%rsp), %xmm0
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x30e0
movq %rax, %rbx
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0x11960
leaq 0xce98(%rip), %rsi      # 0x12c06
leaq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x791f
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x3330
xorl %ebp, %ebp
movq 0x1b25a(%rip), %rsi     # 0x20ff0
movq 0x1b21b(%rip), %rdx     # 0x20fb8
movq %rbx, %rdi
callq 0x3380
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x30c0
jmp 0x5dba
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x30c0
testb %bpl, %bpl
jne 0x5dce
jmp 0x5ddd
movq %rax, %r14
movq %rbx, %rdi
callq 0x3190
jmp 0x5ddd
jmp 0x5dda
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x7944
leaq 0xb8(%rsp), %rdi
callq 0x795a
movq %r14, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/wo3kie[P]calc/calc.cpp
// Function: ast::Calc::operator()(ast::Expression const&) const
double operator()( Expression const & x ) const
        {
            double state = boost::apply_visitor( *this, x.head_ );

            for( Operation const & oper : x.tail_ )
            {
                state = ( *this )( oper, state );
            }

            return state;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x115de
addq $0x10, %rbx
movq %rbx, %r15
movq (%r15), %r15
cmpq %rbx, %r15
je 0x7919
leaq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x113c4
jmp 0x7903
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/wo3kie[P]calc/calc.cpp
// Function: void error_handler_::operator()<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>(boost::spirit::info const&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>) const
void operator()(
        qi::info const & what
      , TIterator err_pos, TIterator last ) const
    {
        std::cout
            << "Error! Expecting "
            << what
            << " here: \""
            << std::string( err_pos, last )
            << "\""
            << std::endl
        ;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x10115(%rip), %rdi     # 0x20fc0
leaq 0x2454(%rip), %rsi      # 0x13306
callq 0x3210
movq %rax, %rdi
movq %r15, %rsi
callq 0x10f3d
leaq 0x244f(%rip), %rsi      # 0x13318
movq %rax, %rdi
callq 0x3210
movq %rax, %r15
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11960
movq %r15, %rdi
movq %r12, %rsi
callq 0x3200
leaq 0x241d(%rip), %rsi      # 0x1331f
movq %rax, %rdi
callq 0x3210
movq %rax, %rdi
callq 0x30d0
leaq 0x8(%rsp), %rdi
callq 0x30c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/wo3kie[P]calc/calc.cpp
// Function: ast::Calc::operator()(ast::Signed const&) const
double operator()( Signed const & x ) const
        {
            double const rhs = boost::apply_visitor( *this, x.operand_ );

            switch( x.sign_ )
            {
                case '-':
                    return - rhs;

                case '+':
                    return + rhs;

                case '!':
                    return ( fabs( rhs ) < 0.000001 ) ? 1 : 0;

                default:
                    BOOST_ASSERT( 0 );
            }
        }

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x8(%rbx), %rdi
callq 0x115de
movzbl (%rbx), %eax
cmpl $0x21, %eax
je 0x116b2
cmpl $0x2b, %eax
je 0x116cf
cmpl $0x2d, %eax
jne 0x116d1
xorpd 0xa00(%rip), %xmm0      # 0x120b0
jmp 0x116cf
andpd 0x9e6(%rip), %xmm0      # 0x120a0
cmpltsd 0x99d(%rip), %xmm0      # 0x12060
movsd 0x96d(%rip), %xmm1      # 0x12038
andpd %xmm1, %xmm0
popq %rbx
retq
leaq 0x12cf(%rip), %rdi      # 0x129a7
leaq 0xf9c(%rip), %rsi       # 0x1267b
leaq 0x1c63(%rip), %rcx      # 0x13349
movl $0xf3, %edx
callq 0x3150
// File: /workspace/github_cpp_makefile_star2_O2/lioncedric[P]cimpressGridCoverage/src/squares.cc
// Function: clear_square(int*, int, int const*)
void clear_square(int * puzzle, const int width, const int * square) {

    const int row = *(square + 1);
    const int col = *square;
    const int square_size = *(square + 2);
    const int * ptrLineMax = puzzle + col + (row + square_size) * width;
    for (int* ptrLine = puzzle + col + (row) * width; ptrLine < ptrLineMax; ptrLine += width) {
        const int * ptrColMax = ptrLine + square_size;
        for (int* ptrCol = ptrLine; ptrCol < ptrColMax; ++ptrCol) {
            *ptrCol = 1;
        }
    }

}

// Assembly:
movl 0x4(%rdx), %r8d
movslq (%rdx), %rcx
movslq 0x8(%rdx), %rax
leaq (%rdi,%rcx,4), %rdx
leal (%rax,%r8), %ecx
imull %esi, %ecx
movslq %ecx, %rcx
leaq (%rdx,%rcx,4), %rcx
imull %esi, %r8d
movslq %r8d, %rdi
leaq (%rdx,%rdi,4), %rdx
movslq %esi, %rsi
cmpq %rcx, %rdx
jae 0x3315
leaq (%rdx,%rax,4), %rdi
movq %rdx, %r8
cmpq %rdi, %r8
jae 0x330f
movl $0x1, (%r8)
addq $0x4, %r8
jmp 0x32fd
leaq (%rdx,%rsi,4), %rdx
jmp 0x32f1
retq