LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/IHorvalds[P]RomAna/./processing/util.hpp
// Function: EssenceGenerator::save()
void save() {
    std::string pyCommand1 = "python3 helpers/compute_local_essentials.py " + poet + " " + distributionType + " " + std::to_string(procentOfWork);
    int warning = system(pyCommand1.data());
    
    if (sortValues) {
      std::string pyCommand2 = "python3 helpers/sort_local_distribution.py " + poet + " essential";
      warning = system(pyCommand2.data());
    }
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x3b56(%rip), %rsi      # 0xa712
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6670
leaq 0x3577(%rip), %rdx      # 0xa14d
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x67cf
leaq 0x20(%rbx), %rdx
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x8962
leaq 0x3550(%rip), %rdx      # 0xa14d
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x67cf
leaq 0x48(%rsp), %rdi
movsd 0x33f7(%rip), %xmm0     # 0xa010
callq 0x8981
leaq 0x88(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x6515
leaq 0x48(%rsp), %rdi
callq 0x3120
leaq 0x28(%rsp), %rdi
callq 0x3120
leaq 0x8(%rsp), %rdi
callq 0x3120
leaq 0x68(%rsp), %rdi
callq 0x3120
leaq 0xa8(%rsp), %rdi
callq 0x3120
movq 0x88(%rsp), %rdi
callq 0x31f0
cmpb $0x1, 0x40(%rbx)
jne 0x6cc5
leaq 0x3abb(%rip), %rsi      # 0xa73f
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x6670
leaq 0x3ad3(%rip), %rdx      # 0xa76b
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x67cf
leaq 0x8(%rsp), %rdi
callq 0x3120
movq 0x28(%rsp), %rdi
callq 0x31f0
leaq 0x28(%rsp), %rdi
callq 0x3120
leaq 0x88(%rsp), %rdi
callq 0x3120
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x6cef
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3120
jmp 0x6cfb
jmp 0x6cf8
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x6d4c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3120
jmp 0x6d17
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3120
jmp 0x6d26
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3120
jmp 0x6d35
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3120
jmp 0x6d44
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O2/IHorvalds[P]RomAna/./processing/util.hpp
// Function: SimilarityGenerator::save()
void save() {
    // The first frequency should write the file, the others will only append
    call("rank", false);
    call("weight", true);
    call("relative", true);
    call("richness", true);
    call("gini", true);
  }

// Assembly:
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
leaq 0x3a21(%rip), %rsi      # 0xa7a3
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x64da
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8aec
leaq 0x90(%rsp), %rdi
callq 0x3120
leaq 0x39ee(%rip), %rsi      # 0xa7a8
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x64da
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x8aec
leaq 0x70(%rsp), %rdi
callq 0x3120
leaq 0x39c5(%rip), %rsi      # 0xa7af
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x64da
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x8aec
leaq 0x50(%rsp), %rdi
callq 0x3120
leaq 0x399e(%rip), %rsi      # 0xa7b8
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x64da
leaq 0x30(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x8aec
leaq 0x30(%rsp), %rdi
callq 0x3120
leaq 0x3977(%rip), %rsi      # 0xa7c1
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x64da
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x8aec
leaq 0x10(%rsp), %rdi
callq 0x3120
addq $0xb0, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x6eb7
jmp 0x6ebe
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x6eb7
jmp 0x6ebe
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x6eb7
jmp 0x6ebe
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x6eb7
jmp 0x6ebe
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x3120
jmp 0x6ec1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O2/IHorvalds[P]RomAna/./processing/parserOltean.hpp
// Function: text::getByte()
char getByte() {
    if (currSize == fileSize)
      return 0;
    if (index == LIMIT_BUFFER) {
      index = 0;
      input.read(buffer, BUFF_SIZE);
      LIMIT_BUFFER = input.gcount();
    }
    ++currSize;
    return buffer[index++];
  }

// Assembly:
movl 0x610(%rdi), %eax
cmpl 0x60c(%rdi), %eax
jne 0x7335
xorl %eax, %eax
retq
pushq %rbx
movq %rdi, %rbx
movl 0x614(%rdi), %ecx
cmpl 0x608(%rdi), %ecx
jne 0x7377
andl $0x0, 0x614(%rbx)
leaq 0x208(%rbx), %rsi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
callq 0x32f0
movl 0x8(%rbx), %eax
movl %eax, 0x608(%rbx)
movl 0x610(%rbx), %eax
movl 0x614(%rbx), %ecx
incl %eax
movl %eax, 0x610(%rbx)
leal 0x1(%rcx), %eax
movl %eax, 0x614(%rbx)
movslq %ecx, %rax
movb 0x208(%rbx,%rax), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/IHorvalds[P]RomAna/./processing/parserOltean.hpp
// Function: text::isUnallowed(char)
static bool isUnallowed(char c) {
    for (unsigned index = 0; index < COUNT_UNALLOWED; ++index) {
      if (unallowed[index] == c)
        return true;
    }
    return false;
  }

// Assembly:
xorl %edx, %edx
leaq 0x3483(%rip), %rax      # 0xa840
movq %rdx, %rcx
cmpq $0x6, %rdx
je 0x73d0
leaq 0x1(%rcx), %rdx
cmpb %dil, (%rcx,%rax)
jne 0x73bd
cmpq $0x6, %rcx
setb %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: send_message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void send_message(string message, int speaker) {
    int status = -1, retries = Socket::max_retries;
    for (int i = 0; (unsigned int)i < message.size(); i += Socket::buffer_size) {
        cout << speaker << " speaking\n";
        while (status == -1 && retries--)
            status = socket_server->Write(message.substr(i, Socket::buffer_size), speaker);        
    }
    
    if (status == -1) active->remove(speaker);
    
    pthread_mutex_unlock(&lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
pushq $-0x1
popq %r13
pushq $0x5
popq %rbx
xorl %r15d, %r15d
leaq -0x50(%rbp), %r12
cmpq %r15, 0x8(%r14)
jbe 0x2ef9
movq 0x7142(%rip), %rdi      # 0x9fd8
movl -0x2c(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x3277(%rip), %rsi      # 0x611f
callq 0x2200
cmpl $-0x1, %r13d
jne 0x2ef0
subl $0x1, %ebx
jb 0x2eed
movq 0x7351(%rip), %r13      # 0xa210
movl $0x1000, %ecx           # imm = 0x1000
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2240
movq %r13, %rdi
movq %r12, %rsi
movl -0x2c(%rbp), %edx
callq 0x2c8e
movl %eax, %r13d
movq %r12, %rdi
callq 0x2110
jmp 0x2ead
pushq $-0x1
popq %rbx
addq $0x1000, %r15           # imm = 0x1000
jmp 0x2e89
cmpl $-0x1, %r13d
jne 0x2f0e
movq 0x739a(%rip), %rdi      # 0xa2a0
movl -0x2c(%rbp), %esi
callq 0x46fa
leaq 0x7303(%rip), %rdi      # 0xa218
callq 0x2190
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O2/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: ActiveClients::remove(int)
void remove(int conn) {
        pthread_mutex_lock(&lock);    
        int pos = find(conn);
        clients.erase(clients.begin() + pos);
        pthread_mutex_unlock(&lock);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x5b08(%rip), %r15      # 0xa218
movq %r15, %rdi
callq 0x22e0
movq %r14, %rdi
movl %ebx, %esi
callq 0x4746
cltq
imulq $0x78, %rax, %rsi
addq (%r14), %rsi
movq %r14, %rdi
callq 0x4eb6
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O2/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: ActiveClients::insert(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void insert(int conn, string name, string ip) {
        pthread_mutex_lock(&lock);
        Client new_client = Client(curr_id++, conn, name, ip);
        clients.push_back(new_client);
        pthread_mutex_unlock(&lock);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x553b(%rip), %rdi      # 0xa218
callq 0x22e0
movl 0x18(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x18(%rbx)
leaq -0x68(%rbp), %rdi
movq %r13, %rsi
callq 0x22b0
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0x22b0
leaq -0xe0(%rbp), %rdi
leaq -0x68(%rbp), %rcx
leaq -0x48(%rbp), %r8
movl %r15d, %esi
movl %r14d, %edx
callq 0x5090
leaq -0x48(%rbp), %rdi
callq 0x2110
leaq -0x68(%rbp), %rdi
callq 0x2110
leaq -0xe0(%rbp), %rsi
movq %rbx, %rdi
callq 0x514a
leaq 0x54d1(%rip), %rdi      # 0xa218
callq 0x2190
leaq -0xe0(%rbp), %rdi
callq 0x49aa
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x49aa
jmp 0x4d95
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2110
jmp 0x4d8c
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O2/davidcairuz[P]network-internet-relay-chat/server.cpp
// Function: Client::Client(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Client(int id, int conn, string name, string ip) {
        this->id = id;
        this->ip = ip;
        this->conn = conn;
        this->name = name;

        this->channel_name = "$";
        this->is_admin = false;
        this->is_muted = false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movl %edx, %r14d
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
addq $0x8, %rdi
movb %al, 0x38(%rbx)
leaq 0x60(%rbx), %rcx
movq %rcx, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
leaq 0x28(%rbx), %r15
leaq 0x50(%rbx), %r13
movb %al, 0x60(%rbx)
movl %esi, (%rbx)
movq %rdi, -0x30(%rbp)
movq %r8, %rsi
callq 0x2140
movl %r14d, 0x4(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2140
leaq 0x1023(%rip), %rsi      # 0x612c
movq %r13, %rdi
callq 0x23a0
andw $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x2110
movq -0x30(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/main.cpp
// Function: boundary_y(Vec2<int>, Vec2<int>, int)
int boundary_y(Vec2i v0, Vec2i v1, int x){
    float y;
    if (v1.x != v0.x){
        y = static_cast<float>(v1.y - v0.y) / (v1.x - v0.x) * (x - v0.x) + v0.y;
    }
    return static_cast<int>(y + 0.5);
}

// Assembly:
movq %rsi, %rax
shrq $0x20, %rax
subl %edi, %esi
movq %rdi, %rcx
shrq $0x20, %rcx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
subl %edi, %edx
cvtsi2ss %esi, %xmm1
divss %xmm1, %xmm0
cvtsi2ss %edx, %xmm1
mulss %xmm0, %xmm1
cvtsi2ss %ecx, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0x2af2(%rip), %xmm0     # 0x5008
cvttsd2si %xmm0, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/main.cpp
// Function: line(Vec2<int>, Vec2<int>, TGAImage&, TGAColor)
void line(Vec2i p0, Vec2i p1, TGAImage &image, TGAColor color) {
    bool steep = false;
    if (std::abs(p0.x-p1.x)<std::abs(p0.y-p1.y)) {
        std::swap(p0.x, p0.y);
        std::swap(p1.x, p1.y);
        steep = true;
    }
    if (p0.x>p1.x) {
        std::swap(p0, p1);
    }
    
    if (p0.x != p1.x) {
        for (int x=p0.x; x<=p1.x; x++) {
            float t = (x-p0.x)/(float)(p1.x-p0.x);
            int y = p0.y*(1.-t) + p1.y*t +0.5;
            if (steep) {
                image.set(y, x, color);
            } else {
                image.set(x, y, color);
            }
        }
    } else {
        for (int y=p0.y; y<=p1.y; y++) {
            image.set(p0.x, y, color);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdi, %rax
shrq $0x20, %rax
movq %rsi, %rcx
shrq $0x20, %rcx
movl %edi, %r8d
subl %esi, %r8d
movl %r8d, %r9d
negl %r9d
cmovsl %r8d, %r9d
movq %rdx, %r14
movl %eax, %edx
subl %ecx, %edx
movl %edx, %r10d
negl %r10d
cmovsl %edx, %r10d
movl %r9d, %r8d
movl %r10d, 0x14(%rsp)
cmpl %r10d, %r9d
jae 0x256f
movl %edi, %r13d
movl %esi, %edx
jmp 0x2578
movl %eax, %r13d
movl %edi, %eax
movl %ecx, %edx
movl %esi, %ecx
cmpl %ecx, %eax
jle 0x2586
movl %edx, %ebp
movl %ecx, %r15d
movl %eax, %r12d
jmp 0x2592
movl %r13d, %ebp
movl %eax, %r15d
movl %edx, %r13d
movl %ecx, %r12d
cmpl %eax, %ecx
jne 0x25c0
leaq 0x30(%rsp), %r12
cmpl %r13d, %ebp
jg 0x2670
movq (%rbx), %rax
movq %rax, 0x30(%rsp)
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r12, %rcx
callq 0x3e8e
incl %ebp
jmp 0x259b
movl %r12d, %eax
subl %r15d, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x10(%rsp)
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x28(%rsp)
cvtsi2ss %r13d, %xmm0
movss %xmm0, 0xc(%rsp)
xorl %ebp, %ebp
movl %r8d, %r13d
leal (%r15,%rbp), %edx
cmpl %r12d, %edx
jg 0x2670
cvtsi2ss %ebp, %xmm0
divss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x2a07(%rip), %xmm2     # 0x5010
subsd %xmm1, %xmm2
mulsd 0x28(%rsp), %xmm2
mulss 0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm2, %xmm0
addsd 0x29df(%rip), %xmm0     # 0x5008
cvttsd2si %xmm0, %eax
movl (%rbx), %ecx
cmpl 0x14(%rsp), %r13d
jae 0x264d
movl %ecx, 0x20(%rsp)
movl 0x4(%rbx), %ecx
movl %ecx, 0x24(%rsp)
movq %r14, %rdi
movl %eax, %esi
leaq 0x20(%rsp), %rcx
jmp 0x2664
movl %ecx, 0x18(%rsp)
movl 0x4(%rbx), %ecx
movl %ecx, 0x1c(%rsp)
movq %r14, %rdi
movl %edx, %esi
movl %eax, %edx
leaq 0x18(%rsp), %rcx
callq 0x3e8e
incl %ebp
jmp 0x25ea
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/main.cpp
// Function: triangle(Vec2<int>, Vec2<int>, Vec2<int>, TGAImage&, TGAColor)
void triangle(Vec2i t0, Vec2i t1, Vec2i t2, TGAImage &image, TGAColor color) {
    if (t0.y > t1.y) std::swap(t0, t1);
    if (t0.y > t2.y) std::swap(t0, t2);
    if (t1.y > t2.y) std::swap(t1, t2);
    
    Vec2i abp = Vec2i(boundary_x(t0, t2, t1.y), t1.y);  // (the boundary) A boundary point
    Vec2i bbp;
    
    for (abp.y = t0.y; abp.y <= t1.y; abp.y++) {
        abp.x = boundary_x(t0, t2, abp.y);
        bbp = Vec2i(boundary_x(t0, t1, abp.y), abp.y);
        line(abp, bbp, image, color);
    }
        
    for (abp.y = t1.y; abp.y <= t2.y; abp.y++) {
        abp.x = boundary_x(t0, t2, abp.y);
        bbp = Vec2i(boundary_x(t1, t2, abp.y), abp.y);
        line(abp, bbp, image, color);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rdi, %r9
shrq $0x20, %r9
movq %rsi, %r8
shrq $0x20, %r8
movq %rdx, %r12
shrq $0x20, %r12
cmpl %r8d, %r9d
jle 0x26b8
movq %rdi, %rax
movl %r9d, %ecx
jmp 0x26c4
movq %rsi, %rax
movl %r8d, %ecx
movq %rdi, %rsi
movl %r9d, %r8d
cmpl %r12d, %r8d
jle 0x26d1
movl %r8d, %r15d
movq %rsi, %rbx
jmp 0x26dd
movl %r12d, %r15d
movq %rdx, %rbx
movq %rsi, %rdx
movl %r8d, %r12d
cmpl %r15d, %ecx
jle 0x26e9
movl %ecx, %edi
movq %rax, %rsi
jmp 0x26f5
movl %r15d, %edi
movq %rbx, %rsi
movq %rax, %rbx
movl %ecx, %r15d
movq %r12, %rax
shlq $0x20, %rax
movl %edx, %r13d
orq %rax, %r13
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
shlq $0x20, %rax
movl %esi, %ebp
orq %rax, %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x249c
movq %r15, %rax
shlq $0x20, %rax
movl %ebx, %ebx
orq %rax, %rbx
cmpl %r15d, %r12d
jg 0x2783
movq %r13, %rdi
movq %rbp, %rsi
movl %r12d, %edx
callq 0x249c
movl %eax, %r14d
movq %r13, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x249c
movq %r12, %rcx
shlq $0x20, %rcx
movl %eax, %esi
orq %rcx, %rsi
movl %r14d, %edi
orq %rcx, %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq (%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x251b
incl %r12d
jmp 0x272d
leaq 0x18(%rsp), %r12
cmpl 0x10(%rsp), %r15d
jg 0x27de
movq %r13, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x249c
movl %eax, %r14d
movq %rbx, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x249c
movq %r15, %rcx
shlq $0x20, %rcx
movl %eax, %esi
orq %rcx, %rsi
movl %r14d, %edi
orq %rcx, %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq (%rsp), %rdx
movq %r12, %rcx
callq 0x251b
incl %r15d
jmp 0x2788
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/tgaimage.cpp
// Function: TGAImage::operator=(TGAImage const&)
TGAImage & TGAImage::operator =(const TGAImage &img) {
    if (this != &img) {
        if (data) delete [] data;
        width  = img.width;
        height = img.height;
        bytespp = img.bytespp;
        unsigned long nbytes = width*height*bytespp;
        data = new unsigned char[nbytes];
        memcpy(data, img.data, nbytes);
    }
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x34c2
movq %rsi, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x348b
callq 0x2200
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movl 0xc(%r14), %ecx
movl %ecx, 0xc(%rbx)
movl 0x10(%r14), %edx
movl %edx, 0x10(%rbx)
imull %eax, %ecx
imull %edx, %ecx
movslq %ecx, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, (%rbx)
movq (%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2170
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/tgaimage.cpp
// Function: TGAImage::flip_vertically()
bool TGAImage::flip_vertically() {
    if (!data) return false;
    unsigned long bytes_per_line = width*bytespp;
    unsigned char *line = new unsigned char[bytes_per_line];
    int half = height>>1;
    for (int j=0; j<half; j++) {
        unsigned long l1 = j*bytes_per_line;
        unsigned long l2 = (height-1-j)*bytes_per_line;
        memmove((void *)line,      (void *)(data+l1), bytes_per_line);
        memmove((void *)(data+l1), (void *)(data+l2), bytes_per_line);
        memmove((void *)(data+l2), (void *)line,      bytes_per_line);
    }
    delete [] line;
    return true;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x39aa
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %rax, 0x10(%rsp)
movslq 0x8(%rdi), %rax
movslq 0x10(%rdi), %rdi
imulq %rax, %rdi
movq %rdi, 0x18(%rsp)
callq 0x2030
movq %rax, (%rsp)
movl 0xc(%rbx), %r15d
sarl %r15d
xorl %ecx, %ecx
testl %r15d, %r15d
cmovlel %ecx, %r15d
pushq $-0x1
popq %rdx
movq 0x18(%rsp), %r14
subq $0x1, %r15
jb 0x398e
movl 0xc(%rbx), %eax
addl %edx, %eax
movslq %eax, %r12
imulq %r14, %r12
movq (%rbx), %r13
leaq (%rcx,%r13), %rbp
movq (%rsp), %rdi
movq %rbp, %rsi
movl %edx, 0xc(%rsp)
movq %r14, %rdx
movq %rcx, 0x20(%rsp)
callq 0x2280
addq %r12, %r13
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2280
addq (%rbx), %r12
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x2280
movl 0xc(%rsp), %edx
movq 0x20(%rsp), %rcx
decl %edx
addq %r14, %rcx
jmp 0x392a
movq (%rsp), %rdi
callq 0x2200
movq 0x10(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
testq %rax, %rax
setne %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/tgaimage.cpp
// Function: TGAImage::flip_horizontally()
bool TGAImage::flip_horizontally() {
    if (!data) return false;
    int half = width>>1;
    for (int i=0; i<half; i++) {
        for (int j=0; j<height; j++) {
            TGAColor c1 = get(i, j);
            TGAColor c2 = get(width-1-i, j);
            set(i, j, c2);
            set(width-1-i, j, c1);
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq (%rdi), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x3a6f
movq %rdi, %rbx
movl 0x8(%rdi), %eax
sarl %eax
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movl %eax, 0xc(%rsp)
leaq 0x20(%rsp), %r12
leaq 0x18(%rsp), %r13
cmpl 0xc(%rsp), %r15d
je 0x3a6f
movl %r15d, %ebp
notl %ebp
xorl %r14d, %r14d
cmpl 0xc(%rbx), %r14d
jge 0x3a6a
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x3e34
movl 0x8(%rbx), %edx
addl %ebp, %edx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movl %r14d, %ecx
callq 0x3e34
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movq %r12, %rcx
callq 0x3e8e
movl 0x8(%rbx), %esi
addl %ebp, %esi
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl %r14d, %edx
movq %r13, %rcx
callq 0x3e8e
incl %r14d
jmp 0x39ff
incl %r15d
jmp 0x39f0
cmpq $0x0, 0x10(%rsp)
setne %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shinerd[P]BriefRenderer/tgaimage.cpp
// Function: TGAImage::set(int, int, TGAColor)
bool TGAImage::set(int x, int y, TGAColor c) {
    if (!data || x<0 || y<0 || x>=width || y>=height) {
        return false;
    }
    memcpy(data+(x+y*width)*bytespp, c.raw, bytespp);
    return true;
}

// Assembly:
movq %rdi, %r8
movq (%rdi), %rdi
testq %rdi, %rdi
sete %al
movl %edx, %r9d
orl %esi, %r9d
sets %r9b
orb %al, %r9b
je 0x3eac
xorl %eax, %eax
retq
movl 0x8(%r8), %r9d
xorl %eax, %eax
cmpl %esi, %r9d
jle 0x3eab
cmpl %edx, 0xc(%r8)
jle 0x3eab
pushq %rax
imull %edx, %r9d
addl %esi, %r9d
movslq 0x10(%r8), %rdx
movslq %r9d, %rax
imulq %rdx, %rax
addq %rax, %rdi
movq %rcx, %rsi
callq 0x2170
movb $0x1, %al
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/test/test_selector_impl.h
// Function: main
int main(){
	using MySelector = MySelector;
	using MyWorker   = MyWorker;

	int const fd1 = net::socket_create(net::socket_tcp,  "localhost.not.used.yet", 2000);
	int const fd2 = net::socket_create(net::socket_tcp,  "localhost.not.used.yet", 2002);
	int const fd3 = net::socket_create(net::socket_unix, "/tmp/echo");

	net::AsyncLoop<MySelector, MyWorker> loop( MySelector{ 4 }, MyWorker{}, { fd1, fd2, fd3 } );

	while(loop.process());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
leaq 0x1c57(%rip), %rbx      # 0x302c
movq %rbx, %rdi
movl $0x7d0, %esi            # imm = 0x7D0
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2990
movl %eax, %r14d
movq %rbx, %rdi
movl $0x7d2, %esi            # imm = 0x7D2
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2990
movl %eax, %ebx
leaq 0x1c40(%rip), %rdi      # 0x3043
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x2a91
movl %eax, %r15d
leaq -0x40(%rbp), %r12
pushq $0x4
popq %rsi
movq %r12, %rdi
callq 0x24a0
leaq -0x4c(%rbp), %rax
movl %r14d, (%rax)
movl %ebx, 0x4(%rax)
movl %r15d, 0x8(%rax)
leaq -0x60(%rbp), %rcx
movq %rax, (%rcx)
movq $0x3, 0x8(%rcx)
leaq -0xd0(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %r12, %rsi
callq 0x14ae
leaq -0x40(%rbp), %rdi
callq 0x2520
leaq -0xd0(%rbp), %rbx
movq %rbx, %rdi
callq 0x1570
testb %al, %al
jne 0x145f
leaq -0xd0(%rbp), %rdi
callq 0x163e
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2520
jmp 0x14a6
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x163e
movq %rbx, %rdi
callq 0x1220
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/asyncloop_impl.h
// Function: net::AsyncLoop<net::selector::PollSelector, net::worker::EchoWorker, net::ClientBuffer<1024ul>>::expireFD_()
void AsyncLoop<SELECTOR, WORKER, CLIENTBUFFER>::expireFD_(){
	for(const auto &p : clients_){
		int const fd = p.first;
		auto &c = p.second;

		if (c.expired(CONN_TIMEOUT)){
			handleDisconnect_(fd, DisconnectStatus::TIMEOUT);
			// iterator is invalid now...
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rdi), %r15
leaq 0x40(%rdi), %r13
pushq $0x14
popq %r14
cmpq %r13, %r15
je 0x187c
movl 0x20(%r15), %r12d
leaq 0x428(%r15), %rdi
movl %r14d, %esi
callq 0x1aa2
testb %al, %al
jne 0x188b
movq %r15, %rdi
callq 0x1150
movq %rax, %r15
jmp 0x1853
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %r12d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1a4e
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/asyncloop_impl.h
// Function: net::AsyncLoop<net::selector::PollSelector, net::worker::EchoWorker, net::ClientBuffer<1024ul>>::handleRead_(int)
void AsyncLoop<SELECTOR, WORKER, CLIENTBUFFER>::handleRead_(int const fd){
	if ( isServerFD_(fd) ){
		while (handleConnect_(fd));
		return;
	}

	// -------------------------------------

	auto it = clients_.find(fd);

	if (it == clients_.end())
		return handleDisconnect_(fd, DisconnectStatus::PROBLEM_MAP_NOT_FOUND);

	auto &buffer = it->second;

	// -------------------------------------

	auto available = buffer.capacity();

	if (available == 0){
		// buffer will overfow, disconnect.
		return handleDisconnect_(fd, DisconnectStatus::PROBLEM_BUFFER_READ);
	}

	ssize_t const size = ::read(fd, buffer.dataTail(), available);

	if (size <= 0)
		return handleSocketOps_(fd, size);

	buffer.push((size_t) size);

	buffer.restartTimer();

	handleWorker_(fd, buffer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, -0x24(%rbp)
callq 0x1abe
testb %al, %al
je 0x18dd
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1ae8
testb %al, %al
jne 0x18c9
jmp 0x1982
leaq 0x38(%rbx), %rdi
leaq -0x24(%rbp), %rsi
callq 0x20f6
movq %rax, %r14
leaq 0x40(%rbx), %rax
cmpq %rax, %r14
je 0x190a
movzwl 0x26(%r14), %eax
cmpq $0x400, %rax            # imm = 0x400
jne 0x191a
movl -0x24(%rbp), %esi
pushq $0x6
jmp 0x190f
movl -0x24(%rbp), %esi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x1a4e
jmp 0x1982
movl $0x400, %r12d           # imm = 0x400
movl $0x400, %edx            # imm = 0x400
subq %rax, %rdx
movl -0x24(%rbp), %edi
leaq (%r14,%rax), %rsi
addq $0x28, %rsi
callq 0x11d0
testq %rax, %rax
jle 0x1974
movq %r14, %r15
addq $0x24, %r15
movzwl 0x26(%r14), %ecx
subq %rcx, %r12
cmpq %rax, %r12
jb 0x1958
addl %eax, %ecx
movw %cx, 0x26(%r14)
callq 0x28d0
movl %eax, 0x428(%r14)
movl -0x24(%rbp), %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1bc6
jmp 0x1982
movl -0x24(%rbp), %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x1b38
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/asyncloop_impl.h
// Function: net::AsyncLoop<net::selector::PollSelector, net::worker::EchoWorker, net::ClientBuffer<1024ul>>::handleWrite_(int)
void AsyncLoop<SELECTOR, WORKER, CLIENTBUFFER>::handleWrite_(int const fd){
	if ( isServerFD_(fd) ){
		// WTF?!?
		return;
	}

	// -------------------------------------

	auto it = clients_.find(fd);

	if (it == clients_.end())
		return handleDisconnect_(fd, DisconnectStatus::PROBLEM_MAP_NOT_FOUND);

	CLIENTBUFFER &buffer = it->second;

	// -------------------------------------

	auto available = buffer.size();

	if (available <= 0){
		// this must never happen, disconnect.
		return handleDisconnect_(fd, DisconnectStatus::PROBLEM_BUFFER_WRITE);
	}

	ssize_t const size = ::write(fd, buffer.data(), available);

	// -------------------------------------

	if (size <= 0)
		return handleSocketOps_(fd, size);

	buffer.pop((size_t) size);

	buffer.restartTimer();

	if (buffer.size() == 0){
		// process with read
		selector_.updateFD(fd, selector::FDEvent::READ);

		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, -0x14(%rbp)
callq 0x1abe
testb %al, %al
jne 0x19e7
leaq 0x38(%rbx), %rdi
leaq -0x14(%rbp), %rsi
callq 0x20f6
movq %rax, %r14
leaq 0x40(%rbx), %rax
cmpq %rax, %r14
je 0x19d9
movzwl 0x26(%r14), %edx
movzwl 0x24(%r14), %eax
cmpw %ax, %dx
jne 0x19f0
movl -0x14(%rbp), %esi
pushq $0x7
jmp 0x19de
movl -0x14(%rbp), %esi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x1a4e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
subq %rax, %rdx
movl -0x14(%rbp), %edi
leaq (%r14,%rax), %rsi
addq $0x28, %rsi
callq 0x10b0
testq %rax, %rax
jle 0x1a3e
movq %r14, %rdi
addq $0x24, %rdi
movq %rax, %rsi
callq 0x22a0
callq 0x28d0
movl %eax, 0x428(%r14)
movzwl 0x26(%r14), %eax
cmpw 0x24(%r14), %ax
jne 0x19e7
movl -0x14(%rbp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2664
jmp 0x19e7
movl -0x14(%rbp), %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x1b38
jmp 0x19e7
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/asyncloop_impl.h
// Function: net::AsyncLoop<net::selector::PollSelector, net::worker::EchoWorker, net::ClientBuffer<1024ul>>::handleWorker_(int, net::ClientBuffer<1024ul>&)
bool AsyncLoop<SELECTOR, WORKER, CLIENTBUFFER>::handleWorker_(int const fd, CLIENTBUFFER &buffer){
//	static const char *redis_ok  = "$2\r\nOK\r\n";
//	static const char *redis_err = "-ERR Error\r\n";

	const WorkerStatus status = worker_( buffer );

	switch( status ){
	case WorkerStatus::PASS:
		return false;

	case WorkerStatus::READ:
		selector_.updateFD(fd, selector::FDEvent::READ);

		return true;

	case WorkerStatus::WRITE:
		selector_.updateFD(fd, selector::FDEvent::WRITE);

		return true;

	case WorkerStatus::DISCONNECT:
		handleDisconnect_(fd, DisconnectStatus::WORKER_NORMAL);

		return true;

	case WorkerStatus::SHUTDOWN:
	//	handleDisconnect_(fd, DisconnectStatus::WORKER_NORMAL);
		keepProcessing_ = false;

		return true;

	default:
	case WorkerStatus::DISCONNECT_ERROR:
		handleDisconnect_(fd, DisconnectStatus::WORKER_ERROR);

		return true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
addq $0x18, %rdi
movq %rdx, %rsi
callq 0x212a
cmpl $0x5, %eax
ja 0x1bf9
movl %eax, %eax
leaq 0x1428(%rip), %rcx      # 0x3014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %eax, %eax
jmp 0x1c2b
pushq $0x4
jmp 0x1c17
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
jmp 0x1c0e
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x2664
jmp 0x1c29
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1a4e
jmp 0x1c29
movb $0x0, 0x6c(%r14)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/asyncloop_impl.h
// Function: net::AsyncLoop<net::selector::PollSelector, net::worker::EchoWorker, net::ClientBuffer<1024ul>>::insertFD_(int)
bool AsyncLoop<SELECTOR, WORKER, CLIENTBUFFER>::insertFD_(int const fd){
	// one for server fd
	if (connectedClients_ + 1 >= selector_.maxFD() )
		return false;

	bool const result = selector_.insertFD(fd);

	if (result == false)
		return false;

	//clients_.insert(std::make_pair(fd, CLIENTBUFFER{}));
	clients_[fd];

	++connectedClients_;

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, -0x1c(%rbp)
movl 0x68(%rdi), %r14d
incl %r14d
callq 0x256e
cmpl %eax, %r14d
jae 0x1d0b
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x25ea
testb %al, %al
je 0x1d0e
leaq 0x38(%rbx), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x1d1c
incl 0x68(%rbx)
movb $0x1, %r14b
jmp 0x1d0e
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/worker/echoworker_impl.h
// Function: net::WorkerStatus net::worker::EchoWorker::operator()<net::ClientBuffer<1024ul>>(net::ClientBuffer<1024ul>&)
WorkerStatus EchoWorker::operator()(CONNECTION &buffer){
	if (buffer.size() == 0)
		return WorkerStatus::PASS;

	// buffer.print();

	if (cmp_(cmd_shutdown, buffer)){
		return WorkerStatus::SHUTDOWN;
	}

	if (cmp_(cmd_exit, buffer)){
		return WorkerStatus::DISCONNECT;
	}


	if (cmp_(cmd_hello, buffer)){
		buffer.clear();
		buffer.push("Hello, how are you?\r\n");
		return WorkerStatus::WRITE;
	}

	if (cmp_(cmd_help, buffer)){
		buffer.clear();
		buffer.push(msg_help);
		return WorkerStatus::WRITE;
	}

	return WorkerStatus::WRITE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movzwl 0x2(%rsi), %eax
xorl %r14d, %r14d
cmpw (%rsi), %ax
je 0x2194
movq %rsi, %rbx
leaq 0x4031(%rip), %rdi      # 0x6178
callq 0x21c8
testb %al, %al
je 0x2154
pushq $0x5
jmp 0x2192
leaq 0x400d(%rip), %rdi      # 0x6168
movq %rbx, %rsi
callq 0x21c8
testb %al, %al
je 0x216b
pushq $0x3
jmp 0x2192
leaq 0x3fd6(%rip), %rdi      # 0x6148
movq %rbx, %rsi
callq 0x21c8
testb %al, %al
je 0x219c
andl $0x0, (%rbx)
leaq 0xf5e(%rip), %rsi       # 0x30e6
movq %rbx, %rdi
callq 0x21ee
pushq $0x2
popq %r14
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3fb5(%rip), %rdi      # 0x6158
movq %rbx, %rsi
callq 0x21c8
pushq $0x2
popq %r14
testb %al, %al
je 0x2194
andl $0x0, (%rbx)
leaq 0x3fcb(%rip), %rsi      # 0x6188
movq %rbx, %rdi
callq 0x221e
jmp 0x2194
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/include/stringref.h
// Function: StringRef::__compare(char const*, unsigned long, char const*, unsigned long)
inline int StringRef::__compare(const char *s1, size_t const size1, const char *s2, size_t const size2) noexcept{
	// Lazy based on LLVM::StringRef
	// http://llvm.org/docs/doxygen/html/StringRef_8h_source.html

	// check prefix
	if ( int res = __memcmp(s1, s2, __std_min(size1, size2 ) ) )
		return res < 0 ? -1 : +1;

	// prefixes match, so we only need to check the lengths.
	if (size1 == size2)
		return 0;

	return size1 < size2 ? -1 : +1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
cmpq %rcx, %rsi
movq %rcx, %rax
cmovaq %rsi, %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x10f0
testl %eax, %eax
je 0x2289
sarl $0x1f, %eax
jmp 0x2297
xorl %eax, %eax
cmpq %rbx, %r14
je 0x229a
xorl %eax, %eax
cmpq %rbx, %r14
sbbl %eax, %eax
orl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/selector/pollselector.cc
// Function: net::selector::PollSelector::wait(int)
WaitStatus PollSelector::wait(int const timeout){
	int const activity = poll(statusData_.data(), statusData_.size(), timeout);

	if (activity < 0)
		return WaitStatus::ERROR;

	if (activity == 0)
		return WaitStatus::NONE;

	return WaitStatus::OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %edx
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x11f0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
pushq $0x2
popq %rax
cmovnsl %ecx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/selector/pollselector.cc
// Function: net::selector::PollSelector::updateFD(int, net::selector::FDEvent)
bool PollSelector::updateFD(int fd, FDEvent event){
	// bit ugly.
	for(auto &item : statusData_)
		if (item.fd == fd){
			item.events = pollConvert(event);
			return true;
		}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x2690
cmpl %esi, (%rax)
je 0x267e
addq $0x8, %rax
jmp 0x266f
xorl %esi, %esi
cmpl $0x1, %edx
sete %sil
leal (%rsi,%rsi,2), %edx
incl %edx
movw %dx, 0x4(%rax)
cmpq %rcx, %rax
setne %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/selector/pollselector.cc
// Function: net::selector::PollSelector::removeFD(int)
bool PollSelector::removeFD(int const fd){
	// bit ugly.
	for(auto &item : statusData_)
		if (item.fd == fd){
			item.fd = -1;
			return true;
		}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x26b5
cmpl %esi, (%rax)
je 0x26b2
addq $0x8, %rax
jmp 0x26a3
orl $-0x1, (%rax)
cmpq %rcx, %rax
setne %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/sockets.cc
// Function: net::socket_create(net::SOCKET_TCP, char const*, unsigned short, unsigned short, int)
int socket_create(const SOCKET_TCP,  const char *ip, uint16_t const port, uint16_t const backlog, int const options) noexcept{
	int fd = socket(AF_INET , SOCK_STREAM , 0);

	if(fd < 0)
		return SOCKET_ERROR_CREATE;

	int const opt = 1;
	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, & opt, sizeof opt) < 0){
		::close(fd);
		return SOCKET_ERROR_OPTIONS;
	}

	if (options & SOCKET_NONBLOCK)
	if (! socket_makeNonBlocking(fd) ){
		::close(fd);
		return SOCKET_ERROR_NONBLOCK;
	}

	if (options & SOCKET_TCPNODELAY)
	if (! socket_makeTCPNoDelay(fd) ){
		::close(fd);
		return SOCKET_ERROR_NODELAY;
	}

	struct sockaddr_in address;

	address.sin_family = AF_INET;
	address.sin_addr.s_addr = INADDR_ANY;
	address.sin_port = htons(port);

	if (bind(fd, (struct sockaddr *) & address, sizeof address) < 0){
		::close(fd);
		return SOCKET_ERROR_BIND;
	}

	if (listen(fd, backlog ? backlog : SOMAXCONN) < 0){
		::close(fd);
		return SOCKET_ERROR_BACKLOG;
	}

	return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %r12d
movl %edx, %r14d
movl %esi, %r15d
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x1080
testl %eax, %eax
js 0x2a4b
movl %eax, %ebx
leaq -0x24(%rbp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x1230
testl %eax, %eax
js 0x2a4f
testb $0x1, %r12b
je 0x29ef
movl %ebx, %edi
callq 0x2903
testb %al, %al
je 0x2a5a
testb $0x2, %r12b
je 0x2a00
movl %ebx, %edi
callq 0x292d
testb %al, %al
je 0x2a70
leaq -0x34(%rbp), %rsi
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
pushq $0x10
popq %rdx
movl %ebx, %edi
callq 0x1060
testl %eax, %eax
js 0x2a65
testw %r14w, %r14w
movl $0x1000, %eax           # imm = 0x1000
cmovnel %r14d, %eax
movzwl %ax, %esi
movl %ebx, %edi
callq 0x11b0
testl %eax, %eax
jns 0x2a7a
movl %ebx, %edi
callq 0x1240
pushq $-0x6
jmp 0x2a79
pushq $-0x1
jmp 0x2a79
movl %ebx, %edi
callq 0x1240
pushq $-0x2
jmp 0x2a79
movl %ebx, %edi
callq 0x1240
pushq $-0x3
jmp 0x2a79
movl %ebx, %edi
callq 0x1240
pushq $-0x5
jmp 0x2a79
movl %ebx, %edi
callq 0x1240
pushq $-0x4
popq %rbx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x17a6
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/sockets.cc
// Function: net::socket_create(net::SOCKET_UNIX, char const*, unsigned short, int)
int socket_create(const SOCKET_UNIX, const char *path, uint16_t const backlog, int const options) noexcept{
	struct sockaddr_un address;

	if (sizeof address.sun_path < strlen(path))
		return SOCKET_NAME_SIZE;


	int fd = socket(AF_UNIX , SOCK_STREAM , 0);

	if(fd < 0)
		return SOCKET_ERROR_CREATE;

	if (options & SOCKET_NONBLOCK)
	if (! socket_makeNonBlocking(fd) ){
		::close(fd);
		return SOCKET_ERROR_NONBLOCK;
	}

	//struct sockaddr_in address
	address.sun_family = AF_UNIX;
	strcpy(address.sun_path, path);

	unlink(address.sun_path);

	if (bind(fd, (struct sockaddr *) & address, sizeof address) < 0){
		::close(fd);
		return SOCKET_ERROR_BIND;
	}

	if (listen(fd, backlog ? backlog : SOMAXCONN) < 0){
		::close(fd);
		return SOCKET_ERROR_BACKLOG;
	}

	return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %r15
callq 0x10e0
cmpq $0x6c, %rax
jbe 0x2abb
pushq $-0x7
jmp 0x2b53
pushq $0x1
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x1080
testl %eax, %eax
js 0x2b3b
movl %eax, %ebx
testb $0x1, %r12b
je 0x2ade
movl %ebx, %edi
callq 0x2903
testb %al, %al
je 0x2b4a
leaq -0x8c(%rbp), %r12
movw $0x1, -0x2(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1170
movq %r12, %rdi
callq 0x1100
leaq -0x8e(%rbp), %rsi
pushq $0x6e
popq %rdx
movl %ebx, %edi
callq 0x1060
testl %eax, %eax
js 0x2b3f
testw %r14w, %r14w
movl $0x1000, %eax           # imm = 0x1000
cmovnel %r14d, %eax
movzwl %ax, %esi
movl %ebx, %edi
callq 0x11b0
testl %eax, %eax
jns 0x2b54
movl %ebx, %edi
callq 0x1240
pushq $-0x6
jmp 0x2b53
pushq $-0x1
jmp 0x2b53
movl %ebx, %edi
callq 0x1240
pushq $-0x5
jmp 0x2b53
movl %ebx, %edi
callq 0x1240
pushq $-0x3
popq %rbx
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x17a6
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/demos/fstream/fstream.cc
// Function: ifstream_test(char const*)
void ifstream_test(const char *file)
{
  scdc::ifstream ifs;
  string line;

  ifs.open(file, ios_base::in);
  int i = 1;
  while (getline(ifs, line)) {
    cout << i << ": " << line << '\n';
    i++;
  }
  ifs.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xc4c4
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc572
pushq $0x1
popq %rbx
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq 0x59c10(%rip), %r12     # 0x65fd0
leaq 0x3d6f4(%rip), %r13     # 0x49abb
pushq $0xa
popq %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0xb0e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc411
movq %r12, %rdi
movl %ebx, %esi
callq 0xba60
movq %rax, %rdi
movq %r13, %rsi
callq 0xb580
movq %rax, %rdi
movq %r15, %rsi
callq 0xb4d0
movq %rax, %rdi
movl %ebp, %esi
callq 0xb6c0
incl %ebx
jmp 0xc3ca
leaq 0x28(%rsp), %rdi
callq 0xc5a6
leaq 0x8(%rsp), %rdi
callq 0xb250
leaq 0x28(%rsp), %rdi
callq 0xc5ce
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc445
jmp 0xc445
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb250
leaq 0x28(%rsp), %rdi
callq 0xc5ce
movq %rbx, %rdi
callq 0xba80
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/demos/fstream/fstream.cc
// Function: main
int main(int argc, char** argv)
{
  scdc_init(SCDC_INIT_DEFAULT);

  scdc_dataprov_t dpFS = scdc_dataprov_open("storeFS", "fs", "store/");

  const char *uri = "scdc:/storeFS/test.in";

  ifstream_test(uri);

  scdc_dataprov_close(dpFS);

  scdc_release();

  return 0;
}

// Assembly:
pushq %rbx
leaq 0x3b151(%rip), %rdi     # 0x475bd
xorl %eax, %eax
callq 0xe139
leaq 0x39b8a(%rip), %rdi     # 0x46004
leaq 0x3bfb1(%rip), %rsi     # 0x48432
leaq 0x39b84(%rip), %rdx     # 0x4600c
xorl %eax, %eax
callq 0xe494
movq %rax, %rbx
leaq 0x39b7a(%rip), %rdi     # 0x46013
callq 0xc36c
movq %rbx, %rdi
callq 0xe552
callq 0xe24e
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/demos/fstream/../../../src/lib/redirect/fstream/basic_file_scdc.h
// Function: scdc::__basic_file_scdc<char>::xsputn(char const*, long)
streamsize 
      xsputn(const char* __s, streamsize __n)
      {
        TRACE(__class__, __func__, "n: %lld", (long long) __n);

        streamsize ret = -1;
        streamsize noffset = offset;

        if (!do_write) goto do_return;

#if BASIC_FILE_SCDC_APPEND
        if (do_append) noffset = 0;
#endif

        scdc_dataset_input_t input;

        scdc_dataset_input_unset(&input);
        SCDC_DATASET_INOUT_BUF_PTR(&input) = const_cast<char *>(__s);
        SCDC_DATASET_INOUT_BUF_SIZE(&input) = __n;
        SCDC_DATASET_INOUT_BUF_CURRENT(&input) = __n;
        input.total_size = __n;
        input.total_size_given = SCDC_DATASET_INOUT_TOTAL_SIZE_GIVEN_EXACT;

        char cmd[256];
        sprintf(cmd, "put %" scdcint_fmt "%c:%" scdcint_fmt,
#if BASIC_FILE_SCDC_APPEND
        (do_append)?0:
#endif
        noffset,
#if BASIC_FILE_SCDC_APPEND
        (do_append)?'B':
#endif
        'F', __n);

        if (scdc_dataset_cmd(_M_dataset, cmd, &input, NULL) != SCDC_SUCCESS) goto do_return;

        ret = __n;
        noffset += __n;

do_return:
        if (ret >= 0)
        {
#if BASIC_FILE_SCDC_APPEND
          if (!do_append)
#endif
          {
            offset = noffset;
          }
        }

        TRACE(__class__, __func__, "return: %lld, offset: %lld", (long long) ret, (long long) offset);

        return ret;
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
pushq $-0x1
popq %r14
cmpb $0x1, 0xa(%rdi)
jne 0xd68d
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq 0x10(%rdi), %r12
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x1b0f0
movq %r13, 0x10(%rbp)
movq %rbx, 0x18(%rbp)
movq %rbx, 0x20(%rbp)
movq %rbx, 0x28(%rbp)
movb $0x78, 0x30(%rbp)
leaq 0x389db(%rip), %rsi     # 0x46029
leaq 0x60(%rsp), %r13
pushq $0x46
popq %rcx
movq %r13, %rdi
movq %r12, %rdx
movq %rbx, %r8
xorl %eax, %eax
callq 0xb0d0
movq (%r15), %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xf574
cmpq $0x1, %rax
jne 0xd68d
testq %rbx, %rbx
js 0xd68a
addq %rbx, %r12
movq %r12, 0x10(%r15)
movq %rbx, %r14
movq %r14, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/demos/fstream/../../../src/lib/redirect/fstream/basic_file_scdc.h
// Function: scdc::__basic_file_scdc<char>::seekoff(long, std::_Ios_Seekdir)
streamoff
      seekoff(streamoff __off, ios_base::seekdir __way) throw ()
      {
        TRACE(__class__, __func__, "");

        streamoff ret = -1;

        if (__way == ios_base::end)
        {
          char buf[32];
          scdc_dataset_output_t output;

          scdc_dataset_output_unset(&output);
          SCDC_DATASET_INOUT_BUF_PTR(&output) = buf;
          SCDC_DATASET_INOUT_BUF_SIZE(&output) = sizeof(buf) - 1;

          if (scdc_dataset_cmd(_M_dataset, "ls", NULL, &output) != SCDC_SUCCESS) goto do_return;

          long long o;
          std::string s(static_cast<const char *>(SCDC_DATASET_INOUT_BUF_PTR(&output)), SCDC_DATASET_INOUT_BUF_CURRENT(&output));
          sscanf(s.c_str(), "f:%lld|", &o);
          offset = o;
          __way = ios_base::cur;

          while (output.next) output.next(&output, 0);
        }

        switch (__way)
        {
          case ios_base::beg:
            offset = std::max(static_cast<streamoff>(0), __off);
            ret = offset;
            break;
          case ios_base::cur:
            offset += __off;
            ret = offset;
            break;
          default:
            ret = -1;
            break;
        }

        if (ret >= 0) eof = false;

do_return:
        return ret;
      }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0xd8ab
cmpl $0x1, %edx
je 0xd8c2
pushq $-0x1
popq %r15
cmpl $0x2, %edx
jne 0xd8d7
leaq 0x28(%rsp), %rdi
callq 0x1b110
leaq 0x80(%rsp), %rax
leaq 0x28(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq $0x1f, 0x18(%rcx)
movq (%r14), %rdi
leaq 0x396bc(%rip), %rsi     # 0x46efd
xorl %edx, %edx
xorl %eax, %eax
callq 0xf574
cmpq $0x1, %rax
jne 0xd8d7
movq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xd8f2
movq (%rsp), %rdi
leaq 0x39d5a(%rip), %rsi     # 0x475d7
leaq 0x20(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0xb570
movq (%r15), %rax
movq %rax, 0x10(%r14)
leaq 0x28(%rsp), %r15
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0xd8ba
movq %r15, %rdi
xorl %esi, %esi
callq *%rax
jmp 0xd898
xorl %eax, %eax
testq %rbx, %rbx
cmovleq %rax, %rbx
movq %rbx, 0x10(%r14)
jmp 0xd8cf
movq %rsp, %rdi
callq 0xb250
addq 0x10(%r14), %rbx
movq %rbx, 0x10(%r14)
movq %rbx, %r15
js 0xd8d7
movb $0x0, 0x18(%r14)
movq %rbx, %r15
movq %r15, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0xd8e9
movq %rax, %rdi
callq 0xc615
nop