LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: checkPointInit()
void checkPointInit()
{
    FILE * checkpoint_file;
    current_segment = 0;
    checkpoint_file = fopen("DRIVE/CHECKPOINT_REGION","r");
    if(checkpoint_file != NULL){
        if(DBG) cout << "reading checkpoint \n";
        fread(&Checkpoint_Region,sizeof(Checkpoint_Region), 1, checkpoint_file);
        fclose(checkpoint_file);
        for(int i = 0 ; i < 40; i++)
        {
            if(Checkpoint_Region.imaps[i]==0) break;
            //cout << "Imap location: " << Checkpoint_Region.imaps[i] << "\n";
        }

        for(; current_segment < 32; current_segment++){
            if(Checkpoint_Region.liveBits[current_segment] == 0){ 
                //cout <<"livebit: "  << current_segment << " value: " << Checkpoint_Region.liveBits[current_segment];
                //cout <<"current segment: "<< current_segment<< "\n";
                break;
            }
        }
        readImaps();
    }
    else{
        current_segment = 0;
        for(unsigned int imap: Checkpoint_Region.imaps)
        {
            imap = 0;
        }
        for(char liveBit: Checkpoint_Region.liveBits)
        {
            liveBit = 0;
        }
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
andl $0x0, 0x1059f2(%rip)    # 0x108244
leaq 0x27cb(%rip), %rdi      # 0x5024
leaq 0x27c2(%rip), %rsi      # 0x5022
callq 0x2240
testq %rax, %rax
je 0x28d2
movq %rax, %r14
movq 0x5754(%rip), %rdi      # 0x7fc8
leaq 0x27c1(%rip), %rsi      # 0x503c
callq 0x21e0
leaq 0x169dcd(%rip), %rbx    # 0x16c654
pushq $0x1
popq %rdx
movl $0xc0, %esi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2310
movq %r14, %rdi
callq 0x21f0
movslq 0x10599b(%rip), %rax    # 0x108244
leal 0x1(%rax), %ecx
cmpq $0x1f, %rax
jg 0x28c9
cmpb $0x0, 0xa0(%rax,%rbx)
je 0x28c9
incq %rax
movl %ecx, 0x10597f(%rip)    # 0x108244
incl %ecx
jmp 0x28ac
popq %rbx
popq %r14
popq %rbp
jmp 0x25f4
andl $0x0, 0x10596b(%rip)    # 0x108244
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: writeCheckpoint()
void writeCheckpoint()
{
    writeImaps();
    FILE * checkpoint_file;
    Checkpoint_Region.liveBits[current_segment] = 1;
    checkpoint_file =  fopen("DRIVE/CHECKPOINT_REGION", "w");
    if(checkpoint_file != NULL)
    {
        fwrite(&Checkpoint_Region,sizeof(Checkpoint_Region), 1, checkpoint_file);
        fclose(checkpoint_file);
    }
    else perror("File Open Failed: ");
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x273b
movslq 0x105954(%rip), %rax    # 0x108244
leaq 0x169d5d(%rip), %rcx    # 0x16c654
movb $0x1, 0xa0(%rax,%rcx)
leaq 0x271e(%rip), %rdi      # 0x5024
leaq 0x2744(%rip), %rsi      # 0x5051
callq 0x2240
testq %rax, %rax
je 0x293f
movq %rax, %rbx
leaq 0x169d33(%rip), %rdi    # 0x16c654
pushq $0x1
popq %rdx
movl $0xc0, %esi
movq %rax, %rcx
callq 0x23f0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21f0
leaq 0x270d(%rip), %rdi      # 0x5053
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21a0
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: lookForFreeSpots(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void lookForFreeSpots(string lfs_filename)
{
    bool found = false;
    for(int i = 0; i < 10240; i++)
    {
        if(g_imap.list[i] == UINT_MAX)
        {
            g_filemap[g_filemap_ctr].num = i;
            g_filemap[g_filemap_ctr].name = lfs_filename;
						g_filemap_ctr++;
						
            g_imap.list[i] = BLOCK_SZ * current_segment + wbuffer.getNumBlocks();
            found = true;
        }
    }
    if(!found) cout << "YER OUTTER SPACE!\n";
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x169db2(%rip), %r14    # 0x16c718
xorl %r15d, %r15d
leaq 0x105ce0(%rip), %r12    # 0x108650
xorl %eax, %eax
cmpq $0x2800, %r15           # imm = 0x2800
je 0x29c3
cmpl $-0x1, (%r14)
jne 0x29ba
movslq 0x169cc8(%rip), %rax    # 0x16c650
imulq $0x28, %rax, %rax
leaq (%rax,%r12), %rdi
addq $0x8, %rdi
movl %r15d, -0x8(%rdi)
movq %rbx, %rsi
callq 0x2130
incl 0x169caa(%rip)          # 0x16c650
movl 0x105898(%rip), %eax    # 0x108244
shll $0xa, %eax
addl 0x175d6b(%rip), %eax    # 0x178720
movl %eax, (%r14)
movb $0x1, %al
incq %r15
addq $0x4, %r14
jmp 0x2972
testb $0x1, %al
je 0x29d0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x55f1(%rip), %rdi      # 0x7fc8
leaq 0x2688(%rip), %rsi      # 0x5066
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: readFileMap()
void readFileMap()
{
	ifstream filemap("DRIVE/FILE_MAP", ios::in);
	if(DBG) cout << "Reading from FILE_MAP\n";
	g_filemap_ctr = 0;
	string line;
	while(getline(filemap,line))
	{
		stringstream s(line);
		s >> g_filemap[g_filemap_ctr].num >> g_filemap[g_filemap_ctr].name;
		g_filemap_ctr++;
	}
	filemap.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
leaq 0x2666(%rip), %rsi      # 0x5079
leaq -0x250(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x23a0
movq 0x559f(%rip), %rdi      # 0x7fc8
leaq 0x2658(%rip), %rsi      # 0x5088
callq 0x21e0
andl $0x0, 0x169c14(%rip)    # 0x16c650
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x250(%rbp), %rbx
leaq -0x48(%rbp), %r14
leaq -0x3d8(%rbp), %r15
pushq $0x18
popq %r12
leaq 0x105be7(%rip), %r13    # 0x108650
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2ad1
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x2330
movslq 0x169bb9(%rip), %rax    # 0x16c650
imulq $0x28, %rax, %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0x2160
movslq 0x169ba3(%rip), %rcx    # 0x16c650
imulq $0x28, %rcx, %rcx
leaq (%rcx,%r13), %rsi
addq $0x8, %rsi
movq %rax, %rdi
callq 0x2290
incl 0x169b89(%rip)          # 0x16c650
movq %r15, %rdi
callq 0x2170
jmp 0x2a69
leaq -0x250(%rbp), %rdi
callq 0x2060
leaq -0x48(%rbp), %rdi
callq 0x20f0
leaq -0x250(%rbp), %rdi
callq 0x2080
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b0d
movq %rax, %rbx
jmp 0x2b2a
jmp 0x2b0d
movq %rax, %rbx
jmp 0x2b21
movq %rax, %rbx
leaq -0x3d8(%rbp), %rdi
callq 0x2170
leaq -0x48(%rbp), %rdi
callq 0x20f0
leaq -0x250(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: writeFileMap()
void writeFileMap()
{
	ofstream filemap("DRIVE/FILE_MAP", ios::out);
	if(DBG) cout << "Writing to FILE_MAP\n";
	for(int i = 0; i < g_filemap_ctr; i++){
		filemap << g_filemap[i].num << "\t" << g_filemap[i].name << "\n";
	} 
	filemap.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x2520(%rip), %rsi      # 0x5079
leaq -0x228(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x2210
movq 0x5459(%rip), %rdi      # 0x7fc8
leaq 0x2529(%rip), %rsi      # 0x509f
callq 0x21e0
leaq 0x105ad6(%rip), %rbx    # 0x108658
xorl %r13d, %r13d
leaq -0x228(%rbp), %r14
leaq 0x2521(%rip), %r15      # 0x50b4
leaq 0x27c2(%rip), %r12      # 0x535c
movslq 0x169aaf(%rip), %rax    # 0x16c650
cmpq %rax, %r13
jge 0x2bdb
movl -0x8(%rbx), %esi
movq %r14, %rdi
callq 0x2370
movq %rax, %rdi
movq %r15, %rsi
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21e0
incq %r13
addq $0x28, %rbx
jmp 0x2b9a
leaq -0x228(%rbp), %rdi
callq 0x22d0
leaq -0x228(%rbp), %rdi
callq 0x2300
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c07
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x2300
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: readInode(int)
inode readInode(int inode_num)
{
    int inode_block = g_imap.list[inode_num];
    int seg_idx = inode_block/BLOCK_SZ;
    int seg_block = inode_block % BLOCK_SZ;
		inode tmp_inode;

    if(seg_idx == current_segment){
        tmp_inode = wbuffer.getBlock(seg_block-1)->getInode();
    }else{
        string seg_path = "DRIVE/SEGMENT" + to_string(seg_idx+1);
        ifstream segment(seg_path, ios::in | ios::binary);
        segment.seekg(BLOCK_SZ * (seg_block-1));

        char tmp[sizeof(inode)];
        segment.read(tmp, sizeof(inode));
        segment.close();

        memcpy(&tmp_inode, tmp, sizeof(inode));
		}
    return tmp_inode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x538, %rsp            # imm = 0x538
movq %rdi, %rbx
movslq %esi, %rax
leaq 0x169add(%rip), %rcx    # 0x16c718
movl (%rcx,%rax,4), %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %edx, %r14d
cmpl 0x1055f5(%rip), %eax    # 0x108244
jne 0x2c77
movslq %r14d, %rax
leaq 0x173ac5(%rip), %rcx    # 0x176720
movl $0x404, %esi            # imm = 0x404
addq -0x8(%rcx,%rax,8), %rsi
movl $0x304, %edx            # imm = 0x304
movq %rbx, %rdi
callq 0x2190
jmp 0x2d25
incl %eax
leaq -0x550(%rbp), %r15
movq %r15, %rdi
movl %eax, %esi
callq 0x44ba
leaq 0x2383(%rip), %rsi      # 0x5014
leaq -0x38(%rbp), %rdi
movq %r15, %rdx
callq 0x448c
leaq -0x550(%rbp), %rdi
callq 0x20f0
leaq -0x240(%rbp), %rdi
leaq -0x38(%rbp), %rsi
pushq $0xc
popq %rdx
callq 0x2350
shll $0xa, %r14d
addl $0xfffffc00, %r14d      # imm = 0xFFFFFC00
movslq %r14d, %rsi
leaq -0x240(%rbp), %rdi
xorl %edx, %edx
callq 0x2280
leaq -0x240(%rbp), %rdi
leaq -0x550(%rbp), %rsi
movl $0x304, %edx            # imm = 0x304
callq 0x2270
leaq -0x240(%rbp), %rdi
callq 0x2060
leaq -0x550(%rbp), %rsi
movl $0x304, %edx            # imm = 0x304
movq %rbx, %rdi
callq 0x2190
leaq -0x240(%rbp), %rdi
callq 0x2080
leaq -0x38(%rbp), %rdi
callq 0x20f0
movq %rbx, %rax
addq $0x538, %rsp            # imm = 0x538
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d49
movq %rax, %rbx
jmp 0x2d58
movq %rax, %rbx
leaq -0x550(%rbp), %rdi
jmp 0x2d5c
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x2080
leaq -0x38(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: readData(unsigned int)
void readData(block_num num)
{
		for(int i = 0; i < BLOCK_SZ; i++) block_buffer[i] = 0;
	
    int seg_idx = num/BLOCK_SZ;
    int seg_block = num % BLOCK_SZ;

    if(seg_idx == current_segment){
        memcpy(block_buffer, wbuffer.getBlock(seg_block-1)->getData(), BLOCK_SZ);
    }else{
        string seg_path = "DRIVE/SEGMENT" + to_string(seg_idx+1);
        ifstream segment(seg_path, ios::in | ios::binary);
        segment.seekg(BLOCK_SZ * (seg_block-1));

				segment.read(block_buffer, BLOCK_SZ);
        segment.close();
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movl %edi, %ebx
xorl %eax, %eax
leaq 0x1054ce(%rip), %rcx    # 0x108250
cmpq $0x400, %rax            # imm = 0x400
je 0x2d93
movb $0x0, (%rax,%rcx)
incq %rax
jmp 0x2d82
movl %ebx, %esi
shrl $0xa, %esi
andl $0x3ff, %ebx            # imm = 0x3FF
cmpl 0x1054a0(%rip), %esi    # 0x108244
jne 0x2dd4
movl %ebx, %eax
leaq 0x173971(%rip), %rcx    # 0x176720
movq -0x8(%rcx,%rax,8), %rsi
addq $0x4, %rsi
leaq 0x105491(%rip), %rdi    # 0x108250
movl $0x400, %edx            # imm = 0x400
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %rbp
jmp 0x2190
incl %esi
leaq -0x238(%rbp), %r14
movq %r14, %rdi
callq 0x44ba
leaq 0x2228(%rip), %rsi      # 0x5014
leaq -0x30(%rbp), %rdi
movq %r14, %rdx
callq 0x448c
leaq -0x238(%rbp), %rdi
callq 0x20f0
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
pushq $0xc
popq %rdx
callq 0x2350
shll $0xa, %ebx
addl $0xfffffc00, %ebx       # imm = 0xFFFFFC00
movslq %ebx, %rsi
leaq -0x238(%rbp), %rdi
xorl %edx, %edx
callq 0x2280
leaq 0x105418(%rip), %rsi    # 0x108250
leaq -0x238(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x2270
leaq -0x238(%rbp), %rdi
callq 0x2060
leaq -0x238(%rbp), %rdi
callq 0x2080
leaq -0x30(%rbp), %rdi
callq 0x20f0
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x2e96
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
jmp 0x2e9a
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x2080
leaq -0x30(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void remove(string filename)
{
	bool removed = false;
	unsigned int remove_block;
	for(int i = 0; i < g_filemap_ctr; i++){
		if(g_filemap[i].name == filename){
			remove_block = g_filemap[i].num;
			g_filemap[i].num = -1;
			removed = true;
			if(DBG) cout << "Removed " << filename << "\n";
		}
	}
	if(!removed)
	{
	cout << "File '" << filename << "' does not exist!\n";
	return;
	}
	g_imap.list[remove_block] = UINT_MAX;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x105410(%rip), %r14    # 0x108658
xorl %r15d, %r15d
xorl %r13d, %r13d
movslq 0x1693fb(%rip), %rax    # 0x16c650
cmpq %rax, %r15
jge 0x32ab
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4581
testb %al, %al
je 0x32a2
movl -0x8(%r14), %r12d
orl $-0x1, -0x8(%r14)
movq 0x4d4f(%rip), %rdi      # 0x7fc8
leaq 0x1e63(%rip), %rsi      # 0x50e3
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %rax, %rdi
leaq 0x20c2(%rip), %rsi      # 0x535c
callq 0x21e0
movb $0x1, %r13b
incq %r15
addq $0x28, %r14
jmp 0x324e
testb $0x1, %r13b
je 0x32ce
movl %r12d, %eax
leaq 0x16945d(%rip), %rcx    # 0x16c718
orl $-0x1, (%rcx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4cf3(%rip), %rdi      # 0x7fc8
leaq 0x1ded(%rip), %rsi      # 0x50c9
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
leaq 0x1ddd(%rip), %rsi      # 0x50d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: list()
void list()
{
	cout << "\nFile List\n----------------------------\n";
	for(int i = 0; i < g_filemap_ctr;i++){
		cout << g_filemap[i].name << " (";
		cout << readInode(g_filemap[i].num).filesize << " bytes)\n";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq 0x4a12(%rip), %rbx      # 0x7fc8
leaq 0x1b2f(%rip), %rsi      # 0x50ec
movq %rbx, %rdi
callq 0x21e0
leaq 0x10508c(%rip), %r14    # 0x108658
xorl %r15d, %r15d
leaq -0x32c(%rbp), %r12
leaq 0x1b3b(%rip), %r13      # 0x5118
movslq 0x16906c(%rip), %rax    # 0x16c650
cmpq %rax, %r15
jge 0x3631
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21c0
movq %rax, %rdi
leaq 0x1b17(%rip), %rsi      # 0x5115
callq 0x21e0
movl -0x8(%r14), %esi
movq %r12, %rdi
callq 0x2c1e
movl -0x22c(%rbp), %esi
movq %rbx, %rdi
callq 0x2370
movq %rax, %rdi
movq %r13, %rsi
callq 0x21e0
incq %r15
addq $0x28, %r14
jmp 0x35dd
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: cat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void cat(string filename)
{		
		int inode_num = getInodeNum(filename);
		if(inode_num == -1){
			cout << "File '" << filename << "' does not exist!\n";
			return;
		}
		inode file_inode = readInode(inode_num);
		for(int i = 0; i < MAX_FILE_BLOCKS; i++){
			if(file_inode.datablocks[i]){
				readData(file_inode.datablocks[i]);
				printf("%.*s", BLOCK_SZ, block_buffer);
			}else{
				break;
			}
		}
		cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22c0
movq %r15, %rdi
callq 0x2ea7
movl %eax, %r14d
movq %r15, %rdi
callq 0x20f0
cmpl $-0x1, %r14d
je 0x36de
leaq -0x33c(%rbp), %rdi
movl %r14d, %esi
callq 0x2c1e
pushq $0x41
popq %r15
leaq 0x1a89(%rip), %rbx      # 0x5121
leaq 0x104bb1(%rip), %r14    # 0x108250
cmpq $0xc1, %r15
je 0x36d0
movl -0x33c(%rbp,%r15,4), %edi
testl %edi, %edi
je 0x36d0
callq 0x2d69
movq %rbx, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
xorl %eax, %eax
callq 0x2040
incq %r15
jmp 0x369f
movq 0x48f1(%rip), %rdi      # 0x7fc8
callq 0x2110
jmp 0x370b
movq 0x48e3(%rip), %rdi      # 0x7fc8
leaq 0x19dd(%rip), %rsi      # 0x50c9
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
leaq 0x19cd(%rip), %rsi      # 0x50d0
movq %rax, %rdi
callq 0x21e0
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: display(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void display(string filename, int how_many, int start)
{
		int inode_num = getInodeNum(filename);
		if(inode_num == -1){
			cout << "File '" << filename << "' does not exist!\n";
			return;
		}
		
		int start_block = start/BLOCK_SZ;
		int start_offset = start % BLOCK_SZ;
		int bytes_read = 0;
		
		inode file_inode = readInode(inode_num);
		for(int i = start_block; i < MAX_FILE_BLOCKS; i++){
			if(file_inode.datablocks[i]){
				if(bytes_read < how_many){
					readData(file_inode.datablocks[i]);
					if(how_many - bytes_read >= BLOCK_SZ)
						printf("%.*s", BLOCK_SZ, block_buffer);
					else
						printf("%.*s", how_many-bytes_read, block_buffer);
				}else{
					cout << "\n\nComplete! (read " << how_many << " bytes)\n";
					return;
				}
			}else{
				cout << "\n\nReached end of file (read " << bytes_read << " bytes)\n";
				return;
			}
		}
		
		if(bytes_read < how_many)
			cout << "\n\nReached end of file (read " << bytes_read << " bytes)\n";
		else
			cout << "\n\nComplete! (read " << how_many << " bytes)\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x22c0
movq %r13, %rdi
callq 0x2ea7
movl %eax, %r12d
movq %r13, %rdi
callq 0x20f0
cmpl $-0x1, %r12d
je 0x37c4
movl $0x400, %r14d           # imm = 0x400
movl %r15d, %eax
cltd
idivl %r14d
movl %eax, %r15d
leaq -0x34c(%rbp), %rdi
movl %r12d, %esi
callq 0x2c1e
movslq %r15d, %r13
cmpl %r14d, %ebx
cmovbl %ebx, %r14d
leaq 0x1994(%rip), %r15      # 0x5121
leaq 0x104abc(%rip), %r12    # 0x108250
cmpq $0x7f, %r13
jg 0x37eb
movl -0x248(%rbp,%r13,4), %edi
testl %edi, %edi
je 0x3808
testl %ebx, %ebx
jle 0x3808
callq 0x2d69
movq %r15, %rdi
movl %r14d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2040
incq %r13
jmp 0x3794
movq 0x47fd(%rip), %rdi      # 0x7fc8
leaq 0x18f7(%rip), %rsi      # 0x50c9
callq 0x21e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21c0
leaq 0x18e7(%rip), %rsi      # 0x50d0
jmp 0x383c
testl %ebx, %ebx
leaq 0x1932(%rip), %rax      # 0x5126
leaq 0x193e(%rip), %rsi      # 0x5139
cmovleq %rax, %rsi
movl %ebx, %eax
sarl $0x1f, %eax
andl %eax, %ebx
jmp 0x381f
testl %edi, %edi
cmovel %edi, %ebx
leaq 0x1925(%rip), %rax      # 0x5139
leaq 0x190b(%rip), %rsi      # 0x5126
cmoveq %rax, %rsi
movq 0x47a2(%rip), %rdi      # 0x7fc8
callq 0x21e0
movq %rax, %rdi
movl %ebx, %esi
callq 0x2370
leaq 0x18dc(%rip), %rsi      # 0x5118
movq %rax, %rdi
callq 0x21e0
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./classes.cpp
// Function: WriteBuffer::WriteBuffer()
WriteBuffer::WriteBuffer(){
    num_blocks = 0;
    inode_counter = 0;
    for(int i = 0; i < 8; i++){
        seg_summary[i] = new Block(3);
        addBlock(seg_summary[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x2000(%rdi)
movl $0x401, %r12d           # imm = 0x401
pushq $0x3
popq %r14
cmpq $0x409, %r12            # imm = 0x409
je 0x3b5b
movl $0x1f10, %edi           # imm = 0x1F10
callq 0x2200
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
callq 0x451a
movq %r15, (%rbx,%r12,8)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31be
incq %r12
jmp 0x3b26
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./classes.cpp
// Function: WriteBuffer::writeToDisk()
void WriteBuffer::writeToDisk(){
    // Segment summary blocks
    int nextSegment = current_segment;
    /*for(; nextSegment < 32; nextSegment++){
      if(Checkpoint_Region.liveBits[nextSegment] == 0) break;
      }*/

    if(DBG) cout << "Writing to SEGMENT" + to_string(nextSegment+1) << endl;

    for(int i = 0; i < num_blocks; i++){
        buf[i]->writeToSegment();
    }

    ofstream segment("DRIVE/SEGMENT" + to_string(nextSegment+1), ios::out | ios::binary);
    segment.write(mem_segment, SEG_SZ);
    segment.close();

    Checkpoint_Region.liveBits[nextSegment] = 1;
    num_blocks = 8;
    for(int i =0; i < num_blocks; i++) seg_summary[i]->clearSegSum();

    current_segment++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
movq %rdi, %rbx
movslq 0x104696(%rip), %r12    # 0x108244
leal 0x1(%r12), %r14d
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x44ba
leaq 0x161f(%rip), %rsi      # 0x51e8
leaq -0x260(%rbp), %rdi
movq %r15, %rdx
callq 0x448c
movq 0x43e9(%rip), %rdi      # 0x7fc8
leaq -0x260(%rbp), %rsi
callq 0x21c0
movq %rax, %rdi
callq 0x2110
leaq -0x260(%rbp), %rdi
callq 0x20f0
leaq -0x40(%rbp), %rdi
callq 0x20f0
xorl %r15d, %r15d
movslq 0x2000(%rbx), %rax
cmpq %rax, %r15
jge 0x3c25
movq (%rbx,%r15,8), %rdi
callq 0x4624
incq %r15
jmp 0x3c0b
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x44ba
leaq 0x13d9(%rip), %rsi      # 0x5014
leaq -0x40(%rbp), %rdi
movq %r15, %rdx
callq 0x448c
leaq -0x260(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x14
popq %rdx
callq 0x23e0
leaq -0x40(%rbp), %rdi
callq 0x20f0
leaq -0x60(%rbp), %rdi
callq 0x20f0
leaq 0x45cd(%rip), %rsi      # 0x8240
leaq -0x260(%rbp), %rdi
movl $0x100000, %edx         # imm = 0x100000
callq 0x22b0
leaq -0x260(%rbp), %rdi
callq 0x22d0
leaq 0x1689bd(%rip), %rax    # 0x16c654
movb $0x1, 0xa0(%r12,%rax)
movl $0x8, 0x2000(%rbx)
pushq $0x8
popq %rax
xorl %r14d, %r14d
cltq
cmpq %rax, %r14
jge 0x3ccf
movq 0x2008(%rbx,%r14,8), %rdi
callq 0x46f0
incq %r14
movl 0x2000(%rbx), %eax
jmp 0x3cb0
incl 0x10456f(%rip)          # 0x108244
leaq -0x260(%rbp), %rdi
callq 0x2300
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20f0
jmp 0x3d02
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0x3d31
movq %rax, %rbx
jmp 0x3d2d
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
callq 0x2300
jmp 0x3d36
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
callq 0x20f0
leaq -0x40(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: Block::Block(int)
Block(int t){
            type = t;
            if(type == 0)
                for(int i = 0; i < BLOCK_SZ; i++) data[i] = 0;
            else if(type == 2)
                for(int i = 0; i < BLOCK_SZ/4; i++) block_data[i] = 0;
            else if(type == 3){
               seg_inodes.size=0; 
               for(int i = 0; i < BLOCK_SZ/8; i++){ 
                   seg_sum_arr[i].inode_number = 0;
                   seg_sum_arr[i].block_number = 0;
               }
            }
            num_blocks = 0;
						//initInode(&inode_data);
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, (%rdi)
testl %esi, %esi
je 0x4564
cmpl $0x3, %esi
je 0x4545
cmpl $0x2, %esi
jne 0x4578
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x4578
andl $0x0, 0x708(%rdi,%rax,4)
incq %rax
jmp 0x4530
andl $0x0, 0xf0c(%rdi)
xorl %eax, %eax
cmpq $0x80, %rax
je 0x4578
andq $0x0, 0xb0c(%rdi,%rax,8)
incq %rax
jmp 0x454e
xorl %eax, %eax
cmpq $0x400, %rax            # imm = 0x400
je 0x4578
movb $0x0, 0x4(%rdi,%rax)
incq %rax
jmp 0x4566
andl $0x0, 0xb08(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jasperandrew[P]cs350-project2/./lab7.h
// Function: Block::writeToSegment()
void writeToSegment(){
            if(type == 0)
                memcpy(mem_segment+(mem_segment_idx++ * BLOCK_SZ), data, BLOCK_SZ);
            else if(type == 1)
                memcpy(mem_segment+(mem_segment_idx++ * BLOCK_SZ), &inode_data, sizeof(inode));
            else if(type == 2)
                memcpy(mem_segment+(mem_segment_idx++ * BLOCK_SZ), block_data, BLOCK_SZ);
            else if(type ==3)
                memcpy(mem_segment+(mem_segment_idx++ * BLOCK_SZ), seg_sum_arr, BLOCK_SZ);
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
cmpq $0x3, %rax
ja 0x46ee
movq %rdi, %rsi
leaq 0x9c6(%rip), %rcx       # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq 0x103bf2(%rip), %rax    # 0x108240
leal 0x1(%rax), %ecx
movl %ecx, 0x103be9(%rip)    # 0x108240
shlq $0xa, %rax
leaq 0x3bde(%rip), %rdi      # 0x8240
addq %rax, %rdi
addq $0x4, %rsi
jmp 0x46b7
movslq 0x103bce(%rip), %rax    # 0x108240
leal 0x1(%rax), %ecx
movl %ecx, 0x103bc5(%rip)    # 0x108240
shlq $0xa, %rax
leaq 0x3bba(%rip), %rdi      # 0x8240
addq %rax, %rdi
addq $0x708, %rsi            # imm = 0x708
jmp 0x46b7
movslq 0x103ba7(%rip), %rax    # 0x108240
leal 0x1(%rax), %ecx
movl %ecx, 0x103b9e(%rip)    # 0x108240
shlq $0xa, %rax
leaq 0x3b93(%rip), %rdi      # 0x8240
addq %rax, %rdi
addq $0xb0c, %rsi            # imm = 0xB0C
movl $0x400, %edx            # imm = 0x400
jmp 0x46e8
movslq 0x103b7b(%rip), %rax    # 0x108240
leal 0x1(%rax), %ecx
movl %ecx, 0x103b72(%rip)    # 0x108240
shlq $0xa, %rax
leaq 0x3b67(%rip), %rdi      # 0x8240
addq %rax, %rdi
addq $0x404, %rsi            # imm = 0x404
movl $0x304, %edx            # imm = 0x304
popq %rbp
jmp 0x2190
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/meh[P]ela/tests/custom.cpp
// Function: main
int
main (void)
{
	return amirite("custom", {
		{"access", []{
			RGB<float> a(1.0, 0.5, 0.0);

			amiequal(1.0, a[0]);
			amiequal(0.5, a[1]);
			amiequal(0.0, a[2]);
		}},

		{"assign", []{
			ela::column_vector<float, 3> a { 1.0, 0.5, 0.0 };
			RGB<float> b = a * 2;

			amiequal(2.0, b[0]);
			amiequal(1.0, b[1]);
			amiequal(0.0, b[2]);
		}},
	});
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
leaq 0x22a5(%rip), %rsi      # 0x5097
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2070
leaq 0x2296(%rip), %rsi      # 0x509e
leaq 0x48(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2070
xorps %xmm0, %xmm0
leaq 0x88(%rsp), %rdi
movups %xmm0, -0x20(%rdi)
leaq 0xf5(%rip), %rax        # 0x2f22
movq %rax, -0x8(%rdi)
leaq 0x390(%rip), %rax       # 0x31c8
movq %rax, -0x10(%rdi)
leaq 0x2262(%rip), %rsi      # 0x50a5
leaq 0xe(%rsp), %rdx
callq 0x2070
leaq 0x48(%rsp), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rsi)
leaq 0x380(%rip), %rax       # 0x31e0
movq %rax, 0x78(%rsi)
leaq 0x659(%rip), %rax       # 0x34c4
movq %rax, 0x70(%rsi)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rdx
leaq 0xe(%rsp), %rcx
callq 0x3a1a
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2bbb
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0x394e
pushq $0x40
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x48, %rdi
callq 0x3a54
addq $-0x40, %r14
cmpq $-0x40, %r14
jne 0x2ea0
leaq 0x28(%rsp), %rdi
callq 0x2090
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x394e
jmp 0x2ee0
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x48, %rdi
callq 0x3a54
addq $-0x40, %r14
cmpq $-0x40, %r14
jne 0x2ee4
jmp 0x2f0f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3a54
jmp 0x2f0f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/HttpMethods.cpp
// Function: format(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
std::string format(std::string http_template, int value)
{
    std::string val = std::to_string(value);
    std::string http_template_end = HTTP_OK_KEEP_ALIVE_END;
    std::string http_string = http_template+val+http_template_end;
    return http_string;
    
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x48(%rsp), %rdi
movl %edx, %esi
callq 0x288a
leaq 0x1af8(%rip), %rsi      # 0x4004
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x28e4
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movq %r14, %rsi
callq 0x293e
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x291f
leaq 0x8(%rsp), %rdi
callq 0x2110
leaq 0x28(%rsp), %rdi
callq 0x2110
leaq 0x48(%rsp), %rdi
callq 0x2110
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2110
jmp 0x257a
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2110
jmp 0x2589
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/Parser.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
std::vector<std::string> split(std::string input, char split_token)
{
    std::stringstream inp(input);
    std::string temp;
    std::vector<std::string> tokenized_out;
    while (std::getline(inp, temp, split_token))
    {
        tokenized_out.push_back(temp);
    }
    return tokenized_out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x22c0
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movsbl %bpl, %ebp
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2320
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2b55
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2efa
jmp 0x2b2d
movq %rsp, %rdi
callq 0x2110
leaq 0x20(%rsp), %rdi
callq 0x2170
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2f26
movq %rsp, %rdi
callq 0x2110
leaq 0x20(%rsp), %rdi
callq 0x2170
movq %r14, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/Parser.cpp
// Function: stripLower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string stripLower(std::string str)
{
    //strips spaces
    str.erase(remove(str.begin(), str.end(), ' '), str.end());
    //converts every thing to lower case
    std::transform(str.begin(), str.end(), str.begin(), ::tolower);
    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
addq %rdi, %rsi
leaq 0xf(%rsp), %rdx
movb $0x20, (%rdx)
callq 0x3269
movq (%r14), %rdx
addq 0x8(%r14), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2050
movq (%r14), %r15
movq 0x8(%r14), %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x2bfb
movsbl (%r15,%r13), %edi
callq 0x2270
movb %al, (%r15,%r13)
incq %r13
jmp 0x2be3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2230
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/Server.cpp
// Function: HttpServer::HttpServer(char*, char*)
HttpServer::HttpServer(char *port, char *project_root)
{
    PORT_NUMBER = atoi(port);
    PROJECT_ROOT = project_root;
    std::cout << PORT_NUMBER << std::endl;
    socket_listen_fd = socket(AF_INET, SOCK_STREAM, 0);
    if (socket_listen_fd < 0)
    {
        std::cout << "couldn't open a socket!"
                  << "\n";
    }
    std::cout << "opened socket \n";
    bzero((char *)&server_addr, sizeof(server_addr));
    server_addr.sin_family = AF_INET;
    server_addr.sin_addr.s_addr = INADDR_ANY;
    server_addr.sin_port = htons(PORT_NUMBER);

    if (bind(socket_listen_fd, (sockaddr *)&server_addr, sizeof(server_addr)) < 0)
    {
        std::cout << "Binding Failed! "
                  << "\n";
        exit(1);
    }
    std::cout << "socket binded!" << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x22a0
movl %eax, 0x4(%rbx)
movq %r14, 0x30(%rbx)
movq 0x2c88(%rip), %rdi      # 0x5fd8
movl %eax, %esi
callq 0x22f0
movq %rax, %rdi
callq 0x2120
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2070
movl %eax, (%rbx)
testl %eax, %eax
jns 0x3394
movq 0x2c5f(%rip), %rdi      # 0x5fd8
leaq 0xe73(%rip), %rsi       # 0x41f3
callq 0x21d0
leaq 0xc94(%rip), %rsi       # 0x4020
movq %rax, %rdi
callq 0x21d0
movq 0x2c3d(%rip), %rdi      # 0x5fd8
leaq 0xe69(%rip), %rsi       # 0x420b
callq 0x21d0
leaq 0xc(%rbx), %rsi
andq $0x0, 0x14(%rbx)
movw $0x2, 0xc(%rbx)
andl $0x0, 0x10(%rbx)
movzwl 0x4(%rbx), %eax
rolw $0x8, %ax
movw %ax, 0xe(%rbx)
movl (%rbx), %edi
pushq $0x10
popq %rdx
callq 0x2030
movq 0x2c01(%rip), %rdi      # 0x5fd8
testl %eax, %eax
js 0x33f6
leaq 0xe4a(%rip), %rsi       # 0x422c
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2120
leaq 0xe1e(%rip), %rsi       # 0x421b
callq 0x21d0
leaq 0xc17(%rip), %rsi       # 0x4020
movq %rax, %rdi
callq 0x21d0
pushq $0x1
popq %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/Server.cpp
// Function: HttpServer::startListen()
void HttpServer::startListen()
{
    socklen_t clielen = sizeof(client_addr);
    std::cout << "started Listening for requests\n";
    listen(socket_listen_fd, 5); //a waiting queue size of 5 will suffice since each client is being served by a different process
    pid_t pid = 1;
    while (1)
    {
        new_socket_fd = accept(socket_listen_fd, (sockaddr *)&client_addr, &clielen);
        pid = fork();
        if (pid == 0)
        {
            break;
        }
        std::cout << "Parent" << std::endl;
    }
    if (pid == 0)
    {
        while (1)
        {
            std::string requestBuffer = feedBuffer();
            requestResolver(requestBuffer);
        }
        close(new_socket_fd);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl $0x10, (%r14)
movq 0x2b9b(%rip), %r15      # 0x5fd8
leaq 0xdf7(%rip), %rsi       # 0x423b
movq %r15, %rdi
callq 0x21d0
movl (%rbx), %edi
pushq $0x5
popq %rsi
callq 0x2200
leaq 0x1c(%rbx), %r12
leaq 0xdfa(%rip), %r13       # 0x425b
movl (%rbx), %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x20c0
movl %eax, 0x8(%rbx)
callq 0x2090
testl %eax, %eax
je 0x348f
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
jmp 0x3461
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3564
movq %r15, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2110
jmp 0x3499
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2110
jmp 0x34de
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/Server.cpp
// Function: HttpServer::feedBuffer[abi:cxx11]()
std::string HttpServer::feedBuffer()
{
    char requestBuffer[62000];
    int index = 0;
    // std::cout << "buffer contains" << std::endl;
    // std::cout<<requestBuffer<<std::endl;
    while (true)
    {
        read(new_socket_fd, requestBuffer + index, 1);
        if (index > 2 && requestBuffer[index] == '\r' && requestBuffer[index - 2] == '\r')
        {

            break;
        }
        index++;
    }
    std::string reqBuff = requestBuffer;
    return reqBuff;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf240, %rsp           # imm = 0xF240
movq %rsi, %r14
movq %rdi, %rbx
xorl %r13d, %r13d
pushq $0x1
popq %r15
movl 0x8(%r14), %edi
leaq (%rsp,%r13), %r12
addq $0x10, %r12
movq %r12, %rsi
movq %r15, %rdx
callq 0x2260
cmpq $0x3, %r13
jb 0x3539
cmpb $0xd, (%r12)
jne 0x3539
cmpb $0xd, 0xe(%rsp,%r13)
je 0x353e
incq %r13
jmp 0x350d
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x28e4
movq %rbx, %rax
addq $0xf240, %rsp           # imm = 0xF240
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/Server.cpp
// Function: HttpServer::requestResolver(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HttpServer::requestResolver(std::string requestBuffer)
{
    std::cout << std::endl;
    Request Header = parse(requestBuffer);
    std::cout << Header.request_method << std::endl;
    if (Header.request_method.compare("GET") == 0)
    {
        const char *req = Header.url.c_str();
        GET(req, false);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2a5b(%rip), %rdi      # 0x5fd8
callq 0x2120
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2250
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x2c17
movq %rsp, %rdi
callq 0x2110
movq 0x2a2c(%rip), %rdi      # 0x5fd8
leaq 0x20(%rsp), %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x2120
leaq 0xc9d(%rip), %rsi       # 0x4262
leaq 0x20(%rsp), %rdi
callq 0x20b0
testl %eax, %eax
jne 0x35e2
movq 0x40(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x259c
leaq 0x20(%rsp), %rdi
callq 0x2fde
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3608
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2110
jmp 0x3615
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2fde
movq %rbx, %rdi
callq 0x2300
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/dhruvbhargava[P]microTP/src/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	if (argc<3){
		std::cout<<"no files to host"<<std::endl;
		exit(1);
	}
	char* port,*project_root;
	port = argv[1];
	project_root = argv[2];
	HttpServer server = HttpServer(port,project_root);
	server.startListen();

}

// Assembly:
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
cmpl $0x2, %edi
jle 0x3656
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rdx
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3330
movq %rbx, %rdi
callq 0x341a
xorl %eax, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbx
retq
movq 0x297b(%rip), %rdi      # 0x5fd8
leaq 0xc02(%rip), %rsi       # 0x4266
callq 0x21d0
movq %rax, %rdi
callq 0x2120
pushq $0x1
popq %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/utils/FileUtils.h
// Function: fieryzig::GetStringFromFile[abi:cxx11](char const*)
string GetStringFromFile(const char* filename) {
    string ret = "";
    string line;
    ifstream file(filename,ios::in);
    if (!file.is_open()) {
        return ret;
    }
    while (!file.eof()) {
        getline(file,line);
        ret.append(line + '\n');
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x76c7(%rip), %rsi      # 0x9c34
leaq -0x270(%rbp), %rdx
callq 0x20f0
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x270(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x2360
leaq -0x1f8(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2601
leaq -0x270(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r12
pushq $0xa
popq %r13
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x250(%rbp,%rax)
jne 0x2601
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x2fcb
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2390
movq %r12, %rdi
callq 0x2130
jmp 0x25be
leaq -0x270(%rbp), %rdi
callq 0x2090
leaq -0x48(%rbp), %rdi
callq 0x2130
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x264f
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x2130
jmp 0x2643
jmp 0x2640
movq %rax, %r14
leaq -0x270(%rbp), %rdi
callq 0x2090
leaq -0x48(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/GateServer/GateServer.cpp
// Function: fieryzig::GateServer::Run()
void GateServer::Run()
{
    int n = epoll_wait(epfd, events, 20, 500);
	for (int i = 0; i < n; i++) {
	    if (events[i].data.fd == listenfd) {
		    acceptConnect();
	    }
        else if (events[i].events & EPOLLERR) {
            close(((Client*)events[i].data.ptr)->fd);
        }
	    else {
            Client *cli = (Client*)events[i].data.ptr;
            int ret = cli->Recv();
            PacketInfo pi; string content = "";
            while ( cli->hasMsg(&pi,content) ) {
                Dispatch(cli, &pi, content);
            }
	    }
	}

	set<Client*>::iterator it;

	for (it = Clients.begin(); it != Clients.end(); it++) {
	    (*it)->SendRemain();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movl 0x10(%rdi), %edi
leaq 0x28(%rbx), %rsi
pushq $0x14
popq %rdx
movq %rsi, -0x38(%rbp)
movl $0x1f4, %ecx            # imm = 0x1F4
callq 0x2140
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, -0x40(%rbp)
leaq -0x88(%rbp), %r13
leaq -0xa0(%rbp), %r12
leaq -0x68(%rbp), %r15
cmpq -0x40(%rbp), %rcx
je 0x275d
movq %rcx, -0x48(%rbp)
imulq $0xc, %rcx, %rax
movq -0x38(%rbp), %rdx
movl 0x4(%rdx,%rax), %ecx
cmpl 0x14(%rbx), %ecx
jne 0x26db
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
jmp 0x2751
addq %rdx, %rax
testb $0x8, (%rax)
movq 0x4(%rax), %r14
jne 0x273b
movq %r14, %rdi
callq 0x5f1c
movq %r13, %rdi
leaq 0x753b(%rip), %rsi      # 0x9c34
leaq -0x29(%rbp), %rdx
callq 0x20f0
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x5f92
testb %al, %al
je 0x2749
movq %r15, %rdi
movq %r13, %rsi
callq 0x22c0
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq *0x10(%rax)
movq %r15, %rdi
callq 0x2130
jmp 0x2702
movl 0x2020(%r14), %edi
callq 0x23a0
jmp 0x2751
movq %r13, %rdi
callq 0x2130
movq -0x48(%rbp), %rcx
incq %rcx
jmp 0x26b1
movq 0x168(%rbx), %r14
addq $0x158, %rbx            # imm = 0x158
cmpq %rbx, %r14
je 0x2786
movq 0x20(%r14), %rdi
callq 0x61ca
movq %r14, %rdi
callq 0x2270
movq %rax, %r14
jmp 0x276b
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2130
jmp 0x27a6
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/GateServer/GateServer.cpp
// Function: fieryzig::GateServer::acceptConnect()
void GateServer::acceptConnect()
{
    socklen_t clilen;
    connfd = accept(listenfd, (sockaddr*)&clientaddr, &clilen);
    Client *client = new Client(connfd);
    string ip = inet_ntoa(clientaddr.sin_addr);
    int port = clientaddr.sin_port;
    if (find(logic_ip.begin(), logic_ip.end(), make_pair(ip,port)) == logic_ip.end()) {
        Clients.insert(client);
        cout << "A Client has connected!" << endl;
    }
    else {
        cout << "Logic connected,";
        Logics.push_back(client);
        cout << "now Logic servers " << Logics.size() << endl; 
    }
    ev.data.ptr = client;
    ev.events = EPOLLIN | EPOLLERR;
    epoll_ctl(epfd, EPOLL_CTL_ADD, connfd, &ev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl 0x14(%rdi), %edi
leaq 0x118(%rbx), %rsi
leaq -0x34(%rbp), %rdx
callq 0x20c0
movl %eax, %r14d
movl %eax, 0x18(%rbx)
movl $0x2024, %edi           # imm = 0x2024
callq 0x2220
andq $0x0, 0x1004(%rax)
andl $0x0, 0x100c(%rax)
andq $0x0, 0x2014(%rax)
andl $0x0, 0x201c(%rax)
movl %r14d, 0x2020(%rax)
movq %rax, -0x30(%rbp)
movl 0x11c(%rbx), %edi
callq 0x2110
leaq -0x80(%rbp), %r12
leaq -0x60(%rbp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x20f0
movzwl 0x11a(%rbx), %r13d
movq 0x180(%rbx), %r14
movq 0x188(%rbx), %r15
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
callq 0x22c0
leaq -0x60(%rbp), %rdx
movl %r13d, 0x20(%rdx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5926
movq %rax, %r14
movq 0x188(%rbx), %r15
leaq -0x60(%rbp), %rdi
callq 0x2130
cmpq %r15, %r14
je 0x2f43
movq 0xa0e0(%rip), %rdi      # 0xcfd8
leaq 0x4201(%rip), %rsi      # 0x7100
callq 0x2210
leaq 0x138(%rbx), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3260
movq 0xa0bd(%rip), %rdi      # 0xcfd8
leaq 0x41ef(%rip), %rsi      # 0x7111
callq 0x2210
movq 0x140(%rbx), %rsi
subq 0x138(%rbx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x21a0
jmp 0x2f66
leaq 0x150(%rbx), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5a92
movq 0xa07e(%rip), %rdi      # 0xcfd8
leaq 0x4187(%rip), %rsi      # 0x70e8
callq 0x2210
movq %rax, %rdi
callq 0x2150
movq -0x30(%rbp), %rax
leaq 0x1c(%rbx), %rcx
movq %rax, 0x20(%rbx)
movl $0x9, 0x1c(%rbx)
movl 0x10(%rbx), %edi
movl 0x18(%rbx), %edx
pushq $0x1
popq %rsi
callq 0x22d0
leaq -0x80(%rbp), %rdi
callq 0x2130
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2130
jmp 0x2fba
jmp 0x2fb7
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/rapidjson/include/rapidjson/document.h
// Function: rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator=(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>&)
GenericValue& operator=(GenericValue& rhs) RAPIDJSON_NOEXCEPT {
        RAPIDJSON_ASSERT(this != &rhs);
        this->~GenericValue();
        RawAssign(rhs);
        return *this;
    }

// Assembly:
cmpq %rsi, %rdi
je 0x3136
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
andw $0x0, 0xe(%rsi)
movq %rdi, %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x5c54(%rip), %rdi      # 0x8d95
leaq 0x4002(%rip), %rsi      # 0x714a
leaq 0x5c53(%rip), %rcx      # 0x8da2
movl $0x326, %edx            # imm = 0x326
callq 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/rapidjson/include/rapidjson/internal/stack.h
// Function: rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>* rapidjson::internal::Stack<rapidjson::CrtAllocator>::PushUnsafe<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>>(unsigned long)
RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) {
        RAPIDJSON_ASSERT(stackTop_);
        RAPIDJSON_ASSERT(stackTop_ + sizeof(T) * count <= stackEnd_);
        T* ret = reinterpret_cast<T*>(stackTop_);
        stackTop_ += sizeof(T) * count;
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x45e8
shlq $0x4, %rsi
addq %rax, %rsi
cmpq 0x20(%rdi), %rsi
ja 0x4607
movq %rsi, 0x18(%rdi)
popq %rbp
retq
leaq 0x2f65(%rip), %rdi      # 0x7554
leaq 0x2cfc(%rip), %rsi      # 0x72f2
leaq 0x2f61(%rip), %rcx      # 0x755e
movl $0x81, %edx
callq 0x2190
leaq 0x2ff1(%rip), %rdi      # 0x75ff
leaq 0x2cdd(%rip), %rsi      # 0x72f2
leaq 0x2f42(%rip), %rcx      # 0x755e
movl $0x82, %edx
callq 0x2190