LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: MemoryMap::open(char const*)
bool open(const char* fn)
    {
        int fd = ::open(fn, O_RDONLY);

        if (fd < 0)
        {
            return false;
        }

        off_t end = lseek(fd, 0, SEEK_END);

        if (end == -1)
        {
            LOG_CONTEXT("could not seek to end of %s", fn);
            return false;
        }

        off_t beg = lseek(fd, 0, SEEK_SET);

        if (beg == -1)
        {
            LOG_CONTEXT("could not seek to beg of %s", fn);
            return false;
        }

        len_ = end;
        data_ = mmap(0, len_, PROT_READ, MAP_SHARED, fd, 0);

        if (!data_)
        {
            LOG_CONTEXT("could not mmap %s", fn);
            close(fd);
            return false;
        }

        int rc = ::close(fd);
        UNUSED(rc);

        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3190
testl %eax, %eax
js 0x8ebc
movl %eax, %ebp
movl %eax, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x3380
cmpq $-0x1, %rax
je 0x8e84
movq %rax, %r15
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3380
cmpq $-0x1, %rax
je 0x8e9c
movq %r15, 0x8(%r14)
xorl %edi, %edi
movq %r15, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x3360
movq %rax, (%r14)
testq %rax, %rax
je 0x8eca
movl %ebp, %edi
callq 0x33b0
movb $0x1, %r15b
jmp 0x8ebc
leaq 0x247e(%rip), %rdi      # 0xb309
leaq 0x2864(%rip), %rdx      # 0xb6f6
xorl %r15d, %r15d
movl $0x76, %esi
jmp 0x8eb2
leaq 0x2466(%rip), %rdi      # 0xb309
leaq 0x2868(%rip), %rdx      # 0xb712
xorl %r15d, %r15d
movl $0x7e, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xa3f4
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2438(%rip), %rdi      # 0xb309
leaq 0x2856(%rip), %rdx      # 0xb72e
xorl %r15d, %r15d
movl $0x87, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xa3f4
movl %ebp, %edi
callq 0x33b0
jmp 0x8ebc
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: void MemoryFile::load_mapped_vector<unsigned int>(MappedVector<unsigned int>&)
void load_mapped_vector(MappedVector<T> &out)
    {
        const RawMappedVector<T>* foo = load_raw_mapped_vector<T>();

        if (!foo)
        {
            FATAL_ERROR("could not load_mapped_vector");
        }

        out.init(foo);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x900a
movq %rax, %r14
testq %rax, %rax
jne 0x8ffe
leaq 0x231e(%rip), %rdi      # 0xb309
leaq 0x27c7(%rip), %rdx      # 0xb7b9
movl $0x195, %esi            # imm = 0x195
xorl %eax, %eax
callq 0xa50c
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: RawMappedVector<unsigned int> const* MemoryFile::load_raw_mapped_vector<unsigned int>()
const RawMappedVector<T>* load_raw_mapped_vector()
    {
        const char* type = load_type();

        if (type == 0)
        {
            return 0;
        }

        if (memcmp(type, "PODV", 4) != 0)
        {
            return 0;
        }

        const unsigned* len = load_unsigned();

        if (len == 0)
        {
            return 0;
        }

        return (const RawMappedVector<T>*)(get_mem(*len));
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jae 0x9023
xorl %eax, %eax
jmp 0x9031
movq (%rbx), %rax
addq %rcx, %rax
addq $0x4, %rcx
movq %rcx, 0x10(%rbx)
testq %rax, %rax
je 0x903e
cmpl $0x56444f50, (%rax)     # imm = 0x56444F50
je 0x9042
xorl %eax, %eax
popq %rbx
retq
movq %rbx, %rdi
callq 0x9070
testq %rax, %rax
je 0x903e
movl (%rax), %ecx
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
subq %rdx, %rax
cmpq %rcx, %rax
jb 0x903e
movq (%rbx), %rax
addq %rdx, %rax
addq %rdx, %rcx
movq %rcx, 0x10(%rbx)
jmp 0x9040
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: MemoryFile::load_mapped_string_vector(MappedStringVector&)
void load_mapped_string_vector(MappedStringVector &out)
    {
        const RawMappedVector<unsigned>* foo = 
            load_raw_mapped_vector<unsigned>();

        if (!foo)
        {
            FATAL_ERROR("could not load_mapped_string_vector indices");
        }

        const RawMappedVector<char>* str = load_raw_mapped_vector<char>();

        if (!str)
        {
            FATAL_ERROR("could not load_mapped_string_vector strings");
        }

        out.init(str->data_, foo);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x900a
movq %rax, %r14
testq %rax, %rax
jne 0x90ee
leaq 0x222e(%rip), %rdi      # 0xb309
leaq 0x2716(%rip), %rdx      # 0xb7f8
movl $0x1a2, %esi            # imm = 0x1A2
xorl %eax, %eax
callq 0xa50c
movq %r15, %rdi
callq 0x9164
movq %rax, %r15
testq %rax, %rax
jne 0x9118
leaq 0x2204(%rip), %rdi      # 0xb309
leaq 0x2718(%rip), %rdx      # 0xb824
movl $0x1a9, %esi            # imm = 0x1A9
xorl %eax, %eax
callq 0xa50c
addq $0x4, %r15
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: void query<FileReader>(FileReader&, GeoData&)
inline void query(T &reader, GeoData &data)
{
    IPParser parser;
    IPScanner scanner(data);

    IPResultEmitter emitter;

    reader | parser | scanner | emitter;
    reader.produce();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x90(%rsp), %r14
movq %rax, -0x18(%r14)
leaq 0x697f(%rip), %rcx      # 0xfc78
movq %rcx, -0x20(%r14)
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0xb0(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq %rax, 0x20(%r15)
movq %rax, 0x10(%rsp)
leaq 0x6995(%rip), %rcx      # 0xfcc8
movq %rcx, 0x8(%rsp)
movq %rsi, 0x18(%rsp)
leaq 0x40(%rsp), %r13
movq %rax, -0x18(%r13)
leaq 0x69cb(%rip), %rbp      # 0xfd18
movq %rbp, -0x20(%r13)
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq (%rdi), %rax
leaq 0x70(%rsp), %rsi
callq *0x20(%rax)
movq (%rax), %rcx
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq *0x20(%rcx)
movq (%rax), %rcx
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq *0x20(%rcx)
movq %rbx, %rdi
callq 0x513a
testb %al, %al
jne 0x9397
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %rbp, 0x20(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x93c0
callq 0x31d0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x93cf
callq 0x31d0
leaq 0x68a2(%rip), %rax      # 0xfc78
movq %rax, 0x70(%rsp)
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x93ed
callq 0x31d0
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x93ff
callq 0x31d0
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x9411
callq 0x31d0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9425
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x95c8
leaq 0x70(%rsp), %rdi
callq 0x95fe
movq %rbx, %rdi
callq 0x3350
movq %rax, %rdi
callq 0x40f4
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: IPParser::consume(Buffer const&)
void consume(const Buffer &b)
    {
        str_.assign((char*) b.data(), b.size());
        char_split(str_, scratch_, toks, '.');

        if (toks.size() != 4)
        {
            return;
        }

        unsigned quad = to_u(toks[0]) << 24 | 
                        to_u(toks[1]) << 16 | 
                        to_u(toks[2]) << 8 | 
                        to_u(toks[3]);

        emit(Buffer(&quad, sizeof(quad)));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
addq $0x10, %rdi
movq (%rsi), %rcx
movq 0x8(%rsi), %r8
movq 0x18(%rbx), %rdx
xorl %esi, %esi
callq 0x3300
leaq 0x30(%rbx), %rdi
movq 0x50(%rbx), %rax
cmpq %rax, 0x58(%rbx)
je 0x9678
movq %rax, 0x58(%rbx)
movq $0x0, 0x38(%rbx)
movq 0x30(%rbx), %rax
movb $0x0, (%rax)
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
movq 0x38(%rbx), %rdx
xorl %esi, %esi
callq 0x3230
movq 0x30(%rbx), %r12
cmpb $0x0, (%r12)
je 0x9701
leaq 0x50(%rbx), %r14
movb $0x1, %al
leaq 0x8(%rsp), %r15
testb $0x1, %al
jne 0x96bc
movb $0x0, (%r12)
incq %r12
movq %r12, %rax
movq %r12, 0x8(%rsp)
decq %r12
movzbl 0x1(%r12), %ecx
incq %r12
cmpl $0x2e, %ecx
je 0x96d9
testl %ecx, %ecx
jne 0x96c7
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x96ed
movq %rax, (%rsi)
addq $0x8, 0x58(%rbx)
jmp 0x96f8
movq %r14, %rdi
movq %r15, %rdx
callq 0x4e6c
xorl %eax, %eax
cmpb $0x0, (%r12)
jne 0x96b0
movq 0x50(%rbx), %rax
movq 0x58(%rbx), %rcx
subq %rax, %rcx
cmpq $0x20, %rcx
jne 0x979e
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movq %rax, %r15
shll $0x18, %r15d
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movq %rax, %r14
shll $0x10, %r14d
orl %r15d, %r14d
movq 0x50(%rbx), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movq %rax, %r15
shll $0x8, %r15d
movq 0x50(%rbx), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
orl %r15d, %eax
orl %r14d, %eax
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq $0x4, 0x8(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: IPScanner::consume(Buffer const&)
void consume(const Buffer &b)
    {
        unsigned quad = *(unsigned*)(b.data());

        IPResult result;
        geo_data_.query(quad, result);

        emit(Buffer(&result, sizeof(result)));
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movl (%rax), %esi
leaq 0x10(%rsp), %r14
movl $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movq 0x10(%rdi), %rdi
movq %r14, %rdx
callq 0x9802
movq %rsp, %rsi
movq %r14, (%rsi)
movq $0x38, 0x8(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: GeoData::query(unsigned int, IPResult&) const
void query(unsigned quad, IPResult &result) const
    {
        result.quad = quad;

        unsigned block_idx = block_query(location_ip_blocks_, quad);

        if (block_idx != -1U)
        {
            unsigned loc_idx = location_ip_blocks_.loc[block_idx];
            const PackedLocation& loc = location_data_.locations[loc_idx];

            result.country = location_data_.country[loc.country];
            result.region = location_data_.region[loc.region];
            result.city = location_data_.city[loc.city];
            result.lat = loc.lat;
            result.lon = loc.lon;
        }

        block_idx = block_query(asn_ip_blocks_, quad);

        if (block_idx != -1U)
        {
            unsigned asn_idx = asn_ip_blocks_.loc[block_idx];
            const PackedASN& asn = asn_data_.asns[asn_idx];

            result.asn = &asn.number;
            result.asn_text = asn_data_.text[asn.text];
        }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, (%rdx)
leaq 0x18(%rdi), %rsi
movl %ebp, %edx
callq 0x98c8
cmpl $-0x1, %eax
je 0x9879
movl %eax, %eax
movq 0x28(%r14), %rcx
movq 0x38(%r14), %rdx
movl 0x4(%rcx,%rax,4), %eax
movq 0x60(%r14), %rcx
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax,8), %esi
movl 0x4(%rdx,%rsi,4), %edx
addq 0x30(%r14), %rdx
movq %rdx, 0x8(%rbx)
movl 0xc(%rcx,%rax,8), %edx
movq 0x48(%r14), %rsi
movl 0x4(%rsi,%rdx,4), %edx
addq 0x40(%r14), %rdx
movq %rdx, 0x10(%rbx)
movl 0x10(%rcx,%rax,8), %edx
movq 0x58(%r14), %rsi
movl 0x4(%rsi,%rdx,4), %edx
addq 0x50(%r14), %rdx
movq %rdx, 0x18(%rbx)
movsd 0x14(%rcx,%rax,8), %xmm0
movsd %xmm0, 0x20(%rbx)
leaq 0x68(%r14), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x98c8
cmpl $-0x1, %eax
je 0x98c2
movl %eax, %eax
movq 0x78(%r14), %rcx
movq 0x90(%r14), %rdx
movl 0x4(%rcx,%rax,4), %eax
leaq (%rdx,%rax,8), %rax
addq $0x4, %rax
movq %rax, 0x28(%rbx)
movl 0x4(%rax), %eax
movq 0x88(%r14), %rcx
movl 0x4(%rcx,%rax,4), %eax
addq 0x80(%r14), %rax
movq %rax, 0x30(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: IPResultEmitter::consume(Buffer const&)
void consume(const Buffer &b)
    {
        const IPResult* result = (const IPResult*)(b.data());

        print_buf_.clear();

        print_ip(result->quad); delimit();
        print(result->country); delimit();
        print(result->region); delimit();
        print(result->city); delimit();
        print(result->lat); delimit();
        print(result->lon); delimit();
        print_as(result->asn); delimit();
        print(result->asn_text);
        newline();

        size_t n = fwrite(&print_buf_[0], print_buf_.size(), 1, stdout);
        REL_ASSERT(n == 1);

        print_buf_.clear();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r12
leaq 0x10(%rdi), %r14
movq $0x0, 0x18(%rdi)
movq 0x10(%rdi), %rax
movb $0x0, (%rax)
movl (%r12), %esi
callq 0x9ad2
movq 0x18(%rbx), %rsi
leaq 0x2073(%rip), %r15      # 0xb9d6
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x9b30
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x9b30
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movq 0x18(%r12), %rsi
movq %rbx, %rdi
callq 0x9b30
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movss 0x20(%r12), %xmm0
movq %rbx, %rdi
callq 0x9bc2
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movss 0x24(%r12), %xmm0
movq %rbx, %rdi
callq 0x9bc2
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movq 0x28(%r12), %rsi
movq %rbx, %rdi
callq 0x9c04
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x3230
movq 0x30(%r12), %rsi
movq %rbx, %rdi
callq 0x9b30
movq 0x18(%rbx), %rsi
leaq 0x1763(%rip), %rcx      # 0xb1cd
movl $0x1, %r8d
movq %r14, %rdi
xorl %edx, %edx
callq 0x3230
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x652f(%rip), %rax      # 0xffb8
movq (%rax), %rcx
movl $0x1, %edx
callq 0x33a0
cmpq $0x1, %rax
je 0x9ab6
leaq 0x1b75(%rip), %rdi      # 0xb618
leaq 0x1e3a(%rip), %rdx      # 0xb8e4
movl $0x171, %esi            # imm = 0x171
xorl %eax, %eax
callq 0xa50c
movq $0x0, 0x18(%rbx)
movq 0x10(%rbx), %rax
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: IPResultEmitter::print_as(unsigned int const*)
void print_as(const unsigned *asn) 
    {
        char sbuf[32];
        int nb = 0;

        if (!asn)
        {
            nb = sprintf(sbuf, "%%");
        }
        else
        {
            nb = sprintf(sbuf, "AS%u", *asn);
        }

        writes(sbuf, nb);
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x9c26
movl (%rsi), %edx
leaq 0x1cf6(%rip), %rsi      # 0xb910
movq %rsp, %rdi
xorl %eax, %eax
callq 0x3060
jmp 0x9c37
leaq 0x1ce0(%rip), %rsi      # 0xb90d
movq %rsp, %rdi
xorl %eax, %eax
callq 0x3060
movslq %eax, %r8
movq 0x18(%rbx), %rsi
addq $0x10, %rbx
movq %rsp, %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3230
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/pipeline.hpp
// Function: StringInjector::produce_one()
bool produce_one()
    {
        if (index_ == strings_.size())
        {
            return false;
        }

        const std::string& str = strings_[index_];

        emit(Buffer(str.c_str(), str.size()));
        index_++;

        return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %r14
movq (%rcx), %rax
movq 0x8(%rcx), %r15
subq %rax, %r15
sarq $0x5, %r15
cmpq %r15, %r14
je 0x9f31
movq %rdi, %rbx
movq %r14, %rcx
shlq $0x5, %rcx
movups (%rax,%rcx), %xmm0
movq %rsp, %rsi
movups %xmm0, (%rsi)
movq (%rdi), %rax
callq *(%rax)
incq 0x18(%rbx)
cmpq %r15, %r14
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/error.cpp
// Function: log_context(char const*, unsigned int, char const*, ...)
void log_context(const char* file, unsigned line, const char* fmt, ...)
{
    va_list ap;
    int n = 0;

    va_start(ap, fmt);
    n = vsnprintf(print_buf_, 4096, fmt, ap);
    va_end(ap);

    if (n > 4095) n = 4095;

    // replace the nul terminator with a new line

    print_buf_[n] = '\n';

    memcpy(error_buf_ + error_offset_, print_buf_, n + 1);
    memcpy(error_buf_ + error_offset_ + 4096, print_buf_, n + 1);

    error_offset_ += n+1;
    error_offset_ = error_offset_ % 4096;

    avail_ += (n+1);

    if (avail_ > 4096)
    {
        avail_ = 4096;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
leaq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xa451
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
leaq 0x5d98(%rip), %rbx      # 0x10210
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
callq 0x3160
movl $0xfff, %ebp            # imm = 0xFFF
cmpl %ebp, %eax
cmovgel %ebp, %eax
movslq %eax, %r13
movb $0xa, (%r13,%rbx)
movq 0x8d71(%rip), %r12      # 0x13210
leaq 0x6d6a(%rip), %r14      # 0x11210
addq %r12, %r14
leaq 0x1(%r13), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x31b0
movl $0x1000, %eax           # imm = 0x1000
addq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x31b0
leal (%r12,%r13), %eax
incl %eax
andl %ebp, %eax
movq %rax, 0x8d30(%rip)      # 0x13210
addq 0x8d31(%rip), %r15      # 0x13218
movl $0x1000, %eax           # imm = 0x1000
cmpq %rax, %r15
cmovaeq %rax, %r15
movq %r15, 0x8d1e(%rip)      # 0x13218
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/error.cpp
// Function: fatal_error(char const*, unsigned int, char const*, ...)
void fatal_error(const char* file, unsigned line, const char* fmt, ...)
{
    va_list ap;
    fprintf(stderr, "%s:%d: error: ", file, line);

    va_start(ap, fmt);
    vfprintf(stderr, fmt, ap);
    va_end(ap);

    fprintf(stderr, "\n");

    if (avail_)
    {
        fprintf(stderr, "context:\n");
        log_dump();
    }

    exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
movl %esi, %r10d
movq %rdi, %rdx
leaq 0x20(%rsp), %r15
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0xa56d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x5a64(%rip), %r14      # 0xffd8
movq (%r14), %rdi
leaq 0x144b(%rip), %rsi      # 0xb9c9
movl %r10d, %ecx
xorl %eax, %eax
callq 0x32e0
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r15, 0x10(%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x32b0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x3290
cmpq $0x0, 0x8c50(%rip)      # 0x13218
je 0xa607
movq (%r14), %rcx
leaq 0x1404(%rip), %rdi      # 0xb9d8
movl $0x9, %esi
movl $0x1, %edx
callq 0x33a0
leaq 0x6c26(%rip), %rdi      # 0x11210
addq 0x8c1f(%rip), %rdi      # 0x13210
subq 0x8c20(%rip), %rdi      # 0x13218
addq $0x1000, %rdi           # imm = 0x1000
movq (%r14), %rsi
callq 0x3220
movl $0x1, %edi
callq 0x3260
// File: /workspace/github_cpp_makefile_star2_O1/t0mm4rx[P]piscine_cpp/day01/ex00/main.cpp
// Function: main
int main(void)
{
	std::cout << "Pony on the stack, doesn't call any destructor" << std::endl;
	ponyOnTheStack();
	std::cout << std::endl << "Pony on the heap, call delete" << std::endl;
	ponyOnTheHeap();
}

// Assembly:
pushq %rbx
movq 0x28e8(%rip), %rbx      # 0x3fd8
leaq 0x988(%rip), %rsi       # 0x207f
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x10d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
callq 0x15e5
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq %rax, %rbx
leaq 0x94d(%rip), %rsi       # 0x20ae
movl $0x1d, %edx
movq %rax, %rdi
callq 0x10d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
callq 0x14cc
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: tiger::gensboxes()
void gensboxes()
    {
        const char *str = "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham";
        chunk state[3] = { 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL, 0xF096A5B4C3B2E187ULL };
        uchar temp[64];

        if(!*(const uchar *)&islittleendian) loopj(64) temp[j^7] = str[j];
        else loopj(64) temp[j] = str[j];
        loopi(1024) loop(col, 8) ((uchar *)&sboxes[i])[col] = i&0xFF;

        int abc = 2;
        loop(pass, 5) loopi(256) for(int sb = 0; sb < 1024; sb += 256)
        {
            abc++;
            if(abc >= 3) { abc = 0; compress((chunk *)temp, state); }
            loop(col, 8)
            {
                uchar val = ((uchar *)&sboxes[sb+i])[col];
                ((uchar *)&sboxes[sb+i])[col] = ((uchar *)&sboxes[sb + ((uchar *)&state[abc])[col]])[col];
                ((uchar *)&sboxes[sb + ((uchar *)&state[abc])[col]])[col] = val;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movaps 0x3715(%rip), %xmm0     # 0x5070
movaps %xmm0, 0x10(%rsp)
movabsq $-0xf695a4b3c4d1e79, %rax # imm = 0xF096A5B4C3B2E187
movq %rax, 0x20(%rsp)
leaq 0x774a(%rip), %rax      # 0x90c0
xorl %ecx, %ecx
movabsq $0x101010101010101, %rdx # imm = 0x101010101010101
movzbl %cl, %esi
imulq %rdx, %rsi
movq %rsi, (%rax)
incq %rcx
addq $0x8, %rax
cmpq $0x400, %rcx            # imm = 0x400
jne 0x1982
movl $0x2, %eax
xorl %ecx, %ecx
leaq 0x7716(%rip), %r12      # 0x90c0
leaq 0x10(%rsp), %r14
movq %rcx, 0x8(%rsp)
movq %r12, %r15
xorl %ebp, %ebp
movq %r15, %r13
xorl %ebx, %ebx
cmpl $0x2, %eax
jge 0x19c7
incl %eax
jmp 0x19d8
leaq 0x3652(%rip), %rdi      # 0x5020
movq %r14, %rsi
callq 0x131c
xorl %eax, %eax
movl %eax, %ecx
leaq (%rsp,%rcx,8), %rcx
addq $0x10, %rcx
xorl %edx, %edx
movb (%r13,%rdx), %sil
movzbl (%rcx,%rdx), %edi
addq %rbx, %rdi
leaq (%rdx,%rdi,8), %rdi
movb (%r12,%rdi), %r8b
movb %r8b, (%r13,%rdx)
movb %sil, (%r12,%rdi)
incq %rdx
cmpq $0x8, %rdx
jne 0x19e4
leaq 0x100(%rbx), %rcx
addq $0x800, %r13            # imm = 0x800
cmpq $0x300, %rbx            # imm = 0x300
movq %rcx, %rbx
jb 0x19be
incq %rbp
addq $0x8, %r15
cmpq $0x100, %rbp            # imm = 0x100
jne 0x19b9
movq 0x8(%rsp), %rcx
incl %ecx
cmpl $0x5, %ecx
jne 0x19af
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: genprivkey(char const*, vector<char>&, vector<char>&)
void genprivkey(const char *seed, vector<char> &privstr, vector<char> &pubstr)
{
    tiger::hashval hash;
    tiger::hash((const uchar *)seed, (int)strlen(seed), hash);
    bigint<8*sizeof(hash.bytes)/BI_DIGIT_BITS> privkey;
    memcpy(privkey.digits, hash.bytes, sizeof(privkey.digits));
    privkey.len = 8*sizeof(hash.bytes)/BI_DIGIT_BITS;
    privkey.shrink();
    privkey.printdigits(privstr);
    privstr.add('\0');

    ecjacobian c(ecjacobian::base);
    c.mul(privkey);
    c.normalize();
    c.print(pubstr);
    pubstr.add('\0');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1050
leaq 0x48(%rsp), %r12
movq %r15, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1a53
movq 0x10(%r12), %rax
movq %rax, 0x3c(%rsp)
movups (%r12), %xmm0
movups %xmm0, 0x2c(%rsp)
movl $0xc, 0x28(%rsp)
movl $0xc, %eax
cmpw $0x0, 0x42(%rsp)
jne 0x1c01
movl $0xc, %ecx
cmpq $0x1, %rcx
je 0x1bff
leaq -0x1(%rcx), %rax
cmpw $0x0, 0x28(%rsp,%rcx,2)
movq %rax, %rcx
je 0x1be8
jmp 0x1c01
xorl %eax, %eax
leaq 0x28(%rsp), %r15
movl %eax, (%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x22ae
xorl %ebp, %ebp
leaq 0x60(%rsp), %rsi
movb %bpl, (%rsi)
movq %r14, %rdi
callq 0x2344
leaq 0x9537(%rip), %rax      # 0xb164
leaq 0xc0(%rsp), %r14
movl $0x18, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
movl $0x18, %ecx
movq %r12, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0xc(%r15), %xmm1
movups %xmm1, 0xc(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3686
movq %r14, %rdi
callq 0x2382
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2458
movb %bpl, (%r12)
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x2344
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: hashstring(char const*, char*, int)
bool hashstring(const char *str, char *result, int maxlen)
{
    tiger::hashval hv;
    if(maxlen < 2*(int)sizeof(hv.bytes) + 1) return false;
    tiger::hash((uchar *)str, strlen(str), hv);
    loopi(sizeof(hv.bytes))
    {
        uchar c = hv.bytes[i];
        *result++ = "0123456789abcdef"[c&0xF];
        *result++ = "0123456789abcdef"[c>>4];
    }
    *result = '\0';
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
cmpl $0x31, %edx
jl 0x1d03
movq %rsi, %r14
movq %rdi, %r15
callq 0x1050
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movl %eax, %esi
callq 0x1a53
xorl %eax, %eax
leaq 0x3474(%rip), %rcx      # 0x514c
movzbl 0x8(%rsp,%rax), %edx
movl %edx, %esi
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, (%r14,%rax,2)
shrl $0x4, %edx
movb (%rdx,%rcx), %dl
movb %dl, 0x1(%r14,%rax,2)
incq %rax
cmpq $0x18, %rax
jne 0x1cd8
movb $0x0, (%r14,%rax,2)
cmpl $0x31, %ebx
setge %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: answerchallenge(char const*, char const*, vector<char>&)
void answerchallenge(const char *privstr, const char *challenge, vector<char> &answerstr)
{
    gfint privkey;
    privkey.parse(privstr);
    ecjacobian answer;
    answer.parse(challenge);
    answer.mul(privkey);
    answer.normalize();
    answer.x.printdigits(answerstr);
    answerstr.add('\0');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x249e
leaq 0x1(%r14), %rsi
xorl %ebp, %ebp
cmpb $0x2d, (%r14)
sete %bpl
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x249e
movq %r14, %rdi
movl %ebp, %esi
callq 0x2f92
movl $0x1, 0x40(%r14)
movw $0x1, 0x44(%r14)
leaq 0x40(%rsp), %r12
movl $0x18, %ecx
movq %r12, %rdi
movq %r14, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3d12
movq %r14, %rdi
callq 0x2382
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24d8
movb $0x0, (%r12)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x2344
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: genchallenge(void*, void const*, int, vector<char>&)
void *genchallenge(void *pubkey, const void *seed, int seedlen, vector<char> &challengestr)
{
    tiger::hashval hash;
    tiger::hash((const uchar *)seed, sizeof(seed), hash);
    gfint challenge;
    memcpy(challenge.digits, hash.bytes, sizeof(challenge.digits));
    challenge.len = 8*sizeof(hash.bytes)/BI_DIGIT_BITS;
    challenge.shrink();

    ecjacobian answer(*(ecjacobian *)pubkey);
    answer.mul(challenge);
    answer.normalize();

    ecjacobian secret(ecjacobian::base);
    secret.mul(challenge);
    secret.normalize();

    secret.print(challengestr);
    challengestr.add('\0');
   
    return new gfield(answer.x);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x48(%rsp), %r15
movq %rsi, %rdi
movl $0x8, %esi
movq %r15, %rdx
callq 0x1a53
movups (%r15), %xmm0
movups 0xa(%r15), %xmm1
movups %xmm1, 0x36(%rsp)
movups %xmm0, 0x2c(%rsp)
movl $0xc, 0x28(%rsp)
movl $0xc, %eax
cmpw $0x0, 0x42(%rsp)
jne 0x1ea3
movl $0xc, %ecx
cmpq $0x1, %rcx
je 0x1ea1
leaq -0x1(%rcx), %rax
cmpw $0x0, 0x28(%rsp,%rcx,2)
movq %rax, %rcx
je 0x1e8a
jmp 0x1ea3
xorl %eax, %eax
movl %eax, 0x28(%rsp)
leaq 0x60(%rsp), %r15
movl $0x18, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0xc0(%rsp), %rax
movl $0x18, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
callq 0x3d12
movq %r15, %rdi
callq 0x2382
leaq 0x9269(%rip), %rax      # 0xb164
leaq 0x120(%rsp), %r14
movl $0x18, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0xc0(%rsp), %r15
movl $0x18, %ecx
movq %r15, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d12
movq %r14, %rdi
callq 0x2382
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2458
movb $0x0, (%r15)
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x2344
movl $0x20, %edi
callq 0x10e0
testq %rax, %rax
je 0x1f97
movups 0x60(%rsp), %xmm0
movups 0x70(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/crack.cpp
// Function: genauthkey(char const*)
void genauthkey(const char *secret) {
    if(!secret[0]) { 
        printf("you must specify a secret password");
        return;
    }
    
    vector<char> privkey, pubkey;
    c_genprivkey(secret, privkey, pubkey);
    
    printf("private key: %s\n", privkey.getbuf());
    printf("public key: %s\n", pubkey.getbuf());
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
cmpb $0x0, (%rdi)
je 0x21be
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rsp, %rdx
movaps %xmm0, (%rdx)
callq 0x202c
movq 0x10(%rsp), %rsi
leaq 0x300e(%rip), %rdi      # 0x5180
xorl %eax, %eax
callq 0x1030
movq (%rsp), %rsi
leaq 0x300d(%rip), %rdi      # 0x5191
xorl %eax, %eax
callq 0x1030
movl $0x0, 0xc(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x21a1
callq 0x10d0
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21b8
callq 0x10d0
addq $0x20, %rsp
popq %rbx
retq
leaq 0x2f98(%rip), %rdi      # 0x515d
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
jmp 0x1030
movq %rax, %rbx
movl $0x0, 0xc(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x21ea
callq 0x10d0
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2201
callq 0x10d0
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/crack.cpp
// Function: measure(int, char const*)
tfloat measure(int times, const char* pass) {
    tfloat t0, t1;

    t0 = nanotime();    
    for (int i = 0; i < times; i++)
        genauthkey(pass); 
    t1 = nanotime();

    return t1 - t0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x38(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
movq (%r14), %r15
movq 0x8(%r14), %r14
testl %ebp, %ebp
jle 0x223e
movq %rbx, %rdi
callq 0x2146
decl %ebp
jne 0x2232
movq %r14, (%rsp)
fildll (%rsp)
fstpt 0x2c(%rsp)
movq %r15, 0x8(%rsp)
fildll 0x8(%rsp)
fstpt 0x20(%rsp)
leaq 0x38(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x10b0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, 0x10(%rsp)
fildll 0x10(%rsp)
fldt 0x20(%rsp)
fsubrp %st, %st(1)
movq %rcx, 0x18(%rsp)
fildll 0x18(%rsp)
fldt 0x2c(%rsp)
fsubrp %st, %st(1)
fldt 0x2d80(%rip)            # 0x5010
fmulp %st, %st(1)
faddp %st, %st(1)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<12>::printdigits(vector<char>&) const
loopi(len)
        {
            digit d = digits[len-i-1];
            loopj(BI_DIGIT_BITS/4)
            {
                uint shift = BI_DIGIT_BITS - (j+1)*4;
                int val = (d >> shift) & 0xF;
                if(val < 10) buf.add('0' + val);
                else buf.add('a' + val - 10);
            }
        }

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
jle 0x2343
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %r13d, %r13d
leaq 0xf(%rsp), %r15
leaq 0xe(%rsp), %r12
movq %rdi, 0x10(%rsp)
movl %r13d, %ecx
notl %ecx
addl %eax, %ecx
movslq %ecx, %rax
movzwl 0x4(%rdi,%rax,2), %r14d
movl $0xc, %ebp
movl %r14d, %eax
movl %ebp, %ecx
shrl %cl, %eax
andl $0xf, %eax
cmpl $0x9, %eax
ja 0x230d
orb $0x30, %al
movb %al, 0xf(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x2319
addb $0x57, %al
movb %al, 0xe(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2344
addl $-0x4, %ebp
cmpl $-0x4, %ebp
jne 0x22f0
incl %r13d
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
cmpl %eax, %r13d
jl 0x22db
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>::printdigits(vector<char>&) const
void printdigits(vector<char> &buf) const
    {
        loopi(len)
        {
            digit d = digits[len-i-1];
            loopj(BI_DIGIT_BITS/4)
            {
                uint shift = BI_DIGIT_BITS - (j+1)*4;
                int val = (d >> shift) & 0xF;
                if(val < 10) buf.add('0' + val);
                else buf.add('a' + val - 10);
            }
        }
    }

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
jle 0x256d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %r13d, %r13d
leaq 0xf(%rsp), %r15
leaq 0xe(%rsp), %r12
movq %rdi, 0x10(%rsp)
movl %r13d, %ecx
notl %ecx
addl %eax, %ecx
movslq %ecx, %rax
movzwl 0x4(%rdi,%rax,2), %r14d
movl $0xc, %ebp
movl %r14d, %eax
movl %ebp, %ecx
shrl %cl, %eax
andl $0xf, %eax
cmpl $0x9, %eax
ja 0x2537
orb $0x30, %al
movb %al, 0xf(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x2543
addb $0x57, %al
movb %al, 0xe(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2344
addl $-0x4, %ebp
cmpl $-0x4, %ebp
jne 0x251a
incl %r13d
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
cmpl %eax, %r13d
jl 0x2505
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>& bigint<13>::sub<13, 13>(bigint<13> const&, bigint<13> const&)
bigint &sub(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        ASSERT(x >= y);
        dbldigit borrow = 0;
        int i;
        for(i = 0; i < y.len || borrow; i++)
        {
             borrow = (1<<BI_DIGIT_BITS) + (dbldigit)x.digits[i] - (i<y.len ? (dbldigit)y.digits[i] : 0) - borrow;
             digits[i] = (digit)borrow;
             borrow = (borrow>>BI_DIGIT_BITS)^1;
        }
        if(i < x.len && this != &x) memcpy(&digits[i], &x.digits[i], (x.len - i)*sizeof(digit));
        len = x.len;
        shrink();
        return *this;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movslq (%rdx), %rsi
testq %rsi, %rsi
setg %r8b
jle 0x2985
xorl %ecx, %ecx
xorl %edi, %edi
movl $0x0, %r9d
testb $0x1, %r8b
je 0x294c
movzwl 0x4(%rdx,%rcx,2), %r9d
addl %r9d, %edi
movzwl 0x4(%r14,%rcx,2), %r9d
orl $0x10000, %r9d          # imm = 0x10000
subl %edi, %r9d
movw %r9w, 0x4(%rbx,%rcx,2)
movl %r9d, %edi
shrl $0x10, %edi
xorl $0x1, %edi
incq %rcx
cmpq %rsi, %rcx
setb %r8b
jb 0x293a
cmpl $0x10000, %r9d          # imm = 0x10000
jb 0x293a
jmp 0x2987
xorl %ecx, %ecx
subl %ecx, %eax
setle %dl
cmpq %r14, %rbx
sete %sil
orb %dl, %sil
jne 0x29b5
movl %ecx, %ecx
leaq (%rbx,%rcx,2), %rdi
addq $0x4, %rdi
leaq (%r14,%rcx,2), %rsi
addq $0x4, %rsi
movslq %eax, %rdx
addq %rdx, %rdx
callq 0x10a0
movslq (%r14), %rcx
movl %ecx, (%rbx)
testq %rcx, %rcx
je 0x29db
movq %rcx, %rax
incq %rax
decl %ecx
cmpw $0x0, (%rbx,%rax,2)
jne 0x29db
movl %ecx, (%rbx)
decq %rax
decl %ecx
cmpq $0x1, %rax
jne 0x29c7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>& bigint<13>::rshift<13>(bigint<13> const&, int)
bigint &rshift(const bigint<X_DIGITS> &x, int n)
    {
        if(!len || !n) return *this;
        int dig = (n-1)/BI_DIGIT_BITS;
        n = ((n-1) % BI_DIGIT_BITS)+1;
        digit carry = digit(x.digits[dig]>>n);
        loopi(len-dig-1)
        {
            digit tmp = x.digits[i+dig+1];
            digits[i] = digit((tmp<<(BI_DIGIT_BITS-n)) | carry);
            carry = digit(tmp>>n);
        }
        digits[len-dig-1] = carry;
        len -= dig + (n>>BI_DIGIT_BITS);
        shrink();
        return *this;
    }

// Assembly:
movq %rdi, %rax
movslq (%rdi), %r9
testq %r9, %r9
sete %cl
testl %edx, %edx
sete %dil
orb %cl, %dil
jne 0x2ae5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leal -0x1(%rdx), %ecx
leal 0xe(%rdx), %edi
testl %ecx, %ecx
cmovnsl %ecx, %edi
movl %edi, %r8d
sarl $0x4, %r8d
andl $-0x10, %edi
negl %edi
leal (%rdx,%rdi), %r14d
decl %r14d
leal 0x1(%r14), %edx
movslq %r8d, %r10
movzwl 0x4(%rsi,%r10,2), %ebx
movl %r10d, %r11d
notl %r11d
addl %r9d, %r11d
movl %edx, %ecx
shrl %cl, %ebx
testl %r11d, %r11d
jle 0x2a87
movl $0xf, %edi
subl %r14d, %edi
movl %r11d, %r14d
leaq 0x1(%r10), %r15
xorl %r12d, %r12d
leal (%r15,%r12), %ecx
movslq %ecx, %rcx
movzwl 0x4(%rsi,%rcx,2), %ebp
movl %ebp, %r13d
movl %edi, %ecx
shll %cl, %r13d
orl %ebx, %r13d
movl %edx, %ecx
shrl %cl, %ebp
movw %r13w, 0x4(%rax,%r12,2)
incq %r12
movl %ebp, %ebx
cmpq %r12, %r14
jne 0x2a5a
jmp 0x2a89
movl %ebx, %ebp
movslq %r11d, %rcx
movw %bp, 0x4(%rax,%rcx,2)
sarl $0x10, %edx
addl %edx, %r8d
movl %r9d, %ecx
subl %r8d, %ecx
movl %ecx, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
je 0x2ae5
movslq %edx, %rdx
addq %r10, %rdx
movq %rdx, %rcx
subq %r9, %rcx
notl %r8d
addl %r9d, %r8d
addq %r9, %r9
addq %rdx, %rdx
subq %rdx, %r9
leaq (%r9,%rax), %rdx
addq $0x2, %rdx
xorl %esi, %esi
cmpw $0x0, (%rdx,%rsi,2)
jne 0x2ae5
leal (%r8,%rsi), %edi
movl %edi, (%rax)
decq %rsi
cmpq %rsi, %rcx
jne 0x2ad0
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>& bigint<13>::add<13, 13>(bigint<13> const&, bigint<13> const&)
bigint &add(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        dbldigit carry = 0;
        int maxlen = max(x.len, y.len), i;
        for(i = 0; i < y.len || carry; i++)
        {
             carry += (i < x.len ? (dbldigit)x.digits[i] : 0) + (i < y.len ? (dbldigit)y.digits[i] : 0);
             digits[i] = (digit)carry;
             carry >>= BI_DIGIT_BITS;
        }
        if(i < x.len && this != &x) memcpy(&digits[i], &x.digits[i], (x.len - i)*sizeof(digit));
        len = max(i, maxlen);
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq (%rsi), %r15
movslq (%rdx), %r14
testq %r14, %r14
setg %cl
jle 0x2b47
xorl %r12d, %r12d
xorl %eax, %eax
movl $0x0, %edi
cmpq %r15, %r12
jge 0x2b14
movzwl 0x4(%rsi,%r12,2), %edi
xorl %r8d, %r8d
testb $0x1, %cl
je 0x2b22
movzwl 0x4(%rdx,%r12,2), %r8d
addl %eax, %edi
addl %r8d, %edi
movw %di, 0x4(%rbx,%r12,2)
movl %edi, %eax
shrl $0x10, %eax
incq %r12
cmpq %r14, %r12
setb %cl
jb 0x2b04
cmpl $0xffff, %edi           # imm = 0xFFFF
ja 0x2b04
jmp 0x2b4a
xorl %r12d, %r12d
cmpl %r15d, %r12d
setge %al
cmpq %rsi, %rbx
sete %cl
orb %al, %cl
jne 0x2b7e
movl %r12d, %eax
leaq (%rbx,%rax,2), %rdi
addq $0x4, %rdi
leaq (%rsi,%rax,2), %rsi
addq $0x4, %rsi
movl %r15d, %eax
subl %r12d, %eax
movslq %eax, %rdx
addq %rdx, %rdx
callq 0x10a0
cmpl %r14d, %r15d
cmovgl %r15d, %r14d
cmpl %r14d, %r12d
cmovgl %r12d, %r14d
movl %r14d, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<26>& bigint<26>::mul<13, 13>(bigint<13> const&, bigint<13> const&)
bigint &mul(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        if(!x.len || !y.len) { len = 0; return *this; }
        memset(digits, 0, y.len*sizeof(digit));
        loopi(x.len)
        {
            dbldigit carry = 0;
            loopj(y.len)
            {
                carry += (dbldigit)x.digits[i] * (dbldigit)y.digits[j] + (dbldigit)digits[i+j];
                digits[i+j] = (digit)carry;
                carry >>= BI_DIGIT_BITS;
            }
            digits[i+y.len] = carry;
        }
        len = x.len + y.len;
        shrink();
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0x2c5c
movq %rdx, %r14
movslq (%rdx), %rdx
testq %rdx, %rdx
je 0x2c5c
movq %rsi, %r15
leaq 0x4(%rbx), %r12
addq %rdx, %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x1060
movslq (%r15), %rax
testq %rax, %rax
jle 0x2c36
movl (%r14), %ecx
movslq %ecx, %rdx
xorl %esi, %esi
movq %r12, %rdi
xorl %r8d, %r8d
testl %ecx, %ecx
jle 0x2c21
xorl %r9d, %r9d
movzwl 0x4(%r15,%rsi,2), %r10d
movzwl 0x4(%r14,%r9,2), %r11d
imull %r10d, %r11d
movzwl (%rdi,%r9,2), %r10d
addl %r8d, %r10d
addl %r11d, %r10d
movw %r10w, (%rdi,%r9,2)
movl %r10d, %r8d
shrl $0x10, %r8d
incq %r9
cmpq %r9, %rcx
jne 0x2bf2
leaq (%rsi,%rdx), %r9
movw %r8w, (%r12,%r9,2)
incq %rsi
addq $0x2, %rdi
cmpq %rax, %rsi
jne 0x2be8
movslq (%r14), %rcx
addq %rax, %rcx
movl %ecx, (%rbx)
testl %ecx, %ecx
je 0x2c62
cmpw $0x0, 0x2(%rbx,%rcx,2)
jne 0x2c62
leaq -0x1(%rcx), %rax
decl %ecx
movl %ecx, (%rbx)
movq %rax, %rcx
testq %rax, %rax
jne 0x2c42
jmp 0x2c62
movl $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: ecjacobian::calcy(bool)
bool calcy(bool ybit)
    {
        gfield y2, tmp;
        y2.square(x).mul(x).sub(tmp.add(x, x).add(x)).add(B);
        if(!y.sqrt(y2)) { y.zero(); return false; }
        if(y.hasbit(0) != ybit) y.neg();
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2b9e
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x2c72
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2b9e
movq %r15, %rdi
movq %r12, %rsi
callq 0x2c72
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2f28
movq %rax, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2f28
movq %r15, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x315c
leaq 0x812d(%rip), %rdx      # 0xb144
movq %rax, %rdi
movq %rax, %rsi
callq 0x2f28
leaq 0x20(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3076
movl %eax, %ebp
testb %al, %al
je 0x305e
cmpl $0x0, 0x20(%r14)
setg %al
movzwl 0x24(%r14), %ecx
andb %al, %cl
cmpb %bl, %cl
je 0x3066
leaq 0x80d3(%rip), %rsi      # 0xb124
movq %r12, %rdi
movq %r12, %rdx
callq 0x291e
jmp 0x3066
movl $0x0, (%r12)
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: gfield::sqrt(gfield const&)
bool sqrt(const gfield &x)
    {
        if(!x.len) { len = 0; return true; }
#if GF_BITS==224
#error Unsupported GF
#else
        ASSERT((P.digits[0]%4)==3);
        static const gfint Padd1div4(gfint(P).add(bigint<1>(1)).rshift(2));
        switch(legendre(x))
        {
            case 0: len = 0; return true;
            case -1: return false;
            default: pow(x, Padd1div4); return true;
        }
#endif
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0x30a3
movq %rsi, %r14
movb 0x815a(%rip), %al       # 0xb1e8
testb %al, %al
je 0x30cb
movq %r14, %rdi
callq 0x31dc
cmpl $-0x1, %eax
je 0x30ab
testl %eax, %eax
jne 0x30af
movl $0x0, (%rbx)
jmp 0x30c1
xorl %eax, %eax
jmp 0x30c3
leaq 0x810e(%rip), %rdx      # 0xb1c4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32b6
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x8116(%rip), %rdi      # 0xb1e8
callq 0x1110
testl %eax, %eax
je 0x3092
movups 0x8050(%rip), %xmm0     # 0xb132
leaq 0x10(%rsp), %rdi
movups %xmm0, 0xe(%rdi)
movups 0x8032(%rip), %xmm0     # 0xb124
movaps %xmm0, (%rdi)
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movw $0x1, 0x4(%rdx)
movq %rdi, %rsi
callq 0x33cc
movq %rax, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x29e6
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x80a8(%rip)     # 0xb1d4
movups %xmm0, 0x8091(%rip)     # 0xb1c4
leaq 0x80ae(%rip), %rdi      # 0xb1e8
callq 0x1090
jmp 0x3092
movq %rax, %rbx
leaq 0x809a(%rip), %rdi      # 0xb1e8
callq 0x1080
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_cpp_makefile_star2_O1/koraa[P]sbcrack/cube/crypto.cpp
// Function: gfield& gfield::sub<13, 13>(bigint<13> const&, bigint<13> const&)
gfield &sub(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        if(x < y)
        {
            gfint tmp; /* necessary if this==&y, using this instead would clobber y */
            tmp.add(x, P);
            gfint::sub(tmp, y);
        }
        else gfint::sub(x, y);
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x318d
leaq 0x7faa(%rip), %rdx      # 0xb124
movq %rsp, %r15
movq %r15, %rdi
callq 0x2ae6
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x31c6
cmpl %ecx, %eax
jg 0x31c3
movl %eax, %ecx
testl %eax, %eax
jle 0x31b5
movzwl 0x2(%rsi,%rax,2), %edx
movzwl 0x2(%r14,%rax,2), %edi
cmpw %di, %dx
jb 0x31b3
decq %rax
cmpw %di, %dx
jbe 0x3191
xorl %edx, %edx
jmp 0x31b5
movb $0x1, %dl
testl %ecx, %ecx
setle %al
notb %dl
orb %al, %dl
testb $0x1, %dl
je 0x3173
movq %rbx, %rdi
movq %r14, %rdx
callq 0x291e
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop