LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: bool ImGui::CheckboxFlagsT<int>(char const*, int*, int)
bool ImGui::CheckboxFlagsT(const char* label, T* flags, T flags_value)
{
    bool all_on = (*flags & flags_value) == flags_value;
    bool any_on = (*flags & flags_value) != 0;
    bool pressed;
    if (!all_on && any_on)
    {
        ImGuiWindow* window = GetCurrentWindow();
        ImGuiItemFlags backup_item_flags = window->DC.ItemFlags;
        window->DC.ItemFlags |= ImGuiItemFlags_MixedValue;
        pressed = Checkbox(label, &all_on);
        window->DC.ItemFlags = backup_item_flags;
    }
    else
    {
        pressed = Checkbox(label, &all_on);

    }
    if (pressed)
    {
        if (all_on)
            *flags |= flags_value;
        else
            *flags &= ~flags_value;
    }
    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movl (%rsi), %eax
andl %edx, %eax
cmpl %edx, %eax
sete -0x21(%rbp)
sete %cl
testl %eax, %eax
sete %al
orb %cl, %al
je 0xa8de2
leaq -0x21(%rbp), %rsi
callq 0x9450c
jmp 0xa8e1f
leaq 0x54ee7(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %r15
movb $0x1, 0x90(%r15)
movl 0x1cc(%r15), %r12d
movl %r12d, %eax
orl $0x40, %eax
movl %eax, 0x1cc(%r15)
leaq -0x21(%rbp), %rsi
callq 0x9450c
movl %r12d, 0x1cc(%r15)
testb %al, %al
je 0xa8e36
cmpb $0x1, -0x21(%rbp)
jne 0xa8e2e
orl (%r14), %ebx
jmp 0xa8e33
notl %ebx
andl (%r14), %ebx
movl %ebx, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: float ImGui::RoundScalarWithFormatT<float, float>(char const*, int, float)
TYPE ImGui::RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, TYPE v)
{
    const char* fmt_start = ImParseFormatFindStart(format);
    if (fmt_start[0] != '%' || fmt_start[1] == '%') // Don't apply if the value is not visible in the format string
        return v;
    char v_str[64];
    ImFormatString(v_str, IM_ARRAYSIZE(v_str), fmt_start, v);
    const char* p = v_str;
    while (*p == ' ')
        p++;
    if (data_type == ImGuiDataType_Float || data_type == ImGuiDataType_Double)
        v = (TYPE)ImAtof(p);
    else
        ImAtoi(p, (SIGNEDTYPE*)&v);
    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %rdx
movb (%rdx), %sil
testb %sil, %sil
je 0xaed86
cmpb $0x25, %sil
jne 0xaed73
movl $0x1, %ecx
cmpb $0x25, 0x1(%rdx)
jne 0xaed8d
xorl %ecx, %ecx
cmpb $0x25, %sil
sete %cl
addq %rcx, %rdx
incq %rdx
xorl %ecx, %ecx
jmp 0xaed90
movl $0x3, %ecx
jmp 0xaed90
movq %rdx, %rax
testl %ecx, %ecx
je 0xaed5a
cmpl $0x1, %ecx
jne 0xaed9c
movq %rax, %rdx
cmpb $0x25, (%rdx)
jne 0xaee48
cmpb $0x25, 0x1(%rdx)
je 0xaee48
cvtss2sd %xmm0, %xmm0
leaq -0x50(%rbp), %r14
movl $0x40, %esi
movq %r14, %rdi
movb $0x1, %al
callq 0x427cb
movb (%r14), %al
incq %r14
cmpb $0x20, %al
je 0xaedc6
andl $-0x2, %ebx
cmpl $0x8, %ebx
jne 0xaede9
decq %r14
movq %r14, %rdi
callq 0xc700
cvtsd2ss %xmm0, %xmm0
jmp 0xaee48
xorl %ecx, %ecx
cmpb $0x2d, %al
sete %cl
xorl %edx, %edx
cmpb $0x2b, -0x1(%r14,%rcx)
sete %dl
addq %rcx, %rdx
movb -0x1(%r14,%rdx), %cl
leal -0x30(%rcx), %esi
xorps %xmm0, %xmm0
cmpb $0x9, %sil
ja 0xaee3d
addq %rdx, %r14
movss 0x81ee(%rip), %xmm1     # 0xb7008
addb $-0x30, %cl
movzbl %cl, %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
mulss %xmm1, %xmm0
addss %xmm2, %xmm0
movb (%r14), %cl
leal -0x30(%rcx), %edx
incq %r14
cmpb $0xa, %dl
jb 0xaee1a
cmpb $0x2d, %al
jne 0xaee48
xorps 0x8178(%rip), %xmm0     # 0xb6fc0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_sdl.cpp
// Function: ImGui_ImplSDL2_Shutdown()
void ImGui_ImplSDL2_Shutdown()
{
    g_Window = NULL;

    // Destroy last known clipboard data
    if (g_ClipboardTextData)
        SDL_free(g_ClipboardTextData);
    g_ClipboardTextData = NULL;

    // Destroy SDL mouse cursors
    for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
        SDL_FreeCursor(g_MouseCursors[cursor_n]);
    memset(g_MouseCursors, 0, sizeof(g_MouseCursors));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq $0x0, 0x54e50(%rip) # 0x1047d8
movq 0x54e51(%rip), %rdi     # 0x1047e0
testq %rdi, %rdi
je 0xaf999
callq 0xc990
movq $0x0, 0x54e3c(%rip) # 0x1047e0
xorl %ebx, %ebx
leaq 0x54e43(%rip), %r14     # 0x1047f0
movq (%rbx,%r14), %rdi
callq 0xc540
addq $0x8, %rbx
cmpq $0x48, %rbx
jne 0xaf9ad
xorps %xmm0, %xmm0
movaps %xmm0, 0x54e56(%rip)    # 0x104820
movaps %xmm0, 0x54e3f(%rip)    # 0x104810
movaps %xmm0, 0x54e28(%rip)    # 0x104800
movaps %xmm0, 0x54e11(%rip)    # 0x1047f0
movq $0x0, 0x54e46(%rip) # 0x104830
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_sdl.cpp
// Function: ImGui_ImplSDL2_GetClipboardText(void*)
static const char* ImGui_ImplSDL2_GetClipboardText(void*)
{
    if (g_ClipboardTextData)
        SDL_free(g_ClipboardTextData);
    g_ClipboardTextData = SDL_GetClipboardText();
    return g_ClipboardTextData;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x54799(%rip), %rdi     # 0x1047e0
testq %rdi, %rdi
je 0xb0051
callq 0xc990
callq 0xc0e0
movq %rax, 0x54783(%rip)     # 0x1047e0
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: ImGui_ImplOpenGL3_DestroyDeviceObjects()
void    ImGui_ImplOpenGL3_DestroyDeviceObjects()
{
    if (g_VboHandle)        { glDeleteBuffers(1, &g_VboHandle); g_VboHandle = 0; }
    if (g_ElementsHandle)   { glDeleteBuffers(1, &g_ElementsHandle); g_ElementsHandle = 0; }
    if (g_ShaderHandle && g_VertHandle) { glDetachShader(g_ShaderHandle, g_VertHandle); }
    if (g_ShaderHandle && g_FragHandle) { glDetachShader(g_ShaderHandle, g_FragHandle); }
    if (g_VertHandle)       { glDeleteShader(g_VertHandle); g_VertHandle = 0; }
    if (g_FragHandle)       { glDeleteShader(g_FragHandle); g_FragHandle = 0; }
    if (g_ShaderHandle)     { glDeleteProgram(g_ShaderHandle); g_ShaderHandle = 0; }

    ImGui_ImplOpenGL3_DestroyFontsTexture();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x5471f(%rip)     # 0x1048a4
je 0xb01a6
movq 0x48d7a(%rip), %rax     # 0xf8f08
leaq 0x5470f(%rip), %rsi     # 0x1048a4
movl $0x1, %edi
callq *(%rax)
movl $0x0, 0x546fe(%rip)     # 0x1048a4
cmpl $0x0, 0x546fb(%rip)     # 0x1048a8
je 0xb01ce
movq 0x48d52(%rip), %rax     # 0xf8f08
leaq 0x546eb(%rip), %rsi     # 0x1048a8
movl $0x1, %edi
callq *(%rax)
movl $0x0, 0x546da(%rip)     # 0x1048a8
movl 0x546ac(%rip), %edi     # 0x104880
testl %edi, %edi
setne %al
movl 0x546a9(%rip), %esi     # 0x104888
testl %esi, %esi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xb01f4
movq 0x48dd6(%rip), %rax     # 0xf8fc8
callq *(%rax)
movl 0x54686(%rip), %edi     # 0x104880
testl %edi, %edi
setne %al
movl 0x54687(%rip), %esi     # 0x10488c
testl %esi, %esi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xb021a
movq 0x48db0(%rip), %rax     # 0xf8fc8
callq *(%rax)
movl 0x54668(%rip), %edi     # 0x104888
testl %edi, %edi
je 0xb0237
movq 0x48d55(%rip), %rax     # 0xf8f80
callq *(%rax)
movl $0x0, 0x54651(%rip)     # 0x104888
movl 0x5464f(%rip), %edi     # 0x10488c
testl %edi, %edi
je 0xb0254
movq 0x48d38(%rip), %rax     # 0xf8f80
callq *(%rax)
movl $0x0, 0x54638(%rip)     # 0x10488c
movl 0x54626(%rip), %edi     # 0x104880
testl %edi, %edi
je 0xb0271
movq 0x48ccb(%rip), %rax     # 0xf8f30
callq *(%rax)
movl $0x0, 0x5460f(%rip)     # 0x104880
popq %rbp
jmp 0xb0f3c
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: ImGui_ImplOpenGL3_CreateFontsTexture()
bool ImGui_ImplOpenGL3_CreateFontsTexture()
{
    // Build texture atlas
    ImGuiIO& io = ImGui::GetIO();
    unsigned char* pixels;
    int width, height;
    io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);   // Load as RGBA 32-bit (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory.

    // Upload texture to graphics system
    GLint last_texture;
    glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
    glGenTextures(1, &g_FontTexture);
    glBindTexture(GL_TEXTURE_2D, g_FontTexture);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
#ifdef GL_UNPACK_ROW_LENGTH
    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
#endif
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);

    // Store our identifier
    io.Fonts->TexID = (ImTextureID)(intptr_t)g_FontTexture;

    // Restore state
    glBindTexture(GL_TEXTURE_2D, last_texture);

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x47c7c
movq %rax, %rbx
movq 0xa0(%rax), %rdi
leaq -0x40(%rbp), %r14
leaq -0x34(%rbp), %r12
leaq -0x30(%rbp), %r13
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x7cd10
leaq -0x2c(%rbp), %r15
movl $0x8069, %edi           # imm = 0x8069
movq %r15, %rsi
callq 0xc740
leaq 0x539f6(%rip), %rsi     # 0x104884
movl $0x1, %edi
callq 0xc310
movl 0x539e6(%rip), %esi     # 0x104884
movl $0xde1, %edi            # imm = 0xDE1
callq 0xc960
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2601, %edx           # imm = 0x2601
callq 0xc690
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2601, %edx           # imm = 0x2601
callq 0xc690
movl $0xcf2, %edi            # imm = 0xCF2
xorl %esi, %esi
callq 0xc820
movl (%r12), %ecx
movl (%r13), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x1908, %edx           # imm = 0x1908
xorl %r9d, %r9d
pushq (%r14)
pushq $0x1401                 # imm = 0x1401
pushq $0x1908                 # imm = 0x1908
callq 0xc8c0
addq $0x20, %rsp
movl 0x53971(%rip), %eax     # 0x104884
movq 0xa0(%rbx), %rcx
movq %rax, 0x8(%rcx)
movl (%r15), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0xc960
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: ImGui_ImplOpenGL3_DestroyFontsTexture()
void ImGui_ImplOpenGL3_DestroyFontsTexture()
{
    if (g_FontTexture)
    {
        ImGuiIO& io = ImGui::GetIO();
        glDeleteTextures(1, &g_FontTexture);
        io.Fonts->TexID = 0;
        g_FontTexture = 0;
    }
}

// Assembly:
cmpl $0x0, 0x53941(%rip)     # 0x104884
je 0xb0f83
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x47c7c
movq %rax, %rbx
leaq 0x5392a(%rip), %rsi     # 0x104884
movl $0x1, %edi
callq 0xc8a0
movq 0xa0(%rbx), %rax
movq $0x0, 0x8(%rax)
movl $0x0, 0x53907(%rip)     # 0x104884
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: CheckShader(unsigned int, char const*)
static bool CheckShader(GLuint handle, const char* desc)
{
    GLint status = 0, log_length = 0;
    glGetShaderiv(handle, GL_COMPILE_STATUS, &status);
    glGetShaderiv(handle, GL_INFO_LOG_LENGTH, &log_length);
    if ((GLboolean)status == GL_FALSE)
        fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile %s!\n", desc);
    if (log_length > 1)
    {
        ImVector<char> buf;
        buf.resize((int)(log_length + 1));
        glGetShaderInfoLog(handle, log_length, NULL, (GLchar*)buf.begin());
        fprintf(stderr, "%s\n", buf.begin());
    }
    return (GLboolean)status == GL_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %ebx
xorl %eax, %eax
leaq -0x48(%rbp), %r15
movl %eax, (%r15)
leaq -0x44(%rbp), %r12
movl %eax, (%r12)
movq 0x47f46(%rip), %r13     # 0xf8ef8
movl $0x8b81, %esi           # imm = 0x8B81
movq %r15, %rdx
callq *(%r13)
movl %ebx, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r12, %rdx
callq *(%r13)
cmpb $0x0, (%r15)
je 0xb0fe9
movl -0x44(%rbp), %ecx
cmpl $0x2, %ecx
jge 0xb1006
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x47f20(%rip), %rax     # 0xf8f10
movq (%rax), %rdi
leaq 0x24dcc(%rip), %rsi     # 0xd5dc6
movq %r14, %rdx
xorl %eax, %eax
callq 0xc1a0
jmp 0xb0fd2
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
leal 0x1(%rcx), %r15d
movl -0x3c(%rbp), %eax
cmpl %ecx, %eax
jg 0xb106f
movl $0x8, %r12d
testl %eax, %eax
je 0xb1032
movl %eax, %r12d
shrl $0x1f, %r12d
addl %eax, %r12d
sarl %r12d
addl %eax, %r12d
cmpl %r15d, %r12d
cmovlel %r15d, %r12d
cmpl %r12d, %eax
jge 0xb106f
movl %r12d, %edi
callq 0x424fb
movq %rax, %r14
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
je 0xb1067
movslq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0xc080
movq -0x38(%rbp), %rdi
callq 0x425d4
movq %r14, -0x38(%rbp)
movl %r12d, -0x3c(%rbp)
movl %r15d, -0x40(%rbp)
movq 0x47e36(%rip), %rax     # 0xf8eb0
movl -0x44(%rbp), %esi
movq -0x38(%rbp), %rcx
movl %ebx, %edi
xorl %edx, %edx
callq *(%rax)
movq 0x47e82(%rip), %rax     # 0xf8f10
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
leaq 0x16525(%rip), %rsi     # 0xc75c1
xorl %eax, %eax
callq 0xc1a0
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xb0fda
callq 0x425d4
jmp 0xb0fda
movq %rax, %rdi
callq 0x3a5b4
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5f8d6
movq %rbx, %rdi
callq 0xc560
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/misc/maq2sam.c
// Function: maq_delete_maqmap
void maq_delete_maqmap(maqmap_t *mm)
{
	int i;
	if (mm == 0) return;
	for (i = 0; i < mm->n_ref; ++i)
		free(mm->ref_name[i]);
	free(mm->ref_name);
	free(mm->mapped_reads);
	free(mm);
}

// Assembly:
testq %rdi, %rdi
je 0x1313
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jle 0x12f2
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1040
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x12d9
movq 0x8(%rbx), %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
retq
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/misc/maq2sam.c
// Function: maqmap_read_header
maqmap_t *maqmap_read_header(gzFile fp)
{
	maqmap_t *mm;
	int k, len;
	mm = maq_new_maqmap();
	gzread(fp, &mm->format, sizeof(int));
	if (mm->format != MAQMAP_FORMAT_NEW) {
		if (mm->format > 0) {
			fprintf(stderr, "** Obsolete map format is detected. Please use 'mapass2maq' command to convert the format.\n");
			exit(3);
		}
		assert(mm->format == MAQMAP_FORMAT_NEW);
	}
	gzread(fp, &mm->n_ref, sizeof(int));
	mm->ref_name = (char**)calloc(mm->n_ref, sizeof(char*));
	for (k = 0; k != mm->n_ref; ++k) {
		gzread(fp, &len, sizeof(int));
		mm->ref_name[k] = (char*)malloc(len * sizeof(char));
		gzread(fp, mm->ref_name[k], len);
	}
	/* read number of mapped reads */
	gzread(fp, &mm->n_mapped_reads, sizeof(uint64_t));
	return mm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x10a0
movq %rax, %r14
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x10c0
movl (%r14), %eax
cmpl $-0x1, %eax
jne 0x13f6
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
movl $0x4, %edx
callq 0x10c0
movslq 0x4(%r14), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x10a0
movq %rax, 0x8(%r14)
testq %r15, %r15
je 0x13d1
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x10c0
movl 0xc(%rsp), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x10f0
movq 0x8(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x10c0
incq %r13
movl 0x4(%r14), %eax
cmpq %rax, %r13
jne 0x138b
movq %r14, %rsi
addq $0x10, %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x10c0
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testl %eax, %eax
jle 0x13ff
callq 0x1140
leaq 0xc5a(%rip), %rdi       # 0x2060
leaq 0xc73(%rip), %rsi       # 0x2080
leaq 0xc76(%rip), %rcx       # 0x208a
movl $0x4b, %edx
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O1/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/misc/maq2sam.c
// Function: main
int main(int argc, char *argv[])
{
	gzFile fp;
	if (argc == 1) {
		fprintf(stderr, "Version: %s\n", PACKAGE_VERSION);
		fprintf(stderr, "Usage: maq2sam <in.map> [<readGroup>]\n");
		return 1;
	}
	fp = strcmp(argv[1], "-")? gzopen(argv[1], "r") : gzdopen(fileno(stdin), "r");
	maq2tam_core(fp, argc > 2? argv[2] : 0);
	gzclose(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, %edi
je 0x1850
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
leaq 0x9a4(%rip), %rsi       # 0x2189
movq %r14, %rdi
callq 0x10b0
testl %eax, %eax
je 0x1802
leaq 0x993(%rip), %rsi       # 0x218b
movq %r14, %rdi
callq 0x1100
jmp 0x181f
movq 0x27cf(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x10e0
leaq 0x973(%rip), %rsi       # 0x218b
movl %eax, %edi
callq 0x1060
movq %rax, %r15
xorl %r14d, %r14d
cmpl $0x3, %ebp
jl 0x1830
movq 0x10(%rbx), %rsi
jmp 0x1832
xorl %esi, %esi
movq %r15, %rdi
callq 0x141e
movq %r15, %rdi
callq 0x1030
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1187
movl $0x1, %r14d
jmp 0x1842
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_23.cc
// Function: main
int main(int argc, char const *argv[])
{
	const char* str1 = "Hello ";
	const char* str2 = "World!";

	char* str3 = literal_strcat(str1, str2);
	cout << str3 << endl;
	delete [] str3;

	string str4 = "Hello ";
	string str5 = "World!";

	cout << library_strcat(str4, str5) << endl;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
leaq 0xd1b(%rip), %r14       # 0x2004
leaq 0xd1b(%rip), %rbx       # 0x200b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x126c
movq %rax, %r15
movq %rax, %rdi
callq 0x1060
movq 0x2ccb(%rip), %r12      # 0x3fd8
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x10d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1040
movq %rax, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x10e0
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xcb0(%rip), %rdx       # 0x200a
leaq -0x80(%rbp), %rdi
movq %r14, %rsi
callq 0x1578
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xc9c(%rip), %rdx       # 0x2011
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x1578
leaq -0x40(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x147a
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x2c37(%rip), %rdi      # 0x3fd8
callq 0x10d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %rdi
callq 0x1070
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13e9
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x10c0
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x13fe
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x10c0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x1413
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x10c0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1448
movq %rax, %rbx
jmp 0x145d
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1448
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x10c0
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x145d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x10c0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x1472
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/msh2pts/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<Point*>::FindAny(gaps::R3Point const&, double, double) const
PtrType R3Kdtree<PtrType>::
FindAny(const R3Point& query_position, 
  RNScalar min_distance, RNScalar max_distance) const
{
  // Check root
  if (!root) return NULL;

  // Use squared distances for efficiency
  if (max_distance < 0) return NULL;
  if (min_distance < 0) min_distance = 0;
  RNLength min_distance_squared = min_distance * min_distance;
  RNLength max_distance_squared = max_distance * max_distance;

  // Search nodes recursively
  return FindAny(root, bbox, 
    NULL, query_position, 
    min_distance_squared, max_distance_squared,
    NULL, NULL);
}

// Assembly:
movapd %xmm0, %xmm2
movq 0x50(%rdi), %rax
testq %rax, %rax
sete %cl
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
seta %dl
orb %cl, %dl
je 0x15ac6
xorl %eax, %eax
retq
pushq %rax
movq %rsi, %r8
maxsd %xmm2, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
movq $0x0, (%rsp)
movq %rax, %rsi
movq %rdi, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x15ba8
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/BasicFileSys.cpp
// Function: BasicFileSys::mount()
void BasicFileSys::mount()
{
  // mount the disk
  bool new_disk = disk.mount("DISK");

  // if the disk exists, return as no further initialization is needed
  if (!new_disk) return;

  // initialize the superblock
  struct superblock_t super_block;
  super_block.bitmap[0] = 0x3;		// mark blocks 0 and 1 as used
  for (int i = 1; i < BLOCK_SIZE; i++) {
    super_block.bitmap[i] = 0;
  }
  disk.write_block(0, (void *) &super_block);

  // initialize the root directory
  struct dirblock_t dir_block;
  dir_block.magic = DIR_MAGIC_NUM;
  dir_block.num_entries = 0;
  for (int i = 0; i < MAX_DIR_ENTRIES; i++) {
    dir_block.dir_entries[i].block_num = 0;
  }
  disk.write_block(1, (void *) &dir_block);

  // write a zeroed-out data block to all other blocks on disk
  struct datablock_t data_block;
  for (int i = 0; i < BLOCK_SIZE; i++) {
    data_block.data[i] = 0;
  }
  for (int i = 2; i < NUM_BLOCKS; i++) {
    disk.write_block(i, (void *) &data_block);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rdi, %rbx
leaq 0x68c3(%rip), %rsi      # 0xa004
callq 0x3930
testb %al, %al
je 0x3804
leaq 0x100(%rsp), %rdx
movb $0x3, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1(%rdx)
movups %xmm0, 0x11(%rdx)
movups %xmm0, 0x21(%rdx)
movups %xmm0, 0x31(%rdx)
movups %xmm0, 0x41(%rdx)
movups %xmm0, 0x51(%rdx)
movups %xmm0, 0x61(%rdx)
movups %xmm0, 0x70(%rdx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3a34
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rsp)
movl $0x12, %eax
movw $0x0, (%rsp,%rax)
addq $0xc, %rax
cmpq $0x8a, %rax
jne 0x3794
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3a34
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %r14
movaps %xmm0, 0x70(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movl $0x2, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x3a34
incl %ebp
cmpl $0x400, %ebp            # imm = 0x400
jne 0x37ed
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/BasicFileSys.cpp
// Function: BasicFileSys::get_free_block()
short BasicFileSys::get_free_block()
{
  // get superblock
  struct superblock_t super_block;
  disk.read_block(0, (void *) &super_block);
  
  // look for first available block
  for (int byte = 0; byte < BLOCK_SIZE; byte++) {

    // check to see if byte has available slot
    if (super_block.bitmap[byte] != 0xFF) {
 
      // loop to check each bit
      for (int bit = 0; bit < 8; bit++) {
        int mask = 1 << bit;
	if (mask & ~super_block.bitmap[byte]) {

          // Available block is found: set bit in bitmap, write result back
	  // to superblock, and return block number.
	  super_block.bitmap[byte] |= mask;
	  disk.write_block(0, (void *) &super_block);
	  return (byte * 8) + bit;
	}
      }
    }
  }

  // disk is full
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
xorl %r12d, %r12d
leaq 0x8(%rsp), %rdx
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x39a6
xorl %r13d, %r13d
cmpb $-0x1, 0x8(%rsp,%r13)
je 0x389f
xorl %ebp, %ebp
xorl %r15d, %r15d
movl $0x1, %r14d
movl %r15d, %ecx
shll %cl, %r14d
movzbl 0x8(%rsp,%r13), %ebx
btl %r15d, %ebx
jb 0x3880
movl %ebx, %eax
orl %r14d, %eax
movb %al, 0x8(%rsp,%r13)
movq (%rsp), %rdi
xorl %esi, %esi
leaq 0x8(%rsp), %rdx
callq 0x3a34
leal (%r12,%r15), %eax
testl %ebx, %r14d
je 0x3899
cmpl $0x7, %r15d
leal 0x1(%r15), %ecx
setae %bpl
movl %ecx, %r15d
cmpl $0x8, %ecx
jne 0x384a
testb $0x1, %bpl
je 0x38b1
incq %r13
addl $0x8, %r12d
cmpq $0x80, %r13
jne 0x383d
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/BasicFileSys.cpp
// Function: BasicFileSys::reclaim_block(short)
void BasicFileSys::reclaim_block(short block_num)
{
  // get superblock
  struct superblock_t super_block;
  disk.read_block(0, (void *) &super_block);

  // clear bit
  int byte = block_num / 8;		// byte number
  int bit = block_num % 8;		// bit number
  unsigned char mask = ~(1 << bit);	// mask to clear bit
  super_block.bitmap[byte] &= mask;

  // write back superblock
  disk.write_block(0, (void *) &super_block);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movq %rsp, %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x39a6
leal 0x7(%r15), %eax
testw %r15w, %r15w
cmovnsl %r15d, %eax
cwtl
shrl $0x3, %eax
andb $0x7, %r15b
movl $0x1, %edx
movl %r15d, %ecx
shll %cl, %edx
movswq %ax, %rax
notb %dl
andb %dl, (%rsp,%rax)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3a34
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Disk.cpp
// Function: Disk::mount(char const*)
bool Disk::mount(const char *file_name)
{
  fd = open(file_name, O_RDWR);
  if (fd != -1) return false;

  fd = open(file_name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
  if (fd == -1) {
    cerr << "Could not create disk" << endl;
    exit(-1);
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x3200
movl %eax, %ebp
movl %eax, (%rbx)
cmpl $-0x1, %eax
jne 0x396d
movq %r14, %rdi
movl $0xc2, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3200
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x3978
cmpl $-0x1, %ebp
sete %al
popq %rbx
popq %r14
popq %rbp
retq
movq 0x9671(%rip), %rdi      # 0xcff0
leaq 0x6683(%rip), %rsi      # 0xa009
callq 0x3290
movq %rax, %rdi
callq 0x3170
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3330
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Disk.cpp
// Function: Disk::read_block(int, void*)
void Disk::read_block(int block_num, void *block)
{
  off_t offset;
  off_t new_offset;
  ssize_t size; 

  if (block_num < 0 || block_num >= NUM_BLOCKS) {
    cerr << "Invalid block size" << endl;
    exit(-1);
  }

  offset = block_num * BLOCK_SIZE;
  new_offset = lseek(fd, offset, SEEK_SET);
  if (offset != new_offset) {
    cerr << "Seek failure" << endl;
    exit(-1);
  }

  size = read(fd, block, BLOCK_SIZE);
  if (size != BLOCK_SIZE) {
    cerr << "Failed to read entire block" << endl;
    exit(-1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x400, %esi            # imm = 0x400
jae 0x39ef
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
shll $0x7, %r15d
movl (%rdi), %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3480
cmpq %r15, %rax
jne 0x39ff
movl (%r14), %edi
movl $0x80, %edx
movq %rbx, %rsi
callq 0x33a0
cmpq $0x80, %rax
jne 0x3a0f
popq %rbx
popq %r14
popq %r15
retq
movq 0x95fa(%rip), %rdi      # 0xcff0
leaq 0x6622(%rip), %rsi      # 0xa01f
jmp 0x3a1d
movq 0x95ea(%rip), %rdi      # 0xcff0
leaq 0x6625(%rip), %rsi      # 0xa032
jmp 0x3a1d
movq 0x95da(%rip), %rdi      # 0xcff0
leaq 0x6622(%rip), %rsi      # 0xa03f
callq 0x3290
movq %rax, %rdi
callq 0x3170
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3330
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Disk.cpp
// Function: Disk::write_block(int, void*)
void Disk::write_block(int block_num, void *block)
{
  off_t offset;
  off_t new_offset;
  ssize_t size; 

  if (block_num < 0 || block_num >= NUM_BLOCKS) {
    cerr << "Invalid block size" << endl;
    exit(-1);
  }

  offset = block_num * BLOCK_SIZE;
  new_offset = lseek(fd, offset, SEEK_SET);
  if (offset != new_offset) {
    cerr << "Seek failure" << endl;
    exit(-1);
  }

  size = write(fd, block, BLOCK_SIZE);
  if (size != BLOCK_SIZE) {
    cerr << "Failed to write entire block" << endl;
    exit(-1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x400, %esi            # imm = 0x400
jae 0x3a7d
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
shll $0x7, %r15d
movl (%rdi), %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3480
cmpq %r15, %rax
jne 0x3a8d
movl (%r14), %edi
movl $0x80, %edx
movq %rbx, %rsi
callq 0x3130
cmpq $0x80, %rax
jne 0x3a9d
popq %rbx
popq %r14
popq %r15
retq
movq 0x956c(%rip), %rdi      # 0xcff0
leaq 0x6594(%rip), %rsi      # 0xa01f
jmp 0x3aab
movq 0x955c(%rip), %rdi      # 0xcff0
leaq 0x6597(%rip), %rsi      # 0xa032
jmp 0x3aab
movq 0x954c(%rip), %rdi      # 0xcff0
leaq 0x65b0(%rip), %rsi      # 0xa05b
callq 0x3290
movq %rax, %rdi
callq 0x3170
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3330
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/FileSys.cpp
// Function: FileSys::mount(int)
void FileSys::mount(int sock) {
  bfs.mount();

  // by default current directory is home directory, in disk block #1
  curr_dir = 1;

  // use this socket to receive file system operations from the client and
  // send back response messages
  fs_sock = sock;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x372c
movw $0x1, 0x4(%r14)
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/FileSys.cpp
// Function: FileSys::cd(char const*)
void FileSys::cd(const char *name)
{
  bool error = false;
  bool found = false;
  char buffer[256];

  //retrieve current directory data block
  dirblock_t dir_ptr;
  bfs.read_block(curr_dir, (void *) &dir_ptr);

  //check if any sub directories exist in current directory
  if(dir_ptr.num_entries > 0){
    //check each sub directory and check directory names for match
    for(int i= 1; i <= dir_ptr.num_entries; i++){
      if(strcmp(dir_ptr.dir_entries[i].name, name) == 0){
        found = true;
        if(!is_directory(dir_ptr.dir_entries[i].block_num)){
          error = true;
          strcat(buffer, "500 File is not a directory\r\n");
        }
        else{
          strcat(buffer, "200 OK\r\n");
          curr_dir = dir_ptr.dir_entries[i].block_num;
        }
      }
    }
  }
  // if this point reached, no matching directory found
  if(found && !error){
    strcat(buffer, "503 File does not exist\r\n");
  }
  cout << buffer << endl;
  send(fs_sock, buffer, sizeof(buffer), 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
movswl 0x4(%rdi), %esi
leaq 0x108(%rsp), %r15
movq %r15, %rdx
callq 0x3924
cmpl $0x0, 0x4(%r15)
je 0x3e04
leaq 0x11c(%rsp), %r15
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x3dc2
movswl 0xa(%r15), %esi
movq %rbx, %rdi
leaq 0x188(%rsp), %rdx
callq 0x3924
movl 0x188(%rsp), %r13d
movq %rsp, %rdi
callq 0x3160
addq %rsp, %rax
cmpl $-0x1, %r13d
je 0x3da5
movups 0x6367(%rip), %xmm0     # 0xa0f9
movups %xmm0, 0xe(%rax)
movups 0x634e(%rip), %xmm0     # 0xa0eb
movups %xmm0, (%rax)
movb $0x1, %r12b
jmp 0x3dbf
movabsq $0xa0d4b4f20303032, %rcx # imm = 0xA0D4B4F20303032
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
movzwl 0xa(%r15), %eax
movw %ax, 0x4(%rbx)
movb $0x1, %r13b
movl 0x10c(%rsp), %eax
incq %rbp
addq $0xc, %r15
cmpq %rax, %rbp
jb 0x3d4e
notb %r13b
orb %r12b, %r13b
testb $0x1, %r13b
jne 0x3e04
movq %rsp, %rdi
callq 0x3160
movups 0x6315(%rip), %xmm0     # 0xa109
movups %xmm0, (%rsp,%rax)
movups 0x6314(%rip), %xmm0     # 0xa113
movups %xmm0, 0xa(%rsp,%rax)
movq %rsp, %r14
movq %r14, %rdi
callq 0x3160
movq 0x91b2(%rip), %r15      # 0xcfc8
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3310
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31e0
movl 0x8(%rbx), %edi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3180
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/FileSys.cpp
// Function: FileSys::home()
void FileSys::home(){
  char buffer[1024];
  curr_dir = 1;
  strcpy(buffer, "200 OK\r\n Length: 0\r\n\r\n");
  send(fs_sock, buffer, sizeof(buffer), 0);
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
movw $0x1, 0x4(%rdi)
movups 0x627d(%rip), %xmm0     # 0xa123
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movabsq $0xa0d0a0d30203a, %rax  # imm = 0xA0D0A0D30203A
movq %rax, 0xf(%rsi)
movl 0x8(%rdi), %edi
movl $0x400, %edx            # imm = 0x400
xorl %ecx, %ecx
callq 0x3180
addq $0x408, %rsp            # imm = 0x408
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/FileSys.cpp
// Function: FileSys::rm(char const*)
void FileSys::rm(const char *name)
{
  char buffer[MAX_FNAME_SIZE+256];
  dirblock_t curr_block;
  bool error = false;
  bool found = false;
  bfs.read_block(curr_dir,(void*)& curr_block);

  for (unsigned int i = 0; i < MAX_DIR_ENTRIES; i++){
    if (strcmp(curr_block.dir_entries[i].name, name) == 0){
      if (!is_directory(curr_block.dir_entries[i].block_num)){
        found = true;
        inode_t inode_block;
        bfs.read_block(curr_block.dir_entries[i].block_num,
                       (void*)&inode_block);
        for (size_t j = 0; j < (inode_block.size / BLOCK_SIZE) + 1; j++){
          bfs.reclaim_block(inode_block.blocks[i]);
          inode_block.blocks[i] = 0;
          inode_block.size = 0;
        }
        bfs.reclaim_block(curr_block.dir_entries[i].block_num);

        curr_block.dir_entries[i].name[0] = '\0';
        curr_block.dir_entries[i].block_num = 0;

        curr_block.num_entries--;
        bfs.write_block(curr_dir,(void*)& curr_block);
      }
      else{
        strcpy(buffer, "501: File is a directory\r\n");
        error = true;
      }
    }
  }
  if(!found && !error){
    strcpy(buffer, "503 File does not exist\r\n");
    error = true;
  }else{
    strcpy(buffer, "200 OK\r\nLength: 0\r\n\r\n");
  }
  //send buffer to client
  send(fs_sock, buffer, sizeof(buffer), 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movswl 0x4(%rdi), %esi
leaq 0x90(%rsp), %rdx
callq 0x3924
movl $0x4, %ebp
leaq 0x98(%rsp), %r12
leaq 0x10(%rsp), %r13
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x3370
testl %eax, %eax
jne 0x45aa
movswl 0xa(%r12), %esi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x3924
cmpl $-0x1, 0x10(%rsp)
je 0x4586
movswl 0xa(%r12), %esi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x3924
movswl 0x10(%rsp,%rbp,2), %esi
movq %rbx, %rdi
callq 0x38c4
xorl %r15d, %r15d
movw %r15w, 0x10(%rsp,%rbp,2)
movl $0x0, 0x14(%rsp)
movswl 0xa(%r12), %esi
movq %rbx, %rdi
callq 0x38c4
movb $0x0, (%r12)
movw %r15w, 0xa(%r12)
decl 0x94(%rsp)
movswl 0x4(%rbx), %esi
movq %rbx, %rdi
leaq 0x90(%rsp), %rdx
callq 0x392a
movb $0x1, %r15b
jmp 0x45aa
movups 0x5c32(%rip), %xmm0     # 0xa1bf
movups %xmm0, 0x11b(%rsp)
movups 0x5c18(%rip), %xmm0     # 0xa1b4
movaps %xmm0, 0x110(%rsp)
movb $0x1, %al
movl %eax, 0xc(%rsp)
addq $0xc, %r12
incq %rbp
cmpq $0xe, %rbp
jne 0x44f3
testb $0x1, %r15b
jne 0x45c8
testb $0x1, 0xc(%rsp)
je 0x45eb
movups 0x5b06(%rip), %xmm0     # 0xa0d5
movaps %xmm0, 0x110(%rsp)
movabsq $0xa0d0a0d30203a, %rax  # imm = 0xA0D0A0D30203A
movq %rax, 0x11e(%rsp)
jmp 0x4609
movups 0x5b21(%rip), %xmm0     # 0xa113
movups %xmm0, 0x11a(%rsp)
movups 0x5b08(%rip), %xmm0     # 0xa109
movaps %xmm0, 0x110(%rsp)
movl 0x8(%rbx), %edi
leaq 0x110(%rsp), %rsi
movl $0x109, %edx            # imm = 0x109
xorl %ecx, %ecx
callq 0x3180
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Shell.cpp
// Function: Shell::mkdir_rpc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Shell::mkdir_rpc(string dname) {
  string command = "mkdir " + dname + "\r\n";
  char message[2048];
  char received[2048];
  strcpy(message, command.c_str());

  // send to server
  send(cs_sock, message, sizeof(message), 0);
  recv(cs_sock, received, sizeof(received), 0);

  // print
  print_response("mkdir", received);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1068, %rsp           # imm = 0x1068
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x42b0(%rip), %rsi      # 0xa4eb
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x8ae7
leaq 0x3e99(%rip), %rsi      # 0xa0e8
movq %r14, %rdi
callq 0x3490
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x627d
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6284
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x62b7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rsi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x3270
movl (%rbx), %edi
movl $0x800, %edx            # imm = 0x800
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3180
movl (%rbx), %edi
leaq 0x860(%rsp), %rsi
movl $0x800, %edx            # imm = 0x800
xorl %ecx, %ecx
callq 0x3110
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3f4f(%rip), %rsi      # 0xa24e
leaq 0x3f4d(%rip), %rdx      # 0xa253
leaq 0x40(%rsp), %rdi
callq 0x5d16
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x860(%rsp), %rbx
movq %rbx, %rdi
callq 0x3160
leaq (%rsp,%rax), %rdx
addq $0x860, %rdx            # imm = 0x860
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5d16
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x6418
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x6368
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x637f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6395
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x1068, %rsp           # imm = 0x1068
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x63c3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x63c3
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x63f9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x63f9
jmp 0x63f6
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x640f
movq 0x70(%rsp), %rsi
jmp 0x6407
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x640f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Shell.cpp
// Function: Shell::cd_rpc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Shell::cd_rpc(string dname) {
  string command = "cd " + dname + "\r\n";
  char message[2048];
  char received[2048];
  strcpy(message, command.c_str());

  // send to server
  send(cs_sock, message, sizeof(message), 0);
  recv(cs_sock, received, sizeof(received), 0);

  // print
  print_response("cd", received);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1068, %rsp           # imm = 0x1068
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x3e0b(%rip), %rsi      # 0xa4f2
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x8ae7
leaq 0x39ed(%rip), %rsi      # 0xa0e8
movq %r14, %rdi
callq 0x3490
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6729
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6730
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6763
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rsi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x3270
movl (%rbx), %edi
movl $0x800, %edx            # imm = 0x800
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3180
movl (%rbx), %edi
leaq 0x860(%rsp), %rsi
movl $0x800, %edx            # imm = 0x800
xorl %ecx, %ecx
callq 0x3110
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3aa9(%rip), %rsi      # 0xa254
leaq 0x3aa4(%rip), %rdx      # 0xa256
leaq 0x40(%rsp), %rdi
callq 0x5d16
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x860(%rsp), %rbx
movq %rbx, %rdi
callq 0x3160
leaq (%rsp,%rax), %rdx
addq $0x860, %rdx            # imm = 0x860
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5d16
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x6418
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x6814
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x682b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6841
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x1068, %rsp           # imm = 0x1068
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x686f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x686f
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x68a5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x68a5
jmp 0x68a2
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68bb
movq 0x70(%rsp), %rsi
jmp 0x68b3
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x68bb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Shell.cpp
// Function: Shell::home_rpc()
void Shell::home_rpc() {
  string command = "home\r\n";
  char message[200];
  char received[2048];
  strcpy(message, command.c_str());

  // send to server
  send(cs_sock, message, sizeof(message), 0);
  recv(cs_sock, received, sizeof(received), 0);

  // print
  print_response("home", received);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x938, %rsp            # imm = 0x938
movq %rdi, %rbx
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3c11(%rip), %rsi      # 0xa4f6
leaq 0x3c10(%rip), %rdx      # 0xa4fc
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x5d16
movq (%r14), %rsi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x3270
movl (%rbx), %edi
movl $0xc8, %edx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3180
movl (%rbx), %edi
leaq 0x130(%rsp), %rsi
movl $0x800, %edx            # imm = 0x800
xorl %ecx, %ecx
callq 0x3110
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3917(%rip), %rsi      # 0xa257
leaq 0x3914(%rip), %rdx      # 0xa25b
leaq 0x20(%rsp), %rdi
callq 0x5d16
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x130(%rsp), %rbx
movq %rbx, %rdi
callq 0x3160
leaq (%rsp,%rax), %rdx
addq $0x130, %rdx            # imm = 0x130
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x5d16
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x6418
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69a4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x69bb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x69d2
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69ff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x69ff
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x6a1d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x6a1d
jmp 0x6a1a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x6a34
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/dmonaldo[P]simple-network-file-system/Shell.cpp
// Function: Shell::rmdir_rpc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Shell::rmdir_rpc(string dname) {
  string command = "rmdir " + dname + "\r\n";
  char message[2048];
  char received[2048];
  strcpy(message, command.c_str());

  // send to server
  send(cs_sock, message, sizeof(message), 0);
  recv(cs_sock, received, sizeof(received), 0);

  // print
  print_response("rmdir", received);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1068, %rsp           # imm = 0x1068
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x3aa6(%rip), %rsi      # 0xa4fd
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x8ae7
leaq 0x367d(%rip), %rsi      # 0xa0e8
movq %r14, %rdi
callq 0x3490
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6a99
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6aa0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ad3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rsi
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x3270
movl (%rbx), %edi
movl $0x800, %edx            # imm = 0x800
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3180
movl (%rbx), %edi
leaq 0x860(%rsp), %rsi
movl $0x800, %edx            # imm = 0x800
xorl %ecx, %ecx
callq 0x3110
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3741(%rip), %rsi      # 0xa25c
leaq 0x373f(%rip), %rdx      # 0xa261
leaq 0x40(%rsp), %rdi
callq 0x5d16
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x860(%rsp), %rbx
movq %rbx, %rdi
callq 0x3160
leaq (%rsp,%rax), %rdx
addq $0x860, %rdx            # imm = 0x860
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5d16
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x6418
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x6b84
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x6b9b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6bb1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x1068, %rsp           # imm = 0x1068
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x6bdf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x6bdf
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x6c15
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x6c15
jmp 0x6c12
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c2b
movq 0x70(%rsp), %rsi
jmp 0x6c23
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6c2b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3440
nop