// File: /workspace/github_cpp_makefile_star2_O2/girdhari9[P]mTORRENT/ClientServer.cpp
// Function: UpdateLogFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void UpdateLogFile(string ClientLog){
	ifstream TrackerFile(ClientLog, ifstream::binary);
	string detail;
    if (TrackerFile.is_open()){
    	while( getline(TrackerFile,detail) ){
    		stringstream Log(detail); // Used for breaking words 
            string mtorrentfilename,SHA,FilePath; // to store individual words 
        	Log >> mtorrentfilename;
            UpdateLog.push_back(mtorrentfilename);
	        Log >> SHA;
	        UpdateLog.push_back(SHA);
	        Log >> FilePath;
	        UpdateLog.push_back(FilePath);
    	}
    	TrackerFile.close();

    	ofstream TrackerFileD(ClientLog, ofstream::binary);
        for(unsigned int i = 0; i < UpdateLog.size(); i += 3){
        	TrackerFileD << UpdateLog[i];
        	TrackerFileD << " ";
        	TrackerFileD << UpdateLog[i+1];
        	TrackerFileD << " ";
        	TrackerFileD << UpdateLog[i+2];
        	TrackerFileD << " ";
        	TrackerFileD << "\n";
        }
        for(unsigned int i = 0; i < CreateLog.size(); i += 3){
        	TrackerFileD << CreateLog[i];
        	TrackerFileD << " ";
        	TrackerFileD << CreateLog[i+1];
        	TrackerFileD << " ";
        	TrackerFileD << CreateLog[i+2];
        	TrackerFileD << " ";
        	TrackerFileD << "\n";
        }
        TrackerFileD.close();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movq %rdi, %rsi
leaq 0x290(%rsp), %rdi
pushq $0x4
popq %rdx
movq %rsi, 0x8(%rsp)
callq 0x4520
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x308(%rsp), %rdi
callq 0x40f0
testb %al, %al
je 0x5eab
leaq 0x90(%rsp), %r12
xorl %r15d, %r15d
leaq 0x50(%rsp), %r13
leaq 0xac6b(%rip), %rbx      # 0x108a0
leaq 0x30(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0x290(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5d19
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x4510
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
andq $0x0, 0x58(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb %r15b, 0x60(%rsp)
movb %r15b, 0x40(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb %r15b, 0x20(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x4420
movq %rbx, %rdi
movq %r13, %rsi
callq 0x60a4
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4420
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x60a4
movq %r12, %rdi
movq %r14, %rsi
callq 0x4420
movq %rbx, %rdi
movq %r14, %rsi
callq 0x60a4
movq %r14, %rdi
callq 0x4678
movq %rbp, %rdi
callq 0x4678
movq %r13, %rdi
callq 0x4678
movq %r12, %rdi
callq 0x4280
jmp 0x5c3f
leaq 0x290(%rsp), %rdi
callq 0x40d0
leaq 0x90(%rsp), %rdi
pushq $0x4
popq %rdx
movq 0x8(%rsp), %rsi
callq 0x4630
pushq $0x2
popq %r12
leaq 0x90(%rsp), %rbx
leaq 0x5385(%rip), %r14      # 0xb0d3
leaq 0x5691(%rip), %r15      # 0xb3e6
leal -0x2(%r12), %eax
movq 0xab47(%rip), %rcx      # 0x108a8
movq 0xab38(%rip), %rsi      # 0x108a0
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
jbe 0x5de6
shlq $0x5, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x4300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
leal -0x1(%r12), %esi
shlq $0x5, %rsi
addq 0xab02(%rip), %rsi      # 0x108a0
movq %rbx, %rdi
callq 0x4300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
movl %r12d, %esi
shlq $0x5, %rsi
addq 0xaae1(%rip), %rsi      # 0x108a0
movq %rbx, %rdi
callq 0x4300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4330
addl $0x3, %r12d
jmp 0x5d55
pushq $0x2
popq %r12
leaq 0x90(%rsp), %rbx
leaq 0x52da(%rip), %r14      # 0xb0d3
leaq 0x55e6(%rip), %r15      # 0xb3e6
leal -0x2(%r12), %eax
movq 0xaa84(%rip), %rcx      # 0x10890
movq 0xaa75(%rip), %rsi      # 0x10888
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
jbe 0x5e91
shlq $0x5, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x4300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
leal -0x1(%r12), %esi
shlq $0x5, %rsi
addq 0xaa3f(%rip), %rsi      # 0x10888
movq %rbx, %rdi
callq 0x4300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
movl %r12d, %esi
shlq $0x5, %rsi
addq 0xaa1e(%rip), %rsi      # 0x10888
movq %rbx, %rdi
callq 0x4300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4330
addl $0x3, %r12d
jmp 0x5e00
leaq 0x90(%rsp), %rdi
callq 0x4480
leaq 0x90(%rsp), %rdi
callq 0x44c0
leaq 0x70(%rsp), %rdi
callq 0x4678
leaq 0x290(%rsp), %rdi
callq 0x4120
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5f13
jmp 0x5edc
jmp 0x5edc
jmp 0x5edc
movq %rax, %rbx
jmp 0x5f23
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4678
leaq 0x30(%rsp), %rdi
callq 0x4678
leaq 0x50(%rsp), %rdi
callq 0x4678
leaq 0x90(%rsp), %rdi
callq 0x4280
jmp 0x5f23
jmp 0x5f13
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x44c0
leaq 0x70(%rsp), %rdi
callq 0x4678
leaq 0x290(%rsp), %rdi
callq 0x4120
movq %rbx, %rdi
callq 0x45b0