LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: SpiritLooper[P]RDV_OBJRender/matrix.cpp
// Function: Matrix::identity(int)
Matrix Matrix::identity(int dimensions) {
    Matrix E(dimensions, dimensions);
    for (int i=0; i<dimensions; i++) {
        for (int j=0; j<dimensions; j++) {
            E[i][j] = (i==j ? 1.f : 0.f);
        }
    }
    return E;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb $0x0, -0xd(%rbp)
movl -0xc(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x2690
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x285f
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x284f
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x18(%rbp), %ecx
subl %ecx, %eax
movss 0xc822(%rip), %xmm0     # 0xf004
xorps %xmm1, %xmm1
movss %xmm1, -0x40(%rbp)
movss %xmm0, -0x3c(%rbp)
je 0x27fb
movss -0x40(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movl -0x44(%rbp), %esi
movq -0x38(%rbp), %rdi
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
callq 0x2890
movq %rax, -0x50(%rbp)
jmp 0x2817
movq -0x50(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x33c0
movss -0x54(%rbp), %xmm0
movss %xmm0, (%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x27c3
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x33e0
jmp 0x287c
jmp 0x2851
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x27b0
movb $0x1, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
jne 0x2872
movq -0x38(%rbp), %rdi
callq 0x33e0
movq -0x30(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/matrix.cpp
// Function: Matrix::operator*(Matrix const&)
Matrix Matrix::operator*(const Matrix& a) {
    assert(cols == a.rows);
    Matrix result(rows, a.cols);
    for (int i=0; i<rows; i++) {
        for (int j=0; j<a.cols; j++) {
            result.m[i][j] = 0.f;
            for (int k=0; k<cols; k++) {
                result.m[i][j] += m[i][k]*a.m[k][j];
            }
        }
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl 0x1c(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0x2935
jmp 0x2954
leaq 0xc718(%rip), %rdi      # 0xf054
leaq 0xc6d4(%rip), %rsi      # 0xf017
movl $0x1d, %edx
leaq 0xc714(%rip), %rcx      # 0xf063
callq 0x2160
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movb $0x0, -0x19(%rbp)
movl 0x18(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edx
callq 0x2690
movl $0x0, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x2a79
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x2a69
movq -0x40(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x3400
movq %rax, %rdi
movslq -0x24(%rbp), %rsi
callq 0x33c0
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movl $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x2a59
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x3400
movq %rax, %rdi
movslq -0x28(%rbp), %rsi
callq 0x33c0
movss (%rax), %xmm0
movss %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3420
movq %rax, %rdi
movslq -0x24(%rbp), %rsi
callq 0x3440
movq -0x40(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x44(%rbp)
movslq -0x20(%rbp), %rsi
callq 0x3400
movq %rax, %rdi
movslq -0x24(%rbp), %rsi
callq 0x33c0
movss -0x48(%rbp), %xmm0
movss -0x44(%rbp), %xmm2
movss (%rax), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x29c4
jmp 0x2a5b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x298d
jmp 0x2a6b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2976
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x2a8c
movq -0x40(%rbp), %rdi
callq 0x33e0
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/matrix.cpp
// Function: Matrix::transpose()
Matrix Matrix::transpose() {
    Matrix result(cols, rows);
    for(int i=0; i<rows; i++)
        for(int j=0; j<cols; j++)
            result[j][i] = m[i][j];
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x0, -0x11(%rbp)
movl 0x1c(%rax), %esi
movl 0x18(%rax), %edx
callq 0x2690
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x2b53
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x2b46
movq -0x28(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x3400
movq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x33c0
movq -0x38(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movl -0x1c(%rbp), %esi
callq 0x2890
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x33c0
movss -0x3c(%rbp), %xmm0
movss %xmm0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2aec
jmp 0x2b48
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2ad9
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x2b66
movq -0x38(%rbp), %rdi
callq 0x33e0
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: SpiritLooper[P]RDV_OBJRender/matrix.cpp
// Function: operator<<(std::ostream&, Matrix&)
std::ostream& operator<<(std::ostream& s, Matrix& m) {
    for (int i=0; i<m.nrows(); i++)  {
        for (int j=0; j<m.ncols(); j++) {
            s << m[i][j];
            if (j<m.ncols()-1) s << "\t";
        }
        s << "\n";
    }
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3460
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jge 0x31d5
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3480
movl %eax, %ecx
movl -0x20(%rbp), %eax
cmpl %ecx, %eax
jge 0x31b7
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2890
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x33c0
movq -0x30(%rbp), %rdi
movss (%rax), %xmm0
callq 0x2190
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3480
movl %eax, %ecx
movl -0x24(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x31aa
movq -0x8(%rbp), %rdi
leaq 0xbf0b(%rip), %rsi      # 0xf0b0
callq 0x21f0
jmp 0x31ac
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x313a
movq -0x8(%rbp), %rdi
leaq 0xbef0(%rip), %rsi      # 0xf0b2
callq 0x21f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3117
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: SpiritLooper[P]RDV_OBJRender/camera.cpp
// Function: Camera::translate(float, float, float)
Matrix Camera::translate(float x, float y , float z) {
    Matrix R = Matrix::identity(4);

    R[0][3] = x;
    R[1][3] = y;
    R[2][3] = z;

    return R;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movss %xmm1, -0x18(%rbp)
movss %xmm2, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movl $0x4, %esi
callq 0x2780
movq -0x48(%rbp), %rdi
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
xorl %esi, %esi
callq 0x2890
movq %rax, -0x38(%rbp)
jmp 0x4e93
movq -0x38(%rbp), %rdi
movl $0x3, %esi
callq 0x33c0
movss -0x3c(%rbp), %xmm0
movq -0x48(%rbp), %rdi
movss %xmm0, (%rax)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
movl $0x1, %esi
callq 0x2890
movq %rax, -0x58(%rbp)
jmp 0x4ec8
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x33c0
movss -0x5c(%rbp), %xmm0
movq -0x48(%rbp), %rdi
movss %xmm0, (%rax)
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movl $0x2, %esi
callq 0x2890
movq %rax, -0x68(%rbp)
jmp 0x4efd
movq -0x68(%rbp), %rdi
movl $0x3, %esi
callq 0x33c0
movss -0x6c(%rbp), %xmm0
movss %xmm0, (%rax)
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x4f40
jmp 0x4f37
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x33e0
jmp 0x4f4a
movq -0x48(%rbp), %rdi
callq 0x33e0
movq -0x50(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/camera.cpp
// Function: Camera::v2m(Vec3<float>)
Matrix Camera::v2m(Vec3f v) {
    Matrix m(4,1);
    for (int i = 0; i < 3; i++)
    {
        m[i][0] = v[i];
    }
    m[3][0] = 1.;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movlpd %xmm0, -0x24(%rbp)
movss %xmm1, -0x1c(%rbp)
movq -0x24(%rbp), %rax
movq %rax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
movq %rsi, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movl $0x4, %esi
movl $0x1, %edx
callq 0x2690
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x5020
movslq -0x38(%rbp), %rsi
leaq -0x14(%rbp), %rdi
callq 0x5c40
movq %rax, -0x60(%rbp)
jmp 0x4fc9
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x6c(%rbp)
movl -0x38(%rbp), %esi
callq 0x2890
movq %rax, -0x68(%rbp)
jmp 0x4fe8
movq -0x68(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33c0
movss -0x6c(%rbp), %xmm0
movss %xmm0, (%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x4fb0
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x33e0
jmp 0x506d
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x2890
movq %rax, -0x78(%rbp)
jmp 0x5034
movq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33c0
movss 0x9fbb(%rip), %xmm0     # 0xf004
movss %xmm0, (%rax)
movb $0x1, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x5060
movq -0x58(%rbp), %rdi
callq 0x33e0
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/camera.cpp
// Function: Camera::camera_transform(Vec3<float>)
Vec3f Camera::camera_transform(Vec3f p) {
    Matrix res = ViewPort;
    Matrix ModelView = lookat();

    if (mode == PERSPECTIVE)
    {
        res = res * Projection;
    }

    return m2v(res * ModelView * v2m(p));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movlpd %xmm0, -0x30(%rbp)
movss %xmm1, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x38(%rbp)
movq -0x38(%rbp), %rsi
movq %rsi, -0x150(%rbp)
addq $0x28, %rsi
leaq -0x58(%rbp), %rdi
callq 0x5e40
movq -0x150(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x5080
jmp 0x5451
movq -0x150(%rbp), %rax
cmpl $0x1, 0x68(%rax)
jne 0x54c1
movq -0x150(%rbp), %rdx
addq $0x48, %rdx
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2900
jmp 0x547b
leaq -0x58(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x5bc0
leaq -0xa8(%rbp), %rdi
callq 0x33e0
jmp 0x54c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x565e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5655
leaq -0xe8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x2900
jmp 0x54d7
movq -0x150(%rbp), %rsi
movl -0x18(%rbp), %eax
movl %eax, -0x110(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x110(%rbp), %eax
movl %eax, -0x120(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x128(%rbp)
movsd -0x128(%rbp), %xmm0
movss -0x120(%rbp), %xmm1
leaq -0x108(%rbp), %rdi
callq 0x4f60
jmp 0x552a
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x108(%rbp), %rdx
callq 0x2900
jmp 0x5546
movq -0x150(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x4cd0
movss %xmm1, -0x164(%rbp)
movaps %xmm0, -0x160(%rbp)
jmp 0x556a
movss -0x164(%rbp), %xmm0
movaps -0x160(%rbp), %xmm1
movlpd %xmm1, -0x138(%rbp)
movss %xmm0, -0x130(%rbp)
movl -0x130(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x33e0
leaq -0x108(%rbp), %rdi
callq 0x33e0
leaq -0xe8(%rbp), %rdi
callq 0x33e0
leaq -0x78(%rbp), %rdi
callq 0x33e0
leaq -0x58(%rbp), %rdi
callq 0x33e0
movl -0x8(%rbp), %eax
movl %eax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x148(%rbp)
movsd -0x148(%rbp), %xmm0
movss -0x140(%rbp), %xmm1
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5649
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x563d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x33e0
leaq -0x108(%rbp), %rdi
callq 0x33e0
leaq -0xe8(%rbp), %rdi
callq 0x33e0
leaq -0x78(%rbp), %rdi
callq 0x33e0
leaq -0x58(%rbp), %rdi
callq 0x33e0
movq -0x80(%rbp), %rdi
callq 0x2380
// File: SpiritLooper[P]RDV_OBJRender/image.cpp
// Function: Image::exportPPM()
void Image::exportPPM() {
    std::ofstream ofs;
    ofs.open("./out.ppm");
    ofs << "P6" << std::endl << width << " " << height << std::endl << "255" << std::endl;
    for (int i = 0; i < width * height; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            ofs << (char)(255 * std::max(0.f, std::min(1.f , framebuffer[i][j]) ) );
        }
    }
    ofs.close();   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x208(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x2360
movq -0x230(%rbp), %rdi
leaq 0x8aed(%rip), %rsi      # 0xf168
movl $0x10, %edx
callq 0x2050
jmp 0x6687
leaq 0x8ae4(%rip), %rsi      # 0xf172
leaq -0x208(%rbp), %rdi
callq 0x21f0
movq %rax, -0x240(%rbp)
jmp 0x66a3
movq -0x240(%rbp), %rdi
movq 0xf917(%rip), %rsi      # 0x15fc8
callq 0x2220
movq %rax, -0x248(%rbp)
jmp 0x66bf
movq -0x248(%rbp), %rdi
movq -0x238(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x2370
movq %rax, -0x250(%rbp)
jmp 0x66de
movq -0x250(%rbp), %rdi
leaq 0x8a9e(%rip), %rsi      # 0xf18a
callq 0x21f0
movq %rax, -0x258(%rbp)
jmp 0x66fa
movq -0x258(%rbp), %rdi
movq -0x238(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0x2370
movq %rax, -0x260(%rbp)
jmp 0x6719
movq -0x260(%rbp), %rdi
movq 0xf8a1(%rip), %rsi      # 0x15fc8
callq 0x2220
movq %rax, -0x268(%rbp)
jmp 0x6735
movq -0x268(%rbp), %rdi
leaq 0x8a32(%rip), %rsi      # 0xf175
callq 0x21f0
movq %rax, -0x270(%rbp)
jmp 0x6751
movq -0x270(%rbp), %rdi
movq 0xf869(%rip), %rsi      # 0x15fc8
callq 0x2220
jmp 0x6766
movl $0x0, -0x218(%rbp)
movq -0x238(%rbp), %rdx
movl -0x218(%rbp), %eax
movl 0x18(%rdx), %ecx
imull 0x1c(%rdx), %ecx
cmpl %ecx, %eax
jge 0x6892
movl $0x0, -0x21c(%rbp)
cmpl $0x3, -0x21c(%rbp)
jge 0x687c
movq -0x238(%rbp), %rdi
movl $0x0, -0x220(%rbp)
movl $0x3f800000, -0x224(%rbp) # imm = 0x3F800000
movslq -0x218(%rbp), %rsi
callq 0x6ff0
movq %rax, %rdi
movslq -0x21c(%rbp), %rsi
callq 0x5c40
movq %rax, -0x278(%rbp)
jmp 0x67e2
movq -0x278(%rbp), %rsi
leaq -0x224(%rbp), %rdi
callq 0x6fb0
movq %rax, -0x280(%rbp)
jmp 0x67fe
movq -0x280(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x6f70
movq %rax, -0x288(%rbp)
jmp 0x681a
movq -0x288(%rbp), %rax
movss (%rax), %xmm0
movss 0x892b(%rip), %xmm1     # 0xf158
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movsbl %al, %esi
leaq -0x208(%rbp), %rdi
callq 0x2280
jmp 0x6846
jmp 0x6848
movl -0x21c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x21c(%rbp)
jmp 0x6796
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x2310
jmp 0x68b5
jmp 0x687e
movl -0x218(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x218(%rbp)
jmp 0x6770
leaq -0x208(%rbp), %rdi
callq 0x22f0
jmp 0x68a0
leaq -0x208(%rbp), %rdi
callq 0x2310
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x210(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/image.cpp
// Function: Image::setPixel(int, int, Vec3<float>)
void Image::setPixel(const int x, const int y, Vec3f color) {
    for (int i = 0; i < 3; i++)
    {
        if(color[i] > 1.) 
            color[i] = 1.;
        
        if( color[i] < 0. )
            color[i] = 0.;
    }
    

    if( 0 <= x && x < width && 0 <= y && y < height )
        framebuffer[x + y * width] = color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movlpd %xmm0, -0x1c(%rbp)
movss %xmm1, -0x14(%rbp)
movq -0x1c(%rbp), %rax
movq %rax, -0xc(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movl %edx, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x698d
movslq -0x34(%rbp), %rsi
leaq -0xc(%rbp), %rdi
callq 0x5c40
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x8834(%rip), %xmm1     # 0xf160
ucomisd %xmm1, %xmm0
jbe 0x694b
movslq -0x34(%rbp), %rsi
leaq -0xc(%rbp), %rdi
callq 0x5c40
movss 0x86bd(%rip), %xmm0     # 0xf004
movss %xmm0, (%rax)
movslq -0x34(%rbp), %rsi
leaq -0xc(%rbp), %rdi
callq 0x5c40
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x697d
movslq -0x34(%rbp), %rsi
leaq -0xc(%rbp), %rdi
callq 0x5c40
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
jmp 0x697f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6909
xorl %eax, %eax
cmpl -0x2c(%rbp), %eax
jg 0x69d8
movq -0x40(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x69d8
xorl %eax, %eax
cmpl -0x30(%rbp), %eax
jg 0x69d8
movq -0x40(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x69d8
movq -0x40(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl -0x30(%rbp), %ecx
imull 0x18(%rdi), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x6ff0
movq -0xc(%rbp), %rcx
movq %rcx, (%rax)
movl -0x4(%rbp), %ecx
movl %ecx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop
// File: SpiritLooper[P]RDV_OBJRender/image.cpp
// Function: Image::flip(int)
void Image::flip(const int type) {
   std::vector<Vec3f> framebuffer_tmp(width * height);

    for (int x = 0; x < width; x++)
    {
        for (int y = 0; y < height; y++)
        {
            if ( type ==  HORIZONTAL_FLIP ) {
                framebuffer_tmp[ x + y * width ] = framebuffer[ ( width - 1 - x ) + ( y ) * width ];
            } else {
                framebuffer_tmp[ x + y * width ] = framebuffer[ x + (height - 1 - y ) * width ];
            }
        }
    }
    
    framebuffer = framebuffer_tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movl 0x18(%rcx), %eax
movl 0x1c(%rcx), %ecx
imull %ecx, %eax
cltq
movq %rax, -0x58(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x6e60
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x28(%rbp), %rdi
callq 0x6e80
jmp 0x6ac6
leaq -0x29(%rbp), %rdi
callq 0x6ef0
movl $0x0, -0x40(%rbp)
movq -0x60(%rbp), %rcx
movl -0x40(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x6bdb
movl $0x0, -0x44(%rbp)
movq -0x60(%rbp), %rcx
movl -0x44(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x6bcb
cmpl $0x1, -0xc(%rbp)
jne 0x6b6d
movq -0x60(%rbp), %rdi
movl 0x18(%rdi), %eax
subl $0x1, %eax
subl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
imull 0x18(%rdi), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x6ff0
movq -0x60(%rbp), %rdx
movq %rax, -0x68(%rbp)
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
imull 0x18(%rdx), %ecx
addl %ecx, %eax
movslq %eax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x6ff0
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
jmp 0x6bbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x6ef0
jmp 0x6c0e
movq -0x60(%rbp), %rdi
movl -0x40(%rbp), %eax
movl 0x1c(%rdi), %ecx
subl $0x1, %ecx
subl -0x44(%rbp), %ecx
imull 0x18(%rdi), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x6ff0
movq -0x60(%rbp), %rdx
movq %rax, -0x70(%rbp)
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
imull 0x18(%rdx), %ecx
addl %ecx, %eax
movslq %eax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x6ff0
movq -0x70(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
jmp 0x6bbd
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x6aed
jmp 0x6bcd
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x6ad6
movq -0x60(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7010
jmp 0x6bea
leaq -0x28(%rbp), %rdi
callq 0x6f10
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x6f10
movq -0x38(%rbp), %rdi
callq 0x2380
nopw (%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/image.cpp
// Function: Image::getPixel(int, int)
Vec3f Image::getPixel(const int x, const int y) {
    if( 0 <= x && x < width && 0 <= y && y < height )
        return framebuffer[x + y * width];
    else 
        return Vec3f(0,0,0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpl -0x1c(%rbp), %eax
jg 0x6c87
movq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x6c87
xorl %eax, %eax
cmpl -0x20(%rbp), %eax
jg 0x6c87
movq -0x38(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x6c87
movq -0x38(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
imull 0x18(%rdi), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x6ff0
movq (%rax), %rcx
movq %rcx, -0xc(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x6c99
leaq -0xc(%rbp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x5c00
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/image.cpp
// Function: Image::fusionner(Image&)
Image Image::fusionner(Image& i) {
    Image res(width, height);

    for (int j = 0; j < width * height; j++)
    {
        res.setPixel(j % width, j / width , Vec3f( framebuffer[j].x + i.framebuffer[j].x, 
                                                  framebuffer[j].y + i.framebuffer[j].y,                                  
                                                  framebuffer[j].z + i.framebuffer[j].z                                  
                                                ) );
    }
    
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x19(%rbp)
movl 0x18(%rax), %esi
movl 0x1c(%rax), %edx
callq 0x6550
movl $0x0, -0x20(%rbp)
movq -0x58(%rbp), %rdx
movl -0x20(%rbp), %eax
movl 0x18(%rdx), %ecx
imull 0x1c(%rdx), %ecx
cmpl %ecx, %eax
jge 0x6e2d
movq -0x58(%rbp), %rdi
movslq -0x20(%rbp), %rsi
movl %esi, %eax
movl 0x18(%rdi), %ecx
cltd
idivl %ecx
movl %edx, -0x84(%rbp)
movl %eax, -0x80(%rbp)
callq 0x6ff0
movss (%rax), %xmm0
movss %xmm0, -0x7c(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6ff0
movss -0x7c(%rbp), %xmm0
movq -0x58(%rbp), %rdi
movss (%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movslq -0x20(%rbp), %rsi
callq 0x6ff0
movss 0x4(%rax), %xmm0
movss %xmm0, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6ff0
movss -0x78(%rbp), %xmm0
movq -0x58(%rbp), %rdi
movss 0x4(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
movslq -0x20(%rbp), %rsi
callq 0x6ff0
movss 0x8(%rax), %xmm0
movss %xmm0, -0x74(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x6ff0
movss -0x74(%rbp), %xmm2
movss -0x70(%rbp), %xmm0
movss -0x6c(%rbp), %xmm1
movss 0x8(%rax), %xmm3
addss %xmm3, %xmm2
leaq -0x2c(%rbp), %rdi
callq 0x5c00
jmp 0x6dda
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %esi
movq -0x68(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x2c(%rbp), %rax
movq %rax, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movss -0x48(%rbp), %xmm1
callq 0x68d0
jmp 0x6e06
jmp 0x6e08
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x6d00
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x65e0
jmp 0x6e4d
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x6e40
movq -0x68(%rbp), %rdi
callq 0x65e0
movq -0x60(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
// File: SpiritLooper[P]RDV_OBJRender/model.cpp
// Function: Model::get_bbox(Vec3<float>&, Vec3<float>&)
void Model::get_bbox(Vec3f &min, Vec3f &max) {
    min = max = verts_[0];
    for (int i = 1; i < (int)verts_.size(); i++)
    {
        for (int j = 0; j < 3; j++)
        {
            min[j] = std::min(min[j],verts_[i][j] );
            max[j] = std::max(max[j],verts_[i][j] );
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x6ff0
movq -0x18(%rbp), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
movq -0x10(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movl $0x1, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
callq 0x78d0
movq %rax, %rcx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jge 0x8e52
movl $0x0, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0x8e42
movq -0x10(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x5c40
movq -0x28(%rbp), %rdi
movq %rax, -0x48(%rbp)
movslq -0x1c(%rbp), %rsi
callq 0x6ff0
movq %rax, %rdi
movslq -0x20(%rbp), %rsi
callq 0x5c40
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x6fb0
movss (%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x5c40
movss -0x3c(%rbp), %xmm0
movss %xmm0, (%rax)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x5c40
movq -0x28(%rbp), %rdi
movq %rax, -0x38(%rbp)
movslq -0x1c(%rbp), %rsi
callq 0x6ff0
movq %rax, %rdi
movslq -0x20(%rbp), %rsi
callq 0x5c40
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x6f70
movss (%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x5c40
movss -0x30(%rbp), %xmm0
movss %xmm0, (%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8d80
jmp 0x8e44
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8d5c
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/array-parms4.cc
// Function: main
int main()
{
	int a1[] = {0,1,2,3,4,5,6,7,8,9};
	int a2[] = {1,3,5};
	string a3[4];

	print(a1);  // instantiates print(int (&arr)[10])

	print(a2);  // instantiates print(int (&arr)[3])

	print(a3);  // instantiates print(string (&arr)[42])

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl $0x0, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
leaq 0xde3(%rip), %rsi       # 0x2010
movl $0x28, %edx
callq 0x1050
movq 0xdfa(%rip), %rax       # 0x2038
movq %rax, -0x3c(%rbp)
movl 0xdf8(%rip), %eax       # 0x2040
movl %eax, -0x34(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, %rcx
addq $0x80, %rcx
movq %rcx, -0xe0(%rbp)
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x1090
movq -0xe8(%rbp), %rax
movq -0xe0(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0xd8(%rbp)
jne 0x126a
leaq -0x30(%rbp), %rdi
callq 0x1390
jmp 0x12a6
leaq -0x3c(%rbp), %rdi
callq 0x1400
jmp 0x12b1
leaq -0xc0(%rbp), %rdi
callq 0x1470
jmp 0x12bf
movl $0x0, -0x4(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0xf8(%rbp)
addq $0x80, %rax
movq %rax, -0xf0(%rbp)
jmp 0x1312
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0x108(%rbp)
addq $0x80, %rax
movq %rax, -0x100(%rbp)
jmp 0x134f
movq -0xf0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x110(%rbp)
callq 0x1040
movq -0xf8(%rbp), %rcx
movq -0x110(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xf0(%rbp)
jne 0x1312
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x100(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x118(%rbp)
callq 0x1040
movq -0x108(%rbp), %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x100(%rbp)
jne 0x134f
jmp 0x1382
movq -0xc8(%rbp), %rdi
callq 0x10c0
nop
// File: sile[P]mphf/mphf.cc
// Function: main
int main(int argc, char** argv) {
  if(argc != 2) {
    std::cerr << "Usage: mphf <index>" << std::endl;
    return 1;
  }

  const char* index_filepath = argv[1];
  
  MPHF::Hash hash(index_filepath);
  if(!hash) {
    std::cerr << "Can't open file: " << index_filepath << std::endl;
    return 1;
  }

  std::string line;

  while(std::getline(std::cin, line)) 
    std::cout << hash.mphf(line.c_str()) << std::endl;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x12ed
movq 0x2d2a(%rip), %rdi      # 0x3ff0
leaq 0xd37(%rip), %rsi       # 0x2004
callq 0x10a0
movq %rax, %rdi
movq 0x2cdc(%rip), %rsi      # 0x3fb8
callq 0x10d0
movl $0x1, -0x4(%rbp)
jmp 0x147d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x14a0
movq -0x90(%rbp), %rdi
callq 0x14d0
movb %al, -0x81(%rbp)
jmp 0x1321
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x139b
jmp 0x132d
movq 0x2cbc(%rip), %rdi      # 0x3ff0
leaq 0xcdd(%rip), %rsi       # 0x2018
callq 0x10a0
movq %rax, -0x98(%rbp)
jmp 0x1349
movq -0x98(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10a0
movq %rax, -0xa0(%rbp)
jmp 0x1362
movq -0xa0(%rbp), %rdi
movq 0x2c48(%rip), %rsi      # 0x3fb8
callq 0x10d0
jmp 0x1377
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x1467
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1472
leaq -0x80(%rbp), %rdi
callq 0x1100
movq 0x2c2d(%rip), %rdi      # 0x3fd8
leaq -0x80(%rbp), %rsi
callq 0x1030
movq %rax, -0xa8(%rbp)
jmp 0x13bd
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x10e0
movb %al, -0xa9(%rbp)
jmp 0x13db
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x13e7
jmp 0x1450
leaq -0x80(%rbp), %rdi
callq 0x1040
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x14f0
movl %eax, -0xb0(%rbp)
jmp 0x1404
movl -0xb0(%rbp), %esi
movq 0x2bb7(%rip), %rdi      # 0x3fc8
callq 0x10f0
movq %rax, -0xb8(%rbp)
jmp 0x141f
movq -0xb8(%rbp), %rdi
movq 0x2b8b(%rip), %rsi      # 0x3fb8
callq 0x10d0
jmp 0x1434
jmp 0x13a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x1070
jmp 0x1472
movl $0x0, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x1070
leaq -0x50(%rbp), %rdi
callq 0x1530
jmp 0x147d
leaq -0x50(%rbp), %rdi
callq 0x1530
jmp 0x1489
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x1130
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/main.cpp
// Function: SanitizeInput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void SanitizeInput(string& s)
{
   // Questa funzione permette la stampa sul terminale corretta dell'output dell'arduino
   for(int i=0; i<s.length(); i++)
      if(s[i]=='\t')
         s[i]='\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3410
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x4c92
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0x3540
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x4c85
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0x3540
movb $0xa, (%rax)
jmp 0x4c87
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4c43
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/main.cpp
// Function: isBitStreamInstruction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool isBitStreamInstruction(string instr)
{
      string s = instr.substr(0, 100);

      istringstream iss(s);
      string tmp;
      long int n;

      iss >> tmp;

      if(tmp != "SDR")
            return false;

      iss >> n;

      if(n < 1000)
            return false;
      
      return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rsi
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
movl $0x64, %ecx
callq 0x32b0
movq -0x1f8(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
movl $0x8, %edx
callq 0x3460
jmp 0x4f25
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x33a0
movq -0x200(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x3370
jmp 0x4f4d
leaq 0x5683(%rip), %rsi      # 0xa5d7
leaq -0x1e0(%rbp), %rdi
callq 0x5580
movb %al, -0x201(%rbp)
jmp 0x4f68
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x4f74
jmp 0x4fca
movb $0x0, -0x1(%rbp)
movl $0x1, -0x1ec(%rbp)
jmp 0x500a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
jmp 0x5039
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3190
leaq -0x1b0(%rbp), %rdi
callq 0x3100
jmp 0x5039
leaq -0x1b0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x3160
jmp 0x4fdf
cmpq $0x3e8, -0x1e8(%rbp) # imm = 0x3E8
jge 0x4ffc
movb $0x0, -0x1(%rbp)
movl $0x1, -0x1ec(%rbp)
jmp 0x500a
movb $0x1, -0x1(%rbp)
movl $0x1, -0x1ec(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3190
leaq -0x1b0(%rbp), %rdi
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x3190
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x3190
movq -0x1b8(%rbp), %rdi
callq 0x34a0
nop
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/main.cpp
// Function: ExtractAnswer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string ExtractAnswer(string line)
{
      istringstream iss(line);
      string str;
      iss >> str;
      iss >> str;
      iss >> str;

      return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x1b0(%rbp)
movq %rdi, %rax
movq %rax, -0x1c0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
movl $0x8, %edx
callq 0x3460
movq -0x1b0(%rbp), %rdi
movb $0x0, -0x191(%rbp)
callq 0x33a0
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
callq 0x3370
jmp 0x53c4
movq -0x1b0(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x3370
jmp 0x53d9
movq -0x1b0(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x3370
jmp 0x53ee
movb $0x1, -0x191(%rbp)
testb $0x1, -0x191(%rbp)
jne 0x5438
jmp 0x542c
movq -0x1b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3100
jmp 0x5454
movq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3100
movq -0x1c0(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq -0x1a0(%rbp), %rdi
callq 0x34a0
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/serial.cpp
// Function: Serial::WriteString(char const*)
void Serial::WriteString(const char *String)
{
   int length=strlen(String);
   if (write(fd,String,length)!=length)
   {
      throw ErrorWriteException();
   }
   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl (%rax), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x30a0
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
je 0x6fb0
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x28(%rbp), %rdi
callq 0x7760
movq -0x28(%rbp), %rdi
leaq 0x6cbc(%rip), %rsi      # 0xdc60
leaq 0x7f5(%rip), %rdx       # 0x77a0
callq 0x3490
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/serial.cpp
// Function: Serial::ReadChar(char*, unsigned int)
unsigned Serial::ReadChar(char *pByte, unsigned TimeOut_ms)
{
   // Timer per la gestione del timeout
   TimeOut Timer;
   Timer.InitTimer();
   while (Timer.ElapsedTime_ms()<TimeOut_ms || TimeOut_ms==0)
   {
      switch (read(fd,pByte,1))
      {
         case -1: throw ErrorReadException();
         case 1 : return 1;
      }
   }
   throw TimeoutException();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7690
leaq -0x28(%rbp), %rdi
callq 0x7160
leaq -0x28(%rbp), %rdi
callq 0x7180
movq %rax, %rcx
movl -0x14(%rbp), %eax
movl %eax, %edx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x31(%rbp)
jb 0x7092
cmpl $0x0, -0x14(%rbp)
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x709b
jmp 0x7117
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x33e0
movq %rax, %rcx
movq %rcx, -0x40(%rbp)
subq $-0x1, %rax
je 0x70ca
jmp 0x70be
movq -0x40(%rbp), %rax
subq $0x1, %rax
je 0x7107
jmp 0x7112
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x48(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x48(%rbp), %rdi
callq 0x77c0
movq -0x48(%rbp), %rdi
leaq 0x6b7d(%rip), %rsi      # 0xdc78
leaq 0x6fe(%rip), %rdx       # 0x7800
callq 0x3490
movl $0x1, %eax
addq $0x50, %rsp
popq %rbp
retq
jmp 0x706d
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x50(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x50(%rbp), %rdi
callq 0x7820
movq -0x50(%rbp), %rdi
leaq 0x6ad0(%rip), %rsi      # 0xdc18
leaq 0x711(%rip), %rdx       # 0x7860
callq 0x3490
nopw %cs:(%rax,%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/serial.cpp
// Function: TimeOut::ElapsedTime_ms()
unsigned long int TimeOut::ElapsedTime_ms()
{
   struct timeval CurrentTime;
   int sec,usec;
   gettimeofday(&CurrentTime, NULL);
   sec=CurrentTime.tv_sec-PreviousTime.tv_sec;
   usec=CurrentTime.tv_usec-PreviousTime.tv_usec;
   if (usec<0)
   {
      usec=1000000-PreviousTime.tv_usec+CurrentTime.tv_usec;
      sec--;
   }
   return sec*1000+usec/1000;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3440
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
subq (%rcx), %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
subq 0x8(%rcx), %rax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x71dd
movq -0x28(%rbp), %rcx
movl $0xf4240, %eax          # imm = 0xF4240
subq 0x8(%rcx), %rax
addq -0x10(%rbp), %rax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
imull $0x3e8, -0x1c(%rbp), %eax # imm = 0x3E8
movl %eax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, %ecx
movl -0x2c(%rbp), %eax
addl %ecx, %eax
cltq
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/serial.cpp
// Function: Serial::ReadStringNoTimeOut(char*, char, unsigned int)
unsigned Serial::ReadStringNoTimeOut(char *String, char FinalChar, unsigned MaxNbBytes)
{
   unsigned NbBytes=0;
   unsigned ret;
   while (NbBytes<MaxNbBytes)
   {
      ret=ReadChar(&String[NbBytes]);
      if (ret==1)
      {
         if (String[NbBytes]==FinalChar)
         {
            String[NbBytes]='\0';
            return NbBytes;
         }
         NbBytes++;
      }
      else
      {
         // Ramo superfluo in quanto l'eccezione verrebbe lanciata da ReadChar(...)
         // lasciato per facilitare un eventuale debug
         throw ErrorReadException();
      }
   }
   throw ErrorBufferFullException();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x72d5
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
addq %rax, %rsi
xorl %edx, %edx
callq 0x7040
movl %eax, -0x20(%rbp)
cmpl $0x1, -0x20(%rbp)
jne 0x7293
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x7288
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x72d0
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x30(%rbp), %rdi
callq 0x77c0
movq -0x30(%rbp), %rdi
leaq 0x69b4(%rip), %rsi      # 0xdc78
leaq 0x535(%rip), %rdx       # 0x7800
callq 0x3490
jmp 0x7237
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x38(%rbp), %rdi
callq 0x7880
movq -0x38(%rbp), %rdi
leaq 0x698a(%rip), %rsi      # 0xdc90
leaq 0x5b3(%rip), %rdx       # 0x78c0
callq 0x3490
nopw %cs:(%rax,%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/serial.cpp
// Function: Serial::Read(void*, unsigned int, unsigned int)
unsigned Serial::Read (void *Buffer,unsigned MaxNbBytes,unsigned TimeOut_ms)
{
   // Timer per gestire il timeout
   TimeOut Timer;

   // Inizializza il timer
   Timer.InitTimer();
   unsigned NbByteRead=0;
   while (Timer.ElapsedTime_ms()<TimeOut_ms || TimeOut_ms==0)
   {
      unsigned char* Ptr=(unsigned char*)Buffer+NbByteRead;
      int Ret=read(fd,(void*)Ptr,MaxNbBytes-NbByteRead);
      if (Ret==-1)
         throw ErrorReadException();
      if (Ret>0)
      {
         NbByteRead+=Ret;
         if (NbByteRead>=MaxNbBytes)
            return NbByteRead;
      }
   }
   throw TimeoutException();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7690
leaq -0x28(%rbp), %rdi
callq 0x7160
movl $0x0, -0x2c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7180
movq %rax, %rcx
movl -0x18(%rbp), %eax
movl %eax, %edx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x49(%rbp)
jb 0x754c
cmpl $0x0, -0x18(%rbp)
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x7558
jmp 0x75ec
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x2c(%rbp), %edx
addq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %edi
movq -0x38(%rbp), %rsi
movl -0x14(%rbp), %eax
subl -0x2c(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x33e0
movl %eax, -0x3c(%rbp)
cmpl $-0x1, -0x3c(%rbp)
jne 0x75c5
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x58(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x58(%rbp), %rdi
callq 0x77c0
movq -0x58(%rbp), %rdi
leaq 0x66bf(%rip), %rsi      # 0xdc78
leaq 0x240(%rip), %rdx       # 0x7800
callq 0x3490
cmpl $0x0, -0x3c(%rbp)
jle 0x75e7
movl -0x3c(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jb 0x75e5
movl -0x2c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
jmp 0x75e7
jmp 0x7527
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x60(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x60(%rbp), %rdi
callq 0x7820
movq -0x60(%rbp), %rdi
leaq 0x65fb(%rip), %rsi      # 0xdc18
leaq 0x23c(%rip), %rdx       # 0x7860
callq 0x3490
nopl (%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/svftoserial.cpp
// Function: GenerateSTATEOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string GenerateSTATEOutput (string line)
{
		istringstream iss(line);
		string sub;

		// Scarta nome comando
		iss >> sub;
		// Prende nome stato
		iss >> sub;
		if (sub == "RESET;")
		{
			return "!!!!!*";
		}
		else if (sub == "IDLE;") 
		{
			return "*";
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x1e8(%rbp)
movq %rdi, %rax
movq %rax, -0x1e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
movl $0x8, %edx
callq 0x3460
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x33a0
movq -0x1d8(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
callq 0x3370
jmp 0x8604
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x3370
jmp 0x8619
leaq 0x216d(%rip), %rsi      # 0xa78d
leaq -0x1b0(%rbp), %rdi
callq 0x5ce0
movb %al, -0x1e9(%rbp)
jmp 0x8634
movb -0x1e9(%rbp), %al
testb $0x1, %al
jne 0x8643
jmp 0x86c7
leaq -0x1bd(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x34b0
movq -0x1e8(%rbp), %rdi
movq -0x1f8(%rbp), %rdx
leaq 0x2129(%rip), %rsi      # 0xa794
callq 0x54b0
jmp 0x8672
leaq -0x1bd(%rbp), %rdi
callq 0x32e0
movl $0x1, -0x1c4(%rbp)
jmp 0x8759
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
jmp 0x8781
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
leaq -0x1bd(%rbp), %rdi
callq 0x32e0
jmp 0x8781
leaq 0x20cd(%rip), %rsi      # 0xa79b
leaq -0x1b0(%rbp), %rdi
callq 0x5ce0
movb %al, -0x1f9(%rbp)
jmp 0x86e2
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x86ee
jmp 0x8755
leaq -0x1c5(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x34b0
movq -0x1e8(%rbp), %rdi
movq -0x208(%rbp), %rdx
leaq 0x2083(%rip), %rsi      # 0xa799
callq 0x54b0
jmp 0x871d
leaq -0x1c5(%rbp), %rdi
callq 0x32e0
movl $0x1, -0x1c4(%rbp)
jmp 0x8759
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
leaq -0x1c5(%rbp), %rdi
callq 0x32e0
jmp 0x8781
jmp 0x8757
ud2
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3100
movq -0x1e0(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3100
movq -0x1b8(%rbp), %rdi
callq 0x34a0
nopw %cs:(%rax,%rax)
// File: mattdibi[P]Programmatore-JTAG-per-Xilinx/svftoserial.cpp
// Function: GenerateRUNTESTOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string GenerateRUNTESTOutput (string line)
{
		istringstream iss(line);
		string sub, str;
		long int n;
		int i;

		// Scarta nome comando
		iss >> sub;
		iss >> n;

		// Impostiamo come massimo il numero di caratteri che possiamo inviare sulla seriale
		if(n > 1000)
			n = 1000;

		// Assumendo che i cicli di clock indicati siano divisibili per 4
		for (i=0; i < n/4; i++)
		{
			// Tanti '0' quanti sono i cicli di clock richiesti divisi per 4
			str += '0';
		}

		return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x1f0(%rbp)
movq %rdi, %rax
movq %rax, -0x1f8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
movl $0x8, %edx
callq 0x3460
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x33a0
movq -0x1f0(%rbp), %rdi
movb $0x0, -0x1b1(%rbp)
callq 0x33a0
movq -0x1e8(%rbp), %rdi
movq -0x1e0(%rbp), %rsi
callq 0x3370
jmp 0x8827
leaq -0x190(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3160
jmp 0x883c
cmpq $0x3e8, -0x1c0(%rbp) # imm = 0x3E8
jle 0x8891
movq $0x3e8, -0x1c0(%rbp) # imm = 0x3E8
jmp 0x8891
movq -0x1f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
callq 0x3190
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3100
jmp 0x8933
movl $0x0, -0x1c4(%rbp)
movslq -0x1c4(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x1c0(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x200(%rbp), %rax
cmpq %rcx, %rax
jge 0x88ef
movq -0x1f0(%rbp), %rdi
movl $0x30, %esi
callq 0x31a0
jmp 0x88dc
jmp 0x88de
movl -0x1c4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c4(%rbp)
jmp 0x889b
movb $0x1, -0x1b1(%rbp)
testb $0x1, -0x1b1(%rbp)
jne 0x890b
movq -0x1f0(%rbp), %rdi
callq 0x3190
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3100
movq -0x1f8(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x1d0(%rbp), %rdi
callq 0x34a0
nop