// File: /workspace/github_cpp_makefile_star2_O2/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 $0xb8, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xf9a18(%rip), %rdi     # 0xfc4a0
movl $0x989680, %esi         # imm = 0x989680
callq 0x34e8
cmpl $0x3, %ebp
jne 0x2b76
movq 0x8(%rbx), %rdi
leaq 0x2697(%rip), %rsi      # 0x513d
callq 0x2180
movq %rax, 0x98(%rsp)
movq 0x10(%rbx), %rdi
leaq 0x26f9(%rip), %rsi      # 0x51b7
callq 0x2180
movq %rax, 0x28(%rsp)
leaq 0xf99e9(%rip), %rbx     # 0xfc4b8
leaq 0x50(%rsp), %r14
leaq 0xf99c5(%rip), %r15     # 0xfc4a0
leaq 0x80(%rsp), %r12
movq 0x98(%rsp), %rdi
callq 0x26ee
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x2b99
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3578
movq 0x50(%rsp), %rax
movslq 0x88(%rax), %rax
movq 0xf998c(%rip), %rdx     # 0xfc4a8
movq 0xf997d(%rip), %rcx     # 0xfc4a0
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rax, %rdx
ja 0x2b5a
incl %eax
movslq %eax, %rsi
orl $-0x1, 0x80(%rsp)
movq %r15, %rdi
movq %r12, %rdx
callq 0x3596
movq 0x50(%rsp), %rax
movslq 0x88(%rax), %rax
movq 0xf9946(%rip), %rcx     # 0xfc4a0
movq 0xf995f(%rip), %rdx     # 0xfc4c0
subq 0xf9950(%rip), %rdx     # 0xfc4b8
shrq $0x3, %rdx
decl %edx
movl %edx, (%rcx,%rax,4)
jmp 0x2ae3
movq 0x5463(%rip), %rax      # 0x7fe0
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x2603(%rip), %rsi      # 0x518d
xorl %eax, %eax
callq 0x21d0
pushq $0x1
popq %rax
jmp 0x335f
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x80(%rsp), %rax
andq $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rcx
andq $0x0, 0x10(%rcx)
movaps %xmm0, (%rax)
movaps %xmm0, (%rcx)
xorl %r15d, %r15d
leaq 0xf97e0(%rip), %r14     # 0xfc3b0
leaq 0xf9881(%rip), %rbx     # 0xfc458
leaq 0xb0(%rsp), %r12
movq 0xf98da(%rip), %rcx     # 0xfc4c0
movq 0xf98cb(%rip), %rax     # 0xfc4b8
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x2ced
movq (%rax,%r15,8), %r13
leaq 0x68(%r13), %rdi
leaq 0xf97dc(%rip), %rsi     # 0xfc3e8
leaq 0xf985d(%rip), %rdx     # 0xfc470
callq 0x29d9
movl %eax, %ebp
movq %r13, 0x8(%rsp)
leaq 0x48(%r13), %rdi
leaq 0xf97f6(%rip), %rsi     # 0xfc420
leaq 0xf9857(%rip), %rdx     # 0xfc488
callq 0x29d9
movl %eax, %r13d
movl %ebp, %ebp
movq %rbp, %rax
shlq $0x20, %rax
orq %r15, %rax
movq %rax, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4268
shlq $0x20, %r13
orq %rbp, %r13
movq %r13, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0x4268
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
pushq $0x2c
popq %rsi
movq %r13, %rdx
callq 0x257c
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r13
cmpq %r13, %rbp
je 0x2cdb
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x29d9
shlq $0x20, %rax
orq %r15, %rax
movq %rax, 0xb0(%rsp)
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0x4268
addq $0x20, %rbp
jmp 0x2ca6
leaq 0x10(%rsp), %rdi
callq 0x33d0
incq %r15
jmp 0x2bdf
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x43c3
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x4957
leaq 0x30(%rsp), %rdi
subq (%rdi), %rax
sarq $0x3, %rax
movq %rax, %rsi
callq 0x35ca
movq 0x52a2(%rip), %rbx      # 0x7fc8
movq (%rbx), %rdi
movq 0xf9790(%rip), %rdx     # 0xfc4c0
subq 0xf9781(%rip), %rdx     # 0xfc4b8
sarq $0x3, %rdx
leaq 0x2477(%rip), %rsi      # 0x51b9
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0xf970a(%rip), %rdx     # 0xfc460
subq 0xf96fb(%rip), %rdx     # 0xfc458
sarq $0x5, %rdx
leaq 0x2468(%rip), %rsi      # 0x51d0
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0xf96ff(%rip), %rdx     # 0xfc478
subq 0xf96f0(%rip), %rdx     # 0xfc470
sarq $0x5, %rdx
leaq 0x245d(%rip), %rsi      # 0x51e8
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0xf96f4(%rip), %rdx     # 0xfc490
subq 0xf96e5(%rip), %rdx     # 0xfc488
sarq $0x5, %rdx
leaq 0x244f(%rip), %rsi      # 0x51fd
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0x58(%rsp), %rdx
subq 0x50(%rsp), %rdx
sarq $0x3, %rdx
leaq 0x2446(%rip), %rsi      # 0x5213
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0x88(%rsp), %rdx
subq 0x80(%rsp), %rdx
sarq $0x3, %rdx
leaq 0x243d(%rip), %rsi      # 0x522f
xorl %eax, %eax
callq 0x21d0
movq (%rbx), %rdi
movq 0x38(%rsp), %rdx
subq 0x30(%rsp), %rdx
sarq $0x3, %rdx
leaq 0x2438(%rip), %rsi      # 0x5249
xorl %eax, %eax
callq 0x21d0
xorl %ebx, %ebx
xorl %ebp, %ebp
movl $0x0, 0x8(%rsp)
movq 0xf9695(%rip), %rcx     # 0xfc4c0
movq 0xf9686(%rip), %rax     # 0xfc4b8
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x2eab
movq (%rax,%r15,8), %rax
movq 0x90(%rax), %r12
movq 0x98(%rax), %r14
imulq $0x18, %r15, %r13
leaq 0xf9675(%rip), %rax     # 0xfc4d0
addq %rax, %r13
cmpq %r14, %r12
je 0x2ea3
movslq (%r12), %rax
movq 0xf9632(%rip), %rcx     # 0xfc4a0
movl (%rcx,%rax,4), %eax
cmpq %rax, %r15
jne 0x2e7a
incl %ebx
jmp 0x2e9d
cmpl $-0x1, %eax
je 0x2e99
movl %eax, 0x10(%rsp)
andl $0x0, 0x14(%rsp)
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x4ae4
incl %ebp
jmp 0x2e9d
incl 0x8(%rsp)
addq $0x4, %r12
jmp 0x2e5e
incq %r15
jmp 0x2e24
movq 0x5116(%rip), %rax      # 0x7fc8
movq (%rax), %rdi
leaq 0x23a7(%rip), %rsi      # 0x5263
movl 0x8(%rsp), %edx
movl %ebp, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x21d0
movq 0xf95ed(%rip), %rax     # 0xfc4c0
subq 0xf95de(%rip), %rax     # 0xfc4b8
movq %rax, 0xa0(%rsp)
movq 0xf9577(%rip), %rsi     # 0xfc460
subq 0xf9568(%rip), %rsi     # 0xfc458
sarq $0x3, %rax
sarq $0x5, %rsi
addq %rax, %rsi
movq 0xf9576(%rip), %rcx     # 0xfc478
subq 0xf9567(%rip), %rcx     # 0xfc470
shrq $0x5, %rcx
movq %rsi, 0x78(%rsp)
addq %rsi, %rcx
movq %rcx, 0x70(%rsp)
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movslq %eax, %r13
leaq 0x10(%rsp), %rbx
cmpq 0x8(%rsp), %r14
je 0x2f86
movslq (%r14), %r12
movslq 0x4(%r14), %rbp
addq %r13, %rbp
imulq $0x18, %r12, %rdi
leaq 0xf9583(%rip), %r15     # 0xfc4d0
addq %r15, %rdi
movl %ebp, 0x10(%rsp)
movl $0x1, 0x14(%rsp)
movq %rbx, %rsi
callq 0x4ae4
imulq $0x18, %rbp, %rdi
addq %r15, %rdi
movl %r12d, 0x10(%rsp)
movl $0x2, 0x14(%rsp)
movq %rbx, %rsi
callq 0x4ae4
addq $0x8, %r14
jmp 0x2f31
movq 0x80(%rsp), %r15
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movslq 0x78(%rsp), %r14
leaq 0x10(%rsp), %rbx
cmpq 0x8(%rsp), %r15
je 0x2ffa
movslq (%r15), %r12
movslq 0x4(%r15), %rbp
addq %r14, %rbp
imulq $0x18, %r12, %rdi
leaq 0xf950f(%rip), %r13     # 0xfc4d0
addq %r13, %rdi
movl %ebp, 0x10(%rsp)
movl $0x3, 0x14(%rsp)
movq %rbx, %rsi
callq 0x4ae4
imulq $0x18, %rbp, %rdi
addq %r13, %rdi
movl %r12d, 0x10(%rsp)
movl $0x4, 0x14(%rsp)
movq %rbx, %rsi
callq 0x4ae4
addq $0x8, %r15
jmp 0x2fa5
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movslq 0x70(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x10(%rsp), %rbx
cmpq 0x8(%rsp), %r15
je 0x3078
movslq (%r15), %r12
movslq 0x4(%r15), %rbp
addq 0xa8(%rsp), %rbp
addq %r14, %r12
imulq $0x18, %r12, %rdi
leaq 0xf9491(%rip), %r13     # 0xfc4d0
addq %r13, %rdi
movl %ebp, 0x10(%rsp)
movl $0x5, 0x14(%rsp)
movq %rbx, %rsi
callq 0x4ae4
imulq $0x18, %rbp, %rdi
addq %r13, %rdi
movl %r12d, 0x10(%rsp)
movl $0x6, 0x14(%rsp)
movq %rbx, %rsi
callq 0x4ae4
addq $0x8, %r15
jmp 0x301b
movq 0xf9441(%rip), %rax     # 0xfc4c0
subq 0xf9432(%rip), %rax     # 0xfc4b8
movq 0xf93d3(%rip), %rcx     # 0xfc460
subq 0xf93c4(%rip), %rcx     # 0xfc458
shrq $0x3, %rax
shrq $0x5, %rcx
addl %eax, %ecx
movq 0xf93d3(%rip), %rax     # 0xfc478
subq 0xf93c4(%rip), %rax     # 0xfc470
shrq $0x5, %rax
movq 0xf93d9(%rip), %rbx     # 0xfc490
subq 0xf93ca(%rip), %rbx     # 0xfc488
shrq $0x5, %rbx
addl %eax, %ebx
addl %ecx, %ebx
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
imulq $0x18, %rcx, %rcx
xorl %ebp, %ebp
leaq 0xf93f1(%rip), %r12     # 0xfc4d0
cmpq %rax, %rcx
je 0x30f9
movq 0x8(%rax,%r12), %rdx
subq (%rax,%r12), %rdx
shrq $0x3, %rdx
addl %edx, %ebp
addq $0x18, %rax
jmp 0x30df
movq 0x4ee0(%rip), %rax      # 0x7fe0
movq (%rax), %rdi
leaq 0x2191(%rip), %rsi      # 0x529b
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21d0
leaq 0x206a(%rip), %rsi      # 0x5186
movq 0x28(%rsp), %rdi
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x21d0
leaq 0x2188(%rip), %rbx      # 0x52bb
xorl %r14d, %r14d
movq 0x28(%rsp), %r15
movq 0xf937e(%rip), %rcx     # 0xfc4c0
movq 0xf936f(%rip), %rax     # 0xfc4b8
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x318d
movq 0x8(%r12), %rcx
subq (%r12), %rcx
sarq $0x3, %rcx
movq (%rax,%r14,8), %rax
movq (%rax), %r8
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x21d0
movq %r15, %rdi
movq %r12, %rsi
callq 0x2a27
incq %r14
addq $0x18, %r12
jmp 0x313b
movq 0xa0(%rsp), %rax
shrq $0x3, %rax
movq %rax, %r14
cltq
imulq $0x18, %rax, %rbx
leaq 0xf9327(%rip), %r15     # 0xfc4d0
addq %r15, %rbx
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x28(%rsp), %r12
movq 0xf92a3(%rip), %rcx     # 0xfc460
movq 0xf9294(%rip), %rax     # 0xfc458
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r13, %rcx
jbe 0x320c
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
movq (%rax,%rbp), %r8
leal (%r14,%r13), %edx
movq %r12, %rdi
leaq 0x20db(%rip), %rsi      # 0x52c8
xorl %eax, %eax
callq 0x21d0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2a27
incq %r13
addq $0x20, %rbp
addq $0x18, %rbx
jmp 0x31b6
movslq 0x78(%rsp), %rax
imulq $0x18, %rax, %rbx
addq %r15, %rbx
leaq 0x20b6(%rip), %r14      # 0x52d5
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x28(%rsp), %r13
movq 0xf9248(%rip), %rcx     # 0xfc478
movq 0xf9239(%rip), %rax     # 0xfc470
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbp, %rcx
jbe 0x327f
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x3, %rcx
movq (%rax,%r12), %r8
movq 0x78(%rsp), %rax
leal (%rax,%rbp), %edx
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2a27
incq %rbp
addq $0x20, %r12
addq $0x18, %rbx
jmp 0x3229
movslq 0x70(%rsp), %rax
imulq $0x18, %rax, %rax
addq %rax, %r15
leaq 0x2050(%rip), %rbx      # 0x52e2
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x28(%rsp), %r13
movq 0xf91ec(%rip), %rcx     # 0xfc490
movq 0xf91dd(%rip), %rax     # 0xfc488
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r12, %rcx
jbe 0x32f4
movq 0x8(%r15), %rcx
subq (%r15), %rcx
sarq $0x3, %rcx
movq (%rax,%r14), %r8
movq 0x70(%rsp), %rax
leal (%rax,%r12), %edx
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x21d0
movq %r13, %rdi
movq %r15, %rsi
callq 0x2a27
incq %r12
addq $0x20, %r14
addq $0x18, %r15
jmp 0x329d
movq 0x98(%rsp), %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
callq 0x2160
movq 0xf91a6(%rip), %r14     # 0xfc4b8
movq 0xf91a7(%rip), %r15     # 0xfc4c0
cmpq %r15, %r14
je 0x333c
movq (%r14), %rbx
testq %rbx, %rbx
je 0x332e
movq %rbx, %rdi
callq 0x35fc
movq %rbx, %rdi
callq 0x2150
addq $0x8, %r14
jmp 0x3319
leaq 0x30(%rsp), %rdi
callq 0x425a
leaq 0x80(%rsp), %rdi
callq 0x425a
leaq 0x50(%rsp), %rdi
callq 0x425a
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x3394
jmp 0x338d
jmp 0x338d
jmp 0x338d
jmp 0x338d
movq %rax, %rbx
jmp 0x33a1
jmp 0x3394
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33d0
leaq 0x30(%rsp), %rdi
callq 0x425a
leaq 0x80(%rsp), %rdi
callq 0x425a
leaq 0x50(%rsp), %rdi
callq 0x425a
movq %rbx, %rdi
callq 0x2250