LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/TimerService.cpp
// Function: TimerService::TimaInterrupt()
void TimerService::TimaInterrupt() {
    uint8_t flags = mmu->Read(InterruptService::IFLAGS);
    flags |= InterruptService::timerBit;
    mmu->Write(InterruptService::IFLAGS, flags);
    cpu->AddCycles(4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x1b710
orb $0x4, %al
movq 0x20(%rbx), %rdi
movzbl %al, %edx
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x1b430
movq 0x18(%rbx), %rdi
movl $0x4, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x19b52
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::init_palette()
void XGPU::init_palette() {
    Visual* visual = DefaultVisual(display, screen);

    cmap = XCreateColormap(
        display,
        RootWindow(display, screen),
        visual,
        AllocNone
    );

    for (int ii = 0; ii < 4; ii++) {
        uint8_t mmuColor = mmu->palette[ii];
        Status rc;

        switch (mmuColor) {
            XColor xc;
            case 0:
            {
                rc = XAllocNamedColor(display, cmap, "Gray100", &palette[ii], &xc);
            }
                break;
            case 1:
            {
                rc = XAllocNamedColor(display, cmap, "Gray85", &palette[ii], &xc);
            }
                break;
            case 2:
            {
                rc = XAllocNamedColor(display, cmap, "Gray55", &palette[ii], &xc);
            }
                break;
            case 3:
            {
                rc = XAllocNamedColor(display, cmap, "Gray0", &palette[ii], &xc);
            }
                break;
        }

        if (rc == 0) {
            printf("Color Alloc [%d] failed.\n", ii);
        }
    }

    XSetWindowColormap(display, window, cmap);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x5a20(%rdi), %rdi
movq 0xe8(%rdi), %rax
movslq 0x5a28(%rbx), %rcx
shlq $0x7, %rcx
movq 0x10(%rax,%rcx), %rsi
movq 0x40(%rax,%rcx), %rdx
xorl %ecx, %ecx
callq 0x4260
movq %rax, 0x5a40(%rbx)
leaq 0x5a50(%rbx), %r14
leaq 0x41eb(%rip), %r12      # 0x20600
xorl %r13d, %r13d
movq 0x5a98(%rbx), %rax
movzbl 0xe39a(%rax,%r13), %eax
cmpq $0x3, %rax
ja 0x1c474
movslq (%r12,%rax,4), %rax
addq %r12, %rax
leaq 0x426b(%rip), %rdx      # 0x206a7
jmpq *%rax
leaq 0x426a(%rip), %rdx      # 0x206af
jmp 0x1c457
leaq 0x4268(%rip), %rdx      # 0x206b6
jmp 0x1c457
leaq 0x4266(%rip), %rdx      # 0x206bd
movq 0x5a20(%rbx), %rdi
movq 0x5a40(%rbx), %rsi
movq %r14, %rcx
leaq -0x38(%rbp), %r8
callq 0x4480
movl %eax, %r15d
testl %r15d, %r15d
jne 0x1c48a
leaq 0x4243(%rip), %rdi      # 0x206c3
movl %r13d, %esi
xorl %eax, %eax
callq 0x4070
incq %r13
addq $0x10, %r14
cmpq $0x4, %r13
jne 0x1c418
movq 0x5a20(%rbx), %rdi
movq 0x5a30(%rbx), %rsi
movq 0x5a40(%rbx), %rdx
callq 0x4550
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::XGPU(MMU*, unsigned char)
XGPU::XGPU(MMU* m, uint8_t ws = 1){
    mmu = m;
    windowScalar = ws;
    init_x();
    init_palette();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xd6c2(%rip), %rax      # 0x29cb8
movq %rax, (%rdi)
movq %rsi, 0x5a98(%rdi)
movb %dl, 0x5a90(%rdi)
callq 0x1c1b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1c3c2
nop
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::Sync()
void XGPU::Sync() {
    // control
    control = GetControl();
        lcdOperation = (control & Utils::BIT_7) != 0;
        windowTilemap = (control & Utils::BIT_6) != 0;
        windowDisplay = (control & Utils::BIT_5) != 0;
        bgTile = (control & Utils::BIT_4) != 0;
        bgMap = (control & Utils::BIT_3) != 0;
        spriteSize = (control & Utils::BIT_2) != 0;
        spriteDisplay = (control & Utils::BIT_1) != 0;
        bgDisplay = (control & Utils::BIT_0) != 0;

    // lcdc stats
    lcdStat = GetLCDStat();
        useLYC = (lcdStat & Utils::BIT_6) != 0;
        coincidence = (lcdStat & Utils::BIT_2) != 0;
        // bit 1 - 0 -mode flag
        mode = (GPU_MODE)(lcdStat & (Utils::BIT_1 | Utils::BIT_0));

    // scroll y
    scrollY = GetScrollY();

    // scroll X
    scrollX = GetScrollX();

    // LY (scanline)
    scanline = GetScanline();

    // LYC
    lyc = GetLYC();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x10(%rax)
movb %al, 0x5a0c(%rbx)
movl %eax, %ecx
shrb $0x7, %cl
movb %cl, 0x5a0d(%rbx)
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movb %cl, 0x5a0e(%rbx)
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movb %cl, 0x5a0f(%rbx)
movl %eax, %ecx
shrb $0x4, %cl
andb $0x1, %cl
movb %cl, 0x5a10(%rbx)
movl %eax, %ecx
shrb $0x3, %cl
andb $0x1, %cl
movb %cl, 0x5a11(%rbx)
movl %eax, %ecx
shrb $0x2, %cl
andb $0x1, %cl
movb %cl, 0x5a12(%rbx)
movl %eax, %ecx
shrb %cl
andb $0x1, %cl
movb %cl, 0x5a13(%rbx)
andb $0x1, %al
movb %al, 0x5a14(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movb %al, 0x5a15(%rbx)
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movb %cl, 0x5a16(%rbx)
movl %eax, %ecx
shrb $0x2, %cl
andb $0x1, %cl
movb %cl, 0x5a17(%rbx)
andb $0x3, %al
movzbl %al, %eax
movl %eax, 0x5a18(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movb %al, 0x5a1c(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movb %al, 0x5a1d(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movb %al, 0x5a1e(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movb %al, 0x5a1f(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::SyncMemory()
void XGPU::SyncMemory() {
    // lcdc stats
    // clear bits; conditionally clear the coincidence
    lcdStat = lcdStat & ~(Utils::BIT_1 | Utils::BIT_0) & ~(useLYC ? Utils::BIT_2 : 0x00);
    lcdStat |= mode;
    lcdStat |= (scanline == lyc) ? Utils::BIT_2 : 0x00;

    if (scanline == lyc) {
        TriggerLCDStat(Utils::BIT_6); // trigger hblank lcdc status interrupt
    }
    SetLCDStat(lcdStat);

    // LY (scanline)
    SetScanline(scanline);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x5a16(%rdi), %al
notb %al
shlb $0x2, %al
orb $-0x8, %al
andb 0x5a15(%rdi), %al
orb 0x5a18(%rdi), %al
movb 0x5a1e(%rdi), %cl
movb 0x5a1f(%rdi), %dl
cmpb %dl, %cl
sete %sil
shlb $0x2, %sil
orb %al, %sil
movb %sil, 0x5a15(%rdi)
cmpb %dl, %cl
jne 0x1c8e5
movq %rbx, %rdi
movl $0x40, %esi
callq 0x1c90e
movzbl 0x5a15(%rbx), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movzbl 0x5a1e(%rbx), %esi
movq (%rbx), %rax
movq 0x60(%rax), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::TriggerLCDStat(unsigned char)
void XGPU::TriggerLCDStat(uint8_t statusBit) {
    uint8_t flags = mmu->Read(InterruptService::IFLAGS);
    flags |= InterruptService::lcdStatBit;
    mmu->Write(InterruptService::IFLAGS, flags);


    lcdStat &=~ Utils::BIT_6;
    lcdStat &=~ Utils::BIT_5;
    lcdStat &=~ Utils::BIT_4;
    lcdStat &=~ Utils::BIT_3;

    lcdStat |= statusBit;
    SetLCDStat(lcdStat);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq 0x5a98(%rdi), %rdi
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x1b710
orb $0x2, %al
movq 0x5a98(%rbx), %rdi
movzbl %al, %edx
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x1b430
movb 0x5a15(%rbx), %al
andb $-0x79, %al
orb %r14b, %al
movb %al, 0x5a15(%rbx)
movq (%rbx), %rcx
movq 0x48(%rcx), %rcx
movzbl %al, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *%rcx
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::Step(unsigned int)
void XGPU::Step(uint32_t clockStep) {
    Sync();
    clocks += clockStep;

    switch (mode) {
        case GPU_MODE::OAM: // 2
        {
            if (clocks >= 80) {
                clocks = 0;
                mode = GPU_MODE::VRAM;
            }
        }
            break;
        case GPU_MODE::VRAM: // 3
        {
            if (clocks >= 172) {
                clocks = 0;
                mode = GPU_MODE::HBLANK;
                TriggerLCDStat(Utils::BIT_3); // trigger hblank lcdc status interrupt

                RenderScanline();
            }
        }
            break;
        case GPU_MODE::HBLANK: // 0
        {
            if (clocks >= 204) {
                clocks = 0;
                IncrementScanline();

                if (scanline == 143) {
                    mode = GPU_MODE::VBLANK;
                    TriggerVBlank();
                    TriggerLCDStat(Utils::BIT_4); // trigger vblank lcdc status interrupt
                    RenderFrame();
                } else {
                    mode = GPU_MODE::OAM;
                }
            }
        }
            break;
        case GPU_MODE::VBLANK: // 1
        {
            if (clocks >= 456) {
                clocks = 0;

                IncrementScanline();

                if (scanline > 153) {
                    mode = GPU_MODE::OAM;
                    TriggerLCDStat(Utils::BIT_5); // trigger oam-rams lcdc status interrupt

                    ResetScanline();
                    //XFlush(display);
                }
            }
        }
            break;
    }

    SyncMemory();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x1c79e
addl 0x8(%rbx), %r14d
movl %r14d, 0x8(%rbx)
movl 0x5a18(%rbx), %eax
cmpq $0x3, %rax
ja 0x1cafe
leaq 0x3c29(%rip), %rcx      # 0x20610
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0xcc, %r14d
jb 0x1cafe
movl $0x0, 0x8(%rbx)
movb 0x5a1e(%rbx), %al
incb %al
movb %al, 0x5a1e(%rbx)
cmpb $-0x71, %al
jne 0x1caf4
movl $0x1, 0x5a18(%rbx)
movq 0x5a98(%rbx), %rdi
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x1b710
orb $0x1, %al
movq 0x5a98(%rbx), %rdi
movzbl %al, %edx
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x1b430
movq %rbx, %rdi
movl $0x10, %esi
callq 0x1c90e
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x70(%rax)
jmp 0x1cafe
cmpl $0x50, %r14d
jb 0x1cafe
movl $0x0, 0x8(%rbx)
movl $0x3, 0x5a18(%rbx)
jmp 0x1cafe
cmpl $0xac, %r14d
jb 0x1cafe
xorl %eax, %eax
movl %eax, 0x8(%rbx)
movl %eax, 0x5a18(%rbx)
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1c90e
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xa0(%rax)
jmp 0x1cafe
cmpl $0x1c8, %r14d           # imm = 0x1C8
jb 0x1cafe
movl $0x0, 0x8(%rbx)
movb 0x5a1e(%rbx), %al
incb %al
movb %al, 0x5a1e(%rbx)
cmpb $-0x66, %al
jb 0x1cafe
movl $0x2, 0x5a18(%rbx)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1c90e
movb $0x0, 0x5a1e(%rbx)
jmp 0x1cafe
movl $0x2, 0x5a18(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c892
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::RenderScanline()
void XGPU::RenderScanline() {
    // which line of tiles to use in which map
    uint16_t bgmapOffset = bgMap ? 0x1C00 : 0x1800;
    bgmapOffset += (((scanline + scrollY) & 0xFF) >> 3) << 5;
    bgmapOffset += 0x8000;

    // which tile
    uint8_t lineOffset = (scrollX >> 3);

    // which line of pixels in the tile
    uint8_t y = (scanline + scrollY) & 7;

    // which in the tileline to start
    uint8_t x = (scrollX & 7);

    // where to render on canvas
    uint8_t color;
    uint8_t tile = mmu->Read((bgmapOffset + lineOffset));
    size_t offset = MAX_X * scanline;

    // if (bgTile && tile < 128) tile += 256;

    for (int ii = 0; ii < MAX_X; ii++) {
        color = mmu->tiles[tile][y][x];
        // color = mmu->bgp[color];
        framebuffer[offset] = mmu->bgp[color];
        offset++;

        x++;
        if (x == 8) {
            x = 0;
            lineOffset = (lineOffset + 1) & 31;
            tile = mmu->Read((bgmapOffset + lineOffset));
            // if (bgTile && tile < 128) tile += 256;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x5a11(%rdi), %eax
movzbl 0x5a1e(%rdi), %ecx
movzbl 0x5a1c(%rdi), %r14d
addl %ecx, %r14d
movl %r14d, %ecx
andl $0xf8, %ecx
shll $0xa, %eax
leal (%rax,%rcx,4), %edx
leal (%rax,%rcx,4), %eax
addl $0x9800, %eax           # imm = 0x9800
movl %eax, -0x2c(%rbp)
movzbl 0x5a1d(%rdi), %r13d
movl %r13d, %r12d
shrl $0x3, %r12d
andl $0x7, %r14d
andb $0x7, %r13b
movq 0x5a98(%rdi), %rdi
leal (%r12,%rdx), %esi
addl $0x9800, %esi           # imm = 0x9800
callq 0x1b710
movq %r14, %rsi
movzbl 0x5a1e(%rbx), %ecx
leaq (%rcx,%rcx,4), %r15
shll $0x5, %r15d
addq %rbx, %r15
movl $0xc, %r14d
movq 0x5a98(%rbx), %rcx
movzbl %al, %edx
shll $0x6, %edx
addq %rcx, %rdx
movzbl %r13b, %r13d
leaq (%rdx,%rsi,8), %rdx
movzbl 0xe3aa(%r13,%rdx), %edx
movb 0xe39e(%rcx,%rdx), %cl
movb %cl, (%r15,%r14)
incb %r13b
cmpb $0x8, %r13b
jne 0x1cbf4
incb %r12b
andb $0x1f, %r12b
movq 0x5a98(%rbx), %rdi
movq %rsi, %r13
movzbl %r12b, %esi
orl -0x2c(%rbp), %esi
callq 0x1b710
movq %r13, %rsi
xorl %r13d, %r13d
incq %r14
cmpl $0xac, %r14d
jne 0x1cb9c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::RenderFrame()
void XGPU::RenderFrame() {
    for (int y = 0; y < MAX_Y; y++) {
        for (int x = 0; x < MAX_X; x++) {
            size_t offset = (MAX_X * y) + x;
            uint8_t color = framebuffer[offset];
            Draw(color, y, x);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc(%rdi), %r15
xorl %r12d, %r12d
movzbl %r12b, %r14d
xorl %r13d, %r13d
movzbl (%r15,%r13), %esi
movq (%rbx), %rax
movzbl %r13b, %ecx
movq %rbx, %rdi
movl %r14d, %edx
callq *0x78(%rax)
incq %r13
cmpq $0xa0, %r13
jne 0x1cc2f
incq %r12
addq $0xa0, %r15
cmpq $0x90, %r12
jne 0x1cc28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::Draw(XColor, unsigned char, unsigned char)
void XGPU::Draw(XColor color, uint8_t y, uint8_t x) {
    XSetForeground(display, gc, color.pixel);
    XFillRectangle(
        display,
        window,
        gc,
        (x*windowScalar), // x
        (y*windowScalar), // y
        (1*windowScalar), // width
        (1*windowScalar) // height
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %r14d
movq %rsi, %rdx
movq %rdi, %r15
movq 0x5a20(%rdi), %rdi
movq 0x5a38(%r15), %rsi
callq 0x4120
movq 0x5a20(%r15), %rdi
movq 0x5a30(%r15), %rsi
movq 0x5a38(%r15), %rdx
movzbl 0x5a90(%r15), %r9d
imull %r9d, %ebx
imull %r9d, %r14d
movl %r9d, (%rsp)
movl %ebx, %ecx
movl %r14d, %r8d
callq 0x4200
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/RegulusImpact[P]sadboy/src/Graphics/XGPU.cpp
// Function: XGPU::DumpTiles()
void XGPU::DumpTiles() {
    uint16_t tileRow = 3;
    uint16_t tile = 0;

	for (uint16_t t = 0; t < 32; t++) {
	    if (15 < tile) {
	        tileRow++;
	        tile = 0;
	    }

	    for (uint8_t y = 0; y < 8; y++) {
    	    for (uint8_t x = 0; x < 8; x++) {
    	        uint8_t p = mmu->tiles[t][y][x];
                Draw(mmu->bgp[p], (tileRow*9)+y, (tile*10)+x);
    	    }
    	}

    	tile++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movw $0x3, %ax
movl $0xe3aa, %r15d          # imm = 0xE3AA
xorl %ecx, %ecx
xorl %edx, %edx
movq %rcx, -0x38(%rbp)
cmpw $0x10, %dx
movl $0x0, %ecx
cmovael %ecx, %edx
sbbw $-0x1, %ax
movq %rax, -0x48(%rbp)
leal (%rax,%rax,8), %eax
movq %rax, -0x50(%rbp)
movq %rdx, -0x30(%rbp)
movzbl %dl, %eax
addl %eax, %eax
leaq (%rax,%rax,4), %r13
movq %r15, -0x40(%rbp)
xorl %ecx, %ecx
movq -0x50(%rbp), %rax
movq %rcx, -0x58(%rbp)
addl %ecx, %eax
movzbl %al, %r14d
xorl %r12d, %r12d
movq 0x5a98(%rbx), %rax
leaq (%rax,%r15), %rcx
movzbl (%r12,%rcx), %ecx
movzbl 0xe39e(%rax,%rcx), %esi
leal (%r12,%r13), %eax
movq (%rbx), %r8
movzbl %al, %ecx
movq %rbx, %rdi
movl %r14d, %edx
callq *0x78(%r8)
incq %r12
cmpq $0x8, %r12
jne 0x1cd59
movq -0x58(%rbp), %rcx
incq %rcx
addq $0x8, %r15
cmpq $0x8, %rcx
jne 0x1cd48
movq -0x30(%rbp), %rdx
incl %edx
movq -0x38(%rbp), %rcx
incq %rcx
movq -0x40(%rbp), %r15
addq $0x40, %r15
cmpq $0x20, %rcx
movq -0x48(%rbp), %rax
jne 0x1cd16
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/special_characters.hpp
// Function: specialChars::isPunctuation(char*)
int isPunctuation(char* str) {
    // TODO: Alex the problem is: str[1] can be ngative, so it moves the sign-bit forward and changes everything.
    // Encore un problem: str[0] is a byte. When you shift by 8...
    int hash = (str[0] << 8) ^ str[1];
    for (unsigned i = 0; i < count_punctuation_2byte; i++)
      if (hash == punctuation_2byte[i])
        return 2;
    if (strlen(str) == 2)
      return 0;
    
    hash = (hash << 8) ^ str[2];
    for (unsigned i = 0; i < count_punctuation_3byte; i++)
      if (hash == punctuation_3byte[i])
        return 3;
    return 0;
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbl (%rdi), %eax
shll $0x8, %eax
movsbl 0x1(%rdi), %ebp
xorl %eax, %ebp
xorl %eax, %eax
leaq 0x8821(%rip), %rcx      # 0xc018
cmpl (%rax,%rcx), %ebp
je 0x3839
addq $0x4, %rax
cmpq $0x4, %rax
je 0x37f7
movq %rbx, %rdi
callq 0x3130
cmpq $0x2, %rax
je 0x3835
shll $0x8, %ebp
movsbl 0x2(%rbx), %eax
xorl %ebp, %eax
xorl %ecx, %ecx
leaq 0x883a(%rip), %rdx      # 0xc060
cmpl (%rcx,%rdx), %eax
je 0x3845
addq $0x4, %rcx
cmpq $0x10, %rcx
jne 0x3826
xorl %eax, %eax
jmp 0x383e
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x3, %eax
jmp 0x383e
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineCore.cpp
// Function: InflexEngine::staticTrieAccess(unsigned int)
InflexEngineNode* InflexEngine::staticTrieAccess(uint32_t ptr) {
// Performs a black-box access on the modified trie, when it gets expanded
  // Included in staticTrie?
  if (ptr < size)
    return staticTrie + ptr;
  
  // No? Then use auxTrie
  int32_t index = ptr - size;
  int32_t oldSize = auxTrieSize;
  
  // Is index contained in the old auxInflexEngine?
  if (index >= oldSize) {
    // Check for the first entrance in this case (auxTrieSize == 0)
    auxTrieSize = (!auxTrieSize) ? EXPAND_TRIE_CONSTANT : (auxTrieSize * EXPAND_TRIE_CONSTANT);
    
    // Realloc the entire auxTrie
    auxTrie = (InflexEngineNode*)realloc(auxTrie, auxTrieSize * sizeof(InflexEngineNode));
    
    // Init the new allocated enInflexEngines
    for (unsigned i = oldSize; i < auxTrieSize; i++) {
      auxTrie[i].code = 0;
      auxTrie[i].parent = 0;      
      auxTrie[i].sons = new uint32_t[sigma]();
      auxTrie[i].configuration = fullBits; // 31 bits
    }
  }
  return auxTrie + index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
subl 0x18(%rdi), %eax
jae 0x3874
movl %esi, %eax
leaq (%rax,%rax,4), %rax
shlq $0x2, %rax
addq 0x8(%rbx), %rax
jmp 0x3910
movl 0x1c(%rbx), %r15d
movl %eax, 0x4(%rsp)
cmpl %r15d, %eax
jl 0x38ff
movl %r15d, %eax
shll $0x4, %eax
testq %r15, %r15
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x2, %rcx
leaq (%rcx,%rcx,4), %rsi
callq 0x3440
movq %rax, 0x10(%rbx)
movl 0x1c(%rbx), %r12d
cmpl %r12d, %r15d
jae 0x38ff
movl 0x20(%rbx), %r14d
movl 0x24(%rbx), %r13d
shlq $0x2, %r14
leaq (%r15,%r15,4), %rcx
leaq (%rax,%rcx,4), %rbp
addq $0xc, %rbp
subq %r15, %r12
movq $0x0, -0xc(%rbp)
movq %r14, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3170
movq %r15, (%rbp)
movl %r13d, -0x4(%rbp)
addq $0x14, %rbp
decq %r12
jne 0x38ce
movslq 0x4(%rsp), %rax
leaq (%rax,%rax,4), %rax
shlq $0x2, %rax
addq 0x10(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineCore.cpp
// Function: InflexEngine::updateFreqOfPointer(int)
void InflexEngine::updateFreqOfPointer(int32_t ptr) {
  // If derivated, increase frequency for root
  // If root, increase frequency for itself
  // Reminder: the first bit of code is occupied - that's why += 2!
  if (!(staticTrieAccess(ptr)->code & 1))
    staticTrieAccess(staticTrieAccess(ptr)->code >> 1)->code += 2;
  else
    staticTrieAccess(ptr)->code += 2;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x384c
movb (%rax), %r14b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x384c
movl (%rax), %esi
testb $0x1, %r14b
jne 0x394f
shrl %esi
movq %rbx, %rdi
callq 0x384c
movl (%rax), %esi
addl $0x2, %esi
movl %esi, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineCore.cpp
// Function: InflexEngine::tryUpdateFreq(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void InflexEngine::tryUpdateFreq(std::string word) {
// Updade frequency of word. If not found, add it as a as-is word
  int32_t lastPos, ptr = search(word, lastPos);
  if (ptr < 0) {
    int32_t finalPtr;
    insert(-ptr, word, -1, lastPos, finalPtr);
    updateFreqOfPointer(finalPtr);
  } else if (ptr > 0) {
    updateFreqOfPointer(ptr);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0xb0ae
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a68
movl %eax, %ebp
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x39b6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
testl %ebp, %ebp
js 0x39c3
je 0x3a24
movq %rbx, %rdi
movl %ebp, %esi
jmp 0x3a1f
negl %ebp
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xb0ae
movl 0xc(%rsp), %r8d
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x3bf2
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a18
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x3920
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a5f
movq 0x20(%rsp), %rsi
jmp 0x3a57
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a5f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineCore.cpp
// Function: InflexEngine::updateFreq(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void InflexEngine::updateFreq(std::string word, std::string latinWord = "") {
// The strategy: add the latin variant, if the normal one hasn't been found or it's not a romanian word
  // Does it contain non-romanian characters
  if (!romanian::isRomanian(word)) {
    tryUpdateFreq(latinWord);
  } else {
    int32_t lastPos, ptr = search(word, lastPos);
    
    // Romanian word found?
    if (ptr > 0)
      updateFreqOfPointer(ptr);
    else
      tryUpdateFreq(latinWord);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0xb0ae
movq %r12, %rdi
xorl %esi, %esi
callq 0x407c
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x3f39
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
testb %bpl, %bpl
je 0x3f98
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xb0ae
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a68
movl %eax, %ebp
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f88
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3290
testl %ebp, %ebp
jle 0x3fd4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3920
jmp 0x4017
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xb0ae
movq %rbx, %rdi
movq %r14, %rsi
callq 0x395a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4017
movq 0x18(%rsp), %rsi
jmp 0x400f
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0xb0ae
movq %rbx, %rdi
movq %r14, %rsi
callq 0x395a
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x4017
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x404f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4074
movq 0x18(%rsp), %rsi
jmp 0x406c
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4074
movq (%r12), %rsi
jmp 0x406c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4074
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/language_support.hpp
// Function: romanian::isRomanian(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
static bool isRomanian(std::string str, unsigned index = 0) {
    if (index == str.size())
      return true;
    if (index == str.size() - 1)
        return encode(str.back()) != -1;
    else {
      int ret = romanian::diacriticEncode(str[index], str[index + 1]);
      if (ret == -1)
        return false;
      return isRomanian(str, index + 1 + !isEnglishAlphabetIndex(ret)); 
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %eax
movq 0x8(%rdi), %r14
movb $0x1, %bpl
cmpq %rax, %r14
je 0x4125
leaq -0x1(%r14), %rcx
movq (%rdi), %r15
cmpq %rax, %rcx
jne 0x40bf
movsbl -0x1(%r15,%r14), %edi
callq 0x33a0
addl $-0x61, %eax
cmpl $0x1a, %eax
setb %bpl
jmp 0x4125
movl %esi, %ebx
movzbl (%r15,%rax), %edi
incl %ebx
movzbl (%r15,%rbx), %esi
callq 0x433a
cmpl $-0x1, %eax
je 0x4123
movl %eax, %ebp
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
addq %r15, %r14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xb0ae
cmpl $0x1a, %ebp
sbbl $-0x1, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x407c
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4125
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x4125
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4150
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/language_support.hpp
// Function: romanian::diacriticEncode(unsigned char, unsigned char)
static int32_t diacriticEncode(uint8_t byte1, uint8_t byte2) {
    for (unsigned index = 0; index < 2 * COUNT_OF_DIACRITICS; ++index)
      if ((diacritics[index][0] == byte1) && (diacritics[index][1] == byte2))
        return ENGLISH_SIGMA + (index >> 1);
    return encode(byte1);
  }

// Assembly:
xorl %eax, %eax
leaq 0x7cfd(%rip), %rdx      # 0xc040
xorl %ecx, %ecx
cmpb %dil, (%rdx,%rax,2)
jne 0x4352
cmpb %sil, 0x1(%rdx,%rax,2)
je 0x4368
cmpq $0x9, %rax
leaq 0x1(%rax), %r8
setae %cl
movq %r8, %rax
cmpq $0xa, %r8
jne 0x4345
jmp 0x436d
shrl %eax
addl $0x1a, %eax
testb $0x1, %cl
je 0x4390
pushq %rax
movsbl %dil, %edi
callq 0x33a0
movl %eax, %ecx
addl $-0x61, %ecx
cmpl $0x1a, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbl %ecx, %eax
addq $0x8, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineCore.cpp
// Function: InflexEngine::findParent(int, int&)
int32_t InflexEngine::findParent(int32_t ptr, int32_t& encoding) {
// Returns the parent in InflexEngine of "ptr" and also saves the type of edge that lies between them.
  if (ptr == 0)
    return -1;
  uint32_t parent = staticTrieAccess(ptr)->parent, parentConfiguration = staticTrieAccess(parent)->configuration;
  for (unsigned index = 0; index < sigma; ++index) {
    if (bitOp::getBit(parentConfiguration, index) && (staticTrieAccess(parent)->sons[bitOp::orderOfBit(parentConfiguration, index)] == ptr))
      encoding = index;
  }
  return parent;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testl %esi, %esi
je 0x4405
movl %esi, %ebp
movq %rdi, %r14
callq 0x384c
movl 0x4(%rax), %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x384c
cmpl $0x0, 0x20(%r14)
je 0x440b
movl 0x8(%rax), %r12d
xorl %r13d, %r13d
btl %r13d, %r12d
jae 0x43fa
movq %r14, %rdi
movl %r15d, %esi
callq 0x384c
movq 0xc(%rax), %rbx
movl %r12d, %edi
movl %r13d, %esi
callq 0x42d5
movl %eax, %eax
cmpl %ebp, (%rbx,%rax,4)
jne 0x43fa
movq (%rsp), %rax
movl %r13d, (%rax)
incl %r13d
cmpl 0x20(%r14), %r13d
jb 0x43cc
jmp 0x440b
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineUtil.cpp
// Function: InflexEngine::dealloc_()
void InflexEngine::dealloc_() {
  // Dealloc staticTrie
  for (unsigned i = 0; i <= bufferLastPtr; i++) {
    if (staticTrieAccess(i)->sons != nullptr)
      delete[] staticTrieAccess(i)->sons;
  }
  if (bufferLastPtr)
    delete[] staticTrie;

  // Free auxTrie, only if it has been allocated
  if (auxTrieSize)
    free(auxTrie);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x384c
cmpq $0x0, 0xc(%rax)
je 0x560f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x384c
movq 0xc(%rax), %rdi
testq %rdi, %rdi
je 0x560f
callq 0x3350
incl %ebp
movl 0x28(%rbx), %eax
cmpl %eax, %ebp
jbe 0x55e6
testl %eax, %eax
je 0x562a
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x562a
callq 0x3350
cmpl $0x0, 0x1c(%rbx)
je 0x563f
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3300
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineUtil.cpp
// Function: InflexEngine::reset(char const*)
void InflexEngine::reset(const char* filename) {
// Reset the InflexEngine with a new dictionary
  // First dealloc the trie
  dealloc_();
  // Set the generation mode
  generationMode = Load;
  
  // Initialize auxTrie
  auxTrieSize = 0, auxTrie = nullptr;
  loadExternal(filename);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x55de
movl $0x1, (%r14)
movl $0x0, 0x1c(%r14)
movq $0x0, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x47f6
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineUtil.cpp
// Function: InflexEngine::addDerivated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void InflexEngine::addDerivated(std::string root, std::string derivated) {
  if (derivated == root)
    return;
  int32_t dummy, root_pointer = search(root, dummy);
  insert(ROOT, derivated, root_pointer, 0, dummy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdx), %rdx
movq 0x8(%rsi), %r15
cmpq %r15, %rdx
jne 0x5751
testq %rdx, %rdx
je 0x57e8
movq (%r12), %rsi
movq (%r14), %rdi
callq 0x32a0
testl %eax, %eax
je 0x57e8
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
addq %rsi, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0xb0ae
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3a68
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x579a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xb0ae
leaq 0x4(%rsp), %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x3bf2
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x57e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x5809
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x581a
movq (%r13), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/InflexEngineUtil.cpp
// Function: InflexEngine::getAllFreqs(unsigned int, std::vector<std::pair<unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void InflexEngine::getAllFreqs(uint32_t root, std::vector<std::pair<uint32_t, std::string>>& initVector) {
  // Push the frequence of from this node
  if ((staticTrieAccess(root)->code & 1) && (staticTrieAccess(root)->code >> 1))
    initVector.push_back(make_pair(staticTrieAccess(root)->code >> 1, formWord(root)));
  
  // And go further with the children
  for (unsigned i = 0; i < bitOp::countOfBits(staticTrieAccess(root)->configuration); i++)
    if (staticTrieAccess(root)->sons[i] != 0)
      getAllFreqs(staticTrieAccess(root)->sons[i], initVector);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x384c
testb $0x1, (%rax)
je 0x608a
movq %r14, %rdi
movl %ebp, %esi
callq 0x384c
cmpl $0x2, (%rax)
jb 0x608a
movq %r14, %rdi
movl %ebp, %esi
callq 0x384c
movl (%rax), %r13d
shrl %r13d
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x441e
leaq 0x38(%rsp), %r12
movl %r13d, -0x18(%r12)
movq %r12, -0x10(%r12)
movq (%r15), %rax
leaq 0x10(%rsp), %r15
cmpq %r15, %rax
je 0x602c
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x6035
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rsp), %rax
leaq 0x20(%rsp), %rsi
movq %rax, 0x10(%rsi)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
callq 0xb5e6
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6074
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x608a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
xorl %r15d, %r15d
movl $0x33333333, %r12d      # imm = 0x33333333
movq %r14, %rdi
movl %ebp, %esi
callq 0x384c
movl 0x8(%rax), %eax
movl %eax, %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %eax
movl %eax, %ecx
andl %r12d, %ecx
shrl $0x2, %eax
andl %r12d, %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
addl %eax, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
imull $0x1010101, %ecx, %eax  # imm = 0x1010101
shrl $0x18, %eax
cmpq %rax, %r15
jae 0x610b
movq %r14, %rdi
movl %ebp, %esi
callq 0x384c
movq 0xc(%rax), %rax
cmpl $0x0, (%rax,%r15,4)
je 0x6106
movq %r14, %rdi
movl %ebp, %esi
callq 0x384c
movq 0xc(%rax), %rax
movl (%rax,%r15,4), %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5fa8
incq %r15
jmp 0x6093
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6134
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rsp, %rdi
movq %r15, %rsi
callq 0x3540
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/parserOltean.hpp
// Function: text::text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
text(std::string filename) : index(BUFF_SIZE), LIMIT_BUFFER(BUFF_SIZE), currSize(0) {
    input.open(filename, std::ios::in | std::ios::binary);
    input.seekg(0, input.end);
    fileSize = input.tellg();
    input.seekg(0, input.beg);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x32e0
movl $0x400, 0x608(%rbx)     # imm = 0x400
movabsq $0x40000000000, %rax    # imm = 0x40000000000
movq %rax, 0x610(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movl $0xc, %edx
callq 0x3240
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x3370
movq %rbx, %rdi
callq 0x3480
movl %eax, 0x60c(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3370
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x832f
movq %rax, %r14
movq %rbx, %rdi
callq 0x30c0
movq %r14, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/parserOltean.hpp
// Function: text::serveWord[abi:cxx11]()
std::string serveWord() {
#if 0
    // It's not possible that we receive a white-space
    if ((currSize == fileSize) && (index + 1 >= input.gcount())) {
      return " <EOF> ";
    }
    if (index == input.gcount()) {
      input.read(buffer, BUFF_SIZE);
      index = 0;
      currSize += input.gcount();
    }
    std::string word = "";
    while ((index < BUFF_SIZE) && !isSeparator(buffer[index])) {
      word.append(1, buffer[index]);
      index++;
    }
    if ((index == BUFF_SIZE) && (currSize != fileSize)) {
      input.seekg(-word.length(), input.cur);
      fileSize += word.length();
      currSize += word.length();
      return serveWord();
    }
    while ((index < BUFF_SIZE) && isSeparator(buffer[index])) {
      index++;
    }
    specialChars::cleanUpWord(word);
    if (word.empty())
      word = serveWord();
    return word;
  }
#else
    char c;
    do {
      c = getByte();
    } while ((c != 0) && isSeparator(c));
    
    if (!c)
      return " <EOF> ";
    
    std::string word = "";
    do {
      word.append(1, c);
      c = getByte();
    } while (!isSeparator(c));
    specialChars::cleanUpWord(word);
    return word;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %r14, %rdi
callq 0x95e8
testb %al, %al
je 0x849e
movl %eax, %ebp
movsbl %al, %edi
callq 0x965e
testb %al, %al
jne 0x83dc
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
leaq 0x41d9(%rip), %rdx      # 0xc5e1
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xb556
movq 0x8(%rbx), %rsi
movsbl %bpl, %r8d
movl $0x1, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34e0
movq %r14, %rdi
callq 0x95e8
movl %eax, %ebp
movsbl %al, %edi
callq 0x965e
testb %al, %al
je 0x8413
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xb0ae
leaq 0x20(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5959
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x8486
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3290
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x84bb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x84bb
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x3d34(%rip), %rsi      # 0xc1e0
leaq 0x3d34(%rip), %rdx      # 0xc1e7
movq %rbx, %rdi
callq 0xb556
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x84cd
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x84e3
movq (%r15), %rsi
incq %rsi
callq 0x3290
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/IHorvalds[P]RomAna/./processing/parserOltean.hpp
// Function: text::getByte()
char getByte() {
    if (currSize == fileSize)
      return 0;
    if (index == LIMIT_BUFFER) {
      index = 0;
      input.read(buffer, BUFF_SIZE);
      LIMIT_BUFFER = input.gcount();
    }
    ++currSize;
    return buffer[index++];
  }

// Assembly:
movl 0x610(%rdi), %eax
cmpl 0x60c(%rdi), %eax
jne 0x95f9
xorl %eax, %eax
retq
pushq %rbx
movq %rdi, %rbx
movl 0x614(%rdi), %eax
cmpl 0x608(%rdi), %eax
jne 0x9632
movl $0x0, 0x614(%rbx)
leaq 0x208(%rbx), %rsi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
callq 0x3330
movl 0x8(%rbx), %eax
movl %eax, 0x608(%rbx)
movq 0x610(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
pshufd $0x55, %xmm0, %xmm2     # xmm2 = xmm0[1,1,1,1]
psubd %xmm1, %xmm0
movq %xmm0, 0x610(%rbx)
movd %xmm2, %eax
cltq
movb 0x208(%rbx,%rax), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: send_message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void send_message(string message, int speaker) {
    int status = -1, retries = Socket::max_retries;
    for (int i = 0; (unsigned int)i < message.size(); i += Socket::buffer_size) {
        cout << speaker << " speaking\n";
        while (status == -1 && retries--)
            status = socket_server->Write(message.substr(i, Socket::buffer_size), speaker);        
    }
    
    if (status == -1) active->remove(speaker);
    
    pthread_mutex_unlock(&lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, -0x2c(%rbp)
cmpq $0x0, 0x8(%rdi)
je 0x323b
movq %rdi, %r14
movl $0x5, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movq 0x7e38(%rip), %rdi      # 0xafd8
movl -0x2c(%rbp), %esi
callq 0x2370
movl $0xa, %edx
movq %rax, %rdi
leaq 0x4f68(%rip), %rsi      # 0x811f
callq 0x22b0
cmpl $-0x1, %r13d
jne 0x3224
testl %r12d, %r12d
je 0x321e
decl %r12d
movq 0x8047(%rip), %r13      # 0xb218
movl $0x1000, %ecx           # imm = 0x1000
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2270
movq %r13, %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %edx
callq 0x2f5e
movl %eax, %r13d
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3212
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2250
cmpl $-0x1, %r13d
jne 0x3224
addl $-0x1, %r12d
jb 0x31ca
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
addq $0x1000, %r15           # imm = 0x1000
cmpq %r15, 0x8(%r14)
ja 0x3199
cmpl $-0x1, %r13d
jne 0x324a
movq 0x8066(%rip), %rdi      # 0xb2a8
movl -0x2c(%rbp), %esi
callq 0x5fc2
leaq 0x7fcf(%rip), %rdi      # 0xb220
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3281
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: ActiveClients::remove(int)
void remove(int conn) {
        pthread_mutex_lock(&lock);    
        int pos = find(conn);
        clients.erase(clients.begin() + pos);
        pthread_mutex_unlock(&lock);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x524a(%rip), %rdi      # 0xb220
callq 0x2310
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
je 0x6016
sarq $0x3, %rax
movabsq $-0x1111111111111111, %rcx # imm = 0xEEEEEEEEEEEEEEEF
imulq %rax, %rcx
xorl %eax, %eax
imulq $0x78, %rax, %rdx
cmpl %r14d, 0x4(%rsi,%rdx)
je 0x6012
incl %eax
cmpq %rax, %rcx
ja 0x5ffb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cltq
jmp 0x601d
movq $-0x1, %rax
imulq $0x78, %rax, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x66ac
leaq 0x51ed(%rip), %rdi      # 0xb220
popq %rbx
popq %r14
popq %rbp
jmp 0x21b0
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: ActiveClients::insert(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void insert(int conn, string name, string ip) {
        pthread_mutex_lock(&lock);
        Client new_client = Client(curr_id++, conn, name, ip);
        clients.push_back(new_client);
        pthread_mutex_unlock(&lock);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x4e15(%rip), %rdi      # 0xb220
callq 0x2310
movl 0x18(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x18(%rbx)
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x2810
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x2810
leaq -0xe0(%rbp), %rdi
leaq -0x48(%rbp), %rcx
leaq -0x68(%rbp), %r8
movl %r15d, %esi
movl %r14d, %edx
callq 0x6848
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x6483
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2250
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x649c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2250
leaq -0xe0(%rbp), %rsi
movq %rbx, %rdi
callq 0x6932
leaq 0x4d6e(%rip), %rdi      # 0xb220
callq 0x21b0
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64d0
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2250
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64ef
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2250
leaq -0xc8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x650e
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2250
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x603c
jmp 0x6567
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x654e
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2250
jmp 0x654e
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6567
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x2380
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: Client::Client(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Client(int id, int conn, string name, string ip) {
        this->id = id;
        this->ip = ip;
        this->conn = conn;
        this->name = name;

        this->channel_name = "$";
        this->is_admin = false;
        this->is_muted = false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rdi, %r13
addq $0x8, %rdi
leaq 0x18(%r13), %rax
movq %rax, -0x40(%rbp)
movq %rax, 0x8(%r13)
xorl %eax, %eax
movq %rax, 0x10(%r13)
movb %al, 0x18(%r13)
leaq 0x28(%r13), %rcx
movq %rcx, -0x30(%rbp)
leaq 0x38(%r13), %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, 0x28(%r13)
movq %rax, 0x30(%r13)
movb %al, 0x38(%r13)
leaq 0x50(%r13), %rbx
leaq 0x60(%r13), %r12
movq %r12, 0x50(%r13)
movq %rax, 0x58(%r13)
movb %al, 0x60(%r13)
movl %esi, (%r13)
movq %rdi, -0x48(%rbp)
movq %r8, %rsi
callq 0x2150
movl %r15d, 0x4(%r13)
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x2150
movq 0x58(%r13), %rdx
leaq 0x1855(%rip), %rcx      # 0x812c
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2330
movw $0x0, 0x70(%r13)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x6914
movq (%r12), %rsi
incq %rsi
callq 0x2250
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x23f0
movq %r14, %rdi
callq 0x2380
nop