LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./qual.h
// Function: intToPhred33(int, bool)
inline static char intToPhred33(int iQ, bool solQuals) {
	int pQ;
	if (solQuals) {
		// Convert from solexa quality to phred
		// quality and translate to ASCII
		// http://maq.sourceforge.net/qual.shtml
		pQ = solexaToPhred((int)iQ) + 33;
	} else {
		// Keep the phred quality and translate
		// to ASCII
		pQ = (iQ <= 93 ? iQ : 93) + 33;
	}
	if (pQ < 33) {
		cerr << "Saw negative Phred quality " << ((int)pQ-33) << "." << endl;
		throw 1;
	}
	assert_geq(pQ, 0);
	return (int)pQ;
}

// Assembly:
pushq %rbx
testl %esi, %esi
je 0x42df4
xorl %ebx, %ebx
cmpl $-0xa, %edi
jl 0x42e01
addl $0xa, %edi
leaq 0x21e22(%rip), %rax     # 0x64c10
movzbl (%rax,%rdi), %ebx
jmp 0x42e01
cmpl $0x5d, %edi
pushq $0x5d
popq %rbx
cmovll %edi, %ebx
testl %edi, %edi
js 0x42e08
addb $0x21, %bl
movl %ebx, %eax
popq %rbx
retq
movq 0x1f1e1(%rip), %rdi     # 0x61ff0
leaq 0x95ac(%rip), %rsi      # 0x4c3c2
callq 0x94e0
movq %rax, %rdi
movl %ebx, %esi
callq 0x9930
leaq 0x87ad(%rip), %rsi      # 0x4b5d9
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
callq 0x9210
pushq $0x4
popq %rdi
callq 0x9220
movl $0x1, (%rax)
movq 0x1f107(%rip), %rsi     # 0x61f58
movq %rax, %rdi
xorl %edx, %edx
callq 0x9910
nop
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/pat.cpp
// Function: TabbedPatternSource::nextBatchFromFile(PerThreadReadBuf&, bool, unsigned long)
pair<bool, int> TabbedPatternSource::nextBatchFromFile(
	PerThreadReadBuf& pt,
	bool batch_a,
	size_t readi)
{
	int c = getc_wrapper();
	while(c >= 0 && (c == '\n' || c == '\r')) {
		c = getc_wrapper();
	}
	EList<Read>& readbuf = batch_a ? pt.bufa_ : pt.bufb_;
	// Read until we run out of input or until we've filled the buffer
	for(; readi < pt.max_buf_ && c >= 0; readi++) {
		readbuf[readi].readOrigBuf.clear();
		while(c >= 0 && c != '\n' && c != '\r') {
			readbuf[readi].readOrigBuf.append(c);
			c = getc_wrapper();
		}
                if (c == '\n') {
			readbuf[readi].readOrigBuf.append(c);
			c = getc_wrapper();
			if (c == '\r')
				readbuf[readi].readOrigBuf.append(c);
                        else {
				ungetc_wrapper(c);
				c = '\n'; // reset to last seen char
                        }
                }
                while(c >= 0 && (c == '\n' || c == '\r') && readi < pt.max_buf_ - 1) {
			c = getc_wrapper();
		}
	}
	return make_pair(c < 0, readi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %r15, %rdi
callq 0x4398e
testl %eax, %eax
js 0x42e88
cmpl $0xa, %eax
je 0x42e72
cmpl $0xd, %eax
je 0x42e72
xorb $0x1, %bpl
movzbl %bpl, %r13d
shll $0x5, %r13d
orq $0x8, %r13
leaq 0x7(%rsp), %rbp
testl %eax, %eax
js 0x42f86
cmpq (%r14), %rbx
jae 0x42f86
movq 0x8(%r14,%r13), %rcx
imulq $0x268, %rbx, %r12      # imm = 0x268
andq $0x0, 0x140(%rcx,%r12)
testl %eax, %eax
js 0x42f5b
cmpl $0xa, %eax
je 0x42eff
cmpl $0xd, %eax
je 0x42f5b
movq 0x8(%r14,%r13), %rcx
leaq (%rcx,%r12), %rdi
addq $0x120, %rdi            # imm = 0x120
movb %al, 0x7(%rsp)
movq %rbp, %rsi
callq 0x439de
movq %r15, %rdi
callq 0x4398e
jmp 0x42ec3
movq 0x8(%r14,%r13), %rax
leaq (%rax,%r12), %rdi
addq $0x120, %rdi            # imm = 0x120
movb $0xa, 0x6(%rsp)
leaq 0x6(%rsp), %rsi
callq 0x439de
movq %r15, %rdi
callq 0x4398e
cmpl $0xd, %eax
jne 0x42f4e
movq 0x8(%r14,%r13), %rax
leaq (%rax,%r12), %rdi
addq $0x120, %rdi            # imm = 0x120
movb $0xd, 0x5(%rsp)
leaq 0x5(%rsp), %rsi
callq 0x439de
pushq $0xd
jmp 0x42f5a
movq %r15, %rdi
movl %eax, %esi
callq 0x43a4c
pushq $0xa
popq %rax
testl %eax, %eax
js 0x42f7e
cmpl $0xd, %eax
je 0x42f69
cmpl $0xa, %eax
jne 0x42f7e
movq (%r14), %rcx
decq %rcx
cmpq %rcx, %rbx
jae 0x42f7e
movq %r15, %rdi
callq 0x4398e
jmp 0x42f5b
incq %rbx
jmp 0x42e9d
shrl $0x1f, %eax
shlq $0x20, %rbx
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/pat.cpp
// Function: RawPatternSource::parse(Read&, Read&, unsigned long) const
bool RawPatternSource::parse(Read& r, Read& rb, TReadId rdid) const {
	assert(r.empty());
	assert(!r.readOrigBuf.empty());
	size_t cur = 0;
	const size_t buflen = r.readOrigBuf.length();

	// Parse sequence
	assert(r.patFw.empty());
	int nchar = 0;
	int c = r.readOrigBuf[cur++];


	cur--;
	while(cur < buflen) {
		c = r.readOrigBuf[cur++];
		if(isalpha(c)) {
			assert_in(toupper(c), "ACGTN");
			if(nchar++ >= this->trim5_) {
				assert_neq(0, asc2dnacat[c]);
				r.patFw.append(asc2dna[c]);
			}
		}
	}
	assert_eq(cur, buflen);
	// record amt trimmed from 5' end due to --trim5
	r.trimmed5 = (int)(nchar - r.patFw.length());
	// record amt trimmed from 3' end due to --trim3
	r.trimmed3 = (int)(r.patFw.trimEnd(this->trim3_));

	// Give the name field a dummy value
	char cbuf[20];
	itoa10<TReadId>(rdid, cbuf);
	r.name.install(cbuf);

	// Give the base qualities dummy values
	assert(r.qual.empty());
	const size_t len = r.patFw.length();
	for(size_t i = 0; i < len; i++) {
		r.qual.append('I');
	}
	r.parsed = true;
	if(!rb.parsed && !rb.readOrigBuf.empty()) {
		return parse(rb, r, rdid);
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x140(%rsi), %r13
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x128(%rbx), %r15
cmpq %r12, %r13
je 0x43533
movsbl (%r15,%r12), %ebp
incq %r12
movl %ebp, %edi
callq 0x9820
testl %eax, %eax
je 0x434e6
leal 0x1(%r14), %r15d
movq 0x8(%rsp), %rax
cmpl 0x18(%rax), %r14d
movl %r15d, %r14d
jl 0x434df
movslq %ebp, %rax
leaq 0x21046(%rip), %rcx     # 0x64560
movb (%rcx,%rax), %al
movb %al, 0x20(%rsp)
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x43948
movl %r15d, %r14d
jmp 0x434df
movq 0x20(%rbx), %rax
subl %eax, %r14d
movl %r14d, 0x1a8(%rbx)
movq 0x8(%rsp), %rcx
movslq 0x14(%rcx), %rcx
xorl %edx, %edx
movq %rax, %rsi
subq %rcx, %rsi
cmovaeq %rsi, %rdx
cmovbq %rax, %rcx
movq %rdx, 0x20(%rbx)
movl %ecx, 0x1ac(%rbx)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x4389b
leaq 0x150(%rbx), %rdi
movq %r12, %rsi
callq 0x43a20
movq 0x20(%rbx), %r14
leaq 0x60(%rbx), %r12
leaq 0x7(%rsp), %r13
subq $0x1, %r14
jb 0x435aa
movb $0x49, 0x7(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x43902
jmp 0x43592
movb $0x1, 0x190(%rbx)
movb $0x1, %al
movq 0x18(%rsp), %rsi
cmpb $0x0, 0x190(%rsi)
jne 0x435de
cmpq $0x0, 0x140(%rsi)
je 0x435de
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq %rbx, %rdx
callq *0x18(%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/pat.cpp
// Function: tooManySeqChars(SStringExpandable<char, 25, 2, 0> const&)
void tooManySeqChars(const BTString& read_name) {
	cerr << "Reads file contained a pattern with more than 1024 sequence characters." << endl
		 << "Please truncate reads and quality values and and re-run Bowtie." << endl
		 << "Offending read: " << read_name << endl;
	throw 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x1e9f8(%rip), %rdi     # 0x61ff0
leaq 0x8bbc(%rip), %rsi      # 0x4c1bb
callq 0x94e0
movq %rax, %rdi
callq 0x9210
leaq 0x8bf0(%rip), %rsi      # 0x4c203
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
callq 0x9210
leaq 0x8c19(%rip), %rsi      # 0x4c243
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1970d
movq %rax, %rdi
callq 0x9210
pushq $0x4
popq %rdi
callq 0x9220
movl $0x1, (%rax)
movq 0x1e8fe(%rip), %rsi     # 0x61f58
movq %rax, %rdi
xorl %edx, %edx
callq 0x9910
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./read.h
// Function: Read::fixMateName(int)
void fixMateName(int i) {
		assert(i == 1 || i == 2);
		size_t namelen = name.length();
		bool append = false;
		if(namelen < 2) {
			// Name is too short to possibly have /1 or /2 on the end
			append = true;
		} else {
			if(i == 1) {
				// append = true iff mate name does not already end in /1
				append =
					name[namelen-2] != '/' ||
					name[namelen-1] != '1';
			} else {
				// append = true iff mate name does not already end in /2
				append =
					name[namelen-2] != '/' ||
					name[namelen-1] != '2';
			}
		}
		if(append) {
			name.append('/');
			name.append("012"[i]);
		}
	}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x170(%rdi), %rax
cmpq $0x2, %rax
jae 0x436f0
addq $0x150, %rbx            # imm = 0x150
leaq 0x7(%rsp), %rsi
movb $0x2f, (%rsi)
movq %rbx, %rdi
callq 0x43902
movslq %ebp, %rax
leaq 0x8b76(%rip), %rsi      # 0x4c254
addq %rax, %rsi
movq %rbx, %rdi
callq 0x43902
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x158(%rbx), %rcx
movb -0x2(%rcx,%rax), %dl
cmpl $0x1, %ebp
jne 0x4370e
cmpb $0x2f, %dl
jne 0x436bd
cmpb $0x31, -0x1(%rcx,%rax)
jne 0x436bd
jmp 0x436e9
cmpb $0x2f, %dl
jne 0x436bd
cmpb $0x32, -0x1(%rcx,%rax)
jne 0x436bd
jmp 0x436e9
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./pat.h
// Function: PatternSourcePerThread::nextBatch()
std::pair<bool, int> nextBatch() {
		buf_.reset();
		std::pair<bool, int> res = composer_.nextBatch(buf_);
		buf_.init();
		batch_id_ = (size_t)(buf_.rdid()/buf_.max_buf_);
		return res;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x1d490
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
movq %rax, %rcx
andq $0x0, 0x50(%rbx)
movq 0x58(%rbx), %rax
xorl %edx, %edx
divq 0x8(%rbx)
movq %rax, 0x78(%rbx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./pat.h
// Function: CFilePatternSource::is_gzipped_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool is_gzipped_file(const std::string& filename) {
		struct stat s;
		if (stat(filename.c_str(), &s) != 0) {
			perror("stat");
		}
		else {
			if (S_ISFIFO(s.st_mode))
				return true;
		}
		size_t pos = filename.find_last_of(".");
		std::string ext = (pos == std::string::npos) ? "" : filename.substr(pos + 1);
		if (ext == "" || ext == "gz" || ext == "Z") {
			return true;
		}
		return false;
	}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq (%rsi), %rdi
leaq 0x28(%rsp), %rsi
callq 0x9920
testl %eax, %eax
jne 0x43848
movl $0xf000, %eax           # imm = 0xF000
andl 0x40(%rsp), %eax
movb $0x1, %bpl
cmpl $0x1000, %eax           # imm = 0x1000
je 0x4383c
leaq 0x7e26(%rip), %rsi      # 0x4b5d9
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x94b0
cmpq $-0x1, %rax
je 0x437dc
incq %rax
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9520
jmp 0x437f2
leaq 0x8d92(%rip), %rsi      # 0x4c575
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x15df2
leaq 0x8d7c(%rip), %rsi      # 0x4c575
leaq 0x8(%rsp), %rdi
callq 0x17c2c
movb $0x1, %bpl
testb %al, %al
jne 0x43832
leaq 0x8a47(%rip), %rsi      # 0x4c258
leaq 0x8(%rsp), %rdi
callq 0x17c2c
testb %al, %al
jne 0x43832
leaq 0x8a35(%rip), %rsi      # 0x4c25b
leaq 0x8(%rsp), %rdi
callq 0x17c2c
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x9a68
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3d45(%rip), %rdi      # 0x47594
callq 0x9420
jmp 0x437ac
nop
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./util.h
// Function: char* itoa10<int>(int const&, char*)
char* itoa10(const T& value, char* result) {
	// Check that base is valid
	char* out = result;
	T quotient = value;
	if(std::numeric_limits<T>::is_signed) {
		if(quotient <= 0) quotient = -quotient;
	}
	// Now write each digit from most to least significant
	do {
		*out = "0123456789"[quotient % 10];
		++out;
		quotient /= 10;
	} while (quotient > 0);
	// Only apply negative sign for base 10
	if(std::numeric_limits<T>::is_signed) {
		// Avoid compiler warning in cases where T is unsigned
		if (value < 0) *out++ = '-';
	}
	std::reverse( result, out );
	*out = 0; // terminator
	return out;
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
movl (%rdi), %eax
movl %eax, %r8d
negl %r8d
cmovsl %eax, %r8d
movq %rsi, %rdi
pushq $0xa
popq %rsi
leaq 0x6f73(%rip), %r9       # 0x4c3e2
movq %rdi, %rbx
movl %r8d, %eax
xorl %edx, %edx
divl %esi
movb (%rdx,%r9), %dl
movb %dl, (%rbx)
incq %rbx
cmpl $0x9, %r8d
movl %eax, %r8d
ja 0x45472
cmpl $0x0, (%rcx)
jns 0x45496
movb $0x2d, (%rbx)
incq %rbx
movq %rbx, %rsi
callq 0x43f94
movb $0x0, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./sstring.h
// Function: SDnaStringExpandable<25, 2>::append(char const&)
void append(const char& c) {
		if(this->sz_ < this->len_ + 1) {
			this->expandCopy((this->len_ + 1 + S) * M);
		}
		assert_range(0, 4, (int)c);
		this->cs_[this->len_++] = c;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
leaq 0x1(%rax), %rcx
cmpq %rcx, 0x28(%rdi)
jae 0x43978
leaq 0x34(,%rax,2), %rsi
movq %rbx, %rdi
callq 0x1daa4
movq 0x20(%rbx), %rax
leaq 0x1(%rax), %rcx
movb (%r14), %dl
movq 0x8(%rbx), %rsi
movq %rcx, 0x20(%rbx)
movb %dl, (%rsi,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./pat.h
// Function: CFilePatternSource::reset()
virtual void reset() {
		TrimmingPatternSource::reset();
		filecur_ = 0,
		open();
		filecur_++;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x8(%rdi)
andq $0x0, 0x80(%rdi)
callq 0x4146a
incq 0x80(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./pat.h
// Function: FastaContinuousPatternSource::resetForNextFile()
virtual void resetForNextFile() {
		eat_ = length_-1;
		name_prefix_buf_.clear();
		beginning_ = true;
		bufCur_ = 0;
		last_ = cur_;
	}

// Assembly:
movq 0x200a8(%rdi), %rax
decq %rax
movq %rax, 0x200b8(%rdi)
andq $0x0, 0x204d0(%rdi)
movq 0x204c8(%rdi), %rax
movb $0x0, (%rax)
movb $0x1, 0x200c0(%rdi)
andq $0x0, 0x20500(%rdi)
movq 0x20508(%rdi), %rax
movq %rax, 0x20510(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./pat.h
// Function: DualPatternComposer::reset()
virtual void reset() {
		for(size_t i = 0; i < srca_.size(); i++) {
			srca_[i]->reset();
			if(srcb_[i] != NULL) {
				srcb_[i]->reset();
			}
		}
		cur_ = 0;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq 0x28(%rbx), %r14
jae 0x43eb6
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x43eb1
movq (%rdi), %rax
callq *0x20(%rax)
incq %r14
jmp 0x43e8a
movl $0x0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./sstring.h
// Function: SDnaStringExpandable<25, 2>::installReverseComp(SDnaStringExpandable<25, 2> const&)
void installReverseComp(const SDnaStringExpandable<S, M>& b) {
		if(this->sz_ < b.len_) this->expandCopy((b.len_ + S) * M);
		for(size_t i = 0; i < b.len_; i++) {
			this->cs_[i] = (b.cs_[b.len_-i-1] == 4 ? 4 : b.cs_[b.len_-i-1] ^ 3);
		}
		this->len_ = b.len_;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
cmpq %rax, 0x28(%rdi)
jae 0x43efa
leaq 0x32(,%rax,2), %rsi
movq %rbx, %rdi
callq 0x1daa4
pushq $-0x1
popq %rax
xorl %ecx, %ecx
pushq $0x4
popq %rdx
movq 0x20(%r14), %rsi
cmpq %rsi, %rcx
jae 0x43f34
addq 0x8(%r14), %rsi
movb (%rax,%rsi), %sil
movl %esi, %edi
xorb $0x3, %dil
cmpb $0x4, %sil
movzbl %dil, %esi
cmovel %edx, %esi
movq 0x8(%rbx), %rdi
movb %sil, (%rdi,%rcx)
incq %rcx
decq %rax
jmp 0x43f02
movq %rsi, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./sstring.h
// Function: SStringExpandable<char, 25, 2, 0>::installReverse(SStringExpandable<char, 25, 2, 0> const&)
void installReverse(const SStringExpandable<T, S>& b) {
		if(sz_ < b.len_) expandNoCopy((b.len_ + S) * M);
		for(size_t i = 0; i < b.len_; i++) {
			cs_[i] = b.cs_[b.len_ - i - 1];
		}
		len_ = b.len_;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
cmpq %rax, 0x28(%rdi)
jae 0x43f64
leaq 0x32(,%rax,2), %rsi
movq %rbx, %rdi
callq 0x1a3f2
pushq $-0x1
popq %rax
xorl %ecx, %ecx
movq 0x20(%r14), %rdx
cmpq %rdx, %rcx
jae 0x43f88
addq 0x8(%r14), %rdx
movb (%rax,%rdx), %dl
movq 0x8(%rbx), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
decq %rax
jmp 0x43f69
movq %rdx, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/ebwt_search_util.cpp
// Function: printHit(EList<SString<char>, 128> const&, Hit const&, SDnaStringExpandable<25, 2> const&, unsigned long, unsigned int, unsigned int, unsigned int, unsigned int, bool)
void printHit(const EList<BTRefString >& os,
              const Hit& h,
              const BTDnaString& qry,
              size_t qlen,
              uint32_t unrevOff,
              uint32_t oneRevOff,
              uint32_t twoRevOff,
              uint32_t threeRevOff,
              bool ebwtFw)
{
	// Print pattern sequence
	cout << "  Pat:  " << qry << endl;
	// Print text sequence
	cout << "  Tseg: ";
	if(ebwtFw) {
		for(size_t i = 0; i < qlen; i++) {
			cout << os[h.h.first][h.h.second + i];
		}
	} else {
		for(int i = (int)qlen-1; i >= 0; i--) {
			cout << os[h.h.first][h.h.second + i];
		}
	}
	cout << endl;
	cout << "  Bt:   ";
	for(int i = (int)qlen-1; i >= 0; i--) {
		if     (i < (int)unrevOff)    cout << "0";
		else if(i < (int)oneRevOff)   cout << "1";
		else if(i < (int)twoRevOff)   cout << "2";
		else if(i < (int)threeRevOff) cout << "3";
		else cout << "X";
	}
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
movl 0x58(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x14(%rsp)
movb 0x60(%rsp), %bl
movq 0x1def7(%rip), %rdi     # 0x61fb0
leaq 0x6ab3(%rip), %rsi      # 0x4ab73
callq 0x94e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x1970d
movq %rax, %rdi
callq 0x9210
leaq 0x6a9d(%rip), %rsi      # 0x4ab7c
movq 0x1deca(%rip), %rdi     # 0x61fb0
callq 0x94e0
testb %bl, %bl
je 0x44123
xorl %ebx, %ebx
movq 0x1deb8(%rip), %r13     # 0x61fb0
cmpq %rbx, %r14
je 0x44158
movl (%r15), %eax
movl 0x4(%r15), %ecx
movq 0x8(%r12), %rdx
shlq $0x5, %rax
addq 0x8(%rdx,%rax), %rcx
movsbl (%rbx,%rcx), %esi
movq %r13, %rdi
callq 0x95a0
incq %rbx
jmp 0x440f8
movq 0x1de86(%rip), %r13     # 0x61fb0
movl %r14d, %ebx
testl %ebx, %ebx
jle 0x44158
decl %ebx
movl (%r15), %eax
movq 0x8(%r12), %rcx
movl 0x4(%r15), %edx
addl %ebx, %edx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rax
movsbl (%rax,%rdx), %esi
movq %r13, %rdi
callq 0x95a0
jmp 0x4412d
movq 0x1de51(%rip), %r15     # 0x61fb0
movq %r15, %rdi
callq 0x9210
leaq 0x8382(%rip), %rsi      # 0x4c4f0
leaq 0x83e7(%rip), %r12      # 0x4c55c
leaq 0x46f1(%rip), %r13      # 0x4886d
movl 0xc(%rsp), %ebx
movq %r15, %rdi
callq 0x94e0
testl %r14d, %r14d
jle 0x441c7
movq %r12, %rsi
cmpl %ebp, %r14d
jle 0x441c2
movq %r13, %rsi
cmpl %ebx, %r14d
jle 0x441c2
leaq 0x6bb4(%rip), %rsi      # 0x4ad58
cmpl 0x14(%rsp), %r14d
jle 0x441c2
cmpl 0x10(%rsp), %r14d
leaq 0x43a5(%rip), %rsi      # 0x4855c
leaq 0x833b(%rip), %rax      # 0x4c4f9
cmovgq %rax, %rsi
decl %r14d
jmp 0x44180
movq 0x1dde2(%rip), %rdi     # 0x61fb0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9210
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/hit_set.cpp
// Function: operator<<(std::ostream&, HitSet const&)
ostream& operator << (ostream& os, const HitSet& hs) {
	os << hs.name << ":" << hs.seq << ":" << hs.qual << endl;
	for (size_t i = 0; i < hs.ents.size(); i++)
		os << hs.ents[i];
	return os;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1970d
leaq 0x3989(%rip), %r15      # 0x47f55
movq %rax, %rdi
movq %r15, %rsi
callq 0x94e0
leaq 0x30(%r14), %rsi
movq %rax, %rdi
callq 0x1970d
movq %rax, %rdi
movq %r15, %rsi
callq 0x94e0
leaq 0x60(%r14), %rsi
movq %rax, %rdi
callq 0x1970d
movq %rax, %rdi
callq 0x9210
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0xb0(%r14), %r12
jae 0x4462c
movq 0xa0(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4456d
incq %r12
addq $0x30, %r15
jmp 0x44608
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/sam.cpp
// Function: SAMHitSink::appendHeaders(OutFileBuf&, unsigned long, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128> const&, bool, unsigned int const*, bool, bool, char const*, char const*)
void SAMHitSink::appendHeaders(
	OutFileBuf& os,
	size_t numRefs,
	const EList<string>& refnames,
	bool nosq,
	const TIndexOffU* plen,
	bool fullRef,
	bool noQnameTrunc,
	const char *cmdline,
	const char *rgline)
{
	BTString o;
	o << "@HD\tVN:1.0\tSO:unsorted\n";
	if(!nosq) {
		for(size_t i = 0; i < numRefs; i++) {
			// RNAME
			o << "@SQ\tSN:";
			if(i < refnames.size()) {
				printUptoWs(o, refnames[i], !fullRef);
			} else {
				o << i;
			}
			o << "\tLN:" << (plen[i]) << '\n';
		}
	}
	if(rgline != NULL) {
		o << "@RG\t" << rgline << '\n';
	}
	o << "@PG\tID:Bowtie\tVN:" << BOWTIE_VERSION << "\tCL:\"" << cmdline << "\"\n";
	os.writeString(o);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r14
movl %r8d, %ebx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x40(%rsp)
leaq 0x1c43e(%rip), %rax     # 0x60aa0
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x20(%rdi)
leaq 0x7e7f(%rip), %rsi      # 0x4c4fb
callq 0x453a8
testb %bl, %bl
je 0x4473f
movq 0x98(%rsp), %rbx
testq %rbx, %rbx
je 0x446c1
leaq 0x7e83(%rip), %rsi      # 0x4c520
leaq 0x10(%rsp), %rdi
callq 0x453a8
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x453a8
leaq 0x10(%rsp), %rdi
pushq $0xa
popq %rsi
callq 0x45297
leaq 0x7e5d(%rip), %rsi      # 0x4c525
leaq 0x10(%rsp), %rdi
callq 0x453a8
leaq 0x356c(%rip), %rsi      # 0x47c45
leaq 0x10(%rsp), %rdi
callq 0x453a8
leaq 0x7e4d(%rip), %rsi      # 0x4c537
leaq 0x10(%rsp), %rdi
callq 0x453a8
movq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x453a8
leaq 0x7e30(%rip), %rsi      # 0x4c53d
leaq 0x10(%rsp), %rdi
callq 0x453a8
leaq 0x10(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x1a696
leaq 0x10(%rsp), %rdi
callq 0x1d8f6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb 0x80(%rsp), %cl
xorb $0x1, %cl
xorl %eax, %eax
leaq 0x10(%rsp), %rbp
movzbl %cl, %ebx
pushq $0xa
popq %r13
movq %rax, 0x8(%rsp)
cmpq %r12, %rax
jae 0x44689
movq %rbp, %rdi
leaq 0x7da4(%rip), %rsi      # 0x4c513
callq 0x453a8
movq 0x8(%rsp), %rsi
cmpq 0x18(%r15), %rsi
jae 0x44793
shlq $0x5, %rsi
addq 0x8(%r15), %rsi
movq %rbp, %rdi
movl %ebx, %edx
callq 0x451d8
jmp 0x447a0
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x45259
movq %rbp, %rdi
leaq 0x7d71(%rip), %rsi      # 0x4c51b
callq 0x453a8
movq 0x8(%rsp), %rax
leaq (%r14,%rax,4), %rsi
movq %rbp, %rdi
callq 0x452b8
movq %rax, %rdi
movl %r13d, %esi
callq 0x45297
movq 0x8(%rsp), %rax
incq %rax
jmp 0x44757
jmp 0x447d7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1d8f6
movq %rbx, %rdi
callq 0x9950
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./hit.h
// Function: printUptoWs(SStringExpandable<char, 25, 2, 0>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
inline void printUptoWs(BTString& o, const std::string& str, bool ws) {
	if(!ws) {
		o << str;
	} else {
		size_t pos = str.find_first_of(" \t");
		if(pos != string::npos) {
			o << str.substr(0, pos);
		} else {
			o << str;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x45232
leaq 0x7381(%rip), %rsi      # 0x4c573
movq %r14, %rdi
xorl %edx, %edx
callq 0x9230
cmpq $-0x1, %rax
je 0x45232
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x9520
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x453a8
movq %rsp, %rdi
callq 0x9a68
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x45397
movq %rax, %rbx
movq %rsp, %rdi
callq 0x9a68
movq %rbx, %rdi
callq 0x9950
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./bitset.h
// Function: Bitset::test(unsigned int) const
bool test(TIndexOffU i) const {
		bool ret = false;
		if(i < _sz) {
			ret = ((_words[i / WORD_SIZE] >> (i & BITSET_MASK)) & 1) != 0;
		}
		return ret;
	}

// Assembly:
cmpl %esi, 0x10(%rdi)
jbe 0x45ef8
movq 0x18(%rdi), %rax
movl %esi, %ecx
shrl $0x5, %ecx
movl (%rax,%rcx,4), %eax
btl %esi, %eax
setb %al
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::Hazard(void*)
bool Reclaimer::Hazard(void* const ptr) {
  std::atomic<InternalHazardPointer*>& head = global_hp_list_.head;
  InternalHazardPointer* p = head.load(std::memory_order_acquire);
  do {
    if (p->ptr.load(std::memory_order_consume) == ptr) {
      return true;
    }
    p = p->next.load(std::memory_order_acquire);
  } while (p != nullptr);

  return false;
}

// Assembly:
movq 0x60(%rdi), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
cmpq %rsi, %rcx
je 0x2455
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x2443
cmpq %rsi, %rcx
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::MarkHazard(void*)
Reclaimer::HPIndex Reclaimer::MarkHazard(void* ptr) {
  if (nullptr == ptr) return HP_INDEX_NULL;

  for (int i = 0; i < hp_list_.size(); ++i) {
    InternalHazardPointer* hp = hp_list_[i];
    if (nullptr == hp->ptr.load(std::memory_order_relaxed)) {
      hp->ptr.store(ptr, std::memory_order_release);
      return i;
    }
  }

  TryAcquireHazardPointer();
  int index = hp_list_.size() - 1;
  hp_list_[index]->ptr.store(ptr, std::memory_order_release);
  return index;
}

// Assembly:
testq %rsi, %rsi
je 0x24a9
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %eax, %eax
cmpq %rax, %rdx
je 0x24ad
movq (%rcx,%rax,8), %rsi
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x24cd
incq %rax
jmp 0x2492
pushq $-0x1
popq %rax
retq
movq %r14, %rdi
callq 0x24da
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rax
subq %rcx, %rax
shrq $0x3, %rax
decl %eax
movslq %eax, %rdx
movq (%rcx,%rdx,8), %rsi
movq %rbx, 0x8(%rsi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::TryAcquireHazardPointer()
void Reclaimer::TryAcquireHazardPointer() {
  std::atomic<InternalHazardPointer*>& head = global_hp_list_.head;
  InternalHazardPointer* p = head.load(std::memory_order_acquire);
  InternalHazardPointer* hp = nullptr;
  do {
    // Try to get the idle hazard pointer.
    if (!p->flag.test_and_set()) {
      hp = p;
      break;
    }
    p = p->next.load(std::memory_order_acquire);
  } while (p != nullptr);

  if (nullptr == hp) {
    // No idle hazard pointer, allocate new one.
    InternalHazardPointer* new_head = new InternalHazardPointer();
    new_head->flag.test_and_set();
    hp = new_head;
    global_hp_list_.size.fetch_add(1, std::memory_order_release);
    InternalHazardPointer* old_head = head.load(std::memory_order_acquire);
    do {
      new_head->next = old_head;
    } while (!head.compare_exchange_weak(old_head, new_head,
                                         std::memory_order_release,
                                         std::memory_order_relaxed));
  }
  hp_list_.push_back(hp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %r14
movq (%r14), %rax
andq $0x0, (%rsp)
movb $0x1, %cl
xchgb %cl, (%rax)
testb %cl, %cl
je 0x2504
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x24ed
movq (%rsp), %rax
jmp 0x2508
movq %rax, (%rsp)
testq %rax, %rax
jne 0x2540
pushq $0x18
popq %rdi
callq 0x2150
movq %rax, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movb $0x1, %al
xchgb %al, (%rcx)
movq %rcx, (%rsp)
movq 0x60(%rbx), %rax
lock
incl 0x8(%rax)
movq (%r14), %rax
movq %rax, %rdx
xchgq %rdx, 0x10(%rcx)
lock
cmpxchgq %rcx, (%r14)
jne 0x2532
addq $0x8, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x32ba
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::ReclaimNoHazardPointer()
void Reclaimer::ReclaimNoHazardPointer() {
  if (reclaim_map_.size() < kCoefficient * global_hp_list_.get_size()) {
    return;
  }

  // Used to speed up the inspection of the ptr.
  std::unordered_set<void*> not_allow_delete_set;
  std::atomic<InternalHazardPointer*>& head = global_hp_list_.head;
  InternalHazardPointer* p = head.load(std::memory_order_acquire);
  do {
    void* const ptr = p->ptr.load(std::memory_order_consume);
    if (nullptr != ptr) {
      not_allow_delete_set.insert(ptr);
    }
    p = p->next.load(std::memory_order_acquire);
  } while (p);

  for (auto it = reclaim_map_.begin(); it != reclaim_map_.end();) {
    if (not_allow_delete_set.find(it->first) == not_allow_delete_set.end()) {
      ReclaimNode* node = it->second;
      node->delete_func(node->ptr);
      reclaim_pool_.Push(node);
      it = reclaim_map_.erase(it);
    } else {
      ++it;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq 0x60(%rdi), %rax
movl 0x8(%rax), %eax
cltq
shlq $0x2, %rax
cmpq %rax, 0x38(%rdi)
jb 0x2634
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x38(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x60(%rdi), %rax
movq (%rax), %r13
leaq 0x8(%rsp), %r15
movq %rsp, %r12
movq 0x8(%r13), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x25cd
movq %r15, %rdi
movq %r12, %rsi
callq 0x39ee
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x25b5
movq 0x30(%rbx), %r12
leaq 0x8(%rsp), %r15
testq %r12, %r12
je 0x262a
leaq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x3d64
testq %rax, %rax
je 0x25fc
movq (%r12), %r12
jmp 0x25df
movq 0x10(%r12), %r13
leaq 0x10(%r13), %rdi
movq (%r13), %rsi
callq 0x3268
movq 0x58(%rbx), %rax
movq %rax, 0x8(%r13)
movq %r13, 0x58(%rbx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x38ec
movq %rax, %r12
jmp 0x25df
leaq 0x8(%rsp), %rdi
callq 0x3768
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2648
jmp 0x2648
jmp 0x2648
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3768
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/test.cc
// Function: onInsert(int)
void onInsert(int divide) {
  while (!start) {
    std::this_thread::yield();
  }

  int n = maxElements / divide;
  for (int i = 0; i < n; ++i) {
    int x = rand() % n;
    if (ht.Insert(x, x)) {
      ++cnt;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movb 0x8720(%rip), %al       # 0xad8c
testb $0x1, %al
jne 0x2677
callq 0x21c0
jmp 0x2666
movl 0x82e7(%rip), %eax      # 0xa964
cltd
idivl %ebx
movl %eax, %ebx
xorl %ebp, %ebp
testl %eax, %eax
cmovgl %eax, %ebp
leaq 0x82d8(%rip), %r14      # 0xa968
leaq 0x4(%rsp), %r15
subl $0x1, %ebp
jb 0x26c1
callq 0x2040
cltd
idivl %ebx
movl %edx, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x33ec
testb %al, %al
je 0x2695
lock
incl 0x86c9(%rip)            # 0xad88
jmp 0x2695
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/test.cc
// Function: onFind(int)
void onFind(int divide) {
  while (!start) {
    std::this_thread::yield();
  }

  int n = maxElements / divide;
  for (int i = 0; i < n; ++i) {
    int x;
    ht.Find(rand() % n, x);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movb 0x86ac(%rip), %al       # 0xad8c
testb $0x1, %al
jne 0x26eb
callq 0x21c0
jmp 0x26da
movl 0x8273(%rip), %eax      # 0xa964
cltd
idivl %ebx
movl %eax, %ebx
xorl %ebp, %ebp
testl %eax, %eax
cmovgl %eax, %ebp
leaq 0x8264(%rip), %r14      # 0xa968
leaq 0x8(%rsp), %r15
leaq 0xc(%rsp), %r12
subl $0x1, %ebp
jb 0x272f
callq 0x2040
cltd
idivl %ebx
movl %edx, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3456
jmp 0x270e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/test.cc
// Function: onDelete(int)
void onDelete(int divide) {
  while (!start) {
    std::this_thread::yield();
  }

  int n = maxElements / divide;
  for (int i = 0; i < n; ++i) {
    if (ht.Delete(rand() % n)) {
      --cnt;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movb 0x8641(%rip), %al       # 0xad8c
testb $0x1, %al
jne 0x2756
callq 0x21c0
jmp 0x2745
movl 0x8208(%rip), %eax      # 0xa964
cltd
idivl %ebx
movl %eax, %ebx
xorl %ebp, %ebp
testl %eax, %eax
cmovgl %eax, %ebp
leaq 0x81f9(%rip), %r14      # 0xa968
leaq 0x4(%rsp), %r15
subl $0x1, %ebp
jb 0x279d
callq 0x2040
cltd
idivl %ebx
movl %edx, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x34d2
testb %al, %al
je 0x2774
lock
decl 0x85ed(%rip)            # 0xad88
jmp 0x2774
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::~Reclaimer()
Reclaimer::~Reclaimer() {
  // The Reclaimer destruct when the thread exit

  // 1.Hand over the hazard pointer
  for (int i = 0; i < hp_list_.size(); ++i) {
    // If assert fired, you should make sure no pointer is marked as hazard
    // before thread exit
    assert(nullptr == hp_list_[i]->ptr.load(std::memory_order_relaxed));
    hp_list_[i]->flag.clear();
  }

  // 2.Make sure reclaim all no hazard pointers
  for (auto it = reclaim_map_.begin(); it != reclaim_map_.end();) {
    // Wait until pointer is no hazard
    while (Hazard(it->first)) {
      std::this_thread::yield();
    }

    ReclaimNode* node = it->second;
    node->delete_func(node->ptr);
    delete node;
    it = reclaim_map_.erase(it);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x6a9f(%rip), %rax      # 0x9c10
movq %rax, (%rdi)
leaq 0x8(%rdi), %rsi
xorl %eax, %eax
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x31a8
movq (%rcx,%rax,8), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
jne 0x3236
xorl %edx, %edx
xchgb %dl, (%rcx)
incq %rax
jmp 0x317a
movq %rsi, (%rsp)
leaq 0x20(%r14), %r15
movq 0x30(%r14), %r13
pushq $0x30
popq %r12
testq %r13, %r13
je 0x320b
movq 0x8(%r13), %rsi
movq %r14, %rdi
callq 0x243c
testb %al, %al
je 0x31d4
callq 0x21c0
jmp 0x31bd
movq 0x10(%r13), %rbp
leaq 0x10(%rbp), %rbx
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x3268
movq %rbx, %rdi
callq 0x36a4
movq %rbp, %rdi
movq %r12, %rsi
callq 0x2160
movq %r15, %rdi
movq %r13, %rsi
callq 0x38ec
movq %rax, %r13
jmp 0x31b8
addq $0x58, %r14
movq %r14, %rdi
callq 0x3282
movq %r15, %rdi
callq 0x36c0
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38b8
leaq 0x2e03(%rip), %rdi      # 0x6040
leaq 0x2e38(%rip), %rsi      # 0x607c
leaq 0x2e4d(%rip), %rcx      # 0x6098
movl $0x9b, %edx
callq 0x20c0
movq %rax, %rdi
callq 0x325d
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::ReclaimPool::~ReclaimPool()
~ReclaimPool() {
      ReclaimNode* temp;
      while (head) {
        temp = head;
        head = head->next;
        delete temp;
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x30
popq %r14
movq (%rbx), %r15
testq %r15, %r15
je 0x32b3
movq 0x8(%r15), %rax
movq %rax, (%rbx)
leaq 0x10(%r15), %rdi
callq 0x36a4
movq %r15, %rdi
movq %r14, %rsi
callq 0x2160
jmp 0x328e
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::LockFreeHashTable()
LockFreeHashTable() : power_of_2_(1), size_(0), hash_func_(Hash()) {
    // Initialize first bucket
    int level = 1;
    Segment* segments = segments_;  // Point to current segment.
    while (level++ <= kMaxLevel - 2) {
      Segment* sub_segments = NewSegments(level);
      segments[0].data.store(sub_segments, std::memory_order_release);
      segments = sub_segments;
    }

    Bucket* buckets = NewBuckets();
    segments[0].data.store(buckets, std::memory_order_release);

    DummyNode* head = new DummyNode(0);
    buckets[0].store(head, std::memory_order_release);
    head_ = head;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x1, (%rdi)
andq $0x0, 0x8(%rdi)
pushq $0x20
popq %rax
movl $0x1, -0x8(%rbx,%rax)
andq $0x0, (%rbx,%rax)
addq $0x10, %rax
cmpq $0x420, %rax            # imm = 0x420
jne 0x32f1
leaq 0x18(%rbx), %r15
pushq $0x2
popq %rbp
cmpl $0x4, %ebp
je 0x332b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f40
movq %rax, 0x8(%r15)
incl %ebp
movq %rax, %r15
jmp 0x3311
movq %rbx, %rdi
callq 0x3f98
movq %rax, %r14
movq %rax, 0x8(%r15)
pushq $0x20
popq %rdi
callq 0x2150
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x3fba
movq %r15, (%r14)
movq %r15, 0x418(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x2160
jmp 0x337b
jmp 0x3378
jmp 0x3378
movq %rax, %r14
movl $0x408, %r15d           # imm = 0x408
leaq (%rbx,%r15), %rdi
callq 0x3ec6
addq $-0x10, %r15
cmpq $0x8, %r15
jne 0x3381
movq %r14, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::~LockFreeHashTable()
~LockFreeHashTable() {
    Node* p = head_;
    while (p != nullptr) {
      Node* tmp = p;
      p = p->next.load(std::memory_order_acquire);
      tmp->Release();
    }
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x418(%rdi), %rdi
testq %rdi, %rdi
je 0x33bd
movq 0x18(%rdi), %r14
movq (%rdi), %rax
callq *(%rax)
movq %r14, %rdi
jmp 0x33aa
movl $0x408, %r14d           # imm = 0x408
leaq (%rbx,%r14), %rdi
callq 0x3ec6
addq $-0x10, %r14
cmpq $0x8, %r14
jne 0x33c3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x325d
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::Find(int const&, int&)
bool Find(const K& key, V& value) {
    HashKey hash = hash_func_(key);
    DummyNode* head = GetBucketHeadByHash(hash);
    RegularNode find_node(key, hash_func_);
    return FindNode(head, &find_node, value);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rdi), %r12
movslq (%rsi), %rsi
callq 0x40fe
movq %rax, %r13
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4fde
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x5010
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x4300
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::Delete(int const&)
bool Delete(const K& key) {
    HashKey hash = hash_func_(key);
    DummyNode* head = GetBucketHeadByHash(hash);
    RegularNode delete_node(key, hash_func_);
    return DeleteNode(head, &delete_node);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %r15
movslq (%rsi), %rsi
callq 0x40fe
movq %rax, %r12
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4fde
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x50bc
movl %eax, %ebx
movq %rsp, %rdi
callq 0x4300
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::NewSegments(int)
Segment* NewSegments(int level) {
    Segment* segments = new Segment[kSegmentSize];
    for (int i = 0; i < kSegmentSize; ++i) {
      segments[i].level = level;
      segments[i].data.store(nullptr, std::memory_order_release);
    }
    return segments;
  }

// Assembly:
pushq %rbx
movl %esi, %ebx
movl $0x408, %edi            # imm = 0x408
callq 0x2030
movq %rax, %rcx
movq $0x40, (%rax)
xorl %edx, %edx
movl $0x1, 0x8(%rcx,%rdx)
andq $0x0, 0x10(%rcx,%rdx)
addq $0x10, %rdx
cmpq $0x400, %rdx            # imm = 0x400
jne 0x3f59
addq $0x8, %rax
xorl %edx, %edx
cmpq $0x400, %rdx            # imm = 0x400
je 0x3f96
movl %ebx, 0x8(%rcx,%rdx)
movq $0x0, 0x10(%rcx,%rdx)
addq $0x10, %rdx
jmp 0x3f7a
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::NewBuckets()
Bucket* NewBuckets() {
    Bucket* buckets = new Bucket[kSegmentSize];
    for (int i = 0; i < kSegmentSize; ++i) {
      buckets[i].store(nullptr, std::memory_order_release);
    }
    return buckets;
  }

// Assembly:
pushq %rax
movl $0x200, %edi            # imm = 0x200
callq 0x2030
xorl %ecx, %ecx
cmpq $0x40, %rcx
je 0x3fb8
movq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0x3fa5
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::GetBucketHeadByHash(unsigned long)
DummyNode* GetBucketHeadByHash(HashKey hash) {
    BucketIndex bucket_index = (hash & (bucket_size() - 1));
    DummyNode* head = GetBucketHeadByIndex(bucket_index);
    if (nullptr == head) {
      head = InitializeBucket(bucket_index);
    }
    return head;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rcx
pushq $0x1
popq %rax
shll %cl, %eax
movq %rsi, %r14
cltq
decq %rax
andq %rax, %r14
movq %r14, %rsi
callq 0x4336
testq %rax, %rax
je 0x412d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43c6
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::GetBucketHeadByIndex(unsigned long)
typename LockFreeHashTable<K, V, Hash>::DummyNode*
LockFreeHashTable<K, V, Hash>::GetBucketHeadByIndex(BucketIndex bucket_index) {
  int level = 1;
  const Segment* segments = segments_;
  while (level++ <= kMaxLevel - 2) {
    segments =
        segments[(bucket_index / static_cast<SegmentIndex>(pow(
                                     kSegmentSize, kMaxLevel - level + 1))) %
                 kSegmentSize]
            .get_sub_segments();
    if (nullptr == segments) return nullptr;
  }

  Bucket* buckets =
      segments[(bucket_index / kSegmentSize) % kSegmentSize].get_sub_buckets();
  if (nullptr == buckets) return nullptr;

  Bucket& bucket = buckets[bucket_index % kSegmentSize];
  return bucket.load(std::memory_order_consume);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x18, %r14
pushq $0x12
popq %rax
xorl %r15d, %r15d
movl %eax, %ebp
addl $-0x6, %ebp
je 0x4398
cvtsi2sd %eax, %xmm0
callq 0x2100
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x1ca3(%rip), %xmm0     # 0x6010
cvttsd2si %xmm0, %rsi
sarq $0x3f, %rcx
andq %rcx, %rsi
orq %rax, %rsi
movq %rbx, %rax
xorl %edx, %edx
divq %rsi
andl $0x3f, %eax
shll $0x4, %eax
movq 0x8(%r14,%rax), %r14
movl %ebp, %eax
testq %r14, %r14
jne 0x434f
jmp 0x43b8
movl %ebx, %eax
shrl $0x2, %eax
andl $0x3f0, %eax            # imm = 0x3F0
movq 0x8(%r14,%rax), %rax
testq %rax, %rax
je 0x43b5
andl $0x3f, %ebx
movq (%rax,%rbx,8), %r15
jmp 0x43b8
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./lockfree_hashtable.h
// Function: LockFreeHashTable<int, int, std::hash<int>>::InsertDummyNode(LockFreeHashTable<int, int, std::hash<int>>::DummyNode*, LockFreeHashTable<int, int, std::hash<int>>::DummyNode*, LockFreeHashTable<int, int, std::hash<int>>::DummyNode**)
bool LockFreeHashTable<K, V, Hash>::InsertDummyNode(DummyNode* parent_head,
                                                    DummyNode* new_head,
                                                    DummyNode** real_head) {
  Node* prev;
  Node* cur;
  HazardPointer prev_hp, cur_hp;
  do {
    if (SearchNode(parent_head, new_head, &prev, &cur, prev_hp, cur_hp)) {
      // The head of bucket already insert into list.
      *real_head = static_cast<DummyNode*>(cur);
      return false;
    }
    new_head->next.store(cur, std::memory_order_release);
  } while (!prev->next.compare_exchange_weak(
      cur, new_head, std::memory_order_release, std::memory_order_relaxed));
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x20(%rsp), %rax
andq $0x0, (%rax)
movq %rcx, 0x18(%rsp)
orl $-0x1, 0x8(%rax)
leaq 0x38(%rsp), %rbp
andq $0x0, (%rbp)
movq %rdx, %r15
orl $-0x1, 0x8(%rbp)
movq %rsi, %r12
movq %rdi, %r13
leaq 0x10(%rsp), %r14
movq %rbp, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
leaq 0x30(%rsp), %rcx
movq %r14, %r8
leaq 0x20(%rsp), %r9
callq 0x4706
movl %eax, %ebx
movq 0x10(%rsp), %rax
testb %bl, %bl
jne 0x46b6
movq %rax, 0x18(%r15)
movq 0x30(%rsp), %rcx
lock
cmpxchgq %r15, 0x18(%rcx)
je 0x46be
movq %rax, 0x10(%rsp)
jmp 0x4674
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
xorb $0x1, %bl
leaq 0x38(%rsp), %rdi
callq 0x48f2
leaq 0x20(%rsp), %rdi
callq 0x48f2
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x48f2
leaq 0x20(%rsp), %rdi
callq 0x48f2
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::ReclaimLater(void*, std::function<void (void*)>&&)
void ReclaimLater(void* const ptr, std::function<void(void*)>&& func) {
    ReclaimNode* new_node = reclaim_pool_.Pop();
    new_node->ptr = ptr;
    new_node->delete_func = std::move(func);
    reclaim_map_.insert(std::make_pair(ptr, new_node));
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x58, %rdi
callq 0x4b78
movq %rax, %r12
movq %r14, (%rax)
leaq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x4ba6
addq $0x20, %r15
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq %r12, 0x8(%rsi)
movq %r15, %rdi
callq 0x4c08
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/bhhbazinga[P]LockFreeHashTable/./HazardPointer/reclaimer.h
// Function: Reclaimer::ReclaimPool::Pop()
ReclaimNode* Pop() {
      if (nullptr == head->next) {
        return new ReclaimNode();
      }

      ReclaimNode* temp = head;
      head = head->next;
      temp->next = nullptr;
      return temp;
    }

// Assembly:
movq (%rdi), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x4b8d
movq %rcx, (%rdi)
andq $0x0, 0x8(%rax)
retq
pushq %rax
pushq $0x30
popq %rdi
callq 0x2150
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
popq %rcx
retq