LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/rapidjson/include/rapidjson/document.h
// Function: rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetObjectRaw(rapidjson::GenericMember<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>*, unsigned int, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>&)
void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) {
        data_.f.flags = kObjectFlag;
        if (count) {
            Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
            SetMembersPointer(m);
            std::memcpy(m, members, count * sizeof(Member));
        }
        else
            SetMembersPointer(0);
        data_.o.size = data_.o.capacity = count;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movabsq $-0x1000000000000, %r13 # imm = 0xFFFF000000000000
movw $0x3, 0xe(%rdi)
testl %edx, %edx
je 0x4feb
movq %rsi, %r15
movl %ebx, %r12d
shlq $0x5, %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x4da6
andq 0x8(%r14), %r13
orq %rax, %r13
movq %r13, 0x8(%r14)
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
jmp 0x4fef
andq %r13, 0x8(%r14)
movl %ebx, 0x4(%r14)
movl %ebx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/rapidjson/include/rapidjson/document.h
// Function: rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetArrayRaw(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>*, unsigned int, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>&)
void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) {
        data_.f.flags = kArrayFlag;
        if (count) {
            GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
            SetElementsPointer(e);
            std::memcpy(e, values, count * sizeof(GenericValue));
        }
        else
            SetElementsPointer(0);
        data_.a.size = data_.a.capacity = count;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movabsq $-0x1000000000000, %r13 # imm = 0xFFFF000000000000
movw $0x4, 0xe(%rdi)
testl %edx, %edx
je 0x50cd
movq %rsi, %r15
movl %ebx, %r12d
shlq $0x4, %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x4da6
andq 0x8(%r14), %r13
orq %rax, %r13
movq %r13, 0x8(%r14)
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
jmp 0x50d1
andq %r13, 0x8(%r14)
movl %ebx, 0x4(%r14)
movl %ebx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/rapidjson/include/rapidjson/internal/stack.h
// Function: rapidjson::internal::Stack<rapidjson::CrtAllocator>::ShrinkToFit()
void ShrinkToFit() { 
        if (Empty()) {
            // If the stack is empty, completely deallocate the memory.
            Allocator::Free(stack_);
            stack_ = 0;
            stackTop_ = 0;
            stackEnd_ = 0;
        }
        else
            Resize(GetSize());
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
je 0x535c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x468c
addq $0x10, %rbx
callq 0x2280
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/./Common/rapidjson/include/rapidjson/internal/strfunc.h
// Function: unsigned int rapidjson::internal::StrLen<char>(char const*)
inline SizeType StrLen(const Ch* s) {
    RAPIDJSON_ASSERT(s != 0);
    const Ch* p = s;
    while (*p) ++p;
    return SizeType(p - s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x5422
pushq $-0x1
popq %rax
incl %eax
cmpb $0x0, (%rdi)
leaq 0x1(%rdi), %rdi
jne 0x5415
popq %rbp
retq
leaq 0x2c3e(%rip), %rdi      # 0x8067
leaq 0x336e(%rip), %rsi      # 0x879e
leaq 0x339f(%rip), %rcx      # 0x87d6
pushq $0x1f
popq %rdx
callq 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/GateServer/main.cpp
// Function: main
int main()
{
    GateServer *gateServer = new GateServer();
    gateServer->SetConfig("gateConfig.json");
    gateServer->InitServer();
    while(1)
    {
        gateServer->Run();
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x198, %edi            # imm = 0x198
callq 0x2220
movq %rax, %rbx
movl $0x198, %edx            # imm = 0x198
movq %rax, %rdi
xorl %esi, %esi
callq 0x2170
movq %rbx, %rdi
callq 0x5dc4
movq (%rbx), %rax
leaq 0x3e5c(%rip), %rsi      # 0x9c08
movq %rbx, %rdi
callq *(%rax)
movq %rbx, %rdi
callq 0x5e24
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x5db9
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/BaseServer/BaseServer.cpp
// Function: fieryzig::BaseServer::InitServer()
void BaseServer::InitServer()
    {
        epfd = epoll_create(256);
        listenfd = socket(AF_INET, SOCK_STREAM, 0);

        ev.data.fd = listenfd;
        ev.events = EPOLLIN;
        epoll_ctl(epfd, EPOLL_CTL_ADD, listenfd, &ev);

        memset(&serveraddr, 0, sizeof(serveraddr));
        inet_aton(config->ip.c_str(), &(serveraddr.sin_addr));
        serveraddr.sin_port = htons(config->port);
        
        SetSocketOpt(listenfd);

        if (bind(listenfd, (sockaddr*)&serveraddr, sizeof(struct sockaddr)) == -1) {
            cout << "bind failed" << endl;
            exit(1);
        }
        listen(listenfd, 10);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x2370
movl %eax, 0x10(%rbx)
pushq $0x2
popq %rdi
pushq $0x1
popq %r14
movl %r14d, %esi
xorl %edx, %edx
callq 0x2080
movl %eax, 0x14(%rbx)
leaq 0x1c(%rbx), %rcx
movl %eax, 0x20(%rbx)
movl $0x1, 0x1c(%rbx)
movl 0x10(%rbx), %edi
movl %r14d, %esi
movl %eax, %edx
callq 0x22d0
leaq 0x128(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x128(%rbx)
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x12c(%rbx), %rsi
callq 0x21b0
movq 0x8(%rbx), %rax
movzwl 0x28(%rax), %eax
rolw $0x8, %ax
movw %ax, 0x12a(%rbx)
movl 0x14(%rbx), %esi
movq %rbx, %rdi
callq 0x5ef2
movl 0x14(%rbx), %edi
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x2040
cmpl $-0x1, %eax
je 0x5ecf
movl 0x14(%rbx), %edi
pushq $0xa
popq %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2260
movq 0x7102(%rip), %rdi      # 0xcfd8
leaq 0x3d3b(%rip), %rsi      # 0x9c18
callq 0x2210
movq %rax, %rdi
callq 0x2150
pushq $0x1
popq %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.cpp
// Function: fieryzig::Client::Recv()
int Client::Recv() 
{
//    if (recvbuf.remain() < 4) return 0;
    int ret = ::read(fd, recvbuf.getTail(), min(recvbuf.remain(),BUFSIZE-recvbuf.tail));
    if (ret == -1) return ret;
    recvbuf.push(ret);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x2020(%rdi), %r14d
callq 0x62fa
movl $0x1000, %ecx           # imm = 0x1000
subl 0x100c(%rbx), %ecx
movl $0x1000, %r15d          # imm = 0x1000
movl $0x1000, %edx           # imm = 0x1000
subl 0x1008(%rbx), %edx
cmpl %ecx, %edx
cmovgel %ecx, %edx
movslq %edx, %rdx
movl %r14d, %edi
movq %rax, %rsi
callq 0x22f0
movq %rax, %rcx
cmpl $-0x1, %ecx
je 0x5f84
movl 0x1008(%rbx), %eax
addl %ecx, %eax
cltd
idivl %r15d
movl %edx, 0x1008(%rbx)
addl %ecx, 0x100c(%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.cpp
// Function: fieryzig::Client::hasMsg(fieryzig::PacketInfo*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool Client::hasMsg(PacketInfo* ppi, string &content)
{
    if (recvbuf.count < 4) return false;
    int packetLen = recvbuf.getIntFromHead();

    if (recvbuf.count < packetLen) {
        return false;
    }
    recvbuf.pop(4);
    cout << "RECV PacketLen: " << packetLen << endl;

    int pi_size = sizeof(PacketInfo);
    recvbuf.copyFromHead(ppi, pi_size);
    recvbuf.pop(pi_size);

    int contentLen = ppi->contentLen;
    char conBuf[contentLen];
    recvbuf.copyFromHead(conBuf, contentLen);
    conBuf[contentLen] = '\0';
    content = conBuf;
    
    recvbuf.pop(contentLen);
    return true;
}

// Assembly:
cmpl $0x4, 0x100c(%rdi)
jge 0x5f9e
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x630a
movl 0x100c(%rbx), %ecx
cmpl %eax, %ecx
jge 0x5fcb
xorl %eax, %eax
jmp 0x609e
movl %eax, %r12d
movl 0x1004(%rbx), %eax
addl $0x4, %eax
movl $0x1000, %esi           # imm = 0x1000
cltd
idivl %esi
movl $0x1000, %r13d          # imm = 0x1000
movl %edx, 0x1004(%rbx)
addl $-0x4, %ecx
movl %ecx, 0x100c(%rbx)
movq 0x6fdd(%rip), %rdi      # 0xcfd8
leaq 0x3c22(%rip), %rsi      # 0x9c24
callq 0x2210
movq %rax, %rdi
movl %r12d, %esi
callq 0x2330
movq %rax, %rdi
callq 0x2150
pushq $0x18
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6340
movl 0x1004(%rbx), %eax
addl $0x18, %eax
cltd
idivl %r13d
movl %edx, 0x1004(%rbx)
addl $-0x18, 0x100c(%rbx)
movq %rsp, %r13
movslq 0x14(%r15), %r15
movl %r15d, %eax
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x6340
movb $0x0, (%r15,%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2380
movl 0x1004(%rbx), %eax
addl %r15d, %eax
cltd
movl $0x1000, %ecx           # imm = 0x1000
idivl %ecx
movl %edx, 0x1004(%rbx)
subl %r15d, 0x100c(%rbx)
movb $0x1, %al
movq %r13, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.cpp
// Function: fieryzig::Client::Send(fieryzig::PacketInfo, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Client::Send(PacketInfo pi, string content)
{
    int tot_len = sizeof(pi) + content.length() + 4;
    unsigned int tmp = htonl(tot_len); 
    sendbuf.copyIntoTail((char*)&tmp ,4);
    sendbuf.push(4);
    sendbuf.copyIntoTail(&pi, sizeof(pi));
    sendbuf.push(sizeof(pi));
    sendbuf.copyIntoTail(content.c_str(), content.length());
    sendbuf.push(content.length());

    int ret = ::write(fd, sendbuf.getHead(), min(sendbuf.count, BUFSIZE-sendbuf.head));
    if (ret == -1) return -1;
    sendbuf.pop(ret);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rsi), %eax
addl $0x1c, %eax
bswapl %eax
leaq -0x24(%rbp), %rsi
movl %eax, (%rsi)
leaq 0x1010(%rdi), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x63b8
movl 0x2018(%rbx), %eax
addl $0x4, %eax
movl $0x1000, %r12d          # imm = 0x1000
cltd
idivl %r12d
movl %edx, 0x2018(%rbx)
addl $0x4, 0x201c(%rbx)
leaq 0x10(%rbp), %rsi
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x63b8
movl 0x2018(%rbx), %eax
addl $0x18, %eax
cltd
idivl %r12d
movl %edx, 0x2018(%rbx)
addl $0x18, 0x201c(%rbx)
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %r14, %rdi
callq 0x63b8
movl 0x8(%r15), %ecx
movl 0x2018(%rbx), %eax
addl %ecx, %eax
cltd
idivl %r12d
movl %edx, 0x2018(%rbx)
addl %ecx, 0x201c(%rbx)
movl 0x2020(%rbx), %r15d
movq %r14, %rdi
callq 0x643a
movl $0x1000, %ecx           # imm = 0x1000
subl 0x2014(%rbx), %ecx
movl 0x201c(%rbx), %edx
cmpl %edx, %ecx
cmovgel %edx, %ecx
movslq %ecx, %rdx
movl %r15d, %edi
movq %rax, %rsi
callq 0x20d0
movq %rax, %rcx
cmpl $-0x1, %ecx
je 0x61aa
movl 0x2014(%rbx), %eax
addl %ecx, %eax
cltd
idivl %r12d
movl %edx, 0x2014(%rbx)
subl %ecx, 0x201c(%rbx)
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.cpp
// Function: fieryzig::Client::debugPrint(char*, int)
void Client::debugPrint(char* ch, int sz)
{
    cout << "+++++++" << sz << "+++++++" << endl;
    for (int i = 0; i < sz; i++) {
        printf("%02x",*(ch+i)&0xFF);
        if ( i % 64 == 63 ) puts("");
    }
    cout << endl << "----------------" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq 0x6d7a(%rip), %rdi      # 0xcfd8
leaq 0x39d0(%rip), %r15      # 0x9c35
movq %r15, %rsi
callq 0x2210
movq %rax, %rdi
movl %ebx, %esi
callq 0x2330
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movq %rax, %rdi
callq 0x2150
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
leaq 0x39a5(%rip), %r15      # 0x9c3d
pushq $0xa
popq %r12
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x62c9
movzbl (%r14,%r13), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
movl %r13d, %eax
notl %eax
testb $0x3f, %al
jne 0x62c4
movl %r12d, %edi
callq 0x22e0
incq %r13
jmp 0x629f
movq 0x6d08(%rip), %rdi      # 0xcfd8
callq 0x2150
leaq 0x3966(%rip), %rsi      # 0x9c42
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2150
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.h
// Function: fieryzig::Client::buffer_t::getIntFromHead()
inline int getIntFromHead() { //not check, check outside!
            char tmp[4];
            for ( int i = 0 ; i < 4 ; i++ ) tmp[i] = buffer[(head+i)%BUFSIZE];
            return ntohl(*(int*)tmp);
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x1004(%rdi), %ecx
xorl %esi, %esi
movl $0x1000, %r8d           # imm = 0x1000
cmpq $0x4, %rsi
je 0x6338
leal (%rcx,%rsi), %eax
cltd
idivl %r8d
movslq %edx, %rax
movb (%rdi,%rax), %al
movb %al, -0x4(%rbp,%rsi)
incq %rsi
jmp 0x631c
movl -0x4(%rbp), %eax
bswapl %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.h
// Function: fieryzig::Client::buffer_t::copyFromHead(void*, int)
inline void copyFromHead(void* dest, int sz) {
            if (head + sz <= BUFSIZE)
                memmove(dest, buffer+head, sz);
            else {
                memmove(dest, buffer+head, BUFSIZE - head);
                memmove((char*)dest+(BUFSIZE-head), buffer, sz-BUFSIZE+head);
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movslq 0x1004(%rdi), %rax
leal (%rax,%r14), %ecx
leaq (%rdi,%rax), %rsi
cmpl $0x1000, %ecx           # imm = 0x1000
jg 0x6370
movslq %r14d, %rdx
movq %rbx, %rdi
jmp 0x63aa
movq %rdi, %r15
movl $0x1000, %r12d          # imm = 0x1000
movl $0x1000, %edx           # imm = 0x1000
subq %rax, %rdx
movq %rbx, %rdi
callq 0x2310
movslq 0x1004(%r15), %rax
subq %rax, %rbx
addq %r12, %rbx
movslq %r14d, %rcx
leaq (%rcx,%rax), %rdx
addq $-0x1000, %rdx          # imm = 0xF000
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O2/fieryzig[P]GameServer/Common/Client/Client.h
// Function: fieryzig::Client::buffer_t::copyIntoTail(void const*, int)
inline void copyIntoTail(const void* src, int sz) {
            if (tail+sz <= BUFSIZE)
                memmove(getTail(), src, sz);
            else {
                memmove(getTail(), src, BUFSIZE-tail);
                memmove(buffer, (char*)src+(BUFSIZE-tail), sz-BUFSIZE+tail);
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x1008(%rdi), %r12d
addl %edx, %r12d
callq 0x62fa
cmpl $0x1000, %r12d          # imm = 0x1000
jg 0x63ec
movslq %r14d, %rdx
movq %rax, %rdi
jmp 0x642a
movslq 0x1008(%r15), %rcx
movl $0x1000, %r12d          # imm = 0x1000
movl $0x1000, %edx           # imm = 0x1000
subq %rcx, %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2310
movslq 0x1008(%r15), %rax
subq %rax, %rbx
addq %r12, %rbx
movslq %r14d, %rcx
leaq (%rcx,%rax), %rdx
addq $-0x1000, %rdx          # imm = 0xF000
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/tetsuok[P]kernel-pa/./learner.h
// Function: kernel::Learner::Margin(std::vector<std::pair<unsigned int, float>, std::allocator<std::pair<unsigned int, float>>> const&)
float Margin(const fv& x) {
    margin_.assign(margin_.size(), 0.0f);

    for (const auto& p : x) {
      const unsigned int id = p.first;
      const float v = p.second;
      if (id >= sv_index_.size()) {
        continue;
      }
      const fv& s = sv_index_[id];
      for (const auto& p2 : s) {
        margin_[p2.first] += p2.second * v;
      }
    }

    return Polynomial();
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movq 0x48(%rdi), %rsi
subq 0x40(%rdi), %rsi
sarq $0x2, %rsi
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
movq %r14, %rdi
callq 0x2946
movq (%r15), %rcx
movq 0x8(%r15), %rsi
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rax
subq %rdi, %rax
pushq $0x18
popq %r8
cqto
idivq %r8
cmpq %rsi, %rcx
je 0x2934
movl (%rcx), %edx
cmpq %rdx, %rax
jbe 0x292e
movss 0x4(%rcx), %xmm0
imulq $0x18, %rdx, %r8
movq (%rdi,%r8), %rdx
movq 0x8(%rdi,%r8), %r8
movq (%r14), %r9
cmpq %r8, %rdx
je 0x292e
movl (%rdx), %r10d
movss 0x4(%rdx), %xmm1
mulss %xmm0, %xmm1
addss (%r9,%r10,4), %xmm1
movss %xmm1, (%r9,%r10,4)
addq $0x8, %rdx
jmp 0x290b
addq $0x8, %rcx
jmp 0x28ea
movq %rbx, %rdi
callq 0x3562
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tetsuok[P]kernel-pa/learner.cc
// Function: kernel::Learner::Polynomial() const
float Learner::Polynomial() const {
  float r = 0.0f;

  if (d_ == 1) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += margin_[i] * alpha_[i];
    }
  } else if (d_ == 2) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += (margin_[i] * margin_[i]) * alpha_[i];
    }
  } else if (d_ == 3) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += (margin_[i] * margin_[i] * margin_[i]) * alpha_[i];
    }
  } else if (d_ == 4) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += (margin_[i] * margin_[i] * margin_[i] * margin_[i]) * alpha_[i];
    }
  }
  return r;
}

// Assembly:
movl 0xc(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x3666
leaq 0x1bb1(%rip), %rcx      # 0x5128
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x48(%rdi), %rax
movq 0x10(%rdi), %rcx
movq 0x40(%rdi), %rdx
subq %rdx, %rax
sarq $0x2, %rax
xorps %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rax
je 0x3669
movss (%rdx,%rsi,4), %xmm1
mulss (%rcx,%rsi,4), %xmm1
addss %xmm1, %xmm0
incq %rsi
jmp 0x3598
movq 0x48(%rdi), %rax
movq 0x10(%rdi), %rcx
movq 0x40(%rdi), %rdx
subq %rdx, %rax
sarq $0x2, %rax
xorps %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rax
je 0x3669
movss (%rdx,%rsi,4), %xmm1
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
mulss %xmm1, %xmm2
mulss (%rcx,%rsi,4), %xmm2
addss %xmm2, %xmm0
incq %rsi
jmp 0x35cc
movq 0x48(%rdi), %rax
movq 0x10(%rdi), %rcx
movq 0x40(%rdi), %rdx
subq %rdx, %rax
sarq $0x2, %rax
xorps %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rax
je 0x3669
movss (%rdx,%rsi,4), %xmm1
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
mulss %xmm1, %xmm2
mulss %xmm1, %xmm2
mulss (%rcx,%rsi,4), %xmm2
addss %xmm2, %xmm0
incq %rsi
jmp 0x360b
movq 0x48(%rdi), %rax
movq 0x10(%rdi), %rcx
movq 0x40(%rdi), %rdx
subq %rdx, %rax
sarq $0x2, %rax
xorps %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rax
je 0x3669
movss (%rdx,%rsi,4), %xmm1
mulss %xmm1, %xmm1
mulss (%rcx,%rsi,4), %xmm1
addss %xmm1, %xmm0
incq %rsi
jmp 0x364a
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/tetsuok[P]kernel-pa/./learner.h
// Function: kernel::Learner::UpdateIndex(std::vector<std::pair<unsigned int, float>, std::allocator<std::pair<unsigned int, float>>> const&, unsigned int)
void UpdateIndex(const fv& x, unsigned int sv_id) {
    for (const auto& p : x) {
      const unsigned int id = p.first;
      if (sv_index_.size() <= id) {
        sv_index_.resize(id + 1);
      }
      sv_index_[id].push_back(std::make_pair(sv_id, p.second));
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r12
movq 0x8(%rsi), %r13
leaq 0x28(%rdi), %r14
movl %edx, %ebp
cmpq %r13, %r12
je 0x374a
movl (%r12), %r15d
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %r15, %rax
ja 0x3725
leal 0x1(%r15), %esi
movq %r14, %rdi
callq 0x37ea
movq (%r14), %rcx
imulq $0x18, %r15, %rdi
addq %rcx, %rdi
movl 0x4(%r12), %eax
shlq $0x20, %rax
orq %rbp, %rax
movq %rax, (%rsp)
movq %rsp, %rsi
callq 0x3960
addq $0x8, %r12
jmp 0x36f5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tetsuok[P]kernel-pa/tokenizer.cc
// Function: kernel::Tokenize(char const*, std::vector<std::pair<unsigned int, float>, std::allocator<std::pair<unsigned int, float>>>*, short*, unsigned long*)
bool Tokenize(const char *line, fv *fv, short *y, std::size_t *maxid) {
  *y = static_cast<short>(atoi(line));
  if (*y != 1 && *y != -1) {
    LOG(ERROR) << "Invalid label. A label must be +1 or -1.";
    return false;
  }

  while (!isspace(*line) && *line) line++;
  while (isspace(*line) && *line) line++;
  while (1) {
    const char *begin = line;
    unsigned int index = std::atol(begin);
    while (*line != ':' && *line) line++;
    float val = std::atof(++line);

    while (*line != ' ' && *line) line++;
    fv->push_back(std::make_pair(index, val));
    if (index > *maxid) *maxid = index;
    if (*line++ == 0) break;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
callq 0x2200
movw %ax, (%r12)
cmpw $-0x1, %ax
je 0x4506
movzwl %ax, %eax
cmpl $0x1, %eax
jne 0x45b2
addq $-0x2, %r15
movsbl 0x2(%r15), %ebp
movl %ebp, %edi
callq 0x2050
incq %r15
testl %ebp, %ebp
je 0x4527
testl %eax, %eax
je 0x450a
jmp 0x4527
testl %eax, %eax
je 0x453a
movsbl 0x1(%r15), %ebp
incq %r15
movl %ebp, %edi
callq 0x2050
testl %ebp, %ebp
jne 0x4523
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x2160
movq %rax, %r13
leaq 0x1(%r15), %rdi
addq $0x2, %r15
movzbl -0x1(%rdi), %eax
testl %eax, %eax
je 0x4567
cmpl $0x3a, %eax
je 0x4567
incq %rdi
incq %r15
jmp 0x4552
callq 0x2180
cvtsd2ss %xmm0, %xmm0
movzbl -0x1(%r15), %eax
testb $-0x21, %al
je 0x457e
incq %r15
jmp 0x4570
movd %xmm0, %eax
shlq $0x20, %rax
movl %r13d, %r13d
orq %r13, %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3960
cmpq %r13, (%rbx)
jae 0x45a4
movq %r13, (%rbx)
cmpb $0x0, -0x1(%r15)
jne 0x453f
movb $0x1, %al
jmp 0x463e
movl $0x2, 0xc(%rsp)
movq 0x3a2f(%rip), %rdi      # 0x7ff0
leaq 0xa73(%rip), %rsi       # 0x503b
callq 0x2130
leaq 0xa6c(%rip), %rsi       # 0x5040
movq %rax, %rdi
callq 0x2130
leaq 0xa63(%rip), %rsi       # 0x5046
movq %rax, %rdi
callq 0x2130
leaq 0xc3a(%rip), %rsi       # 0x522c
movq %rax, %rdi
callq 0x2130
leaq 0xa3d(%rip), %rsi       # 0x503e
movq %rax, %rdi
callq 0x2130
pushq $0xd
popq %rsi
movq %rax, %rdi
callq 0x2240
leaq 0xa45(%rip), %rsi       # 0x5060
movq %rax, %rdi
callq 0x2130
leaq 0xc0f(%rip), %rsi       # 0x5239
movq %rax, %rdi
callq 0x2130
leaq 0xc(%rsp), %rdi
callq 0x2858
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x2858
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: append_symbol_coins(Coin*, unsigned int const*, unsigned int, unsigned long)
static unsigned append_symbol_coins(Coin* coins, const unsigned* frequencies, unsigned numcodes, size_t sum)
{
  unsigned i;
  unsigned j = 0; /*index of present symbols*/
  for(i = 0; i < numcodes; i++)
  {
    if(frequencies[i] != 0) /*only include symbols that are present*/
    {
      coins[j].weight = frequencies[i] / (float)sum;
      uivector_push_back(&coins[j].symbols, i);
      j++;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testq %rcx, %rcx
js 0x294d
cvtsi2ss %rcx, %xmm0
jmp 0x2962
movq %rcx, %rax
shrq %rax
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movl %edx, %r12d
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %r15, %r12
je 0x29aa
movl (%rbx,%r15,4), %eax
testl %eax, %eax
je 0x29a5
movl %eax, %eax
cvtsi2ss %rax, %xmm0
divss 0xc(%rsp), %xmm0
movl %ebp, %eax
shlq $0x5, %rax
leaq (%r14,%rax), %rdi
movss %xmm0, 0x18(%r14,%rax)
movl %r15d, %esi
callq 0x91c5
incl %ebp
incq %r15
jmp 0x2970
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: sort_coins(Coin*, unsigned long)
static void sort_coins(Coin* data, size_t amount)
{
  size_t gap = amount;
  unsigned char swapped = 0;
  while((gap > 1) || swapped)
  {
    size_t i;
    gap = (gap * 10) / 13; /*shrink factor 1.3*/
    if(gap == 9 || gap == 10) gap = 11; /*combsort11*/
    if(gap < 1) gap = 1;
    swapped = 0;
    for(i = 0; i < amount - gap; i++)
    {
      size_t j = i + gap;
      if(data[j].weight < data[i].weight)
      {
        float temp = data[j].weight; data[j].weight = data[i].weight; data[i].weight = temp;
        uivector_swap(&data[i].symbols, &data[j].symbols);
        swapped = 1;
      }
    }
  }
}

// Assembly:
pushq %rbx
xorl %r10d, %r10d
movabsq $0xd, %r8
movabsq $0xb, %r9
movq %rsi, %rax
cmpq $0x2, %rax
setae %cl
testb %r10b, %r10b
setne %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2a62
imulq $0xa, %rax, %rcx
xorl %r10d, %r10d
movq %rcx, %rax
xorl %edx, %edx
divq %r8
addq $-0x75, %rcx
cmpq $0x1, %rax
adcq $0x0, %rax
cmpq $0x1a, %rcx
cmovbq %r9, %rax
movq %rax, %rcx
shlq $0x5, %rcx
movq %rdi, %rdx
movq %rsi, %r11
cmpq %r11, %rax
je 0x29d2
movss 0x18(%rdx,%rcx), %xmm0
movss 0x18(%rdx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x2a59
movss %xmm1, 0x18(%rdx,%rcx)
movss %xmm0, 0x18(%rdx)
movups 0x8(%rdx), %xmm0
movups 0x8(%rdx,%rcx), %xmm1
movups %xmm1, 0x8(%rdx)
movups %xmm0, 0x8(%rdx,%rcx)
movq (%rdx), %r10
movq (%rdx,%rcx), %rbx
movq %rbx, (%rdx)
movq %r10, (%rdx,%rcx)
movb $0x1, %r10b
decq %r11
addq $0x20, %rdx
jmp 0x2a16
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_zlib_compress(unsigned char**, unsigned long*, unsigned char const*, unsigned long, LodePNGCompressSettings const*)
unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
                               size_t insize, const LodePNGCompressSettings* settings)
{
  /*initially, *out must be NULL and outsize 0, if you just give some random *out
  that's pointing to a non allocated buffer, this'll crash*/
  ucvector outv;
  size_t i;
  unsigned error;
  unsigned char* deflatedata = 0;
  size_t deflatesize = 0;

  unsigned ADLER32;
  /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/
  unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/
  unsigned FLEVEL = 0;
  unsigned FDICT = 0;
  unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64;
  unsigned FCHECK = 31 - CMFFLG % 31;
  CMFFLG += FCHECK;

  /*ucvector-controlled version of the output buffer, for dynamic array*/
  ucvector_init_buffer(&outv, *out, *outsize);

  ucvector_push_back(&outv, (unsigned char)(CMFFLG / 256));
  ucvector_push_back(&outv, (unsigned char)(CMFFLG % 256));

  error = deflate(&deflatedata, &deflatesize, in, insize, settings);

  if(!error)
  {
    ADLER32 = adler32(in, (unsigned)insize);
    for(i = 0; i < deflatesize; i++) ucvector_push_back(&outv, deflatedata[i]);
    free(deflatedata);
    lodepng_add32bitInt(&outv, ADLER32);
  }

  *out = outv.data;
  *outsize = outv.size;

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rcx, %r15
andq $0x0, 0x8(%rsp)
movq %rdx, %r12
andq $0x0, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rsi), %rcx
leaq 0x10(%rsp), %rbp
movq %rax, (%rbp)
movq %rcx, 0x8(%rbp)
movq %rcx, 0x10(%rbp)
pushq $0x78
popq %rsi
movq %rbp, %rdi
callq 0x4139
pushq $0x1
popq %rsi
movq %rbp, %rdi
callq 0x4139
movq 0x18(%r13), %rax
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r13, %r8
testq %rax, %rax
je 0x40c8
callq *%rax
jmp 0x40cd
callq 0x32eb
movl %eax, %ebp
testl %eax, %eax
jne 0x4118
movq %r12, %rdi
movl %r15d, %esi
callq 0x3ffd
movl %eax, %r15d
xorl %r13d, %r13d
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %rdi
cmpq (%rsp), %r13
jae 0x4106
movzbl (%rdi,%r13), %esi
movq %r12, %rdi
callq 0x4139
incq %r13
jmp 0x40e9
callq 0x2200
leaq 0x10(%rsp), %rdi
movl %r15d, %esi
callq 0x4165
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movq 0x18(%rsp), %rax
movq %rax, (%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_crc32(unsigned char const*, unsigned long)
static unsigned Crc32_update_crc(const unsigned char* buf, unsigned crc, size_t len)
{
  unsigned c = crc;
  size_t n;

  if(!Crc32_crc_table_computed) Crc32_make_crc_table();
  for(n = 0; n < len; n++)
  {
    c = Crc32_crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
  }
  return c;
}

// Assembly:
cmpb $0x0, 0x11028(%rip)     # 0x151f0
jne 0x4217
xorl %eax, %eax
pushq $0x8
popq %rcx
leaq 0x1102a(%rip), %rdx     # 0x15200
cmpq $0x100, %rax            # imm = 0x100
je 0x4210
movl %ecx, %r8d
movl %eax, %r9d
subl $0x1, %r8d
jb 0x4207
movl %r9d, %r10d
shrl %r10d
movl %r10d, %r11d
xorl $0xedb88320, %r11d      # imm = 0xEDB88320
testb $0x1, %r9b
cmovel %r10d, %r11d
movl %r11d, %r9d
jmp 0x41e4
movl %r9d, (%rdx,%rax,4)
incq %rax
jmp 0x41d6
movb $0x1, 0x10fd9(%rip)     # 0x151f0
pushq $-0x1
popq %rax
xorl %ecx, %ecx
leaq 0x10fdd(%rip), %rdx     # 0x15200
cmpq %rcx, %rsi
je 0x423f
movb (%rdi,%rcx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rdx,%r8,4), %eax
incq %rcx
jmp 0x4223
notl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_chunk_append(unsigned char**, unsigned long*, unsigned char const*)
unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk)
{
  unsigned i;
  unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12;
  unsigned char *chunk_start, *new_buffer;
  size_t new_length = (*outlength) + total_chunk_length;
  if(new_length < total_chunk_length || new_length < (*outlength)) return 77; /*integer overflow happened*/

  new_buffer = (unsigned char*)myrealloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*out) = new_buffer;
  (*outlength) = new_length;
  chunk_start = &(*out)[new_length - total_chunk_length];

  for(i = 0; i < total_chunk_length; i++) chunk_start[i] = chunk[i];

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x254c
movl %eax, %r14d
addl $0xc, %r14d
movq (%r15), %rbp
movq %rbp, %r13
addq %r14, %r13
jae 0x439c
pushq $0x4d
jmp 0x43ce
movq (%r12), %rdi
movq %r13, %rsi
callq 0x2310
testq %rax, %rax
je 0x43cc
movq %rax, (%r12)
movq %r13, (%r15)
addq %rax, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x43cf
movb (%rbx,%rcx), %dl
movb %dl, (%rbp,%rcx)
incq %rcx
jmp 0x43bb
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_chunk_create(unsigned char**, unsigned long*, unsigned int, char const*, unsigned char const*)
unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length,
                              const char* type, const unsigned char* data)
{
  unsigned i;
  unsigned char *chunk, *new_buffer;
  size_t new_length = (*outlength) + length + 12;
  if(new_length < length + 12 || new_length < (*outlength)) return 77; /*integer overflow happened*/
  new_buffer = (unsigned char*)myrealloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*out) = new_buffer;
  (*outlength) = new_length;
  chunk = &(*out)[(*outlength) - length - 12];

  /*1: length*/
  lodepng_set32bitInt(chunk, (unsigned)length);

  /*2: chunk name (4 letters)*/
  chunk[4] = type[0];
  chunk[5] = type[1];
  chunk[6] = type[2];
  chunk[7] = type[3];

  /*3: the data*/
  for(i = 0; i < length; i++) chunk[8 + i] = data[i];

  /*4: CRC (of the chunkname characters and the data)*/
  lodepng_chunk_generate_crc(chunk);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movl %edx, %r13d
leaq 0xc(%r13), %rbp
addq (%rsi), %rbp
setb %al
leal 0xc(%r14), %esi
cmpq %rsi, %rbp
setb %sil
orb %al, %sil
je 0x4410
pushq $0x4d
jmp 0x448c
movq %r8, %rbx
movq %rdi, %r12
movq %rcx, (%rsp)
movq (%rdi), %rdi
movq %rbp, %rsi
callq 0x2310
testq %rax, %rax
je 0x448a
movq %rax, (%r12)
movq %rbp, (%r15)
subq %r13, %rbp
leaq (%rax,%rbp), %rdi
addq $-0xc, %rdi
movq %r14, %rdx
movl %edx, %ecx
shrl $0x18, %ecx
movb %cl, -0xc(%rax,%rbp)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, -0xb(%rax,%rbp)
movb %dh, -0xa(%rax,%rbp)
movb %dl, -0x9(%rax,%rbp)
movq (%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x8(%rax,%rbp)
negq %r13
pushq $0x8
popq %rax
leaq (%rax,%r13), %rcx
cmpq $0x8, %rcx
je 0x4481
movb -0x8(%rbx,%rax), %cl
movl %eax, %edx
movb %cl, (%rdi,%rdx)
incq %rax
jmp 0x4469
callq 0x431b
xorl %eax, %eax
jmp 0x448d
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_color_mode_copy(LodePNGColorMode*, LodePNGColorMode const*)
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source)
{
  size_t i;
  lodepng_color_mode_cleanup(dest);
  *dest = *source;
  if(source->palette)
  {
    dest->palette = (unsigned char*)mymalloc(source->palettesize * 4);
    if(!dest->palette && source->palettesize) return 83; /*alloc fail*/
    for(i = 0; i < source->palettesize * 4; i++) dest->palette[i] = source->palette[i];
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x44ba
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
cmpq $0x0, 0x8(%rbx)
je 0x4546
movq 0x10(%rbx), %r15
leaq (,%r15,4), %rdi
callq 0x2260
movq %rax, 0x8(%r14)
testq %rax, %rax
sete %al
testq %r15, %r15
setne %cl
testb %al, %cl
jne 0x454a
xorl %eax, %eax
xorl %ecx, %ecx
shlq $0x2, %r15
cmpq %r15, %rcx
jae 0x454d
movq 0x8(%rbx), %rdx
movb (%rdx,%rcx), %dl
movq 0x8(%r14), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
movq 0x10(%rbx), %r15
jmp 0x4526
xorl %eax, %eax
jmp 0x454d
pushq $0x53
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_palette_add(LodePNGColorMode*, unsigned char, unsigned char, unsigned char, unsigned char)
unsigned lodepng_palette_add(LodePNGColorMode* info,
                             unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
  unsigned char* data;
  /*the same resize technique as C++ std::vectors is used, and here it's made so that for a palette with
  the max of 256 colors, it'll have the exact alloc size*/
  if(!(info->palettesize & (info->palettesize - 1))) /*if palettesize is 0 or a power of two*/
  {
    /*allocated data must be at least 4* palettesize (for 4 color bytes)*/
    size_t alloc_size = info->palettesize == 0 ? 4 : info->palettesize * 4 * 2;
    data = (unsigned char*)myrealloc(info->palette, alloc_size);
    if(!data) return 83; /*alloc fail*/
    else info->palette = data;
  }
  info->palette[4 * info->palettesize + 0] = r;
  info->palette[4 * info->palettesize + 1] = g;
  info->palette[4 * info->palettesize + 2] = b;
  info->palette[4 * info->palettesize + 3] = a;
  info->palettesize++;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
movq 0x10(%rdi), %rcx
leaq -0x1(%rcx), %rax
testq %rax, %rcx
jne 0x45a0
leaq (,%rcx,8), %rax
testq %rcx, %rcx
pushq $0x4
popq %rsi
cmovneq %rax, %rsi
movq 0x8(%r14), %rdi
callq 0x2310
testq %rax, %rax
je 0x45dd
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
jmp 0x45a4
movq 0x8(%r14), %rax
movb %r12b, (%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r15b, 0x1(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bpl, 0x2(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bl, 0x3(%rax,%rcx,4)
incq 0x10(%r14)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x53
popq %rax
jmp 0x45d4
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_has_palette_alpha(LodePNGColorMode const*)
unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info)
{
  size_t i;
  for(i = 0; i < info->palettesize; i++)
  {
    if(info->palette[i * 4 + 3] < 255) return 1;
  }
  return 0;
}

// Assembly:
movq 0x10(%rdi), %rcx
xorl %eax, %eax
pushq $0x1
popq %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x464c
movq 0x8(%rdi), %r8
cmpb $-0x1, 0x3(%r8,%rsi,4)
leaq 0x1(%rsi), %rsi
je 0x4635
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: LodePNGText_cleanup(LodePNGInfo*)
static void LodePNGText_cleanup(LodePNGInfo* info)
{
  size_t i;
  for(i = 0; i < info->text_num; i++)
  {
    string_cleanup(&info->text_keys[i]);
    string_cleanup(&info->text_strings[i]);
  }
  myfree(info->text_keys);
  myfree(info->text_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x50(%rbx), %rdi
cmpq 0x48(%rbx), %r15
jae 0x46d8
addq %r14, %rdi
callq 0x9e42
movq 0x58(%rbx), %rdi
addq %r14, %rdi
callq 0x9e42
incq %r15
addq $0x8, %r14
jmp 0x46b1
callq 0x2200
movq 0x58(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_add_text(LodePNGInfo*, char const*, char const*)
unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str)
{
  char** new_keys = (char**)(myrealloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));
  char** new_strings = (char**)(myrealloc(info->text_strings, sizeof(char*) * (info->text_num + 1)));
  if(!new_keys || !new_strings)
  {
    myfree(new_keys);
    myfree(new_strings);
    return 83; /*alloc fail*/
  }

  info->text_num++;
  info->text_keys = new_keys;
  info->text_strings = new_strings;

  string_init(&info->text_keys[info->text_num - 1]);
  string_set(&info->text_keys[info->text_num - 1], key);

  string_init(&info->text_strings[info->text_num - 1]);
  string_set(&info->text_strings[info->text_num - 1], str);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2310
movq %rax, %r12
movq 0x48(%r14), %rax
movq 0x58(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2310
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x47a3
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movq %r12, 0x50(%r14)
movq %r13, 0x58(%r14)
leaq (%r12,%rax,8), %rdi
callq 0x47c0
movq 0x48(%r14), %rax
movq 0x50(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq %r15, %rsi
callq 0x47cb
movq 0x48(%r14), %rax
movq 0x58(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
callq 0x47c0
movq 0x48(%r14), %rax
movq 0x58(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq %rbx, %rsi
callq 0x47cb
xorl %eax, %eax
jmp 0x47b6
movq %r12, %rdi
callq 0x2200
movq %r13, %rdi
callq 0x2200
pushq $0x53
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: string_set(char**, char const*)
static void string_set(char** out, const char* in)
{
  size_t insize = strlen(in), i = 0;
  if(string_resize(out, insize))
  {
    for(i = 0; i < insize; i++)
    {
      (*out)[i] = in[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20c0
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x9e54
testl %eax, %eax
je 0x4805
xorl %eax, %eax
cmpq %rax, %r15
je 0x4805
movb (%rbx,%rax), %cl
movq (%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
jmp 0x47f2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: LodePNGIText_cleanup(LodePNGInfo*)
static void LodePNGIText_cleanup(LodePNGInfo* info)
{
  size_t i;
  for(i = 0; i < info->itext_num; i++)
  {
    string_cleanup(&info->itext_keys[i]);
    string_cleanup(&info->itext_langtags[i]);
    string_cleanup(&info->itext_transkeys[i]);
    string_cleanup(&info->itext_strings[i]);
  }
  myfree(info->itext_keys);
  myfree(info->itext_langtags);
  myfree(info->itext_transkeys);
  myfree(info->itext_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x68(%rbx), %rdi
cmpq 0x60(%rbx), %r15
jae 0x485d
addq %r14, %rdi
callq 0x9e42
movq 0x70(%rbx), %rdi
addq %r14, %rdi
callq 0x9e42
movq 0x78(%rbx), %rdi
addq %r14, %rdi
callq 0x9e42
movq 0x80(%rbx), %rdi
addq %r14, %rdi
callq 0x9e42
incq %r15
addq $0x8, %r14
jmp 0x481b
callq 0x2200
movq 0x70(%rbx), %rdi
callq 0x2200
movq 0x78(%rbx), %rdi
callq 0x2200
movq 0x80(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_info_init(LodePNGInfo*)
void lodepng_color_mode_init(LodePNGColorMode* info)
{
  info->key_defined = 0;
  info->key_r = info->key_g = info->key_b = 0;
  info->colortype = LCT_RGBA;
  info->bitdepth = 8;
  info->palette = 0;
  info->palettesize = 0;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x10(%rdi)
movups %xmm0, 0x18(%rdi)
andl $0x0, 0x8(%rdi)
andq $0x0, (%rdi)
andl $0x0, 0xa4(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
andl $0x0, 0x88(%rdi)
jmp 0x4a9f
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_color_mode_equal(LodePNGColorMode const*, LodePNGColorMode const*)
static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b)
{
  size_t i;
  if(a->colortype != b->colortype) return 0;
  if(a->bitdepth != b->bitdepth) return 0;
  if(a->key_defined != b->key_defined) return 0;
  if(a->key_defined)
  {
    if(a->key_r != b->key_r) return 0;
    if(a->key_g != b->key_g) return 0;
    if(a->key_b != b->key_b) return 0;
  }
  if(a->palettesize != b->palettesize) return 0;
  for(i = 0; i < a->palettesize * 4; i++)
  {
    if(a->palette[i] != b->palette[i]) return 0;
  }
  return 1;
}

// Assembly:
movl (%rdi), %ecx
xorl %eax, %eax
cmpl (%rsi), %ecx
jne 0x5176
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x5176
movl 0x18(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
jne 0x5176
testl %ecx, %ecx
je 0x5142
movl 0x1c(%rdi), %ecx
cmpl 0x1c(%rsi), %ecx
jne 0x5176
movl 0x20(%rdi), %ecx
cmpl 0x20(%rsi), %ecx
jne 0x5176
movl 0x24(%rdi), %ecx
cmpl 0x24(%rsi), %ecx
jne 0x5176
movq 0x10(%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jne 0x5176
shlq $0x2, %rcx
xorl %r8d, %r8d
pushq $0x1
popq %rdx
cmpq %r8, %rcx
je 0x5177
movq 0x8(%rdi), %rax
movb (%rax,%r8), %r9b
movq 0x8(%rsi), %r10
leaq 0x1(%r8), %r11
xorl %eax, %eax
cmpb (%r10,%r8), %r9b
movq %r11, %r8
je 0x5156
retq
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: color_tree_add(ColorTree*, unsigned char, unsigned char, unsigned char, unsigned char, int)
static void color_tree_add(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a, int index)
{
  tree = &tree->next[r];
  if(tree->next == 0) color_tree_make_next(tree);
  tree = &tree->next[g];
  if(tree->next == 0) color_tree_make_next(tree);
  tree = &tree->next[b];
  if(tree->next == 0) color_tree_make_next(tree);
  tree = &tree->next[a];

  tree->index = index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r12d
movq (%rdi), %r13
shll $0x4, %esi
movq (%r13,%rsi), %r15
testq %r15, %r15
jne 0x51b0
addq %rsi, %r13
movq %r13, %rdi
callq 0x9e88
movq (%r13), %r15
movzbl %r12b, %eax
shll $0x4, %eax
movq (%r15,%rax), %r12
testq %r12, %r12
jne 0x51ce
addq %rax, %r15
movq %r15, %rdi
callq 0x9e88
movq (%r15), %r12
movzbl %r14b, %ecx
shll $0x4, %ecx
movq (%r12,%rcx), %rax
testq %rax, %rax
jne 0x51ed
addq %rcx, %r12
movq %r12, %rdi
callq 0x9e88
movq (%r12), %rax
movzbl %bpl, %ecx
shll $0x4, %ecx
movl %ebx, 0x8(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: addChunk_tEXt(ucvector*, char const*, char const*)
static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring)
{
  unsigned error = 0;
  size_t i;
  ucvector text;
  ucvector_init(&text);
  for(i = 0; keyword[i] != 0; i++) ucvector_push_back(&text, (unsigned char)keyword[i]);
  ucvector_push_back(&text, 0);
  for(i = 0; textstring[i] != 0; i++) ucvector_push_back(&text, (unsigned char)textstring[i]);
  error = addChunk(out, "tEXt", text.data, text.size);
  ucvector_cleanup(&text);

  return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
andq $0x0, 0x10(%r12)
movb (%r15), %al
testb %al, %al
je 0x893a
movzbl %al, %esi
movq %r12, %rdi
callq 0x4139
incq %r15
jmp 0x8923
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x4139
movb (%r14), %al
testb %al, %al
je 0x895e
movzbl %al, %esi
movq %r15, %rdi
callq 0x4139
incq %r14
jmp 0x8947
movq %rsp, %r14
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0x6afb(%rip), %rsi      # 0xf46a
movq %rbx, %rdi
callq 0xad14
movq %r14, %rdi
callq 0x9fa4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng::compress(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned long, LodePNGCompressSettings const&)
unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
                  const LodePNGCompressSettings& settings)
{
  unsigned char* buffer = 0;
  size_t buffersize = 0;
  unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings);
  if(buffer)
  {
    out.insert(out.end(), &buffer[0], &buffer[buffersize]);
    myfree(buffer);
  }
  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq %rsp, %rsi
andq $0x0, (%rsi)
movq %r14, %rdi
callq 0x8cd8
movl %eax, %ebp
movq (%r14), %rdx
testq %rdx, %rdx
je 0x8ccd
movq 0x8(%rbx), %rsi
movq (%rsp), %rcx
addq %rdx, %rcx
movq %rbx, %rdi
callq 0xad68
movq 0x8(%rsp), %rdi
callq 0x2200
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq