LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiToggleGroup
int GuiToggleGroup(Rectangle bounds, const char *text, int active)
{
    #if !defined(TOGGLEGROUP_MAX_ELEMENTS)
        #define TOGGLEGROUP_MAX_ELEMENTS    32
    #endif

    float initBoundsX = bounds.x;

    // Get substrings items from text (items pointers)
    int rows[TOGGLEGROUP_MAX_ELEMENTS] = { 0 };
    int itemsCount = 0;
    const char **items = GuiTextSplit(text, &itemsCount, rows);

    int prevRow = rows[0];

    for (int i = 0; i < itemsCount; i++)
    {
        if (prevRow != rows[i])
        {
            bounds.x = initBoundsX;
            bounds.y += (bounds.height + GuiGetStyle(TOGGLE, GROUP_PADDING));
            prevRow = rows[i];
        }

        if (i == active) GuiToggle(bounds, items[i], true);
        else if (GuiToggle(bounds, items[i], false) == true) active = i;

        bounds.x += (bounds.width + GuiGetStyle(TOGGLE, GROUP_PADDING));
    }

    return active;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebx
movaps %xmm1, (%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
movaps %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
leaq 0x50(%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)
leaq 0x2c(%rsp), %r15
andl $0x0, (%r15)
movq %r15, %rsi
movq %r14, %rdx
callq 0x96e1
movaps (%rsp), %xmm1
movl (%r14), %r14d
movl (%r15), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
leaq 0x922ae(%rip), %rbp     # 0x9b8d0
pushq $0x10
popq %r15
movaps 0x30(%rsp), %xmm0
cmpq %r13, %r12
je 0x96cd
cmpl 0x50(%rsp,%r13,4), %r14d
je 0x9677
pushq $0x3
popq %rdi
movl %r15d, %esi
movaps %xmm0, 0x10(%rsp)
callq 0x6e93
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
cvtsi2ss %eax, %xmm2
addss 0x40(%rsp), %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss %xmm2, %xmm0
movaps 0x30(%rsp), %xmm2
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
movl 0x50(%rsp,%r13,4), %r14d
movl %ebx, %eax
movq (%rbp), %rdi
cmpq %rax, %r13
movaps %xmm0, 0x10(%rsp)
jne 0x9691
pushq $0x1
popq %rsi
callq 0x935a
jmp 0x969e
xorl %esi, %esi
callq 0x935a
testb %al, %al
cmovnel %r13d, %ebx
pushq $0x3
popq %rdi
movl %r15d, %esi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movaps (%rsp), %xmm1
addss %xmm1, %xmm0
movaps 0x10(%rsp), %xmm2
addss %xmm0, %xmm2
incq %r13
addq $0x8, %rbp
movaps %xmm2, %xmm0
jmp 0x962b
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiTextSplit
static const char **GuiTextSplit(const char *text, int *count, int *textRow)
{
    // NOTE: Current implementation returns a copy of the provided string with '\0' (string end delimiter)
    // inserted between strings defined by "delimiter" parameter. No memory is dynamically allocated,
    // all used memory is static... it has some limitations:
    //      1. Maximum number of possible split strings is set by TEXTSPLIT_MAX_TEXT_ELEMENTS
    //      2. Maximum size of text to split is TEXTSPLIT_MAX_TEXT_LENGTH
    // NOTE: Those definitions could be externally provided if required

    #if !defined(TEXTSPLIT_MAX_TEXT_LENGTH)
        #define TEXTSPLIT_MAX_TEXT_LENGTH      1024
    #endif

    #if !defined(TEXTSPLIT_MAX_TEXT_ELEMENTS)
        #define TEXTSPLIT_MAX_TEXT_ELEMENTS     128
    #endif

    static const char *result[TEXTSPLIT_MAX_TEXT_ELEMENTS] = { NULL };
    static char buffer[TEXTSPLIT_MAX_TEXT_LENGTH] = { 0 };
    memset(buffer, 0, TEXTSPLIT_MAX_TEXT_LENGTH);

    result[0] = buffer;
    int counter = 1;

    if (textRow != NULL) textRow[0] = 0;

    // Count how many substrings we have on text and point to every one
    for (int i = 0; i < TEXTSPLIT_MAX_TEXT_LENGTH; i++)
    {
        buffer[i] = text[i];
        if (buffer[i] == '\0') break;
        else if ((buffer[i] == ';') || (buffer[i] == '\n'))
        {
            result[counter] = buffer + i + 1;

            if (textRow != NULL)
            {
                if (buffer[i] == '\n') textRow[counter] = textRow[counter - 1] + 1;
                else textRow[counter] = textRow[counter - 1];
            }

            buffer[i] = '\0';   // Set an end of string at this point

            counter++;
            if (counter == TEXTSPLIT_MAX_TEXT_ELEMENTS) break;
        }
    }

    *count = counter;

    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x925d7(%rip), %r12     # 0x9bcd0
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
xorl %esi, %esi
callq 0x6060
movq %r12, 0x921c1(%rip)     # 0x9b8d0
testq %r14, %r14
je 0x9718
andl $0x0, (%r14)
pushq $0x1
popq %rax
xorl %ecx, %ecx
leaq 0x921ac(%rip), %rdx     # 0x9b8d0
cmpq $0x400, %rcx            # imm = 0x400
je 0x9785
movzbl (%r15,%rcx), %esi
movb %sil, (%rcx,%r12)
cmpl $0xa, %esi
je 0x9746
cmpl $0x3b, %esi
je 0x9746
testl %esi, %esi
jne 0x977b
jmp 0x9785
leaq (%rcx,%r12), %r8
incq %r8
movslq %eax, %rdi
movq %r8, (%rdx,%rdi,8)
testq %r14, %r14
je 0x976d
xorl %r8d, %r8d
cmpb $0xa, %sil
sete %r8b
addl -0x4(%r14,%rdi,4), %r8d
movl %r8d, (%r14,%rdi,4)
movb $0x0, (%rcx,%r12)
incl %eax
cmpl $0x80, %eax
je 0x9780
incq %rcx
jmp 0x9724
movl $0x80, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiDummyRec
void GuiDummyRec(Rectangle bounds, const char *text)
{
    GuiControlState state = guiState;

    // Update control
    //--------------------------------------------------------------------
    if ((state != GUI_STATE_DISABLED) && !guiLocked)
    {
        Vector2 mousePoint = GetMousePosition();

        // Check button state
        if (CheckCollisionPointRec(mousePoint, bounds))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
            else state = GUI_STATE_FOCUSED;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    GuiDrawRectangle(bounds, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state != GUI_STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
    GuiDrawText(text, GetTextBounds(DEFAULT, bounds), GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(BUTTON, (state != GUI_STATE_DISABLED)? TEXT_COLOR_NORMAL : TEXT_COLOR_DISABLED)), guiAlpha));
    //------------------------------------------------------------------
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3, 0x8ed51(%rip)     # 0x9b280
jne 0xc53a
pushq $0xa
popq %r14
pushq $0xb
popq %rbp
jmp 0xc568
pushq $0x1
popq %r14
pushq $0x2
popq %rbp
cmpb $0x0, 0x8ed3c(%rip)     # 0x9b284
jne 0xc568
callq 0x1fd8b
movaps (%rsp), %xmm1
movaps 0x10(%rsp), %xmm2
callq 0x2a643
testb %al, %al
je 0xc568
xorl %edi, %edi
callq 0x1fdb3
xorl %edi, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8debf(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0x7476
xorl %edi, %edi
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x8f04
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, (%rsp)
pushq $0x2
popq %rdi
movl %ebp, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x8de72(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
pushq $0x1
popq %rsi
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
movl %eax, %edx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8d31
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiListView
int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active)
{
    int itemsCount = 0;
    const char **items = NULL;

    if (text != NULL) items = GuiTextSplit(text, &itemsCount, NULL);

    return GuiListViewEx(bounds, items, itemsCount, NULL, scrollIndex, active);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebx
movq %rsi, %r14
andl $0x0, 0xc(%rsp)
testq %rdi, %rdi
je 0xc63a
leaq 0xc(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x96e1
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
leaq 0x8f29b(%rip), %rdi     # 0x9b8d0
movl (%r15), %esi
jmp 0xc63e
xorl %esi, %esi
xorl %edi, %edi
xorl %edx, %edx
movq %r14, %rcx
movl %ebx, %r8d
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xc654
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiColorPicker
Color GuiColorPicker(Rectangle bounds, Color color)
{
    color = GuiColorPanel(bounds, color);

    Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height };
    //Rectangle boundsAlpha = { bounds.x, bounds.y + bounds.height + GuiGetStyle(COLORPICKER, BARS_PADDING), bounds.width, GuiGetStyle(COLORPICKER, BARS_THICK) };

    Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ color.r/255.0f, color.g/255.0f, color.b/255.0f });
    hsv.x = GuiColorBarHue(boundsHue, hsv.x);
    //color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f);
    Vector3 rgb = ConvertHSVtoRGB(hsv);
    color = RAYGUI_CLITERAL(Color){ (unsigned char)roundf(rgb.x*255.0f), (unsigned char)roundf(rgb.y*255.0f), (unsigned char)roundf(rgb.z*255.0f), color.a };

    return color;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0xd466
movl %eax, %ebx
movl %eax, %r15d
shrl $0x8, %r15d
movl %eax, %r12d
shrl $0x10, %r12d
movl %eax, %r14d
andl $0xff000000, %r14d      # imm = 0xFF000000
movaps 0x10(%rsp), %xmm0
addss 0x20(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
pushq $0xd
popq %rbp
pushq $0x12
popq %rsi
movl %ebp, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
addss 0x30(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
pushq $0x11
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, %ebp
movd %ebx, %xmm0
movd %r15d, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pand 0x4b202(%rip), %xmm0    # 0x59160
cvtdq2ps %xmm0, %xmm0
movl $0xff, %r15d
andl %r15d, %r12d
cvtsi2ss %r12d, %xmm1
divps 0x4b1ca(%rip), %xmm0    # 0x59140
divss 0x4b0b2(%rip), %xmm1    # 0x59030
callq 0xd2f8
movaps %xmm0, %xmm2
movaps %xmm0, 0x40(%rsp)
movss %xmm1, 0xc(%rsp)
movaps 0x10(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps 0x20(%rsp), %xmm1
cvtsi2ss %ebp, %xmm1
callq 0xd87e
movaps 0x40(%rsp), %xmm1
movss %xmm0, %xmm1            # xmm1 = xmm0[0],xmm1[1,2,3]
movaps %xmm1, %xmm0
movss 0xc(%rsp), %xmm1
callq 0xd3a4
movaps %xmm0, 0x10(%rsp)
movss %xmm1, 0x20(%rsp)
mulss 0x4b059(%rip), %xmm0    # 0x59030
callq 0x60b0
cvttss2si %xmm0, %ebx
movaps 0x10(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
mulss 0x4b03f(%rip), %xmm0    # 0x59030
callq 0x60b0
cvttss2si %xmm0, %ebp
movss 0x20(%rsp), %xmm0
mulss 0x4b028(%rip), %xmm0    # 0x59030
callq 0x60b0
cvttss2si %xmm0, %eax
andl %r15d, %eax
shll $0x10, %eax
orl %r14d, %eax
andl %r15d, %ebp
shll $0x8, %ebp
orl %eax, %ebp
andl %r15d, %ebx
orl %ebp, %ebx
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: LoadSdfFont
Font LoadSdfFont(const char* fileName) {
	uint32_t fontFileSize = 0;
	uint8_t* fontFileData = LoadFileData(fileName, &fontFileSize);
		Font font = { .baseSize = 32, .charsCount = 95 };
		font.chars = LoadFontData(fontFileData, fontFileSize, font.baseSize, NULL, 0, FONT_SDF);
		Image atlas = GenImageFontAtlas(font.chars, &font.recs, font.charsCount, font.baseSize, 0, 1);
			font.texture = LoadTextureFromImage(atlas);
			SetTextureFilter(font.texture, FILTER_BILINEAR);
		UnloadImage(atlas);
	UnloadFileData(fontFileData);
	return font;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x1c(%rsp), %r15
andl $0x0, (%r15)
movq %rsi, %rdi
movq %r15, %rsi
callq 0x47b5f
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movabsq $0x5f00000020, %rax     # imm = 0x5F00000020
movq %rax, (%rbx)
movl (%r15), %esi
pushq $0x20
popq %rbp
pushq $0x2
popq %r9
movq %r14, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x40b83
movq %rax, 0x28(%rbx)
leaq 0x20(%rbx), %rdx
movl $0x1, (%rsp)
leaq 0x38(%rsp), %r15
pushq $0x5f
popq %rcx
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x4379a
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x36594
movl 0x10(%r12), %eax
movl %eax, 0x1c(%rbx)
movups (%r12), %xmm0
movups %xmm0, 0xc(%rbx)
movl 0x1c(%rbx), %eax
movl %eax, 0x10(%r12)
movups 0xc(%rbx), %xmm0
movaps %xmm0, (%r12)
movl 0x10(%r12), %eax
movl %eax, 0x10(%rsp)
movaps (%r12), %xmm0
movups %xmm0, (%rsp)
pushq $0x1
popq %rdi
callq 0x36bed
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
callq 0x3105c
movq %r14, %rdi
callq 0x47c57
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: HilberCurvePosToDist
uint64_t HilberCurvePosToDist(uint64_t curveOrder, int x, int y) {
	uint64_t d = 0, tmp;
	for (uint64_t s = (1 << curveOrder) / 2; s > 0; s /= 2) {
		uint64_t rx = 0, ry = 0;
		
		if ((x & s) > 0) rx = 1;
		if ((y & s) > 0) ry = 1;
		
		d += s * s * ((3 * rx) ^ ry);
		
		// inlining
		// hilbertRot(s, p, rx, ry)
		if (ry == 0) {
			if (rx == 1) {
				x = s - 1 - x;
				y = s - 1 - y;
			}
			tmp = x;
			x = y;
			y = tmp;
		}
		// end inline
	}
	return d;
}

// Assembly:
pushq %rbx
movl %edx, %r8d
movq %rdi, %rcx
movl $0x1, %eax
shll %cl, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x11330
movslq %esi, %r11
xorl %edi, %edi
testq %r11, %rcx
setne %r9b
movslq %r8d, %rbx
xorl %edx, %edx
testq %rbx, %rcx
setne %r10b
testq %rbx, %rcx
jne 0x11310
leal -0x1(%rcx), %esi
movl %esi, %ebx
subl %r11d, %ebx
subl %r8d, %esi
testq %r11, %rcx
cmovel %r8d, %esi
cmovel %r11d, %ebx
movl %ebx, %r8d
movb %r9b, %dil
leaq (%rdi,%rdi,2), %rdi
movb %r10b, %dl
xorq %rdi, %rdx
movq %rcx, %rdi
imulq %rcx, %rdi
imulq %rdx, %rdi
addq %rdi, %rax
shrq %rcx
jmp 0x112d5
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: HumanReadableByteSize
double HumanReadableByteSize(size_t bytes, const char** unit) {
	static const char* units[] = { "Byte", "KiByte", "MiByte", "GiByte", "TiByte", "PiByte", "EiByte", "ZiByte", "YiByte" };
	size_t unitIndex = floor(log2(bytes) / 10);
	if (unitIndex >= sizeof(units) / sizeof(units[0]))
		unitIndex = sizeof(units) / sizeof(units[0]) - 1;
	
	*unit = units[unitIndex];
	return bytes / pow(1024, unitIndex);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %xmm1
punpckldq 0x47d80(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x47d88(%rip), %xmm1    # 0x592d0
movq %rsi, %rbx
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movapd %xmm0, (%rsp)
callq 0x6670
divsd 0x47e37(%rip), %xmm0    # 0x593a0
callq 0x6720
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x47e06(%rip), %xmm0    # 0x59388
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
cmpq $0x8, %rdx
pushq $0x8
popq %rax
cmovbq %rdx, %rax
movl %eax, %ecx
leaq 0x47db7(%rip), %rdx     # 0x59358
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
movq %rcx, (%rbx)
imull $0xa, %eax, %eax
cvtsi2sd %eax, %xmm0
callq 0x6440
movapd (%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: UnloadTaskTraces
void UnloadTaskTraces(TaskTraces* traces) {
	for (size_t i = 0; i < traces->taskCount; i++) {
		if ( ptrace(PTRACE_DETACH, traces->tasks[i].pid, NULL, NULL) != 0 )
			perror("ptrace(PTRACE_DETACH)");
		free(traces->tasks[i].name);
		glDeleteBuffers(1, (const GLuint[]){ traces->tasks[i].particleVBO });
		glDeleteVertexArrays(1, (const GLuint[]){ traces->tasks[i].particleVAO });
	}
	
	free(traces->tasks);
	UnloadShader(traces->particleShader);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r14
leaq 0x8b7d5(%rip), %rbp     # 0x9cdb8
movq %rsp, %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r15
jae 0x11661
movl (%rdi,%r13), %esi
pushq $0x11
popq %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x63e0
testq %rax, %rax
jne 0x11653
movq (%rbx), %rax
movq 0x8(%rax,%r13), %rdi
callq 0x62f0
movq (%rbx), %rax
movl 0x18(%rax,%r13), %eax
movl %eax, 0x4(%rsp)
movl %r14d, %edi
leaq 0x4(%rsp), %rsi
leaq 0x8b77c(%rip), %rax     # 0x9cdb0
callq *(%rax)
movq (%rbx), %rax
movl 0x14(%rax,%r13), %eax
movl %eax, (%rsp)
movl %r14d, %edi
movq %r12, %rsi
callq *(%rbp)
incq %r15
addq $0x20, %r13
jmp 0x115ec
leaq 0x4804b(%rip), %rdi     # 0x596a5
callq 0x6740
jmp 0x1160c
callq 0x62f0
movl 0x18(%rbx), %edi
movq 0x20(%rbx), %rsi
callq 0x1cb01
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: UnloadAddrRanges
void UnloadAddrRanges(AddrRange** ranges, size_t* rangeCount) {
	for (size_t i = 0; i < *rangeCount; i++) {
		AddrRange* range = &(*ranges)[i];
		free(range->perms);
		free(range->filePath);
		free(range->label.text);
		
		UnloadTexture(range->symbolMap);
		for (size_t s = 0; s < range->symbolCount; s++)
			free(range->symbolLabels[s].text);
		free(range->symbolLabels);
	}
	free(*ranges);
	*ranges = NULL;
	*rangeCount = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movq (%r14), %r15
cmpq (%rbx), %r12
jae 0x11715
imulq $0xa0, %r12, %rbp
leaq (%r15,%rbp), %r13
movq 0x18(%r15,%rbp), %rdi
callq 0x62f0
movq 0x20(%r15,%rbp), %rdi
callq 0x62f0
movq 0x58(%r15,%rbp), %rdi
callq 0x62f0
movl 0x88(%r15,%rbp), %eax
movl %eax, 0x10(%rsp)
movups 0x78(%r15,%rbp), %xmm0
movups %xmm0, (%rsp)
callq 0x36a85
xorl %r15d, %r15d
xorl %ebp, %ebp
movq 0x98(%r13), %rdi
cmpq 0x90(%r13), %rbp
jae 0x1170b
movq (%rdi,%r15), %rdi
callq 0x62f0
incq %rbp
addq $0x20, %r15
jmp 0x116e9
callq 0x62f0
incq %r12
jmp 0x11698
movq %r15, %rdi
callq 0x62f0
andq $0x0, (%r14)
andq $0x0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: LabelFor
Label LabelFor(char* text, Rectangle container, Font font) {
	Vector2 textSize = MeasureTextEx(font, text, 10, 0);
	float textScale = (container.width * 0.66) / textSize.x;
	return (Label){
		.text = text,
		.fontSize = 10 * textScale,
		.boundingBox = (Rectangle){
			.x = container.x + (container.width  - textSize.x * textScale) / 2,
			.y = container.y + (container.height - textSize.y * textScale) / 2,
			.width  = textSize.x * textScale,
			.height = textSize.y * textScale
		}
	};
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movaps 0x70(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
movaps 0x90(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movss 0x4789a(%rip), %xmm0    # 0x59010
xorps %xmm1, %xmm1
movq %rsi, %rdi
callq 0x44746
movaps 0x30(%rsp), %xmm3
cvtss2sd %xmm3, %xmm1
mulsd 0x47c16(%rip), %xmm1    # 0x593a8
cvtss2sd %xmm0, %xmm2
divsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
movq %r14, (%rbx)
movss 0x47867(%rip), %xmm2    # 0x59010
mulss %xmm1, %xmm2
movss %xmm2, 0x8(%rbx)
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulps %xmm1, %xmm0
subps %xmm0, %xmm3
movaps %xmm3, %xmm0
mulps 0x47947(%rip), %xmm0    # 0x59110
addps 0x40(%rsp), %xmm0
mulps %xmm1, %xmm2
movsd %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1]
movupd %xmm2, 0xc(%rbx)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: fnv1a
uint32_t fnv1a(void *buffer, size_t size) {
	uint32_t hash = 2166136261;
	for (char* c = buffer; c < (char*)buffer + size; c++) {
		hash ^= *c;
		hash *= 16777619;
	}
	return hash;
}

// Assembly:
addq %rdi, %rsi
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
cmpq %rsi, %rdi
jae 0x11802
movsbl (%rdi), %ecx
xorl %ecx, %eax
imull $0x1000193, %eax, %eax  # imm = 0x1000193
incq %rdi
jmp 0x117ed
retq
// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/map.c
// Function: HilberCurveDistToPos
void HilberCurveDistToPos(uint64_t curveOrder, uint64_t dist, int* x, int* y) {
	*x = 0; *y = 0;
	uint64_t tmp;
	uint64_t n = 1 << curveOrder;
	for (uint64_t s = 1; s < n; s *= 2) {
		uint64_t rx = 1 & (dist / 2);
		uint64_t ry = 1 & (dist ^ rx);
		// inlining
		// hilbertRot(s, p, rx, ry)
		if (ry == 0) {
			if (rx == 1) {
				*x = s - 1 - *x;
				*y = s - 1 - *y;
			}
			tmp = *x;
			*x = *y;
			*y = tmp;
		}
		// end inline

		*x += s * rx;
		*y += s * ry;
		dist /= 4;
	}
}

// Assembly:
movq %rcx, %rax
movq %rdi, %rcx
andl $0x0, (%rdx)
andl $0x0, (%rax)
pushq $0x1
popq %rdi
shll %cl, %edi
movslq %edi, %rcx
pushq $0x1
popq %rdi
xorl %r9d, %r9d
cmpq %rcx, %rdi
jae 0x1187a
movq %rsi, %r10
shrq %r10
movl %esi, %r8d
xorl %r10d, %r8d
andl $0x1, %r10d
testb $0x1, %r8b
jne 0x11859
testq %r10, %r10
je 0x11850
leal -0x1(%rdi), %r9d
movl %r9d, %r11d
subl (%rdx), %r11d
movl %r11d, (%rdx)
subl (%rax), %r9d
movl %r9d, (%rax)
movl (%rdx), %r11d
movl %r9d, (%rdx)
movl %r11d, (%rax)
imull %edi, %r10d
addl %r10d, (%rdx)
andl $0x1, %r8d
imull %edi, %r8d
addl (%rax), %r8d
movl %r8d, (%rax)
shrq $0x2, %rsi
addq %rdi, %rdi
movl %r8d, %r9d
jmp 0x1181d
retq
// File: /workspace/github_c_makefile_star2_O2/JulStrat[P]bams/tests/test_bisect.c
// Function: lfind_ge
void *
lfind_ge(const void *key, const void *arr, size_t el_num, size_t el_size,
         int (*compare) (const void *, const void *))
{
    char *off = (char *) arr;
    char *high = off + el_num * el_size;
    int t;

    while (off < high) {
        t = (*compare) (key, off);
        if ((t == 0) || (t < 0)) {
            return off;
        }
        off += el_size;
    }

    return off;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
imulq %rcx, %r12
addq %rsi, %r12
cmpq %r12, %r15
jae 0x1437
movq %r13, %rdi
movq %r15, %rsi
callq *%rbx
testl %eax, %eax
jle 0x1437
addq %r14, %r15
jmp 0x1421
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JulStrat[P]bams/tests/test_bisect.c
// Function: lfind_gt
void *
lfind_gt(const void *key, const void *arr, size_t el_num, size_t el_size,
         int (*compare) (const void *, const void *))
{
    char *off = (char *) arr;
    char *high = off + el_num * el_size;
    int t;

    while (off < high) {
        t = (*compare) (key, off);
        if (t < 0) {
            return off;
        }
        off += el_size;
    }

    return off;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
imulq %rcx, %r12
addq %rsi, %r12
cmpq %r12, %r15
jae 0x1479
movq %r13, %rdi
movq %r15, %rsi
callq *%rbx
testl %eax, %eax
js 0x1479
addq %r14, %r15
jmp 0x1463
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/adelciotto[P]scg/examples/audio.c
// Function: main
int main(int arcg, char *argv[]) {
    scg_config_t config = scg_config_new_default();
    config.video.title = "SCG Example: Audio";
    config.audio.enabled = true;

    scg_app_t app;
    scg_app_init(&app, config);

    scg_sound_t *music =
        scg_sound_new_from_wav(app.audio, "assets/arcade-music-loop.wav", true);
    if (music == NULL) {
        return -1;
    }
    scg_sound_play(music);

    while (scg_app_process_events(&app)) {
        float32_t play_position = scg_sound_get_position(music);
        draw(app.draw_target, play_position);

        scg_app_present(&app);
    }

    scg_app_free(&app);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movabsq $0x1e000000280, %rax    # imm = 0x1E000000280
movq %rax, 0x38(%rsp)
movl $0x1, 0x48(%rsp)
movb $0x0, 0x4c(%rsp)
movl $0x1010101, 0x4d(%rsp)  # imm = 0x1010101
movl $0x40, 0x58(%rsp)
leaq 0x149e(%rip), %rax      # 0x65ac
movq %rax, 0x40(%rsp)
movb $0x1, 0x54(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x38(%rsp), %xmm0
movups 0x48(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x3dc3
movq 0x50(%rbx), %rdi
leaq 0x1472(%rip), %rsi      # 0x65bf
pushq $0x1
popq %rdx
callq 0x3c13
testq %rax, %rax
je 0x5265
movq %rax, %r13
cmpb $0x0, 0x48(%rax)
jne 0x516c
movb $0x1, 0x48(%r13)
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x4858
testb %al, %al
je 0x5257
xorps %xmm1, %xmm1
cmpb $0x1, 0x48(%r13)
jne 0x51a1
movl 0x28(%r13), %eax
movl 0x38(%r13), %ecx
cvtsi2ss %rcx, %xmm1
cvtsi2ss %rax, %xmm0
divss %xmm0, %xmm1
movss %xmm1, 0x34(%rsp)
movq 0x98(%rsp), %rbp
movl (%rbp), %r15d
movl 0x4(%rbp), %r12d
movq %rbp, %rdi
pushq $-0x1
popq %rsi
callq 0x2c56
movl %r15d, %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
movl %eax, %r8d
movl %r12d, %eax
cltd
idivl %ecx
movl %eax, %r12d
leal -0x14(%r12), %ecx
movq %rbp, %rdi
leaq 0x1fe9(%rip), %rsi      # 0x71cf
movl %r8d, %edx
pushq $0x1
popq %r8
movl $0xff000000, %r9d       # imm = 0xFF000000
callq 0x38fd
addl $-0x14, %r15d
cvtsi2ss %r15d, %xmm0
mulss 0x34(%rsp), %xmm0
cvttss2si %xmm0, %r14d
addl $0x14, %r12d
movq %rbp, %rdi
pushq $0xa
popq %rbx
movl %ebx, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebx, %r8d
movl $0xff000000, %r9d       # imm = 0xFF000000
callq 0x33fa
movq %rbp, %rdi
movl %ebx, %esi
movl %r12d, %edx
movl %r14d, %ecx
movl %ebx, %r8d
movl $0xff000000, %r9d       # imm = 0xFF000000
callq 0x3473
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x491f
jmp 0x5171
leaq 0x60(%rsp), %rdi
callq 0x4bf7
xorl %eax, %eax
jmp 0x5268
pushq $-0x1
popq %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/main.cpp
// Function: main
int main()
{

	ConfigParser *config = ConfigParser::getConfigParser();
	if ( config == NULL )
	{
		mylog( ERROR, "Config Error!");
		return -1;
	}

	URLManager *urlm = URLManager::getURLManager();
	if ( urlm == NULL )
	{
		mylog( ERROR, "URLManager Error!");
		return -1;
	}
	
	TaskControl tasks( config->getJobNum() , download );
	URL *tUrl = NULL;


	while( 1 )
	{
		urlm->loadURL();
		if (!tasks.getCurrentRun() && !urlm->getCurrentSize() )
		{
			puts("END");
			break;
		}
		
		if ( tasks.isAllTaskDone() )
		{
			for ( int i = 0 ; i < config->getJobNum() && (tUrl = urlm->popURL()) !=NULL; i++)
			{
				tasks.addTaskToQueue( tUrl);
			}
		}

		if ( config->getDuration() != 0 )
		{
			sleep(config->getDuration());
		}
		else
		{
			sleep(2);
		}

	}
	
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x9bca
testq %rax, %rax
je 0x87fd
movq %rax, %rbx
callq 0x976c
testq %rax, %rax
je 0x8806
movq %rax, %r14
movq %rbx, %rdi
callq 0x9bae
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movl %eax, %esi
callq 0x6739c
leaq 0x25d(%rip), %rax       # 0x89bc
movq %rax, 0x8(%r15)
pushq $0x2
popq %r12
movq %r14, %rdi
callq 0x97c4
movq -0x38(%rbp), %rdi
callq 0x675dc
testl %eax, %eax
jne 0x8788
movq %r14, %rdi
callq 0x97b8
testl %eax, %eax
je 0x87e4
movq -0x38(%rbp), %rdi
callq 0x675cc
testl %eax, %eax
je 0x87c2
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x9bae
cmpl %eax, %r13d
jge 0x87c2
movq %r14, %rdi
callq 0x9858
testq %rax, %rax
je 0x87c2
movq %r15, %rdi
movq %rax, %rsi
callq 0x86dc
incl %r13d
jmp 0x8798
movq %rbx, %rdi
callq 0x9bc2
movl %eax, %ecx
movl %r12d, %eax
testl %ecx, %ecx
je 0x87db
movq %rbx, %rdi
callq 0x9bc2
movl %eax, %edi
callq 0x81e0
jmp 0x8767
leaq 0x5f839(%rip), %rdi     # 0x68024
callq 0x84b0
leaq -0x38(%rbp), %rdi
callq 0x86c8
xorl %eax, %eax
jmp 0x8818
leaq 0x5f800(%rip), %rsi     # 0x68004
jmp 0x880d
leaq 0x5f805(%rip), %rsi     # 0x68012
pushq $0x2
popq %rdi
callq 0xa499
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8829
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x86c8
movq %rbx, %rdi
callq 0x8520
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/bloom/./BloomFilter.cpp
// Function: Bloom::isExist(char*)
int Bloom::isExist( char *str )
{
	int ret;
	pthread_mutex_lock(&lockis);
	ret = search(str);
	pthread_mutex_unlock(&lockis);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x7d6c5(%rip), %r14     # 0x85f50
movq %r14, %rdi
callq 0x8450
movq %rbx, %rdi
callq 0x9b2b
movl %eax, %ebx
movq %r14, %rdi
callq 0x8200
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/dns/DNSCache.cpp
// Function: DNSCache::getDNSCache()
DNSCache* DNSCache::getDNSCache()
{
	if ( dnsCa == NULL )
	{
		pthread_mutex_lock(&lock);
		dnsCa = new DNSCache(); 
		pthread_mutex_unlock(&lock);
	}
	return dnsCa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x7d6b4(%rip), %rax     # 0x85f78
testq %rax, %rax
jne 0x8904
leaq 0x7d6b0(%rip), %rdi     # 0x85f80
callq 0x8450
movl $0xf8, %edi
callq 0x8300
movq %rax, %rbx
movq %rax, %rdi
callq 0xa0b8
movq %rbx, 0x7d687(%rip)     # 0x85f78
leaq 0x7d688(%rip), %rdi     # 0x85f80
callq 0x8200
movq 0x7d674(%rip), %rax     # 0x85f78
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0xf8, %esi
movq %rbx, %rdi
callq 0x8310
movq %r14, %rdi
callq 0x8520
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/dns/DNSCache.cpp
// Function: DNSCache::DNS(char*, char*)
struct sockaddr_in* DNSCache::DNS(  char *host , char *port)
{
	struct sockaddr_in *saddr = NULL;

	if ( host == NULL || port == NULL)
	{
		return NULL;
	}
	pthread_mutex_lock(&lock);
	if ((saddr = (struct sockaddr_in*)hl.get( host ))== NULL)
	{
		saddr = dns( host , port );
		if (saddr != NULL )
		{
			hl.set(host,saddr);
			//------debug
			puts("DNS CaCHED!");
			pthread_mutex_unlock(&lock);
			return saddr;
		}
		pthread_mutex_unlock(&lock);
		return NULL;
	}
	else
	{
		puts("Get Cache");
		pthread_mutex_unlock(&lock);
		return saddr;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
je 0x8941
xorl %ebx, %ebx
jmp 0x89ab
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x7d62f(%rip), %rdi     # 0x85f80
callq 0x8450
movq %r15, %rdi
movq %r14, %rsi
callq 0xa206
testq %rax, %rax
je 0x8972
movq %rax, %rbx
leaq 0x5f6c4(%rip), %rdi     # 0x68034
jmp 0x899a
movq %r14, %rdi
movq %r12, %rsi
callq 0x9fe4
testq %rax, %rax
je 0x89b7
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa139
leaq 0x5f68e(%rip), %rdi     # 0x68028
callq 0x84b0
leaq 0x7d5da(%rip), %rdi     # 0x85f80
callq 0x8200
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x899f
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Download/./../URL/URL.h
// Function: URL::setStateToDB(int)
int setStateToDB( int state )
	{
		char buf[1024] = { 0 };
		Persistence *db = Persistence::getPersistence();
		sprintf(buf,"update url set state=%d where id=%d",state,this->id);
		db->exec(buf);
	
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl %esi, %ebx
movq %rdi, %r14
leaq -0x420(%rbp), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x8160
callq 0x933e
movq %rax, %r12
movl (%r14), %ecx
leaq 0x5f408(%rip), %rsi     # 0x680ad
movq %r15, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8080
movq %r12, %rdi
movq %r15, %rsi
callq 0x93e4
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/HTTP/./HTTP.cpp
// Function: isHex(char*)
int isHex( char *num)
{
	while( *num != '\r' )
	{
		if ( *num >='0' && *num <= '9' || *num >= 'a' && *num <='f' ||*num>='A' && *num <='F')
		{
			;
		}else
		{
			return 0;
		}
		num++;
	}
	if ( *(num+1) == '\n')
	{
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incq %rdi
movabsq $0x3f0000003f, %rax     # imm = 0x3F0000003F
movb -0x1(%rdi), %cl
cmpb $0xd, %cl
je 0x8cf3
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
jb 0x8cee
movzbl %cl, %ecx
addl $-0x41, %ecx
cmpl $0x25, %ecx
ja 0x8cfd
btq %rcx, %rax
jae 0x8cfd
incq %rdi
jmp 0x8ccd
xorl %eax, %eax
cmpb $0xa, (%rdi)
sete %al
popq %rbp
retq
xorl %eax, %eax
jmp 0x8cfb
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/HTTP/./HTTP.cpp
// Function: HTTP::~HTTP()
HTTP::~HTTP()
{
	if ( this->body != NULL )
	{
		pthread_mutex_lock(&lock);
		free( this->body );
		pthread_mutex_unlock(&lock);
	}
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x8f19
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x7d0ac(%rip), %r14     # 0x85fa8
movq %r14, %rdi
callq 0x8450
movq 0x8(%rbx), %rdi
callq 0x8360
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8200
retq
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Hex2I/./Hex2I.c
// Function: hex2i
int hex2i( const char *hex )
{
	int ret = 0;
	int index = strlen( hex ) - 1;
	int temp = 0;
	int per = 1;
	int i;
	for( i = index; i>= 0; i--)
	{
		if( hex[i] >= 'a' && hex[i] <= 'f' )
		{
			temp = hex[i] - 'a' + 10;
		}
		else if ( hex[i] >= 'A' && hex[i] <= 'F' )
		{
			temp = hex[i] - 'A' + 10;
		}
		else if ( hex[i] >= '0' && hex[i] <= '9' )
		{
			temp = hex[i] - '0';	
		}
		else
		{
			ret = 0;
			per = 1;
			continue;
		}
		ret += ( per * temp );
		per*=16;
		
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8120
movl %eax, %ecx
decq %rcx
pushq $0x1
popq %rdx
xorl %eax, %eax
movl %edx, %esi
testl %ecx, %ecx
js 0x8faf
movl %ecx, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movzbl (%rbx,%rdi), %edi
leal -0x61(%rdi), %r8d
cmpb $0x5, %r8b
ja 0x8f71
addl $-0x57, %edi
jmp 0x8f7e
leal -0x41(%rdi), %r8d
cmpb $0x5, %r8b
ja 0x8f99
addl $-0x37, %edi
movl %edi, %r8d
imull %esi, %r8d
addl %eax, %r8d
shll $0x4, %esi
movl %esi, %r9d
decq %rcx
movl %r8d, %eax
movl %r9d, %esi
jmp 0x8f52
addb $-0x30, %dil
xorl %r8d, %r8d
movl %edx, %r9d
cmpb $0xa, %dil
jae 0x8f8e
movzbl %dil, %r8d
jmp 0x8f81
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Download/./../URL/URL.h
// Function: URL::save()
int save()
	{
		char buf[1024] = { 0 };
		Persistence *db = Persistence::getPersistence();
		sprintf(buf,"insert into url(urlstr,type,deep) values('%s',%d,%d)",this->urlStr,this->type,this->deep);
		db->exec(buf);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %r14
leaq -0x420(%rbp), %rbx
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8160
callq 0x933e
movq %rax, %r15
movq 0x8(%r14), %rdx
movl 0x10(%r14), %ecx
movl 0x14(%r14), %r8d
leaq 0x5ef78(%rip), %rsi     # 0x68150
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8080
movq %r15, %rdi
movq %rbx, %rsi
callq 0x93e4
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/ModelTool/ModelTool.cpp
// Function: Model::Model(char const*)
Model::Model( const char *filename )
{
	output = NULL;
	this->handle = dlopen( filename , RTLD_NOW );
	if ( this->handle == NULL )
	{
		puts(dlerror());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
andq $0x0, 0x8(%rdi)
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x8410
movq %rax, (%rbx)
testq %rax, %rax
je 0x926d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x82d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x84b0
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/ModelTool/ModelTool.cpp
// Function: Model::getMethod(char const*)
OUTPUTFUNC Model::getMethod( const char *funcName )
{
	output = (OUTPUTFUNC)dlsym( this->handle, funcName);
	if ( output == NULL  )
	{
		puts("getMethod Error``````````````");
	}
	return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x82c0
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x92be
leaq 0x5eedc(%rip), %rdi     # 0x68191
callq 0x84b0
movq 0x8(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::Persistence(char const*)
Persistence::Persistence( const char *dbfile )
{
	int ret;	
	unlink(dbfile);//remove old dbfile

//	this->lock = PTHREAD_MUTEX_INITIALIZER; 
	pthread_mutex_init( &(this->lock) , NULL );
	ret = sqlite3_open( dbfile , &(this->db) );
	if ( ret != SQLITE_OK )
	{
		mylog( ERROR , "create database error");
		exit(-1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8140
movq %r14, %rdi
xorl %esi, %esi
callq 0x8480
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17bfc
testl %eax, %eax
jne 0x9327
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x5ee88(%rip), %rsi     # 0x681b6
pushq $0x2
popq %rdi
callq 0xa499
pushq $-0x1
popq %rdi
callq 0x8380
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::~Persistence()
Persistence::~Persistence()
{
	if (this->err != NULL )
		sqlite3_free( this->err );

	sqlite3_close( this->db );

	delete pdb;
	
	pthread_mutex_destroy(&(this->lock));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x93a8
callq 0xc0fb
movq 0x28(%rbx), %rdi
callq 0x16c5d
movq 0x7cc20(%rip), %r14     # 0x85fd8
testq %r14, %r14
je 0x93c5
movq %r14, %rdi
callq 0x9390
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x8310
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8340
movq %rax, %rdi
callq 0x883d
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::exec(char const*)
int Persistence::exec( const char *sql )// insert update delete create table etc without select 
{
	int ret = 0;	
	pthread_mutex_lock(&(this->lock));

	if (this->err != NULL )
		sqlite3_free( this->err );
	ret = sqlite3_exec(this->db,sql,0,0,&(this->err));
	if (ret != SQLITE_OK )
	{
		mylog(ERROR,sql);
		mylog(ERROR,this->err);
	}
	pthread_mutex_unlock(&(this->lock));
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8450
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x940f
callq 0xc0fb
movq 0x28(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x1446d
movl %eax, %r12d
testl %eax, %eax
je 0x9443
pushq $0x2
popq %r13
movl %r13d, %edi
movq %r14, %rsi
callq 0xa499
movq (%r15), %rsi
movl %r13d, %edi
callq 0xa499
movq %rbx, %rdi
callq 0x8200
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::query(char const*, int (*)(void*, int, char**, char**), void*)
int Persistence::query( const char *sql , callback fun, void *data)//all select insert update delete
{
	int ret = 0;	
	pthread_mutex_lock(&(this->lock));

	if (this->err != NULL )
		sqlite3_free( this->err );
	ret = sqlite3_exec(this->db,sql,fun,data,&(this->err));
	if (ret != SQLITE_OK )
	{
		mylog(ERROR,sql);
		mylog(ERROR,this->err);
	}
	pthread_mutex_unlock(&(this->lock));
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8450
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x948f
callq 0xc0fb
movq 0x28(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x1446d
movl %eax, %r12d
testl %eax, %eax
je 0x94c5
pushq $0x2
popq %r13
movl %r13d, %edi
movq %r14, %rsi
callq 0xa499
movq (%r15), %rsi
movl %r13d, %edi
callq 0xa499
movq %rbx, %rdi
callq 0x8200
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/SockTool/SockTool.cpp
// Function: SockTool::Socket()
int SockTool::Socket()
{
	int fd;
	pthread_mutex_lock(&socklock);
	fd = socket( AF_INET , SOCK_STREAM , 0 );
	pthread_mutex_unlock(&socklock);
	return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x7cb0e(%rip), %rbx     # 0x86008
movq %rbx, %rdi
callq 0x8450
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x80a0
movl %eax, %r14d
movq %rbx, %rdi
callq 0x8200
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/SockTool/SockTool.cpp
// Function: SockTool::Close(int)
int SockTool::Close( int fd )
{
	pthread_mutex_lock(&sockclose);
	close(fd);
	pthread_mutex_unlock(&sockclose);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x7cafe(%rip), %r14     # 0x86030
movq %r14, %rdi
callq 0x8450
movl %ebx, %edi
callq 0x8560
movq %r14, %rdi
callq 0x8200
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/URLManager/URLManager.cpp
// Function: load(void*, int, char**, char**)
int load( void *um , int count, char **vals ,char **colname)
{
	int i;
	Queue<URL>* que = (Queue<URL>*)um;
	if ( que == NULL )
	{
		return -1;
	}
	if (count <= 0)
	{
		return 0;
	}

	URL *temp = new URL;
	if ( temp == NULL )
	{
		return -1;
	}

	for( i = 0; i < count; i++)
	{
		if ( !strcasecmp( ID ,colname[i]) )
		{
			temp->setId(atoi(vals[i]));
		} 
		else if ( !strcasecmp( URLSTR , colname[i]) )
		{
			temp->setURLStr( vals[i] );
		}
		else if ( !strcasecmp( TYPE , colname[i]) )
		{
			temp->setType( atoi( vals[i] ) );	
		}
		else if ( !strcasecmp( DEEP , colname[i]) )
		{
			temp->setDeep( atoi( vals[i] ) );
		}
		else if ( !strcasecmp( STATE , colname[i] ) )
		{
			temp->setState( atoi( vals[i] ) );
		}
//		printf("%s=%s\n",colname[i],vals[i]);
	}
//	printf("ADD %s:%d\n",temp->getURLStr(),temp->getDeep());
	que->push( temp );
	return 0;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
testq %rdi, %rdi
je 0x96da
movl %esi, %r14d
testl %esi, %esi
jle 0x96d6
movq %rcx, %rbx
movq %rdi, -0x38(%rbp)
pushq $0x20
popq %rdi
callq 0x8300
movq %rax, %r12
andl $0x0, (%rax)
xorps %xmm0, %xmm0
andl $0x0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movl %r14d, %r13d
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x96ca
movq (%rbx,%r15,8), %r14
leaq 0x66a08(%rip), %rdi     # 0x70013
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x9677
leaq 0x5ebb8(%rip), %rdi     # 0x681d6
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x968a
leaq 0x5ebac(%rip), %rdi     # 0x681dd
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x969c
leaq 0x5eb9e(%rip), %rdi     # 0x681e2
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x96b0
leaq 0x5eb90(%rip), %rdi     # 0x681e7
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
jne 0x96c2
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %rdi
callq 0x84c0
movl %eax, 0x18(%r12)
jmp 0x96c2
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %rdi
callq 0x84c0
movl %eax, (%r12)
jmp 0x96c2
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %rsi
movq %r12, %rdi
callq 0x915e
jmp 0x96c2
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %rdi
callq 0x84c0
movl %eax, 0x10(%r12)
jmp 0x96c2
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %rdi
callq 0x84c0
movl %eax, 0x14(%r12)
incq %r15
jmp 0x95f7
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x9866
xorl %eax, %eax
jmp 0x96dd
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/URLManager/URLManager.cpp
// Function: URLManager::loadURL()
int URLManager::loadURL()
{
	int length = urlQue->getCount();
	int loadcount;
	Persistence *db;
	char sql[512] = { 0 };

	if ( length < URLLESSIZE )
	{
		//here need load url
		loadcount = URLMAXSIZE - length;
		db = Persistence::getPersistence();
		
		if ( db == NULL )
		{
			return -1;
		}
		sprintf(sql,"select * from url where state=0 order by id desc limit %d",loadcount);
		db->query(sql,load,this->urlQue);
	}
		//nothing
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x14(%rax), %r12d
leaq -0x220(%rbp), %rdi
xorl %r14d, %r14d
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x8160
cmpl $0x1, %r12d
jg 0x9845
callq 0x933e
testq %rax, %rax
je 0x9841
movq %rax, %r15
pushq $0xa
popq %rdx
subl %r12d, %edx
leaq 0x5e9d7(%rip), %rsi     # 0x681ed
xorl %r14d, %r14d
leaq -0x220(%rbp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x8080
movq (%rbx), %rcx
leaq -0x28c(%rip), %rdx      # 0x95a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x945e
jmp 0x9845
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/URLManager/./../Queue/Queue.h
// Function: Queue<URL>::Queue(int)
Queue<T>::Queue( int method )
{
    head = NULL;
    tail = NULL;
    length = 0;
    this->method = method;
    pthread_mutex_init( &lock , NULL );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x14(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movl %esi, 0x10(%rdi)
addq $0x18, %rdi
xorl %esi, %esi
popq %rbp
jmp 0x8480
nop
// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/URLManager/./../Queue/Queue.h
// Function: Queue<URL>::pop()
T*  Queue<T>::pop()
{
    if ( head == NULL || length <= 0)
    {
	tail = head = NULL;
        return NULL;
    }
    pthread_mutex_lock(&lock);
    T *temp = head->node;
    Node<T> *del = head;
    head = head->next;
    delete del;
    length--;
    pthread_mutex_unlock(&lock);
    return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x9901
cmpl $0x0, 0x14(%rbx)
jle 0x9901
leaq 0x18(%rbx), %r15
movq %r15, %rdi
callq 0x8450
movq (%rbx), %rdi
movq (%rdi), %r14
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
pushq $0x10
popq %rsi
callq 0x8310
decl 0x14(%rbx)
movq %r15, %rdi
callq 0x8200
jmp 0x990a
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq