LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::open_nx(char const*)
bool ostream::open_nx(const char *path) noexcept
{
    fd = bp_sys::open(path, O_WRONLY);
    if (fd < 0) {
        io_error = errno;
        return false;
    }

    buf = std::unique_ptr<streambuf>(new(std::nothrow) streambuf);
    if (!buf) {
        bp_sys::close(fd);
        fd = -1;
        return false;
    }

    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x4250
movl %eax, (%rbx)
testl %eax, %eax
js 0x131b5
movq 0x9e0e(%rip), %rsi      # 0x1cf78
movl $0x4008, %edi           # imm = 0x4008
callq 0x4580
testq %rax, %rax
je 0x13184
movq $0x0, 0x4000(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rbx)
testq %rdi, %rdi
je 0x1319f
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movq 0x8(%rbx), %rax
movb $0x1, %cl
testq %rax, %rax
jne 0x131c1
movl (%rbx), %edi
callq 0x4560
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
jmp 0x131bf
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
movq %rax, %rdi
callq 0xe590
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::open_nx(char const*, int)
bool ostream::open_nx(const char *path, const int flags) noexcept
{
    buf = std::unique_ptr<streambuf>(new(std::nothrow) streambuf);
    if (!buf) return false;

    fd = bp_sys::open(path, O_WRONLY | flags);
    if (fd < 0) {
        io_error = errno;
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x9d79(%rip), %rsi      # 0x1cf78
movl $0x4008, %edi           # imm = 0x4008
callq 0x4580
testq %rax, %rax
je 0x13219
movq $0x0, 0x4000(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rbx)
testq %rdi, %rdi
je 0x13234
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1325c
orl $0x1, %ebp
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x4250
movl %eax, %ecx
movl %eax, (%rbx)
movb $0x1, %al
testl %ecx, %ecx
jns 0x1325e
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0xe590
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::open_nx(char const*, int, unsigned int)
bool ostream::open_nx(const char *path, const int flags, const mode_t mode) noexcept
{
    buf = std::unique_ptr<streambuf>(new(std::nothrow) streambuf);
    if (!buf) return false;

    fd = bp_sys::open(path, O_WRONLY | flags, mode);
    if (fd < 0) {
        io_error = errno;
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x9cd5(%rip), %rsi      # 0x1cf78
movl $0x4008, %edi           # imm = 0x4008
callq 0x4580
testq %rax, %rax
je 0x132bd
movq $0x0, 0x4000(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rbx)
testq %rdi, %rdi
je 0x132d8
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x13304
orl $0x1, %r14d
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x4250
movl %eax, %ecx
movl %eax, (%rbx)
movb $0x1, %al
testl %ecx, %ecx
jns 0x13306
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0xe590
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::close_nx()
bool ostream::close_nx() noexcept
{
    if (fd < 0) {
        // Only mark an error if none have been recorded yet:
        if (good()) {
            io_error = EBADF;
        }
        return false;
    }

    if (!flush_nx()) {
        // error state was checked/set by flush_nx() call
        bp_sys::close(fd);
        fd = -1;
        buf.reset();
        return false;
    }

    buf.reset();

    if (bp_sys::close(fd) < 0) {
        io_error = errno;
        fd = -1;
        return false; // Failed
    }

    fd = -1;
    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
js 0x1337d
movq %rbx, %rdi
callq 0x133dc
testb %al, %al
je 0x13395
movq 0x8(%rbx), %rdi
movq $0x0, 0x8(%rbx)
testq %rdi, %rdi
je 0x13368
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movl (%rbx), %edi
callq 0x4560
testl %eax, %eax
js 0x133bf
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movb $0x1, %al
jmp 0x133d1
xorl %eax, %eax
cmpl $0x0, 0x10(%rbx)
jne 0x133d1
cmpq $0x0, 0x8(%rbx)
je 0x133d1
movl $0x9, 0x10(%rbx)
jmp 0x133cf
movl (%rbx), %edi
callq 0x4560
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq 0x8(%rbx), %rdi
movq $0x0, 0x8(%rbx)
testq %rdi, %rdi
je 0x133cf
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
jmp 0x133cf
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
retq
movq %rax, %rdi
callq 0xe590
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::close()
void ostream::close()
{
    bool buf_fail = (fd >= 0 && buf == nullptr);
    bool r = close_nx();
    if (!r) {
        // Failed close_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::io_fail_bit);
        if (buf_fail) {
            throw_exception_on(io_states::buffer_fail_bit);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ebp
movq 0x8(%rdi), %r14
callq 0x13338
testb %al, %al
je 0x134f9
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movl $0x8, %esi
callq 0x130ce
testl %ebp, %ebp
js 0x134f4
testq %r14, %r14
jne 0x134f4
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x130ce
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write(char const*)
void ostream::write(const char *msg)
{
    bool r = write_nx(msg);
    if (!r) {
        // Failed write_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4150
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12ea4
cmpq %r15, %rax
jne 0x135bf
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movl $0xa, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x130ce
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ostream::write(const std::string &msg)
{
    bool r = write_nx(msg);
    if (!r) {
        // Failed write_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
callq 0x12ea4
cmpq 0x8(%r14), %rax
jne 0x13666
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movl $0xa, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x130ce
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write(int)
void ostream::write(const int num)
{
    bool r = write_nx(num);
    if (!r) {
        // Failed write_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x408d(%rip), %rdx      # 0x17766
leaq 0x4(%rsp), %r14
movl $0xc, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4480
movslq %eax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12ea4
cmpq %r15, %rax
je 0x13710
movq %rbx, %rdi
movl $0xa, %esi
callq 0x130ce
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write(unsigned int)
void ostream::write(const unsigned num)
{
    bool r = write_nx(num);
    if (!r) {
        // Failed write_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x3fed(%rip), %rdx      # 0x17766
leaq 0x5(%rsp), %r14
movl $0xb, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4480
movslq %eax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12ea4
cmpq %r15, %rax
je 0x137b0
movq %rbx, %rdi
movl $0xa, %esi
callq 0x130ce
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write(long)
void ostream::write(const long num)
{
    bool r = write_nx(num);
    if (!r) {
        // Failed write_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x3f4f(%rip), %rdx      # 0x17769
movq %rsp, %r14
movl $0x15, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4480
movslq %eax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12ea4
cmpq %r15, %rax
je 0x1384f
movq %rbx, %rdi
movl $0xa, %esi
callq 0x130ce
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write(unsigned long)
void ostream::write(const unsigned long num)
{
    bool r = write_nx(num);
    if (!r) {
        // Failed write_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x3eaf(%rip), %rdx      # 0x17769
movq %rsp, %r14
movl $0x15, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4480
movslq %eax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12ea4
cmpq %r15, %rax
je 0x138ef
movq %rbx, %rdi
movl $0xa, %esi
callq 0x130ce
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write_buf(char const*, unsigned long)
ssize_t ostream::write_buf(const char *msg, size_t len)
{
    ssize_t r = write_buf_nx(msg, len);
    if (r < 0) {
        // Failed write_buf_nx leaves an error state bit set, so this will always throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
    return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x12ea4
movq %rax, %r14
testq %rax, %rax
jns 0x1398b
movq %rbx, %rdi
movl $0xa, %esi
callq 0x130ce
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::write_buf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ssize_t ostream::write_buf(const std::string &msg)
{
    ssize_t r = write_buf_nx(msg);
    if (r < 0) {
        // Failed write_buf_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::buffer_fail_bit | io_states::io_fail_bit);
    }
    return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %rax, %rsi
callq 0x12ea4
movq %rax, %r14
testq %rax, %rax
jns 0x139d1
movq %rbx, %rdi
movl $0xa, %esi
callq 0x130ce
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::load_into_buf(unsigned int)
int istream::load_into_buf(unsigned len) noexcept
{
    int r;
    do {
        r = buf->fill(fd, len);
    } while (r < 0 && errno == EINTR);
    if (r == 0) {
        eof_state = true;
        return -1;
    }
    if (r < 0) {
        io_error = errno;
        return -1;
    }
    return r;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
movl (%rbx), %esi
movl %ebp, %edx
callq 0x142de
testl %eax, %eax
jns 0x13a46
callq 0x4040
movl (%rax), %eax
cmpl $0x4, %eax
je 0x13a24
movl %eax, 0x10(%rbx)
jmp 0x13a4c
jne 0x13a51
movb $0x1, 0x14(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::throw_exception_on(int)
void istream::throw_exception_on(const int states)
{
    if ((states & io_states::eof_bit) && eof()) {
        throw iostream_eof();
    }
    if ((states & io_states::buffer_fail_bit) && buffer_failure()) {
        throw std::bad_alloc();
    }
    if ((states & io_states::input_fail_bit) && input_failure()) {
        throw std::bad_alloc();
    }
    if ((states & io_states::io_fail_bit) && io_failure()) {
        throw iostream_system_err(io_failure());
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x1, %sil
je 0x13a68
cmpb $0x1, 0x14(%rbx)
je 0x13abd
testb $0x2, %sil
je 0x13a75
cmpq $0x0, 0x8(%rbx)
je 0x13a8f
testb $0x4, %sil
je 0x13a81
cmpb $0x1, 0x15(%rbx)
je 0x13a8f
testb $0x8, %sil
je 0x13a8d
cmpl $0x0, 0x10(%rbx)
jne 0x13ad0
popq %rbx
retq
movl $0x8, %edi
callq 0x4190
movq 0x94f8(%rip), %rcx      # 0x1cf98
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x9502(%rip), %rsi      # 0x1cfb0
movq 0x94d3(%rip), %rdx      # 0x1cf88
movq %rax, %rdi
callq 0x44d0
movl $0x1, %edi
callq 0x4190
leaq 0x9282(%rip), %rsi      # 0x1cd50
jmp 0x13ae6
movl $0x4, %edi
callq 0x4190
movl 0x10(%rbx), %ecx
movl %ecx, (%rax)
leaq 0x9252(%rip), %rsi      # 0x1cd38
movq %rax, %rdi
xorl %edx, %edx
callq 0x44d0
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::open_nx(char const*)
bool istream::open_nx(const char *path) noexcept
{
    fd = bp_sys::open(path, O_RDONLY);
    if (fd < 0) {
        io_error = errno;
        return false;
    }

    buf = std::unique_ptr<streambuf>(new(std::nothrow) streambuf);
    if (!buf) {
        bp_sys::close(fd);
        fd = -1;
        return false;
    }

    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x4250
movl %eax, (%rbx)
testl %eax, %eax
js 0x13b6e
movq 0x9455(%rip), %rsi      # 0x1cf78
movl $0x4008, %edi           # imm = 0x4008
callq 0x4580
testq %rax, %rax
je 0x13b3d
movq $0x0, 0x4000(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rbx)
testq %rdi, %rdi
je 0x13b58
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movq 0x8(%rbx), %rax
movb $0x1, %cl
testq %rax, %rax
jne 0x13b7a
movl (%rbx), %edi
callq 0x4560
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
jmp 0x13b78
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
movq %rax, %rdi
callq 0xe590
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::open_nx(char const*, int)
bool istream::open_nx(const char *path, const int flags) noexcept
{
    buf = std::unique_ptr<streambuf>(new(std::nothrow) streambuf);
    if (!buf) return false;

    fd = bp_sys::open(path, O_RDONLY | flags);
    if (fd < 0) {
        io_error = errno;
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x93c1(%rip), %rsi      # 0x1cf78
movl $0x4008, %edi           # imm = 0x4008
callq 0x4580
testq %rax, %rax
je 0x13bd1
movq $0x0, 0x4000(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rbx)
testq %rdi, %rdi
je 0x13bec
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x13c11
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x4250
movl %eax, %ecx
movl %eax, (%rbx)
movb $0x1, %al
testl %ecx, %ecx
jns 0x13c13
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0xe590
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::open_nx(char const*, int, unsigned int)
bool istream::open_nx(const char *path, const int flags, const mode_t mode) noexcept
{
    buf = std::unique_ptr<streambuf>(new(std::nothrow) streambuf);
    if (!buf) return false;

    fd = bp_sys::open(path, O_RDONLY | flags, mode);
    if (fd < 0) {
        io_error = errno;
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x9321(%rip), %rsi      # 0x1cf78
movl $0x4008, %edi           # imm = 0x4008
callq 0x4580
testq %rax, %rax
je 0x13c71
movq $0x0, 0x4000(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rbx)
testq %rdi, %rdi
je 0x13c8c
movl $0x4008, %esi           # imm = 0x4008
callq 0x42f0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x13cb4
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x4250
movl %eax, %ecx
movl %eax, (%rbx)
movb $0x1, %al
testl %ecx, %ecx
jns 0x13cb6
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0xe590
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::close_nx()
bool istream::close_nx() noexcept
{
    if (fd < 0) {
        // Only mark an error if one has not been recorded yet:
        if (good()) {
            io_error = EBADF;
        }
        return false;
    }

    buf.reset();

    if (bp_sys::close(fd) < 0) {
        io_error = errno;
        fd = -1;
        return false;
    }

    fd = -1;
    return good();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
js 0x13d47
movq 0x8(%rbx), %rax
movq $0x0, 0x8(%rbx)
testq %rax, %rax
je 0x13d12
movl $0x4008, %esi           # imm = 0x4008
movq %rax, %rdi
callq 0x42f0
movl (%rbx), %edi
callq 0x4560
testl %eax, %eax
js 0x13d6b
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
cmpq $0x0, 0x8(%rbx)
setne %cl
movb 0x15(%rbx), %al
cmpl $0x0, 0x10(%rbx)
sete %dl
cmpb $0x0, 0x14(%rbx)
sete %sil
andb %cl, %sil
xorb $0x1, %al
andb %dl, %al
andb %sil, %al
jmp 0x13d7d
xorl %eax, %eax
cmpl $0x0, 0x10(%rbx)
jne 0x13d7d
cmpb $0x0, 0x15(%rbx)
jne 0x13d7d
cmpb $0x0, 0x14(%rbx)
jne 0x13d7d
cmpq $0x0, 0x8(%rbx)
je 0x13d7d
movl $0x9, 0x10(%rbx)
jmp 0x13d7b
callq 0x4040
movl (%rax), %eax
movl %eax, 0x10(%rbx)
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
retq
movq %rax, %rdi
callq 0xe590
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::close()
void istream::close()
{
    bool buf_fail = (fd >= 0 && buf == nullptr);
    bool r = close_nx();
    if (!r) {
        // Failed close_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::io_fail_bit | io_states::eof_bit
                | io_states::input_fail_bit);
        if (buf_fail) {
            throw_exception_on(io_states::buffer_fail_bit);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ebp
movq 0x8(%rdi), %r14
callq 0x13ce8
testb %al, %al
je 0x13dc9
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movl $0xd, %esi
callq 0x13a58
testl %ebp, %ebp
js 0x13dc4
testq %r14, %r14
jne 0x13dc4
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x13a58
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::getc_nx()
getc_result istream::getc_nx() noexcept
{
    if (!good()) {
        return {false, 0};
    }
    if (buf->get_length() == 0) {
        int r = load_into_buf(1);
        if (r <= 0) return {false, 0};
    }
    char result = *buf->get_ptr(0);
    buf->consume(1);
    return {true, result};
}

// Assembly:
xorl %eax, %eax
cmpl $0x0, 0x10(%rdi)
jne 0x13eb7
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x15(%rdi)
jne 0x13ebd
cmpb $0x0, 0x14(%rbx)
jne 0x13ebd
movq 0x8(%rbx), %rcx
movl $0x0, %edx
testq %rcx, %rcx
je 0x13ebf
movl 0x4004(%rcx), %eax
testl %eax, %eax
jne 0x13e75
movq %rbx, %rdi
movl $0x1, %esi
callq 0x13a1c
testl %eax, %eax
jle 0x13ebb
movq 0x8(%rbx), %rcx
movl 0x4004(%rcx), %eax
movl 0x4000(%rcx), %esi
leal -0x4000(%rsi), %edx
movl $0x4000, %edi           # imm = 0x4000
cmpl %edi, %esi
cmovbl %esi, %edx
leal 0x1(%rsi), %r8d
addl $0xffffc001, %esi       # imm = 0xFFFFC001
cmpl %edi, %r8d
cmovbl %r8d, %esi
movzbl (%rcx,%rdx), %edx
movl %esi, 0x4000(%rcx)
decl %eax
movl %eax, 0x4004(%rcx)
shll $0x8, %edx
movw $0x1, %ax
jmp 0x13ebf
xorl %edx, %edx
jmp 0x13ec0
xorl %eax, %eax
xorl %edx, %edx
popq %rbx
movzwl %ax, %eax
orl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::getc()
char istream::getc()
{
    getc_result r = getc_nx();
    if (!r.success) {
        // Failed getc_nx leaves an error state bit set, so this will throw:
        throw_exception_on(io_states::eof_bit | io_states::buffer_fail_bit
                | io_states::input_fail_bit | io_states::io_fail_bit);
    }
    return r.character;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x13e22
movl %eax, %ebx
testb $0x1, %bl
jne 0x13ee6
movq %r14, %rdi
movl $0xf, %esi
callq 0x13a58
shrl $0x8, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::get_line_until_eof(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char)
void istream::get_line_until_eof(std::string &dest, char delim)
{
    // If we had already hit eof, we fail at this point
    throw_exception_on(io_states::buffer_fail_bit | io_states::input_fail_bit
            | io_states::io_fail_bit | io_states::eof_bit);
    bool r = get_line_nx(dest, delim);
    if (!r) {
        throw_exception_on(io_states::buffer_fail_bit | io_states::input_fail_bit
                | io_states::io_fail_bit);
    }
    // (eof_state may be set, i.e. we reached end-of-file, but that's not an error)
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl $0xf, %esi
callq 0x13a58
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x13ef4
testb %al, %al
je 0x141fc
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movl $0xe, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x13a58
nop
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::get_line_until_eof_nx(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char)
bool istream::get_line_until_eof_nx(std::string &dest, char delim) noexcept
{
    if (!good()) return false;
    bool r = get_line_nx(dest, delim);
    if (!r) {
        // If we hit end-of-file and there is no other error, return success.
        // (We can ignore buffer failure, that can't happen between the initial
        // check above and this point).
        if (io_error != 0 || string_failed) return false;
    }
    return true;
}

// Assembly:
xorl %eax, %eax
cmpl $0x0, 0x10(%rdi)
jne 0x1424f
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x15(%rdi)
jne 0x1424e
cmpb $0x0, 0x14(%rbx)
jne 0x1424e
cmpq $0x0, 0x8(%rbx)
je 0x1424e
movsbl %dl, %edx
movq %rbx, %rdi
callq 0x13ef4
testb %al, %al
je 0x14240
movb $0x1, %al
jmp 0x1424e
cmpl $0x0, 0x10(%rbx)
jne 0x1424c
cmpb $0x0, 0x15(%rbx)
je 0x1423c
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/main.cpp
// Function: main
int main(int argc, char* argv[]){
  if(argc != 5){
    cout << "The number of argument is invalid." << endl;
    exit(1);
  }

  LogicomeProfiler temp_logicome_profiler;
  temp_logicome_profiler.SetParameters(argv);
  temp_logicome_profiler.Run();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
cmpl $0x5, %edi
jne 0x2631
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x266a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5cc8
movq %rsp, %rdi
callq 0x2aa2
movq %rsp, %rdi
callq 0x27c4
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
movq 0xa9a0(%rip), %rdi      # 0xcfd8
leaq 0x69c5(%rip), %rsi      # 0x9004
callq 0x2210
movq %rax, %rdi
callq 0x2120
movl $0x1, %edi
callq 0x2290
movq %rax, %rbx
movq %rsp, %rdi
callq 0x27c4
movq %rbx, %rdi
callq 0x2370
nop
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/./logicome_profiler.h
// Function: LogicomeProfiler::LogicomeProfiler()
LogicomeProfiler(){
    _input_data_file_name = "";
    _output_file_name = "";
    _number_of_samples = 0;
    _number_of_elements = 0;
    _criteria = 0;
    _alpha = 0.0;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x78(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0xa8(%rdi), %rax
movq %rax, (%rsp)
leaq 0xc0(%rdi), %rbp
leaq 0xd0(%rdi), %r14
xorl %r12d, %r12d
movl $0xc0, %edx
xorl %esi, %esi
callq 0x2140
movq %r14, 0xc0(%rbx)
movq %r12, 0xc8(%rbx)
movb %r12b, 0xd0(%rbx)
leaq 0xe0(%rbx), %r13
leaq 0xf0(%rbx), %r15
movq %r15, 0xe0(%rbx)
movq %r12, 0xe8(%rbx)
movb %r12b, 0xf0(%rbx)
leaq 0x69f2(%rip), %rcx      # 0x90e6
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x22f0
movq 0xe8(%rbx), %rdx
leaq 0x69d5(%rip), %rcx      # 0x90e6
movq %r13, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x22f0
movl $0x0, 0x114(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq (%r13), %rdi
cmpq %r15, %rdi
je 0x2752
callq 0x21f0
movq (%rbp), %rdi
cmpq %r14, %rdi
je 0x2760
callq 0x21f0
movq (%rsp), %rdi
callq 0x2856
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x277a
callq 0x21f0
movq 0x8(%rsp), %rdi
callq 0x28a0
movq 0x10(%rsp), %rdi
callq 0x28e0
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x279c
callq 0x21f0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x27aa
callq 0x21f0
leaq 0x18(%rbx), %rdi
callq 0x2926
movq %rbx, %rdi
callq 0x294e
movq %r12, %rdi
callq 0x2370
nop
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::Run()
void LogicomeProfiler::Run(){
  ReadData();
  CountElements();
  MakeLogicOccurrenceTensor();
  CalcLogFact();
  if(_criteria == 0){
    FirstScreeningForFWER();
    SecondScreeningForFWER();
  }else if(_criteria == 1){
    CalcPVForFDR();
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2aee
movq %rbx, %rdi
callq 0x2e56
movq %rbx, %rdi
callq 0x2f10
movq %rbx, %rdi
callq 0x3090
movl 0x114(%rbx), %eax
cmpl $0x1, %eax
je 0x2ae3
testl %eax, %eax
jne 0x2aec
movq %rbx, %rdi
callq 0x311c
movq %rbx, %rdi
popq %rbx
jmp 0x33d2
movq %rbx, %rdi
popq %rbx
jmp 0x3710
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::CountElements()
void LogicomeProfiler::CountElements(){
  _count_vector.reserve(_number_of_elements);
  for(int i = 0; i < _number_of_elements; i++){
    int count = 0;
    for(int j = 0; j < _number_of_samples;j++){
      if(_dataset[j][i]==true){
	count += 1;
      }
    }
    _count_vector.push_back(count);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
movslq 0x104(%rdi), %rsi
movq %r14, %rdi
callq 0x611c
cmpl $0x0, 0x104(%rbx)
jle 0x2f04
xorl %ebp, %ebp
leaq 0x4(%rsp), %r15
movl $0x0, 0x4(%rsp)
movslq 0x100(%rbx), %rdi
movl $0x0, %ecx
testq %rdi, %rdi
jle 0x2ed9
movq 0x18(%rbx), %rax
movl %ebp, %edx
shrl $0x6, %edx
movl $0x1, %esi
movl %ebp, %ecx
shlq %cl, %rsi
shlq $0x3, %rdi
leaq (%rdi,%rdi,4), %rdi
xorl %r8d, %r8d
xorl %ecx, %ecx
movq (%rax,%r8), %r9
testq %rsi, (%r9,%rdx,8)
je 0x2ed0
incl %ecx
movl %ecx, 0x4(%rsp)
addq $0x28, %r8
cmpq %r8, %rdi
jne 0x2ec0
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0x2eef
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%rbx)
jmp 0x2efa
movq %r14, %rdi
movq %r15, %rdx
callq 0x7c08
incl %ebp
cmpl 0x104(%rbx), %ebp
jl 0x2e87
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::MakeLogicOccurrenceTensor()
void LogicomeProfiler::MakeLogicOccurrenceTensor(){
  
  
  for(int i = 0; i < _number_of_elements; i++){
    vector<vector<int> > temp_matrix; temp_matrix.reserve(_number_of_elements);
    for(int j = 0; j < _number_of_elements;j++){
      vector<int> temp_vector; temp_vector.reserve(7);
      temp_vector.push_back(0);
      
      for(int k = 1;k <= 6;k++){
	int count = CountLogicOccurrence(i,j,k);
	temp_vector.push_back(count);
      }
      temp_matrix.push_back(temp_vector);
    }
    _logic_occurrence_tensor.push_back(temp_matrix);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x104(%rdi), %eax
testl %eax, %eax
jle 0x3053
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movslq %eax, %rsi
movq %r14, %rdi
callq 0x6048
cmpl $0x0, 0x104(%rbx)
jle 0x3030
xorl %r13d, %r13d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x7, %esi
movq %r15, %rdi
callq 0x611c
movl $0x0, 0xc(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2faf
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2fba
movq %r15, %rdi
movq %r12, %rdx
callq 0x7af0
movl $0x1, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
movl %r14d, %ecx
callq 0x5b60
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2fed
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2ff8
movq %r15, %rdi
movq %r12, %rdx
callq 0x7c08
incl %r14d
cmpl $0x7, %r14d
jne 0x2fc0
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x61ae
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3020
callq 0x21f0
incl %r13d
cmpl 0x104(%rbx), %r13d
jl 0x2f6c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61da
movq %r14, %rdi
callq 0x2a4c
incl %ebp
movl 0x104(%rbx), %eax
cmpl %eax, %ebp
jl 0x2f40
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x307d
jmp 0x306b
jmp 0x306b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x307d
callq 0x21f0
leaq 0x30(%rsp), %rdi
callq 0x2a4c
movq %rbx, %rdi
callq 0x2370
nop
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::CalcLogFact()
void LogicomeProfiler::CalcLogFact(){
  int N = _number_of_samples;
  _log_fact.resize(N+1,0.0);

  double temp = 0.0;
  for(int i = 1; i<=N;i++){
    temp += log(i);
    _log_fact[i] = temp;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x100(%rdi), %r14d
addq $0x90, %rbx
leal 0x1(%r14), %ebp
movslq %ebp, %rsi
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq %rbx, %rdi
callq 0x6014
testl %r14d, %r14d
jle 0x3111
movl %ebp, %r14d
xorps %xmm0, %xmm0
movl $0x1, %r15d
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
callq 0x21b0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x30d7
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::CalcProb(int, int, int, int, double)
double LogicomeProfiler::CalcProb(int x, int y, int z, int N, double threshold){
  int z_max = x > y ? y : x;
  double sum = 0.0;
  double temp = CalcCombination(N,y);
  for(int k = z; k<=z_max; k++){
    double prob = -temp;
    prob = prob + CalcCombination(x,k)+CalcCombination(N-x,y-k);
    prob = exp(prob);
    sum += prob;
    if(sum > threshold){
      return(sum);
    }
  }
  return(sum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x18(%rsp)
movq %rdi, (%rsp)
cmpl %edx, %esi
movl %edx, %ebp
cmovll %esi, %ebp
xorpd %xmm0, %xmm0
subl %ecx, %ebp
jl 0x56ea
movslq %r8d, %r14
movq (%rsp), %rax
movq 0x90(%rax), %rax
movslq %edx, %r15
movsd (%rax,%r15,8), %xmm0
movl %r14d, %edi
subl %edx, %edi
movslq %edi, %rdx
addsd (%rax,%rdx,8), %xmm0
movsd (%rax,%r14,8), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movslq %esi, %r13
movl %r14d, %eax
subl %esi, %eax
cltq
movq %rax, 0x8(%rsp)
movslq %ecx, %rbx
shlq $0x3, %r14
leaq (,%r15,8), %rax
subq %rax, %r14
leaq (,%r13,8), %rax
subq %rax, %r14
subq %rbx, %r15
movq %r13, %r12
subq %rbx, %r12
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq (%rsp), %rax
movq 0x90(%rax), %rax
movsd (%rax,%r13,8), %xmm1
leaq (%rax,%rbx,8), %rcx
movsd (%rax,%rbx,8), %xmm0
addsd (%rax,%r12,8), %xmm0
subsd %xmm0, %xmm1
subsd 0x10(%rsp), %xmm1
movq 0x8(%rsp), %rdx
movsd (%rax,%rdx,8), %xmm0
movsd (%rax,%r15,8), %xmm2
addsd (%r14,%rcx), %xmm2
subsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x2380
addsd 0x20(%rsp), %xmm0
subl $0x1, %ebp
setb %al
ucomisd 0x18(%rsp), %xmm0
ja 0x56ea
incq %rbx
decq %r15
decq %r12
testb %al, %al
je 0x5676
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::CountLogicOccurrence(int, int, int)
int LogicomeProfiler::CountLogicOccurrence(int a, int b, int l){
  int x = 0;
  for(int i = 0; i < _number_of_samples;i++){
    switch(l){
    case 1:
      if(_dataset[i][a]==true && _dataset[i][b]==true){
	x += 1;
      }
      break;
    case 2:
      if(!(_dataset[i][a]==true && _dataset[i][b]==true)){
	x += 1;
      }
      break;
    case 3:
      if(_dataset[i][a]==true || _dataset[i][b]==true){
	x += 1;
      }
      break;
    case 4:
      if(!(_dataset[i][a]==true || _dataset[i][b]==true)){
	x += 1;
      }
      break;
    case 5:
      if(_dataset[i][a]==true && _dataset[i][b]!=true){
	x += 1;
      }
      break;
    case 6:
      if(_dataset[i][a] !=true || _dataset[i][b]==true){
	x += 1;
      }
      break;
    }
  }
  return x;
}

// Assembly:
movslq 0x100(%rdi), %rax
testq %rax, %rax
jle 0x5cc5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %r8d
movq 0x18(%rdi), %rdi
movslq %esi, %rcx
leal 0x3f(%rcx), %esi
testl %ecx, %ecx
cmovnsl %ecx, %esi
sarl $0x6, %esi
movabsq $-0x8000000000000000, %r11 # imm = 0x8000000000000000
leaq 0x3f(%r11), %rbx
movq %rcx, %r9
andq %rbx, %r9
xorl %r10d, %r10d
cmpq %r11, %r9
setbe %r10b
movslq %esi, %rsi
leaq -0x8(,%r10,8), %r9
movl $0x1, %r10d
shlq %cl, %r10
movslq %edx, %rcx
leal 0x3f(%rcx), %ebp
testl %ecx, %ecx
cmovnsl %ecx, %ebp
movl $0x1, %edx
sarl $0x6, %ebp
movq %rcx, %r14
andq %rbx, %r14
xorl %ebx, %ebx
cmpq %r11, %r14
setbe %bl
shlq %cl, %rdx
movslq %ebp, %rcx
leaq -0x8(,%rbx,8), %r11
shlq $0x3, %rax
leaq (%rax,%rax,4), %rbx
xorl %r14d, %r14d
decl %r8d
leaq 0x34b3(%rip), %r15      # 0x90b8
xorl %eax, %eax
cmpl $0x5, %r8d
ja 0x5cad
movslq (%r15,%r8,4), %r12
addq %r15, %r12
jmpq *%r12
movq (%rdi,%r14), %r12
leaq (%r12,%rsi,8), %r13
testq %r10, (%r9,%r13)
je 0x5cad
leaq (%r12,%rcx,8), %r12
movq (%r11,%r12), %r12
andq %rdx, %r12
cmpq $0x1, %r12
sbbl $-0x1, %eax
jmp 0x5cad
movq (%rdi,%r14), %r12
leaq (%r12,%rsi,8), %r13
testq %r10, (%r9,%r13)
jne 0x5c7f
jmp 0x5cad
movq (%rdi,%r14), %r12
leaq (%r12,%rsi,8), %r13
testq %r10, (%r9,%r13)
jne 0x5cab
jmp 0x5ca1
movq (%rdi,%r14), %r12
leaq (%r12,%rsi,8), %r13
testq %r10, (%r9,%r13)
jne 0x5cad
jmp 0x5c7f
movq (%rdi,%r14), %r12
leaq (%r12,%rsi,8), %r13
testq %r10, (%r9,%r13)
je 0x5cab
leaq (%r12,%rcx,8), %r12
movq (%r11,%r12), %r12
andq %rdx, %r12
cmpq $0x1, %r12
adcl $0x0, %eax
jmp 0x5cad
movq (%rdi,%r14), %r12
leaq (%r12,%rsi,8), %r13
testq %r10, (%r9,%r13)
je 0x5cab
leaq (%r12,%rcx,8), %r12
testq %rdx, (%r11,%r12)
je 0x5cad
incl %eax
addq $0x28, %r14
cmpq %r14, %rbx
jne 0x5c07
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]fastscancount/benchmark/counters.cpp
// Function: scancount(std::vector<std::vector<unsigned int, std::allocator<unsigned int>> const*, std::allocator<std::vector<unsigned int, std::allocator<unsigned int>> const*>> const&, std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned long)
void scancount(const std::vector<const std::vector<uint32_t>*> &data,
               std::vector<uint32_t> &out, size_t threshold) {
  uint64_t largest = 0;
  for(auto z : data) {
    const std::vector<uint32_t> & v = *z;
    if(v[v.size() - 1] > largest) largest = v[v.size() - 1];
  }
  std::vector<uint8_t> counters(largest+1);
  out.clear();
  for (size_t c = 0; c < data.size(); c++) {
    const std::vector<uint32_t> &v = *data[c];
    for (size_t i = 0; i < v.size(); i++) {
      counters[v[i]]++;
    }
  }
  for (uint32_t i = 0; i < counters.size(); i++) {
    if (counters[i] > threshold)
      out.push_back(i);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x2850
xorl %esi, %esi
movq %rsi, %rdx
movq (%rax), %rsi
movq 0x8(%rsi), %rsi
movl -0x4(%rsi), %esi
cmpq %rsi, %rdx
cmovaq %rdx, %rsi
addq $0x8, %rax
cmpq %rcx, %rax
jne 0x282e
incq %rsi
jmp 0x2855
movl $0x1, %esi
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x588e
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x2871
movq %rax, 0x8(%r14)
movq (%r15), %rcx
movq 0x8(%r15), %rdx
cmpq %rcx, %rdx
je 0x28c8
xorl %eax, %eax
movq (%rcx,%rax,8), %rsi
movq (%rsi), %rdi
cmpq %rdi, 0x8(%rsi)
je 0x28b6
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
movq 0x8(%rsp), %rdi
incb (%rdi,%rdx)
incq %rcx
movq (%rsi), %rdi
movq 0x8(%rsi), %rdx
subq %rdi, %rdx
sarq $0x2, %rdx
cmpq %rdx, %rcx
jb 0x288e
movq (%r15), %rcx
movq 0x8(%r15), %rdx
incq %rax
movq %rdx, %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
cmpq %rsi, %rax
jb 0x287f
movl $0x0, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
cmpq %rdi, %rax
je 0x292f
xorl %ecx, %ecx
leaq 0x4(%rsp), %r15
movzbl (%rdi,%rcx), %edx
cmpq %rbx, %rdx
jbe 0x291a
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x2905
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x291a
movq %r14, %rdi
movq %r15, %rdx
callq 0x6d46
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x4(%rsp), %ecx
incl %ecx
movl %ecx, 0x4(%rsp)
movq %rax, %rdx
subq %rdi, %rdx
cmpq %rcx, %rdx
ja 0x28e6
testq %rdi, %rdi
je 0x2941
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2965
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]fastscancount/benchmark/counters.cpp
// Function: calc_boundaries(unsigned int, unsigned int, std::vector<unsigned int, std::allocator<unsigned int>> const&, std::vector<unsigned int, std::allocator<unsigned int>>&)
void calc_boundaries(uint32_t largest, uint32_t range_size, 
                    const std::vector<uint32_t>& data, 
                    std::vector<uint32_t>& range_ends) {
  if (!range_size) {
    throw std::runtime_error("range_size must be > 0");
  }
  uint32_t end = 0;
  range_ends.clear();
  
  for (uint32_t start = 0; start <= largest; start += range_size) {
    uint32_t curr_max = std::min(largest, start + range_size - 1);
    while (end < data.size() && data[end] <= curr_max) {
      end++;
    }
    range_ends.push_back(end);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x2a0f
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebp
movl $0x0, 0x4(%rsp)
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x29a0
movq %rax, 0x8(%rbx)
xorl %r13d, %r13d
leaq 0x4(%rsp), %r12
leal (%r15,%r13), %ecx
decl %ecx
cmpl %ebp, %ecx
cmovael %ebp, %ecx
movq (%r14), %rdx
movq 0x8(%r14), %rsi
subq %rdx, %rsi
sarq $0x2, %rsi
movl 0x4(%rsp), %eax
cmpq %rax, %rsi
jbe 0x29d7
cmpl %ecx, (%rdx,%rax,4)
ja 0x29d7
incl %eax
movl %eax, 0x4(%rsp)
jmp 0x29c5
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x29ed
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x29f8
movq %rbx, %rdi
movq %r12, %rdx
callq 0x6d46
addl %r15d, %r13d
cmpl %ebp, %r13d
jbe 0x29a8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x5625(%rip), %rsi      # 0x8048
movq %rax, %rdi
callq 0x20f0
movq 0x95be(%rip), %rsi      # 0xbff0
movq 0x957f(%rip), %rdx      # 0xbfb8
movq %rbx, %rdi
callq 0x2380
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a0
movq %r14, %rdi
callq 0x2390
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]fastscancount/benchmark/counters.cpp
// Function: calc_alldata_boundaries(std::vector<std::vector<unsigned int, std::allocator<unsigned int>>, std::allocator<std::vector<unsigned int, std::allocator<unsigned int>>>> const&, std::vector<std::vector<unsigned int, std::allocator<unsigned int>>, std::allocator<std::vector<unsigned int, std::allocator<unsigned int>>>>&, unsigned long)
void calc_alldata_boundaries(const std::vector<std::vector<uint32_t>>& data,
                             std::vector<std::vector<uint32_t>>& range_ends,
                             size_t range_size) {
  uint32_t largest = 0;
  range_ends.clear();
  range_ends.resize(data.size());
  for(const auto& v : data) {
    if (!v.empty() && v[v.size() - 1] > largest) largest = v[v.size() - 1];
  }
  for (unsigned i = 0; i < data.size(); ++i) {
    calc_boundaries(largest, range_size, data[i], range_ends[i]); 
  }
}

// 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), %rsi
movq %r14, %rdi
callq 0x6e22
movq 0x8(%r15), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r12, %rsi
movq %r14, %rdi
callq 0x59ae
movq (%r15), %rdx
movq 0x8(%r15), %rax
cmpq %rax, %rdx
je 0x2b00
xorl %ebp, %ebp
movq %rdx, %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, (%rcx)
je 0x2ab6
movl -0x4(%rsi), %esi
cmpl %ebp, %esi
cmoval %esi, %ebp
addq $0x18, %rcx
cmpq %rax, %rcx
jne 0x2aa5
cmpq %rax, %rdx
je 0x2b00
movl $0x1, %r13d
xorl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rcx
addq %rcx, %rdx
addq (%r14), %rcx
movl %ebp, %edi
movl %ebx, %esi
callq 0x296d
movl %r13d, %eax
movq (%r15), %rdx
movq 0x8(%r15), %rcx
subq %rdx, %rcx
sarq $0x3, %rcx
imulq %r12, %rcx
incl %r13d
cmpq %rax, %rcx
ja 0x2acc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]fastscancount/benchmark/maropuparser.h
// Function: MaropuGapReader::open()
bool open() {
    close();
    fd = ::fopen(mFilename.c_str(), "rb");
    if (fd == NULL) {
      return false;
    }
    setvbuf(fd, NULL, _IOFBF, 1024 * 4); // large buffer
    return true;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x5db3
callq 0x2210
movq $0x0, 0x20(%r14)
movq (%r14), %rdi
leaq 0x247b(%rip), %rsi      # 0x8238
callq 0x2270
movq %rax, %rbx
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x5ddf
movl $0x1000, %ecx           # imm = 0x1000
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2030
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]fastscancount/benchmark/maropuparser.h
// Function: bool MaropuGapReader::loadIntegers<std::vector<unsigned int, std::allocator<unsigned int>>>(std::vector<unsigned int, std::allocator<unsigned int>>&)
bool loadIntegers(container &buffer) {
    uint32_t qty = 0;
    if (!ReadQty(qty))
      return false; // EOF
    buffer.resize(qty);
    errno = 0;
    size_t result = fread(buffer.data(), sizeof(uint32_t), buffer.size(), fd);
    if (result != buffer.size()) {
      if (!errno) {
        // If we can't read, the file maybe truncated, i.e., corrupt
        throw std::runtime_error("The file appears to be truncated/corrupt!");
      }
      std::stringstream err;
      err << "Error reading from file, IO status: " << strerror(errno);
      throw std::runtime_error(err.str());
    }
    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
callq 0x7ab8
movl %eax, %ebp
testb %al, %al
je 0x5ee5
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x58ee
callq 0x2050
movq %rax, %rbx
movl $0x0, (%rax)
movq (%r14), %rdi
movq 0x8(%r14), %rdx
subq %rdi, %rdx
sarq $0x2, %rdx
movq 0x20(%r15), %rcx
movl $0x4, %esi
callq 0x22d0
movq 0x8(%r14), %rcx
subq (%r14), %rcx
sarq $0x2, %rcx
cmpq %rcx, %rax
jne 0x5ef5
movl %ebp, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, (%rbx)
jne 0x5f2c
movl $0x10, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x2479(%rip), %rsi      # 0x8387
movq %rax, %rdi
callq 0x20f0
movq 0x60d3(%rip), %rsi      # 0xbff0
movq 0x6094(%rip), %rdx      # 0xbfb8
movq %rbx, %rdi
callq 0x2380
leaq 0x30(%rsp), %rdi
callq 0x2180
leaq 0x40(%rsp), %r14
leaq 0x246f(%rip), %rsi      # 0x83b1
movl $0x24, %edx
movq %r14, %rdi
callq 0x2260
movl (%rbx), %edi
callq 0x20d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x2200
movl $0x10, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x48(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x2320
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2350
xorl %ebp, %ebp
movq 0x605a(%rip), %rsi      # 0xbff0
movq 0x601b(%rip), %rdx      # 0xbfb8
movq %rbx, %rdi
callq 0x2380
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5fc3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2230
testb %bpl, %bpl
jne 0x5fcd
jmp 0x5fe7
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a0
jmp 0x5fe7
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a0
jmp 0x6005
movq %rax, %r14
movq 0x5fb2(%rip), %rsi      # 0xbfa0
leaq 0x30(%rsp), %rdi
callq 0x21b0
leaq 0xb0(%rsp), %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x2390
nop