LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: nmmmnu[P]HM3/hm3/main/db_mkbtree.cc
// Function: printUsage(char const*)
static void printUsage(const char *name){
	printf("Usage:\n");
	printf("%s [file.db] [btree_file]\n", name);
	printf("\t\tPath names must be written without extention\n");
	printf("\t\tExample 'file.db'\n");
	printf("\t\tDo not forget that usually btree_file must have same name as [file.db]\n");
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
leaq 0x6938(%rip), %rdi      # 0x9004
movb $0x0, %al
callq 0x2030
movq (%rsp), %rsi
leaq 0x692e(%rip), %rdi      # 0x900c
movb $0x0, %al
callq 0x2030
leaq 0x693b(%rip), %rdi      # 0x9027
movb $0x0, %al
callq 0x2030
leaq 0x695d(%rip), %rdi      # 0x9057
movb $0x0, %al
callq 0x2030
leaq 0x6964(%rip), %rdi      # 0x906c
movb $0x0, %al
callq 0x2030
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: nmmmnu[P]HM3/hm3/btreeindex/btreeindexbuilder_impl.h
// Function: hm3::btreeindex::BTreeIndexBuilder<hm3::DiskTable>::createFromList(StringRef const&, hm3::DiskTable const&)
bool BTreeIndexBuilder<LIST>::createFromList(const StringRef &filename, const LIST &list){
	auto const count = list.getCount();

	levels_ = calcDepth1__(count);

	printf("Records          : %zu\n",		size_t{ count }	);
	printf("Branching Factor : %u (const)\n",	BRANCHES	);
	printf("Tree Depth       : %u\n",		levels_		);

	file_indx_.open(filenameIndx(filename),	std::ios::out | std::ios::binary);
	file_data_.open(filenameData(filename),	std::ios::out | std::ios::binary);

	current_ = 0;

	for(level_type level = 0; level < levels_; ++level){
		printf("Processing level %u...\n", level);

		reorder(list, 0, count, level);
	}

	file_indx_.close();
	file_data_.close();

	return true;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rdi
callq 0x2e10
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0x2e20
movb %al, %cl
movq 0x20(%rsp), %rax
movzbl %cl, %ecx
movw %cx, 0x408(%rax)
movq 0x88(%rsp), %rsi
leaq 0x6653(%rip), %rdi      # 0x90b6
xorl %eax, %eax
movb %al, 0x2f(%rsp)
callq 0x2030
movb 0x2f(%rsp), %al
leaq 0x6655(%rip), %rdi      # 0x90ce
movl $0x80, %esi
callq 0x2030
movq 0x20(%rsp), %rcx
movb 0x2f(%rsp), %al
movzwl 0x408(%rcx), %esi
leaq 0x6653(%rip), %rdi      # 0x90ed
callq 0x2030
movq 0x98(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0x2e70
movl $0x10, %edi
movl $0x4, %esi
callq 0x2ef0
movl %eax, 0x30(%rsp)
jmp 0x2ac6
movl 0x30(%rsp), %edx
movq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x20e0
jmp 0x2adb
leaq 0x68(%rsp), %rdi
callq 0x2120
movq 0x18(%rsp), %rax
addq $0x200, %rax            # imm = 0x200
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x2f10
movl $0x10, %edi
movl $0x4, %esi
callq 0x2ef0
movl %eax, 0x14(%rsp)
jmp 0x2b1c
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x20e0
jmp 0x2b31
leaq 0x38(%rsp), %rdi
callq 0x2120
movq 0x18(%rsp), %rax
movq $0x0, 0x400(%rax)
movb $0x0, 0x37(%rsp)
movq 0x18(%rsp), %rcx
movzbl 0x37(%rsp), %eax
movzwl 0x408(%rcx), %ecx
cmpl %ecx, %eax
jge 0x2bdf
movzbl 0x37(%rsp), %esi
leaq 0x6593(%rip), %rdi      # 0x9104
movb $0x0, %al
callq 0x2030
movq 0x18(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
xorl %r9d, %r9d
movzbl 0x37(%rsp), %r8d
callq 0x2f90
movb 0x37(%rsp), %al
addb $0x1, %al
movb %al, 0x37(%rsp)
jmp 0x2b50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x2120
jmp 0x2c06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x2120
jmp 0x2c06
movq 0x18(%rsp), %rdi
callq 0x2270
movq 0x18(%rsp), %rdi
addq $0x200, %rdi            # imm = 0x200
callq 0x2270
movb $0x1, %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x2300
// File: nmmmnu[P]HM3/hm3/btreeindex/btreeindexbuilder_impl.h
// Function: hm3::btreeindex::BTreeIndexBuilder<hm3::DiskTable>::calcDepth__(unsigned long)
auto BTreeIndexBuilder<LIST>::calcDepth__(size_type count) -> level_type{
	// Biliana
	// log 54 (123) = ln (123) / ln (54)
	// but this is true for B+Tree only...

	level_type result = 0;

	while(count > 0){
		++result; // tree is always 1 level.

		if (count > VALUES){
			// We substract VALUES,
			// because BTree have data in non-leaf nodes.
			count = (count - VALUES) / BRANCHES;
		}else{
			break;
		}
	}

	return result;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movb $0x0, -0x9(%rsp)
cmpq $0x0, -0x8(%rsp)
jbe 0x340c
movb -0x9(%rsp), %al
addb $0x1, %al
movb %al, -0x9(%rsp)
cmpq $0x7f, -0x8(%rsp)
jbe 0x3408
movq -0x8(%rsp), %rax
subq $0x7f, %rax
shrq $0x7, %rax
movq %rax, -0x8(%rsp)
jmp 0x340a
jmp 0x340c
jmp 0x33da
movb -0x9(%rsp), %al
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: nmmmnu[P]HM3/hm3/btreeindex/btreeindexbuilder_impl.h
// Function: hm3::btreeindex::BTreeIndexBuilder<hm3::DiskTable>::injectEmptyNode_(unsigned char, unsigned char)
void BTreeIndexBuilder<LIST>::injectEmptyNode_(level_type const level, level_type const this_level){
	if (this_level == level){
		// add empty node

		Node node;

		// fill gets refference to NIL
		auto const nil = Node::NIL;
		std::fill_n(node.values, VALUES, nil);

		// push the node
		file_indx_.write( (const char *) & node, sizeof node );
	}else if (this_level < level){
		// add children
		for(branch_type i = 0; i < BRANCHES; ++i)
			injectEmptyNode_( level, level_type(this_level + 1) );
	}
}

// Assembly:
subq $0x428, %rsp            # imm = 0x428
movb %dl, %al
movb %sil, %cl
movq %rdi, 0x420(%rsp)
movb %cl, 0x41f(%rsp)
movb %al, 0x41e(%rsp)
movq 0x420(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl 0x41e(%rsp), %eax
movzbl 0x41f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x3696
movq $-0x1, 0x18(%rsp)
leaq 0x26(%rsp), %rdi
movl $0x7f, %esi
leaq 0x18(%rsp), %rdx
callq 0x3850
movq 0x8(%rsp), %rdi
leaq 0x26(%rsp), %rsi
movl $0x3f8, %edx            # imm = 0x3F8
callq 0x2240
jmp 0x36f3
movzbl 0x41e(%rsp), %eax
movzbl 0x41f(%rsp), %ecx
cmpl %ecx, %eax
jge 0x36f1
movw $0x0, 0x16(%rsp)
movzwl 0x16(%rsp), %eax
cmpl $0x80, %eax
jge 0x36ef
movq 0x8(%rsp), %rdi
movb 0x41f(%rsp), %cl
movzbl 0x41e(%rsp), %eax
addl $0x1, %eax
movzbl %cl, %esi
movzbl %al, %edx
callq 0x3620
movw 0x16(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x16(%rsp)
jmp 0x36b1
jmp 0x36f1
jmp 0x36f3
addq $0x428, %rsp            # imm = 0x428
retq
nopl (%rax,%rax)
// File: nmmmnu[P]HM3/hm3/btreeindex/btreeindexbuilder_impl.h
// Function: hm3::btreeindex::BTreeIndexBuilder<hm3::DiskTable>::injectValue_(hm3::DiskTable const&, unsigned long)
void BTreeIndexBuilder<LIST>::injectValue_(const LIST &list, size_type const index){
	// we need to have the pair,
	// because key "live" inside it.
	const auto &p = list.getAt(index);
	const StringRef &key = p.getKey();

	{
		NodeData nd;
		nd.keysize = htobe16(key.size());
		nd.dataid  = htobe64(index);

		// push NodeData
		file_data_.write( (const char *) &nd, sizeof nd );

		// push the key
		file_data_.write( key.data(), (std::streamsize) key.size() );
	}

	current_ += sizeof(uint16_t) + sizeof(uint64_t) + key.size();
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x60(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x39c0
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x3c20
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x35f0
movzwl %ax, %edi
callq 0x27d0
movw %ax, 0x2a(%rsp)
jmp 0x3780
movw 0x2a(%rsp), %ax
movw %ax, 0x3e(%rsp)
movq 0x70(%rsp), %rdi
callq 0x2720
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
addq $0x200, %rdi            # imm = 0x200
leaq 0x3e(%rsp), %rsi
movl $0xa, %edx
callq 0x2240
jmp 0x37b6
movq 0x18(%rsp), %rax
addq $0x200, %rax            # imm = 0x200
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x3600
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
callq 0x35f0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x2240
jmp 0x37f3
movq 0x58(%rsp), %rdi
callq 0x35f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
addq $0xa, %rcx
addq 0x400(%rax), %rcx
movq %rcx, 0x400(%rax)
leaq 0x60(%rsp), %rdi
callq 0x3a40
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x3a40
movq 0x30(%rsp), %rdi
callq 0x2300
nopl (%rax,%rax)
// File: olegk0[P]readAVI/player.cpp
// Function: ReadBuf(png_struct_def*, unsigned char*, unsigned long)
void ReadBuf(
    png_structp png_ptr, png_byte* raw_data, png_size_t read_length) {

    read_buf_str_t* read_buf_str = (read_buf_str_t*)png_get_io_ptr(png_ptr);
    const png_byte* src = read_buf_str->buf + read_buf_str->pos;
    memcpy(raw_data, src, read_length);
    read_buf_str->pos += read_length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2210
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movl 0xc(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21d0
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movl 0xc(%rax), %ecx
addq %rdx, %rcx
movl %ecx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::free()
void ReadAVI::free()
{
    if (inFile.is_open()) {
	inFile.close();
    }

    delete[] stream_format_vid.palette;
    delete[] data_buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x20, %rdi
callq 0x23b0
testb $0x1, %al
jne 0x3823
jmp 0x3830
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x20a0
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x384e
movq -0x18(%rbp), %rdi
callq 0x22d0
movq -0x10(%rbp), %rax
movq 0x338(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x386c
movq -0x20(%rbp), %rdi
callq 0x22d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::check_data_buf(unsigned int)
void ReadAVI::check_data_buf(unsigned size)
{
    if (data_buf_size < size) {
	delete[] data_buf;
	data_buf = new unsigned char[size + 1];
	data_buf_size = size;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0x340(%rax), %eax
cmpl -0xc(%rbp), %eax
jae 0x3966
movq -0x18(%rbp), %rax
movq 0x338(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3940
movq -0x20(%rbp), %rdi
callq 0x22d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x2040
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x338(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x340(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::hex_dump_chunk(int)
int ReadAVI::hex_dump_chunk(int chunk_len)
{
    char chars[17];
    unsigned char c;
    int ch, n;

    chars[16] = 0;

    for (n = 0; n < chunk_len; n++) {
	if ((n % 16) == 0) {
	    if (n != 0)
		MSG_DBG(2, "%s\n", chars);
	    MSG_DBG(2, "      ");
	    memset(chars, ' ', 16);
	}
	read_chars_bin(&c, 1);
	ch = c;
	if (ch == EOF)
	    break;
	MSG_DBG(2, "%02x ", ch);
	if (ch >= ' ' && ch <= 126) {
	    chars[n % 16] = ch;
	} else {
	    chars[n % 16] = '.';
	}
    }

    if ((n % 16) != 0) {
	for (ch = n % 16; ch < 16; ch++) {
	    MSG_DBG(2, "   ");
	}
    }
    MSG_DBG(2, "%s\n", chars);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x10(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3caf
movl -0x2c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x3c2b
cmpl $0x0, -0x2c(%rbp)
je 0x3c00
movq 0x53c5(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq -0x20(%rbp), %rdx
leaq 0x2875(%rip), %rsi      # 0x646e
movb $0x0, %al
callq 0x2360
movq 0x53a9(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x2566(%rip), %rsi      # 0x6177
movb $0x0, %al
callq 0x2360
leaq -0x20(%rbp), %rdi
movl $0x20, %esi
movl $0x10, %edx
callq 0x2150
movq -0x38(%rbp), %rdi
leaq -0x21(%rbp), %rsi
movl $0x1, %edx
callq 0x3b70
movzbl -0x21(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x3c4c
jmp 0x3caf
movq 0x535d(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movl -0x28(%rbp), %edx
leaq 0x251e(%rip), %rsi      # 0x617e
movb $0x0, %al
callq 0x2360
cmpl $0x20, -0x28(%rbp)
jl 0x3c8c
cmpl $0x7e, -0x28(%rbp)
jg 0x3c8c
movl -0x28(%rbp), %eax
movb %al, %cl
movl -0x2c(%rbp), %eax
movl $0x10, %esi
cltd
idivl %esi
movslq %edx, %rax
movb %cl, -0x20(%rbp,%rax)
jmp 0x3c9f
movl -0x2c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movslq %edx, %rax
movb $0x2e, -0x20(%rbp,%rax)
jmp 0x3ca1
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3bc2
movl -0x2c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x3cf8
movl -0x2c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, -0x28(%rbp)
cmpl $0x10, -0x28(%rbp)
jge 0x3cf6
movq 0x52d6(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x2496(%rip), %rsi      # 0x617a
movb $0x0, %al
callq 0x2360
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3ccd
jmp 0x3cf8
movq 0x52b1(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq -0x20(%rbp), %rdx
leaq 0x2761(%rip), %rsi      # 0x646e
movb $0x0, %al
callq 0x2360
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::decodeCkid(char*, ReadAVI::chunk_type_t*)
int ReadAVI::decodeCkid(char *ckid, chunk_type_t *chunk_type)
{
    int stream = (ckid[0] - '0') * 10 + (ckid[1] - '0');
    for (int i = 0; i < ChunkTypesCnt; i++) {
	if (chunk_types[i].type_id[0] == ckid[2] && chunk_types[i].type_id[1] == ckid[3]) {
	    *chunk_type = chunk_types[i].type;
	    return stream;
	}
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
imull $0xa, %eax, %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x3dbb
movslq -0x28(%rbp), %rcx
leaq 0x54cb(%rip), %rax      # 0x9230
movsbl (%rax,%rcx,8), %eax
movq -0x18(%rbp), %rcx
movsbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jne 0x3dae
movslq -0x28(%rbp), %rcx
leaq 0x54b0(%rip), %rax      # 0x9230
movsbl 0x1(%rax,%rcx,8), %eax
movq -0x18(%rbp), %rcx
movsbl 0x3(%rcx), %ecx
cmpl %ecx, %eax
jne 0x3dae
movslq -0x28(%rbp), %rcx
leaq 0x5494(%rip), %rax      # 0x9230
movl 0x4(%rax,%rcx,8), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dc2
jmp 0x3db0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3d54
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::parse_idx1(int)
int ReadAVI::parse_idx1(int chunk_len)
{
    index_entry_t index_entry;
    index_entry.type = ctype_none;
    int t;

    MSG_DBG(2, "      IDX1\n");
    MSG_DBG(2, "      -------------------------------\n");
    MSG_DBG(2, "      stream  type   dwFlags         dwChunkOffset        dwChunkLength\n");

    for (t = 0; t < chunk_len / 16; t++) {
	char buf[5];
	read_chars(buf, 4);
	index_entry.stream_num = decodeCkid(buf, &index_entry.type);
	index_entry.dwFlags = read_int();
	index_entry.dwChunkOffset = read_int() + movi_offset + 0x10;
	index_entry.dwChunkLength = read_int();

	MSG_DBG(2, "         %d     %d     0x%08x      0x%08x           0x%08x\n", index_entry.stream_num, index_entry.type,
		index_entry.dwFlags, index_entry.dwChunkOffset, index_entry.dwChunkLength);
	index_entries.push_back(index_entry);
    }

    MSG_DBG(2, "\n");

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x20(%rbp)
movq 0x51bb(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x2385(%rip), %rsi      # 0x6184
movb $0x0, %al
callq 0x2360
movq 0x51a3(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x2379(%rip), %rsi      # 0x6190
movb $0x0, %al
callq 0x2360
movq 0x518b(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x2388(%rip), %rsi      # 0x61b7
movb $0x0, %al
callq 0x2360
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0xc(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
cmpl %ecx, %eax
jge 0x3efd
movq -0x38(%rbp), %rdi
leaq -0x29(%rbp), %rsi
movl $0x4, %edx
callq 0x3f20
movq -0x38(%rbp), %rdi
leaq -0x29(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3d20
movq -0x38(%rbp), %rdi
movl %eax, -0x1c(%rbp)
callq 0x3f60
movq -0x38(%rbp), %rdi
movl %eax, -0x18(%rbp)
callq 0x3f60
movq -0x38(%rbp), %rdi
cltq
addq 0x330(%rdi), %rax
addq $0x10, %rax
movl %eax, -0x14(%rbp)
callq 0x3f60
movl %eax, -0x10(%rbp)
movq 0x50f7(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movl -0x18(%rbp), %r8d
movl -0x14(%rbp), %r9d
movl -0x10(%rbp), %eax
leaq 0x232c(%rip), %rsi      # 0x6200
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2360
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
leaq -0x20(%rbp), %rsi
callq 0x5460
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3e3d
movq 0x50ac(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x2a70(%rip), %rsi      # 0x697e
movb $0x0, %al
callq 0x2360
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::read_int()
int ReadAVI::read_int()
{
    int c;
    unsigned char buf[4];

    inFile.read((char *) buf, 4);
    c = buf[0];
    c = c + (buf[1] << 8);
    c = c + (buf[2] << 16);
    c = c + (buf[3] << 24);

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
leaq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x22c0
movzbl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movzbl -0xf(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movzbl -0xe(%rbp), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movzbl -0xd(%rbp), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: print_data_handler(unsigned char*)
static void print_data_handler(unsigned char *handler)
{
    int t;

    for (t = 0; t < 4; t++) {
	if ((handler[t] >= 'a' && handler[t] <= 'z') || (handler[t] >= 'A' && handler[t] <= 'Z')
		|| (handler[t] >= '0' && handler[t] <= '9'))
	{
	    MSG_DBG(2, "%c", handler[t]);
	} else {
	    MSG_DBG(2, "[0x%02x]", handler[t]);
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4, -0xc(%rbp)
jge 0x467d
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x61, %eax
jl 0x45df
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7a, %eax
jle 0x4623
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x41, %eax
jl 0x4601
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x5a, %eax
jle 0x4623
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x4649
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jg 0x4649
movq 0x4986(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x2340(%rip), %rsi      # 0x6980
movb $0x0, %al
callq 0x2360
jmp 0x466d
movq 0x4960(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x231d(%rip), %rsi      # 0x6983
movb $0x0, %al
callq 0x2360
jmp 0x466f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x45b3
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::read_word()
int ReadAVI::read_word()
{
    int c;
    unsigned char buf[2];

    inFile.read((char *) buf, 2);
    c = buf[0];
    c = c + (buf[1] << 8);

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
leaq -0xe(%rbp), %rsi
movl $0x2, %edx
callq 0x22c0
movzbl -0xe(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movzbl -0xd(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::parse_movi(int)
int ReadAVI::parse_movi(int size)
{
    char chunk_id[5];
    long end_of_chunk;
    index_entry_t index_entry;
    int blk_size;

    do {
	long offset = inFile.tellg();
	/*
	 if (fileSize - offset < 8)
	 break;
	 */
	read_chars(chunk_id, 4);
	index_entry.stream_num = decodeCkid(chunk_id, &index_entry.type);

	if (index_entry.stream_num < 0) {
	    inFile.seekg(offset - 4, ios_base::beg);
	    break;
	}

	index_entry.dwChunkLength = read_int();

	if (!(avi_header.Flags & AVIF_HASINDEX)) {
	    index_entry.dwChunkOffset = offset + 8;
	    index_entries.push_back(index_entry);
	}

	MSG_DBG(3, "      AVI Movi Chunk ( id=%s(%d-%d) chunk_size=%d offset=0x%lx)\n", chunk_id, index_entry.type,
		index_entry.stream_num, index_entry.dwChunkLength, offset);
	MSG_DBG(3, "      {\n");

	end_of_chunk = index_entry.dwChunkLength + inFile.tellg();
	end_of_chunk = (end_of_chunk + 1) & ~1;
	/*    if ((end_of_chunk % 4) != 0) {
	 end_of_chunk = end_of_chunk + (4 - (end_of_chunk % 4));
	 }
	 */
//    MSG_DBG(2, "end_of_chunk:%d  %X\n", end_of_chunk, end_of_chunk);
	inFile.seekg(end_of_chunk, ios_base::beg);
	MSG_DBG(3, "      }\n");

	blk_size = end_of_chunk - offset;
	size -= blk_size;
	MSG_DBG(3, "size:%d \n", size);

    } while (size > 7);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
addq $0x20, %rdi
callq 0x23f0
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5350
movq -0x68(%rbp), %rdi
movq %rax, -0x40(%rbp)
leaq -0x11(%rbp), %rsi
movl $0x4, %edx
callq 0x3f20
movq -0x68(%rbp), %rdi
leaq -0x11(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x3d20
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x50d1
movq -0x68(%rbp), %rdi
addq $0x20, %rdi
movq -0x40(%rbp), %rsi
subq $0x4, %rsi
xorl %edx, %edx
callq 0x2300
jmp 0x5184
movq -0x68(%rbp), %rdi
callq 0x3f60
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, -0x24(%rbp)
movl 0x234(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x510d
movq -0x68(%rbp), %rdi
movq -0x40(%rbp), %rax
addq $0x8, %rax
movl %eax, -0x28(%rbp)
addq $0x8, %rdi
leaq -0x34(%rbp), %rsi
callq 0x5460
movq -0x68(%rbp), %rdi
movslq -0x24(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x20, %rdi
callq 0x23f0
movq %rax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5350
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movq -0x70(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
andq $-0x2, %rax
movq %rax, -0x20(%rbp)
addq $0x20, %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x2300
movq -0x20(%rbp), %rax
subq -0x40(%rbp), %rax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
cmpl $0x7, -0xc(%rbp)
jg 0x5067
xorl %eax, %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::parse_hdrl(unsigned int)
int ReadAVI::parse_hdrl(unsigned int size)
{
    char chunk_id[5];
    int chunk_size;
    int end_of_chunk;
    long offset = inFile.tellg();

    read_chars(chunk_id, 4);
    chunk_size = read_int();

    MSG_DBG(2, "      AVI Header Chunk (id=%s size=%d offset=0x%lx)\n", chunk_id, chunk_size, offset);
    MSG_DBG(2, "      {\n");

    end_of_chunk = chunk_size + inFile.tellg();
    if ((end_of_chunk % 4) != 0) {
	end_of_chunk = end_of_chunk + (4 - (end_of_chunk % 4));
    }

    read_avi_header();
    MSG_DBG(2, "      }\n");

    while (inFile.tellg() < offset + size - 4) {
	//MSG_DBG(2, "Should end at 0x%lx  0x%lx\n",offset+size,inFile.tellg());
	parse_hdrl_list();
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
addq $0x20, %rdi
callq 0x23f0
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5350
movq -0x68(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x11(%rbp), %rsi
movl $0x4, %edx
callq 0x3f20
movq -0x68(%rbp), %rdi
callq 0x3f60
movl %eax, -0x18(%rbp)
movq 0x3dc6(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq -0x11(%rbp), %rdx
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %r8
leaq 0x1680(%rip), %rsi      # 0x687f
movb $0x0, %al
callq 0x2360
movq 0x3da3(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x15fe(%rip), %rsi      # 0x6815
movb $0x0, %al
callq 0x2360
movq -0x68(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
addq $0x20, %rdi
callq 0x23f0
movq %rax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5350
movq %rax, %rcx
movq -0x60(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x5281
movl -0x1c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x1c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl -0x6c(%rbp), %eax
movl $0x4, %ecx
subl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x68(%rbp), %rdi
callq 0x3fc0
movq 0x3d1f(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x15db(%rip), %rsi      # 0x6876
movb $0x0, %al
callq 0x2360
movq -0x68(%rbp), %rdi
addq $0x20, %rdi
callq 0x23f0
movq %rax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5350
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %edx
addq %rdx, %rcx
subq $0x4, %rcx
cmpq %rcx, %rax
jge 0x52de
movq -0x68(%rbp), %rdi
callq 0x4be0
jmp 0x52a2
xorl %eax, %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: xuchanglong[P]SimpleReactorImplemention-comments/reactor_client_test.cc
// Function: main
int main(int argc, char **argv)
{
    if (argc < 3) {
        fprintf(stderr, "usage: %s ip port\n", argv[0]);
        return EXIT_FAILURE;
    }

    TimeClient client;
    if (!client.ConnectServer(argv[1], atoi(argv[2]))) {
        fprintf(stderr, "connect remote server failed\n");
        return EXIT_FAILURE;
    }

    g_reactor.RegisterHandler(&client, reactor::kWriteEvent);
    while (1) {
        g_reactor.HandleEvents();
        sleep(1);
    }
    g_reactor.RemoveHandler(&client);
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x8(%rbp)
jge 0x2577
movq 0x7a75(%rip), %rax      # 0x9fc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x3aae(%rip), %rsi      # 0x6012
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
jmp 0x2645
leaq -0x20(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x2660
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rdi
callq 0x2260
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movzwl %ax, %edx
callq 0x26e0
movb %al, -0x2d(%rbp)
jmp 0x25ae
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x25f8
jmp 0x25b7
movq 0x7a0a(%rip), %rax      # 0x9fc8
movq (%rax), %rdi
leaq 0x3a5d(%rip), %rsi      # 0x6025
movb $0x0, %al
callq 0x2230
movl $0x1, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x27e0
jmp 0x2645
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x27e0
jmp 0x264e
callq 0x2760
movq %rax, -0x48(%rbp)
jmp 0x2603
movq -0x48(%rbp), %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
callq 0x4f80
jmp 0x261a
jmp 0x261c
jmp 0x261e
callq 0x2760
movq %rax, -0x50(%rbp)
jmp 0x2629
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x5100
jmp 0x2637
movl $0x1, %edi
callq 0x2160
jmp 0x2643
jmp 0x261c
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2290
nopw (%rax,%rax)
// File: xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeclient.hpp
// Function: TimeClient::ConnectServer(char const*, unsigned short)
bool ConnectServer(const char *ip, unsigned short port)
    {
        struct sockaddr_in addr;
        addr.sin_family = AF_INET;
        addr.sin_port = htons(port);
        addr.sin_addr.s_addr = inet_addr(ip);
        if (connect(m_handle, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
            ReportSocketError("connect");
            return false;
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movw $0x2, -0x2c(%rbp)
movzwl -0x1a(%rbp), %edi
callq 0x2050
movw %ax, -0x2a(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21c0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, -0x28(%rbp)
movl 0x8(%rax), %edi
leaq -0x2c(%rbp), %rsi
movl $0x10, %edx
callq 0x2180
cmpl $0x0, %eax
jge 0x274c
leaq 0x3974(%rip), %rdi      # 0x60b5
callq 0x24e0
movb $0x0, -0x1(%rbp)
jmp 0x2750
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeclient.hpp
// Function: TimeClient::HandleRead()
virtual void HandleRead()
    {
        memset(g_read_buffer, 0, BUFFERSIZE);
        int len = recv(m_handle, g_read_buffer, BUFFERSIZE, 0);
        if (len > 0) {
            fprintf(stderr, "%s", g_read_buffer);
            g_reactor.RegisterHandler(this, reactor::kWriteEvent);
        } else {
            ReportSocketError("recv");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x78f5(%rip), %rdi      # 0xa1a0
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x2120
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edi
leaq 0x78db(%rip), %rsi      # 0xa1a0
movl $0x400, %edx            # imm = 0x400
xorl %ecx, %ecx
callq 0x20a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x2911
movq 0x76e7(%rip), %rax      # 0x9fc8
movq (%rax), %rdi
leaq 0x37a7(%rip), %rsi      # 0x6092
leaq 0x78ae(%rip), %rdx      # 0xa1a0
movb $0x0, %al
callq 0x2230
callq 0x2760
movq -0x18(%rbp), %rsi
movq (%rax), %rdi
movl $0x2, %edx
callq 0x4f80
jmp 0x291d
leaq 0x377d(%rip), %rdi      # 0x6095
callq 0x24e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeclient.hpp
// Function: TimeClient::HandleWrite()
virtual void HandleWrite()
    {
        memset(g_write_buffer, 0, BUFFERSIZE);
        int len = sprintf(g_write_buffer, "time\r\n");
        len = send(m_handle, g_write_buffer, len, 0);
        if (len > 0) {
            fprintf(stderr, "%s", g_write_buffer);
            g_reactor.RegisterHandler(this, reactor::kReadEvent);
        } else {
            ReportSocketError("send");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x7c55(%rip), %rdi      # 0xa5a0
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x2120
leaq 0x7c42(%rip), %rdi      # 0xa5a0
leaq 0x3735(%rip), %rsi      # 0x609a
movb $0x0, %al
callq 0x2070
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0xc(%rbp)
movl 0x8(%rax), %edi
movslq -0xc(%rbp), %rdx
leaq 0x7c1d(%rip), %rsi      # 0xa5a0
xorl %ecx, %ecx
callq 0x2100
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x29ca
movq 0x762e(%rip), %rax      # 0x9fc8
movq (%rax), %rdi
leaq 0x36ee(%rip), %rsi      # 0x6092
leaq 0x7bf5(%rip), %rdx      # 0xa5a0
movb $0x0, %al
callq 0x2230
callq 0x2760
movq -0x18(%rbp), %rsi
movq (%rax), %rdi
movl $0x1, %edx
callq 0x4f80
jmp 0x29d6
leaq 0x36d0(%rip), %rdi      # 0x60a1
callq 0x24e0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: suyash[P]chan/examples/write_chan.cc
// Function: main
int main() {
	chan::unbuffered_chan<int> c;

	std::thread t(write, std::ref(c));

	int x = 0;
	c >> x;
	printf("read: %d\n", x);

	t.join();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
leaq -0x100(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x2630
movq -0x128(%rbp), %rdi
callq 0x26a0
movq %rax, -0x110(%rbp)
leaq -0x78(%rip), %rsi       # 0x2340
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rdx
callq 0x26d0
jmp 0x23cd
movl $0x0, -0x120(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2790
jmp 0x23ec
movl -0x120(%rbp), %esi
leaq 0x1c17(%rip), %rdi      # 0x4010
xorl %eax, %eax
callq 0x2030
jmp 0x2402
leaq -0x108(%rbp), %rdi
callq 0x2140
jmp 0x2410
leaq -0x108(%rbp), %rdi
callq 0x27c0
leaq -0x100(%rbp), %rdi
callq 0x27f0
xorl %eax, %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x2465
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x27c0
leaq -0x100(%rbp), %rdi
callq 0x27f0
movq -0x118(%rbp), %rdi
callq 0x2160
nopl (%rax)
// File: nmmmnu[P]HM3/test/test_binarysearch.cc
// Function: main
int main(){
	test<char>("char");
	test<short>("short");
	test<int>("int");
	test<long>("long");

	test<unsigned short>("u short");
	test<unsigned int>("u int");
	test<unsigned long>("u long");

	test<size_t>("size_t");
}

// Assembly:
pushq %rax
leaq 0x1ebc(%rip), %rdi      # 0x3004
callq 0x11b0
leaq 0x1eb7(%rip), %rdi      # 0x300b
callq 0x11e0
leaq 0x1eb3(%rip), %rdi      # 0x3013
callq 0x1210
leaq 0x1ead(%rip), %rdi      # 0x3019
callq 0x1240
leaq 0x1e91(%rip), %rdi      # 0x3009
callq 0x1270
leaq 0x1e8d(%rip), %rdi      # 0x3011
callq 0x12a0
leaq 0x1e87(%rip), %rdi      # 0x3017
callq 0x12d0
leaq 0x1e82(%rip), %rdi      # 0x301e
callq 0x12d0
xorl %eax, %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
nop
// File: nmmmnu[P]HM3/test/test_binarysearch.cc
// Function: void test<char>(char const*, char)
void test(const char *name, const T key){
	VVector<T, MAX> v;

	size_t result;

	bool const found = binarySearch(v, v.size(), key, BinarySearchCompStdandard{}, result);

	bool const ok = found && v[result] == key;

	printf("%10s %s\n", name, ok ? "OK" : "Error");
}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x20(%rsp)
movb %al, 0x1f(%rsp)
leaq 0x1e(%rsp), %rdi
callq 0x14c0
movq %rax, %rsi
leaq 0x1e(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
leaq 0xe(%rsp), %rcx
leaq 0x10(%rsp), %r8
movl $0x5, %r9d
callq 0x1460
andb $0x1, %al
movb %al, 0xf(%rsp)
xorl %eax, %eax
testb $0x1, 0xf(%rsp)
movb %al, 0xc(%rsp)
je 0x136f
movq 0x10(%rsp), %rsi
leaq 0x1e(%rsp), %rdi
callq 0x14d0
movsbl %al, %eax
movsbl 0x1f(%rsp), %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0xc(%rsp)
movb 0xc(%rsp), %al
andb $0x1, %al
movb %al, 0xd(%rsp)
movq 0x20(%rsp), %rsi
movb 0xd(%rsp), %cl
leaq 0x1ca8(%rip), %rdx      # 0x3031
leaq 0x1c9e(%rip), %rax      # 0x302e
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x1c87(%rip), %rdi      # 0x3025
movb $0x0, %al
callq 0x1030
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: nmmmnu[P]HM3/include/comparator.h
// Function: int comparator::comp<char>(char const&, char const&)
int comp(const T &a, const T &b){
	log__("all");
	if (a < b)
		return -1;

	if (a > b)
		return +1;

	return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
movq -0x18(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x1678
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x169e
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
movq -0x18(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jle 0x1696
movl $0x1, -0x4(%rsp)
jmp 0x169e
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/allocSP.cc
// Function: use_factory(int)
shared_ptr<Foo> use_factory(T arg)
{
	shared_ptr<Foo> p = factory(arg);
	print(cout, *p);
	cout << endl;
	// use p
	return p;  // reference count is incremented when we return p
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb $0x0, -0xd(%rbp)
movl -0xc(%rbp), %esi
callq 0x1280
movq -0x28(%rbp), %rdi
callq 0x1420
movq %rax, %rsi
movq 0x3ce7(%rip), %rdi      # 0x4fd0
callq 0x1250
jmp 0x12f0
movq 0x3cd9(%rip), %rdi      # 0x4fd0
movq 0x3cba(%rip), %rsi      # 0x4fb8
callq 0x10b0
jmp 0x1305
movb $0x1, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
jne 0x1331
jmp 0x1328
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x1450
jmp 0x133b
movq -0x28(%rbp), %rdi
callq 0x1450
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x1100
nopw %cs:(%rax,%rax)
// File: liskin[P]hybrid-screenclone/screenclone.cc
// Function: usage(char const*)
void usage( const char *name )
{
	std::cerr
		<< "Usage: " << name << " <options>" << std::endl
		<< "Options:" << std::endl
		<< " -s <display name> (default :0)" << std::endl
		<< " -d <display name> (default :1)" << std::endl
		<< " -x <xinerama screen number> (default 0)" << std::endl;
	exit( 0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x76c5(%rip), %rdi      # 0xbfe8
leaq 0x3743(%rip), %rsi      # 0x806d
callq 0x3290
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x3290
movq %rax, %rdi
leaq 0x3730(%rip), %rsi      # 0x8075
callq 0x3290
movq %rax, %rdi
movq 0x7654(%rip), %rsi      # 0xbfa8
callq 0x32c0
movq %rax, %rdi
leaq 0x371d(%rip), %rsi      # 0x8080
callq 0x3290
movq %rax, %rdi
movq 0x7636(%rip), %rsi      # 0xbfa8
callq 0x32c0
movq %rax, %rdi
leaq 0x3708(%rip), %rsi      # 0x8089
callq 0x3290
movq %rax, %rdi
movq 0x7618(%rip), %rsi      # 0xbfa8
callq 0x32c0
movq %rax, %rdi
leaq 0x370a(%rip), %rsi      # 0x80a9
callq 0x3290
movq %rax, %rdi
movq 0x75fa(%rip), %rsi      # 0xbfa8
callq 0x32c0
movq %rax, %rdi
leaq 0x370c(%rip), %rsi      # 0x80c9
callq 0x3290
movq %rax, %rdi
movq 0x75dc(%rip), %rsi      # 0xbfa8
callq 0x32c0
xorl %edi, %edi
callq 0x3370
nopl (%rax,%rax)
// File: liskin[P]hybrid-screenclone/screenclone.cc
// Function: mouse_replayer::mouse_replayer(display const&, display const&, xinerama_screen const&)
mouse_replayer( const display &_src, const display &_dst, const xinerama_screen &_src_screen )
		: src( _src ), dst( _dst), src_screen( _src_screen ), dst_window( dst.root() )
		, on( false )
	{
		// create invisible cursor
		Pixmap bitmapNoData;
		XColor black;
		static char noData[] = { 0,0,0,0,0,0,0,0 };
		black.red = black.green = black.blue = 0;

		bitmapNoData = XCreateBitmapFromData( dst.dpy, dst_window.win, noData, 8, 8 );
		invisibleCursor = XCreatePixmapCursor( dst.dpy, bitmapNoData, bitmapNoData,
				&black, &black, 0, 0);

		dst_window.define_cursor( invisibleCursor );
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsi)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsi)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsi)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, 0x18(%rsi)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsi)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsi)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, 0x30(%rsi)
movq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsi)
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsi)
movq %rsi, %rdi
addq $0x48, %rdi
addq $0x18, %rsi
callq 0x3d90
movq -0x40(%rbp), %rdi
movb $0x0, 0x68(%rdi)
addq $0x70, %rdi
callq 0x6270
movq -0x40(%rbp), %rax
movw $0x0, -0x2c(%rbp)
movw $0x0, -0x2e(%rbp)
movw $0x0, -0x30(%rbp)
movq 0x18(%rax), %rdi
movq 0x50(%rax), %rsi
leaq 0x6d84(%rip), %rdx      # 0xc2da
movl $0x8, %r8d
movl %r8d, %ecx
callq 0x3340
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x38(%rbp), %r8
xorl %r9d, %r9d
movq %r8, %rcx
movl $0x0, (%rsp)
callq 0x31b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x60(%rax)
movq %rax, %rdi
addq $0x48, %rdi
movq 0x60(%rax), %rsi
callq 0x4790
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: liskin[P]hybrid-screenclone/screenclone.cc
// Function: image_replayer::copy_if_damaged()
void copy_if_damaged() {
		if ( !damaged )
			return;

		TC( XShmGetImage( src->dpy, src_window.win, src_image,
				src_screen->info.x_org, src_screen->info.y_org, AllPlanes) );
		TC( XShmPutImage( dst->dpy, dst_window.win, dst_gc, dst_image, 0, 0, 0, 0,
				dst_image->width, dst_image->height, False ) );
		TC( XFlush( dst->dpy ) );

		DBG( std::cout << "damaged" << std::endl );

		damaged = false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0xa0(%rax)
jne 0x6102
jmp 0x61ab
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq (%rcx), %rdi
movq 0x20(%rax), %rsi
movq 0x88(%rax), %rdx
movq 0x10(%rax), %rcx
movswl 0xc(%rcx), %ecx
movq 0x10(%rax), %rax
movswl 0xe(%rax), %r8d
movq $-0x1, %r9
callq 0x3030
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq (%rcx), %rdi
movq 0x38(%rax), %rsi
movq 0x98(%rax), %rdx
movq 0x90(%rax), %rcx
movq 0x90(%rax), %r8
movl (%r8), %r10d
movq 0x90(%rax), %rax
movl 0x4(%rax), %eax
xorl %r9d, %r9d
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
callq 0x3440
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x3460
movq -0x10(%rbp), %rax
movb $0x0, 0xa0(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: liskin[P]hybrid-screenclone/screenclone.cc
// Function: void record_thread<mouse_replayer>(display, mouse_replayer*)
void record_thread( display data, Fun *callback ) {
	int fd = ConnectionNumber( data.dpy );
	fd_set fds;
	FD_ZERO( &fds );

	for ( ;; ) {
		FD_SET( fd, &fds );
		select( fd + 1, &fds, NULL, NULL, NULL );
		XRecordProcessReplies( data.dpy );
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq (%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0xc(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpq $0x10, %rax
jae 0x721d
movq -0xa0(%rbp), %rax
movl -0x94(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x71eb
jmp 0x721f
jmp 0x7221
movl -0xc(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0xc(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x90(%rbp,%rax,8), %rcx
movq %rcx, -0x90(%rbp,%rax,8)
movl -0xc(%rbp), %edi
addl $0x1, %edi
leaq -0x90(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x3270
movq -0xa8(%rbp), %rax
movq (%rax), %rdi
callq 0x3350
jmp 0x7221
nopw %cs:(%rax,%rax)
// File: liskin[P]hybrid-screenclone/screenclone.cc
// Function: mouse_replayer::operator()(XRecordInterceptData*)
void operator() ( XRecordInterceptData *data ) {
		if ( data->category == XRecordFromServer ) {
			const xEvent &e = * (const xEvent *) data->data;

			if ( e.u.u.type == MotionNotify ) {
				mouse_moved( e.u.keyButtonPointer.rootX, e.u.keyButtonPointer.rootY );
			}
		}

		XRecordFreeData( data );
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x73e5
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x6, %eax
jne 0x73e3
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movswl 0x14(%rax), %esi
movq -0x18(%rbp), %rax
movswl 0x16(%rax), %edx
callq 0x7400
jmp 0x73e5
movq -0x10(%rbp), %rdi
callq 0x3090
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: liskin[P]hybrid-screenclone/screenclone.cc
// Function: mouse_replayer::mouse_moved(int, int)
void mouse_moved( int x, int y ) {
		std::lock_guard< std::recursive_mutex > guard( cursor_mutex );

		bool old_on = on;
		on = src_screen.in_screen( x, y );

		if ( on )
			dst_window.warp_pointer( x - src_screen.info.x_org, y - src_screen.info.y_org );
		else
			// wiggle the cursor a bit to keep screensaver away
			dst_window.warp_pointer( x % 50, y % 50 );

		if ( old_on != on ) {
			if ( on )
				cursor_changed();
			else
				dst_window.define_cursor( invisibleCursor );
		}

		TC( XFlush( dst.dpy ) );

		DBG( std::cout << "mouse moved" << std::endl );
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x38(%rbp)
addq $0x70, %rsi
leaq -0x18(%rbp), %rdi
callq 0x62d0
movq -0x38(%rbp), %rdi
movb 0x68(%rdi), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
addq $0x30, %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x47c0
movb %al, %cl
movq -0x38(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x68(%rax)
movb 0x68(%rax), %al
testb $0x1, %al
je 0x7495
movq -0x38(%rbp), %rax
movq %rax, %rdi
addq $0x48, %rdi
movl -0xc(%rbp), %esi
movswl 0x3c(%rax), %ecx
subl %ecx, %esi
movl -0x10(%rbp), %edx
movswl 0x3e(%rax), %eax
subl %eax, %edx
callq 0x4740
jmp 0x7479
jmp 0x74e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6340
jmp 0x754d
movq -0x38(%rbp), %rdi
addq $0x48, %rdi
movslq -0xc(%rbp), %rax
movl %eax, %esi
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x24, %rax
addl %ecx, %eax
imull $0x32, %eax, %eax
subl %eax, %esi
movslq -0x10(%rbp), %rax
movl %eax, %edx
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x24, %rax
addl %ecx, %eax
imull $0x32, %eax, %eax
subl %eax, %edx
callq 0x4740
jmp 0x74e2
jmp 0x74e4
movq -0x38(%rbp), %rcx
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x68(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x752f
movq -0x38(%rbp), %rax
movb 0x68(%rax), %al
testb $0x1, %al
je 0x7515
movq -0x38(%rbp), %rdi
callq 0x5f10
jmp 0x7513
jmp 0x752d
movq -0x38(%rbp), %rax
movq %rax, %rdi
addq $0x48, %rdi
movq 0x60(%rax), %rsi
callq 0x4790
jmp 0x752b
jmp 0x752d
jmp 0x752f
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3460
jmp 0x753e
leaq -0x18(%rbp), %rdi
callq 0x6340
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x3500
nopw %cs:(%rax,%rax)
// File: TasnimAnas[P]Attendance-Management-System/src/LoginDetails.cpp
// Function: isRightUser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool isRightUser(string Username)
{
    for (int i = 0; i < Username.size(); i++)
    {
        Username[i] = tolower(Username[i]);
    }
    string Username_ = "tasnimanas";
    if (Username == Username_)
    {
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x58(%rbp), %rdi
movslq -0x14(%rbp), %rax
movq %rax, -0x60(%rbp)
callq 0x31a0
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jae 0x39a9
movq -0x58(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x3500
movsbl (%rax), %edi
callq 0x33a0
movq -0x58(%rbp), %rdi
movb %al, -0x61(%rbp)
movslq -0x14(%rbp), %rsi
callq 0x3500
movb -0x61(%rbp), %cl
movb %cl, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3957
leaq -0x39(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3470
movq -0x70(%rbp), %rdx
leaq 0xa643(%rip), %rsi      # 0xe004
leaq -0x38(%rbp), %rdi
callq 0x3cf0
jmp 0x39cc
leaq -0x39(%rbp), %rdi
callq 0x32c0
movq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3da0
testb $0x1, %al
jne 0x39e8
jmp 0x3a0c
movb $0x1, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x3a17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x32c0
jmp 0x3a2b
movb $0x0, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3180
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3460
nopw %cs:(%rax,%rax)