LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: disjukr[P]Tetris/./Tetromino.hh
// Function: JMino::CheckBlock(int, int)
virtual bool CheckBlock(int x, int y) {
        if (!Tetromino::CheckBlock(x, y))
            return false;
        if (vertical) {
            if (x == 1 && y > 0)
                return true;
            if (tail && x == 0 && y == 3)
                return true;
            if (!tail && x == 2 && y == 1)
                return true;
        }
        else {
            if (y == 2 && x < 3 )
                return true;
            if (!tail && x == 0 && y == 1)
                return true;
            if (tail && x == 2 && y == 3)
                return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x9ac0
testb $0x1, %al
jne 0xa4d2
movb $0x0, -0x1(%rbp)
jmp 0xa57b
movq -0x20(%rbp), %rax
testb $0x1, 0x14(%rax)
je 0xa52b
cmpl $0x1, -0x14(%rbp)
jne 0xa4f1
cmpl $0x0, -0x18(%rbp)
jle 0xa4f1
movb $0x1, -0x1(%rbp)
jmp 0xa57b
movq -0x20(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0xa50d
cmpl $0x0, -0x14(%rbp)
jne 0xa50d
cmpl $0x3, -0x18(%rbp)
jne 0xa50d
movb $0x1, -0x1(%rbp)
jmp 0xa57b
movq -0x20(%rbp), %rax
testb $0x1, 0x15(%rax)
jne 0xa529
cmpl $0x2, -0x14(%rbp)
jne 0xa529
cmpl $0x1, -0x18(%rbp)
jne 0xa529
movb $0x1, -0x1(%rbp)
jmp 0xa57b
jmp 0xa577
cmpl $0x2, -0x18(%rbp)
jne 0xa53d
cmpl $0x3, -0x14(%rbp)
jge 0xa53d
movb $0x1, -0x1(%rbp)
jmp 0xa57b
movq -0x20(%rbp), %rax
testb $0x1, 0x15(%rax)
jne 0xa559
cmpl $0x0, -0x14(%rbp)
jne 0xa559
cmpl $0x1, -0x18(%rbp)
jne 0xa559
movb $0x1, -0x1(%rbp)
jmp 0xa57b
movq -0x20(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0xa575
cmpl $0x2, -0x14(%rbp)
jne 0xa575
cmpl $0x3, -0x18(%rbp)
jne 0xa575
movb $0x1, -0x1(%rbp)
jmp 0xa57b
jmp 0xa577
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: disjukr[P]Tetris/Screen.cc
// Function: Screen::init(int, int)
void Screen::init(int width, int height) {
    this -> width = width;
    this -> height = height;
    this -> buffer = new Cell*[height];
    for (int i = 0; i < height; ++i) {
        buffer[i] = new Cell[width];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x4(%rax)
movslq -0x10(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xaa0e
movslq -0xc(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0xc, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x38(%rbp)
cmpq $0x0, %rax
je 0xa9a4
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
imulq $0xc, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0xb0e0
jmp 0xa98f
movq -0x58(%rbp), %rcx
movq -0x60(%rbp), %rax
addq $0xc, %rax
cmpq %rcx, %rax
movq %rax, -0x50(%rbp)
jne 0xa980
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa90c
movq -0x38(%rbp), %rcx
movq %rax, %rsi
movq -0x60(%rbp), %rax
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
cmpq %rax, %rcx
movq %rax, -0x68(%rbp)
je 0xaa03
movq -0x68(%rbp), %rdi
addq $-0xc, %rdi
movq %rdi, -0x70(%rbp)
callq 0xb100
movq -0x38(%rbp), %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x68(%rbp)
jne 0xa9e1
movq -0x40(%rbp), %rdi
callq 0x31c0
jmp 0xaa14
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3270
nopl (%rax)
// File: disjukr[P]Tetris/Screen.cc
// Function: Screen::GetCell(int, int)
Cell* Screen::GetCell(int x, int y) {
    if (x < 0 || x >= this -> GetWidth() ||
        y < 0 || y >= this -> GetHeight())
        return &(this -> dummy);
    else
        return &(this -> buffer[y][x]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xac36
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0xabb0
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0xac36
cmpl $0x0, -0x18(%rbp)
jl 0xac36
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0xabc0
movl %eax, %ecx
movl -0x28(%rbp), %eax
cmpl %ecx, %eax
jl 0xac44
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
jmp 0xac63
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: disjukr[P]Tetris/Screen.cc
// Function: Screen::FillCell(Color, int, int, bool)
void Screen::FillCell(Color color, int x, int y, bool background) {
    Cell* cell = this -> GetCell(x, y);
    if (background)
        cell -> background = color;
    else
        cell -> foreground = color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0xabe0
movq %rax, -0x20(%rbp)
testb $0x1, -0x15(%rbp)
je 0xae02
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0xae0c
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: disjukr[P]Tetris/Screen.cc
// Function: Screen::FillLine(Color, int, int, int, bool)
void Screen::FillLine(Color color, int x, int y, int length, bool background) {
    for (int i = 0; i < length; ++i) {
        Cell* cell = this -> GetCell(x + i, y);
        if (background)
            cell -> background = color;
        else
            cell -> foreground = color;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xae97
movq -0x30(%rbp), %rdi
movl -0x10(%rbp), %esi
addl -0x20(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0xabe0
movq %rax, -0x28(%rbp)
testb $0x1, -0x19(%rbp)
je 0xae80
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0xae8a
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0xae8c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xae50
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: disjukr[P]Tetris/Screen.cc
// Function: Screen::RenderScreen(Screen&, int, int)
void Screen::RenderScreen(Screen& screen, int x, int y) {
    for (int j = 0; j < screen.height; ++j) {
        for (int i = 0; i < screen.width; ++i) {
            int tx = i + x;
            int ty = j + y;
            Cell* cell = screen.GetCell(i, j);
            this -> WriteCell(cell -> value, tx, ty);
            this -> FillCell(cell -> foreground, tx, ty, false);
            this -> FillCell(cell -> background, tx, ty, true);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0xaf7b
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xaf6b
movl -0x20(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0xabe0
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb (%rax), %al
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movsbl %al, %esi
callq 0xad00
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %esi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
xorl %r8d, %r8d
callq 0xadc0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x8(%rax), %esi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movl $0x1, %r8d
callq 0xadc0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xaedc
jmp 0xaf6d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xaec5
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: disjukr[P]Tetris/Console.cc
// Function: Console::SetEcho(bool)
void Console::SetEcho(bool echo) {
#ifdef _WIN32
    echo;
#else
    struct termios stdIn;
    tcgetattr(STDIN_FILENO, &stdIn);
    stdIn.c_lflag &= ~ECHO;
    stdIn.c_lflag |= echo ? ECHO : 0;
    tcsetattr(STDIN_FILENO, TCSANOW, &stdIn);
#endif
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
xorl %edi, %edi
leaq -0x40(%rbp), %rsi
callq 0x3180
movl -0x34(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x34(%rbp)
movb -0x1(%rbp), %dl
xorl %eax, %eax
movl $0x8, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
orl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
xorl %esi, %esi
leaq -0x40(%rbp), %rdx
movl %esi, %edi
callq 0x31b0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: disjukr[P]Tetris/Console.cc
// Function: Console::SetCursor(bool)
void Console::SetCursor(bool visible) {
#ifdef _WIN32
    visible;
#else
    cout << "\x1B[?25" << (visible ? 'h' : 'l');
#endif
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movq 0x6df1(%rip), %rdi      # 0x11fd8
leaq 0x1382(%rip), %rsi      # 0xc570
callq 0x3140
movq %rax, -0x10(%rbp)
movb -0x1(%rbp), %cl
movb $0x68, %al
movb $0x6c, %dl
movb %dl, -0x3(%rbp)
testb $0x1, %cl
movb %al, -0x2(%rbp)
jne 0xb20f
movb -0x3(%rbp), %al
movb %al, -0x2(%rbp)
movq -0x10(%rbp), %rdi
movb -0x2(%rbp), %al
movsbl %al, %esi
callq 0x3190
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: disjukr[P]Tetris/Console.cc
// Function: Console::SetColor(Color, Color)
void Console::SetColor(Color foreground, Color background) {
#ifdef _WIN32
    SetConsoleTextAttribute(hStdout,
        GetAttributes(foreground, background));
#else
    int foregroundBegin;
    int backgroundBegin;
    switch (foreground) {
    default: case NONE:
        foregroundBegin = 0;
        break;
    case WHITE: foregroundBegin = 97; break;
    case GREY: foregroundBegin = 90; break;
    case BLACK: foregroundBegin = 30; break;
    case BLUE: foregroundBegin = 94; break;
    case CYAN: foregroundBegin = 96; break;
    case GREEN: foregroundBegin = 92; break;
    case MAGENTA: foregroundBegin = 95; break;
    case RED: foregroundBegin = 91; break;
    case YELLOW: foregroundBegin = 93; break;
    }
    switch (background) {
    default: case NONE:
        backgroundBegin = 0;
        break;
    case WHITE: backgroundBegin = 107; break;
    case GREY: backgroundBegin = 47; break;
    case BLACK: backgroundBegin = 40; break;
    case BLUE: backgroundBegin = 104; break;
    case CYAN: backgroundBegin = 106; break;
    case GREEN: backgroundBegin = 102; break;
    case MAGENTA: backgroundBegin = 105; break;
    case RED: backgroundBegin = 101; break;
    case YELLOW: backgroundBegin = 103; break;
    }
    cout << "\x1B[";
    if (foregroundBegin != 0)
        cout << foregroundBegin;
    if (backgroundBegin != 0)
        cout << ';' << backgroundBegin;
    cout << "m";
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0xb27f
movq -0x18(%rbp), %rax
leaq 0x12aa(%rip), %rcx      # 0xc520
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xb281
movl $0x0, -0xc(%rbp)
jmp 0xb2d9
movl $0x61, -0xc(%rbp)
jmp 0xb2d9
movl $0x5a, -0xc(%rbp)
jmp 0xb2d9
movl $0x1e, -0xc(%rbp)
jmp 0xb2d9
movl $0x5e, -0xc(%rbp)
jmp 0xb2d9
movl $0x60, -0xc(%rbp)
jmp 0xb2d9
movl $0x5c, -0xc(%rbp)
jmp 0xb2d9
movl $0x5f, -0xc(%rbp)
jmp 0xb2d9
movl $0x5b, -0xc(%rbp)
jmp 0xb2d9
movl $0x5d, -0xc(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x9, %rax
ja 0xb2fa
movq -0x20(%rbp), %rax
leaq 0x1257(%rip), %rcx      # 0xc548
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xb2fc
movl $0x0, -0x10(%rbp)
jmp 0xb354
movl $0x6b, -0x10(%rbp)
jmp 0xb354
movl $0x2f, -0x10(%rbp)
jmp 0xb354
movl $0x28, -0x10(%rbp)
jmp 0xb354
movl $0x68, -0x10(%rbp)
jmp 0xb354
movl $0x6a, -0x10(%rbp)
jmp 0xb354
movl $0x66, -0x10(%rbp)
jmp 0xb354
movl $0x69, -0x10(%rbp)
jmp 0xb354
movl $0x65, -0x10(%rbp)
jmp 0xb354
movl $0x67, -0x10(%rbp)
movq 0x6c7d(%rip), %rdi      # 0x11fd8
leaq 0x121c(%rip), %rsi      # 0xc57e
callq 0x3140
cmpl $0x0, -0xc(%rbp)
je 0xb37c
movl -0xc(%rbp), %esi
movq 0x6c61(%rip), %rdi      # 0x11fd8
callq 0x3260
cmpl $0x0, -0x10(%rbp)
je 0xb39e
movq 0x6c4f(%rip), %rdi      # 0x11fd8
movl $0x3b, %esi
callq 0x3190
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x3260
movq 0x6c33(%rip), %rdi      # 0x11fd8
leaq 0x11d8(%rip), %rsi      # 0xc584
callq 0x3140
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: disjukr[P]Tetris/Console.cc
// Function: Console::ShowScreen()
void Console::ShowScreen() {
#ifdef _WIN32
    hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
    GetConsoleScreenBufferInfo(hStdout, &screenInfo);
    oldAttributes = screenInfo.wAttributes;
#endif
    int width = screen.GetWidth();
    int height = screen.GetHeight();
    for (int j = 0; j < height; ++j) {
        for (int i = 0; i < width; ++i) {
            SetColor(screen.GetColor(i, j, false),
                     screen.GetColor(i, j, true));
            cout.put(screen.GetChar(i, j));
            UnsetColor();
        }
        cout << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x6d99(%rip), %rdi      # 0x12188
callq 0xabb0
movl %eax, -0x4(%rbp)
leaq 0x6d8a(%rip), %rdi      # 0x12188
callq 0xabc0
movl %eax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xb4b2
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0xb491
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0x6d53(%rip), %rdi      # 0x12188
xorl %ecx, %ecx
callq 0xaca0
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0x6d3c(%rip), %rdi      # 0x12188
movl $0x1, %ecx
callq 0xaca0
movl -0x14(%rbp), %edi
movl %eax, %esi
callq 0xb250
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0x6d1b(%rip), %rdi      # 0x12188
callq 0xac70
movq 0x6b5f(%rip), %rdi      # 0x11fd8
movsbl %al, %esi
callq 0x3040
callq 0xb3c0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xb420
movq 0x6b40(%rip), %rdi      # 0x11fd8
movq 0x6b21(%rip), %rsi      # 0x11fc0
callq 0x3160
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb40d
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: disjukr[P]Tetris/Keyboard.cc
// Function: kbhit()
int _kbhit() {
    struct termios oldt, newt;
    int ch;
    int oldf;
    tcgetattr(STDIN_FILENO, &oldt);
    newt = oldt;
    newt.c_lflag &= ~(ICANON | ECHO);
    tcsetattr(STDIN_FILENO, TCSANOW, &newt);
    oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
    fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);
    ch = getchar();
    tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
    fcntl(STDIN_FILENO, F_SETFL, oldf);
    if(ch != EOF) {
        ungetc(ch, stdin);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
xorl %edi, %edi
leaq -0x40(%rbp), %rsi
callq 0x3180
leaq -0x7c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x3c, %edx
callq 0x30f0
movl -0x70(%rbp), %eax
andl $-0xb, %eax
movl %eax, -0x70(%rbp)
xorl %esi, %esi
leaq -0x7c(%rbp), %rdx
movl %esi, %edi
callq 0x31b0
xorl %edx, %edx
movl $0x3, %esi
movl %edx, %edi
movb $0x0, %al
callq 0x30b0
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x30b0
callq 0x31e0
movl %eax, -0x80(%rbp)
xorl %esi, %esi
leaq -0x40(%rbp), %rdx
movl %esi, %edi
callq 0x31b0
movl -0x84(%rbp), %edx
xorl %edi, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x30b0
cmpl $-0x1, -0x80(%rbp)
je 0xb7c8
movl -0x80(%rbp), %edi
movq 0x6819(%rip), %rax      # 0x11fd0
movq (%rax), %rsi
callq 0x3050
movl $0x1, -0x4(%rbp)
jmp 0xb7cf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: disjukr[P]Tetris/Keyboard.cc
// Function: Keyboard::code()
Key Keyboard::code() {
#ifdef _WIN32
    if (GetAsyncKeyState(VK_UP) & SHRT_MAX) return UP;
    else if (GetAsyncKeyState(VK_DOWN) & SHRT_MAX) return DOWN;
    else if (GetAsyncKeyState(VK_LEFT) & SHRT_MAX) return LEFT;
    else if (GetAsyncKeyState(VK_RIGHT) & SHRT_MAX) return RIGHT;
#endif
    if (_kbhit()) {
        switch (nonblockGetCh()) {
        case 27:
#ifdef _WIN32
            return ESC;
#else
            if (!_kbhit()) return ESC;
            if (nonblockGetCh() == 91) {
                switch (nonblockGetCh()) {
                case 65: return UP;
                case 66: return DOWN;
                case 68: return LEFT;
                case 67: return RIGHT;
                }
            }
#endif
        case 'q': case 'Q': return Q;
        case 'w': case 'W': return W;
        case 'a': case 'A': return A;
        case 's': case 'S': return S;
        case 'd': case 'D': return D;
        case 'e': case 'E': return E;
        case 'r': case 'R': return R;
        case 'f': case 'F': return F;
        case 'z': case 'Z': return Z;
        case 'x': case 'X': return X;
        case 'c': case 'C': return C;
        case ' ': return SPACE;
        }
    }
    return ETC;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0xb710
cmpl $0x0, %eax
je 0xb940
callq 0xb7e0
movsbl %al, %eax
addl $-0x1b, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x5f, %eax
ja 0xb93e
movq -0x10(%rbp), %rax
leaq 0xd3d(%rip), %rcx       # 0xc588
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0xb710
cmpl $0x0, %eax
jne 0xb86a
movl $0x5, -0x4(%rbp)
jmp 0xb947
callq 0xb7e0
movsbl %al, %eax
cmpl $0x5b, %eax
jne 0xb8d0
callq 0xb7e0
movsbl %al, %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x3, %eax
ja 0xb8ce
movq -0x18(%rbp), %rax
leaq 0xe70(%rip), %rcx       # 0xc708
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0xb947
movl $0x1, -0x4(%rbp)
jmp 0xb947
movl $0x2, -0x4(%rbp)
jmp 0xb947
movl $0x3, -0x4(%rbp)
jmp 0xb947
jmp 0xb8d0
jmp 0xb8d2
movl $0x6, -0x4(%rbp)
jmp 0xb947
movl $0x7, -0x4(%rbp)
jmp 0xb947
movl $0x8, -0x4(%rbp)
jmp 0xb947
movl $0x9, -0x4(%rbp)
jmp 0xb947
movl $0xa, -0x4(%rbp)
jmp 0xb947
movl $0xb, -0x4(%rbp)
jmp 0xb947
movl $0xc, -0x4(%rbp)
jmp 0xb947
movl $0xd, -0x4(%rbp)
jmp 0xb947
movl $0xe, -0x4(%rbp)
jmp 0xb947
movl $0xf, -0x4(%rbp)
jmp 0xb947
movl $0x10, -0x4(%rbp)
jmp 0xb947
movl $0x4, -0x4(%rbp)
jmp 0xb947
jmp 0xb940
movl $0x11, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: ssubrandon[P]460Project2/Project2.cpp
// Function: main
int main (int argc, char * argv[])
{
	if (argc < 2)
	{
		printf ("format: %s <filename>\n", argv[0]);
		exit (1);
	}
/*
	SetLimits ();
*/
	SyntacticalAnalyzer parse (argv[1]);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x850, %rsp            # imm = 0x850
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x44ee
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xbb27(%rip), %rdi      # 0x10004
movb $0x0, %al
callq 0x3060
movl $0x1, %edi
callq 0x3340
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x850(%rbp), %rdi
callq 0x8940
movl $0x0, -0x4(%rbp)
leaq -0x850(%rbp), %rdi
callq 0x9070
movl -0x4(%rbp), %eax
addq $0x850, %rsp            # imm = 0x850
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: ssubrandon[P]460Project2/SetLimits.cpp
// Function: SetLimits()
void SetLimits ()
{
	// Beginning of resource limit code
	int getrlimit(int resource, struct rlimit *rlim);
	int getrusage(int who, struct rusage *usage);
	int setrlimit(int resource, const struct rlimit *rlim);
	struct rlimit __trl1;
	const int __trl1r = getrlimit(RLIMIT_CPU, & __trl1);
	struct rlimit __trl2 = {20, __trl1.rlim_max};
	const int __trl2r = setrlimit(RLIMIT_CPU, & __trl2);
	struct rlimit __trl3;
	const int __trl3r = getrlimit(RLIMIT_FSIZE, & __trl3);
	struct rlimit __trl4 = {10000000, __trl3.rlim_max};
	const int __trl4r = setrlimit(RLIMIT_FSIZE, & __trl4);
	// End of time limit code
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
xorl %edi, %edi
leaq -0x10(%rbp), %rsi
callq 0x3390
movl %eax, -0x14(%rbp)
movq $0x14, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
xorl %edi, %edi
leaq -0x28(%rbp), %rsi
callq 0x3260
movl %eax, -0x2c(%rbp)
movl $0x1, %edi
leaq -0x40(%rbp), %rsi
callq 0x3390
movl %eax, -0x44(%rbp)
movq $0x989680, -0x58(%rbp)  # imm = 0x989680
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x1, %edi
leaq -0x58(%rbp), %rsi
callq 0x3260
movl %eax, -0x5c(%rbp)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: ssubrandon[P]460Project2/LexicalAnalyzer.cpp
// Function: LexicalAnalyzer::~LexicalAnalyzer()
LexicalAnalyzer::~LexicalAnalyzer ()
{
	input.close ();
	cout << errors << " Lexical errors found in input file\n";
	listing << errors << " Lexical errors found in input file\n";
	listing.close();
	debug << errors << " Lexical errors found in input file\n";
	debug.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x400, %rdi            # imm = 0x400
callq 0x30c0
jmp 0x5eb2
movq -0x10(%rbp), %rax
movl 0x854(%rax), %esi
movq 0xf115(%rip), %rdi      # 0x14fd8
callq 0x3420
movq %rax, -0x18(%rbp)
jmp 0x5ece
movq -0x18(%rbp), %rdi
leaq 0xa351(%rip), %rsi      # 0x1022a
callq 0x3270
jmp 0x5ee0
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x200, %rdi            # imm = 0x200
movl 0x854(%rax), %esi
callq 0x3420
movq %rax, -0x20(%rbp)
jmp 0x5eff
movq -0x20(%rbp), %rdi
leaq 0xa320(%rip), %rsi      # 0x1022a
callq 0x3270
jmp 0x5f11
movq -0x10(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
callq 0x33a0
jmp 0x5f23
movq -0x10(%rbp), %rdi
movl 0x854(%rdi), %esi
callq 0x3420
movq %rax, -0x28(%rbp)
jmp 0x5f38
movq -0x28(%rbp), %rdi
leaq 0xa2e7(%rip), %rsi      # 0x1022a
callq 0x3270
jmp 0x5f4a
movq -0x10(%rbp), %rdi
callq 0x33a0
jmp 0x5f55
movq -0x10(%rbp), %rdi
addq $0x858, %rdi            # imm = 0x858
callq 0x7570
movq -0x10(%rbp), %rdi
addq $0x830, %rdi            # imm = 0x830
callq 0x34b8
movq -0x10(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x34b8
movq -0x10(%rbp), %rdi
addq $0x608, %rdi            # imm = 0x608
callq 0x33c0
movq -0x10(%rbp), %rdi
addq $0x400, %rdi            # imm = 0x400
callq 0x30f0
movq -0x10(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
callq 0x33c0
movq -0x10(%rbp), %rdi
callq 0x33c0
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x7590
nopl (%rax)
// File: ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::~SyntacticalAnalyzer()
SyntacticalAnalyzer::~SyntacticalAnalyzer ()
{// this is the deconstructor for the syntactical analyzer class
  cout << errors << " Syntactical errors found in input file\n";
	lex->listing << errors << " Syntactical errors found in input file\n";
	lex->debug << errors << " Syntactical errors found in input file\n";
  ruleFile.close();
	delete lex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl (%rax), %esi
movq 0xbf4b(%rip), %rdi      # 0x14fd8
callq 0x3420
movq %rax, -0x10(%rbp)
jmp 0x9098
movq -0x10(%rbp), %rdi
leaq 0x735a(%rip), %rsi      # 0x103fd
callq 0x3270
jmp 0x90aa
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x200, %rdi            # imm = 0x200
movl (%rax), %esi
callq 0x3420
movq %rax, -0x20(%rbp)
jmp 0x90c6
movq -0x20(%rbp), %rdi
leaq 0x732c(%rip), %rsi      # 0x103fd
callq 0x3270
jmp 0x90d8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movl (%rax), %esi
callq 0x3420
movq %rax, -0x28(%rbp)
jmp 0x90ed
movq -0x28(%rbp), %rdi
leaq 0x7305(%rip), %rsi      # 0x103fd
callq 0x3270
jmp 0x90ff
movq -0x18(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
callq 0x33a0
jmp 0x9111
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x913a
movq -0x30(%rbp), %rdi
callq 0x5e90
movq -0x30(%rbp), %rdi
movl $0x888, %esi            # imm = 0x888
callq 0x3290
movq -0x18(%rbp), %rdi
addq $0x820, %rdi            # imm = 0x820
callq 0x34b8
movq -0x18(%rbp), %rdi
addq $0x620, %rdi            # imm = 0x620
callq 0x33c0
movq -0x18(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
callq 0x33c0
movq -0x18(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
callq 0x33c0
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x30f0
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x7590
nopw %cs:(%rax,%rax)
// File: ssubrandon[P]460Project2/SyntacticalAnalyzer.cpp
// Function: SyntacticalAnalyzer::quoted_lit()
int SyntacticalAnalyzer::quoted_lit(){
   //This function deals with the quoted_lit rules (13) and will check for syntactical correctness,
  //this function will then, depending on the token seen, send the program to any other token.
	ruleFile << "Entering quoted_lit function; Current token is: " << lex ->GetTokenName(token) << ", lexeme: " << lex->GetLexeme() << endl;

	int errors = 0;
	ruleFile << "Using Rule 13" << endl;
	errors += any_other_token();
	ruleFile << "Exiting quoted_lit function; current token is: " << lex ->GetTokenName (token) << endl;

	return errors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
addq $0x420, %rdi            # imm = 0x420
leaq 0x3932(%rip), %rsi      # 0x10a9a
callq 0x3270
movq %rax, %rcx
movq -0xa0(%rbp), %rax
movq %rcx, -0x98(%rbp)
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
leaq -0x28(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x6f40
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x3240
movq %rax, -0x88(%rbp)
jmp 0xd1b1
movq -0x88(%rbp), %rdi
leaq 0x3295(%rip), %rsi      # 0x10454
callq 0x3270
movq %rax, -0xa8(%rbp)
jmp 0xd1cd
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x58(%rbp), %rdi
callq 0x6f80
jmp 0xd1e3
movq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3240
movq %rax, -0xb0(%rbp)
jmp 0xd1fc
movq -0xb0(%rbp), %rdi
movq 0x7db6(%rip), %rsi      # 0x14fc0
callq 0x32c0
jmp 0xd211
leaq -0x58(%rbp), %rdi
callq 0x34b8
leaq -0x28(%rbp), %rdi
callq 0x34b8
movq -0xa0(%rbp), %rdi
movl $0x0, -0x5c(%rbp)
addq $0x420, %rdi            # imm = 0x420
movq %rdi, -0xd0(%rbp)
leaq 0x3885(%rip), %rsi      # 0x10acb
callq 0x3270
movq %rax, %rdi
movq 0x7d6b(%rip), %rsi      # 0x14fc0
callq 0x32c0
movq -0xa0(%rbp), %rdi
callq 0xd710
movq -0xd0(%rbp), %rdi
movl %eax, %ecx
movl -0x5c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x5c(%rbp)
leaq 0x385b(%rip), %rsi      # 0x10ad9
callq 0x3270
movq %rax, %rcx
movq -0xa0(%rbp), %rax
movq %rcx, -0xc8(%rbp)
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
leaq -0x80(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x6f40
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x3240
movq %rax, -0xb8(%rbp)
jmp 0xd2c7
movq -0xb8(%rbp), %rdi
movq 0x7ceb(%rip), %rsi      # 0x14fc0
callq 0x32c0
jmp 0xd2dc
leaq -0x80(%rbp), %rdi
callq 0x34b8
movl -0x5c(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd314
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x34b8
leaq -0x28(%rbp), %rdi
callq 0x34b8
jmp 0xd334
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x34b8
movq -0x30(%rbp), %rdi
callq 0x3430
nopl (%rax)
// File: attractivechaos[P]udb2/tsl_hopscotch_map/./hopscotch_hash.h
// Function: tsl::bhopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::ValueSelect::value_type& tsl::detail_hopscotch_hash::hopscotch_hash<std::pair<unsigned int const, unsigned int>, tsl::bhopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::KeySelect, tsl::bhopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::ValueSelect, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>, std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>>>::operator[]<unsigned int, tsl::bhopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::ValueSelect, (void*)0>(unsigned int&&)
typename U::value_type& operator[](K&& key) {
        using T = typename U::value_type;
        
        const std::size_t hash = hash_key(key);
        const std::size_t ibucket_for_hash = bucket_for_hash(hash);
        
        T* value = find_value_impl(key, hash, m_buckets + ibucket_for_hash);
        if(value != nullptr) {
            return *value;
        }
        else {
            return insert_value(ibucket_for_hash, hash, std::piecewise_construct, 
                                                        std::forward_as_tuple(std::forward<K>(key)), 
                                                        std::forward_as_tuple()).first.value();
        }
    }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x70(%rsp), %rsi
callq 0x35b0
movq 0x20(%rsp), %rdi
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rsi
callq 0x35e0
movq 0x20(%rsp), %rdi
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x50(%rdi), %rcx
movq 0x60(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
callq 0x3610
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x352e
movq 0x58(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x3596
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3980
callq 0x39b0
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0x38(%rsp), %rdi
leaq 0x3b99(%rip), %r8       # 0x710a
leaq 0x30(%rsp), %r9
leaq 0x2f(%rsp), %rax
movq %rax, (%rsp)
callq 0x3650
leaq 0x38(%rsp), %rdi
callq 0x39c0
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: myudelson[P]hmm-scalable/trainhmmst.cpp
// Function: read_and_structure_data(char const*, _IO_FILE*)
bool read_and_structure_data(const char *filename, FILE *fid_console) {
    bool readok = true;
    if(task.binaryinput==0) {
        readok = InputUtilSt::readTxt(filename, &task);
    } else {
        readok = InputUtilSt::readBin(filename, &task);
    }
    if(! readok ) {
        return false;
    }
    
	NDAT t = 0;
	NCAT k;
    
	// Pass A, find first and last instance of null skill
	for(t=0; t<task.N; t++) {
        if(task.multiskill==0)
            k = task.dat_skill[t];//[t];
        else
            k = task.dat_skill_stacked[ task.dat_skill_rix[t] ]; // first skill of multi-skill

		// null skill : just count
		if( k < 0 ) {
            task.N_null++;
            if(task.first_null_skill==-1) task.first_null_skill = t; // update once
            task.last_null_skill = t; // update always
			continue;
		}
	}

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x1, -0x19(%rbp)
cmpl $0x0, 0x224f5(%rip)     # 0x27380
jne 0x4ea4
movq -0x10(%rbp), %rdi
leaq 0x22470(%rip), %rsi     # 0x27308
callq 0xf060
andb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x4eb9
movq -0x10(%rbp), %rdi
leaq 0x22459(%rip), %rsi     # 0x27308
callq 0x11110
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x4ec8
movb $0x0, -0x1(%rbp)
jmp 0x4f62
movl $0x0, -0x20(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x22d21(%rip), %eax     # 0x27c00
jge 0x4f5e
movsbl 0x22d40(%rip), %eax     # 0x27c28
cmpl $0x0, %eax
jne 0x4f00
movq 0x22cac(%rip), %rax     # 0x27ba0
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
jmp 0x4f1c
movq 0x22ca1(%rip), %rax     # 0x27ba8
movq 0x22caa(%rip), %rcx     # 0x27bb8
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x4f4e
movl 0x22cf4(%rip), %eax     # 0x27c1c
addl $0x1, %eax
movl %eax, 0x22ceb(%rip)     # 0x27c1c
cmpl $-0x1, 0x22ce8(%rip)    # 0x27c20
jne 0x4f43
movl -0x20(%rbp), %eax
movl %eax, 0x22cdd(%rip)     # 0x27c20
movl -0x20(%rbp), %eax
movl %eax, 0x22cd8(%rip)     # 0x27c24
jmp 0x4f50
jmp 0x4f50
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4ed6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::CFramework()
CFramework::CFramework() {
  PRINT_VERBOSE("CFramework created\n");
  CFramework::CFramework_verbose = false;
  this->unique_index_counter = 1;
  CFramework::CFramework_ref = this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
leaq 0xf475(%rip), %rax      # 0x12c90
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x20(%rbp)
callq 0x42e0
testb $0x1, 0xfaf3(%rip)      # 0x13329
je 0x3861
leaq 0x97c5(%rip), %rdi      # 0xd004
xorl %eax, %eax
callq 0x3070
jmp 0x3848
jmp 0x3861
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x4300
jmp 0x3880
movq -0x28(%rbp), %rax
movb $0x0, 0xfabd(%rip)      # 0x13329
movl $0x1, 0x38(%rax)
movq %rax, 0xfab6(%rip)      # 0x13330
addq $0x30, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x3560
nopl (%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::~CFramework()
CFramework::~CFramework() {
  PRINT_VERBOSE("Cleaning up %d matrices\n", (int)this->mmatrices.size());
  //
  if (CFramework_verbose)
    this->print_matrix_list();
  //
  while (this->mmatrices.size() != 0) {
    map<int, MatrixInfo*>::iterator it = this->mmatrices.begin();
    MatrixInfo *matrix_info = it->second;
    this->delete_matrix(matrix_info->id);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xf3e5(%rip), %rcx      # 0x12c90
addq $0x10, %rcx
movq %rcx, (%rax)
testb $0x1, 0xfa70(%rip)      # 0x13329
je 0x38dc
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x4320
movl %eax, %esi
leaq 0x9747(%rip), %rdi      # 0xd018
xorl %eax, %eax
callq 0x3070
jmp 0x38da
jmp 0x38dc
testb $0x1, 0xfa46(%rip)      # 0x13329
je 0x38f2
movq -0x20(%rbp), %rdi
callq 0x3960
jmp 0x38f0
jmp 0x38f2
jmp 0x38f4
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x4320
cmpq $0x0, %rax
je 0x393d
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x4350
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x4380
movq -0x20(%rbp), %rdi
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x3a30
jmp 0x393b
jmp 0x38f4
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x4300
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x4340
nopl (%rax,%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::print_matrix_list()
void CFramework::print_matrix_list() {
  printf("\nFramework matrix list (%d matrices):\n", (int)this->mmatrices.size());
  printf("--------------------------------------------\n");
  map<int, MatrixInfo*>::iterator end = this->mmatrices.end(); 
  int i = 1;
  for (map<int, MatrixInfo*>::iterator it = this->mmatrices.begin(); it != end; ++it) {
    MatrixInfo *matrix_info = it->second;
    printf("%d) Matrix M_%d data at %p\n", i, matrix_info->id, matrix_info->data);
    i++;
  }
  printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x8, %rdi
callq 0x4320
movl %eax, %esi
leaq 0x96ab(%rip), %rdi      # 0xd031
movb $0x0, %al
callq 0x3070
leaq 0x96c4(%rip), %rdi      # 0xd058
movb $0x0, %al
callq 0x3070
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x43a0
movq -0x30(%rbp), %rdi
movq %rax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
addq $0x8, %rdi
callq 0x4350
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x43d0
testb $0x1, %al
jne 0x39d7
jmp 0x3a1c
leaq -0x20(%rbp), %rdi
callq 0x4380
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x9685(%rip), %rdi      # 0xd086
movb $0x0, %al
callq 0x3070
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4400
jmp 0x39c4
leaq 0xa0c9(%rip), %rdi      # 0xdaec
movb $0x0, %al
callq 0x3070
addq $0x30, %rsp
popq %rbp
retq
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::delete_matrix(int)
void CFramework::delete_matrix(int id) {
  MatrixInfo *matrix_info = CFramework::find_matrix(id);
  if (matrix_info == NULL) {
    PRINT_ERROR("matrix M_%d not in memory!\n", id);
    exit(-1);
  }
  PRINT_VERBOSE("Deleting matrix M_%d at %p, data at %p\n", id, matrix_info, matrix_info->data);
  delete[] matrix_info->data;
  this->mmatrices.erase(id);
  delete matrix_info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %esi
callq 0x3dc0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3aa3
movq 0xf557(%rip), %rax      # 0x12fb8
movq (%rax), %rdi
leaq 0x965e(%rip), %rsi      # 0xd0c9
movl $0x6e, %edx
leaq 0x966b(%rip), %rcx      # 0xd0e2
movb $0x0, %al
callq 0x3470
movq 0xf533(%rip), %rax      # 0x12fb8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x966b(%rip), %rsi      # 0xd0fd
movb $0x0, %al
callq 0x3470
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x33e0
testb $0x1, 0xf87f(%rip)      # 0x13329
je 0x3ac9
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x9657(%rip), %rdi      # 0xd119
movb $0x0, %al
callq 0x3070
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x3ae4
movq -0x28(%rbp), %rdi
callq 0x3440
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq -0xc(%rbp), %rsi
callq 0x45d0
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x3b0d
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::create_matrix(int, int*, int&)
float *CFramework::create_matrix(int num_dims, int *N, int &out_id) {
  int product_dims = 1;
  for (int i = 0; i < num_dims; i++)
    product_dims *= N[i];

  float *data = new float[product_dims];
  int id = this->unique_index_counter++;
  MatrixInfo *matrix_info = new MatrixInfo(id, num_dims, N, data);
  this->mmatrices[id] = matrix_info;
  out_id = id;

  PRINT_VERBOSE("Created matrix M_%d at %p, data at %p\n", id, matrix_info, matrix_info->data);
  return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x1, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3c32
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
imull -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3c0d
movslq -0x24(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3030
movq -0x58(%rbp), %rcx
movq %rax, -0x30(%rbp)
movl 0x38(%rcx), %eax
movl %eax, %edx
incl %edx
movl %edx, 0x38(%rcx)
movl %eax, -0x34(%rbp)
movl $0x20, %edi
callq 0x32f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movl -0x34(%rbp), %esi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x4430
jmp 0x3c8f
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
addq $0x8, %rdi
leaq -0x34(%rbp), %rsi
callq 0x44f0
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
testb $0x1, 0xf662(%rip)      # 0x13329
je 0x3d04
movl -0x34(%rbp), %esi
movq -0x40(%rbp), %rdx
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x93c3(%rip), %rdi      # 0xd0a2
movb $0x0, %al
callq 0x3070
jmp 0x3d04
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x20, %esi
callq 0x3300
jmp 0x3d0e
movq -0x30(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3560
nopw (%rax,%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::find_matrix(int)
MatrixInfo *CFramework::find_matrix(int id) {
  if (this->mmatrices.find(id) != this->mmatrices.end())
    return this->mmatrices[id];
  else
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x8, %rdi
leaq -0x14(%rbp), %rsi
callq 0x4600
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
callq 0x43a0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x43d0
testb $0x1, %al
jne 0x3e0c
jmp 0x3e26
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
leaq -0x14(%rbp), %rsi
callq 0x44f0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e2e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::find_matrix(float*)
int CFramework::find_matrix(float *data) {
  map<int, MatrixInfo*>::iterator end = this->mmatrices.end(); 
  for (map<int, MatrixInfo*>::iterator it = this->mmatrices.begin(); it != end; ++it) {
    MatrixInfo *matrix_info = it->second;
    if (matrix_info->data == data)
      return matrix_info->id;
  }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x8, %rdi
callq 0x43a0
movq -0x38(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
callq 0x4350
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x43d0
testb $0x1, %al
jne 0x3e89
jmp 0x3ec1
leaq -0x28(%rbp), %rdi
callq 0x4380
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x3eb4
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3ec8
jmp 0x3eb6
leaq -0x28(%rbp), %rdi
callq 0x4400
jmp 0x3e76
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::find_matrix_by_list_pos(int)
MatrixInfo *CFramework::find_matrix_by_list_pos(int pos) {
  map<int, MatrixInfo*>::iterator end = this->mmatrices.end(); 
  int i = 1;
  for (map<int, MatrixInfo*>::iterator it = this->mmatrices.begin(); it != end; ++it) {
    MatrixInfo *matrix_info = it->second;
    if (i == pos)
      return matrix_info;
    i++;
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x8, %rdi
callq 0x43a0
movq -0x40(%rbp), %rdi
movq %rax, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
addq $0x8, %rdi
callq 0x4350
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x43d0
testb $0x1, %al
jne 0x3f2f
jmp 0x3f66
leaq -0x30(%rbp), %rdi
callq 0x4380
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x3f52
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f6e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4400
jmp 0x3f1c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jpbalarini[P]otsus/./framework/CFramework.cpp
// Function: CFramework::save_matrix(MatrixInfo*, char*)
void CFramework::save_matrix(MatrixInfo *matrix, char *filename) {
  FILE *fp = fopen(filename, "wb");

  int num_elements = 1;
  for (int i = 0; i < matrix->num_dims; i++)
    num_elements *= matrix->N[i];

  fwrite(&matrix->num_dims, sizeof(matrix->num_dims), 1, fp);
  for (int i = 0; i < matrix->num_dims; i++)
    fwrite(&matrix->N[i], sizeof(matrix->N[0]), 1, fp);

  size_t written = fwrite(matrix->data, sizeof(matrix->data[0]), num_elements, fp);
  if (written != num_elements) {
    fprintf(stderr, "Write error!\n");
    exit(-1);
  }

  fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x91a2(%rip), %rsi      # 0xd141
callq 0x33c0
movq %rax, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x3fe3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
imull -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3fb6
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x35d0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x4042
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x35d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4005
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movslq -0x24(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x4, %esi
callq 0x35d0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpq %rcx, %rax
je 0x408f
movq 0xef44(%rip), %rax      # 0x12fb8
movq (%rax), %rdi
leaq 0x90c6(%rip), %rsi      # 0xd144
movb $0x0, %al
callq 0x3470
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x33e0
movq -0x20(%rbp), %rdi
callq 0x32e0
addq $0x40, %rsp
popq %rbp
retq
nop