LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: is_assist[abi:cxx11](mg_connection*)
string is_assist(mg_connection* conn){
    string ssid = cck_extract_ssid(conn);
    for(auto x = assist_cookie.begin(); x != assist_cookie.end(); ++x){
        // cout << x->first << "," << x->second << "," << ssid << endl;
        if(x->second == ssid) return x->first;
    }

    return string("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0xef7f
leaq 0x85c45(%rip), %r13     # 0x94c48
movq 0x18(%r13), %r14
addq $0x8, %r13
cmpq %r13, %r14
je 0xf047
movq (%rsp), %r15
movq 0x8(%rsp), %r12
cmpq %r12, 0x48(%r14)
jne 0xf037
testq %r12, %r12
je 0xf062
movq 0x40(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xc7c0
testl %eax, %eax
je 0xf062
movq %r14, %rdi
callq 0xcaa0
movq %rax, %r14
cmpq %r13, %rax
jne 0xf019
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6861d(%rip), %rdx     # 0x77672
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xedf0
jmp 0xf07c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x12380
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf08f
callq 0xc640
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf0a2
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf0b8
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cck_send_ssid(mg_connection*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void cck_send_ssid(mg_connection *conn, const std::string c){
    char expire[100];
    time_t t = time(NULL) + 60 * 60 * 24 * 30;
    strftime(expire, sizeof(expire), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&t));

    mg_printf(conn,
        "HTTP/1.1 200 OK\r\n"
        "Set-Cookie: ssid=%s; expires=%s; max-age=%d; path=/; http-only; HttpOnly;\r\n"
        "Content-type: text/html\r\n"
        "X-UA-Compatible: IE=edge\r\n"
        "Content-Length: 0\r\n",
        c.c_str(), expire, 60 * 60 * 24 * 30);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %edi, %edi
callq 0xc820
addq $0x278d00, %rax         # imm = 0x278D00
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0xc2f0
leaq 0x6207b(%rip), %rdx     # 0x7116e
leaq 0x10(%rsp), %r15
movl $0x64, %esi
movq %r15, %rdi
movq %rax, %rcx
callq 0xc9d0
movq (%r14), %rdx
leaq 0x62076(%rip), %rsi     # 0x71188
movq %rbx, %rdi
movq %r15, %rcx
movl $0x278d00, %r8d         # imm = 0x278D00
xorl %eax, %eax
callq 0x67a83
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: _generate_appender[abi:cxx11](char const*)
string __generate_appender(const char *username) {
    char *hash = new char[33];
    ConfigManager c;
    mg_md5(hash, username, ":", c.global().get("security::salt").c_str(), NULL);
    // mg_md5(hash, username, ":", md5Salt, NULL);

    string ret(hash);
    delete [] hash;

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x21, %edi
callq 0xc560
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0xc8(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x11bec
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x61e97(%rip), %rsi     # 0x712db
leaq 0x61e9e(%rip), %rdx     # 0x712e9
leaq 0x8(%rsp), %rdi
callq 0xedf0
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x11edc
movq (%rax), %rcx
leaq 0x62806(%rip), %rdx     # 0x71c72
movq %r14, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x68d1f
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf48b
callq 0xc640
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0xc460
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xedf0
leaq 0x60(%rsp), %r15
leaq 0x98(%rsp), %r12
movq %r14, %rdi
callq 0xc400
movq %r12, %rdi
callq 0x11cf4
movq %r15, %rdi
callq 0x11d8a
leaq 0x28(%rsp), %rdi
callq 0x11e20
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf4f0
movq %rax, %rbx
jmp 0xf507
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf507
callq 0xc640
leaq 0x28(%rsp), %rdi
callq 0x11c0a
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cck_create_ssid[abi:cxx11](char const*)
string cck_create_ssid(const char* username){
    // char newssid[33];
    // strcpy(newssid, to_ssid(username));

    string appender = __generate_appender(username);

    char finalssid[64];// = new char[64];

    int len = sprintf(finalssid, "%s|%s", username, appender.c_str());
    finalssid[len] = 0;

    std::string ret(finalssid);

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0xf3a9
movq (%r15), %rcx
leaq 0x61dad(%rip), %rsi     # 0x712ea
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xcb60
cltq
movb $0x0, 0x20(%rsp,%rax)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0xc460
leaq (%rsp,%rax), %rdx
addq $0x20, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xedf0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf58b
callq 0xc640
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf5ae
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cck_verify_ssid(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string cck_verify_ssid(string ssid){
    string username;
    vector<string> zztmp = cc_split(ssid, string("|"));
    if (zztmp.size() != 2) return username;

    username = zztmp[0];
    string _ssid = cck_create_ssid(username);

    return (_ssid == ssid) ? username : "";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x66025(%rip), %rsi     # 0x756d4
leaq 0x6601f(%rip), %rdx     # 0x756d5
leaq 0x28(%rsp), %rdi
callq 0xedf0
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0xf87c
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0xf6e1
callq 0xc640
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0xf77c
leaq 0x8(%rsp), %rdi
callq 0xcc40
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x12380
movq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0xf519
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0xf740
callq 0xc640
movq 0x30(%rsp), %rdx
cmpq 0x8(%r14), %rdx
jne 0xf761
testq %rdx, %rdx
je 0xf7c0
movq (%r14), %rsi
movq 0x28(%rsp), %rdi
callq 0xc7c0
testl %eax, %eax
je 0xf7c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x67f03(%rip), %rdx     # 0x77672
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xedf0
jmp 0xf7dc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rcx
cmpq %r15, %rcx
je 0xf79b
movq %rcx, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0xf7a2
movups (%r15), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
jmp 0xf7eb
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x12380
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0xf7eb
callq 0xc640
leaq 0x48(%rsp), %rdi
callq 0x11c2a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xf804
callq 0xc640
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf81a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
jne 0xf836
jmp 0xf842
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0xf842
callq 0xc640
jmp 0xf842
jmp 0xf83f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x11c2a
jmp 0xf865
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0xf865
callq 0xc640
jmp 0xf865
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xf874
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<string> cc_split(const string &s, const string &seperator){
    vector<string> result;
    typedef string::size_type string_size;
    string_size i = 0;

    while (i != s.size()){
        int flag = 0;
        while (i != s.size() && flag == 0){
            flag = 1;
            for (string_size x = 0; x < seperator.size(); ++x)
                if (s[i] == seperator[x]){
                    ++i;
                    flag = 0;
                    break;
                }
        }

        flag = 0;
        string_size j = i;
        while (j != s.size() && flag == 0){
            for (string_size x = 0; x < seperator.size(); ++x)
                if (s[j] == seperator[x]){
                    flag = 1;
                    break;
                }
            if (flag == 0)
                ++j;
        }
        if (i != j){
            result.push_back(s.substr(i, j - i));
            i = j;
        }
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0xf992
movq %rdx, %r14
movq %rsi, %r15
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq (%r14), %rcx
movq 0x8(%r14), %rsi
movq (%r15), %rdi
movq %rbp, %rdx
testq %rsi, %rsi
je 0xf8eb
movb (%rdi,%rdx), %r8b
xorl %r9d, %r9d
cmpb (%rcx,%r9), %r8b
je 0xf8e3
incq %r9
cmpq %r9, %rsi
jne 0xf8d3
jmp 0xf8eb
incq %rdx
cmpq %rax, %rdx
jne 0xf8c7
movq %rdx, %r8
movq %rax, %rbp
cmpq %rax, %rdx
je 0xf953
testq %rsi, %rsi
je 0xf92f
movb (%rdi,%r8), %r10b
cmpb (%rcx), %r10b
setne %r9b
je 0xf93a
movl $0x1, %ebp
movq %rbp, %r11
cmpq %rbp, %rsi
je 0xf923
leaq 0x1(%r11), %rbp
cmpb (%rcx,%r11), %r10b
setne %r9b
jne 0xf90d
xorl %r10d, %r10d
cmpq %rsi, %r11
setae %r10b
jmp 0xf93d
movb $0x1, %r9b
movl $0x1, %r10d
jmp 0xf93d
xorl %r10d, %r10d
addq %r10, %r8
testb $0x1, %r9b
je 0xf950
movq %r8, %rbp
cmpq %rax, %r8
jne 0xf8f6
jmp 0xf953
movq %r8, %rbp
movq %rbp, %rcx
subq %rdx, %rcx
jne 0xf960
movq %rdx, %rbp
jmp 0xf989
movq %r12, %rdi
movq %r15, %rsi
callq 0xcb00
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1280c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf985
callq 0xc640
movq 0x8(%r15), %rax
cmpq %rax, %rbp
jne 0xf8ba
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xf9bb
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf9bb
callq 0xc640
movq %rbx, %rdi
callq 0x11c2a
movq %r14, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_valid_image_ext(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string cc_valid_image_ext(string name){
    string ext = "";
    if (cc_ends_with(name, ".jpg"))
        ext = ".jpg";
    else if (cc_ends_with(name, ".gif"))
        ext = ".gif";
    else if (cc_ends_with(name, ".png"))
        ext = ".png";

    return ext;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0x67c30(%rip), %rdx     # 0x77672
movq %rdx, %rsi
callq 0xedf0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x61949(%rip), %r14     # 0x713a3
leaq 0x61946(%rip), %rdx     # 0x713a7
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xedf0
movq 0x8(%r15), %rsi
movq 0x10(%rsp), %rdx
subq %rdx, %rsi
jae 0xfa80
xorl %ebp, %ebp
jmp 0xfa93
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
callq 0xcbf0
testl %eax, %eax
sete %bpl
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xfaa2
callq 0xc640
testb %bpl, %bpl
jne 0xfb59
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x618ee(%rip), %r14     # 0x713a8
leaq 0x618eb(%rip), %rdx     # 0x713ac
movq %r14, %rsi
callq 0xedf0
movq 0x8(%r15), %rsi
movq 0x10(%rsp), %rdx
subq %rdx, %rsi
jae 0xfadb
xorl %ebp, %ebp
jmp 0xfaee
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
callq 0xcbf0
testl %eax, %eax
sete %bpl
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xfafd
callq 0xc640
testb %bpl, %bpl
jne 0xfb59
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x6189c(%rip), %r14     # 0x713ad
leaq 0x61899(%rip), %rdx     # 0x713b1
movq %r14, %rsi
callq 0xedf0
movq 0x8(%r15), %rsi
movq 0x10(%rsp), %rdx
subq %rdx, %rsi
jae 0xfb32
xorl %ebp, %ebp
jmp 0xfb45
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
callq 0xcbf0
testl %eax, %eax
sete %bpl
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xfb54
callq 0xc640
testb %bpl, %bpl
je 0xfb70
movq 0x8(%rbx), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0xc5c0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfb8a
jmp 0xfba0
jmp 0xfb8a
jmp 0xfba0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xfba3
callq 0xc640
jmp 0xfba3
jmp 0xfba0
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xfbb0
callq 0xc640
movq %r14, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_ends_with(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool cc_ends_with(std::string const &fullString, std::string const &ending) {
    if (fullString.length() >= ending.length()) {
        return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending));
    }
    else {
        return false;
    }
}

// Assembly:
movq %rsi, %rcx
movq 0x8(%rdi), %rsi
movq 0x8(%rcx), %rdx
subq %rdx, %rsi
jae 0xfbcb
xorl %eax, %eax
retq
pushq %rax
callq 0xcbf0
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_random_chars[abi:cxx11](int)
string cc_random_chars(int len){
    char *username = new char[len + 1];
    unqlite_util_random_string(pDb, username, len);
    username[len] = 0;

    string ret(username);

    delete [] username;

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x1(%r14), %eax
cmpl $-0x1, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovgel %eax, %ecx
movslq %ecx, %rdi
callq 0xc560
movq %rax, %r15
leaq 0x84ff1(%rip), %rax     # 0x94bf8
movq (%rax), %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x32f0f
movslq %r14d, %rax
movb $0x0, (%r15,%rax)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0xc460
leaq (%rax,%r15), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xedf0
movq %r15, %rdi
callq 0xc400
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_timestamp_to_time[abi:cxx11](long)
string cc_timestamp_to_time(time_t ts){
    struct tm tm_date;

    localtime_r(&(ts), &tm_date);

    char std_time[64];
    strftime(std_time, 64, "%X", &tm_date);

    string ret(std_time);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
leaq 0x58(%rsp), %r14
movq %r14, %rsi
callq 0xc1e0
leaq 0x61731(%rip), %rdx     # 0x713bb
leaq 0x10(%rsp), %r15
movl $0x40, %esi
movq %r15, %rdi
movq %r14, %rcx
callq 0xc9d0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0xc460
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xedf0
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: logLog(char const*, ...)
void logLog(const char* msg, ...){
    time_t rawtime;
    time(&rawtime);

    char timetmp[64];
    struct tm * timeinfo;
    timeinfo = localtime(&(rawtime));

    strftime(timetmp, 64, "%Y/%m/%d %X", timeinfo);

    fprintf(log_file, "[%s]\t", timetmp);

    va_list argptr;
    va_start(argptr, msg);
    vfprintf(log_file, msg, argptr);
    va_end(argptr);

    fprintf(log_file, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0x70(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0xfded
movaps %xmm0, 0xa0(%rsp)
movaps %xmm1, 0xb0(%rsp)
movaps %xmm2, 0xc0(%rsp)
movaps %xmm3, 0xd0(%rsp)
movaps %xmm4, 0xe0(%rsp)
movaps %xmm5, 0xf0(%rsp)
movaps %xmm6, 0x100(%rsp)
movaps %xmm7, 0x110(%rsp)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xc820
movq %r14, %rdi
callq 0xc770
leaq 0x615a9(%rip), %rdx     # 0x713b2
leaq 0x30(%rsp), %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0xc9d0
leaq 0x84e53(%rip), %r12     # 0x94c78
movq (%r12), %rdi
leaq 0x6158e(%rip), %rsi     # 0x713be
movq %r14, %rdx
xorl %eax, %eax
callq 0xc260
leaq 0x10(%rsp), %rdx
movq %r15, 0x10(%rdx)
leaq 0x150(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r12), %rdi
movq %rbx, %rsi
callq 0xcba0
movq (%r12), %rsi
movl $0xa, %edi
callq 0xc970
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: database_fatal(char const*)
void database_fatal(const char *zMsg){
    if (pDb){
        const char *zErr;
        int iLen = 0; /* Stupid cc warning */

        /* Extract the database error log */
        unqlite_config(pDb, UNQLITE_CONFIG_ERR_LOG, &zErr, &iLen);
        if (iLen > 0){
            /* Output the DB error log */
            puts(zErr); /* Always null termniated */
        }
    }
    else{
        if (zMsg){
            puts(zMsg);
        }
    }
    /* Manually shutdown the library */
    unqlite_lib_shutdown();
    /* Exit immediately */
    exit(0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x84d67(%rip), %rax     # 0x94bf8
movq (%rax), %rax
testq %rax, %rax
jne 0xfea0
testq %rdi, %rdi
jne 0xfec9
jmp 0xfece
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
movq %rsp, %rdx
movq %rax, %rdi
movl $0x3, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e6e3
cmpl $0x0, (%rbx)
jle 0xfece
movq (%rsp), %rdi
callq 0xcb40
callq 0x2da16
xorl %edi, %edi
callq 0xc7a0
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_smart_shorten(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
string cc_smart_shorten(string& s, int limiter){
    //s = s.substr(0, limiter * 2);
    int nl_pos = s.find_first_of("<");
    s = s.substr(0, nl_pos);
    if(s.size() <= limiter) return s;

    string ret = s.substr(0, limiter);
    if(nl_pos <= limiter) return ret;

    for(int i = limiter; i < s.size(); ++i){
        if(i < s.size() - 3){
            if(s[i] == -17 && s[i+1] == -68 && s[i+2] == -116) break;
            if(s[i] == -29 && s[i+1] == -128 && s[i+2] == -126) break;
            if(s[i] == ',' || s[i] == '.') break;
        }
        ret += s[i];
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x657c6(%rip), %rsi     # 0x756bb
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0xc230
movq %rax, %r12
movslq %r12d, %rcx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xcb00
movq %r14, %rdi
movq %r15, %rsi
callq 0xc5e0
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xff37
callq 0xc640
movq 0x8(%r14), %rdx
movslq %ebp, %r15
cmpq %r15, %rdx
jbe 0xffe9
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xcb00
cmpl %r15d, %r12d
setg %al
movq 0x8(%r14), %rdx
cmpq %r15, %rdx
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xfffe
xorl %ebp, %ebp
addq $-0x3, %rdx
movq (%r14), %rcx
movb (%rcx,%r15), %al
cmpq %r15, %rdx
jbe 0xffd0
movzbl %al, %edx
cmpl $0xee, %edx
jg 0xffaa
cmpl $0xe3, %edx
jne 0xffc6
movb $-0x1d, %al
cmpb 0x1(%rcx,%r15), %bpl
jno 0xffd0
cmpb $-0x7e, 0x2(%rcx,%r15)
jne 0xffd0
jmp 0xfffe
cmpl $0xef, %edx
jne 0xffd0
movb $-0x11, %al
cmpb $-0x44, 0x1(%rcx,%r15)
jne 0xffd0
cmpb $-0x74, 0x2(%rcx,%r15)
jne 0xffd0
jmp 0xfffe
cmpl $0x2c, %edx
je 0xfffe
cmpl $0x2e, %edx
je 0xfffe
movsbl %al, %esi
movq %rbx, %rdi
callq 0xccc0
incq %r15
movq 0x8(%r14), %rdx
cmpq %r15, %rdx
ja 0xff74
jmp 0xfffe
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x12380
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x10022
callq 0xc640
movq %r14, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_replace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string cc_replace(std::string str, const std::string& from, const std::string& to) {
    size_t start_pos = 0;
    while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
        str.replace(start_pos, from.length(), to);
        start_pos += to.length(); // Handles case where 'to' is a substring of 'from'
    }
    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xc3e0
cmpq $-0x1, %rax
je 0x11104
movq %rax, %r13
movq 0x8(%r12), %rdx
movq (%r15), %rcx
movq 0x8(%r15), %r8
movq %rbx, %rdi
movq %r13, %rsi
callq 0xc200
addq 0x8(%r15), %r13
movq (%r12), %rsi
movq 0x8(%r12), %rcx
movq %rbx, %rdi
movq %r13, %rdx
callq 0xc3e0
movq %rax, %r13
cmpq $-0x1, %rax
jne 0x110cc
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rbx), %rdx
leaq 0x10(%rbx), %rax
cmpq %rax, %rdx
je 0x11123
movq %rdx, (%r14)
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
jmp 0x11129
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_extract_uri_num(mg_connection*)
int cc_extract_uri_num(mg_connection* conn){
    string url(conn->uri);
    vector<string> tmp = cc_split(url, "/");
    string num = tmp[tmp.size() - 1];

    return atol(num.c_str());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq 0x8(%rdi), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xcae0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x68411(%rip), %rsi     # 0x795ac
leaq 0x6840b(%rip), %rdx     # 0x795ad
leaq 0x8(%rsp), %rdi
callq 0xedf0
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xf87c
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x111cf
callq 0xc640
movq 0x30(%rsp), %rax
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
addq %rsi, %rdx
callq 0x12380
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xc710
movq %rax, %rbx
cmpq %r15, %r14
je 0x11209
movq %r14, %rdi
callq 0xc640
leaq 0x28(%rsp), %rdi
callq 0x11c2a
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11226
callq 0xc640
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x11c2a
jmp 0x11258
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11258
callq 0xc640
jmp 0x11258
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1126b
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/helper.cpp
// Function: cc_load_file_to_set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void cc_load_file_to_set(const string& p, unordered_set<string>& s){
    ifstream f(p);
    string line;
    while (f >> line) if(line != "") s.insert(line);
    f.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0xcbc0
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movb $0x0, (%rbp)
leaq 0x10(%rsp), %r15
leaq 0x65be4(%rip), %r12     # 0x77672
leaq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0xc4e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x11ad0
movq %r15, %rdi
movq %r12, %rsi
callq 0xca10
testl %eax, %eax
je 0x11a93
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x12a6e
jmp 0x11a93
leaq 0x30(%rsp), %rdi
callq 0xc730
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11ae9
callq 0xc640
leaq 0x30(%rsp), %rdi
callq 0xc060
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11b07
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11b19
callq 0xc640
leaq 0x30(%rsp), %rdi
callq 0xc060
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/router.h
// Function: route::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void add(const std::string pattern, int no){
        // "/page/:num"
        std::vector<std::string> v = cc_split(pattern, "/");
        struct Tree *top = root;

        for(auto i: v)
            if(!i.empty()){
                if(i[0] == ':'){
                    top->catcher = i.substr(1);
                }else{
                    if(!top->to[i]) top->to[i] = new Tree();
                    top = top->to[i];
                }
            }

        top->ending = no;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x666eb(%rip), %rsi     # 0x795ac
leaq 0x666e5(%rip), %rdx     # 0x795ad
leaq 0x10(%rsp), %rdi
callq 0xedf0
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0xf87c
movl %ebx, 0xc(%rsp)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12ef7
callq 0xc640
movq 0x81c4a(%rip), %r14     # 0x94b48
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r12
cmpq %r12, %rbx
je 0x1301b
leaq 0x10(%rsp), %r15
movq %rbp, 0x10(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x12380
cmpq $0x0, 0x18(%rsp)
je 0x12fff
movq 0x10(%rsp), %rax
cmpb $0x3a, (%rax)
jne 0x12f85
movl $0x1, %edx
leaq 0x48(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0xcb00
leaq 0x30(%r14), %rdi
movq %r13, %rsi
callq 0xc5e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x12fff
callq 0xc640
jmp 0x12fff
movq %r14, %rdi
movq %r15, %rsi
callq 0x17fc8
cmpq $0x0, (%rax)
jne 0x12ff1
movl $0x58, %edi
callq 0xc1d0
movq %rax, %r13
addq $0x8, %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r13)
movaps %xmm0, 0x20(%r13)
movaps %xmm0, 0x30(%r13)
movaps %xmm0, 0x40(%r13)
movaps %xmm0, (%r13)
movq $0x0, 0x50(%r13)
movq %r13, %rcx
addq $0x40, %rcx
movq %rax, 0x18(%r13)
movq %rax, 0x20(%r13)
movq %rcx, 0x30(%r13)
movb $0x0, 0x40(%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x17fc8
movq %r13, (%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x17fc8
movq (%rax), %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1300e
callq 0xc640
addq $0x20, %rbx
cmpq %r12, %rbx
jne 0x12f16
movl 0xc(%rsp), %eax
movl %eax, 0x50(%r14)
leaq 0x30(%rsp), %rdi
callq 0x11c2a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x13078
callq 0xc640
jmp 0x13078
movq %rax, %rbx
jmp 0x13078
jmp 0x13057
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1306e
callq 0xc640
jmp 0x1306e
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x11c2a
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/config.h
// Function: bool ConfigManager::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
T get(const std::string& k){
		if(typeid(T).name() == typeid(int).name())
			return configs_int[k];
		else if(typeid(T).name() == typeid(bool).name())
			return configs_bool[k];
		else
			return 0;
	}

// Assembly:
pushq %rax
movq 0x7beee(%rip), %rax     # 0x93fe8
movq 0x8(%rax), %rax
xorl %ecx, %ecx
cmpb $0x2a, (%rax)
sete %cl
addq %rax, %rcx
movq 0x7be98(%rip), %rax     # 0x93fa8
movq 0x8(%rax), %rax
xorl %edx, %edx
cmpb $0x2a, (%rax)
sete %dl
addq %rax, %rdx
cmpq %rdx, %rcx
je 0x18131
addq $0x70, %rdi
callq 0x1dbe6
movb (%rax), %al
jmp 0x18140
addq $0x38, %rdi
callq 0x12416
cmpl $0x0, (%rax)
setne %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/config.h
// Function: ConfigManager::try_set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ConfigManager& try_set(const std::string& k, const std::string& v){
		if(v == "on" || v == "off")
			configs_bool[k] = (v == "on");
		else{
			if(configs_str.find(k) != configs_str.end())
				configs_str[k] = v;
			else if(configs_int.find(k) != configs_int.end())
				configs_int[k] = atol(v.c_str());
		}
		return *this;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x606b4(%rip), %rsi     # 0x78914
movq %rdx, %rdi
callq 0xca10
testl %eax, %eax
je 0x182a7
leaq 0x599f3(%rip), %rsi     # 0x71c66
movq %r15, %rdi
callq 0xca10
testl %eax, %eax
je 0x182a7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1dfda
testq %rax, %rax
je 0x182d5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11edc
movq %rax, %rdi
movq %r15, %rsi
callq 0xcc40
jmp 0x182c9
leaq 0x60666(%rip), %rsi     # 0x78914
movq %r15, %rdi
callq 0xca10
movl %eax, %ebp
leaq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x1dbe6
testl %ebp, %ebp
sete (%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1e014
testq %rax, %rax
je 0x182c9
movq (%r15), %rdi
callq 0xc710
movq %rax, %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x12416
movl %r15d, (%rax)
jmp 0x182c9
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/config.h
// Function: ConfigManager::trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static std::string trim(const std::string& str){
		std::string::size_type pos = str.find_first_not_of(' ');
		if (pos == std::string::npos)
		{
			return str;
		}
		std::string::size_type pos2 = str.find_last_not_of(' ');
		if (pos2 != std::string::npos)
		{
			return str.substr(pos, pos2 - pos + 1);
		}
		return str.substr(pos);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0xc9e0
cmpq $-0x1, %rax
je 0x1e151
movq %rax, %r15
movq %r14, %rdi
movl $0x20, %esi
movq $-0x1, %rdx
callq 0xc780
cmpq $-0x1, %rax
je 0x1e16c
subq %r15, %rax
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
jmp 0x1e17c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x12380
jmp 0x1e181
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0xcb00
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/tags.h
// Function: HTMLTemplate::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void load_file(string s) {
		std::ifstream ifs(s);
		string line, sz;
		while (getline(ifs, line)) sz += trim(line);

		load(sz);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rdi, %rbx
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0xcbc0
leaq 0x50(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x10(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x30(%rsp), %rbp
leaq 0x40(%rsp), %r15
leaq 0x20(%rsp), %r12
movq %rsp, %r13
movq 0x80(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xcb80
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xc030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1e76c
movq %r12, %rdi
movq %r15, %rsi
callq 0x1e854
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r13, %rdi
callq 0xc830
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e709
callq 0xc640
jmp 0x1e709
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x12380
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e8de
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x1e7a7
callq 0xc640
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e7ba
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1e7ce
callq 0xc640
leaq 0x80(%rsp), %rdi
callq 0xc060
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
jne 0x1e80b
jmp 0x1e817
jmp 0x1e814
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e817
callq 0xc640
jmp 0x1e817
jmp 0x1e814
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e82a
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1e83e
callq 0xc640
leaq 0x80(%rsp), %rdi
callq 0xc060
movq %rbx, %rdi
callq 0xc760
nop
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/tags.h
// Function: HTMLTemplate::trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static string trim(const string& str)
	{
		string::size_type pos = str.find_first_not_of(' ');
		if (pos == string::npos)
		{
			return str;
		}
		string::size_type pos2 = str.find_last_not_of(' ');
		if (pos2 != string::npos)
		{
			return str.substr(pos, pos2 - pos + 1);
		}
		return str.substr(pos);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0xc9e0
cmpq $-0x1, %rax
je 0x1e8a5
movq %rax, %r15
movq %r14, %rdi
movl $0x20, %esi
movq $-0x1, %rdx
callq 0xc780
cmpq $-0x1, %rax
je 0x1e8c0
subq %r15, %rax
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
jmp 0x1e8d0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x12380
jmp 0x1e8d5
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0xcb00
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/views/list/gallery.cpp
// Function: views::gallery::showGallery(mg_connection*, int, int)
void showGallery(mg_connection* conn, cclong startID, cclong endID){
            struct Thread *r = unq_read_thread(pDb, 0); // get the root thread
            cclong c = 0;

            bool admin_view = is_admin(conn);

            cclong totalThreads = r->childCount;
            // cclong totalPages = 100;

            templates.invoke("site_slogan").pipe_to(conn).destory();

            for(cclong i = totalThreads; i > 0; --i){
                delete r;
                r = unq_read_thread(pDb, i);
                if(strlen(r->imgSrc) == 15 && r->state & NORMAL_DISPLAY) {
                    c++;
                    if (c >= startID && c <= endID){
                        mg_printf_data(conn, "<hr>");
                        views::each_thread(conn, r, SEND_SHOW_REPLY_LINK + SEND_CUT_LONG_COMMENT, admin_view);
                    }
                }
                
                if (c == endID + 1) break;
            }
            if(r) delete r;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r14
leaq 0x6f17f(%rip), %rbp     # 0x94bf8
movq (%rbp), %rdi
xorl %esi, %esi
callq 0xe181
movq %rax, %r15
movq %r14, %rdi
callq 0xef14
movb %al, 0x4(%rsp)
movl 0xcc(%r15), %r12d
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x4c61d(%rip), %rsi     # 0x720c7
leaq 0x4c621(%rip), %rdx     # 0x720d2
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0xedf0
leaq 0x6f263(%rip), %rdi     # 0x94d28
movq %r13, %rsi
callq 0x181be
movq %rax, %rdi
movq %r14, %rsi
callq 0x18304
movq %rax, %r13
movq %rax, %rdi
callq 0x19de2
movq %r13, %rdi
callq 0xc640
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x25afa
callq 0xc640
testl %r12d, %r12d
jle 0x25bc1
movq 0x10(%rsp), %rax
leal 0x1(%rax), %r13d
movzbl 0x4(%rsp), %eax
movl %eax, 0x4(%rsp)
xorl %ebx, %ebx
movl %r13d, 0x8(%rsp)
movq %r15, %rdi
callq 0xc640
movq (%rbp), %rdi
movl %r12d, %esi
callq 0xe181
movq %rax, %r15
leaq 0xa8(%rax), %rdi
callq 0xc460
cmpq $0xf, %rax
jne 0x25ba5
testb $0x1, (%r15)
je 0x25ba5
movq %rbp, %r13
movq %r14, %rbp
leal 0x1(%rbx), %r14d
cmpl 0xc(%rsp), %r14d
setl %al
cmpl 0x10(%rsp), %ebx
setge %cl
orb %al, %cl
jne 0x25b97
movq %rbp, %rdi
leaq 0x4c52a(%rip), %rsi     # 0x7209c
xorl %eax, %eax
callq 0x68533
movq %rbp, %rdi
movq %r15, %rsi
movl $0x6, %edx
movl 0x4(%rsp), %ecx
leaq 0x51ae3(%rip), %r8      # 0x77672
movq %r8, %r9
callq 0x22fc8
movl %r14d, %ebx
movq %rbp, %r14
movq %r13, %rbp
movl 0x8(%rsp), %r13d
cmpl %r13d, %ebx
je 0x25bbc
leal -0x1(%r12), %eax
cmpl $0x1, %r12d
movl %eax, %r12d
jg 0x25b1c
testq %r15, %r15
je 0x25bc9
movq %r15, %rdi
callq 0xc640
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x25bea
callq 0xc640
movq %r14, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/actions/chat.cpp
// Function: websocket::poll(mg_connection*)
void poll(mg_connection *conn) {
        if(!conn->connection_param) return;

        struct ChatData *d = (struct ChatData *) conn->connection_param;

        string username = cck_verify_ssid(d->ssid);
        if(username.empty()) return;

        struct mg_connection *c;

        if (conn->content_len > 5 && !memcmp(conn->content, "join ", 5)) {
        // Client joined new room
            d->roomID = conn->content[5];
        } else if (conn->content_len > 4 && !memcmp(conn->content, "msg ", 4) &&
                 d->roomID != 0 && d->roomID != '?') {
            broadcast(conn);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq 0x290(%rdi), %r12
testq %r12, %r12
je 0x2a64d
movq %rdi, %rbx
leaq 0x4(%r12), %r14
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r14, %rdi
callq 0xc460
leaq (%r12,%rax), %rdx
addq $0x4, %rdx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xedf0
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0xf673
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2a5ed
callq 0xc640
cmpq $0x0, 0x28(%rsp)
je 0x2a63a
movq 0x270(%rbx), %rax
cmpq $0x6, %rax
jb 0x2a625
movq 0x268(%rbx), %rax
movl $0x6e696f6a, %ecx       # imm = 0x6E696F6A
xorl (%rax), %ecx
movzbl 0x4(%rax), %edx
xorl $0x20, %edx
orl %ecx, %edx
jne 0x2a632
movsbl 0x5(%rax), %eax
movl %eax, (%r12)
jmp 0x2a63a
cmpq $0x5, %rax
jne 0x2a63a
movq 0x268(%rbx), %rax
cmpl $0x2067736d, (%rax)     # imm = 0x2067736D
je 0x2a65b
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a64d
callq 0xc640
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl (%r12), %eax
testl %eax, %eax
je 0x2a63a
cmpl $0x3f, %eax
je 0x2a63a
movq %rbx, %rdi
callq 0x2a2ac
jmp 0x2a63a
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x2a691
jmp 0x2a696
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2a696
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./src/actions/kill.cpp
// Function: actions::kill::call(mg_connection*, int, bool)
bool call(mg_connection* conn, int tid, bool admin){
            string username = cck_verify_ssid(conn);
            bool flag = false;

            if (!username.empty()){
                struct Thread* t = unq_read_thread(pDb, tid);

                if (strcmp(t->ssid, username.c_str()) == 0 || admin){
                    unq_delete_thread(pDb, tid);
                    logLog("%s has deleted No.%d", username.c_str(), tid);
                    flag = true;
                }
                else{
                    flag = false;
                }

                if(t) delete t;
            }else
                flag = false;

            return flag;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xf5d5
cmpq $0x0, 0x8(%rbx)
je 0x2ae8e
leaq 0x69dc3(%rip), %r12     # 0x94bf8
movq (%r12), %rdi
movl %ebp, %esi
callq 0xe181
movq %rax, %r14
leaq 0x91(%rax), %rdi
movq (%rsp), %rsi
callq 0xc950
testl %eax, %eax
sete %bl
orb %r15b, %bl
cmpb $0x1, %bl
jne 0x2ae7f
movq (%r12), %rdi
movl %ebp, %esi
callq 0xe1e4
movq (%rsp), %rsi
leaq 0x473d2(%rip), %rdi     # 0x72248
movl %ebp, %edx
xorl %eax, %eax
callq 0xfd7f
testq %r14, %r14
je 0x2ae90
movq %r14, %rdi
callq 0xc640
jmp 0x2ae90
xorl %ebx, %ebx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2aea3
callq 0xc640
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2aec8
callq 0xc640
movq %rbx, %rdi
callq 0xc760
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqlite_lib_shutdown
int unqlite_lib_shutdown(void)
{
	if( sUnqlMPGlobal.nMagic != UNQLITE_LIB_MAGIC ){
		/* Already shut */
		return UNQLITE_OK;
	}
	unqliteCoreShutdown();
	return UNQLITE_OK;
}

// Assembly:
cmpl $0xea1495ba, 0x66db8(%rip) # imm = 0xEA1495BA
jne 0x2db9e
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0x66d95(%rip)     # 0x947c8
jle 0x2da5f
movq 0x66d94(%rip), %rdi     # 0x947d0
movq 0x110(%rdi), %rbx
callq 0x2eb4d
movl 0x66d7a(%rip), %eax     # 0x947c8
leal -0x1(%rax), %ecx
movl %ecx, 0x66d71(%rip)     # 0x947c8
movq %rbx, %rdi
cmpl $0x1, %eax
jg 0x2da3c
leaq 0x66d2a(%rip), %rdi     # 0x94790
callq 0x399c8
movq 0x66d06(%rip), %rax     # 0x94778
testq %rax, %rax
je 0x2dab6
movq 0x66d02(%rip), %rdi     # 0x94780
testq %rdi, %rdi
je 0x2daa0
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x2da95
callq *%rcx
movq 0x66ce3(%rip), %rax     # 0x94778
movq $0x0, 0x66ce0(%rip) # 0x94780
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x2daab
callq *%rax
movq $0x0, 0x66cc2(%rip) # 0x94778
movl $0x0, 0x66cc8(%rip)     # 0x94788
cmpq $0x0, 0x66c00(%rip)     # 0x946c8
je 0x2dad6
leaq 0x66bef(%rip), %rdi     # 0x946c0
callq 0x2e588
movl $0x1764, 0x66cf8(%rip)  # imm = 0x1764
cmpl $0xea1495ba, 0x675e6(%rip) # imm = 0xEA1495BA
jne 0x2db98
cmpl $0x0, 0x675c9(%rip)     # 0x950c0
jle 0x2db23
movq 0x675c8(%rip), %rdi     # 0x950c8
movq 0x108(%rdi), %rbx
callq 0x399fe
movl 0x675ae(%rip), %eax     # 0x950c0
leal -0x1(%rax), %ecx
movl %ecx, 0x675a5(%rip)     # 0x950c0
movq %rbx, %rdi
cmpl $0x1, %eax
jg 0x2db00
movq 0x67576(%rip), %rax     # 0x950a0
testq %rax, %rax
je 0x2db6e
movq 0x67572(%rip), %rdi     # 0x950a8
testq %rdi, %rdi
je 0x2db58
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x2db4d
callq *%rcx
movq 0x67553(%rip), %rax     # 0x950a0
movq $0x0, 0x67550(%rip) # 0x950a8
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x2db63
callq *%rax
movq $0x0, 0x67532(%rip) # 0x950a0
movl $0x0, 0x67538(%rip)     # 0x950b0
cmpq $0x0, 0x67470(%rip)     # 0x94ff0
je 0x2db8e
leaq 0x6745f(%rip), %rdi     # 0x94fe8
callq 0x2e588
movl $0x1928, 0x67538(%rip)  # imm = 0x1928
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: SyMemBackendPoolAlloc
JX9_PRIVATE void * SyMemBackendPoolAlloc(SyMemBackend *pBackend, sxu32 nByte)
{
	void *pChunk;
#if defined(UNTRUST)
	if( SXMEM_BACKEND_CORRUPT(pBackend) ){
		return 0;
	}
#endif
	if( pBackend->pMutexMethods ){
		SyMutexEnter(pBackend->pMutexMethods, pBackend->pMutex);
	}
	pChunk = MemBackendPoolAlloc(&(*pBackend), nByte);
	if( pBackend->pMutexMethods ){
		SyMutexLeave(pBackend->pMutexMethods, pBackend->pMutex);
	}
	return pChunk;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x2e4a5
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2e4a5
callq *0x20(%rax)
movl %r14d, %esi
addq $0x8, %rsi
cmpl $0x7ff7, %r14d          # imm = 0x7FF7
jbe 0x2e4d4
movq %rbx, %rdi
callq 0x335ad
testq %rax, %rax
je 0x2e563
movq %rax, %r14
movl $0xdeadffff, (%rax)     # imm = 0xDEADFFFF
jmp 0x2e55d
testl %r14d, %r14d
je 0x2e4ea
movl $0x8, %ecx
xorl %eax, %eax
addl %ecx, %ecx
incl %eax
cmpl %esi, %ecx
jb 0x2e4e0
jmp 0x2e4ec
xorl %eax, %eax
movl %eax, %r15d
movq 0x40(%rbx,%r15,8), %r14
testq %r14, %r14
jne 0x2e54b
movq %rbx, %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x335ad
testq %rax, %rax
je 0x2e563
leal 0x3(%r15), %ecx
movl $0x1, %edx
shll %cl, %edx
movq %rax, 0x40(%rbx,%r15,8)
cmpl $0xe, %ecx
ja 0x2e53f
xorl %ecx, %ecx
movq %rdx, %rsi
leaq (%rax,%rsi), %rdi
movq %rdi, (%rax,%rcx)
addq %rdx, %rsi
addq %rdx, %rcx
cmpq $0x8000, %rsi           # imm = 0x8000
jb 0x2e525
addq %rcx, %rax
movq $0x0, (%rax)
movq 0x40(%rbx,%r15,8), %r14
movq (%r14), %rax
movq %rax, 0x40(%rbx,%r15,8)
orl $0xdead0000, %r15d      # imm = 0xDEAD0000
movl %r15d, (%r14)
addq $0x8, %r14
jmp 0x2e566
xorl %r14d, %r14d
movq (%rbx), %rax
testq %rax, %rax
je 0x2e57a
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2e57a
callq *0x30(%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq