// File: /workspace/github_cpp_makefile_star2_O2/girdhari9[P]mTORRENT/ClientConnection.cpp
// Function: FunctionCalling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>)
int FunctionCalling(string filename, int RequestType,string SHA_TO_Add, string root_path){
    sem_init(&mutex1, 0, 1);
    int FileSize;
    string FileName, SHA;
    if(filename.size() > 9 && filename.substr(filename.size()-9) != ".mtorrent"){
        cout<<"\n> Please give name of mtorrent file!\n";
        return 0;
    }

    int TorrentFileD = open(filename.c_str(), O_RDONLY, O_SYNC);
    ReadFileByLine(TorrentFileD,1);

    int sock = TrackerConnection(mTorrentFileData[0],atoi(mTorrentFileData[1].c_str()));
    if(sock == -1){
        cout<<"Error in connection\n";
        exit(0);
    }
    else{
        cout<<"> Connected with Tracker: "<<mTorrentFileData[0]<<":"<<mTorrentFileData[1]<<"";
    }
    if(RequestType == 1){

        ReadFileByLine(TorrentFileD,0);
        ReadFileByLine(TorrentFileD,0);
        int FileSize = stoi(mTorrentFileData[0]);
        int TotalPacket = FileSize/DataSize;
        int LastPartSize = FileSize - TotalPacket * DataSize;
        if(LastPartSize) TotalPacket++;

        SendToSeederList(filename,SHA_TO_Add,sock,root_path,1);
        SetBitMap(TotalPacket, 1, SHA_TO_Add);
        close(sock);
        close(TorrentFileD);
        printf("> Connection closed!\n");
    }
    else if(RequestType == 2){
        ReadFileByLine(TorrentFileD,0);
        ReadFileByLine(TorrentFileD,0);
        ReadFileByLine(TorrentFileD,0);

        SHA = ReadSHA(TorrentFileD);
        SHA = SHA.substr(0,20);
        SendToSeederList(filename,SHA,sock,root_path,2);
        close(sock);
        close(TorrentFileD);
        printf("> Connection closed!\n");
    }
    else{
        ReadFileByLine(TorrentFileD,0);
        cout<<"> You are requesting to download: "<<mTorrentFileData[0];
        FileName = mTorrentFileData[0];

        ReadFileByLine(TorrentFileD,0);
        cout<<"> File Size: "<<mTorrentFileData[0];
        FileSize = stoi(mTorrentFileData[0]);

        ReadFileByLine(TorrentFileD,0);
        SHA = ReadSHA(TorrentFileD);
        SHA = SHA.substr(0,20);

        GetSeedersDetails(sock,SHA);
        
        SendToSeederList(filename,SHA,sock,root_path,1);

        close(sock);
        close(TorrentFileD);
        cout<<"> Tracker Connection Closed!\n";

        // Connections using multithreads
        int ConDetailIndex = 0;
        TotalConn = ConDetail.size()/3;

        int LastPartSize = 0;
        int TotalPacket = FileSize/DataSize;
        LastPartSize = FileSize - TotalPacket * DataSize;

        if(LastPartSize) TotalPacket++;

        SetBitMap(TotalPacket, 0, SHA);

        int BitMap[TotalPacket];
        memset(&BitMap, -1, sizeof(BitMap));

        thread *threadptr = new thread[TotalConn];
        for(int thread_n = 0; thread_n < TotalConn; thread_n++,ConDetailIndex+=3){
            threadptr[thread_n] = thread(BitVectorRequestToServers,ConDetail[ConDetailIndex],atoi(ConDetail[ConDetailIndex+1].c_str()),thread_n,TotalPacket,ref(SHA));
        }
        
        for(int thread_n=0; thread_n < TotalConn; thread_n++,ConDetailIndex++){
            threadptr[thread_n].join();
        }

        delete [] threadptr;

        PieceSelection(TotalPacket,TotalConn,BitMap);

        vector<int> BitMap1(BitMap, BitMap + sizeof(BitMap) / sizeof(BitMap[0]));

        ConDetailIndex = 0;
        ofstream output;
        string NewFileName = "new_" + FileName.substr(0,FileName.size()-1);
        output.open(NewFileName.c_str(), ofstream::binary);

        thread *Threadptr = new thread[TotalConn];
        for(int thread_n = 0; thread_n < TotalConn; thread_n++,ConDetailIndex+=3){
            Threadptr[thread_n] = thread(clientConnection,ConDetail[ConDetailIndex],atoi(ConDetail[ConDetailIndex+1].c_str()),ref(FileName),FileSize,LastPartSize,TotalPacket,BitMap1,thread_n,ref(output),ref(SHA));
        }
        
        for(int thread_n=0; thread_n < TotalConn; thread_n++,ConDetailIndex++){
            Threadptr[thread_n].join();
        }
        //End of MultithNewFileNameread
        output.close();
    }
    // RecieveData(sock,FileName,FileSize);
    sem_destroy(&mutex1);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movq %rcx, -0x40(%rbp)
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %r12
leaq 0x9b1c(%rip), %rdi      # 0x108f0
xorl %ebx, %ebx
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x42e0
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %bl, (%rax)
movb %bl, (%rcx)
movq 0x8(%r12), %rdx
cmpq $0xa, %rdx
jb 0x6e5f
addq $-0x9, %rdx
leaq -0x4b0(%rbp), %rdi
pushq $-0x1
popq %rcx
movq %r12, %rsi
callq 0x4360
leaq 0x4222(%rip), %rsi      # 0xb04b
leaq -0x4b0(%rbp), %rdi
callq 0x61e9
movl %eax, %ebx
leaq -0x4b0(%rbp), %rdi
callq 0x4678
testb %bl, %bl
je 0x6e5f
movq 0x917a(%rip), %rdi      # 0xffc8
leaq 0x44ed(%rip), %rsi      # 0xb342
callq 0x4330
jmp 0x76ed
movq (%r12), %rdi
xorl %esi, %esi
movl $0x101000, %edx         # imm = 0x101000
xorl %eax, %eax
callq 0x4270
movl %eax, %ebx
pushq $0x1
popq %rsi
movl %eax, %edi
callq 0x789a
movq 0x9a54(%rip), %rsi      # 0x108d8
leaq -0x250(%rbp), %rdi
callq 0x4470
movq 0x9a41(%rip), %rax      # 0x108d8
movq 0x20(%rax), %rdi
callq 0x44f0
leaq -0x250(%rbp), %rdi
movl %eax, %esi
callq 0x79e1
movl %eax, %r14d
leaq -0x250(%rbp), %rdi
callq 0x4678
movl %r14d, -0x38(%rbp)
cmpl $-0x1, %r14d
je 0x7713
movq 0x90f6(%rip), %rdi      # 0xffc8
leaq 0x44a5(%rip), %rsi      # 0xb37e
callq 0x4330
movq 0x99f3(%rip), %rsi      # 0x108d8
movq %rax, %rdi
callq 0x4300
leaq 0x41fe(%rip), %rsi      # 0xb0f2
movq %rax, %rdi
callq 0x4330
movq 0x99d5(%rip), %rsi      # 0x108d8
addq $0x20, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0x44d1(%rip), %rsi      # 0xb3e7
movq %rax, %rdi
callq 0x4330
cmpl $0x2, %r15d
je 0x7028
cmpl $0x1, %r15d
jne 0x712f
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
movq 0x998d(%rip), %rdi      # 0x108d8
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x607b
movl %eax, %ecx
movl $0x400, %esi            # imm = 0x400
cltd
idivl %esi
movl %eax, %r15d
shll $0xa, %eax
xorl %r14d, %r14d
cmpl %eax, %ecx
setne -0x48(%rbp)
leaq -0x2b0(%rbp), %rdi
movq %r12, %rsi
callq 0x4470
movl -0x38(%rbp), %r12d
leaq -0x230(%rbp), %rdi
movq %r13, %rsi
callq 0x4470
leaq -0x210(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4470
leaq -0x230(%rbp), %rsi
leaq -0x210(%rbp), %rcx
pushq $0x1
popq %r8
movl %r12d, %edx
callq 0x7a74
leaq -0x210(%rbp), %rdi
callq 0x4678
leaq -0x230(%rbp), %rdi
callq 0x4678
leaq -0x2b0(%rbp), %rdi
callq 0x4678
leaq -0x1f0(%rbp), %rdi
movq %r13, %rsi
callq 0x4470
movb -0x48(%rbp), %al
movb %al, %r14b
addl %r14d, %r15d
pushq $0x1
popq %rsi
leaq -0x1f0(%rbp), %rdx
movl %r15d, %edi
callq 0x9e04
leaq -0x1f0(%rbp), %rdi
callq 0x4678
movl %r12d, %edi
callq 0x4660
movl %ebx, %edi
callq 0x4660
jmp 0x711e
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
leaq -0x4b0(%rbp), %rdi
movl %ebx, %esi
callq 0x7ba4
leaq -0x78(%rbp), %r15
leaq -0x4b0(%rbp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x43f0
movq %r13, %rdi
callq 0x4678
leaq -0x4b0(%rbp), %rdi
pushq $0x14
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0x4360
leaq -0x78(%rbp), %rdi
leaq -0x4b0(%rbp), %r15
movq %r15, %rsi
callq 0x43f0
movq %r15, %rdi
callq 0x4678
leaq -0x290(%rbp), %rdi
movq %r12, %rsi
callq 0x4470
leaq -0x1d0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4470
leaq -0x1b0(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4470
movl -0x38(%rbp), %r14d
leaq -0x1d0(%rbp), %rsi
leaq -0x1b0(%rbp), %rcx
pushq $0x2
popq %r8
movl %r14d, %edx
callq 0x7a74
leaq -0x1b0(%rbp), %rdi
callq 0x4678
leaq -0x1d0(%rbp), %rdi
callq 0x4678
leaq -0x290(%rbp), %rdi
callq 0x4678
movl %r14d, %edi
callq 0x4660
movl %ebx, %edi
callq 0x4660
leaq 0x43ba(%rip), %rdi      # 0xb4df
callq 0x44e0
jmp 0x76e1
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
movq 0x8e89(%rip), %rdi      # 0xffc8
leaq 0x4253(%rip), %rsi      # 0xb399
callq 0x4330
movq 0x9786(%rip), %rsi      # 0x108d8
movq %rax, %rdi
callq 0x4300
movq 0x9777(%rip), %rsi      # 0x108d8
leaq -0x110(%rbp), %rdi
callq 0x4200
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
movq 0x8e4b(%rip), %rdi      # 0xffc8
leaq 0x4238(%rip), %rsi      # 0xb3bc
callq 0x4330
movq 0x9748(%rip), %rsi      # 0x108d8
movq %rax, %rdi
callq 0x4300
movq 0x9739(%rip), %rdi      # 0x108d8
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x607b
movl %eax, %r13d
movl %eax, -0x54(%rbp)
movl %ebx, %edi
xorl %esi, %esi
callq 0x789a
leaq -0x4b0(%rbp), %rdi
movl %ebx, %esi
callq 0x7ba4
leaq -0x78(%rbp), %r15
leaq -0x4b0(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x43f0
movq %r14, %rdi
callq 0x4678
leaq -0x4b0(%rbp), %rdi
pushq $0x14
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0x4360
leaq -0x78(%rbp), %r14
leaq -0x4b0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x43f0
movq %r15, %rdi
callq 0x4678
leaq -0x190(%rbp), %rdi
movq %r14, %rsi
callq 0x4470
leaq -0x190(%rbp), %rsi
movl -0x38(%rbp), %edi
callq 0x7bec
leaq -0x190(%rbp), %rdi
callq 0x4678
leaq -0x270(%rbp), %rdi
movq %r12, %rsi
callq 0x4470
leaq -0x170(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4470
leaq -0x150(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x4470
movl -0x38(%rbp), %r14d
leaq -0x170(%rbp), %rsi
leaq -0x150(%rbp), %rcx
pushq $0x1
popq %r8
movl %r14d, %edx
callq 0x7a74
leaq -0x150(%rbp), %rdi
callq 0x4678
leaq -0x170(%rbp), %rdi
callq 0x4678
leaq -0x270(%rbp), %rdi
callq 0x4678
movl %r14d, %edi
callq 0x4660
movl %ebx, %edi
callq 0x4660
movq 0x8d01(%rip), %rdi      # 0xffc8
leaq 0x40fc(%rip), %rsi      # 0xb3ca
callq 0x4330
movq 0x95ee(%rip), %rax      # 0x108c8
subq 0x95df(%rip), %rax      # 0x108c0
sarq $0x5, %rax
pushq $0x3
popq %rcx
xorl %edx, %edx
divq %rcx
movl %eax, 0x961d(%rip)      # 0x10910
movl $0x400, %ecx            # imm = 0x400
movl %r13d, %eax
cltd
idivl %ecx
movl %eax, %ebx
movl %eax, -0x2c(%rbp)
shll $0xa, %eax
subl %eax, %r13d
movl %r13d, -0x50(%rbp)
je 0x7314
incl %ebx
movl %ebx, -0x2c(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4470
leaq -0x130(%rbp), %rdx
movl %ebx, %edi
xorl %esi, %esi
callq 0x9e04
leaq -0x130(%rbp), %rdi
callq 0x4678
movq %rsp, -0xa0(%rbp)
movl -0x2c(%rbp), %ecx
movq %rsp, %rbx
leaq 0xf(,%rcx,4), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq %rcx, -0x38(%rbp)
leaq (,%rcx,4), %rdx
movq %rbx, %rdi
movl $0xff, %esi
callq 0x4210
movslq 0x9591(%rip), %r14      # 0x10910
leaq (,%r14,8), %r15
movq %r15, %rdi
addq $0x8, %rdi
pushq $-0x1
popq %rax
cmovbq %rax, %rdi
testq %r14, %r14
cmovsq %rax, %rdi
callq 0x4030
movq %rbx, -0x48(%rbp)
movq %r14, (%rax)
movq %rax, -0x40(%rbp)
leaq 0x8(%rax), %rbx
testl %r14d, %r14d
je 0x73c2
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4210
leaq -0x98(%rbp), %rax
andl $0x0, (%rax)
xorl %r13d, %r13d
leaq -0x4b0(%rbp), %r15
leaq -0xd0(%rbp), %r12
xorl %eax, %eax
cmpl %r14d, %eax
jge 0x7474
movq 0x94d1(%rip), %r14      # 0x108c0
movq 0x20(%r14,%r13), %rdi
addq %r13, %r14
callq 0x44f0
movl %eax, -0xd0(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0xf0(%rbp)
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x9ba(%rip), %rsi       # 0x7dd5
movq %r14, %rdx
movq %r12, %rcx
leaq -0x98(%rbp), %r8
leaq -0x2c(%rbp), %r9
leaq -0xf0(%rbp), %rax
pushq %rax
callq 0x87c2
popq %rax
popq %rcx
movslq -0x98(%rbp), %rax
leaq (%rbx,%rax,8), %rdi
movq %r15, %rsi
callq 0x8872
movq %r15, %rdi
callq 0x61dc
movl -0x98(%rbp), %eax
incl %eax
movl %eax, -0x98(%rbp)
movl 0x94a5(%rip), %r14d     # 0x10910
addq $0x60, %r13
jmp 0x73df
xorl %r15d, %r15d
movq -0x40(%rbp), %r12
movslq %r14d, %rax
cmpq %rax, %r15
jge 0x749b
movq %rbx, %rdi
callq 0x4580
incq %r15
movl 0x947b(%rip), %r14d     # 0x10910
addq $0x8, %rbx
jmp 0x747b
movq (%r12), %rax
leaq (,%rax,8), %rbx
testq %rax, %rax
je 0x74be
movq %rbx, %r14
leaq (%r12,%r14), %rdi
callq 0x61dc
addq $-0x8, %r14
jne 0x74af
addq $0x8, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4640
movl -0x2c(%rbp), %edi
movl 0x943a(%rip), %esi      # 0x10910
movq -0x48(%rbp), %rbx
movq %rbx, %rdx
callq 0x7f68
movq -0x38(%rbp), %rax
leaq (%rbx,%rax,4), %rdx
leaq -0xd0(%rbp), %rdi
leaq -0x4b0(%rbp), %rcx
movq %rbx, %rsi
callq 0x888c
leaq -0x4b0(%rbp), %rdi
callq 0x4570
leaq -0x110(%rbp), %rsi
movq 0x8(%rsi), %rcx
decq %rcx
leaq -0x98(%rbp), %rdi
xorl %edx, %edx
callq 0x4360
leaq 0x3eb9(%rip), %rsi      # 0xb3e8
leaq -0xf0(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x88be
leaq -0x98(%rbp), %rdi
callq 0x4678
movq -0xf0(%rbp), %rsi
leaq -0x4b0(%rbp), %rdi
pushq $0x4
popq %rdx
callq 0x4060
movslq 0x93a5(%rip), %r14      # 0x10910
leaq (,%r14,8), %rbx
movq %rbx, %rdi
addq $0x8, %rdi
pushq $-0x1
popq %rax
cmovbq %rax, %rdi
testq %r14, %r14
cmovsq %rax, %rdi
callq 0x4030
movq %rax, %r13
movq %r14, (%rax)
addq $0x8, %r13
testl %r14d, %r14d
je 0x75a9
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4210
leaq -0x30(%rbp), %rax
andl $0x0, (%rax)
xorl %ebx, %ebx
leaq -0x98(%rbp), %r15
leaq -0x54(%rbp), %r12
xorl %eax, %eax
cmpl %r14d, %eax
jge 0x7688
movq 0x92f1(%rip), %r14      # 0x108c0
movq 0x20(%r14,%rbx), %rdi
addq %rbx, %r14
callq 0x44f0
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x4b0(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %r15, %rdi
leaq 0xb7e(%rip), %rsi       # 0x818e
movq %r14, %rdx
leaq -0x4c(%rbp), %rcx
leaq -0xb8(%rbp), %r8
movq %r12, %r9
leaq -0xa8(%rbp), %rax
pushq %rax
leaq -0xb0(%rbp), %rax
pushq %rax
leaq -0x30(%rbp), %rax
pushq %rax
leaq -0xd0(%rbp), %rax
pushq %rax
leaq -0x2c(%rbp), %rax
pushq %rax
leaq -0x50(%rbp), %rax
pushq %rax
callq 0x88e2
addq $0x30, %rsp
movslq -0x30(%rbp), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0x8872
movq %r15, %rdi
callq 0x61dc
movl -0x30(%rbp), %eax
incl %eax
movl %eax, -0x30(%rbp)
movl 0x9291(%rip), %r14d     # 0x10910
addq $0x60, %rbx
jmp 0x75bf
xorl %ebx, %ebx
movslq %r14d, %rax
cmpq %rax, %rbx
jge 0x76aa
movq %r13, %rdi
callq 0x4580
incq %rbx
movl 0x926c(%rip), %r14d     # 0x10910
addq $0x8, %r13
jmp 0x768a
leaq -0x4b0(%rbp), %rdi
callq 0x4480
leaq -0xf0(%rbp), %rdi
callq 0x4678
leaq -0x4b0(%rbp), %rdi
callq 0x44c0
leaq -0xd0(%rbp), %rdi
callq 0x8d38
movq -0xa0(%rbp), %rsp
leaq 0x9208(%rip), %rdi      # 0x108f0
callq 0x45f0
leaq -0x78(%rbp), %rdi
callq 0x4678
leaq -0x110(%rbp), %rdi
callq 0x4678
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x88ae(%rip), %rdi      # 0xffc8
leaq 0x3c48(%rip), %rsi      # 0xb369
callq 0x4330
xorl %edi, %edi
callq 0x43e0
jmp 0x784d
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x7857
movq %rax, %rbx
jmp 0x785c
movq %rax, %rbx
jmp 0x7868
jmp 0x787a
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
jmp 0x7840
jmp 0x787a
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
callq 0x4678
jmp 0x777e
movq %rax, %rbx
leaq -0x170(%rbp), %rdi
callq 0x4678
jmp 0x778f
movq %rax, %rbx
leaq -0x270(%rbp), %rdi
jmp 0x7840
movq %rax, %rbx
leaq -0x190(%rbp), %rdi
jmp 0x7840
jmp 0x787a
jmp 0x787a
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x4678
jmp 0x77d4
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
jmp 0x7840
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x4678
jmp 0x77e5
movq %rax, %rbx
leaq -0x290(%rbp), %rdi
jmp 0x7840
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
callq 0x4678
jmp 0x7802
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x4678
jmp 0x7815
jmp 0x787a
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
jmp 0x7840
jmp 0x787a
jmp 0x787a
jmp 0x787a
jmp 0x784d
jmp 0x787a
movq %rax, %rbx
leaq -0x4b0(%rbp), %rdi
jmp 0x7840
jmp 0x787a
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
callq 0x4678
jmp 0x787d
jmp 0x787a
jmp 0x787a
jmp 0x784d
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x4678
leaq -0x4b0(%rbp), %rdi
callq 0x44c0
leaq -0xd0(%rbp), %rdi
callq 0x8d38
jmp 0x787d
jmp 0x787a
jmp 0x787a
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x4678
leaq -0x110(%rbp), %rdi
callq 0x4678
movq %rbx, %rdi
callq 0x45b0