LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::flush_nx()
bool ostream::flush_nx() noexcept
{
    if (!good()) {
        return false;
    }

    while (buf->get_length() > 0) {
        char *ptr = buf->get_ptr(0);
        unsigned len = buf->get_contiguous_length(ptr);

        unsigned iovs_to_write = 1;
        struct iovec bufv[2];

        bufv[0].iov_base = ptr;
        bufv[0].iov_len = len;
        if (buf->get_length() != len) {
            // buffer's data in streambuf is split into two parts in this case because of cpbuffer nature.
            iovs_to_write = 2;
            bufv[1].iov_base = buf->get_buf_base();
            bufv[1].iov_len = buf->get_length() - len;
        }

        ssize_t r = writev_unintr(fd, bufv, iovs_to_write);
        if (r < 0) {
            io_error = errno;
            return false;
        }
        buf->consume(r);
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x1fef0
testb $0x1, %al
jne 0x20526
movb $0x0, -0x1(%rbp)
jmp 0x20669
jmp 0x20528
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
callq 0x21e20
cmpl $0x0, %eax
jbe 0x20665
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
xorl %esi, %esi
callq 0x21d50
movq %rax, -0x58(%rbp)
jmp 0x20563
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x21d90
movl %eax, -0x5c(%rbp)
jmp 0x20589
movq -0x50(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x38(%rbp)
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
callq 0x21e20
cmpl -0x1c(%rbp), %eax
je 0x20607
movq -0x50(%rbp), %rdi
movl $0x2, -0x20(%rbp)
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
callq 0x21e40
movq %rax, -0x68(%rbp)
jmp 0x205e1
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
callq 0x21e20
subl -0x1c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x50(%rbp), %rax
movl (%rax), %edi
movl -0x20(%rbp), %edx
leaq -0x40(%rbp), %rsi
callq 0x21e50
movl %eax, -0x6c(%rbp)
jmp 0x2061e
movl -0x6c(%rbp), %eax
cltq
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jge 0x20645
callq 0x5050
movq %rax, %rcx
movq -0x50(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x20669
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
movq -0x48(%rbp), %rax
movl %eax, %esi
callq 0x21ea0
jmp 0x20528
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x103e0
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0xb(%rbp)
jl 0x206b2
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22070
movb %al, -0xb(%rbp)
movq -0x18(%rbp), %rdi
movb -0xb(%rbp), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
callq 0x20420
andb $0x1, %al
movb %al, -0xa(%rbp)
testb $0x1, -0xa(%rbp)
jne 0x206f2
movq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x1ff20
testb $0x1, -0x9(%rbp)
je 0x206f0
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x1ff20
jmp 0x206f2
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::ostream::current_state()
int ostream::current_state() noexcept
{
    int bits = 0;
    if (!buf) bits |= io_states::buffer_fail_bit;
    if (io_error) bits |= io_states::io_fail_bit;
    return bits;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
addq $0x8, %rdi
callq 0x21ce0
testb $0x1, %al
jne 0x20731
movl -0xc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x20744
movl -0xc(%rbp), %eax
orl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x20cf0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x20d62
movq -0x28(%rbp), %rdi
movl $0xa, %esi
callq 0x1ff20
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rsi
callq 0x20d70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x20dfa
movq -0x20(%rbp), %rdi
movl $0xa, %esi
callq 0x1ff20
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
movl -0x14(%rbp), %edx
callq 0x220c0
movl %eax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x18(%rbp)
movb %al, -0x21(%rbp)
jge 0x20ed1
callq 0x5050
cmpl $0x4, (%rax)
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x20e97
cmpl $0x0, -0x18(%rbp)
jne 0x20eef
movq -0x20(%rbp), %rax
movb $0x1, 0x14(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x20f15
cmpl $0x0, -0x18(%rbp)
jge 0x20f0f
callq 0x5050
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x10(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x20f15
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x20f9a
movq -0x28(%rbp), %rdi
callq 0x210b0
testb $0x1, %al
jne 0x20f51
jmp 0x20f9a
movl $0x1, %edi
callq 0x51c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
callq 0x221a0
jmp 0x20f6c
movq -0x30(%rbp), %rdi
leaq 0x10db9(%rip), %rsi     # 0x31d30
xorl %eax, %eax
movl %eax, %edx
callq 0x56b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x52f0
jmp 0x2109a
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x20fe1
movq -0x28(%rbp), %rdi
callq 0x210d0
testb $0x1, %al
jne 0x20fb4
jmp 0x20fe1
movl $0x8, %edi
callq 0x51c0
movq %rax, %rdi
movq %rdi, -0x38(%rbp)
callq 0x21fe0
movq -0x38(%rbp), %rdi
movq 0x10fcb(%rip), %rsi     # 0x31fa0
movq 0x10f94(%rip), %rdx     # 0x31f70
callq 0x56b0
movl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x21028
movq -0x28(%rbp), %rdi
callq 0x21100
testb $0x1, %al
jne 0x20ffb
jmp 0x21028
movl $0x8, %edi
callq 0x51c0
movq %rax, %rdi
movq %rdi, -0x40(%rbp)
callq 0x21fe0
movq -0x40(%rbp), %rdi
movq 0x10f84(%rip), %rsi     # 0x31fa0
movq 0x10f4d(%rip), %rdx     # 0x31f70
callq 0x56b0
movl -0xc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x21094
movq -0x28(%rbp), %rdi
callq 0x21120
cmpl $0x0, %eax
je 0x21094
movl $0x4, %edi
callq 0x51c0
movq -0x28(%rbp), %rdi
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
callq 0x21120
movq -0x48(%rbp), %rdi
movl %eax, %esi
callq 0x22020
jmp 0x21069
movq -0x50(%rbp), %rdi
leaq 0x10ca4(%rip), %rsi     # 0x31d18
xorl %eax, %eax
movl %eax, %edx
callq 0x56b0
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x52f0
jmp 0x2109a
addq $0x50, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x56f0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movb %sil, %al
callq 0x5300
movl %eax, -0x30(%rbp)
jmp 0x2116b
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, (%rax)
jge 0x21193
callq 0x5050
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x2122d
movl $0x4008, %edi           # imm = 0x4008
movq 0x10db9(%rip), %rsi     # 0x31f58
callq 0x57b0
movq %rax, %rcx
movq %rcx, -0x48(%rbp)
movb $0x0, -0x29(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x40(%rbp)
je 0x211d4
movq -0x48(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movb $0x1, -0x29(%rbp)
callq 0x1bd70
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x1bda0
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
leaq -0x20(%rbp), %rsi
callq 0x18830
leaq -0x20(%rbp), %rdi
callq 0x1bdd0
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x21ce0
testb $0x1, %al
jne 0x21229
movq -0x38(%rbp), %rax
movl (%rax), %edi
callq 0x5770
jmp 0x21219
movq -0x38(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movb $0x0, -0x1(%rbp)
jmp 0x2122d
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x103e0
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x4008, %edi           # imm = 0x4008
movq 0x10cb1(%rip), %rsi     # 0x31f58
callq 0x57b0
movq %rax, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, -0x29(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x38(%rbp)
je 0x212d8
movq -0x40(%rbp), %rdi
movb $0x1, -0x29(%rbp)
callq 0x1bd70
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x1bda0
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
leaq -0x28(%rbp), %rsi
callq 0x18830
leaq -0x28(%rbp), %rdi
callq 0x1bdd0
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
callq 0x21ce0
testb $0x1, %al
jne 0x21316
movb $0x0, -0x1(%rbp)
jmp 0x21352
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
xorl %eax, %eax
callq 0x5300
movl %eax, -0x4c(%rbp)
jmp 0x21329
movq -0x48(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, (%rax)
jge 0x2134e
callq 0x5050
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x21352
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x103e0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x4008, %edi           # imm = 0x4008
movq 0x10b6e(%rip), %rsi     # 0x31f58
callq 0x57b0
movq %rax, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, -0x29(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x38(%rbp)
je 0x2141b
movq -0x40(%rbp), %rdi
movb $0x1, -0x29(%rbp)
callq 0x1bd70
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x1bda0
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
leaq -0x28(%rbp), %rsi
callq 0x18830
leaq -0x28(%rbp), %rdi
callq 0x1bdd0
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
callq 0x21ce0
testb $0x1, %al
jne 0x21459
movb $0x0, -0x1(%rbp)
jmp 0x21498
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
xorl %eax, %eax
callq 0x5300
movl %eax, -0x4c(%rbp)
jmp 0x2146f
movq -0x48(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, (%rax)
jge 0x21494
callq 0x5050
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x21498
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x103e0
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, (%rax)
jge 0x21539
movq -0x18(%rbp), %rdi
callq 0x215b0
testb $0x1, %al
jne 0x21528
jmp 0x21533
movq -0x18(%rbp), %rax
movl $0x9, 0x10(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x21593
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22040
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x5770
movl %eax, -0x1c(%rbp)
jmp 0x2155a
movl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jge 0x2157f
callq 0x5050
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x10(%rax)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movb $0x0, -0x1(%rbp)
jmp 0x21593
movq -0x18(%rbp), %rdi
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
callq 0x215b0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x103e0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0xb(%rbp)
jl 0x21612
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22070
movb %al, -0xb(%rbp)
movq -0x18(%rbp), %rdi
movb -0xb(%rbp), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
callq 0x21500
andb $0x1, %al
movb %al, -0xa(%rbp)
testb $0x1, -0xa(%rbp)
jne 0x21652
movq -0x18(%rbp), %rdi
movl $0xd, %esi
callq 0x20f20
testb $0x1, -0x9(%rbp)
je 0x21650
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x20f20
jmp 0x21652
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: davmac314[P]dinit/src/dinit-iostream.cc
// Function: dio::istream::current_state()
int istream::current_state() noexcept
{
    int bits = 0;
    if (eof_state) bits |= io_states::eof_bit;
    if (!buf) bits |= io_states::buffer_fail_bit;
    if (string_failed) bits |= io_states::input_fail_bit;
    if (io_error) bits |= io_states::io_fail_bit;
    return bits;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
testb $0x1, 0x14(%rax)
je 0x2168a
movl -0xc(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x21ce0
testb $0x1, %al
jne 0x216a4
movl -0xc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0x216b7
movl -0xc(%rbp), %eax
orl $0x4, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x216ca
movl -0xc(%rbp), %eax
orl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x215b0
testb $0x1, %al
jne 0x2172a
movb $0x0, -0x2(%rbp)
movb $0x0, -0x1(%rbp)
jmp 0x217b1
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
callq 0x21e20
cmpl $0x0, %eax
jne 0x21767
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x20e80
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x21765
movb $0x0, -0x2(%rbp)
movb $0x0, -0x1(%rbp)
jmp 0x217b1
jmp 0x21767
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
xorl %esi, %esi
callq 0x21d50
movq %rax, -0x28(%rbp)
jmp 0x21784
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x15(%rbp)
addq $0x8, %rdi
callq 0x21d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x21ea0
movb $0x1, -0x2(%rbp)
movb -0x15(%rbp), %al
movb %al, -0x1(%rbp)
movw -0x2(%rbp), %ax
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x103e0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x21700
movw %ax, -0xa(%rbp)
testb $0x1, -0xa(%rbp)
jne 0x21801
movq -0x18(%rbp), %rdi
movl $0xf, %esi
callq 0x20f20
movb -0x9(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl $0xf, %esi
callq 0x20f20
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsbl -0x11(%rbp), %edx
callq 0x21810
andb $0x1, %al
movb %al, -0x12(%rbp)
testb $0x1, -0x12(%rbp)
jne 0x21bb1
movq -0x20(%rbp), %rdi
movl $0xe, %esi
callq 0x20f20
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x215b0
testb $0x1, %al
jne 0x21bec
movb $0x0, -0x1(%rbp)
jmp 0x21c28
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movsbl -0x19(%rbp), %edx
callq 0x21810
andb $0x1, %al
movb %al, -0x1a(%rbp)
testb $0x1, -0x1a(%rbp)
jne 0x21c24
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x21c1c
movq -0x28(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0x21c22
movb $0x0, -0x1(%rbp)
jmp 0x21c28
jmp 0x21c24
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: davmac314[P]dinit/src/includes/dinit-iostream.h
// Function: dio::io_base::writev_unintr(int, iovec*, int)
static int writev_unintr(int fd, struct iovec *vec, int vec_count)
    {
        int r;
        do {
            r = bp_sys::writev(fd, vec, vec_count);
        } while (r < 1 && errno == EINTR);
        return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x51f0
movl %eax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x18(%rbp)
movb %al, -0x19(%rbp)
jge 0x21e8d
callq 0x5050
cmpl $0x4, (%rax)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x21e62
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: ttalvitie[P]traveling-santa/optimize.cpp
// Function: Vec3::fromLatLong(double, double)
static Vec3 fromLatLong(double la, double lo) {
		la *= DegToRadCoef;
		lo *= DegToRadCoef;
		double x = cos(lo) * cos(la);
		double y = sin(lo) * cos(la);
		double z = sin(la);
		return Vec3(x, y, z);
	}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x38(%rsp)
movsd 0xb92e(%rip), %xmm0     # 0x14640
mulsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0xb91a(%rip), %xmm0     # 0x14640
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
callq 0x3460
movsd %xmm0, (%rsp)
movsd 0x40(%rsp), %xmm0
callq 0x3460
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
callq 0x3040
movsd %xmm0, 0x8(%rsp)
movsd 0x40(%rsp), %xmm0
callq 0x3460
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x40(%rsp), %xmm0
callq 0x3040
movq 0x10(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
callq 0x8cb0
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x5, -0x4(%rbp)
je 0x25e4
movq 0x1ea19(%rip), %rdi     # 0x20fd8
leaq 0x13a3e(%rip), %rsi     # 0x16004
callq 0x2230
movq %rax, %rdi
movq 0x1e9f3(%rip), %rsi     # 0x20fc8
callq 0x2260
movl $0x1, %edi
callq 0x22a0
leaq -0x128(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x2660
movq -0x140(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8390
jmp 0x2609
leaq -0x128(%rbp), %rdi
callq 0x4a60
jmp 0x2617
leaq -0x128(%rbp), %rdi
callq 0x2800
xorl %eax, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x130(%rbp)
movl %eax, -0x134(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x2800
movq -0x130(%rbp), %rdi
callq 0x23b0
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
callq 0x28a0
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x68(%rbp)
callq 0x28c0
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x60(%rbp)
callq 0x28e0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
movq %rdi, -0x58(%rbp)
callq 0x2900
movq -0x30(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x50(%rbp)
callq 0x2920
movq -0x30(%rbp), %rdi
addq $0x78, %rdi
movq %rdi, -0x48(%rbp)
callq 0x2940
movq -0x30(%rbp), %rdi
addq $0x90, %rdi
movq %rdi, -0x40(%rbp)
callq 0x2960
movq -0x30(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0x38(%rbp)
callq 0x2980
movq -0x30(%rbp), %rdi
addq $0xc0, %rdi
movq %rdi, -0x20(%rbp)
callq 0x22e0
movq -0x30(%rbp), %rdi
addq $0xe0, %rdi
movq %rdi, -0x28(%rbp)
callq 0x22e0
movq -0x20(%rbp), %rdi
leaq 0x1397e(%rip), %rsi     # 0x160ae
callq 0x22c0
jmp 0x2737
movq -0x70(%rbp), %rdi
addq $0xe0, %rdi
leaq 0x13965(%rip), %rsi     # 0x160ae
callq 0x22c0
jmp 0x2750
movq -0x70(%rbp), %rax
movl $0x0, 0x100(%rax)
movl $0x0, 0x104(%rax)
movl $0x0, 0x114(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x108(%rax)
addq $0x70, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x2180
movq -0x20(%rbp), %rdi
callq 0x2180
movq -0x38(%rbp), %rdi
callq 0x29a0
movq -0x40(%rbp), %rdi
callq 0x2a00
movq -0x48(%rbp), %rdi
callq 0x2a60
movq -0x50(%rbp), %rdi
callq 0x2ac0
movq -0x58(%rbp), %rdi
callq 0x2b20
movq -0x60(%rbp), %rdi
callq 0x2b80
movq -0x68(%rbp), %rdi
callq 0x2be0
movq -0x30(%rbp), %rdi
callq 0x2c40
movq -0x10(%rbp), %rdi
callq 0x23b0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x4ae0
movq -0x10(%rbp), %rdi
callq 0x4fe0
movq -0x10(%rbp), %rdi
callq 0x50c0
movq -0x10(%rbp), %rdi
callq 0x5240
movq -0x10(%rbp), %rax
cmpl $0x0, 0x114(%rax)
jne 0x4ab5
movq -0x10(%rbp), %rdi
callq 0x52e0
movq -0x10(%rbp), %rdi
callq 0x5580
jmp 0x4acd
movq -0x10(%rbp), %rax
cmpl $0x1, 0x114(%rax)
jne 0x4acb
movq -0x10(%rbp), %rdi
callq 0x59d0
jmp 0x4acd
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq %rax, %rdi
addq $0x30, %rdi
movslq 0x104(%rax), %rsi
callq 0x9270
movl $0x0, -0xc(%rbp)
movq -0x30(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x104(%rcx), %eax
jge 0x50ab
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x100(%rcx), %eax
jge 0x508c
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movslq -0x14(%rbp), %rsi
callq 0x90a0
movq %rax, %rdi
movslq -0xc(%rbp), %rsi
callq 0x90c0
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9120
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x507f
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x5081
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x502f
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
leaq -0x10(%rbp), %rsi
callq 0x93a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x500e
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x68(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x104(%rcx), %eax
jge 0x5223
leaq -0x28(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x9150
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rdi
movslq 0x104(%rax), %rsi
callq 0x9170
jmp 0x5114
movl $0x0, -0x38(%rbp)
movq -0x68(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x104(%rcx), %eax
jge 0x51f2
leaq -0x50(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x28e0
movq -0x78(%rbp), %rdi
movl $0x7, %esi
callq 0x9270
jmp 0x514b
movl $0x0, -0x54(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x9370
jmp 0x5161
movl $0x1, -0x58(%rbp)
cmpl $0x6, -0x58(%rbp)
jg 0x51cc
movq -0x68(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x38(%rbp), %edx
movl -0x58(%rbp), %ecx
callq 0x7f00
movl %eax, -0x7c(%rbp)
jmp 0x5185
movl -0x7c(%rbp), %eax
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x5c(%rbp), %rsi
callq 0x93a0
jmp 0x519a
jmp 0x519c
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x5168
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5218
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2b80
jmp 0x5218
leaq -0x28(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9410
jmp 0x51db
leaq -0x50(%rbp), %rdi
callq 0x2b80
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x511b
movq -0x68(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x9480
jmp 0x5201
leaq -0x28(%rbp), %rdi
callq 0x46d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x50de
leaq -0x28(%rbp), %rdi
callq 0x46d0
jmp 0x522c
addq $0x80, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x23b0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl 0x100(%rdi), %eax
movl %eax, -0xc(%rbp)
addq $0x90, %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
leaq -0x18(%rbp), %rdx
callq 0x8fb0
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x52d9
movl -0x24(%rbp), %edi
callq 0x9060
movq -0x30(%rbp), %rdi
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
addq $0x90, %rdi
movslq -0x24(%rbp), %rsi
callq 0x9080
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x528d
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x7506
movl -0x18(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x750c
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, -0x2c(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movl -0x20(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x7e70
movsd %xmm0, -0x40(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x75f7
movq -0x58(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x14(%rbp), %esi
movl -0x44(%rbp), %edx
callq 0x7e70
movq -0x58(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movl -0x20(%rbp), %esi
subl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
subl -0x44(%rbp), %edx
callq 0x7e70
movaps %xmm0, %xmm1
movsd -0x68(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
callq 0x23d0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x75e7
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x7601
jmp 0x75e9
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x7534
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::SetParameters(char**)
void LogicomeProfiler::SetParameters(char* argv[]){
  _input_data_file_name = argv[1];
  _output_file_name = argv[2];
  _criteria = atoi(argv[3]);
  _alpha = atof(argv[4]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0xc0, %rdi
callq 0x22c0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
addq $0xe0, %rdi
callq 0x22c0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2330
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x114(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x22b0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x108(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: lemire[P]fastscancount/include/fastscancount.h
// Function: fastscancount::(anonymous namespace)::natefastscancount_finalcheck(unsigned char*, unsigned long&, unsigned int const*, unsigned long, unsigned long, unsigned char, unsigned int*)
uint32_t *natefastscancount_finalcheck(uint8_t *counters, size_t &it,
                                       const uint32_t *d, size_t start,
                                       size_t itend, uint8_t threshold,
                                       uint32_t *out) {
  uint8_t *const deccounters = counters - start;
  size_t i = it;
  for (; i < itend; i++) {
    uint32_t val = d[i];
    uint8_t *location = deccounters + val;
    uint8_t c = *location;
    if (c == threshold) {
      *out++ = val;
    }
    *location = c + 1;
  }
  it = i;
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %r9b, %al
movq 0x10(%rbp), %r9
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subq -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3c0a
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3bed
movl -0x44(%rbp), %ecx
movq 0x10(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, 0x10(%rbp)
movl %ecx, (%rax)
movzbl -0x51(%rbp), %eax
addl $0x1, %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3b9e
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: lemire[P]fastscancount/include/fastscancount.h
// Function: fastscancount::(anonymous namespace)::natefastscancount_maincheck(unsigned char*, unsigned long&, unsigned int const*, unsigned long, unsigned long, unsigned char, unsigned int*)
uint32_t *natefastscancount_maincheck(uint8_t *counters, size_t &it,
                                      const uint32_t *d, size_t start,
                                      size_t range, uint8_t threshold,
                                      uint32_t *out) {
  range += start;
  counters -= start;
  size_t i = it;
  for (uint32_t val = d[i]; val < range; val = d[++i]) {
    uint8_t c = counters[val];
    if (c == threshold) *out++ = val;
    counters[val] = c + 1;
  }
  it = i;
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %r9b, %al
movq 0x10(%rbp), %r9
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpq -0x28(%rbp), %rax
jae 0x3ce0
movq -0x8(%rbp), %rax
movl -0x3c(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x3d(%rbp)
movzbl -0x3d(%rbp), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3cb1
movl -0x3c(%rbp), %ecx
movq 0x10(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, 0x10(%rbp)
movl %ecx, (%rax)
movzbl -0x3d(%rbp), %eax
addl $0x1, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x3c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
jmp 0x3c7b
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x401f
movl $0x10, %edi
callq 0x3160
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x10055(%rip), %rsi     # 0x1403c
callq 0x3100
jmp 0x3fee
movq -0x40(%rbp), %rdi
movq 0x19ff7(%rip), %rsi     # 0x1dff0
movq 0x19fb8(%rip), %rdx     # 0x1dfb8
callq 0x3450
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3200
jmp 0x40cf
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7c60
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
ja 0x40c9
movl -0x2c(%rbp), %eax
addl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
leaq -0x4(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x7d30
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7a40
movq -0x50(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x41(%rbp)
jae 0x409a
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, %esi
callq 0x7a20
movl (%rax), %eax
cmpl -0x30(%rbp), %eax
setbe %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x40a3
jmp 0x40ae
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4060
movq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7cc0
movl -0x8(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x4036
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3470
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7d70
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7e20
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x7d90
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x7e50
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x7e80
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x7eb0
testb $0x1, %al
jne 0x4159
jmp 0x41d1
leaq -0x30(%rbp), %rdi
callq 0x7ef0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x7f10
testb $0x1, %al
jne 0x41c1
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
callq 0x7a40
movq -0x58(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x7a20
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x41c1
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rdi
callq 0x7a40
movq -0x60(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x7a20
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x41c3
leaq -0x30(%rbp), %rdi
callq 0x7f50
jmp 0x4146
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7e20
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jae 0x423e
movl -0x1c(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movl %eax, -0x74(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0x7f70
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0x7f90
movl -0x78(%rbp), %edi
movl -0x74(%rbp), %esi
movq -0x70(%rbp), %rdx
movq %rax, %rcx
callq 0x3fb0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x41d8
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)