LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/translate_to_mdp.cpp
// Function: create_var_case(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, environment_t<value_info_t> const&)
mdp_with_info_t create_var_case(std::string const& name, var_env_t const& var_env) {
    auto result_var = *var_env.lookup(name);
    result_var.name = name;
    int current = translation_data::current_location();
    return mdp_with_info_t {
        mdp::mdp_t {
            "default", {}, {}, {}
        },
        current, current,
        result_var
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x32690
movq (%r15), %rsi
leaq 0x18(%rsp), %rdi
callq 0x32614
leaq 0x10(%rsp), %rdi
callq 0xa248
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x9180
movl 0x2a0b3(%rip), %ebp     # 0x5c2d0
leaq 0xa22e(%rip), %rsi      # 0x3c452
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xeb2e
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x60(%rbx)
movups %xmm0, 0x20(%rbx)
movl %ebp, 0x68(%rbx)
movl %ebp, 0x6c(%rbx)
leaq 0x70(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x32614
leaq 0x18(%rsp), %rdi
callq 0x9130
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xa08a
jmp 0x32287
jmp 0x32284
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x9130
jmp 0x322a0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xa248
movq %r14, %rdi
callq 0x94d0
// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/translate_to_pctl.cpp
// Function: translate_to_pctl(ast::refinement_type_t const&, mdp_with_info_t const&)
pctl::pctl_t translate_to_pctl(ast::refinement_type_t const& ty, mdp_with_info_t const& mdp_with_info) {
    using namespace logic;
    auto const& arg = mdp_with_info.value.name;
    auto formula = ty.domain == domain_kind_t::Int ?
        subst(ty.constraint, ty.name, make<var_term_t>(arg)) :
        subst(ty.constraint, ty.name, make<var_formula_t>(arg));
    return pctl::pctl_t {
        mdp_with_info.accept,
        formula
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x70(%rdx), %rsi
cmpl $0x0, 0x20(%r15)
je 0x34b5c
movq %rsp, %rdi
callq 0x34cd8
leaq 0x28(%r15), %rsi
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r12
movaps -0x8(%r12), %xmm0
movaps %xmm0, -0x8(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r12)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %r15, %rdx
callq 0xf6d0
jmp 0x34b9b
leaq 0x28(%r15), %rbp
movq %rsp, %rdi
callq 0x34c00
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r12
movaps -0x8(%r12), %xmm0
movaps %xmm0, -0x8(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r12)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %rbp, %rsi
movq %r15, %rdx
callq 0xf0ec
movq %r13, %rdi
callq 0xa248
movq %r12, %rdi
callq 0xa248
movl 0x6c(%r14), %eax
movl %eax, (%rbx)
movq %rbx, %rdi
addq $0x8, %rdi
leaq 0x28(%rsp), %rsi
callq 0xc2b6
leaq 0x30(%rsp), %rdi
callq 0xa248
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34be0
movq %rax, %rbx
movq %r13, %rdi
callq 0xa248
movq %r12, %rdi
callq 0xa248
jmp 0x34bf8
movq %rax, %rbx
movq %rbx, %rdi
callq 0x94d0
// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/type_ast.cpp
// Function: ast::operator==(ast::refinement_type_t const&, ast::refinement_type_t const&)
bool operator==(refinement_type_t const& lhs, refinement_type_t const& rhs) {
    return
        lhs.name == rhs.name &&
        lhs.domain == rhs.domain &&
        *lhs.constraint == *rhs.constraint;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0xa5de
testb %al, %al
je 0x34de0
movl 0x20(%r14), %eax
cmpl 0x20(%rbx), %eax
jne 0x34de0
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x119b7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/type_ast.cpp
// Function: ast::to_debug_string[abi:cxx11](ast::dependent_type_t const&)
std::string to_debug_string(dependent_type_t const& ty) {
    std::string args = to_debug_string(ty.args[0]);
    for (size_t i=1; i<ty.args.size(); ++i)
        args += format(", {}", to_debug_string(ty.args[i]));
    return format("Dep([{}], {})",
            args,
            to_debug_string(ty.ret_type));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq (%rsi), %rsi
leaq 0x58(%rsp), %rdi
callq 0x34dea
pushq $0x1
popq %r12
pushq $0x38
popq %rbp
leaq 0x18(%rsp), %r13
leaq 0x78(%rsp), %rbx
leaq 0x38(%rsp), %r15
movq 0x8(%r14), %rax
subq (%r14), %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
cmpq %rax, %r12
jae 0x35138
movq %r13, %rdi
leaq 0x93ae(%rip), %rsi      # 0x3e492
leaq 0xf(%rsp), %rdx
callq 0xeb2e
movq (%r14), %rsi
addq %rbp, %rsi
movq %rbx, %rdi
callq 0x34dea
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3520b
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x9540
movq %r15, %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
movq %r13, %rdi
callq 0x9130
incq %r12
addq $0x38, %rbp
jmp 0x350c6
leaq 0x9358(%rip), %rsi      # 0x3e497
leaq 0x38(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0xeb2e
addq $0x18, %r14
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x34dea
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x353c2
leaq 0x18(%rsp), %rdi
callq 0x9130
leaq 0x38(%rsp), %rdi
callq 0x9130
leaq 0x58(%rsp), %rdi
callq 0x9130
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x9130
jmp 0x351c0
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x351f4
jmp 0x351e7
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x9130
jmp 0x351db
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x9130
jmp 0x351ef
movq %rax, %rbx
jmp 0x351f9
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x9130
leaq 0x58(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x94d0
// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/typechecker.cpp
// Function: model_checking(ast::expr_t const&, ast::refinement_type_t const&)
bool model_checking(ast::expr_t const& expr, ast::refinement_type_t const& type) {
    std::cout << "    converting the program to MDP .. " << std::flush;
    auto mdp_with_info = translate_to_mdp(expr);
    std::cout << "done!" << std::endl;
    std::cout << "    converting the type to PCTL .. " << std::flush;
    auto pctl = translate_to_pctl(type, mdp_with_info);
    std::cout << "done!" << std::endl;
    std::cout << "    checking with PRISM .. " << std::flush;
    auto result = check_by_PRISM(mdp_with_info.mdp, pctl);
    std::cout << "done!" << std::endl;
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x26777(%rip), %r15     # 0x5bfa8
leaq 0x8d58(%rip), %rsi      # 0x3e590
movq %r15, %rdi
callq 0x92d0
movq %rax, %rdi
callq 0x91d0
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x32330
leaq 0x8d5a(%rip), %rsi      # 0x3e5b6
movq %r15, %rdi
callq 0x92d0
movq %rax, %rdi
callq 0x9140
movq 0x26735(%rip), %rdi     # 0x5bfa8
leaq 0x8d42(%rip), %rsi      # 0x3e5bc
callq 0x92d0
movq %rax, %rdi
callq 0x91d0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x34afc
movq 0x26708(%rip), %rdi     # 0x5bfa8
leaq 0x8d0f(%rip), %rsi      # 0x3e5b6
callq 0x92d0
movq %rax, %rdi
callq 0x9140
movq 0x266ed(%rip), %rdi     # 0x5bfa8
leaq 0x8d1e(%rip), %rsi      # 0x3e5e0
callq 0x92d0
movq %rax, %rdi
callq 0x91d0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x355ec
movl %eax, %ebx
movq 0x266c1(%rip), %rdi     # 0x5bfa8
leaq 0x8cc8(%rip), %rsi      # 0x3e5b6
callq 0x92d0
movq %rax, %rdi
callq 0x9140
leaq 0x18(%rsp), %rdi
callq 0xa248
leaq 0x20(%rsp), %rdi
callq 0x2c15c
movl %ebx, %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x35931
jmp 0x35922
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xa248
jmp 0x35934
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2c15c
movq %rbx, %rdi
callq 0x94d0
// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/typechecker.cpp
// Function: add_bindings(std::shared_ptr<ast::expr_t> const&, environment_t<ast::expr_t> const&)
ptr<ast::expr_t> add_bindings(ptr<ast::expr_t> const& expr, env_t const& env) {
    auto acc = expr;
    auto const& maps = env.elems;
    for (auto it = maps.rbegin(); it != maps.rend(); ++it)
        acc = make<ast::let_expr_t>(it->first, it->second, acc);
    return acc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
callq 0xbde0
movq (%r14), %rax
imulq $0x30, 0x8(%r14), %rcx
addq %rax, %rcx
movq %rsp, %r15
movq %rcx, (%r15)
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
cmpq %rax, %rcx
je 0x359cb
movq %r15, %rdi
callq 0x35d1c
movq %rax, %rbp
movq %r15, %rdi
callq 0x35d1c
addq $0x20, %rax
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x35d3d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x35ef8
movq %r12, %rdi
callq 0xa248
movq %r15, %rdi
callq 0x35ec4
movq (%r14), %rax
movq (%rsp), %rcx
jmp 0x3597a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xa248
movq %r14, %rdi
callq 0x94d0
// File: /workspace/github_cpp_makefile_star2_O2/pajlads[P]pajlang/compiler.cpp
// Function: main
int main(int argc, char *argv[])
{
    if (argc <= 1) { 
        std::cout << "no input files" << std::endl;
        return 1;
    }
    std::string file = argv[1];

    std::ifstream inFile;
    inFile.open(file);
    std::stringstream strStream;
    strStream << inFile.rdbuf();
    std::string str = strStream.str();

    auto instructions = split(str, ';');

    for (auto it = instructions.begin(); it != instructions.end(); ++it) {
        std::cout << *it;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x3f0, %rsp            # imm = 0x3F0
cmpl $0x1, %edi
jg 0x2458
movq 0x2b9c(%rip), %rdi      # 0x4fd8
leaq 0xbc1(%rip), %rsi       # 0x3004
callq 0x2140
movq %rax, %rdi
callq 0x20a0
pushq $0x1
popq %rax
jmp 0x2521
movq 0x8(%rsi), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x3f8(%rbp), %rdx
callq 0x25ec
leaq -0x3f8(%rbp), %rdi
callq 0x2170
leaq -0x3f8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x2110
leaq -0x1f0(%rbp), %rdi
callq 0x20c0
leaq -0x1e0(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x2030
leaq -0x1d8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x21c0
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
pushq $0x3b
popq %rdx
callq 0x235c
movq -0x28(%rbp), %rbx
movq 0x2b03(%rip), %r14      # 0x4fd8
cmpq -0x20(%rbp), %rbx
je 0x24ec
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2130
addq $0x20, %rbx
jmp 0x24d5
leaq -0x28(%rbp), %rdi
callq 0x25c0
leaq -0x48(%rbp), %rdi
callq 0x2090
leaq -0x1f0(%rbp), %rdi
callq 0x20e0
leaq -0x3f8(%rbp), %rdi
callq 0x2040
leaq -0x68(%rbp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x2551
jmp 0x2534
movq %rax, %rbx
jmp 0x255a
jmp 0x253b
movq %rax, %rbx
jmp 0x2566
movq %rax, %rbx
jmp 0x2572
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x25c0
leaq -0x48(%rbp), %rdi
callq 0x2090
leaq -0x1f0(%rbp), %rdi
callq 0x20e0
leaq -0x3f8(%rbp), %rdi
callq 0x2040
leaq -0x68(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetManager::subscribe(network::NetClient const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void	NetManager::subscribe(NetClient const *client, std::string const &topic)
  {
    // global
    if (topic == "")
      {
	auto c = std::find(_fullClients.begin(), _fullClients.end(), client);
	if (c == _fullClients.end())
	  _fullClients.push_back(client);
      }
    // topic
    else
      {
	auto topicSubs = _netClients.find(topic);
	// new topic
	if (topicSubs == _netClients.end())
	  {
	    _netClients[topic] = std::vector<NetClient const *>();
	    topicSubs = _netClients.find(topic);
	  }
	auto c = std::find((*topicSubs).second.begin(),
			   (*topicSubs).second.end(),
			   client);
	if (c == (*topicSubs).second.end())
	  (*topicSubs).second.push_back(client);
      }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
leaq 0x7b62(%rip), %rsi      # 0x18279
movq %rdx, %rdi
callq 0x10500
testb %al, %al
je 0x10754
movq 0x228(%r14), %rdi
movq 0x230(%r14), %rsi
leaq 0x8(%rsp), %rdx
callq 0x100f0
cmpq 0x230(%r14), %rax
jne 0x107e3
addq $0x228, %r14            # imm = 0x228
jmp 0x107d6
leaq 0x1f8(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf760
movq %rax, %r12
addq $0x200, %r14            # imm = 0x200
cmpq %r14, %rax
jne 0x107b4
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf800
leaq 0x10(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0xfd90
movq %r14, %rdi
callq 0x10460
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf760
movq %rax, %r12
movq 0x40(%r12), %rdi
movq 0x48(%r12), %rsi
leaq 0x8(%rsp), %rdx
callq 0x100f0
cmpq 0x48(%r12), %rax
jne 0x107e3
addq $0x40, %r12
movq %r12, %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xf470
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x10460
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetManager::unsubscribe(network::NetClient const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void	NetManager::unsubscribe(NetClient const *client, std::string const &topic)
  {
    // global
    if (topic == "")
      {
	auto c = std::find(_fullClients.begin(), _fullClients.end(), client);
	if (c != _fullClients.end())
	  _fullClients.erase(c);
      }
    // topic
    else
      {
	auto topicSubs = _netClients.find(topic);
	// new topic
	if (topicSubs != _netClients.end())
	  {
	    auto c = std::find((*topicSubs).second.begin(),
			       (*topicSubs).second.end(),
			       client);
	    if (c != (*topicSubs).second.end())
	      (*topicSubs).second.erase(c);

	    if ((*topicSubs).second.size() == 0)
	      _netClients.erase(topicSubs);
	  }
      }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
leaq 0x7a4c(%rip), %rsi      # 0x18279
movq %rdx, %rdi
callq 0x10500
testb %al, %al
je 0x1086e
movq 0x228(%r15), %rdi
movq 0x230(%r15), %rsi
leaq 0x8(%rsp), %rdx
callq 0x100f0
cmpq 0x230(%r15), %rax
je 0x108cd
addq $0x228, %r15            # imm = 0x228
movq %r15, %rdi
movq %rax, %rsi
callq 0xfc60
jmp 0x108cd
leaq 0x1f8(%r15), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf760
addq $0x200, %r15            # imm = 0x200
cmpq %r15, %rax
je 0x108cd
movq %rax, %r14
movq %rax, %r15
addq $0x40, %r15
movq 0x40(%rax), %rdi
movq 0x48(%rax), %rsi
leaq 0x8(%rsp), %rdx
callq 0x100f0
cmpq 0x48(%r14), %rax
je 0x108bd
movq %r15, %rdi
movq %rax, %rsi
callq 0xfc60
movq 0x48(%r14), %rax
cmpq (%r15), %rax
jne 0x108cd
movq %rbx, %rdi
movq %r14, %rsi
callq 0xffd0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetManager::publish(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*, unsigned long)
void	NetManager::publish(std::string const &target,
			    std::string const &topic,
			    std::string const &event,
			    void const *payload, size_t size)
  {
    IndieProtocol::Message	m;

    m.target = target;
    m.topic = topic;
    m.event = event;

    m.payloadSize = size;
    m.payload = payload;

    _writeBuffer.push_back(_serializer(m));
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x795b(%rip), %rsi      # 0x18279
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xf3f0
leaq 0x7945(%rip), %rsi      # 0x18279
leaq 0x38(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xf3f0
leaq 0x792f(%rip), %rsi      # 0x18279
leaq 0x18(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xf3f0
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0xf950
leaq 0x18(%rsp), %rdi
callq 0xf450
leaq 0x38(%rsp), %rdi
callq 0xf450
leaq 0x58(%rsp), %rdi
callq 0xf450
leaq 0x78(%rsp), %rdi
movq %rbp, %rsi
callq 0xf590
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
callq 0xf590
leaq 0xb8(%rsp), %rdi
movq %r12, %rsi
callq 0xf590
leaq 0x78(%rsp), %rdx
movl %r15d, 0x60(%rdx)
movq %r14, 0x68(%rdx)
leaq 0x170(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x103d0
addq $0x240, %rbx            # imm = 0x240
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xf980
leaq 0x8(%rsp), %rdi
callq 0xf7b0
leaq 0x78(%rsp), %rdi
callq 0xf130
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf7b0
jmp 0x10a5b
jmp 0x10a58
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xf450
jmp 0x10a38
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xf450
jmp 0x10a47
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xf450
jmp 0x10a65
movq %rax, %rbx
jmp 0x10a65
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xf130
movq %rbx, %rdi
callq 0x102f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetClient::on(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*, unsigned long)> const&)
void	NetClient::on(std::string const & topic, std::string const & event,
		      NetEventListener const &callback)
  {
    if (topic == "")
      {
	on(event, callback);
	return ;
      }

    auto topicListener = _topicListeners.find(topic);

    // new topic
    if (topicListener == _topicListeners.end())
      {
	_topicListeners[topic] = std::map<std::string, NetEventListener>();
	topicListener = _topicListeners.find(topic);
      }

    (*topicListener).second[event] = callback;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x775b(%rip), %rsi      # 0x18279
movq %r15, %rdi
callq 0x10500
testb %al, %al
je 0x10b45
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfa20
movq %r12, %rdi
movq %r15, %rsi
callq 0xf200
leaq 0x8(%r12), %rcx
cmpq %rcx, %rax
jne 0x10ba4
leaq 0x8(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %r12, %rdi
movq %r15, %rsi
callq 0xfcf0
movq %rsp, %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0xfa40
movq %r13, %rdi
callq 0xf6e0
movq %r12, %rdi
movq %r15, %rsi
callq 0xf200
addq $0x40, %rax
movq %rax, %rdi
movq %r14, %rsi
callq 0x10020
movq %rax, %rdi
movq %rbx, %rsi
callq 0xfb00
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf6e0
movq %rbx, %rdi
callq 0x102f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetClient::removeListener(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void	NetClient::removeListener(std::string const & topic, std::string const & event)
  {
    if (topic == "")
      {
	removeListener(event);
	return ;
      }

    auto topicListener = _topicListeners.find(topic);
    if (topicListener != _topicListeners.end())
      {
	auto eventListener = (*topicListener).second.find(event);
	if (eventListener != (*topicListener).second.end())
	  {
	    (*topicListener).second.erase(eventListener);
	  }
      }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x766a(%rip), %rsi      # 0x18279
movq %r15, %rdi
callq 0x10500
testb %al, %al
je 0x10c2b
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xfaf0
movq %r14, %rdi
movq %r15, %rsi
callq 0xf200
addq $0x8, %r14
cmpq %r14, %rax
je 0x10c6a
movq %rax, %r15
leaq 0x40(%rax), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xfe50
addq $0x48, %r15
cmpq %r15, %rax
je 0x10c6a
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xf790
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetClient::message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void const*, unsigned long) const
void	NetClient::message(std::string const &topic,
			   std::string const &event,
			   void const *payload, size_t size) const
  {
    auto topicListener = _topicListeners.find(topic);

    if (topicListener != _topicListeners.end())
      {
	auto eventListener = (*topicListener).second.find(event);
	if (eventListener != (*topicListener).second.end())
	  {
	    (*eventListener).second(topic, event, payload, size);
	  }
      }
    else
      {
	auto eventListener = _globalListeners.find(event);
	if (eventListener != _globalListeners.end())
	  {
	    (*eventListener).second(topic, event, payload, size);
	  }
      }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
callq 0x104e0
movq %rax, %rbp
leaq 0x8(%r13), %rax
cmpq %rax, %rbp
je 0x10d0c
leaq 0x40(%rbp), %rdi
movq %r15, %rsi
callq 0xf3a0
addq $0x48, %rbp
cmpq %rbp, %rax
je 0x10d21
addq $0x40, %rax
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x104c0
leaq 0x30(%r13), %rdi
movq %r15, %rsi
callq 0xf3a0
addq $0x38, %r13
cmpq %r13, %rax
jne 0x10ce6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetManager::onReadPossible(Socket::Client&, unsigned long)
void  NetManager::onReadPossible(Socket::Client &c, size_t size)
  {
    char *tmp;

    tmp = new char[size];
    c.read(tmp, size);
    _deserializer(IndieProtocol::Serialized(size, tmp));
    delete[] tmp;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0xf030
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xf1b0
addq $0x178, %r12            # imm = 0x178
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xfc20
movq %r12, %rdi
movq %r15, %rsi
callq 0xfeb0
leaq 0x8(%rsp), %rdi
callq 0xf7b0
movq %rbx, %rdi
callq 0xfdc0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf7b0
movq %rbx, %rdi
callq 0x102f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/NetManager.cpp
// Function: network::NetManager::onPacketMessage(IndieProtocol::Message)
void  NetManager::onPacketMessage(IndieProtocol::Message msg)
  {
    std::cout << "MESSAGE" << std::endl;
    std::cout << msg.target << std::endl;
    std::cout << msg.topic << std::endl;
    std::cout << msg.event << std::endl;

    if (msg.topic != "")
      {
	auto topicSubs = _netClients.find(msg.topic);
	if (topicSubs != _netClients.end())
	  {
	    for (auto it = (*topicSubs).second.begin();
		 it != (*topicSubs).second.end(); ++it)
	      {
		if (*it)
		  (*it)->message(msg.topic, msg.event, msg.payload, msg.payloadSize);
	      }

	  }
	// warning : if subscribed to the topic and to the global, event will fire twice
	for (auto client = _fullClients.begin(); client != _fullClients.end(); ++client)
	  {
	    if (*client)
	      (*client)->message(msg.topic, msg.event, msg.payload, msg.payloadSize);
	  }
      }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0xde38(%rip), %r13      # 0x1efb8
leaq 0x7109(%rip), %rsi      # 0x18290
movq %r13, %rdi
callq 0xfb10
movq %rax, %rdi
callq 0xf4c0
movq %r13, %rdi
movq %rbx, %rsi
callq 0xf9e0
movq %rax, %rdi
callq 0xf4c0
leaq 0x20(%rbx), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0xf9e0
movq %rax, %rdi
callq 0xf4c0
leaq 0x40(%rbx), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0xf9e0
movq %rax, %rdi
callq 0xf4c0
leaq 0x709a(%rip), %rsi      # 0x18279
movq %r15, %rdi
callq 0xf920
testb %al, %al
je 0x11267
leaq 0x1f8(%r14), %rdi
movq %r15, %rsi
callq 0xf760
movq %rax, %r13
leaq 0x200(%r14), %rax
cmpq %rax, %r13
je 0x11235
movq 0x40(%r13), %rbp
cmpq 0x48(%r13), %rbp
je 0x11235
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x1122f
movq 0x68(%rbx), %rcx
movl 0x60(%rbx), %r8d
movq %r15, %rsi
movq %r12, %rdx
callq 0xfd30
addq $0x8, %rbp
jmp 0x1120d
movq 0x228(%r14), %r13
cmpq 0x230(%r14), %r13
je 0x11267
movq (%r13), %rdi
testq %rdi, %rdi
je 0x11261
movq 0x68(%rbx), %rcx
movl 0x60(%rbx), %r8d
movq %r15, %rsi
movq %r12, %rdx
callq 0xfd30
addq $0x8, %r13
jmp 0x1123c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/include/Network/protocol/IndieProtocol.hpp
// Function: IndieProtocol::Serialized::operator=(IndieProtocol::Serialized const&)
Serialized &operator= (Serialized const &oth)
    {
      size = oth.size;
      if (data)
	delete[] data;
      data = new char[size];
      memcpy(data, oth.data, size);
      return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, (%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x117eb
callq 0xfdc0
movl (%rbx), %eax
movl %eax, %r15d
movq %r15, %rdi
callq 0xf030
movq %rax, 0x8(%rbx)
movq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0xf960
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/Broker.cpp
// Function: network::Broker::start(int, unsigned long)
void	Broker::start(int port, size_t maxClients)
  {
    _server.OnConnect(
		      [this](Socket::Server &s, int fd)
		      {
			this->onConnect(s, fd);
		      });
    _server.OnDisconnect(
			 [this](Socket::Server &s, int fd)
			 {
			   this->onDisconnect(s, fd);
			 });
    _server.OnReadPossible(
			   [this](Socket::Server &s, int fd, size_t size)
		      {
			this->onReadPossible(s, fd, size);
		      });
    _server.OnWritePossible(
		      [this](Socket::Server &s, int fd)
		      {
			this->onWritePossible(s, fd);
		      });

    _server.start(port, maxClients);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
leaq 0x8(%rdi), %r14
movq %rsp, %rsi
andq $0x0, 0x8(%rsi)
movq %rdi, (%rsi)
leaq 0x89e(%rip), %rax       # 0x1370c
movq %rax, 0x18(%rsi)
leaq 0x89d(%rip), %rax       # 0x13716
movq %rax, 0x10(%rsi)
movq %r14, %rdi
callq 0xfe30
movq %rsp, %r12
movq %r12, %rdi
callq 0xf7d0
andq $0x0, 0x8(%r12)
movq %r15, (%r12)
leaq 0x89b(%rip), %rax       # 0x1373c
movq %rax, 0x18(%r12)
leaq 0x899(%rip), %rax       # 0x13746
movq %rax, 0x10(%r12)
movq %rsp, %rsi
movq %r14, %rdi
callq 0xf400
movq %rsp, %r12
movq %r12, %rdi
callq 0xf7d0
andq $0x0, 0x8(%r12)
movq %r15, (%r12)
leaq 0x893(%rip), %rax       # 0x1376c
movq %rax, 0x18(%r12)
leaq 0x895(%rip), %rax       # 0x1377a
movq %rax, 0x10(%r12)
movq %rsp, %rsi
movq %r14, %rdi
callq 0xffc0
movq %rsp, %r12
movq %r12, %rdi
callq 0xf7d0
andq $0x0, 0x8(%r12)
movq %r15, (%r12)
leaq 0x88f(%rip), %rax       # 0x137a0
movq %rax, 0x18(%r12)
leaq 0x88d(%rip), %rax       # 0x137aa
movq %rax, 0x10(%r12)
movq %rsp, %rsi
movq %r14, %rdi
callq 0xf660
movq %rsp, %rdi
callq 0xf7d0
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0xf730
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12f55
jmp 0x12f55
jmp 0x12f55
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf7d0
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/Broker.cpp
// Function: network::Broker::onConnect(Socket::Server&, int)
void	Broker::onConnect(Socket::Server &s, int fd)
  {
    std::cout << "connexion etablished" << std::endl;
    _clients[fd] = network::Client(fd);
    _clients[fd].deserializer.OnConnect(
					[fd, this] (IndieProtocol::Connect c)
					{
					  this->onPacketConnect(fd, c);
					});
    _clients[fd].deserializer.OnList(
					[fd, this] (IndieProtocol::List l)
					{
					  this->onPacketList(fd, l);
					});
    _clients[fd].deserializer.OnMessage(
					[fd, this] (IndieProtocol::Message m)
					{
					  this->onPacketMessage(fd, m);
					});
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movl %edx, (%r15)
movq 0xc023(%rip), %rdi      # 0x1efb8
leaq 0x52c3(%rip), %rsi      # 0x1825f
callq 0xfb10
movq %rax, %rdi
callq 0xf4c0
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0xf490
leaq 0x180(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xff80
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x10110
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xfcc0
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xff80
andq $0x0, (%r15)
leaq 0x28(%rax), %rdi
movl (%r12), %eax
movl %eax, (%r15)
movq %rbx, 0x8(%r15)
leaq 0x7c5(%rip), %rax       # 0x137d0
movq %rax, 0x18(%r15)
leaq 0x83a(%rip), %rax       # 0x13850
movq %rax, 0x10(%r15)
leaq 0x10(%rsp), %rsi
callq 0xf890
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xf7d0
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xff80
andq $0x0, (%r15)
leaq 0x28(%rax), %rdi
movl (%r12), %eax
movl %eax, (%r15)
movq %rbx, 0x8(%r15)
leaq 0x81d(%rip), %rax       # 0x13878
movq %rax, 0x18(%r15)
leaq 0x88e(%rip), %rax       # 0x138f4
movq %rax, 0x10(%r15)
leaq 0x10(%rsp), %rsi
callq 0x10440
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xf7d0
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xff80
andq $0x0, (%r15)
leaq 0x28(%rax), %rdi
movl (%r12), %eax
movl %eax, (%r15)
movq %rbx, 0x8(%r15)
leaq 0x871(%rip), %rax       # 0x1391c
movq %rax, 0x18(%r15)
leaq 0x8ec(%rip), %rax       # 0x139a2
movq %rax, 0x10(%r15)
leaq 0x10(%rsp), %rsi
callq 0x10320
leaq 0x10(%rsp), %rdi
callq 0xf7d0
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x130e2
jmp 0x130e2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xf7d0
jmp 0x130fe
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xfcc0
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/Broker.cpp
// Function: network::Broker::onDisconnect(Socket::Server&, int)
void	Broker::onDisconnect(Socket::Server &s, int fd)
  {
    std::cout << "connexion interrupted" << std::endl;
    auto found = _clients.find(fd);
    if (found != _clients.end())
      _clients.erase(found);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movl %edx, (%r15)
movq 0xbe97(%rip), %rdi      # 0x1efb8
leaq 0x4ed8(%rip), %rsi      # 0x18000
callq 0xfb10
movq %rax, %rdi
callq 0xf4c0
leaq 0x180(%r14), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf7f0
addq $0x188, %r14            # imm = 0x188
cmpq %r14, %rax
je 0x1315e
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf2a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/Broker.cpp
// Function: network::Broker::onReadPossible(Socket::Server&, int, unsigned long)
void	Broker::onReadPossible(Socket::Server &s, int fd, size_t size)
  {
    auto found = _clients.find(fd);
    char *tmp;

    if (found != _clients.end())
      {
	tmp = new char[size];
	s.read(fd, tmp, size);
	(*found).second.deserializer(IndieProtocol::Serialized(size, tmp));
	delete[] tmp;
      }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r12
movq %rdi, %r14
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
addq $0x180, %rdi            # imm = 0x180
callq 0xf7f0
addq $0x188, %r14            # imm = 0x188
cmpq %r14, %rax
je 0x131ee
movq %rax, %r15
movq %rbx, %rdi
callq 0xf030
movq %rax, %r14
movl 0x4(%rsp), %esi
movq %r12, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x10400
addq $0x50, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0xfc20
movq %r15, %rdi
movq %r12, %rsi
callq 0xfeb0
leaq 0x8(%rsp), %rdi
callq 0xf7b0
movq %r14, %rdi
callq 0xfdc0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf7b0
movq %rbx, %rdi
callq 0x102f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/Broker.cpp
// Function: network::Broker::onWritePossible(Socket::Server&, int)
void	Broker::onWritePossible(Socket::Server &s, int fd)
  {
    auto found = _clients.find(fd);
    IndieProtocol::Serialized tmp;

    if (found != _clients.end())
      {
	while ((*found).second.writeBuffer.size())
	  {
	    tmp = (*found).second.writeBuffer.back();
	    (*found).second.writeBuffer.pop_back();
	    s.write(fd, tmp.data, tmp.size);
	  }
      }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
addq $0x180, %rdi            # imm = 0x180
callq 0xf7f0
movq %rax, %r14
andl $0x0, 0x8(%rsp)
pushq $0x1
popq %rdi
callq 0xf030
movq %rax, 0x10(%rsp)
addq $0x188, %r15            # imm = 0x188
cmpq %r15, %r14
je 0x1329f
movq %r14, %r15
addq $0xe0, %r15
leaq 0x8(%rsp), %r12
movq 0xe8(%r14), %rsi
cmpq 0xe0(%r14), %rsi
je 0x1329f
addq $-0x10, %rsi
movq %r12, %rdi
callq 0xf350
movq %r15, %rdi
callq 0xfe70
movl 0x4(%rsp), %esi
movq 0x10(%rsp), %rdx
movl 0x8(%rsp), %ecx
movq %rbx, %rdi
callq 0x103a0
jmp 0x13264
leaq 0x8(%rsp), %rdi
callq 0xf7b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf7b0
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/Broker.cpp
// Function: network::Broker::onPacketConnect(int, IndieProtocol::Connect)
void	Broker::onPacketConnect(int fd, IndieProtocol::Connect conn)
  {
    std::cout << "FD : " << fd << " : CONNECT" << std::endl;
    std::cout << conn.name << std::endl;

    auto found = _clients.find(fd);
    if (found == _clients.end())
      {
	_clients[fd] = Client(fd);
	found = _clients.find(fd);
      }
    (*found).second.connected = true;
    (*found).second.name = conn.name;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
leaq 0xc(%rsp), %r12
movl %esi, (%r12)
movq 0xbc71(%rip), %r14      # 0x1efb8
leaq 0x4f26(%rip), %rsi      # 0x18274
movq %r14, %rdi
callq 0xfb10
movq %rax, %rdi
movl %ebp, %esi
callq 0x10280
leaq 0x4f13(%rip), %rsi      # 0x1827a
movq %rax, %rdi
callq 0xfb10
movq %rax, %rdi
callq 0xf4c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf9e0
movq %rax, %rdi
callq 0xf4c0
leaq 0x180(%r15), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0xf7f0
addq $0x188, %r15            # imm = 0x188
cmpq %r15, %rax
jne 0x133e9
leaq 0xc(%rsp), %r15
movl (%r15), %esi
leaq 0x10(%rsp), %rdi
callq 0xf490
movq %r14, %rdi
movq %r15, %rsi
callq 0xff80
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x10110
leaq 0x10(%rsp), %rdi
callq 0xfcc0
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0xf7f0
movb $0x1, 0x28(%rax)
addq $0x30, %rax
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf590
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xfcc0
movq %rbx, %rdi
callq 0x102f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/protocol/Deserializer.cpp
// Function: IndieProtocol::Deserializer::operator()(IndieProtocol::Serialized const&)
size_t	Deserializer::operator() (Serialized const &to_handle)
  {
    Serialized	tmp;

    if (!to_handle.size || !to_handle.data)
      return 0;

    std::cout << "old buffer : " << std::endl;
    std::cout << _buffer << std::endl;

    _buffer += to_handle;

    std::cout << "new buffer : " << std::endl;
    std::cout << _buffer << std::endl;

    if (!_isReading)
      {
	if (to_handle.size >= sizeof(Header))
	  {
	    // get the header data
	    _isReading = true;
	    memcpy(&_header, to_handle.data, sizeof(Header));
	  }
	else
	  return 0;
      }
    tmp = _buffer + sizeof(Header);

    // can read the whole packet
    if (tmp.size + sizeof(Header) >= _header.size)
      {
	size_t to_return = _header.size;
	switch (_header.messageType)
	  {
	  case PacketType::CONNECT:
	    deserializeConnect(tmp);
	    break;
	  case PacketType::LIST:
	    deserializeList(tmp);
	    break;
	  case PacketType::MESSAGE:
	    deserializeMessage(tmp);
	    break;
	  default: // error or not implemented
	    break;
	  }
	reset();
	return to_return;
      }
    return 0;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
andl $0x0, (%rsp)
pushq $0x1
popq %rdi
callq 0xf030
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r14)
je 0x1471e
cmpq $0x0, 0x8(%r14)
je 0x1471e
movq 0xa95c(%rip), %rdi      # 0x1efb8
leaq 0x3d97(%rip), %rsi      # 0x183fa
callq 0xfb10
movq %rax, %rdi
callq 0xf4c0
leaq 0x8(%rbx), %r15
movq 0xa93d(%rip), %rdi      # 0x1efb8
movq %r15, %rsi
callq 0xf8b0
movq %rax, %rdi
callq 0xf4c0
movq %r15, %rdi
movq %r14, %rsi
callq 0xf880
movq 0xa91b(%rip), %rdi      # 0x1efb8
leaq 0x3d64(%rip), %rsi      # 0x18408
callq 0xfb10
movq %rax, %rdi
callq 0xf4c0
movq 0xa900(%rip), %rdi      # 0x1efb8
movq %r15, %rsi
callq 0xf8b0
movq %rax, %rdi
callq 0xf4c0
cmpb $0x0, 0x18(%rbx)
jne 0x146e8
cmpl $0x6, (%r14)
jb 0x1471e
movb $0x1, 0x18(%rbx)
movq 0x8(%r14), %rax
movzwl 0x4(%rax), %ecx
movw %cx, 0x4(%rbx)
movl (%rax), %eax
movl %eax, (%rbx)
leaq 0x10(%rsp), %rdi
pushq $0x6
popq %rdx
movq %r15, %rsi
callq 0xfe80
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0xf350
leaq 0x10(%rsp), %rdi
callq 0xf7b0
movl (%rsp), %eax
addq $0x6, %rax
movl (%rbx), %r14d
cmpq %r14, %rax
jae 0x14736
xorl %r14d, %r14d
movq %rsp, %rdi
callq 0xf7b0
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movzwl 0x4(%rbx), %eax
cmpl $0x1, %eax
je 0x14763
cmpl $0x2, %eax
je 0x14756
cmpl $0x3, %eax
jne 0x1476e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xf670
jmp 0x1476e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x10510
jmp 0x1476e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xfee0
movq %rbx, %rdi
callq 0xf5d0
jmp 0x14721
jmp 0x1478b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xf7b0
jmp 0x1478e
jmp 0x1478b
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf7b0
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/protocol/Deserializer.cpp
// Function: IndieProtocol::Deserializer::deserializeConnect(IndieProtocol::Serialized const&)
void	Deserializer::deserializeConnect(Serialized const &to_handle)
  {
    Connect	conn;
    uint32_t	pos = 0;

    if (!_OnConnect)
      return ;

    if (!deserializeString(to_handle, pos, conn.name))
      return ;

    _OnConnect(conn);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3ac7(%rip), %rsi      # 0x18279
leaq 0x48(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0xf3f0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xfe90
leaq 0x48(%rsp), %rdi
callq 0xf450
andl $0x0, 0x4(%rsp)
cmpq $0x0, 0x50(%rbx)
je 0x14829
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10290
testb %al, %al
je 0x14829
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfe90
addq $0x40, %rbx
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xf840
leaq 0x28(%rsp), %rdi
callq 0xf450
leaq 0x8(%rsp), %rdi
callq 0xf450
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xf450
jmp 0x1484d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x1485c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xf450
jmp 0x14866
movq %rax, %rbx
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/protocol/Deserializer.cpp
// Function: IndieProtocol::Deserializer::deserializeMessage(IndieProtocol::Serialized const&)
void	Deserializer::deserializeMessage(Serialized const &to_handle)
  {
    Message	msg;
    uint32_t	pos = 0;
    void	*payload;

    if (!_OnMessage)
      return ;

    if (!deserializeString(to_handle, pos, msg.target))
      return ;
    if (!deserializeString(to_handle, pos, msg.topic))
      return ;
    if (!deserializeString(to_handle, pos, msg.event))
      return ;

    memcpy(&msg.payloadSize, to_handle.data + pos, sizeof(msg.payloadSize));
    pos += sizeof(msg.payloadSize);
    // error
    if (pos + msg.payloadSize + sizeof(Header) > _header.size)
      return ;
    payload = new char[msg.payloadSize];
    memcpy(payload, to_handle.data + pos, msg.payloadSize);

    msg.payload = payload;
    _OnMessage(msg);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38f2(%rip), %rsi      # 0x18279
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xf3f0
leaq 0x38dc(%rip), %rsi      # 0x18279
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xf3f0
leaq 0x38c6(%rip), %rsi      # 0x18279
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xf3f0
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0xf950
leaq 0x10(%rsp), %rdi
callq 0xf450
leaq 0x30(%rsp), %rdi
callq 0xf450
leaq 0x50(%rsp), %rdi
callq 0xf450
andl $0x0, 0x8(%rsp)
cmpq $0x0, 0x70(%rbx)
je 0x14ae6
leaq 0x8(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10290
testb %al, %al
je 0x14ae6
leaq 0x90(%rsp), %rcx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10290
testb %al, %al
je 0x14ae6
leaq 0xb0(%rsp), %rcx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10290
testb %al, %al
je 0x14ae6
movq 0x8(%r14), %r14
movl 0x8(%rsp), %r13d
movl (%r14,%r13), %r15d
movl %r15d, 0xd0(%rsp)
leal (%r15,%r13), %eax
addl $0x4, %eax
addq $0x6, %rax
movl (%rbx), %ecx
cmpq %rcx, %rax
ja 0x14ae6
movq %r15, %rdi
callq 0xf030
movq %rax, %r12
leal 0x4(%r13), %eax
movl %eax, %eax
addq %rax, %r14
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xf960
leaq 0x70(%rsp), %rsi
movq %r12, 0x68(%rsi)
leaq 0xe0(%rsp), %rdi
callq 0x100c0
addq $0x60, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0xfaa0
leaq 0xe0(%rsp), %rdi
callq 0xf130
leaq 0x70(%rsp), %rdi
callq 0xf130
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xf130
jmp 0x14b48
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xf450
jmp 0x14b25
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xf450
jmp 0x14b34
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xf450
jmp 0x14b52
movq %rax, %rbx
jmp 0x14b52
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xf130
movq %rbx, %rdi
callq 0x102f0
// File: /workspace/github_cpp_makefile_star2_O2/Unreality3D[P]Unreality3D/indie-studio/source/Network/protocol/Deserializer.cpp
// Function: IndieProtocol::Deserializer::deserializeString(IndieProtocol::Serialized const&, unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool	Deserializer::deserializeString
  (Serialized const &to_handle, uint32_t &pos, std::string &to_change)
  {
    uint16_t	size;

    memcpy(&size, to_handle.data + pos, sizeof(size));
    pos += sizeof(size);
    // error
    if (pos + size + sizeof(Header) > _header.size)
      return false;

    char buffer[size + 1];
    memcpy(buffer, to_handle.data + pos, size);
    buffer[size] = '\0';
    pos += size;
    to_change = std::string(buffer);
    return true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq 0x8(%rsi), %rax
movl (%rdx), %edx
movzwl (%rax,%rdx), %ebx
leal 0x2(%rdx), %eax
movl %eax, (%r14)
leal (%rdx,%rbx), %r13d
addl $0x2, %r13d
addq $0x6, %r13
movl (%rdi), %eax
cmpq %rax, %r13
ja 0x14c3e
movq %rsp, -0x48(%rbp)
movq %rsp, %r15
movq %rax, -0x50(%rbp)
leal 0x10(%rbx), %eax
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
movl (%r14), %eax
movq %rax, -0x38(%rbp)
addq 0x8(%rsi), %rax
movl %ebx, %r12d
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rcx, -0x40(%rbp)
callq 0xf960
movb $0x0, (%r15,%r12)
addl -0x38(%rbp), %ebx
movl %ebx, (%r14)
leaq -0x70(%rbp), %r14
leaq -0x29(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xf3f0
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0xfd10
movq %r14, %rdi
callq 0xf450
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rsp
cmpq %rax, %r13
setbe %al
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq