// File: /workspace/github_cpp_makefile_star2_O1/wenleix[P]EdgePPR/src/CreateObjGraph.cpp
// Function: main
int main(int argv, char** argc) {
    paper_newid.reserve(10000000);

    if (argv != 3) {
        fprintf(stderr, "Usage: %s [BigRedFormatFile] [GraphName]\n", argc[0]);
        return 1;
    }

    FILE *wenleiFile = fopen(argc[1], "r");
    FILE *graphFile = fopen(argc[2], "w");

    while (true) {
        Publication *paper = readNewPaper(wenleiFile);
        if (paper == NULL) 
            break;
        papers.push_back(paper);
        if (paper->id >= paper_newid.size()) {
            paper_newid.resize(paper->id + 1, -1);
        }
        paper_newid[paper->id] = papers.size() - 1;
    }

    vector< pair<int, int> > paper_author;
    vector< pair<int, int> > paper_conf;        //  Note, paper_id to conf_id, need offset to generate global id.
    vector< pair<int, int> > conf_forum;

    //  Set up (paper, author) and (paper, venueyear) pairs.
    for (int i = 0; i < papers.size(); i++) {
        Publication* p = papers[i];
        int confId = GetOrCreateID(p->conf, conf_id, conf_name);
        int forumId = GetOrCreateID(p->forum, forum_id, forum_name);
        paper_conf.push_back(make_pair(i, confId));
        conf_forum.push_back(make_pair(confId, forumId));

        vector<string> authors;
        split(p->authors, ',', authors);
        for (string& a : authors) {
        	int aid = GetOrCreateID(a, author_id, author_name);
            paper_author.push_back(make_pair(i, aid));
        }
    }

    //	Unique Conf - Forum edges
    sort(conf_forum.begin(), conf_forum.end());
    conf_forum.resize(unique(conf_forum.begin(), conf_forum.end()) - conf_forum.begin());

    fprintf(stdout, "INFO: # Papers = %lu.\n", papers.size());
    fprintf(stdout, "INFO: # Authors = %lu.\n", author_name.size());
    fprintf(stdout, "INFO: # Conf = %lu.\n", conf_name.size());
    fprintf(stdout, "INFO: # Forum = %lu.\n", forum_name.size());

    fprintf(stdout, "INFO: #Paper-Author = %lu.\n", paper_author.size());
    fprintf(stdout, "INFO: #Paper-Conf = %lu.\n", paper_conf.size());
    fprintf(stdout, "INFO: #Conf-Forum = %lu.\n", conf_forum.size());

    //  Citation edges
    int missingCite = 0;
    int existCite = 0;
    int selfCite = 0;
    for (int i = 0; i < papers.size(); i++) {
        Publication *p = papers[i];
        for (auto rid : p->refs) {
            int newID = paper_newid[rid];
            if (i == newID) {
//            	fprintf(stderr, "Ignore self-loop: %d. \n", i);
            	selfCite++;
            	continue;
            }
            if (newID == -1) {
//                fprintf(stderr, "Debug: Paper ID %d is not occurred.\n", rid);
                missingCite++;
                continue;
            }
            outEdge[i].push_back(Edge(newID, 0 /* Cite */));
            existCite++;
        }
    }
    fprintf(stdout, "INFO: missingCite = %d, existCite = %d, selfCite = %d.\n", missingCite, existCite, selfCite);

    //  Make up the edges!
    int author_offset = papers.size();
    int conf_offset = author_offset + author_name.size();
    int forum_offset = conf_offset + conf_name.size();

    //  written_by and author_write
    for (pair<int, int> pa : paper_author) {
        int paperID = pa.first;
        int g_authorID = author_offset + pa.second;			//	GlobalID for this author
        outEdge[paperID].push_back(Edge(g_authorID, 1 /* written_by */));
        outEdge[g_authorID].push_back(Edge(paperID, 2 /* author_write */));
    }

    //  published_in and conf_publish_paper
    for (pair<int, int> pc : paper_conf) {
        int paperID = pc.first;
        int g_confID = conf_offset + pc.second;				//	GlobalID for this conf
        outEdge[paperID].push_back(Edge(g_confID, 3 /* published_in */ ));
        outEdge[g_confID].push_back(Edge(paperID, 4 /* conf_publish_paper */ ));
    }

    //	conf_calledby_forum and forum_call_conf
    for (pair<int, int> cf : conf_forum) {
    	int g_confID = conf_offset + cf.first;
    	int g_forumID = forum_offset + cf.second;
    	outEdge[g_confID].push_back(Edge(g_forumID, 5 /* conf_calledby_forum */ ));
    	outEdge[g_forumID].push_back(Edge(g_confID, 6 /* forum_call_conf */ ));
    }

    int numVertex = papers.size() + author_name.size() + conf_name.size() + forum_name.size();
    int numEdge = 0;
    for (int i = 0; i < numVertex; i++)
        numEdge += outEdge[i].size();

    fprintf(stderr, "# Vertices = %d, # Edges = %d.\n", numVertex, numEdge);
    fprintf(graphFile, "%d %d\n", numVertex, numEdge);
    //  Paper vertex
    for (int i = 0; i < papers.size(); i++) {
        fprintf(graphFile, "%d 0 %lu %s\n", i, outEdge[i].size(), papers[i]->title.c_str());
        WriteOutEdges(graphFile, outEdge[i]);
    }
    //  Author vertex
    for (int i = 0; i < author_name.size(); i++) {
        int g_authorID = author_offset + i;
        fprintf(graphFile, "%d 1 %lu %s\n", g_authorID, outEdge[g_authorID].size(), 
                                            author_name[i].c_str());
        WriteOutEdges(graphFile, outEdge[g_authorID]);
    }
    //  Conf vertex
    for (int i = 0; i < conf_name.size(); i++) {
        int g_confID = conf_offset + i;
        fprintf(graphFile, "%d 2 %lu %s\n", g_confID, outEdge[g_confID].size(),
                                            conf_name[i].c_str());
        WriteOutEdges(graphFile, outEdge[g_confID]);
    }
    //  Forum vertex
    for (int i = 0; i < forum_name.size(); i++) {
        int g_forumID = forum_offset + i;
        fprintf(graphFile, "%d 3 %lu %s\n", g_forumID, outEdge[g_forumID].size(),
                                            forum_name[i].c_str());
        WriteOutEdges(graphFile, outEdge[g_forumID]);
    }

    fclose(wenleiFile);
    fclose(graphFile);

    for (Publication* p : papers) 
        delete p;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xfa84b(%rip), %rdi     # 0xfd4a0
movl $0x989680, %esi         # imm = 0x989680
callq 0x38a0
cmpl $0x3, %ebp
jne 0x3717
movq 0x8(%rbx), %rdi
leaq 0x34fa(%rip), %rsi      # 0x616d
callq 0x2190
movq %rax, 0x88(%rsp)
movq 0x10(%rbx), %rdi
leaq 0x355c(%rip), %rsi      # 0x61e7
callq 0x2190
movq %rax, 0x98(%rsp)
leaq 0xfa819(%rip), %rbx     # 0xfd4b8
leaq 0x40(%rsp), %r14
leaq 0xfa7f5(%rip), %r15     # 0xfd4a0
leaq 0x70(%rsp), %r12
movq 0x88(%rsp), %rdi
callq 0x27cd
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x2d62
movq %rax, %r13
movq 0xfa7eb(%rip), %rsi     # 0xfd4c0
cmpq 0xfa7ec(%rip), %rsi     # 0xfd4c8
je 0x2ceb
movq %r13, (%rsi)
addq $0x8, 0xfa7d7(%rip)     # 0xfd4c0
jmp 0x2cf6
movq %rbx, %rdi
movq %r14, %rdx
callq 0x42d6
movq 0x40(%rsp), %rax
movslq 0x88(%rax), %rsi
movq 0xfa79f(%rip), %rax     # 0xfd4a8
subq 0xfa790(%rip), %rax     # 0xfd4a0
sarq $0x2, %rax
cmpq %rsi, %rax
ja 0x2d2f
incq %rsi
movl $0xffffffff, 0x70(%rsp) # imm = 0xFFFFFFFF
movq %r15, %rdi
movq %r12, %rdx
callq 0x392e
movq 0xfa78a(%rip), %rax     # 0xfd4c0
subq 0xfa77b(%rip), %rax     # 0xfd4b8
shrq $0x3, %rax
decl %eax
movq 0x40(%rsp), %rcx
movslq 0x88(%rcx), %rcx
movq 0xfa74a(%rip), %rdx     # 0xfd4a0
movl %eax, (%rdx,%rcx,4)
testq %r13, %r13
jne 0x2cb0
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq %rax, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0xfa729(%rip), %rax     # 0xfd4b8
cmpq %rax, 0xfa72a(%rip)     # 0xfd4c0
je 0x2ef8
xorl %r13d, %r13d
leaq 0xfa60a(%rip), %r14     # 0xfd3b0
leaq 0xfa6ab(%rip), %r15     # 0xfd458
movq (%rax,%r13,8), %rbp
leaq 0x68(%rbp), %rdi
leaq 0xfa62c(%rip), %rsi     # 0xfd3e8
leaq 0xfa6ad(%rip), %rdx     # 0xfd470
callq 0x2ba3
movl %eax, %r12d
leaq 0x48(%rbp), %rdi
leaq 0xfa64a(%rip), %rsi     # 0xfd420
leaq 0xfa6ab(%rip), %rdx     # 0xfd488
callq 0x2ba3
movl %eax, %ebx
movl %r12d, %r12d
movq %r12, %rax
shlq $0x20, %rax
orq %r13, %rax
movq %rax, (%rsp)
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x2e0f
movq %rax, (%rsi)
addq $0x8, 0x78(%rsp)
jmp 0x2e1c
leaq 0x70(%rsp), %rdi
movq %rsp, %rdx
callq 0x4986
shlq $0x20, %rbx
orq %r12, %rbx
movq %rbx, (%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x2e41
movq %rbx, (%rsi)
addq $0x8, 0x28(%rsp)
movq %rsp, %r12
jmp 0x2e51
leaq 0x20(%rsp), %rdi
movq %rsp, %r12
movq %r12, %rdx
callq 0x4986
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
addq $0x20, %rbp
movq %rbp, %rdi
movl $0x2c, %esi
movq %r12, %rdx
callq 0x260c
movq (%rsp), %rbp
movq 0x8(%rsp), %rbx
cmpq %rbx, %rbp
je 0x2ecf
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2ba3
shlq $0x20, %rax
orq %r13, %rax
movq %rax, 0xa0(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x2eb7
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0x2ec9
leaq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x4986
addq $0x20, %rbp
jmp 0x2e7e
movq %r12, %rdi
callq 0x37d0
incq %r13
movq 0xfa5df(%rip), %rcx     # 0xfd4c0
movq 0xfa5d0(%rip), %rax     # 0xfd4b8
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x2dad
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r14
cmpq %r14, %rbx
je 0x2f34
movq %r14, %rax
subq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4ac3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b76
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x4f3c
leaq 0x20(%rsp), %rdi
subq (%rdi), %rax
sarq $0x3, %rax
movq %rax, %rsi
callq 0x3962
movq 0x605a(%rip), %rbx      # 0x8fb8
movq (%rbx), %rdi
movq 0xfa558(%rip), %rdx     # 0xfd4c0
subq 0xfa549(%rip), %rdx     # 0xfd4b8
sarq $0x3, %rdx
leaq 0x326f(%rip), %rsi      # 0x61e9
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0xfa4d3(%rip), %rdx     # 0xfd460
subq 0xfa4c4(%rip), %rdx     # 0xfd458
sarq $0x5, %rdx
leaq 0x3261(%rip), %rsi      # 0x6200
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0xfa4c8(%rip), %rdx     # 0xfd478
subq 0xfa4b9(%rip), %rdx     # 0xfd470
sarq $0x5, %rdx
leaq 0x3256(%rip), %rsi      # 0x6218
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0xfa4bd(%rip), %rdx     # 0xfd490
subq 0xfa4ae(%rip), %rdx     # 0xfd488
sarq $0x5, %rdx
leaq 0x3248(%rip), %rsi      # 0x622d
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0x48(%rsp), %rdx
subq 0x40(%rsp), %rdx
sarq $0x3, %rdx
leaq 0x323f(%rip), %rsi      # 0x6243
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0x78(%rsp), %rdx
subq 0x70(%rsp), %rdx
sarq $0x3, %rdx
leaq 0x323c(%rip), %rsi      # 0x625f
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0x28(%rsp), %rdx
subq 0x20(%rsp), %rdx
sarq $0x3, %rdx
leaq 0x3237(%rip), %rsi      # 0x6279
xorl %eax, %eax
callq 0x21d0
movq 0xfa468(%rip), %rax     # 0xfd4b8
movl $0x0, %ebx
movl $0x0, 0x18(%rsp)
cmpq %rax, 0xfa45c(%rip)     # 0xfd4c0
je 0x3124
xorl %r13d, %r13d
movl $0x0, 0x18(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
movq (%rax,%r13,8), %rax
movq 0x90(%rax), %r15
movq 0x98(%rax), %r14
cmpq %r14, %r15
je 0x3103
leaq (,%r13,2), %rax
addq %r13, %rax
leaq 0xfa42e(%rip), %rcx     # 0xfd4d0
leaq (%rcx,%rax,8), %r12
movslq (%r15), %rax
movq 0xfa3f0(%rip), %rcx     # 0xfd4a0
movl (%rcx,%rax,4), %eax
cmpq %rax, %r13
jne 0x30bc
incl %ebp
jmp 0x30fa
cmpl $-0x1, %eax
je 0x30e7
movl %eax, (%rsp)
movl $0x0, 0x4(%rsp)
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x30ed
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%r12)
jmp 0x30f8
incl 0x18(%rsp)
jmp 0x30fa
movq %r12, %rdi
movq %rsp, %rdx
callq 0x50a0
incl %ebx
addq $0x4, %r15
cmpq %r14, %r15
jne 0x30a6
incq %r13
movq 0xfa3b3(%rip), %rcx     # 0xfd4c0
movq 0xfa3a4(%rip), %rax     # 0xfd4b8
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x3079
movq 0x5e8d(%rip), %rax      # 0x8fb8
movq (%rax), %rdi
leaq 0x315e(%rip), %rsi      # 0x6293
movl 0x18(%rsp), %edx
movl %ebx, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x21d0
movq 0xfa374(%rip), %rcx     # 0xfd4c0
subq 0xfa365(%rip), %rcx     # 0xfd4b8
movq 0xfa306(%rip), %rax     # 0xfd460
subq 0xfa2f7(%rip), %rax     # 0xfd458
movq %rax, 0x18(%rsp)
movq %rcx, 0x90(%rsp)
movq 0xfa303(%rip), %rax     # 0xfd478
subq 0xfa2f4(%rip), %rax     # 0xfd470
movq %rax, 0x60(%rsp)
sarq $0x3, %rcx
movq %rcx, 0x68(%rsp)
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rbp
cmpq %rbp, %r15
je 0x3235
movslq 0x68(%rsp), %r12
leaq 0xfa327(%rip), %r13     # 0xfd4d0
movslq (%r15), %r14
movslq 0x4(%r15), %rbx
addq %r12, %rbx
leaq (%r14,%r14,2), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl %ebx, (%rsp)
movl $0x1, 0x4(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x31e5
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x31ed
movq %rsp, %rdx
callq 0x50a0
leaq (%rbx,%rbx,2), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl %r14d, (%rsp)
movl $0x2, 0x4(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3220
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x3228
movq %rsp, %rdx
callq 0x50a0
addq $0x8, %r15
cmpq %rbp, %r15
jne 0x31a9
movq 0x18(%rsp), %rcx
sarq $0x5, %rcx
addq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r14
movq 0x78(%rsp), %r15
cmpq %r15, %r14
movq %rcx, 0x18(%rsp)
je 0x32fb
movslq %ecx, %r12
leaq 0xfa26b(%rip), %r13     # 0xfd4d0
movslq (%r14), %rbp
movslq 0x4(%r14), %rbx
addq %r12, %rbx
leaq (,%rbp,2), %rax
addq %rbp, %rax
leaq (%r13,%rax,8), %rdi
movl %ebx, (%rsp)
movl $0x3, 0x4(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x32a2
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x32aa
movq %rsp, %rdx
callq 0x50a0
leaq (%rbx,%rbx,2), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl %ebp, (%rsp)
movl $0x4, 0x4(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x32e1
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
movq 0x18(%rsp), %rcx
jmp 0x32ee
movq %rsp, %rdx
callq 0x50a0
movq 0x18(%rsp), %rcx
addq $0x8, %r14
cmpq %r15, %r14
jne 0x3265
movq 0x60(%rsp), %rax
shrq $0x5, %rax
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq %rax, %r14
je 0x33c6
movslq 0x18(%rsp), %rbp
movslq 0x60(%rsp), %r12
leaq 0xfa19b(%rip), %r13     # 0xfd4d0
movslq (%r14), %rbx
movslq 0x4(%r14), %r15
addq %rbp, %rbx
addq %r12, %r15
leaq (%rbx,%rbx,2), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl %r15d, (%rsp)
movl $0x5, 0x4(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3375
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x337d
movq %rsp, %rdx
callq 0x50a0
leaq (%r15,%r15,2), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl %ebx, (%rsp)
movl $0x6, 0x4(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x33af
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x33b7
movq %rsp, %rdx
callq 0x50a0
addq $0x8, %r14
cmpq 0x68(%rsp), %r14
jne 0x3335
movq 0xfa0f3(%rip), %rax     # 0xfd4c0
subq 0xfa0e4(%rip), %rax     # 0xfd4b8
shrq $0x3, %rax
movq 0xfa081(%rip), %rcx     # 0xfd460
subq 0xfa072(%rip), %rcx     # 0xfd458
shrq $0x5, %rcx
addq %rax, %rcx
movq 0xfa084(%rip), %rax     # 0xfd478
subq 0xfa075(%rip), %rax     # 0xfd470
shrq $0x5, %rax
movq 0xfa08a(%rip), %rbx     # 0xfd490
subq 0xfa07b(%rip), %rbx     # 0xfd488
shrq $0x5, %rbx
addq %rax, %rbx
addq %rcx, %rbx
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0x3446
movl %ebx, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
negq %rax
xorl %ebp, %ebp
leaq 0xfa0a8(%rip), %rcx     # 0xfd4d8
movq (%rcx), %rdx
subq -0x8(%rcx), %rdx
shrq $0x3, %rdx
addl %edx, %ebp
addq $0x18, %rcx
incq %rax
jne 0x3430
movq 0x5b93(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x2e74(%rip), %rsi      # 0x62cb
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21d0
leaq 0x2d4d(%rip), %rsi      # 0x61b6
movq 0x98(%rsp), %r13
movq %r13, %rdi
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21d0
movq 0xfa032(%rip), %rax     # 0xfd4b8
cmpq %rax, 0xfa033(%rip)     # 0xfd4c0
je 0x34ee
leaq 0xfa03a(%rip), %rbx     # 0xfd4d0
leaq 0x2e4e(%rip), %r14      # 0x62eb
xorl %r15d, %r15d
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
movq (%rax,%r15,8), %rax
movq (%rax), %r8
movq %r13, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x21d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2bf1
incq %r15
movq 0xf9fe9(%rip), %rcx     # 0xfd4c0
movq 0xf9fda(%rip), %rax     # 0xfd4b8
subq %rax, %rcx
sarq $0x3, %rcx
addq $0x18, %rbx
cmpq %r15, %rcx
ja 0x34a0
movq 0xf9f63(%rip), %rax     # 0xfd458
cmpq %rax, 0xf9f64(%rip)     # 0xfd460
movq 0x90(%rsp), %rbp
je 0x3579
shrq $0x3, %rbp
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0xf9fb8(%rip), %rdx     # 0xfd4d0
leaq (%rdx,%rcx,8), %rbx
leaq 0x2dd5(%rip), %r14      # 0x62f8
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
movq (%rax,%r15), %r8
leal (%r12,%rbp), %edx
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2bf1
incq %r12
movq 0xf9f02(%rip), %rcx     # 0xfd460
movq 0xf9ef3(%rip), %rax     # 0xfd458
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r15
addq $0x18, %rbx
cmpq %r12, %rcx
ja 0x3529
movq 0xf9ef0(%rip), %rax     # 0xfd470
cmpq %rax, 0xf9ef1(%rip)     # 0xfd478
movq 0x18(%rsp), %rbp
je 0x35fd
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0xf9f34(%rip), %rdx     # 0xfd4d0
leaq (%rdx,%rcx,8), %rbx
leaq 0x2d5e(%rip), %r14      # 0x6305
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
movq (%rax,%r15), %r8
leal (%r12,%rbp), %edx
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2bf1
incq %r12
movq 0xf9e96(%rip), %rcx     # 0xfd478
movq 0xf9e87(%rip), %rax     # 0xfd470
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r15
addq $0x18, %rbx
cmpq %r12, %rcx
ja 0x35ad
movq 0xf9e84(%rip), %rax     # 0xfd488
cmpq %rax, 0xf9e85(%rip)     # 0xfd490
movq 0x60(%rsp), %rbp
je 0x3681
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0xf9eb0(%rip), %rdx     # 0xfd4d0
leaq (%rdx,%rcx,8), %rbx
leaq 0x2ce7(%rip), %r14      # 0x6312
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
movq (%rax,%r15), %r8
leal (%r12,%rbp), %edx
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2bf1
incq %r12
movq 0xf9e2a(%rip), %rcx     # 0xfd490
movq 0xf9e1b(%rip), %rax     # 0xfd488
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r15
addq $0x18, %rbx
cmpq %r12, %rcx
ja 0x3631
movq 0x88(%rsp), %rdi
callq 0x2160
movq %r13, %rdi
callq 0x2160
movq 0xf9e1b(%rip), %r14     # 0xfd4b8
movq 0xf9e1c(%rip), %r15     # 0xfd4c0
cmpq %r15, %r14
je 0x3726
movq (%r14), %rbx
testq %rbx, %rbx
je 0x3711
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x36c2
callq 0x2150
movq 0x68(%rbx), %rdi
leaq 0x78(%rbx), %rax
cmpq %rax, %rdi
je 0x36d4
callq 0x2150
movq 0x48(%rbx), %rdi
leaq 0x58(%rbx), %rax
cmpq %rax, %rdi
je 0x36e6
callq 0x2150
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x36f8
callq 0x2150
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x3709
callq 0x2150
movq %rbx, %rdi
callq 0x2150
addq $0x8, %r14
jmp 0x36a4
movq %rbx, %rdi
callq 0x22a0
movl $0x1, %eax
jmp 0x3755
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3735
callq 0x2150
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x3744
callq 0x2150
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3753
callq 0x2150
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x3783
jmp 0x378a
jmp 0x3783
jmp 0x3783
movq %rax, %rbx
jmp 0x3795
jmp 0x378a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x37d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x37a4
callq 0x2150
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x37b3
callq 0x2150
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x37c2
callq 0x2150
movq %rbx, %rdi
callq 0x2250