LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/bubiche[P]wu_manber/./wu_manber.hpp
// Function: wu_manber::WuManber<char, std::char_traits<char>>::checkShortPattern_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long)>) const
void checkShortPattern_(const StringType &text, std::size_t cur_idx, std::function<void(const StringType&, std::size_t, std::size_t)> onMatch) const {
      int l1MatchIndex = lengthOnePatternLookup_[static_cast<std::size_t>(text[cur_idx])];
      if (l1MatchIndex > -1) {
        onMatch(lengthOnePatterns_[l1MatchIndex], l1MatchIndex, cur_idx);
      }

      int l2MatchIndex = lengthTwoPatternLookup_[static_cast<std::size_t>(text[cur_idx - 1])][static_cast<std::size_t>(text[cur_idx])];
      if (l2MatchIndex > -1) {
        onMatch(lengthTwoPatterns_[l2MatchIndex], l2MatchIndex, cur_idx - 1);
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq (%rsi), %rdx
movsbq (%rdx,%r14), %rcx
movq 0x80(%rdi), %rax
movq (%rax,%rcx,8), %rax
testl %eax, %eax
js 0x3c75
movq %rsi, %r12
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0xb0(%r15), %rsi
movq %rax, 0x10(%rsp)
movq %r14, 0x8(%rsp)
cmpq $0x0, 0x10(%rbx)
je 0x3cd5
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq *0x18(%rbx)
movq (%r12), %rdx
movsbq (%rdx,%r14), %rcx
movsbq -0x1(%rdx,%r14), %rax
movq 0x98(%r15), %rdx
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rax
movq (%rax,%rcx,8), %rax
testl %eax, %eax
js 0x3cc9
decq %r14
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0xc8(%r15), %rsi
movq %rax, 0x10(%rsp)
movq %r14, 0x8(%rsp)
cmpq $0x0, 0x10(%rbx)
je 0x3cd5
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq *0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x2060
// File: /workspace/github_cpp_makefile_star2_O3/biotomas[P]ipasir/app/genipalsp/genipalsp.cpp
// Function: printGraph(Graph const&)
void printGraph(const Graph& graph) {
	printf("p edge %d %d\n", graph.verticesCount, graph.edgesCount);
	for (size_t i = 0; i < graph.neighbours.size(); i++) {
		for (size_t j = 0; j < graph.neighbours[i].size(); j++) {
			printf("e %lu %d\n", i, graph.neighbours[i][j]);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %esi
movl 0x4(%rdi), %edx
leaq 0xf355(%rip), %rdi      # 0x1210d
xorl %eax, %eax
callq 0x2030
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
cmpq %rax, %rcx
je 0x2e37
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
leaq 0xf33e(%rip), %r14      # 0x1211b
xorl %r15d, %r15d
leaq (%r15,%r15,2), %r13
movq (%rax,%r13,8), %rdx
cmpq %rdx, 0x8(%rax,%r13,8)
je 0x2e21
xorl %ebp, %ebp
movl (%rdx,%rbp,4), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2030
incq %rbp
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rdx
movq 0x8(%rax,%r13,8), %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
cmpq %rcx, %rbp
jb 0x2df1
movq 0x10(%rbx), %rcx
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq %rdx, %r15
jb 0x2de0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/biotomas[P]ipasir/app/genipalsp/genipalsp.cpp
// Function: printFormula(SimpleFormula const&)
void printFormula(const SimpleFormula& formula) {
	printf("p cnf %d %lu\n", formula.vars, formula.clauses.size());
	for (size_t i = 0; i < formula.clauses.size(); i++) {
		for (size_t j = 0; j < formula.clauses[i].size(); j++) {
			printf("%d ", formula.clauses[i][j]);
		}
		printf("0\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdx
subq 0x8(%rdi), %rdx
movl (%rdi), %esi
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
leaq 0xf2ae(%rip), %rdi      # 0x12125
xorl %eax, %eax
callq 0x2030
movq 0x8(%rbx), %rax
cmpq %rax, 0x10(%rbx)
je 0x2f0d
leaq 0x106eb(%rip), %r14     # 0x1357e
leaq 0xf299(%rip), %r15      # 0x12133
xorl %r13d, %r13d
leaq (,%r13,2), %rbp
addq %r13, %rbp
movq (%rax,%rbp,8), %rcx
cmpq %rcx, 0x8(%rax,%rbp,8)
je 0x2ee0
xorl %r12d, %r12d
movl (%rcx,%r12,4), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
incq %r12
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %rcx
movq 0x8(%rax,%rbp,8), %rax
subq %rcx, %rax
sarq $0x2, %rax
cmpq %rax, %r12
jb 0x2eb6
movq %r14, %rdi
callq 0x2260
incq %r13
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rcx, %r13
jb 0x2e9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/biotomas[P]ipasir/app/genipalsp/genipalsp.cpp
// Function: recDFS(Graph const&, int, int)
int recDFS(const Graph&g, int vert, int goal) {
	//log("called dfs with %d\n", vert);
	if (vert == goal) {
		return 1;
	}
	visited[vert]=vert;
	int best = 0;
	for (size_t i = 0; i < g.neighbours[vert].size(); i++) {
		int nvert = g.neighbours[vert][i];
		if (!isVisited(nvert)) {
			int res = recDFS(g, nvert, goal);
			if (res > best) {
				best = res;
			}
		}
	}
	return best > 0 ? best+1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movl $0x1, %eax
cmpl %edx, %esi
je 0x3043
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x1621b(%rip), %rdi     # 0x191a0
leaq 0x4(%rsp), %r15
movq %r15, %rsi
callq 0x35ba
movl %ebp, (%rax)
movslq (%r15), %rax
movq 0x8(%r14), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rsi
cmpq %rsi, 0x8(%rcx,%rdx,8)
je 0x3041
xorl %r15d, %r15d
movq 0x161f8(%rip), %rdx     # 0x191b0
leaq 0x161e9(%rip), %r12     # 0x191a8
xorl %r13d, %r13d
movl (%rsi,%r13,4), %esi
testq %rdx, %rdx
je 0x2ff4
movq %rdx, %r8
movq %r12, %rdi
xorl %r9d, %r9d
cmpl %esi, 0x20(%r8)
setl %r9b
cmovgeq %r8, %rdi
movq 0x10(%r8,%r9,8), %r8
testq %r8, %r8
jne 0x2fd1
cmpq %r12, %rdi
je 0x2ff4
cmpl %esi, 0x20(%rdi)
jle 0x3014
movq %r14, %rdi
movl %ebx, %edx
callq 0x2f5b
cmpl %r15d, %eax
cmovgl %eax, %r15d
movq 0x161a4(%rip), %rdx     # 0x191b0
movl 0x4(%rsp), %eax
movq 0x8(%r14), %rcx
incq %r13
movslq %eax, %rsi
leaq (%rsi,%rsi,2), %rdi
movq (%rcx,%rdi,8), %rsi
movq 0x8(%rcx,%rdi,8), %rdi
subq %rsi, %rdi
sarq $0x2, %rdi
cmpq %rdi, %r13
jb 0x2fc2
leal 0x1(%r15), %ecx
xorl %eax, %eax
testl %r15d, %r15d
cmovgl %ecx, %eax
jmp 0x3043
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/biotomas[P]ipasir/app/genipalsp/genipalsp.cpp
// Function: getLowerUpperBound(Graph const&, int, int, int&, int&)
int getLowerUpperBound(const Graph& g, int start, int goal, int& lowBound, int& upBound) {
	visited.clear();
	lowBound = recDFS(g,start,goal);
	visited[goal] = goal; // because goal is not marked visited by DFS
	upBound = visited.size();
	return lowBound;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
leaq 0x4(%rsp), %rax
movl %edx, (%rax)
leaq 0x16127(%rip), %r13     # 0x191a0
movq %r13, %rdi
callq 0x3c0e
movq %r12, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x2f5b
movl %eax, (%r14)
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0x35ba
movl %ebp, (%rax)
movl 0x16122(%rip), %eax     # 0x191c8
movl %eax, (%rbx)
movl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/biotomas[P]ipasir/app/genipalsp/genipalsp.cpp
// Function: addUniversalConditions(void*, Graph const&, int)
void addUniversalConditions(void* solver, const Graph&g, int step) {
	// at most one vertex has a particular position
	for (int v1 = 1; v1 <= g.verticesCount; v1++) {
		if (!isVisited(v1)) continue;
		for (int v2 = 1; v2 < v1; v2++) {
			if (!isVisited(v2)) continue;
			ipasir_add(solver, -mapVar(v1,step,g.verticesCount));
			ipasir_add(solver, -mapVar(v2,step,g.verticesCount));
			ipasir_add(solver, 0);
		}
	}
}

// Assembly:
movl (%rsi), %ecx
testl %ecx, %ecx
jle 0x31f9
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %r13d
movq 0x160ab(%rip), %rax     # 0x191b0
leaq 0x1609c(%rip), %r12     # 0x191a8
movq %rax, %rdx
testq %rdx, %rdx
je 0x31d9
movq %rdx, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
cmpl %r13d, 0x20(%rdi)
setl %r8b
cmovgeq %rdi, %rsi
movq 0x10(%rdi,%r8,8), %rdi
testq %rdi, %rdi
jne 0x311e
cmpq %r12, %rsi
je 0x31db
cmpl %r13d, 0x20(%rsi)
setg %sil
cmpl $0x2, %r13d
setb %dil
orb %sil, %dil
jne 0x31db
movl $0x1, %ebp
movq %rax, %rcx
testq %rcx, %rcx
je 0x31c8
movq %rcx, %rsi
movq %r12, %rdx
xorl %edi, %edi
cmpl %ebp, 0x20(%rsi)
setl %dil
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x316c
cmpq %r12, %rdx
je 0x31ca
cmpl %ebp, 0x20(%rdx)
jg 0x31ca
movl (%r14), %esi
imull %ebx, %esi
addl %r13d, %esi
negl %esi
movq %r15, %rdi
callq 0x3cb5
movl (%r14), %esi
imull %ebx, %esi
addl %ebp, %esi
negl %esi
movq %r15, %rdi
callq 0x3cb5
movq %r15, %rdi
xorl %esi, %esi
callq 0x3cb5
movq 0x15fed(%rip), %rax     # 0x191b0
movq %rax, %rcx
jmp 0x31ca
xorl %ecx, %ecx
incl %ebp
cmpl %r13d, %ebp
jne 0x3161
movl (%r14), %ecx
movq %rax, %rdx
jmp 0x31db
xorl %edx, %edx
leal 0x1(%r13), %esi
cmpl %ecx, %r13d
movl %esi, %r13d
jl 0x310f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/biotomas[P]ipasir/app/genipalsp/genipalsp.cpp
// Function: addTransitionalConditions(void*, Graph const&, int)
void addTransitionalConditions(void* solver, const Graph&g, int step) {
	int verts = g.verticesCount;
	for (int v1 = 1; v1 <= verts; v1++) {
		if (!isVisited(v1)) continue;
		// clauses expressing that successor of the node in a path is its neighbour
		ipasir_add(solver, -mapVar(v1,step-1,verts));
		for (size_t i = 0; i < g.neighbours[v1].size(); i++) {
			int v2 = g.neighbours[v1][i];
			ipasir_add(solver, mapVar(v2, step,verts));
		}
		ipasir_add(solver, 0);
		// the selected vertex is not used in any of the previous steps
		for (int prevStep=0; prevStep < step; prevStep++) {
			ipasir_add(solver, -mapVar(v1,step,verts));
			ipasir_add(solver, -mapVar(v1,prevStep,verts));
			ipasir_add(solver, 0);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, 0x30(%rsp)
movl (%rsi), %eax
movq %rax, 0x20(%rsp)
testl %eax, %eax
jle 0x3367
movq %rdi, %r15
movl $0x1, %edx
movl 0xc(%rsp), %eax
subl %eax, %edx
movq 0x20(%rsp), %rcx
imull %ecx, %edx
movl %edx, 0x14(%rsp)
movl %ecx, %edx
imull %eax, %edx
movq %rdx, 0x18(%rsp)
movq %rcx, %r14
incq %r14
movl $0x1, %ebx
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movq %r14, 0x28(%rsp)
movq 0x15f4d(%rip), %rax     # 0x191b0
testq %rax, %rax
je 0x3357
leaq 0x15f35(%rip), %rcx     # 0x191a8
movslq 0x20(%rax), %rdx
xorl %esi, %esi
cmpq %rdx, %rbx
setg %sil
cmovleq %rax, %rcx
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x3273
leaq 0x15f13(%rip), %rax     # 0x191a8
cmpq %rax, %rcx
je 0x3357
movslq 0x20(%rcx), %rax
cmpq %rax, %rbx
jl 0x3357
movl 0x14(%rsp), %esi
subl %ebx, %esi
movq %r15, %rdi
callq 0x3cb5
movq 0x30(%rsp), %rbp
movq 0x8(%rbp), %rcx
leaq (%rbx,%rbx,2), %r12
movq (%rcx,%r12,8), %rax
cmpq %rax, 0x8(%rcx,%r12,8)
movq 0x18(%rsp), %r14
je 0x3304
xorl %r13d, %r13d
movl (%rax,%r13,4), %esi
addl %r14d, %esi
movq %r15, %rdi
callq 0x3cb5
incq %r13
movq 0x8(%rbp), %rcx
movq (%rcx,%r12,8), %rax
movq 0x8(%rcx,%r12,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r13
jb 0x32d9
movq %r15, %rdi
xorl %esi, %esi
callq 0x3cb5
cmpl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %r14
jle 0x3357
movq 0x18(%rsp), %rax
leal (%rax,%rbx), %ebp
negl %ebp
movl 0x10(%rsp), %r12d
movl 0xc(%rsp), %r13d
movq %r15, %rdi
movl %ebp, %esi
callq 0x3cb5
movq %r15, %rdi
movl %r12d, %esi
callq 0x3cb5
movq %r15, %rdi
xorl %esi, %esi
callq 0x3cb5
subl 0x20(%rsp), %r12d
decl %r13d
jne 0x332e
incq %rbx
decl 0x10(%rsp)
cmpq %r14, %rbx
jne 0x325c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/JameyWoo[P]re2graph/algorithms.cpp
// Function: parse_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string parse_range(string str) {
    /**
     * ! 范围解析的函数
     * ! 可以解析出如A-Z, a-zA-Z0-9_- 这一类范围定义的字符
     * 以字符串形式返回
     */
    if (str.size() == 1) return str;
    string range;
    for (size_t i = 0; i < str.size(); ++i) {
        if (i + 1 < str.size() and str[i + 1] == '-') {  // 识别到一个范围
            for (auto x = str[i]; x <= str[i + 2]; ++x) {
                range += x;
            }
            i += 2;
        } else {
            range += str[i];
        }
    }
    return range;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
cmpq $0x1, %rax
jne 0x4bb9
movq (%r14), %rcx
leaq 0x10(%r14), %rax
cmpq %rax, %rcx
je 0x4c28
movq %rcx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x4c2f
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
testq %rax, %rax
je 0x4c47
xorl %r12d, %r12d
leaq 0x1(%r12), %rdx
movq (%r14), %rcx
cmpq %rax, %rdx
jae 0x4c0d
cmpb $0x2d, (%rcx,%rdx)
jne 0x4c0d
movb (%rcx,%r12), %bpl
leaq 0x2(%r12), %r13
cmpb 0x2(%rcx,%r12), %bpl
jg 0x4c08
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x21c0
incb %bpl
movq (%r14), %rax
cmpb (%rax,%r13), %bpl
jle 0x4bf0
movq %r13, %r12
jmp 0x4c1a
movsbl (%rcx,%r12), %esi
movq %rbx, %rdi
callq 0x21c0
incq %r12
movq 0x8(%r14), %rax
cmpq %rax, %r12
jb 0x4bcd
jmp 0x4c47
movups (%rax), %xmm0
movups %xmm0, (%r15)
movq $0x1, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4c5b
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4c71
movq (%r15), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/JameyWoo[P]re2graph/algorithms.cpp
// Function: dfaPattern(DFA, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool dfaPattern(DFA dfa, string pattern) {
    /**
     * 模式匹配函数, 以bool形式返回匹配的结果
     * 直接遍历pattern然后跳转状态, 同时保存所有到达接受状态的模式串就好了
     */
    int state = 0;
    for (auto c : pattern) {  // 遍历待匹配的字符
        char real = c;
        if (count(dfa.chars.begin(), dfa.chars.end(), c) == 0) {  // ! 如果字符在chars没找到, 那么当作OTHER来处理
            c = OTHER;
            if (count(dfa.chars.begin(), dfa.chars.end(), c) == 0) {  // ! 如果dfa本身没有处理OTHER的功能, 那么退出并返回之前的匹配
                cout << "error char: " << real << " !" << endl;
                return false;
            }
        }

        if (dfa.jump_map[state].count(c)) {  // 查看输入字符是否支持当前状态
            state = dfa.jump_map[state][c];
        } else {
            return false;
        }
        if (state == ERROR) return false;  // 超过的最长长度, 可以舍去了
    }
    if (count(dfa.end_states.begin(), dfa.end_states.end(), state)) {  // 查询是否到达接受状态
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x7f81
movq (%rsi), %r12
addq %r12, %r15
xorl %eax, %eax
leaq 0xe(%rsp), %r14
movb (%r12), %bpl
movb %bpl, 0xe(%rsp)
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
cmpq %rdx, %rcx
je 0x7fb3
xorl %esi, %esi
movq %rcx, %rdi
xorl %r8d, %r8d
cmpb %bpl, (%rdi)
sete %r8b
addq %r8, %rsi
incq %rdi
cmpq %rdx, %rdi
jne 0x7ec8
testq %rsi, %rsi
je 0x7ee6
movl %ebp, %ecx
jmp 0x7f0c
movb $0x5e, 0xe(%rsp)
xorl %esi, %esi
xorl %edi, %edi
cmpb $0x5e, (%rcx)
sete %dil
addq %rdi, %rsi
incq %rcx
cmpq %rdx, %rcx
jne 0x7eed
movb $0x5e, %cl
testq %rsi, %rsi
je 0x7fb8
cltq
movq 0x58(%rbx), %rdx
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
movq 0x10(%rdx,%rsi), %rax
testq %rax, %rax
je 0x8026
leaq (%rdx,%rsi), %rdi
addq %rdx, %rsi
addq $0x8, %rsi
movq %rsi, %rdx
xorl %r8d, %r8d
cmpb %cl, 0x20(%rax)
setl %r8b
cmovgeq %rax, %rdx
movq 0x10(%rax,%r8,8), %rax
testq %rax, %rax
jne 0x7f36
cmpq %rsi, %rdx
je 0x8026
cmpb 0x20(%rdx), %cl
jl 0x8026
movq %r14, %rsi
callq 0xd800
movl (%rax), %eax
cmpl $-0x1, %eax
je 0x8026
incq %r12
cmpq %r15, %r12
jne 0x7ea9
jmp 0x7f83
xorl %eax, %eax
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %rdx
cmpq %rdx, %rcx
je 0x8026
xorl %esi, %esi
xorl %edi, %edi
cmpl %eax, (%rcx)
sete %dil
addq %rdi, %rsi
addq $0x4, %rcx
cmpq %rdx, %rcx
jne 0x7f96
movb $0x1, %al
testq %rsi, %rsi
jne 0x8028
jmp 0x8026
movb $0x5e, 0xe(%rsp)
movq 0x11011(%rip), %rbx     # 0x18fd0
leaq 0xb1e5(%rip), %rsi      # 0x131ab
movl $0xc, %edx
movq %rbx, %rdi
callq 0x2240
leaq 0xf(%rsp), %rsi
movb %bpl, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2240
movq %rax, %rbx
leaq 0xb1c6(%rip), %rsi      # 0x131b8
movl $0x2, %edx
movq %rax, %rdi
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/perf_co_sst.cpp
// Function: test(int, int)
void test(int n, int Q) {
    co_static_search_tree tree(n);

    for (int i = 0; i < n; ++i) {
        tree.update(i, i);
    }

    for (int query = 0; query < Q; ++query)
    {   
        if (query % rand_reset_const == 0) {
            srand(query / rand_reset_const);
        }
        int type = rand() % 2;
        int index = rand() % n;
        if(type == 0) {
            tree.update(index, index);
        } else {
            if(tree.get(index) != index) {
                cout << "Fail: expected value " << index << " at index " << index << endl;
                return;
            }
        }
    }
    cout << "test(" << n << ", " << Q << "): OK" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x133c
testl %ebp, %ebp
jle 0x28fb
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %r14d, %edx
callq 0x15ce
incl %r14d
cmpl %r14d, %ebp
jne 0x28e5
testl %ebx, %ebx
jle 0x296c
xorl %r13d, %r13d
leaq 0x8(%rsp), %r14
movl %r13d, %edi
movl $0xd1b71759, %eax       # imm = 0xD1B71759
imulq %rax, %rdi
shrq $0x2d, %rdi
imull $0x2710, %edi, %eax     # imm = 0x2710
cmpl %r13d, %eax
jne 0x2927
callq 0x10f0
callq 0x1060
movl %eax, %r12d
callq 0x1060
cltd
idivl %ebp
movl %edx, %r15d
testb $0x1, %r12b
jne 0x2950
movq %r14, %rdi
movl %r15d, %esi
movl %r15d, %edx
callq 0x15ce
jmp 0x2964
movq %r14, %rdi
movl %r15d, %esi
callq 0x17ac
cmpl %r15d, %eax
jne 0x29f3
incl %r13d
cmpl %r13d, %ebx
jne 0x2907
movq 0x265d(%rip), %rdi      # 0x4fd0
leaq 0x810(%rip), %rsi       # 0x318a
movl $0x5, %edx
callq 0x1140
movq 0x2645(%rip), %rdi      # 0x4fd0
movl %ebp, %esi
callq 0x11c0
movq %rax, %r14
leaq 0x7f4(%rip), %rsi       # 0x3190
movl $0x2, %edx
movq %rax, %rdi
callq 0x1140
movq %r14, %rdi
movl %ebx, %esi
callq 0x11c0
movq %rax, %rbx
leaq 0x7d6(%rip), %rsi       # 0x3193
movl $0x5, %edx
movq %rax, %rdi
callq 0x1140
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
jmp 0x2a66
movq 0x25d6(%rip), %rdi      # 0x4fd0
leaq 0x768(%rip), %rsi       # 0x3169
movl $0x15, %edx
callq 0x1140
movq 0x25be(%rip), %rdi      # 0x4fd0
movl %r15d, %esi
callq 0x11c0
movq %rax, %rbx
leaq 0x75b(%rip), %rsi       # 0x317f
movl $0xa, %edx
movq %rax, %rdi
callq 0x1140
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
leaq 0x8(%rsp), %rdi
callq 0x13d6
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a88
jmp 0x2a88
jmp 0x2a88
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x13d6
movq %rbx, %rdi
callq 0x11d0
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/perf_co_sst.cpp
// Function: main
int main(){
    // I think it's better to first let the user specify the inputs,
    // then make 10 independent runs on the same inputs n and Q, and
    // measure the runtime of each separately. We need an average of
    // runtimes, not the total runtime - maybe I'm wrong about this?
    srand(10);
    chrono::steady_clock::time_point begin = chrono::steady_clock::now();
    int n, Q;
    cin >> n >> Q;
    test(n, Q);
    chrono::steady_clock::time_point end = chrono::steady_clock::now();
    cout << "Time difference = " << chrono::duration_cast<chrono::microseconds>(end - begin).count() << "[µs]" << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0xa, %edi
callq 0x10f0
callq 0x1160
movq %rax, %rbx
movq 0x2521(%rip), %rdi      # 0x4fe0
leaq 0xc(%rsp), %r14
movq %r14, %rsi
callq 0x10a0
leaq 0x8(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x10a0
movl (%r14), %edi
movl (%r15), %esi
callq 0x28b8
callq 0x1160
movq %rax, %r14
movq 0x24da(%rip), %r15      # 0x4fd0
leaq 0x69c(%rip), %rsi       # 0x3199
movl $0x12, %edx
movq %r15, %rdi
callq 0x1140
subq %rbx, %r14
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %r14, %rax
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x7, %rdx
addq %rdx, %rsi
movq %r15, %rdi
callq 0x10e0
movq %rax, %rbx
leaq 0x66f(%rip), %rsi       # 0x31ac
movl $0x5, %edx
movq %rax, %rdi
callq 0x1140
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/NFAcz[P]compareQC/main.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
std::vector<std::string> split(const std::string& s, char delimiter)
{
  std::vector<std::string> tokens;
  std::string token;
  std::istringstream tokenStream(s);

  while (std::getline(tokenStream, token, delimiter))
  {
    tokens.push_back(token);
  }

  return tokens;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %r14d
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
leaq -0x1c8(%rbp), %rdi
movl $0x8, %edx
callq 0x5410
movsbl %r14b, %r14d
leaq -0x1c8(%rbp), %r15
leaq -0x48(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x54a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x58c1
movq %rbx, %rdi
movq %r12, %rsi
callq 0x793a
jmp 0x5898
movq 0xf6d0(%rip), %rsi      # 0x14f98
leaq -0x1c8(%rbp), %rdi
callq 0x5340
leaq -0x150(%rbp), %rdi
callq 0x50c0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x58f5
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x5280
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x5931
movq %rax, %r14
movq 0xf67f(%rip), %rsi      # 0x14f98
leaq -0x1c8(%rbp), %rdi
callq 0x5340
leaq -0x150(%rbp), %rdi
callq 0x50c0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x5946
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x5280
movq %rbx, %rdi
callq 0x7986
movq %r14, %rdi
callq 0x5450
// File: /workspace/github_cpp_makefile_star2_O3/NFAcz[P]compareQC/main.cpp
// Function: loadFromTxt(char const*, int)
std::vector<float> loadFromTxt(const char *filename, const int jump){

    std:ifstream instream(filename);
    float Y;
    std::string line;
    std::vector<float> tmp;
    int counter = 0;
    int frms = 0;
    while(std::getline(instream, line)){
      if(counter%3==0){
        if(frms%jump==0){
        Y = float(strtof(line.c_str(),NULL));
        tmp.push_back(Y);
        }
        frms++;
      }
      counter++;
    }
    instream.close();

    FPS = 25.0;

    return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %edx, -0x34(%rbp)
movq %rdi, %rbx
leaq -0x260(%rbp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x5490
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %r14d, %r14d
movq %r14, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, 0x10(%rbx)
xorps %xmm0, %xmm0
movq %rbx, -0x30(%rbp)
movups %xmm0, (%rbx)
leaq -0x58(%rbp), %r12
xorl %r13d, %r13d
xorl %ebx, %ebx
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5250
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x54a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5a45
movl %ebx, %eax
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x21, %rax
leal (%rax,%rax,2), %eax
addl %r14d, %eax
jne 0x5a3b
movl %r13d, %eax
cltd
idivl -0x34(%rbp)
testl %edx, %edx
jne 0x5a38
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x5320
movss %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x5a2f
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x5a38
leaq -0x38(%rbp), %rdx
callq 0x80a8
incl %r13d
incl %ebx
decl %r14d
jmp 0x59ad
leaq -0x260(%rbp), %rdi
callq 0x5060
movl $0x41c80000, 0xf81d(%rip) # imm = 0x41C80000
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5a74
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x5280
leaq -0x260(%rbp), %rdi
callq 0x5080
movq -0x30(%rbp), %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a98
movq %rax, %r14
movq -0x30(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5ab7
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x5280
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5ad0
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x5280
leaq -0x260(%rbp), %rdi
callq 0x5080
movq %r14, %rdi
callq 0x5450
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: threadpool_init
threadpool_t *threadpool_init(int threadNum,int queueMaxLen){
    threadpool_t *pThreadPool=(threadpool_t *)malloc(sizeof(threadpool_t));
    if(pThreadPool==NULL) return NULL;
    (pThreadPool->tasks).front=NULL;
    (pThreadPool->tasks).rear=NULL;
    pthread_mutex_init(&((pThreadPool->tasks).qmutex),NULL);
    pthread_cond_init(&((pThreadPool->tasks).not_full),NULL);
    (pThreadPool->tasks).max_len=queueMaxLen;
    (pThreadPool->tasks).qlen=0;
    (pThreadPool->tasks).has_tasks=(bsem *)malloc(sizeof(bsem));
    if((pThreadPool->tasks).has_tasks==NULL) return NULL;
    if(bsem_init((pThreadPool->tasks).has_tasks,0)!=0) return NULL;
    pThreadPool->work_threads=(pthread_t *)malloc(threadNum*sizeof(pthread_t));
    pThreadPool->num_alive_threads=threadNum;
    pThreadPool->num_running_threads=0;
    pthread_mutex_init(&(pThreadPool->tmutex),NULL);
    pthread_cond_init(&(pThreadPool->has_idle),NULL);
    keepAlive=1;
    for(int i=0;i<threadNum;i++){
        pthread_create(&((pThreadPool->work_threads)[i]),0,thread_work,(void *)pThreadPool);
    }
    return pThreadPool;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r12d
movl %edi, %r14d
movl $0xe0, %edi
callq 0x2360
testq %rax, %rax
je 0x27d5
movq %rax, %rbx
leaq 0x10(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x23f0
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x2340
movl %r12d, 0x68(%rbx)
movl $0x0, 0x6c(%rbx)
movl $0x60, %edi
callq 0x2360
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x27d8
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x23f0
addq $0x28, %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x2340
movslq %r14d, %r15
leaq (,%r15,8), %rdi
callq 0x2360
movq %rax, 0x78(%rbx)
movl %r15d, 0x80(%rbx)
movl $0x0, 0x84(%rbx)
leaq 0x88(%rbx), %rdi
xorl %esi, %esi
callq 0x23f0
movq %rbx, %rdi
addq $0xb0, %rdi
xorl %esi, %esi
callq 0x2340
movl $0x1, 0x7af7(%rip)      # 0xa294
testl %r15d, %r15d
jle 0x27d0
movl %r14d, %r15d
shlq $0x3, %r15
xorl %r12d, %r12d
leaq 0x71(%rip), %r14        # 0x2824
movq 0x78(%rbx), %rdi
addq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x24d0
addq $0x8, %r12
cmpq %r12, %r15
jne 0x27b3
movq %rbx, %r15
jmp 0x27d8
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: bsem_init(bsem*, int)
int bsem_init(bsem *pBsem,int sem){
    if(sem<0||sem>1){
        printf("the binary sem only can be 1 or 0!\n");
        return -1;
    }
    pthread_mutex_init(&(pBsem->mut),NULL);
    pthread_cond_init(&(pBsem->con),NULL);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x2, %esi
jb 0x2803
leaq 0x4829(%rip), %rdi      # 0x7020
callq 0x2440
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x281d
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x23f0
addq $0x28, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x2340
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: thread_work(void*)
void *thread_work(void *args){
    pthread_detach(pthread_self());
    threadpool_t *pThreadPool=(threadpool_t *)args;
    while(keepAlive){
        bsem_wait((pThreadPool->tasks).has_tasks);
        if(keepAlive){
            pthread_mutex_lock(&(pThreadPool->tmutex));
            pThreadPool->num_running_threads++;
            pthread_mutex_unlock(&(pThreadPool->tmutex));
            task *t;
            pthread_mutex_lock(&((pThreadPool->tasks).qmutex));
            if((pThreadPool->tasks).qlen==0){
                pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
                continue;
            }else if((pThreadPool->tasks).qlen==1){
                t=(pThreadPool->tasks).front;
                (pThreadPool->tasks).front=NULL;
                (pThreadPool->tasks).rear=NULL;
            }else{
                t=(pThreadPool->tasks).front;
                (pThreadPool->tasks).front=((pThreadPool->tasks).front)->next;
                bsem_post((pThreadPool->tasks).has_tasks);
            }
            (pThreadPool->tasks).qlen--;
            if((pThreadPool->tasks).qlen==((pThreadPool->tasks).max_len-1)){
                pthread_cond_signal(&((pThreadPool->tasks).not_full));
            }
            pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
            void *(*func)(void *)=t->func;
            func(t->args);
            free(t);
            pthread_mutex_lock(&(pThreadPool->tmutex));
            pThreadPool->num_running_threads--;
#ifdef LIMITTASK
            pthread_cond_signal(&(pThreadPool->has_idle));
#endif
            pthread_mutex_unlock(&(pThreadPool->tmutex));
        }
    }
    pthread_mutex_lock(&(pThreadPool->tmutex));
    pThreadPool->num_alive_threads--;
    pthread_mutex_unlock(&(pThreadPool->tmutex));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2270
movq %rax, %rdi
callq 0x2190
cmpl $0x0, 0x7a4b(%rip)      # 0xa294
je 0x2915
leaq 0x88(%rbx), %r14
leaq 0x10(%rbx), %r15
leaq 0x38(%rbx), %r12
movq 0x70(%rbx), %rdi
callq 0x2932
cmpl $0x0, 0x7a26(%rip)      # 0xa294
je 0x2908
movq %r14, %rdi
callq 0x23e0
incl 0x84(%rbx)
movq %r14, %rdi
callq 0x21e0
movq %r15, %rdi
callq 0x23e0
movl 0x6c(%rbx), %eax
movq %r15, %rdi
testl %eax, %eax
je 0x2903
cmpl $0x1, %eax
jne 0x28b1
movq (%rbx), %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x1, %eax
jmp 0x28c7
movq (%rbx), %r13
movq 0x70(%rbx), %rdi
movq 0x10(%r13), %rax
movq %rax, (%rbx)
callq 0x296f
movl 0x6c(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x6c(%rbx)
cmpl 0x68(%rbx), %eax
jne 0x28da
movq %r12, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x21e0
movq 0x8(%r13), %rdi
callq *(%r13)
movq %r13, %rdi
callq 0x2330
movq %r14, %rdi
callq 0x23e0
decl 0x84(%rbx)
movq %r14, %rdi
callq 0x21e0
cmpl $0x0, 0x7985(%rip)      # 0xa294
jne 0x285e
leaq 0x88(%rbx), %r14
movq %r14, %rdi
callq 0x23e0
decl 0x80(%rbx)
movq %r14, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: bsem_wait(bsem*)
void bsem_wait(bsem *pBsem){
    pthread_mutex_lock(&(pBsem->mut));
    while(pBsem->sem==0) pthread_cond_wait(&(pBsem->con),&(pBsem->mut));
    pBsem->sem=0;
    pthread_mutex_unlock(&(pBsem->mut));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x23e0
cmpl $0x0, 0x58(%rbx)
jne 0x295c
leaq 0x28(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2420
cmpl $0x0, 0x58(%rbx)
je 0x294b
movl $0x0, 0x58(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: bsem_post(bsem*)
void bsem_post(bsem *pBsem){
    pthread_mutex_lock(&(pBsem->mut));
    pBsem->sem=1;
    pthread_cond_signal(&(pBsem->con));
    pthread_mutex_unlock(&(pBsem->mut));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x23e0
movl $0x1, 0x58(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: threadpool_add_task
int threadpool_add_task(threadpool_t *pThreadPool,void* (*func)(void *),void *args){
#ifdef LIMITTASK
    pthread_mutex_lock(&(pThreadPool->tmutex));
    while((pThreadPool->num_running_threads==pThreadPool->num_alive_threads)&&(pThreadPool->num_alive_threads!=0)) pthread_cond_wait(&(pThreadPool->has_idle),&(pThreadPool->tmutex));
    pthread_mutex_unlock(&(pThreadPool->tmutex));
#endif
    task *t=(task *)malloc(sizeof(task));
    if(t==NULL) return -1;
    t->func=func;
    t->args=args;
    t->next=NULL;
    pthread_mutex_lock(&((pThreadPool->tasks).qmutex));
    while((pThreadPool->tasks).qlen==(pThreadPool->tasks).max_len){
        pthread_cond_wait(&((pThreadPool->tasks).not_full),&((pThreadPool->tasks).qmutex));
    }
    if((pThreadPool->tasks).qlen==0){
        (pThreadPool->tasks).front=(pThreadPool->tasks).rear=t;
    }else{
        ((pThreadPool->tasks).rear)->next=t;
        (pThreadPool->tasks).rear=((pThreadPool->tasks).rear)->next;
    }
    (pThreadPool->tasks).qlen++;
    bsem_post((pThreadPool->tasks).has_tasks);
    pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl $0x18, %edi
callq 0x2360
testq %rax, %rax
je 0x2a0c
movq %rax, %r15
movq %r12, (%rax)
movq %r14, 0x8(%rax)
movq $0x0, 0x10(%rax)
leaq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x23e0
movl 0x6c(%rbx), %eax
cmpl 0x68(%rbx), %eax
jne 0x29fb
leaq 0x38(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2420
movl 0x6c(%rbx), %eax
cmpl 0x68(%rbx), %eax
je 0x29e8
leaq 0x8(%rbx), %rcx
testl %eax, %eax
je 0x2a13
movq (%rcx), %rdx
addq $0x10, %rdx
jmp 0x2a19
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2a37
movq %rcx, %rdx
movq %rbx, %rcx
movq %r15, (%rdx)
movq %r15, (%rcx)
incl %eax
movl %eax, 0x6c(%rbx)
movq 0x70(%rbx), %rdi
callq 0x296f
movq %r14, %rdi
callq 0x21e0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/yyThreadPool.c
// Function: threadpool_destroy
void threadpool_destroy(threadpool_t *pThreadPool){
    keepAlive=0;
    while(pThreadPool->num_alive_threads!=0){
        bsem_post((pThreadPool->tasks).has_tasks);
        sleep(0.1);
    }
    task *t=(pThreadPool->tasks).front;
    while(t!=NULL){
        task *tmp=t;
        t=t->next;
        free(tmp);
    }
    free((pThreadPool->tasks).has_tasks);
    free(pThreadPool->work_threads);
    free(pThreadPool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x7840(%rip)      # 0xa294
cmpl $0x0, 0x80(%rdi)
je 0x2a76
movq 0x70(%rbx), %rdi
callq 0x296f
xorl %edi, %edi
callq 0x21d0
cmpl $0x0, 0x80(%rbx)
jne 0x2a5d
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2a8f
movq 0x10(%rdi), %r14
callq 0x2330
movq %r14, %rdi
testq %r14, %r14
jne 0x2a7e
movq 0x70(%rbx), %rdi
callq 0x2330
movq 0x78(%rbx), %rdi
callq 0x2330
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/produceFlows.c
// Function: cleanup(void*)
void cleanup(void *arg){
    threadpool_t *pThreadPool=(threadpool_t *)arg;
    if((pThreadPool->tasks).qmutex.__data.__owner==syscall(SYS_gettid)){
        pthread_mutex_unlock(&((pThreadPool->tasks).qmutex));
    }
    if((((pThreadPool->tasks).has_tasks)->mut).__data.__owner==syscall(SYS_gettid)){
        pthread_mutex_unlock(&(((pThreadPool->tasks).has_tasks)->mut));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x18(%rdi), %r14
movl $0xba, %edi
xorl %eax, %eax
callq 0x2050
cmpq %r14, %rax
jne 0x2afc
leaq 0x10(%rbx), %rdi
callq 0x21e0
movq 0x70(%rbx), %rax
movslq 0x8(%rax), %r14
movl $0xba, %edi
xorl %eax, %eax
callq 0x2050
cmpq %r14, %rax
jne 0x2b22
movq 0x70(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21e0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/produceFlows.c
// Function: receiveData(void*)
void *receiveData(void *argv){
    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL);
    pThreadPool=threadpool_init(4,rDataCacheSize);
    pthread_cleanup_push(cleanup,(void *)pThreadPool);
    int sockfd;
    struct sockaddr_in servaddr;
    sockfd=socket(AF_INET,SOCK_DGRAM,0);
    memset(&servaddr,0,sizeof(servaddr));
    servaddr.sin_family=AF_INET;
    servaddr.sin_addr.s_addr=htonl(INADDR_ANY);
    servaddr.sin_port=htons(555);
    int res=bind(sockfd,(struct sockaddr *)&servaddr,sizeof(servaddr));
    if(res==-1){
        printf("bind failed!\n");
        pthread_exit(0);
    }
    long long  count=0;
    pthread_t tid;
    while(1){
        rDataCache[count%rDataCacheSize].length=recvfrom(sockfd,rDataCache[count%rDataCacheSize].buf,BUFSIZE,0,0,0);
        //pthread_create(&tid,0,produce,(void *)&rDataCache[count%rDataCacheSize]);
        threadpool_add_task(pThreadPool,produce,(void *)&rDataCache[count%rDataCacheSize]);
        count++;
    }
    pthread_cleanup_pop(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x1, %edi
xorl %esi, %esi
callq 0x20c0
movl $0x4, %edi
movl $0x10, %esi
callq 0x26cc
movq %rax, %rbx
movq %rax, 0x774b(%rip)      # 0xa2a8
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x2090
movl %eax, %r14d
leaq -0x40(%rbp), %rsi
movq $0x0, 0x8(%rsi)
movq $0x2b020002, (%rsi)     # imm = 0x2B020002
movl %eax, %edi
movl $0x10, %edx
callq 0x2060
cmpl $-0x1, %eax
jne 0x2ba8
leaq 0x44cf(%rip), %rdi      # 0x706b
callq 0x2440
xorl %edi, %edi
callq 0x24a0
movq %rbx, -0x30(%rbp)
xorl %r13d, %r13d
leaq 0x775a(%rip), %rbx      # 0xa310
leaq 0x66(%rip), %r15        # 0x2c23
movl %r13d, %eax
andl $0xf, %eax
movl %eax, %ecx
shll $0xc, %ecx
leal (%rcx,%rax,4), %r12d
leaq (%r12,%rbx), %rsi
addq $0x4, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %r14d, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21f0
addq %rbx, %r12
movl %eax, (%r12)
movq 0x76b1(%rip), %rdi      # 0xa2a8
movq %r15, %rsi
movq %r12, %rdx
callq 0x299b
incq %r13
jmp 0x2bbd
movq %rax, %r14
jmp 0x2c13
movq %rax, %r14
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x2ad4
movq %r14, %rdi
callq 0x2490
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/produceFlows.c
// Function: produce(void*)
void* produce(void *argv){
    pthread_detach(pthread_self());
    rawData *pRawData=(rawData *)argv;
    int newFlows=(pRawData->length-PKTHEADERSIZE)/FLOWSIZE;
    pthread_mutex_lock(&mutex);
    while(n+newFlows>BLOCKSIZE) pthread_cond_wait(&cond_p,&mutex);
    if(in==BLOCKSIZE) in=0;
    if((in+newFlows)>BLOCKSIZE){
        memcpy(flowBlock+in,pRawData->buf+PKTHEADERSIZE,(BLOCKSIZE-in)*FLOWSIZE);
        memcpy(flowBlock,pRawData->buf+PKTHEADERSIZE+(BLOCKSIZE-in)*FLOWSIZE,(newFlows-(BLOCKSIZE-in))*FLOWSIZE);
        in=newFlows+in-BLOCKSIZE;
    }else{
        memcpy(flowBlock+in,pRawData->buf+PKTHEADERSIZE,newFlows*FLOWSIZE);
        in+=newFlows;
    }
    n+=newFlows;
    printf("add %d flows,current n is %d\n",newFlows,n);
    if(n>=FLOWSPERPROCESS) pthread_cond_signal(&cond_c);
    pthread_mutex_unlock(&mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2270
movq %rax, %rdi
callq 0x2190
movl (%r14), %eax
addl $-0x18, %eax
movl $0xaaaaaaab, %ebx       # imm = 0xAAAAAAAB
imulq %rax, %rbx
shrq $0x25, %rbx
leaq 0x7655(%rip), %rdi      # 0xa2b0
callq 0x23e0
movl 0x763d(%rip), %r15d     # 0xa2a4
addl %ebx, %r15d
cmpl $0x61a81, %r15d         # imm = 0x61A81
jl 0x2c9f
leaq 0x765e(%rip), %r12      # 0xa2d8
leaq 0x762f(%rip), %r13      # 0xa2b0
movq %r12, %rdi
movq %r13, %rsi
callq 0x2420
movl 0x7611(%rip), %r15d     # 0xa2a4
addl %ebx, %r15d
cmpl $0x61a80, %r15d         # imm = 0x61A80
jg 0x2c81
movl 0x75fb(%rip), %eax      # 0xa2a0
cmpl $0x61a80, %eax          # imm = 0x61A80
jne 0x2cb8
movl $0x0, 0x75ea(%rip)      # 0xa2a0
xorl %eax, %eax
leal (%rax,%rbx), %r13d
movl %eax, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
leaq 0x17683(%rip), %rdi     # 0x1a350
addq %rcx, %rdi
addq $0x1c, %r14
cmpl $0x61a81, %r13d         # imm = 0x61A81
jb 0x2d22
movl $0x61a80, %r12d         # imm = 0x61A80
subl %eax, %r12d
movl %r12d, %eax
shll $0x4, %eax
leal (%rax,%rax,2), %edx
movq %rdx, -0x30(%rbp)
movq %r14, %rsi
callq 0x2240
addq -0x30(%rbp), %r14
movl %ebx, %eax
subl %r12d, %eax
shll $0x4, %eax
leal (%rax,%rax,2), %edx
leaq 0x1763f(%rip), %rdi     # 0x1a350
movq %r14, %rsi
callq 0x2240
addl $0xfff9e580, %r13d      # imm = 0xFFF9E580
jmp 0x2d32
movl %ebx, %eax
shll $0x4, %eax
leal (%rax,%rax,2), %edx
movq %r14, %rsi
callq 0x2240
movl %r13d, 0x7567(%rip)     # 0xa2a0
movl %r15d, 0x7564(%rip)     # 0xa2a4
leaq 0x42fc(%rip), %rdi      # 0x7043
movl %ebx, %esi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2040
cmpl $0xfa0, 0x7547(%rip)    # imm = 0xFA0
jl 0x2d6b
leaq 0x6ab0e2a2(%rip), %rdi  # 0x6ab11008
callq 0x2030
leaq 0x753e(%rip), %rdi      # 0xa2b0
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/lsh.cpp
// Function: genAPara(int)
vector<double> genAPara(int dim){
    vector<double> aPara;
    int i;
    random_device rd;
    mt19937 gen(rd());
    normal_distribution<double> d(0,1);
    for(i=0;i<dim;i++){
        aPara.push_back(d(gen));
    }
    return aPara;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2738, %rsp           # imm = 0x2738
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x2760(%rbp), %r15
movq %r15, %rdi
callq 0x3240
movq %r15, %rdi
callq 0x2390
movl %eax, %eax
movq %rax, -0x13d8(%rbp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, -0x13d8(%rbp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2f81
movq $0x270, -0x58(%rbp)     # imm = 0x270
xorl %eax, %eax
movq %rax, -0x50(%rbp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
testl %r14d, %r14d
jle 0x3019
leaq -0x13d8(%rbp), %r15
leaq -0x50(%rbp), %r12
leaq -0x30(%rbp), %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x335c
movsd %xmm0, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3009
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3014
movq %rbx, %rdi
movq %r13, %rdx
callq 0x36be
decl %r14d
jne 0x2fde
leaq -0x2760(%rbp), %rdi
callq 0x22a0
movq %rbx, %rax
addq $0x2738, %rsp           # imm = 0x2738
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3062
jmp 0x303e
movq %rax, %r14
leaq -0x2760(%rbp), %rdi
callq 0x22a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x305a
callq 0x22b0
movq %r14, %rdi
callq 0x2490
movq %rax, %rdi
callq 0x334e
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/lsh.cpp
// Function: genBPara(double)
double genBPara(double w){
    random_device rd;
    mt19937 gen(rd());
    uniform_real_distribution<double> d(0,w);
    return d(gen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x2728, %rsp           # imm = 0x2728
movsd %xmm0, -0x18(%rbp)
leaq -0x2728(%rbp), %rbx
movq %rbx, %rdi
callq 0x3240
movq %rbx, %rdi
callq 0x2390
movl %eax, %eax
movq %rax, -0x13a0(%rbp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, -0x13a0(%rbp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x30a0
leaq -0x13a0(%rbp), %rdi
movq $0x270, 0x1380(%rdi) # imm = 0x270
callq 0x3452
movsd %xmm0, -0x10(%rbp)
leaq -0x2728(%rbp), %rdi
callq 0x22a0
movsd -0x10(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
addq $0x2728, %rsp           # imm = 0x2728
popq %rbx
popq %rbp
retq
jmp 0x3124
jmp 0x310d
movq %rax, %rbx
leaq -0x2728(%rbp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2490
movq %rax, %rdi
callq 0x334e
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/lsh.cpp
// Function: genAllParas(int, double)
void genAllParas(int dim,double w){
    int i;
    for(i=0;i<HASHFUNCNUM;i++){
        aVecParas[i]=genAPara(dim);
        bParas[i]=genBPara(w);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, -0x48(%rbp)
movl %edi, %ebx
leaq 0x1266a05(%rip), %r15   # 0x1269b50
xorl %r12d, %r12d
leaq -0x40(%rbp), %r14
leaq 0x1266ae7(%rip), %r13   # 0x1269c40
movq %r14, %rdi
movl %ebx, %esi
callq 0x2f34
movq (%r15), %rdi
movq -0x40(%rbp), %rax
movq %rax, (%r15)
movq -0x38(%rbp), %rax
movq %rax, 0x8(%r15)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
testq %rdi, %rdi
je 0x31a4
callq 0x22b0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x31a4
callq 0x22b0
movsd -0x48(%rbp), %xmm0
callq 0x306a
movsd %xmm0, (%r12,%r13)
addq $0x8, %r12
addq $0x18, %r15
cmpq $0x50, %r12
jne 0x3159
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yueww[P]TSR/lsh.cpp
// Function: myHash(tuple4vec)
int myHash(tuple4vec tvec){
    int i,j;
    int index=0;
    double tmp;
    for(i=0;i<HASHFUNCNUM;i++){
        tmp=bParas[i];
        for(j=0;j<VECTORDIM;j++){
            tmp+=aVecParas[i][j]*tvec.vec[j];
        }
        index+=(int)(tmp/W);
    }
    index=index%TABLESIZE;
    if(index<0) return index+TABLESIZE;
    return index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
leaq 0x10(%rbp), %rdx
leaq 0x1266a5e(%rip), %rsi   # 0x1269c40
leaq 0x1266967(%rip), %rdi   # 0x1269b50
movsd 0x3f0f(%rip), %xmm0     # 0x7100
xorl %eax, %eax
movsd (%rsi,%rcx,8), %xmm1
leaq (%rcx,%rcx,2), %r8
movq (%rdi,%r8,8), %r8
xorl %r9d, %r9d
movzwl (%rdx,%r9,2), %r10d
xorps %xmm2, %xmm2
cvtsi2sd %r10d, %xmm2
mulsd (%r8,%r9,8), %xmm2
addsd %xmm2, %xmm1
incq %r9
cmpq $0xa, %r9
jne 0x3203
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r8d
addl %r8d, %eax
incq %rcx
cmpq $0xa, %rcx
jne 0x31f3
andl $0x3ff, %eax            # imm = 0x3FF
popq %rbp
retq
nop