LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: iZhangHui[P]CppPrimer/CH02_VariablesAndBasicTypes/examples/inits.cc
// Function: main
int main() {

	int v1(1024);    // direct-initialization, functional form
	int v2{1024};    // direct-initialization, list initializer form
	int v3 = 1024;   // copy-initialization
	int v4 = {1024}; // copy-initialization, list initializer form


	// alternative ways to initialize string from a character string literal
	std::string titleA = "C++ Primer, 5th Ed.";
	std::string titleB("C++ Primer, 5th Ed.");
	std::string all_nines(10, '9');  // all_nines = "9999999999"

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl $0x0, -0x4(%rbp)
movl $0x400, -0x8(%rbp)      # imm = 0x400
movl $0x400, -0xc(%rbp)      # imm = 0x400
movl $0x400, -0x10(%rbp)     # imm = 0x400
movl $0x400, -0x14(%rbp)     # imm = 0x400
leaq -0x39(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x1150
movq -0xa8(%rbp), %rdx
leaq 0xa5a(%rip), %rsi       # 0x2006
leaq -0x38(%rbp), %rdi
callq 0x1110
jmp 0x15b7
leaq -0x39(%rbp), %rdi
callq 0x10c0
leaq -0x71(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x1150
movq -0xb0(%rbp), %rdx
leaq 0xa28(%rip), %rsi       # 0x2006
leaq -0x70(%rbp), %rdi
callq 0x1110
jmp 0x15e9
leaq -0x71(%rbp), %rdi
callq 0x10c0
leaq -0x99(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x1150
movq -0xb8(%rbp), %rcx
leaq -0x98(%rbp), %rdi
movl $0xa, %esi
movl $0x39, %edx
callq 0x1070
jmp 0x1624
leaq -0x99(%rbp), %rdi
callq 0x10c0
movl $0x0, -0x4(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x1060
leaq -0x70(%rbp), %rdi
callq 0x1060
leaq -0x38(%rbp), %rdi
callq 0x1060
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x10c0
jmp 0x16b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x10c0
jmp 0x16b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x10c0
leaq -0x70(%rbp), %rdi
callq 0x1060
leaq -0x38(%rbp), %rdi
callq 0x1060
movq -0x48(%rbp), %rdi
callq 0x1140
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_27_30_main.cc
// Function: runQueries(std::basic_ifstream<char, std::char_traits<char>>&)
void runQueries(ifstream& infile)
{
	TextQuery tq(infile);

	while (true) {
		cout << "enter word to look for, or q to quite: ";
		string s;

		if (!(cin >> s) || s == "q")
			break;
		print(cout, tq.query(s)) << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2d90
jmp 0x249e
movq 0xab23(%rip), %rdi      # 0xcfc8
leaq 0x5b58(%rip), %rsi      # 0x8004
callq 0x21b0
jmp 0x24b3
leaq -0x78(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x2250
movq -0xd0(%rbp), %rsi
movq 0xab07(%rip), %rdi      # 0xcfd8
callq 0x2240
movq %rax, -0xc8(%rbp)
jmp 0x24df
movq -0xc8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x20d0
movb %al, -0xd1(%rbp)
jmp 0x24fd
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x252d
jmp 0x2509
leaq 0x5b1c(%rip), %rsi      # 0x802c
leaq -0x78(%rbp), %rdi
callq 0x2740
movb %al, -0xd2(%rbp)
jmp 0x2521
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0x252d
jmp 0x2558
movl $0x3, -0x7c(%rbp)
jmp 0x25b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2600
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x25e3
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x3170
jmp 0x256e
movq 0xaa53(%rip), %rdi      # 0xcfc8
leaq -0xc0(%rbp), %rsi
callq 0x3480
movq %rax, -0xe0(%rbp)
jmp 0x258a
movq -0xe0(%rbp), %rdi
movq 0xaa18(%rip), %rsi      # 0xcfb0
callq 0x21f0
jmp 0x259f
leaq -0xc0(%rbp), %rdi
callq 0x2770
movl $0x0, -0x7c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2110
movl -0x7c(%rbp), %eax
testl %eax, %eax
je 0x25c6
jmp 0x25c4
jmp 0x25ee
jmp 0x249c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x2770
leaq -0x78(%rbp), %rdi
callq 0x2110
jmp 0x2600
leaq -0x48(%rbp), %rdi
callq 0x27b0
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x27b0
movq -0x50(%rbp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)
// File: iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_27_30_main.cc
// Function: main
int main(int argc, char const *argv[])
{
	ifstream infile;

	// Test data CH12_DynamicMemory/examples/data/storyDataFile
	if (argc < 2 || !(infile.open(argv[1]), infile)) {
		cerr << "No input file!" << endl;
		return EXIT_FAILURE;
	}
	runQueries(infile);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2200
cmpl $0x2, -0x8(%rbp)
jl 0x2692
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x218(%rbp), %rdi
movl $0x8, %edx
callq 0x2130
jmp 0x2666
movq -0x218(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x218(%rbp,%rax), %rdi
callq 0x20d0
movb %al, -0x229(%rbp)
jmp 0x2686
movb -0x229(%rbp), %al
testb $0x1, %al
jne 0x2692
jmp 0x26f6
movq 0xa957(%rip), %rdi      # 0xcff0
leaq 0x598e(%rip), %rsi      # 0x802e
callq 0x21b0
movq %rax, -0x238(%rbp)
jmp 0x26ae
movq -0x238(%rbp), %rdi
movq 0xa8f4(%rip), %rsi      # 0xcfb0
callq 0x21f0
jmp 0x26c3
movl $0x1, -0x4(%rbp)
movl $0x1, -0x228(%rbp)
jmp 0x2715
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2070
jmp 0x272d
leaq -0x218(%rbp), %rdi
callq 0x2480
jmp 0x2704
movl $0x0, -0x4(%rbp)
movl $0x1, -0x228(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2070
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq -0x220(%rbp), %rdi
callq 0x22c0
nopl (%rax)
// File: iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_27_30.cc
// Function: TextQuery::clean_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string TextQuery::clean_str(const string& word)
{
	string ret;
	for (auto it = word.begin(); it != word.end(); ++it) {
		if (!ispunct(*it))
			ret += tolower(*it);
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x2250
movq -0x10(%rbp), %rdi
callq 0x21a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22e0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3a20
testb $0x1, %al
jne 0x30e1
jmp 0x313c
leaq -0x20(%rbp), %rdi
callq 0x3a60
movsbl (%rax), %edi
callq 0x22f0
cmpl $0x0, %eax
jne 0x312f
leaq -0x20(%rbp), %rdi
callq 0x3a60
movsbl (%rax), %edi
callq 0x2260
movq -0x48(%rbp), %rdi
movsbl %al, %esi
callq 0x2120
jmp 0x3116
jmp 0x312f
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x2110
jmp 0x3159
jmp 0x3131
leaq -0x20(%rbp), %rdi
callq 0x3a80
jmp 0x30c1
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x314f
movq -0x48(%rbp), %rdi
callq 0x2110
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)
// File: iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_27_30.cc
// Function: print(std::ostream&, QueryResult const&)
ostream& print(ostream& os, const QueryResult& qr)
{
	os << qr.sought << " occurs " << qr.lines->size() << " "
		<< "time(s)" << endl;

	for (auto num : *qr.lines) {
		os << "\t(line " << num + 1 << ") "
			<< qr.file->at(num) << endl;
	}

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x4b96(%rip), %rsi      # 0x803d
callq 0x21b0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x39b0
movq %rax, %rdi
callq 0x3c40
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x2060
movq %rax, %rdi
leaq 0x4b7c(%rip), %rsi      # 0x8057
callq 0x21b0
movq %rax, %rdi
leaq 0x4b5c(%rip), %rsi      # 0x8046
callq 0x21b0
movq %rax, %rdi
movq 0x9ab7(%rip), %rsi      # 0xcfb0
callq 0x21f0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3c60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3c90
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3cc0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3cf0
testb $0x1, %al
jne 0x353f
jmp 0x35c4
leaq -0x20(%rbp), %rdi
callq 0x3d20
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x4af4(%rip), %rsi      # 0x804e
callq 0x21b0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
addq $0x1, %rsi
callq 0x2060
movq %rax, %rdi
leaq 0x4add(%rip), %rsi      # 0x8056
callq 0x21b0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x3790
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x3d40
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
movq 0x99ff(%rip), %rsi      # 0xcfb0
callq 0x21f0
leaq -0x20(%rbp), %rdi
callq 0x3d80
jmp 0x3529
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_27_30.cc
// Function: TextQuery::display_map()
void TextQuery::display_map()
{
	// auto iter = wm.cbegin();
	// auto iter_end = wm.cend();

	for (auto iter = wm.cbegin(); iter != wm.cend(); ++iter) {
		cout << "word: " << iter->first << " {";

		// auto text_locs = iter->second;
		// auto loc_iter = text_locs->cbeing()

		for (auto loc_iter = iter->second->cbegin();
			loc_iter != iter->second->cend(); ++loc_iter) {

			cout << *loc_iter << ", ";
		}

		cout << "}\n";

	}
	cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x10, %rdi
callq 0x3db0
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e10
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3de0
testb $0x1, %al
jne 0x3618
jmp 0x36fb
movq 0x99a9(%rip), %rdi      # 0xcfc8
leaq 0x4a33(%rip), %rsi      # 0x8059
callq 0x21b0
movq %rax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3c20
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x4a12(%rip), %rsi      # 0x8060
callq 0x21b0
leaq -0x10(%rbp), %rdi
callq 0x3c20
movq %rax, %rdi
addq $0x20, %rdi
callq 0x39b0
movq %rax, %rdi
callq 0x3e40
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3c20
movq %rax, %rdi
addq $0x20, %rdi
callq 0x39b0
movq %rax, %rdi
callq 0x3e70
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3cf0
testb $0x1, %al
jne 0x36a8
jmp 0x36da
leaq -0x20(%rbp), %rdi
callq 0x3d20
movq (%rax), %rsi
movq 0x990d(%rip), %rdi      # 0xcfc8
callq 0x2060
movq %rax, %rdi
leaq 0x4999(%rip), %rsi      # 0x8063
callq 0x21b0
leaq -0x20(%rbp), %rdi
callq 0x3d80
jmp 0x3674
movq 0x98e7(%rip), %rdi      # 0xcfc8
leaq 0x497e(%rip), %rsi      # 0x8066
callq 0x21b0
leaq -0x10(%rbp), %rdi
callq 0x3ea0
jmp 0x35f1
movq 0x98c6(%rip), %rdi      # 0xcfc8
movq 0x98a7(%rip), %rsi      # 0xcfb0
callq 0x21f0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: time_wheel::~time_wheel()
time_wheel::~time_wheel() {
    // 遍历每一个槽，并销毁其中的定时器
    for(int i = 0; i < N; ++i) {
        tw_timer* tmp = slots[i];
        while(tmp) {
            slots[i] = tmp->next;
            delete tmp;
            tmp = slots[i];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x3c, -0xc(%rbp)
jge 0x42da
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x42cd
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rdx
movslq -0xc(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x42ba
movq -0x28(%rbp), %rdi
movl $0x28, %esi
callq 0x3460
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x4282
jmp 0x42cf
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x426b
addq $0x30, %rsp
popq %rbp
retq
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: time_wheel::add_timer(tw_timer*, int)
void time_wheel::add_timer(tw_timer* timer, int timesolt) {
    if (timesolt < 0) {
        return;
    }

    int ticks = 0;
    /* 根据插入定时器的超时值计算它将在时间轮转动多少个滴答后被触发，并将
    该滴答数存于变量 ticks 中 */
    if (timesolt < SI) {
        ticks = 1;
    } else {
        ticks = timesolt / SI;
    }

    int rotation  = ticks / N; // 计算圈数
    int ts = (cur_slot + (ticks % N)) % N; // 计算待插入定时器的槽位

    timer->ratation = rotation;
    timer->time_slot = ts;

    // 插入合适的位置
    // 圈数大的放在最前面，即链表的前端
    if(!slots[ts]) {    // 头节点
        slots[ts] = timer;
    } else {    // 非头节点   
        timer->next = slots[ts];
        slots[ts]->prev = timer;
        slots[ts] = timer;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x4302
jmp 0x43c3
movl $0x0, -0x18(%rbp)
cmpl $0x1, -0x14(%rbp)
jge 0x4318
movl $0x1, -0x18(%rbp)
jmp 0x4326
movl -0x14(%rbp), %eax
movl $0x1, %ecx
cltd
idivl %ecx
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
movl -0x2c(%rbp), %eax
addl %edx, %eax
movl $0x3c, %ecx
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movl %edx, -0x20(%rbp)
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rcx
movl %edx, (%rcx)
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rcx
movl %edx, 0x4(%rcx)
movslq -0x20(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
jne 0x4390
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x20(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
jmp 0x43c3
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0x18(%rcx)
movq -0x10(%rbp), %rdx
movslq -0x20(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rcx
movq %rdx, 0x20(%rcx)
movq -0x10(%rbp), %rdx
movslq -0x20(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: time_wheel::del_timer(tw_timer*)
void time_wheel::del_timer(tw_timer* timer) {
    if(!timer) {
        return;
    } 
    int ts = timer->time_slot;
    // 如果是头节点
    if(slots[ts] == timer) {
        slots[ts] = slots[ts]->next;
        if(slots[ts]) {
            slots[ts]->prev = NULL;
        }
        delete timer;
    } else {
        timer->prev->next = timer->next;
        if(timer->next) {
            timer->next->prev = timer->prev;
        }
        delete timer;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x43f4
jmp 0x44bb
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
cmpq -0x10(%rbp), %rax
jne 0x446a
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rcx
movq 0x18(%rcx), %rdx
movslq -0x14(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movslq -0x14(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x444c
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x4468
movq -0x28(%rbp), %rdi
movl $0x28, %esi
callq 0x3460
jmp 0x44bb
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x449d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x44b9
movq -0x30(%rbp), %rdi
movl $0x28, %esi
callq 0x3460
jmp 0x44bb
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: time_wheel::adjust_timer(tw_timer*, int)
void time_wheel::adjust_timer(tw_timer* timer,int timeslot) {
    if(!timer) {
        return;
    }
    // 先断开原位置的联系
    // 头节点
    /*
    if(timer == slots[timer->time_slot]) {
        slots[timer->time_slot] = slots[timer->time_slot]->next;
        slots[timer->time_slot]->prev = NULL;
        timer->next = NULL;
        //add_timer(timer,slots[timer->time_slot]);
    } else if(!timer->next) {  // 尾节点
        timer->prev->next = NULL;
        timer->prev = NULL;
    } else { // 中间节点
        timer->prev->next = timer->next;
        timer->next->prev = timer->prev;
        //add_timer(timer,slots[timer->time_slot]->next);
    } */
    int ts = timer->time_slot;
    // 如果是头节点
    if(slots[ts] == timer) {
        slots[ts] = slots[ts]->next;
        if(slots[ts]) {
            slots[ts]->prev = NULL;
        }
        timer->prev = NULL;
        timer->next = NULL;
    } else {
        timer->prev->next = timer->next;
        if(timer->next) {
            timer->next->prev = timer->prev;
        }
        timer->prev = NULL;
        timer->next = NULL;
    }
    // 调整新的圈数和槽位
    //timer->ratation += timeslot / SI / N;
    //timer->time_slot = (cur_slot + (timeslot / SI % N)) % N;
    
    // 添加到新的位置
    add_timer(timer,timeslot); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x44f7
jmp 0x45c4
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, -0x18(%rbp)
movslq -0x18(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
cmpq -0x10(%rbp), %rax
jne 0x4569
movq -0x20(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rcx
movq 0x18(%rcx), %rdx
movslq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movslq -0x18(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x454f
movq -0x20(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x45b4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x459c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x42e0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: time_wheel::tick()
void time_wheel::tick() {
    tw_timer* tmp = slots[cur_slot]; // 取得时间轮上当前槽的头节点
    while(tmp) {
        // 将当前槽位上的定时器链表遍历一遍，对它们的圈数标记-1，表示新的一轮计时开始；
        if(tmp->ratation > 0) {
            tmp->ratation--;
            tmp = tmp->next;
        } else {
        // 说明定时器到期，执行定时任务，然后删除定时器
            tmp->cb_func(tmp->user_data);
            if(tmp == slots[cur_slot]) {
                slots[cur_slot] = tmp->next;
                delete tmp;
                if(slots[cur_slot]) {
                    slots[cur_slot]->prev = NULL;
                }
                tmp = slots[cur_slot];
            } else {
                tmp->prev->next = tmp->next;
                if(tmp->next) {
                    tmp->next->prev = tmp->prev;
                }
                tw_timer* tmp2 = tmp->next;
                delete tmp;
                tmp = tmp2;
            }
        }
    }
    cur_slot = ++cur_slot % N; // 更新时间轮的当前槽，以反映时间轮的转动
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movslq (%rax), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4713
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x4620
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x470e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movslq (%rcx), %rdx
cmpq 0x8(%rcx,%rdx,8), %rax
jne 0x46a9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdx
movslq (%rax), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x4674
movq -0x28(%rbp), %rdi
movl $0x28, %esi
callq 0x3460
movq -0x20(%rbp), %rax
movslq (%rax), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x4697
movq -0x20(%rbp), %rax
movslq (%rax), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq $0x0, 0x20(%rax)
movq -0x20(%rbp), %rax
movslq (%rax), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
jmp 0x470c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x46dc
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x4704
movq -0x30(%rbp), %rdi
movl $0x28, %esi
callq 0x3460
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x470e
jmp 0x45f0
movq -0x20(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
movl $0x3c, %ecx
cltd
idivl %ecx
movq -0x20(%rbp), %rax
movl %edx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: Utils::setnonblocking(int)
int Utils::setnonblocking(int fd)
{
    int old_option = fcntl(fd, F_GETFL);
    int new_option = old_option | O_NONBLOCK;
    fcntl(fd, F_SETFL, new_option);
    return old_option;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edi
movl $0x3, %esi
movb $0x0, %al
callq 0x3290
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %edi
movl -0x14(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x3290
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: Utils::addfd(int, int, bool, int)
void Utils::addfd(int epollfd, int fd, bool one_shot, int TRIGMode)
{
    epoll_event event;
    event.data.fd = fd;

    if (1 == TRIGMode)
        event.events = EPOLLIN | EPOLLET | EPOLLRDHUP;
    else
        event.events = EPOLLIN | EPOLLRDHUP;

    if (one_shot)
        event.events |= EPOLLONESHOT;
    epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &event);
    setnonblocking(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movl %r8d, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x1, %eax
cmpl -0x18(%rbp), %eax
jne 0x47ee
movl $0x80002001, -0x24(%rbp) # imm = 0x80002001
jmp 0x47f5
movl $0x2001, -0x24(%rbp)    # imm = 0x2001
testb $0x1, -0x11(%rbp)
je 0x4806
movl -0x24(%rbp), %eax
orl $0x40000000, %eax       # imm = 0x40000000
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %edx
movl $0x1, %esi
leaq -0x24(%rbp), %rcx
callq 0x3600
movq -0x30(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4760
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: Utils::sig_handler(int)
void Utils::sig_handler(int sig)
{
    //为保证函数的可重入性，保留原来的errno
    int save_errno = errno;
    int msg = sig;
    send(u_pipefd[1], (char *)&msg, 1, 0);
    errno = save_errno;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
callq 0x3060
movl (%rax), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movq 0xfc26(%rip), %rax      # 0x14478
movl 0x4(%rax), %edi
leaq -0xc(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3210
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
callq 0x3060
movl -0x10(%rbp), %ecx
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: Utils::addsig(int, void (*)(int), bool)
void Utils::addsig(int sig, void(handler)(int), bool restart)
{
    struct sigaction sa;
    memset(&sa, '\0', sizeof(sa));
    sa.sa_handler = handler;
    if (restart)
        sa.sa_flags |= SA_RESTART;
    sigfillset(&sa.sa_mask);
    assert(sigaction(sig, &sa, NULL) != -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x3270
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
testb $0x1, -0x19(%rbp)
je 0x48cc
movl -0x30(%rbp), %eax
orl $0x10000000, %eax       # imm = 0x10000000
movl %eax, -0x30(%rbp)
leaq -0xb8(%rbp), %rdi
addq $0x8, %rdi
callq 0x3120
movl -0xc(%rbp), %edi
leaq -0xb8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x35a0
cmpl $-0x1, %eax
je 0x48f6
jmp 0x4915
leaq 0x973f(%rip), %rdi      # 0xe03c
leaq 0x9758(%rip), %rsi      # 0xe05c
movl $0xed, %edx
leaq 0x9766(%rip), %rcx      # 0xe076
callq 0x3300
addq $0xc0, %rsp
popq %rbp
retq
nop
// File: JianjiaoSQ[P]MyPoorWebServer/time/time_wheel_timer.cpp
// Function: cb_func(client_data*)
void cb_func(client_data *user_data)
{
    epoll_ctl(Utils::u_epollfd, EPOLL_CTL_DEL, user_data->sockfd, 0);
    assert(user_data);
    close(user_data->sockfd);
    http_conn::m_user_count--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl 0xface(%rip), %edi      # 0x14480
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edx
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x3600
cmpq $0x0, -0x8(%rbp)
je 0x49d0
jmp 0x49ef
leaq 0x96cc(%rip), %rdi      # 0xe0a3
leaq 0x967e(%rip), %rsi      # 0xe05c
movl $0x104, %edx            # imm = 0x104
leaq 0x96c3(%rip), %rcx      # 0xe0ad
callq 0x3300
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x37e0
leaq 0xfae6(%rip), %rax      # 0x144e8
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0xfada(%rip), %rax      # 0x144e8
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: setnonblocking(int)
int setnonblocking(int fd)
{
    int old_option = fcntl(fd, F_GETFL);
    int new_option = old_option | O_NONBLOCK;
    fcntl(fd, F_SETFL, new_option);
    return old_option;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
movl $0x3, %esi
movb $0x0, %al
callq 0x3290
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edi
movl -0xc(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x3290
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: addfd(int, int, bool, int)
void addfd(int epollfd, int fd, bool one_shot, int TRIGMode)
{
    epoll_event event;  // 用于注册所感兴趣的事件和回传所发生待处理的事件
    event.data.fd = fd;

    if (1 == TRIGMode)  // events表示感兴趣的事件和被触发的事件
    /*  EPOLLIN：表示对应的文件描述符可以读；
        EPOLLET：ET的epoll工作模式；
        EPOLLHUP：表示对应的文件描述符被挂断；*/
        event.events = EPOLLIN | EPOLLET | EPOLLRDHUP;
    else
        event.events = EPOLLIN | EPOLLRDHUP;

    if (one_shot)
        event.events |= EPOLLONESHOT;
        // EPOLL_CTL_ADD注册、EPOLL_CTL_MOD修改、EPOLL_CTL_DEL删除；
    epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &event); // 用于控制某个文件描述符上的事件，可以注册事件，修改事件，删除事件。
    setnonblocking(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movl %ecx, -0x10(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x1, %eax
cmpl -0x10(%rbp), %eax
jne 0x4d51
movl $0x80002001, -0x1c(%rbp) # imm = 0x80002001
jmp 0x4d58
movl $0x2001, -0x1c(%rbp)    # imm = 0x2001
testb $0x1, -0x9(%rbp)
je 0x4d69
movl -0x1c(%rbp), %eax
orl $0x40000000, %eax       # imm = 0x40000000
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %edx
movl $0x1, %esi
leaq -0x1c(%rbp), %rcx
callq 0x3600
movl -0x8(%rbp), %edi
callq 0x4cd0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: modfd(int, int, int, int)
void modfd(int epollfd, int fd, int ev, int TRIGMode)
{
    epoll_event event;
    event.data.fd = fd;

    if (1 == TRIGMode)
        event.events = ev | EPOLLET | EPOLLONESHOT | EPOLLRDHUP;
    else
        event.events = ev | EPOLLONESHOT | EPOLLRDHUP;

    epoll_ctl(epollfd, EPOLL_CTL_MOD, fd, &event);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x1, %eax
cmpl -0x10(%rbp), %eax
jne 0x4dfb
movl -0xc(%rbp), %eax
orl $0x80000000, %eax       # imm = 0x80000000
orl $0x40000000, %eax       # imm = 0x40000000
orl $0x2000, %eax           # imm = 0x2000
movl %eax, -0x1c(%rbp)
jmp 0x4e0b
movl -0xc(%rbp), %eax
orl $0x40000000, %eax       # imm = 0x40000000
orl $0x2000, %eax           # imm = 0x2000
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %edx
movl $0x3, %esi
leaq -0x1c(%rbp), %rcx
callq 0x3600
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::close_conn(bool)
void http_conn::close_conn(bool real_close)
{
    if (real_close && (m_sockfd != -1))
    {
        printf("close %d\n", m_sockfd);
        removefd(m_epollfd, m_sockfd);
        m_sockfd = -1;
        m_user_count--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, -0x9(%rbp)
je 0x4e9d
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x14(%rax)
je 0x4e9d
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
leaq 0x93c3(%rip), %rdi      # 0xe22d
movb $0x0, %al
callq 0x3070
movq -0x18(%rbp), %rax
movl 0xf5e5(%rip), %edi      # 0x14460
movl 0x14(%rax), %esi
callq 0x4d90
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
movl 0xf654(%rip), %eax      # 0x144e8
addl $-0x1, %eax
movl %eax, 0xf64b(%rip)      # 0x144e8
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::init(int, sockaddr_in const&, char*, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void http_conn::init(int sockfd, const sockaddr_in &addr, char *root, int TRIGMode,
                     int close_log, string user, string passwd, string sqlname)
{
    m_sockfd = sockfd;
    m_address = addr;

    addfd(m_epollfd, sockfd, true, m_TRIGMode);  // m_TRIGMode ?? 传值 
    m_user_count++;

    //当浏览器出现连接重置时，可能是网站根目录出错或http响应格式出错或者访问的文件中内容完全为空
    doc_root = root;
    m_TRIGMode = TRIGMode;
    m_close_log = close_log;

    strcpy(sql_user, user.c_str());
    strcpy(sql_passwd, passwd.c_str());
    strcpy(sql_name, sqlname.c_str());

    init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x20(%rax)
movl 0xf552(%rip), %edi      # 0x14460
movl -0xc(%rbp), %esi
movl 0xe30(%rax), %ecx
movl $0x1, %edx
callq 0x4d20
movq -0x60(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0xf5b9(%rip), %ecx      # 0x144e8
addl $0x1, %ecx
movl %ecx, 0xf5b0(%rip)      # 0x144e8
movq -0x20(%rbp), %rcx
movq %rcx, 0xdf8(%rax)
movl -0x24(%rbp), %ecx
movl %ecx, 0xe30(%rax)
movl -0x28(%rbp), %ecx
movl %ecx, 0xe34(%rax)
addq $0xe38, %rax            # imm = 0xE38
movq %rax, -0x58(%rbp)
callq 0x3180
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x3430
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rax
addq $0xe9c, %rax            # imm = 0xE9C
movq %rax, -0x48(%rbp)
callq 0x3180
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3430
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
addq $0xf00, %rax            # imm = 0xF00
movq %rax, -0x38(%rbp)
callq 0x3180
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x3430
movq -0x30(%rbp), %rdi
callq 0x4fd0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::init()
void http_conn::init()
{
    mysql = NULL;
    bytes_to_send = 0;
    bytes_have_send = 0;
    m_check_state = CHECK_STATE_REQUESTLINE;
    m_linger = false;
    m_method = GET;
    m_url = 0;
    m_version = 0;
    m_content_length = 0;
    m_host = 0;
    m_start_line = 0;
    m_checked_idx = 0;
    m_read_idx = 0;
    m_write_idx = 0;
    cgi = 0;
    m_state = 0;
    timer_flag = 0;
    improv = 0;

    memset(m_read_buf, '\0', READ_BUFFER_SIZE);
    memset(m_write_buf, '\0', WRITE_BUFFER_SIZE);
    memset(m_real_file, '\0', FILENAME_LEN);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq $0x0, 0x8(%rdi)
movl $0x0, 0xdf0(%rdi)
movl $0x0, 0xdf4(%rdi)
movl $0x0, 0xc38(%rdi)
movb $0x0, 0xd24(%rdi)
movl $0x0, 0xc3c(%rdi)
movq $0x0, 0xd08(%rdi)
movq $0x0, 0xd10(%rdi)
movl $0x0, 0xd20(%rdi)
movq $0x0, 0xd18(%rdi)
movl $0x0, 0x830(%rdi)
movl $0x0, 0x82c(%rdi)
movl $0x0, 0x828(%rdi)
movl $0x0, 0xc34(%rdi)
movl $0x0, 0xde4(%rdi)
movl $0x0, 0x10(%rdi)
movl $0x0, (%rdi)
movl $0x0, 0x4(%rdi)
addq $0x28, %rdi
xorl %esi, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x3270
movq -0x10(%rbp), %rdi
addq $0x834, %rdi            # imm = 0x834
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x3270
movq -0x10(%rbp), %rdi
addq $0xc40, %rdi            # imm = 0xC40
xorl %esi, %esi
movl $0xc8, %edx
callq 0x3270
addq $0x10, %rsp
popq %rbp
retq
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::parse_line()
http_conn::LINE_STATUS http_conn::parse_line()
{
    char temp;
    for (; m_checked_idx < m_read_idx; ++m_checked_idx)
    {
        temp = m_read_buf[m_checked_idx];
        if (temp == '\r')
        {
            if ((m_checked_idx + 1) == m_read_idx)
                return LINE_OPEN;
            else if (m_read_buf[m_checked_idx + 1] == '\n')
            {
                m_read_buf[m_checked_idx++] = '\0';
                m_read_buf[m_checked_idx++] = '\0';
                return LINE_OK;
            }
            return LINE_BAD;
        }
        else if (temp == '\n')
        {
            if (m_checked_idx > 1 && m_read_buf[m_checked_idx - 1] == '\r')
            {
                m_read_buf[m_checked_idx - 1] = '\0';
                m_read_buf[m_checked_idx++] = '\0';
                return LINE_OK;
            }
            return LINE_BAD;
        }
    }
    return LINE_OPEN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movl 0x82c(%rcx), %eax
cmpl 0x828(%rcx), %eax
jge 0x522c
movq -0x20(%rbp), %rax
movslq 0x82c(%rax), %rcx
movb 0x28(%rax,%rcx), %al
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0xd, %eax
jne 0x51a0
movq -0x20(%rbp), %rcx
movl 0x82c(%rcx), %eax
addl $0x1, %eax
cmpl 0x828(%rcx), %eax
jne 0x5136
movl $0x2, -0x4(%rbp)
jmp 0x5233
movq -0x20(%rbp), %rax
movl 0x82c(%rax), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl 0x28(%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x5192
movq -0x20(%rbp), %rax
movl 0x82c(%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x82c(%rax)
movslq %ecx, %rcx
movb $0x0, 0x28(%rax,%rcx)
movl 0x82c(%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x82c(%rax)
movslq %ecx, %rcx
movb $0x0, 0x28(%rax,%rcx)
movl $0x0, -0x4(%rbp)
jmp 0x5233
jmp 0x5194
movl $0x1, -0x4(%rbp)
jmp 0x5233
movsbl -0x11(%rbp), %eax
cmpl $0xa, %eax
jne 0x5210
movq -0x20(%rbp), %rax
cmpl $0x1, 0x82c(%rax)
jle 0x5207
movq -0x20(%rbp), %rax
movl 0x82c(%rax), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl 0x28(%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x5207
movq -0x20(%rbp), %rax
movl 0x82c(%rax), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, 0x28(%rax,%rcx)
movl 0x82c(%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x82c(%rax)
movslq %ecx, %rcx
movb $0x0, 0x28(%rax,%rcx)
movl $0x0, -0x4(%rbp)
jmp 0x5233
movl $0x1, -0x4(%rbp)
jmp 0x5233
jmp 0x5212
jmp 0x5214
movq -0x20(%rbp), %rax
movl 0x82c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x82c(%rax)
jmp 0x50e0
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::read_once()
bool http_conn::read_once()
{
    if (m_read_idx >= READ_BUFFER_SIZE)
    {
        return false;
    }
    int bytes_read = 0;

    //LT读取数据
    if (0 == m_TRIGMode)
    {
        bytes_read = recv(m_sockfd, m_read_buf + m_read_idx, READ_BUFFER_SIZE - m_read_idx, 0);
        m_read_idx += bytes_read;

        if (bytes_read <= 0)
        {
            return false;
        }

        return true;
    }
    //ET读数据
    else
    {
        while (true)
        {
            bytes_read = recv(m_sockfd, m_read_buf + m_read_idx, READ_BUFFER_SIZE - m_read_idx, 0);
            if (bytes_read == -1)
            {
                if (errno == EAGAIN || errno == EWOULDBLOCK)
                    break;
                return false;
            }
            else if (bytes_read == 0)
            {
                return false;
            }
            m_read_idx += bytes_read;
        }
        return true;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x800, 0x828(%rax)     # imm = 0x800
jl 0x5269
movb $0x0, -0x1(%rbp)
jmp 0x5354
movq -0x20(%rbp), %rcx
movl $0x0, -0x14(%rbp)
xorl %eax, %eax
cmpl 0xe30(%rcx), %eax
jne 0x52d9
movq -0x20(%rbp), %rcx
movl 0x14(%rcx), %edi
movq %rcx, %rsi
addq $0x28, %rsi
movslq 0x828(%rcx), %rax
addq %rax, %rsi
movl $0x800, %eax            # imm = 0x800
subl 0x828(%rcx), %eax
movslq %eax, %rdx
xorl %ecx, %ecx
callq 0x3130
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl -0x14(%rbp), %ecx
addl 0x828(%rax), %ecx
movl %ecx, 0x828(%rax)
cmpl $0x0, -0x14(%rbp)
jg 0x52d3
movb $0x0, -0x1(%rbp)
jmp 0x5354
movb $0x1, -0x1(%rbp)
jmp 0x5354
jmp 0x52db
movq -0x20(%rbp), %rcx
movl 0x14(%rcx), %edi
movq %rcx, %rsi
addq $0x28, %rsi
movslq 0x828(%rcx), %rax
addq %rax, %rsi
movl $0x800, %eax            # imm = 0x800
subl 0x828(%rcx), %eax
movslq %eax, %rdx
xorl %ecx, %ecx
callq 0x3130
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x532d
callq 0x3060
cmpl $0xb, (%rax)
je 0x5325
callq 0x3060
cmpl $0xb, (%rax)
jne 0x5327
jmp 0x5350
movb $0x0, -0x1(%rbp)
jmp 0x5354
cmpl $0x0, -0x14(%rbp)
jne 0x5339
movb $0x0, -0x1(%rbp)
jmp 0x5354
jmp 0x533b
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
addl 0x828(%rax), %ecx
movl %ecx, 0x828(%rax)
jmp 0x52db
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::parse_headers(char*)
http_conn::HTTP_CODE http_conn::parse_headers(char *text)
{
    if (text[0] == '\0')
    {
        if (m_content_length != 0)
        {
            m_check_state = CHECK_STATE_CONTENT;
            return NO_REQUEST;
        }
        return GET_REQUEST;
    }
    else if (strncasecmp(text, "Connection:", 11) == 0)
    {
        text += 11;
        text += strspn(text, " \t");
        if (strcasecmp(text, "keep-alive") == 0)
        {
            m_linger = true;
        }
    }
    else if (strncasecmp(text, "Content-length:", 15) == 0)
    {
        text += 15;
        text += strspn(text, " \t");
        m_content_length = atol(text);
    }
    else if (strncasecmp(text, "Host:", 5) == 0)
    {
        text += 5;
        text += strspn(text, " \t");
        m_host = text;
    }
    else
    {
        LOG_INFO("oop!unknow header: %s", text);
    }
    return NO_REQUEST;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x5677
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd20(%rax)
je 0x566b
movq -0x20(%rbp), %rax
movl $0x2, 0xc38(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x57ce
movl $0x1, -0x4(%rbp)
jmp 0x57ce
movq -0x18(%rbp), %rdi
leaq 0x8be6(%rip), %rsi      # 0xe268
movl $0xb, %edx
callq 0x35b0
cmpl $0x0, %eax
jne 0x56da
movq -0x18(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x8b8f(%rip), %rsi      # 0xe237
callq 0x3190
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x8bb4(%rip), %rsi      # 0xe274
callq 0x34c0
cmpl $0x0, %eax
jne 0x56d5
movq -0x20(%rbp), %rax
movb $0x1, 0xd24(%rax)
jmp 0x57c5
movq -0x18(%rbp), %rdi
leaq 0x8b9a(%rip), %rsi      # 0xe27f
movl $0xf, %edx
callq 0x35b0
cmpl $0x0, %eax
jne 0x5733
movq -0x18(%rbp), %rax
addq $0xf, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x8b2c(%rip), %rsi      # 0xe237
callq 0x3190
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3560
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xd20(%rax)
jmp 0x57c3
movq -0x18(%rbp), %rdi
leaq 0x8b51(%rip), %rsi      # 0xe28f
movl $0x5, %edx
callq 0x35b0
cmpl $0x0, %eax
jne 0x5785
movq -0x18(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x8ad3(%rip), %rsi      # 0xe237
callq 0x3190
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0xd18(%rax)
jmp 0x57c1
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl 0xe34(%rcx), %eax
jne 0x57bf
callq 0x6df0
movq %rax, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %esi
leaq 0x8aea(%rip), %rdx      # 0xe295
movb $0x0, %al
callq 0x9300
callq 0x6df0
movq %rax, %rdi
callq 0x9870
jmp 0x57c1
jmp 0x57c3
jmp 0x57c5
jmp 0x57c7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::parse_content(char*)
http_conn::HTTP_CODE http_conn::parse_content(char *text)
{
    if (m_read_idx >= (m_content_length + m_checked_idx))
    {
        text[m_content_length] = '\0';
        //POST请求中最后为输入的用户名和密码
        m_string = text;
        return GET_REQUEST;
    }
    return NO_REQUEST;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdx
movq %rdx, -0x20(%rbp)
movl 0x828(%rdx), %eax
movl 0xd20(%rdx), %ecx
addl 0x82c(%rdx), %ecx
cmpl %ecx, %eax
jl 0x5831
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0xd20(%rax), %rdx
movb $0x0, (%rcx,%rdx)
movq -0x18(%rbp), %rcx
movq %rcx, 0xde8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5838
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: JianjiaoSQ[P]MyPoorWebServer/http/http_conn.cpp
// Function: http_conn::process_read()
http_conn::HTTP_CODE http_conn::process_read()
{
    LINE_STATUS line_status = LINE_OK;
    HTTP_CODE ret = NO_REQUEST;
    char *text = 0;

    while ((m_check_state == CHECK_STATE_CONTENT && line_status == LINE_OK) || ((line_status = parse_line()) == LINE_OK))
    {
        text = get_line();
        m_start_line = m_checked_idx;
        LOG_INFO("%s", text);
        switch (m_check_state)
        {
        case CHECK_STATE_REQUESTLINE:
        {
            ret = parse_request_line(text);
            if (ret == BAD_REQUEST)
                return BAD_REQUEST;
            break;
        }
        case CHECK_STATE_HEADER:
        {
            ret = parse_headers(text);
            if (ret == BAD_REQUEST)
                return BAD_REQUEST;
            else if (ret == GET_REQUEST)
            {
                return do_request();
            }
            break;
        }
        case CHECK_STATE_CONTENT:
        {
            ret = parse_content(text);
            if (ret == GET_REQUEST)
                return do_request();
            line_status = LINE_OPEN;
            break;
        }
        default:
            return INTERNAL_ERROR;
        }
    }
    return NO_REQUEST;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x2, 0xc38(%rax)
jne 0x5882
movb $0x1, %al
cmpl $0x0, -0x14(%rbp)
movb %al, -0x29(%rbp)
je 0x5897
movq -0x28(%rbp), %rdi
callq 0x50d0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x58a3
jmp 0x59b3
movq -0x28(%rbp), %rdi
callq 0x6f60
movq -0x28(%rbp), %rcx
movq %rax, -0x20(%rbp)
movl 0x82c(%rcx), %eax
movl %eax, 0x830(%rcx)
xorl %eax, %eax
cmpl 0xe34(%rcx), %eax
jne 0x58f6
callq 0x6df0
movq %rax, %rdi
movq -0x20(%rbp), %rcx
movl $0x1, %esi
leaq 0x89c6(%rip), %rdx      # 0xe2a8
movb $0x0, %al
callq 0x9300
callq 0x6df0
movq %rax, %rdi
callq 0x9870
movq -0x28(%rbp), %rax
movl 0xc38(%rax), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x5920
jmp 0x5909
movl -0x30(%rbp), %eax
subl $0x1, %eax
je 0x5941
jmp 0x5913
movl -0x30(%rbp), %eax
subl $0x2, %eax
je 0x5978
jmp 0x59a5
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5360
movl %eax, -0x18(%rbp)
cmpl $0x2, -0x18(%rbp)
jne 0x593f
movl $0x2, -0x4(%rbp)
jmp 0x59ba
jmp 0x59ae
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5620
movl %eax, -0x18(%rbp)
cmpl $0x2, -0x18(%rbp)
jne 0x5960
movl $0x2, -0x4(%rbp)
jmp 0x59ba
cmpl $0x1, -0x18(%rbp)
jne 0x5974
movq -0x28(%rbp), %rdi
callq 0x59d0
movl %eax, -0x4(%rbp)
jmp 0x59ba
jmp 0x5976
jmp 0x59ae
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x57e0
movl %eax, -0x18(%rbp)
cmpl $0x1, -0x18(%rbp)
jne 0x599c
movq -0x28(%rbp), %rdi
callq 0x59d0
movl %eax, -0x4(%rbp)
jmp 0x59ba
movl $0x2, -0x14(%rbp)
jmp 0x59ae
movl $0x6, -0x4(%rbp)
jmp 0x59ba
jmp 0x586a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)