LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/dacunni[P]stlloader/./stlloader.h
// Function: stlloader::parse_binary_stream(std::istream&, stlloader::Mesh&)
void parse_binary_stream(std::istream & is, Mesh & mesh)
{
    char header[STL_BINARY_HDR_SIZE + 1]; // header plus null byte
    is.read(header, STL_BINARY_HDR_SIZE);
    header[STL_BINARY_HDR_SIZE] = '\0'; // null terminate just in case
    mesh.header = header;

    auto num_triangles = read_binary_value<uint32_t>(is);

    for(uint32_t ti = 0; ti < num_triangles; ++ti) {
        Facet facet = {};
        facet.normal = read_binary_value<Normal>(is);
        for(int vi = 0; vi < 3; ++vi) {
            facet.vertices[vi] = read_binary_value<Vertex>(is);
        }
        // This field is unused, but must be present
        //auto attrib_byte_count = read_binary_value<uint16_t>(is);
        read_binary_value<uint16_t>(is);
        mesh.facets.push_back(facet);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x50(%rsp), %r15
movl $0x50, %edx
movq %r15, %rsi
callq 0x2210
movb $0x0, 0x50(%r15)
leaq 0x38(%rbx), %r12
movq 0x40(%rbx), %rbp
movq %r15, %rdi
callq 0x20c0
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x2290
movq %r14, %rdi
callq 0x2f92
testl %eax, %eax
je 0x31d5
movl %eax, %ebp
leaq 0x1e(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %r14, %rdi
callq 0x2fd0
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2fd0
movaps (%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, (%rsp)
movq %r14, %rdi
callq 0x2fd0
movaps (%rsp), %xmm1
movlps %xmm1, 0x44(%rsp)
movss %xmm0, 0x4c(%rsp)
movl $0x8, %r12d
movq %r14, %rdi
callq 0x2fd0
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2fd0
movaps (%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, (%rsp)
movq %r14, %rdi
callq 0x2fd0
movaps (%rsp), %xmm1
movlps %xmm1, 0x18(%rsp,%r12)
movss %xmm0, 0x20(%rsp,%r12)
addq $0xc, %r12
cmpq $0x2c, %r12
jne 0x313f
movl $0x2, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x31bc
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movaps 0x40(%rsp), %xmm2
movups %xmm2, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x30, 0x8(%rbx)
jmp 0x31c9
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x3e40
incl %r13d
cmpl %ebp, %r13d
jne 0x30f1
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/dacunni[P]stlloader/./stlloader.h
// Function: stlloader::parse_stream(std::istream&, stlloader::Mesh&)
void parse_stream(std::istream & is, Mesh & mesh)
{
    // Read enough of file to determine its type.
    char header_start[6] = "";
    is.read(header_start, 5);
    header_start[5] = '\0';
    is.seekg(0, is.end);
    int file_size = is.tellg();

    // Rewind so parsers can start at the beginning.
    is.seekg(0, is.beg);

    // Ascii files start with "solid"
    bool is_ascii = (std::string(header_start) == "solid");

    // WAR: Some binary files appear to be ASCII, since they violate
    // the rule of not using "solid" in their metadata. Try to detect
    // this
    int geom_size = file_size - STL_BINARY_HDR_SIZE - STL_BINARY_META_SIZE;

    if(is_ascii &&
       geom_size > 0 &&
       geom_size % STL_BINARY_TRIANGLE_SIZE == 0) {
        //std::cout << "File looks suspiciously like a binary STL\n";
        is_ascii = false;
    }

    if(is_ascii) {
        parse_ascii_stream(is, mesh);
    }
    else {
        parse_binary_stream(is, mesh);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movw $0x0, 0x4(%r12)
movl $0x0, (%r12)
movl $0x5, %edx
movq %r12, %rsi
callq 0x2210
movb $0x0, 0x5(%r12)
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2240
movq %r14, %rdi
callq 0x2310
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2240
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq %r12, %rdi
callq 0x20c0
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x3daa
leaq 0xde2(%rip), %rsi       # 0x405d
movq %r13, %rdi
callq 0x2070
movl %eax, %ebp
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x329b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21b0
addl $-0x54, %r15d
testl %r15d, %r15d
setg %al
imulq $0x51eb851f, %r15, %rcx # imm = 0x51EB851F
shrq $0x24, %rcx
imull $0x32, %ecx, %ecx
subl %ecx, %r15d
orl %ebp, %r15d
sete %cl
testl %ebp, %ebp
jne 0x32d3
andb %cl, %al
jne 0x32d3
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x2d81
jmp 0x32e0
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x3086
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/dacunni[P]stlloader/./stlloader.h
// Function: stlloader::parse_file(char const*, stlloader::Mesh&)
void parse_file(const char * filename, Mesh & mesh)
{
    std::ifstream ifs;
    ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
    try {
        ifs.open(filename, std::ifstream::binary);
    }
    catch(...) {
        throw std::runtime_error("File not found: " + std::string(filename));
    }
    parse_stream(ifs, mesh);
    ifs.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x50, %rdi
movl $0x5, 0x1c(%rdi)
movl 0x20(%rdi), %esi
callq 0x22f0
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x2100
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x31e7
leaq 0x50(%rsp), %rdi
callq 0x2040
leaq 0x50(%rsp), %rdi
callq 0x2050
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x20b0
movl $0x10, %edi
callq 0x20d0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x3c10
leaq 0xcce(%rip), %rsi       # 0x406a
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3c4d
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x22b0
xorl %ebp, %ebp
movq 0x2c2c(%rip), %rsi      # 0x5ff0
movq 0x2bf5(%rip), %rdx      # 0x5fc0
movq %rbx, %rdi
callq 0x2300
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x33f1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x340c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21b0
testb %bpl, %bpl
jne 0x3436
jmp 0x343e
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3436
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x3436
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
callq 0x22d0
jmp 0x3450
movq %rax, %rdi
callq 0x3cbd
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/dacunni[P]stlloader/./stlloader.h
// Function: float stlloader::native_to_little_endian<float>(float)
float native_to_little_endian(float v) {
    uint32_t vntemp;
    std::memcpy(&vntemp, &v, sizeof(vntemp));
    vntemp = native_to_little_endian(vntemp);
    float result;
    std::memcpy(&result, &vntemp, sizeof(vntemp)); 
    return result;
}

// Assembly:
movd %xmm0, %eax
leaq -0x4(%rsp), %rdx
movl $0x0, (%rdx)
xorl %ecx, %ecx
movl %eax, %esi
shrl %cl, %esi
movb %sil, (%rdx)
addq $0x8, %rcx
incq %rdx
cmpq $0x20, %rcx
jne 0x3539
movss -0x4(%rsp), %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: test_inserts(PMA&)
void
test_inserts(PMA &p1) {
    p1.insert(80);
    p1.print();

    p1.insert(50);
    p1.print();

    p1.insert(70);
    p1.print();

    p1.insert(90);
    p1.print();

    // assert(is_sorted(p1.begin(), p1.end()));

    // return 0;
    p1.insert(65);
    p1.print();

    p1.insert(85);
    p1.print();

    p1.insert(10);
    p1.print();

    p1.insert(21);
    p1.print();

    p1.insert(22);
    p1.print();

    p1.insert(20);
    p1.print();

    p1.insert(24);
    p1.print();

    p1.insert(15);
    p1.print();

    p1.insert(17);
    p1.print();

    p1.insert(23);
    p1.print();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x50, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x32, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x46, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x5a, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x41, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x55, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0xa, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x15, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x16, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x14, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x18, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0xf, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x11, %esi
callq 0x14a2
movq %rbx, %rdi
callq 0x1646
movq %rbx, %rdi
movl $0x17, %esi
callq 0x14a2
movq %rbx, %rdi
popq %rbx
jmp 0x1646
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: PMA::PMA(int)
PMA(int capacity = 2)
        : nelems(0) {
        assert(capacity > 1);
        assert(1 << log2(capacity) == capacity);

        this->init_vars(capacity);
        this->impl.resize(capacity);
        this->present.resize(capacity);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %eax, %eax
movq %rax, 0x20(%rdi)
movl %eax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movl %eax, 0x38(%rdi)
movq %rax, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movq %rax, 0x68(%rdi)
movups %xmm0, (%rdi)
movups %xmm0, 0xc(%rdi)
cmpl $0x2, %esi
jl 0x1749
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x58(%rdi), %r12
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %esi, %edx
movl %ebp, %eax
shrl %eax
incl %ecx
cmpl $0x3, %edx
movl %eax, %edx
ja 0x1705
movl $0x2, %eax
shll %cl, %eax
cmpl %ebp, %eax
jne 0x1768
movq %rbx, %rdi
movl %ebp, %esi
callq 0x243e
movl %ebp, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2640
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2672
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b3c(%rip), %rdi      # 0x328c
leaq 0x1912(%rip), %rsi      # 0x3069
leaq 0x1b3b(%rip), %rcx      # 0x3299
movl $0x63, %edx
callq 0x1090
leaq 0x1a3f(%rip), %rdi      # 0x31ae
leaq 0x18f3(%rip), %rsi      # 0x3069
leaq 0x1b1c(%rip), %rcx      # 0x3299
movl $0x64, %edx
callq 0x1090
movq %rax, %r15
movq (%r12), %rdi
testq %rdi, %rdi
je 0x179f
movq 0x68(%rbx), %rsi
subq %rdi, %rsi
callq 0x10e0
movq %r14, %rdi
callq 0x2612
movq %rbx, %rdi
callq 0x1140
movq %r15, %rdi
callq 0x1120
movq %rax, %rdi
callq 0x2110
nop
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: PMA::lower_bound(int)
int
    lower_bound(int v) {
        int i;
        if (this->nelems == 0) {
            i = this->impl.size();
        } else {
#if 0
            for (i = 0; i < this->impl.size(); ++i) {
                if (this->present[i] && !(this->impl[i] < v)) {
                    break;
                }
            }
#else
            int l = 0, r = this->nchunks;
            int m;
            while (l != r) {
                m = l + (r-l)/2;
                int sz;
                int left = left_interval_boundary(m * chunk_size, chunk_size);
                int pos = lb_in_chunk(left, v);

                // Why does this work? We assume that every chunk of
                // size this->chunk_size contains at least 1
                // element. Hence, if we reach the end of an interval
                // without finding a lower bound, we conclude that all
                // the elements in this chunk are < 'v'. Because every
                // chunk contains at least 1 element, we will never
                // reach the end of an interval because the interval
                // is empty.
                //
                // Note: This is why we need lower density thresholds!
                // 
                if (pos == left + chunk_size) {
                    // Move to right half
                    l = m + 1;
                } else {
                    r = m;
                }
            }
            i = l * chunk_size;
#endif
        }
        dprintf("lower_bound(%d) == %d\n", v, i);
        return i;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
je 0x1879
movl 0x48(%rbx), %edx
movl 0x4c(%rbx), %ebp
testl %ebp, %ebp
je 0x1886
xorl %r12d, %r12d
movl %ebp, %eax
subl %r12d, %eax
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
leal (%r12,%r13), %r15d
movl %edx, %esi
imull %r15d, %esi
movq %rbx, %rdi
callq 0x189c
movl %eax, %r14d
movq %rbx, %rdi
movl %eax, %esi
movl 0x4(%rsp), %edx
callq 0x2096
movl 0x48(%rbx), %edx
addl %edx, %r14d
cmpl %r14d, %eax
je 0x186c
movl %r15d, %ebp
jmp 0x1872
addl %r13d, %r12d
incl %r12d
cmpl %ebp, %r12d
jne 0x1827
jmp 0x1888
movq 0x8(%rbx), %rdx
subq (%rbx), %rdx
shrq $0x2, %rdx
jmp 0x188b
xorl %ebp, %ebp
imull %ebp, %edx
movl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: PMA::left_interval_boundary(int, int)
int
    left_interval_boundary(int i, int interval_size) {
        assert(interval_size == (1 << log2(interval_size)));
        assert(i < (int)this->impl.size());

        int q = i / interval_size;
        int boundary = q * interval_size;
        dprintf("left_interval_boundary(%d, %d) = %d\n", i, interval_size, boundary);
        return boundary;
    }

// Assembly:
pushq %rax
movl %edx, %r8d
xorl %ecx, %ecx
cmpl $0x2, %edx
jl 0x18ba
xorl %ecx, %ecx
movl %r8d, %edx
movl %r8d, %eax
shrl %eax
incl %ecx
cmpl $0x3, %edx
movl %eax, %edx
ja 0x18af
movl $0x1, %eax
shll %cl, %eax
cmpl %r8d, %eax
jne 0x18e1
movq 0x8(%rdi), %rax
subq (%rdi), %rax
shrq $0x2, %rax
cmpl %esi, %eax
jle 0x1900
movl %esi, %eax
cltd
idivl %r8d
subl %edx, %esi
movl %esi, %eax
popq %rcx
retq
leaq 0x17b7(%rip), %rdi      # 0x309f
leaq 0x177a(%rip), %rsi      # 0x3069
leaq 0x17d5(%rip), %rcx      # 0x30cb
movl $0x7f, %edx
callq 0x1090
leaq 0x17ee(%rip), %rdi      # 0x30f5
leaq 0x175b(%rip), %rsi      # 0x3069
leaq 0x17b6(%rip), %rcx      # 0x30cb
movl $0x80, %edx
callq 0x1090
nop
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: PMA::get_interval_stats(int, int, bool&, int&)
void
    get_interval_stats(int left, int level, bool &in_limit, int &sz) {
        double t = upper_threshold_at(level);
        int w = (1 << level) * this->chunk_size;
        sz = 0;
        for (int i = left; i < left + w; ++i) {
            sz += this->present[i] ? 1 : 0;
        }
        double q = (double)(sz+1) / double(w);
        dprintf("q: %f, t: %f\n", q, t);
        in_limit = q < t;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
movl %edx, %esi
callq 0x211c
movl 0x48(%r12), %eax
movl %ebp, %ecx
shll %cl, %eax
movl $0x0, (%r14)
testl %eax, %eax
jle 0x19b4
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
leal (%rax,%r15), %edx
movq 0x20(%r12), %rsi
movslq %r15d, %rdi
movslq %edx, %r8
xorl %edx, %edx
leaq 0x3f(%rcx), %r9
leal 0x3f(%rdi), %r10d
testl %edi, %edi
cmovnsl %edi, %r10d
sarl $0x6, %r10d
movslq %r10d, %r10
leaq (%rsi,%r10,8), %r10
movq %rdi, %r11
andq %r9, %r11
xorl %r15d, %r15d
cmpq %rcx, %r11
setbe %r15b
movq -0x8(%r10,%r15,8), %r10
btq %rdi, %r10
adcl $0x0, %edx
incq %rdi
cmpq %r8, %rdi
jl 0x1970
movl %edx, (%r14)
incl %edx
cvtsi2sd %edx, %xmm1
jmp 0x19bc
movsd 0x164c(%rip), %xmm1     # 0x3008
cvtsi2sd %eax, %xmm2
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
seta (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: PMA::lb_in_chunk(int, int)
int
    lb_in_chunk(int l, int v) {
        int i;
        for (i = l; i < l + chunk_size; ++i) {
            if (this->present[i]) {
                if (this->impl[i] >= v) {
                    return i;
                }
            }
        }
        return i;
    }

// Assembly:
movl %esi, %eax
movl 0x48(%rdi), %r8d
testl %r8d, %r8d
jle 0x210f
pushq %r14
pushq %rbx
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
addl %eax, %r8d
movq (%rdi), %rsi
movq 0x20(%rdi), %rdi
cltq
movslq %r8d, %r8
leal 0x1(%rax), %r9d
cmpl %r9d, %r8d
cmovgl %r8d, %r9d
leaq 0x3f(%rcx), %r10
leal 0x3f(%rax), %r11d
testl %eax, %eax
cmovnsl %eax, %r11d
sarl $0x6, %r11d
movslq %r11d, %r11
leaq (%rdi,%r11,8), %r11
movq %rax, %rbx
andq %r10, %rbx
xorl %r14d, %r14d
cmpq %rcx, %rbx
setbe %r14b
movq -0x8(%r11,%r14,8), %r11
btq %rax, %r11
jae 0x2101
cmpl %edx, (%rsi,%rax,4)
jge 0x210c
incq %rax
cmpq %r8, %rax
jl 0x20cc
movl %r9d, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/reddragon[P]packed-memory-array/impl2.cpp
// Function: PMA::init_vars(int)
void
    init_vars(int capacity) {
        this->chunk_size = 1 << log2(log2(capacity) * 2);
        assert(this->chunk_size == (1 << log2(this->chunk_size)));
        this->nchunks = capacity / this->chunk_size;
        this->nlevels = log2(this->nchunks);
        this->lgn = log2(capacity);
        dprintf("init_vars::capacity: %d, nelems: %d, chunk_size: %d, nchunks: %d\n", capacity, nelems, chunk_size, nchunks);
    }

// Assembly:
xorl %eax, %eax
movl $0x0, %ecx
cmpl $0x2, %esi
jl 0x2471
xorl %edx, %edx
movl %esi, %r8d
movl %esi, %ecx
shrl %ecx
addl $0x2, %edx
cmpl $0x3, %r8d
movl %ecx, %r8d
ja 0x2451
xorl %ecx, %ecx
movl %edx, %r8d
shrl %r8d
incl %ecx
cmpl $0x3, %edx
movl %r8d, %edx
ja 0x2464
movl $0x1, %r8d
shll %cl, %r8d
movl $0x1, %edx
movl %r8d, 0x48(%rdi)
cmpl $0x2, %r8d
jl 0x249e
xorl %eax, %eax
movl %r8d, %r9d
movl %r8d, %ecx
shrl %ecx
incl %eax
cmpl $0x3, %r9d
movl %ecx, %r9d
ja 0x2491
movl %eax, %ecx
shll %cl, %edx
cmpl %edx, %r8d
jne 0x24e9
movl %esi, %eax
cltd
idivl %r8d
movl %eax, 0x4c(%rdi)
xorl %ecx, %ecx
movl $0x0, %edx
cmpl $0x2, %eax
jl 0x24ce
xorl %edx, %edx
movl %eax, %r8d
shrl %r8d
incl %edx
cmpl $0x3, %eax
movl %r8d, %eax
ja 0x24c1
movl %edx, 0x50(%rdi)
cmpl $0x2, %esi
jl 0x24e5
xorl %ecx, %ecx
movl %esi, %eax
shrl %eax
incl %ecx
cmpl $0x3, %esi
movl %eax, %esi
ja 0x24da
movl %ecx, 0x54(%rdi)
retq
pushq %rax
leaq 0xd0e(%rip), %rdi       # 0x31ff
leaq 0xb71(%rip), %rsi       # 0x3069
leaq 0xd32(%rip), %rcx       # 0x3231
movl $0x76, %edx
callq 0x1090
nop
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/num_theory.cpp
// Function: is_prime(long)
bool is_prime(long int n)
{
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    if (n%2 == 0 || n%3 == 0) return false;
 
    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;
 
    return true;
}

// Assembly:
cmpq $0x2, %rdi
jge 0x13d6
xorl %ecx, %ecx
jmp 0x13de
cmpq $0x4, %rdi
jae 0x13e1
movb $0x1, %cl
movl %ecx, %eax
retq
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
movq %rdi, %rax
mulq %rcx
xorl %ecx, %ecx
testb $0x1, %dil
je 0x13de
shrq %rdx
leaq (%rdx,%rdx,2), %rax
movq %rdi, %rdx
subq %rax, %rdx
je 0x13de
cmpq $0x19, %rdi
jb 0x13dc
movl $0xb, %esi
leaq -0x6(%rsi), %r8
xorl %ecx, %ecx
movq %rdi, %rax
xorl %edx, %edx
divq %r8
testq %rdx, %rdx
je 0x13de
leaq -0x4(%rsi), %r8
xorl %ecx, %ecx
movq %rdi, %rax
xorl %edx, %edx
divq %r8
testq %rdx, %rdx
je 0x13de
movq %rsi, %rax
imulq %rsi, %rax
addq $0x6, %rsi
cmpq %rdi, %rax
jbe 0x1413
jmp 0x13dc
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/num_theory.cpp
// Function: large_mod(int, int, int)
int large_mod(int a, int b, int p)
{
    int q = 1;
    while(b > 0) {
        if(b%2 == 1) {
            q *= a;
            q = q%p;
        }
        b /= 2;
        a = (a*a)%p;
    }
    return q;
}

// Assembly:
testl %esi, %esi
jle 0x1491
movl %edx, %ecx
movl %edi, %r8d
movl $0x1, %edi
testb $0x1, %sil
je 0x1473
imull %r8d, %edi
movl %edi, %eax
cltd
idivl %ecx
movl %edx, %edi
movl %esi, %r9d
shrl %r9d
imull %r8d, %r8d
movl %r8d, %eax
xorl %edx, %edx
idivl %ecx
movl %edx, %r8d
cmpl $0x1, %esi
movl %r9d, %esi
ja 0x1462
jmp 0x1496
movl $0x1, %edi
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/num_theory.cpp
// Function: haderson_product(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
vector <int> haderson_product(vector <int> a, vector <int> b)
{
    vector <int> c;
    vector <int> :: iterator i = a.begin();
    vector <int> :: iterator j = b.begin();

    for(; i!= a.end(), j != b.end(); i++, j++)
        c.push_back((*i)*(*j));
    return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %r12
movq 0x8(%rdx), %rax
cmpq %rax, %r12
je 0x150d
movq %rdx, %r14
movq (%rsi), %r13
leaq 0xc(%rsp), %r15
movl (%r12), %ecx
imull (%r13), %ecx
movl %ecx, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x14f1
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1500
movq %rbx, %rdi
movq %r15, %rdx
callq 0x173a
movq 0x8(%r14), %rax
addq $0x4, %r13
addq $0x4, %r12
cmpq %rax, %r12
jne 0x14ce
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1535
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/num_theory.cpp
// Function: vector_polynomial_product(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
int modInverse(int a, int m)
{
    int m0 = m;
    int y = 0, x = 1;
    if (m == 1)
      return 0;
    while (a > 1)
    {
        int q = a / m;
        int temp = m;
        m = a % m, a = temp;
        temp = y;
        y = x - q * y;
        x = temp;
    }
    if (x < 0)
       x += m0;
    return x;
}

// Assembly:
xorl %ecx, %ecx
cmpl $0x1, %esi
je 0x16a6
movl %edi, %eax
movl $0x1, %ecx
cmpl $0x2, %edi
jl 0x16a6
xorl %edi, %edi
movl %esi, %r8d
cltd
idivl %r8d
movl %edi, %r9d
imull %edi, %eax
movl %ecx, %edi
subl %eax, %edi
movl %r8d, %eax
movl %r9d, %ecx
cmpl $0x1, %r8d
movl %edx, %r8d
jg 0x167e
movl %r9d, %ecx
sarl $0x1f, %ecx
andl %esi, %ecx
addl %r9d, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: get_half(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
void get_half(vector <int>& a, vector <int>& b, vector <int>& c)
{
    //function clears the values in b and c
    b.clear();
    c.clear();
    vector <int> :: iterator i;
    int l, vali;

    for(i = a.begin(), l = 0; l < a.size(); l++, i++) {
        vali = *i;
        if(l < a.size()/2)
            b.push_back(vali);
        else
            c.push_back(vali);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x1899
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x18a6
movq %rax, 0x8(%rbx)
movq (%r15), %r13
movq 0x8(%r15), %rax
subq %r13, %rax
je 0x191d
sarq $0x2, %rax
xorl %ebp, %ebp
leaq 0x4(%rsp), %r12
movl (%r13,%rbp,4), %ecx
movl %ecx, 0x4(%rsp)
shrq %rax
cmpq %rbp, %rax
jbe 0x18e4
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x18fa
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x190a
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x18ff
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x190a
movq %r14, %rdi
jmp 0x1902
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1f5e
incq %rbp
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x2, %rax
cmpq %rbp, %rax
ja 0x18bd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: pprint_vector(std::vector<int, std::allocator<int>>)
void pprint_vector(vector <int> a)
{
    typename vector <int> :: iterator i;
    cout << "----------" << endl;
    for(i = a.begin(); i != a.end(); i++)
        cout << *i << " ";
    cout << endl << "----------" << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x6699(%rip), %rbx      # 0x7fd8
leaq 0x36e4(%rip), %rsi      # 0x502a
movl $0xa, %edx
movq %rbx, %rdi
callq 0x1110
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq (%r14), %r13
cmpq 0x8(%r14), %r13
je 0x19b7
movq 0x664e(%rip), %r15      # 0x7fd8
leaq 0x36a4(%rip), %r12      # 0x5035
movl (%r13), %esi
movq %r15, %rdi
callq 0x1150
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1110
addq $0x4, %r13
cmpq 0x8(%r14), %r13
jne 0x1991
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq %rax, %rbx
leaq 0x3642(%rip), %rsi      # 0x502a
movl $0xa, %edx
movq %rax, %rdi
callq 0x1110
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1080
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: get_k_vector(int, int)
vector <int> get_k_vector(int k, int n)
{
    vector <int> ret;
    for(int i = n-1; i >= 0; i--)
        ret.push_back(pow(k, i));
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %edx, %edx
jle 0x1aa5
movl %edx, %r14d
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd %xmm0, 0x8(%rsp)
incl %r14d
leaq 0x4(%rsp), %r15
leal -0x2(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0x1160
cvttsd2si %xmm0, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1a91
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1a9c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x173a
decl %r14d
cmpl $0x1, %r14d
ja 0x1a5d
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1ac9
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: get_bit_vector(long)
vector <int> get_bit_vector(long v)
{
    vector <int> ret;
    int bit;
    while(v > 0) {
        bit = v&1;
        ret.push_back(bit);
        v >>= 1;
    }
    reverse(ret.begin(), ret.end());
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testq %rsi, %rsi
jle 0x1b75
movq %rsi, %r14
leaq 0xc(%rsp), %r15
movl %r14d, %eax
andl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1b1c
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1b27
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1f5e
movq %r14, %rax
shrq %rax
cmpq $0x2, %r14
movq %rax, %r14
jae 0x1afc
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x4, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1b75
addq $0x4, %rax
movl -0x4(%rax), %edx
movl (%rcx), %esi
movl %esi, -0x4(%rax)
movl %edx, (%rcx)
addq $-0x4, %rcx
leaq 0x4(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x1b5b
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1b99
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: vector_diff(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
vector <int> vector_diff(vector <int> a, vector <int> b)
{
    vector <int> c;
    for(int i = 0; i < a.size(); i++) 
        c.push_back(a[i]-b[i]);
    return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
je 0x1ccf
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
movl (%rax,%r13,4), %edx
movq (%r14), %rsi
subl (%rsi,%r13,4), %edx
movl %edx, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1cab
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1cbd
movq %rbx, %rdi
movq %r12, %rdx
callq 0x173a
movq (%r15), %rax
movq 0x8(%r15), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
ja 0x1c86
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1cf7
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: vector_sum(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
vector <int> vector_sum(vector <int> a, vector <int> b)
{
    vector <int> c;
    for(int i = 0; i < a.size(); i++) 
        c.push_back(a[i]+b[i]);
    return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
je 0x1d80
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
movq (%r14), %rdx
movl (%rdx,%r13,4), %edx
addl (%rax,%r13,4), %edx
movl %edx, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1d5c
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1d6e
movq %rbx, %rdi
movq %r12, %rdx
callq 0x173a
movq (%r15), %rax
movq 0x8(%r15), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
ja 0x1d37
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1da8
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: vector_sum(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>, int)
vector <int> vector_sum(vector <int> a, vector <int> b, int order)
{
    vector <int> c;
    for(int i = 0; i < a.size(); i++) 
        c.push_back((a[i]+b[i])%order);
    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rcx
movq 0x8(%rsi), %rdi
cmpq %rcx, %rdi
je 0x1e34
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
leaq 0x4(%rsp), %r12
movq (%r14), %rax
movl (%rax,%r13,4), %eax
addl (%rcx,%r13,4), %eax
cltd
idivl %ebp
movl %edx, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1e10
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1e22
movq %rbx, %rdi
movq %r12, %rdx
callq 0x173a
movq (%r15), %rcx
movq 0x8(%r15), %rdi
incq %r13
movq %rdi, %rax
subq %rcx, %rax
sarq $0x2, %rax
cmpq %r13, %rax
ja 0x1de8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1e5d
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/vector_util.cpp
// Function: random_vector(int, int)
vector <int> random_vector(int len, int order)
{
    vector <int> ret;
    for(int i = 0; i < len; i++)
        ret.push_back(rand()%order);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %esi, %esi
jle 0x1ebd
movl %edx, %ebp
movl %esi, %r14d
leaq 0x4(%rsp), %r15
callq 0x1040
cltd
idivl %ebp
movl %edx, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1ead
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1eb8
movq %rbx, %rdi
movq %r15, %rdx
callq 0x173a
decl %r14d
jne 0x1e8b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1ee2
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/main.cpp
// Function: build_gen_vector(Group*, int)
vector <int> build_gen_vector(Group *g, int len)
{
    vector <int> ret;
    for(int i = 0; i < len; i++)
        ret.push_back(g->get_gen());
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %edx, %edx
jle 0x2093
movl %edx, %ebp
movq %rsi, %r14
leaq 0x4(%rsp), %r15
movq %r14, %rdi
callq 0x497e
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2084
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x208f
movq %rbx, %rdi
movq %r15, %rdx
callq 0x173a
decl %ebp
jne 0x2062
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x20b8
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/main.cpp
// Function: main
int main()
{
    //initialize a random number generator for future use
    srand(unsigned(std::time(NULL))); 
    Group *g = new Group(383);
    Prover *p = new Prover(9, 383, build_gen_vector(g, 4));
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
xorl %edi, %edi
callq 0x10c0
movl %eax, %edi
callq 0x10d0
movl $0x38, %edi
callq 0x10f0
movq %rax, %r15
movq %rax, %rdi
movl $0x17f, %esi            # imm = 0x17F
callq 0x4798
movl $0xd8, %edi
callq 0x10f0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x203c
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl $0x9, %esi
movl $0x17f, %edx            # imm = 0x17F
callq 0x218c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x213e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2169
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2169
movq %rax, %r14
movl $0xd8, %esi
movq %rbx, %rdi
jmp 0x217e
movq %rax, %r14
movl $0x38, %esi
movq %r15, %rdi
callq 0x1100
movq %r14, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/prover.cpp
// Function: Prover::get_complement_vector(std::vector<int, std::allocator<int>>)
vector <int> Prover::get_complement_vector(vector <int> al)
{
    vector <int> ar;
    for(int i = 0; i < n; i++) {
        ar.push_back(al[i]-1);
    }
    return ar;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpl $0x0, (%rsi)
jle 0x27ac
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
movq (%r14), %rax
movl (%rax,%r13,4), %eax
decl %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2796
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x27a1
movq %rbx, %rdi
movq %r12, %rdx
callq 0x173a
incq %r13
movslq (%r15), %rax
cmpq %rax, %r13
jl 0x2773
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x27d4
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/prover.cpp
// Function: Prover::get_gen_vector(std::vector<int, std::allocator<int>>, int)
vector <int> Prover::get_gen_vector(vector <int> gens, int len)
{
    vector <int> ret;
    int gen;
    for(int i = 0; i < len; i++) {
        gen = gens[rand()%gens.size()];
        ret.push_back(gen);
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %ecx, %ecx
jle 0x2848
movl %ecx, %ebp
movq %rdx, %r14
leaq 0x4(%rsp), %r15
callq 0x1040
cltq
movq (%r14), %rcx
movq 0x8(%r14), %rsi
subq %rcx, %rsi
sarq $0x2, %rsi
xorl %edx, %edx
divq %rsi
movl (%rcx,%rdx,4), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2839
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2844
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1f5e
decl %ebp
jne 0x2802
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x286d
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/prover.cpp
// Function: Prover::calc_tau_x()
int Prover::calc_tau_x()
{
    if(x == -1 || z == -1) {
        cout << "Set the x and z values before calling";
        return -1;
    }
    return tau[1]*(int)pow(x, 2)+tau[0]*x+z*p;
}

// Assembly:
movl 0xc(%rdi), %ecx
cmpl $-0x1, %ecx
je 0x2a41
movl 0x14(%rdi), %eax
cmpl $-0x1, %eax
je 0x2a41
cvtsi2sd %ecx, %xmm0
mulsd %xmm0, %xmm0
cvttsd2si %xmm0, %edx
imull 0xd0(%rdi), %edx
imull 0xcc(%rdi), %ecx
imull 0x4(%rdi), %eax
addl %ecx, %eax
addl %edx, %eax
retq
pushq %rax
movq 0x558f(%rip), %rdi      # 0x7fd8
leaq 0x25e7(%rip), %rsi      # 0x5037
movl $0x25, %edx
callq 0x1110
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/prover.cpp
// Function: Prover::calc_l()
vector <int> Prover::calc_l()
{
    if(x == -1 || z == -1) {
        cout << "Set the x and z values before calling";
        return {-1};
    }
    return vector_sum(vector_diff(al, k_product_vector(get_k_vector(1, n), z)), k_product_vector(sl, x));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
cmpl $-0x1, 0xc(%rsi)
je 0x2b9d
movq %rsi, %r14
cmpl $-0x1, 0x14(%rsi)
je 0x2b9d
leaq 0x18(%r14), %rsi
leaq 0x70(%rsp), %rdi
callq 0x3bb8
movl (%r14), %edx
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
callq 0x1a25
movl 0x14(%r14), %edx
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1ba1
leaq 0x88(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x1c4e
leaq 0x48(%r14), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3bb8
movl 0xc(%r14), %edx
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1ba1
leaq 0x88(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1cff
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2b1f
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2b36
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x2b53
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x2b6a
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2b81
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x2bd5
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2bd5
movq 0x5434(%rip), %rdi      # 0x7fd8
leaq 0x248c(%rip), %rsi      # 0x5037
movl $0x25, %edx
callq 0x1110
leaq 0xa4(%rsp), %rsi
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3c38
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2c02
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2c02
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2c1e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2c1e
movq %rax, %rbx
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x2c40
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2c40
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x2c5c
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2c5c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2c78
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2c78
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x2c92
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/serialize.hpp
// Function: deserialize(char*, int)
std::vector <int> deserialize(char *bytes, int num_bytes)
{
    std::vector <int> ret;
    int temp;
    num_bytes = num_bytes/sizeof(int);

    for(int i = 0; i < num_bytes; i++) {
        std::copy_n(static_cast<const int*>(static_cast<const void*>(bytes))+i,
                        1,
                            &temp);
        ret.push_back(temp);
    }

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
sarl $0x2, %edx
testl %edx, %edx
jle 0x3db9
movq %rsi, %r14
movl %edx, %r12d
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
movl (%r14,%r13,4), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3da6
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3db1
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1f5e
incq %r13
cmpq %r13, %r12
jne 0x3d88
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3de1
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/inner_product_arg.cpp
// Function: InnerProdArg::InnerProdArg(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>, int, int, int)
InnerProdArg::InnerProdArg(vector <int> a, vector <int> b, int c, int order, int x) {
    if(a.size() != b.size())
        return;
    InnerProdArg::a = a;
    InnerProdArg::b = b;
    InnerProdArg::c = c;
    InnerProdArg::x = x;
    InnerProdArg::order = order;
    generate_argument();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq 0x8(%rdx), %rcx
subq (%rdx), %rcx
cmpq %rcx, %rax
jne 0x3e4c
movl %r9d, %r14d
movl %r8d, %ebp
movq %rdx, %r13
movq %rdi, %rbx
leaq 0x18(%rdi), %r12
callq 0x46b4
movq %r12, %rdi
movq %r13, %rsi
callq 0x46b4
movl %r15d, 0x3c(%rbx)
movl %r14d, 0x40(%rbx)
movl %ebp, 0x38(%rbx)
movq %rbx, %rdi
callq 0x3e84
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
testq %rdi, %rdi
je 0x3e73
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x11d4
movq %r14, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/group.cpp
// Function: Group::Group(int)
Group::Group(int p) 
{
    order = p;
    for(long i = 1; i <= p; i++)
        group.push_back(i);
    generators = find_gens(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movl %esi, (%rdi)
testl %esi, %esi
jle 0x47fb
movl %ebp, %r12d
xorl %r13d, %r13d
movq %rsp, %r15
incq %r13
movl %r13d, (%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x47eb
movl %r13d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x10(%rbx)
jmp 0x47f6
movq %r14, %rdi
movq %r15, %rdx
callq 0x173a
cmpq %r13, %r12
jne 0x47cd
movq %rsp, %rdi
movl %ebp, %edx
callq 0x4896
movq 0x20(%rbx), %rdi
movq 0x30(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x4851
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4851
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4862
movq %rax, %r15
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x487a
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq (%r14), %rdi
testq %rdi, %rdi
je 0x488e
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r15, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/group.cpp
// Function: Group::find_gens(int)
vector <int> Group::find_gens(int p)
{
    int q = (p-1)/2;
    int power_check_2, power_check_q;
    vector <int> gens;
    for(int i = 2; i < p; i++) {
        power_check_2 = large_mod(i, 2, p);
        power_check_q = large_mod(i, q, p);
        if(power_check_2 != 1 && power_check_q != 1)
            gens.push_back(i);
        }
    return gens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x2, 0xc(%rsp)
cmpl $0x3, %edx
jl 0x4939
movl %edx, %r14d
leal -0x1(%r14), %eax
shrl $0x1f, %eax
leal (%r14,%rax), %ebp
decl %ebp
sarl %ebp
movl $0x2, %edi
leaq 0xc(%rsp), %r15
movl $0x2, %esi
movl %r14d, %edx
callq 0x1454
movl %eax, %r12d
movl 0xc(%rsp), %edi
movl %ebp, %esi
movl %r14d, %edx
callq 0x1454
cmpl $0x1, %r12d
je 0x492a
cmpl $0x1, %eax
je 0x492a
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x491f
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x492a
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1f5e
movl 0xc(%rsp), %edi
incl %edi
movl %edi, 0xc(%rsp)
cmpl %r14d, %edi
jl 0x48dc
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4960
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O3/arush15june[P]DFA-CPP/dfa.cpp
// Function: StateDiagram::insertEdge(int, int, int)
void insertEdge(int state_no, int weight, int y) {
        /*
            Add edge to an adjacency list.

            @param int state_no: state to add to
            @param int weight: weight of edge
            @param int y: state no of edge
        */
        
        auto pair = std::make_pair(weight, y);
        auto& state = states[state_no];
        
        state.push_back(pair);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
shlq $0x20, %rcx
movl %edx, %eax
orq %rcx, %rax
movq %rax, -0x8(%rbp)
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdi,%rcx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x33a0
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x33a9
leaq -0x8(%rbp), %rdx
callq 0x3468
addq $0x10, %rsp
popq %rbp
retq
nop