// File: /workspace/github_cpp_makefile_star2_O3/girdhari9[P]mTORRENT/ClientServer.cpp
// Function: UpdateDownloadLog(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void UpdateDownloadLog(int flag,string filename){
	ifstream TrackerFile(DOWNLOADLOG.c_str(), ifstream::binary);
	string detail;
    if (TrackerFile.is_open()){
    	while(getline (TrackerFile,detail)){
			Download.push_back(detail);
		}
    	if(flag){
    		string detail ="[S] " + MYIP + ":" + MYPORT + " " + root_path + "/" + filename + "\n"; 
    		Download.push_back(detail);
        }
        else{
        	string detail ="[D] " + MYIP + ":" + MYPORT + " " + root_path + "/" + filename + "\n"; 
    		Download.push_back(detail);
        }
        TrackerFile.close();

        ofstream TrackerFileD(DOWNLOADLOG.c_str(), ofstream::binary);
        for(unsigned int i = 0; i < Download.size(); i++){
        	TrackerFileD << Download[i];
        	TrackerFileD << "\n";
        }
        TrackerFileD.close();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp            # imm = 0x518
movq %rsi, %rbx
movl %edi, %ebp
movq 0xc4fb(%rip), %rsi      # 0x12418
leaq 0x310(%rsp), %r14
movq %r14, %rdi
movl $0x4, %edx
callq 0x4600
leaq 0x100(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x388(%rsp), %rdi
callq 0x40d0
testb %al, %al
je 0x67d6
leaq 0xf0(%rsp), %r15
leaq 0xc8f9(%rip), %r12      # 0x12868
movq 0x310(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4610
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5fb1
movq %r12, %rdi
movq %r15, %rsi
callq 0x710a
jmp 0x5f6f
testl %ebp, %ebp
je 0x600b
leaq 0x7131(%rip), %rsi      # 0xd0ed
leaq 0xc3d5(%rip), %rdx      # 0x12398
leaq 0xd0(%rsp), %rdi
callq 0x72fa
leaq 0x711b(%rip), %rsi      # 0xd0f2
leaq 0xd0(%rsp), %rdi
callq 0x4640
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6068
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x6070
leaq 0x70e4(%rip), %rsi      # 0xd0f6
leaq 0xc37f(%rip), %rdx      # 0x12398
leaq 0xd0(%rsp), %rdi
callq 0x72fa
leaq 0x70c5(%rip), %rsi      # 0xd0f2
leaq 0xd0(%rsp), %rdi
callq 0x4640
leaq 0x40(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x639d
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x63a3
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xc325(%rip), %rsi      # 0x123b8
movq 0xc326(%rip), %rdx      # 0x123c0
callq 0x4140
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x60c7
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x60cf
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6fe1(%rip), %rsi      # 0xd0d3
callq 0x4640
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6124
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x612b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x70(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc332(%rip), %rsi      # 0x12480
callq 0x4640
leaq 0x20(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x617a
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x6180
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6f51(%rip), %rsi      # 0xd0f4
callq 0x4640
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x61d8
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x61df
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x4140
leaq 0xc0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x623a
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
jmp 0x6241
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xb0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x717f(%rip), %rsi      # 0xd3e6
callq 0x4640
leaq 0x120(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x629c
movq %rdx, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
jmp 0x62a2
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x118(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x62da
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x62f7
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6313
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x632d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x6344
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x635b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x100(%rsp), %r13
je 0x6384
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0xc4dd(%rip), %rdi      # 0x12868
leaq 0x110(%rsp), %rsi
callq 0x710a
jmp 0x66c8
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xbff2(%rip), %rsi      # 0x123b8
movq 0xbff3(%rip), %rdx      # 0x123c0
callq 0x4140
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x63f9
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x6400
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6cb0(%rip), %rsi      # 0xd0d3
callq 0x4640
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6455
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x645c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x70(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc001(%rip), %rsi      # 0x12480
callq 0x4640
leaq 0x20(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x64ab
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x64b1
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6c20(%rip), %rsi      # 0xd0f4
callq 0x4640
leaq 0xa0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x650a
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x6512
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x4140
leaq 0xc0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x656d
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
jmp 0x6574
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xb0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6e4c(%rip), %rsi      # 0xd3e6
callq 0x4640
leaq 0x120(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x65cf
movq %rdx, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
jmp 0x65d5
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x118(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x660d
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x40(%rsp), %r12
je 0x662f
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x664b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x6665
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x667c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4350
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x6693
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x66b4
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0xc1ad(%rip), %rdi      # 0x12868
leaq 0x110(%rsp), %rsi
callq 0x710a
movq 0x110(%rsp), %rdi
cmpq %rbx, %rdi
je 0x66e5
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0x310(%rsp), %rdi
callq 0x40c0
movq 0xbd1f(%rip), %rsi      # 0x12418
leaq 0x110(%rsp), %rdi
movl $0x4, %edx
callq 0x4380
movq 0xc156(%rip), %rax      # 0x12868
cmpq %rax, 0xc157(%rip)      # 0x12870
je 0x6774
movl $0x1, %ebp
xorl %ecx, %ecx
leaq 0x110(%rsp), %rbx
leaq 0x6cb5(%rip), %r14      # 0xd3e6
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %rbx, %rdi
callq 0x43c0
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43c0
movl %ebp, %ecx
movq 0xc111(%rip), %rdx      # 0x12870
movq 0xc102(%rip), %rax      # 0x12868
subq %rax, %rdx
sarq $0x5, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x6731
leaq 0x110(%rsp), %rdi
callq 0x4490
movq 0xb840(%rip), %rax      # 0x11fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x118(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x110(%rsp,%rcx)
callq 0x42d0
leaq 0x208(%rsp), %rdi
callq 0x4160
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x67d6
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0x310(%rsp), %rdi
callq 0x40f0
addq $0x518, %rsp            # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x68cb
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6823
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x6823
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x6847
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x6847
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x686a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x686a
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x688b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x688b
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x68a9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x68a9
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
jne 0x69a7
jmp 0x69bb
jmp 0x69b6
jmp 0x69fa
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rdi
cmpq %rbx, %rdi
je 0x69ff
movq 0x120(%rsp), %rsi
jmp 0x69d4
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x6917
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x6917
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x693b
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x693b
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x695e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x695e
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x697f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x697f
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x699d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x699d
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x69bb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x69bb
movq %rax, 0x8(%rsp)
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69ff
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x4350
jmp 0x69ff
jmp 0x69fa
jmp 0x69e6
jmp 0x69fa
jmp 0x69fa
movq %rax, 0x8(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x44d0
jmp 0x69ff
movq %rax, 0x8(%rsp)
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x6a24
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x4350
leaq 0x310(%rsp), %rdi
callq 0x40f0
movq 0x8(%rsp), %rdi
callq 0x45d0