LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::basic_json(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator> const&)
basic_json(const basic_json& other)
        : m_type(other.m_type)
    {
        switch (m_type)
        {
            case value_t::object:
            {
                assert(other.m_value.object != nullptr);
                m_value = *other.m_value.object;
                break;
            }

            case value_t::array:
            {
                assert(other.m_value.array != nullptr);
                m_value = *other.m_value.array;
                break;
            }

            case value_t::string:
            {
                assert(other.m_value.string != nullptr);
                m_value = *other.m_value.string;
                break;
            }

            case value_t::boolean:
            {
                m_value = other.m_value.boolean;
                break;
            }

            case value_t::number_integer:
            {
                m_value = other.m_value.number_integer;
                break;
            }

            case value_t::number_float:
            {
                m_value = other.m_value.number_float;
                break;
            }

            default:
            {
                break;
            }
        }
    }

// Assembly:
pushq %rbx
movzbl (%rsi), %eax
movb %al, (%rdi)
decl %eax
movq $0x0, 0x8(%rdi)
cmpl $0x5, %eax
ja 0x26226
leaq 0x16e40(%rip), %rcx     # 0x3d01c
movq %rdi, %rbx
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsi), %rax
jmp 0x26222
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x26228
callq 0x234c0
jmp 0x26222
movzbl 0x8(%rsi), %eax
jmp 0x26222
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x26247
callq 0x228c0
jmp 0x26222
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x26266
callq 0x22f40
movq %rax, 0x8(%rbx)
popq %rbx
retq
leaq 0x17b0e(%rip), %rdi     # 0x3dd3d
leaq 0x1700c(%rip), %rsi     # 0x3d242
leaq 0x17988(%rip), %rcx     # 0x3dbc5
movl $0x6b1, %edx            # imm = 0x6B1
callq 0x21b40
leaq 0x17957(%rip), %rdi     # 0x3dba5
leaq 0x16fed(%rip), %rsi     # 0x3d242
leaq 0x17969(%rip), %rcx     # 0x3dbc5
movl $0x6a3, %edx            # imm = 0x6A3
callq 0x21b40
leaq 0x17ab1(%rip), %rdi     # 0x3dd1e
leaq 0x16fce(%rip), %rsi     # 0x3d242
leaq 0x1794a(%rip), %rcx     # 0x3dbc5
movl $0x6aa, %edx            # imm = 0x6AA
callq 0x21b40
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::parser::unexpect(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::lexer::token_type) const
void unexpect(typename lexer::token_type t) const
        {
            if (t == last_token)
            {
                std::string error_msg = "parse error - unexpected ";
                error_msg += (last_token == lexer::token_type::parse_error ? ("'" +  m_lexer.get_token() + "'") :
                              lexer::token_type_name(last_token));
                throw std::invalid_argument(error_msg);
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpl %esi, 0x28(%rdi)
je 0x262cc
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdi, %r14
leaq 0x38(%rsp), %r12
leaq 0x17292(%rip), %rsi     # 0x3d56d
leaq 0x172a4(%rip), %rdx     # 0x3d586
leaq 0x28(%rsp), %rdi
movq %r12, -0x10(%r12)
callq 0x215e0
movl 0x28(%r14), %ebx
cmpl $0xc, %ebx
jne 0x26355
addq $0x30, %r14
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x229e0
leaq 0x17315(%rip), %rsi     # 0x3d62a
leaq 0x48(%rsp), %rdi
movq %r15, %rdx
callq 0x22fe0
leaq 0x17301(%rip), %rsi     # 0x3d62a
leaq 0x48(%rsp), %rdi
callq 0x233c0
leaq 0x18(%rsp), %rdx
movq %rax, %rcx
addq $0x10, %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x26363
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rdx)
jmp 0x26370
leaq 0x8(%rsp), %rdi
movl %ebx, %esi
callq 0x224b0
jmp 0x26388
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x21440
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x263af
callq 0x22130
cmpl $0xc, %ebx
jne 0x263da
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x263c7
callq 0x22130
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x263da
callq 0x22130
movl $0x10, %edi
callq 0x217b0
movq %rax, %rbx
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x23100
movq 0x26b8d(%rip), %rsi     # 0x4cf88
movq 0x26b36(%rip), %rdx     # 0x4cf38
movq %rbx, %rdi
callq 0x23090
movq %rax, %r14
jmp 0x26467
movq %rbx, %rdi
movq %rax, %r14
callq 0x21c50
jmp 0x26467
leaq 0x18(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x2643c
callq 0x22130
jmp 0x2643c
movq %rax, %r14
jmp 0x26454
movq %rax, %r14
cmpl $0xc, %ebx
jne 0x26467
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26454
callq 0x22130
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26467
callq 0x22130
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x26476
callq 0x22130
movq %r14, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
reference operator[](const typename object_t::key_type& key)
    {
        // implicitly convert null to object
        if (is_null())
        {
            m_type = value_t::object;
            m_value.object = create<object_t>();
        }

        // [] only works for objects
        if (is_object())
        {
            assert(m_value.object != nullptr);
            return m_value.object->operator[](key);
        }
        else
        {
            throw std::domain_error("cannot use operator[] with " + type_name());
        }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movb (%rdi), %al
movq %rsi, %rbx
movq %rdi, %r14
testb %al, %al
jne 0x267bd
movl $0x30, %edi
movb $0x1, (%r14)
callq 0x22250
vxorps %xmm0, %xmm0, %xmm0
leaq 0x8(%rax), %rcx
xorl %edx, %edx
movq %rdx, 0x10(%rax)
vmovups %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rdx, 0x28(%rax)
movq %rax, 0x8(%r14)
movb (%r14), %al
cmpb $0x1, %al
jne 0x267da
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x2682e
movq %rbx, %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21e40
movl $0x10, %edi
callq 0x217b0
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x22850
leaq 0x16fd1(%rip), %rsi     # 0x3d7ca
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x22fe0
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x225e0
xorl %ebp, %ebp
movq 0x264a9(%rip), %rsi     # 0x4ccc8
movq 0x26582(%rip), %rdx     # 0x4cda8
movq %rbx, %rdi
callq 0x23090
leaq 0x17376(%rip), %rdi     # 0x3dbab
leaq 0x16a06(%rip), %rsi     # 0x3d242
leaq 0x16e76(%rip), %rcx     # 0x3d6b9
movl $0xbc6, %edx            # imm = 0xBC6
callq 0x21b40
leaq 0x30(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x26863
callq 0x22130
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26876
callq 0x22130
testb %bpl, %bpl
jne 0x26898
jmp 0x268a0
leaq 0x10(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x26898
callq 0x22130
jmp 0x26898
movq %rax, %r14
movq %rbx, %rdi
callq 0x21c50
movq %r14, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::push_back(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>&&)
void push_back(basic_json&& val)
    {
        // push_back only works for null objects or arrays
        if (not(is_null() or is_array()))
        {
            throw std::domain_error("cannot use push_back() with " + type_name());
        }

        // transform null object into an array
        if (is_null())
        {
            m_type = value_t::array;
            m_value = value_t::array;
        }

        // add element to array (move semantics)
        assert(m_value.array != nullptr);
        m_value.array->push_back(std::move(val));
        // invalidate object
        val.m_type = value_t::null;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movzbl (%rdi), %eax
movq %rsi, %rbx
movq %rdi, %r14
testl %eax, %eax
je 0x268ea
cmpl $0x2, %eax
jne 0x26923
movq 0x8(%r14), %rdi
testq %rdi, %rdi
jne 0x2690f
leaq 0x17452(%rip), %rdi     # 0x3dd24
leaq 0x16969(%rip), %rsi     # 0x3d242
leaq 0x16f4e(%rip), %rcx     # 0x3d82e
movl $0x10da, %edx           # imm = 0x10DA
callq 0x21b40
movl $0x18, %edi
movb $0x2, (%r14)
callq 0x22250
vxorps %xmm0, %xmm0, %xmm0
movq %rax, %rdi
movq $0x0, 0x10(%rax)
vmovups %xmm0, (%rax)
movq %rax, 0x8(%r14)
movq %rbx, %rsi
callq 0x21bd0
movb $0x0, (%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x217b0
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x22850
leaq 0x16ecf(%rip), %rsi     # 0x3d811
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x22fe0
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x225e0
xorl %ebp, %ebp
movq 0x26360(%rip), %rsi     # 0x4ccc8
movq 0x26439(%rip), %rdx     # 0x4cda8
movq %rbx, %rdi
callq 0x23090
leaq 0x30(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x2698d
callq 0x22130
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x269a0
callq 0x22130
testb %bpl, %bpl
jne 0x269c2
jmp 0x269ca
leaq 0x10(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x269c2
callq 0x22130
jmp 0x269c2
movq %rax, %r14
movq %rbx, %rdi
callq 0x21c50
movq %r14, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::lexer::get_number() const
number_float_t get_number() const
        {
            // conversion
            typename string_t::value_type* endptr;
            assert(m_start != nullptr);
            number_float_t float_val = str_to_float_t(static_cast<number_float_t*>(nullptr), &endptr);

            // return float_val if the whole number was translated and NAN
            // otherwise
            return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x26a15
movq %rsp, %r14
movq %r14, %rsi
callq 0x21d10
movq (%r14), %rax
vmovsd 0x16660(%rip), %xmm1    # 0x3d058
cmpq 0x40(%rbx), %rax
sete %al
kmovd %eax, %k1
vmovsd %xmm0, %xmm1, %xmm1 {%k1}
vmovapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1692e(%rip), %rdi     # 0x3d34a
leaq 0x1681f(%rip), %rsi     # 0x3d242
leaq 0x16f76(%rip), %rcx     # 0x3d9a0
movl $0x1e9d, %edx           # imm = 0x1E9D
callq 0x21b40
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>* nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::create<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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&)
static T* create(Args&& ... args)
    {
        AllocatorType<T> alloc;
        auto deleter = [&](T * object)
        {
            alloc.deallocate(object, 1);
        };
        std::unique_ptr<T, decltype(deleter)> object(alloc.allocate(1), deleter);
        alloc.construct(object.get(), std::forward<Args>(args)...);
        return object.release();
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x20, %edi
callq 0x22250
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x21600
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movq %rax, %r14
callq 0x22130
movq %r14, %rdi
callq 0x23160
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/utils.h
// Function: int REST::Utils::parse_string<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>> const&)
R parse_string(const S& str) {
  std::stringstream buf;
  buf << str;
  R val;
  buf >> val;
  return val;
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x21c30
movq 0x8(%rbx), %rdx
movq (%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x22480
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x21a40
movq 0x24ff1(%rip), %rsi     # 0x4cc50
movl 0x4(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x21ca0
leaq 0x88(%rsp), %rdi
callq 0x21510
movl %ebx, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
jmp 0x27c87
movq 0x24fc2(%rip), %rsi     # 0x4cc50
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
callq 0x21ca0
leaq 0x88(%rsp), %rdi
callq 0x21510
movq %rbx, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/router.cpp
// Function: REST::Router::match(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<void (REST::LambdaService*)>)
void Router::match(std::string path, LambdaService::function lambda) {
    auto r = to_regex(path, false);

    std::vector<Service*> services;
    services.resize(Worker::POOL_SIZE);
    for (int i = 0; i < Worker::POOL_SIZE; i++)
      services[i] = new LambdaService(lambda);

    path = nested_path(path);

    routes.emplace_back(r, path, services);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x60(%rsp), %r14
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x50(%rsp), %r12
movq %rdi, 0x8(%rsp)
movq %r14, -0x10(%r14)
movq %r12, %rdi
movq (%rsi), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
callq 0x21600
leaq 0x70(%rsp), %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x21210
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x28acc
callq 0x22130
movq 0x2412d(%rip), %rbp     # 0x4cc00
leaq 0x10(%rsp), %rdi
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq (%rbp), %rsi
callq 0x23130
cmpl $0x0, (%rbp)
jle 0x28b56
leaq 0x30(%rsp), %r12
xorl %r14d, %r14d
movl $0x98, %edi
callq 0x22250
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x23440
movq %r13, %rdi
movq %r12, %rsi
callq 0x22430
movq (%r13), %rax
movq 0x10(%rsp), %rcx
addq -0x18(%rax), %r13
movq %r13, (%rcx,%r14,8)
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x28b4a
movl $0x3, %edx
movq %r12, %rdi
movq %r12, %rsi
callq *%rax
movslq (%rbp), %rax
incq %r14
cmpq %rax, %r14
jl 0x28aff
movq 0x8(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
movq %rbx, %rdx
callq 0x22770
leaq 0xa8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22620
movq (%r15), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x28b93
callq 0x22130
movq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x10(%rsp), %rcx
movq %rbx, %rdx
callq 0x21450
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x28bb9
callq 0x22130
leaq 0x90(%rsp), %rdi
callq 0x21c70
leaq 0x70(%rsp), %rdi
callq 0x221f0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28bfc
movq 0x50(%rsp), %rdi
movq %rax, %rbx
cmpq %r14, %rdi
je 0x28c50
callq 0x22130
jmp 0x28c50
jmp 0x28bfc
jmp 0x28c58
movq %rax, %rbx
jmp 0x28c2a
movq %rax, %rbx
jmp 0x28c22
movq %rax, %rbx
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x28c22
leaq 0x30(%rsp), %rdi
movl $0x3, %edx
movq %rdi, %rsi
callq *%rax
movq %r13, %rdi
callq 0x22130
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x28c39
callq 0x22130
leaq 0x90(%rsp), %rdi
callq 0x21c70
leaq 0x70(%rsp), %rdi
callq 0x221f0
movq %rbx, %rdi
callq 0x23160
movq %rax, %rdi
callq 0x24985
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/router.h
// Function: REST::Router::nested_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string nested_path(std::string const& path) {
      std::string np;
      for (auto& p : nested_paths)
        np += p;

      return np + path;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x18(%rsp), %r12
movq %rdx, %r14
movq %rdi, %rbx
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x18(%rsi), %r13
movq 0x20(%rsi), %rbp
cmpq %rbp, %r13
je 0x28f81
leaq 0x8(%rsp), %r15
movq 0x8(%r13), %rdx
movq (%r13), %rsi
movq %r15, %rdi
callq 0x21440
addq $0x20, %r13
cmpq %rbp, %r13
jne 0x28f68
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x23430
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x28fa0
callq 0x22130
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28fb4
movq 0x8(%rsp), %rdi
movq %rax, %rbx
cmpq %r12, %rdi
je 0x28fc6
callq 0x22130
movq %rbx, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/utils.cpp
// Function: REST::Utils::random_uuid[abi:cxx11]()
std::string random_uuid() {
  std::string uuid(36, ' ');

  for (int i = 0; i < 36; i++) {
    switch (i) {
      case 8:
      case 13:
      case 18:
      case 23:
        uuid[i] = '-';
        break;
      case 14:
        uuid[i] = '4';
        break;
      case 19:
        uuid[i] = DEC2HEX[rand()%4 + 8];
        break;
      default:
        uuid[i] = DEC2HEX[rand()%16];
    }
  }

  return uuid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x10(%rdi), %rax
movl $0x24, %esi
movl $0x20, %edx
movq %rdi, %rbx
movq %rax, (%rdi)
callq 0x22520
leaq 0x7ee4(%rip), %r15      # 0x3f1d0
leaq 0x7dad(%rip), %r12      # 0x3f0a0
xorl %r14d, %r14d
movb $0x2d, %al
leal -0xd(%r14), %ecx
cmpl $0xa, %ecx
ja 0x3730e
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movb $0x34, %al
jmp 0x37344
cmpl $0x8, %r14d
je 0x37344
callq 0x213b0
leal 0xf(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x10, %ecx
subl %ecx, %eax
cltq
jmp 0x37340
callq 0x213b0
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x4, %ecx
negl %ecx
leal 0x8(%rax,%rcx), %eax
movb (%rax,%r15), %al
movq (%rbx), %rcx
movb %al, (%rcx,%r14)
incq %r14
cmpq $0x24, %r14
jne 0x372f6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/utils.cpp
// Function: REST::Utils::uri_decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string uri_decode(const std::string & sSrc) {
   // Note from RFC1630: "Sequences which start with a percent
   // sign but are not followed by two hexadecimal characters
   // (0-9, A-F) are reserved for future extension"

   const unsigned char * pSrc = (const unsigned char *)sSrc.c_str();
   const int SRC_LEN = sSrc.length();
   const unsigned char * const SRC_END = pSrc + SRC_LEN;
   // last decodable '%'
   const unsigned char * const SRC_LAST_DEC = SRC_END - 2;

   char * const pStart = new char[SRC_LEN];
   char * pEnd = pStart;

   while (pSrc < SRC_LAST_DEC)
   {
      if (*pSrc == '%')
      {
         char dec1, dec2;
         if (-1 != (dec1 = HEX2DEC[*(pSrc + 1)])
            && -1 != (dec2 = HEX2DEC[*(pSrc + 2)]))
         {
            *pEnd++ = (dec1 << 4) + dec2;
            pSrc += 3;
            continue;
         }
      }

      *pEnd++ = *pSrc++;
   }

   // the last 2- chars
   while (pSrc < SRC_END)
      *pEnd++ = *pSrc++;

   std::string sResult(pStart, pEnd);
   delete [] pStart;
   return sResult;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x8(%rsi), %rax
movq (%rsi), %r15
movq %rdi, %rbx
movq $-0x1, %rdi
testq %rax, %rax
leaq (%r15,%rax), %r12
leaq -0x2(%r15,%rax), %r13
cmovnsq %rax, %rdi
callq 0x21050
movq %rax, %r14
cmpq %r13, %r15
jae 0x373e9
leaq 0x7d2f(%rip), %rax      # 0x3f0d0
movq %r14, %rdx
movb (%r15), %cl
cmpb $0x25, %cl
jne 0x373da
movzbl 0x1(%r15), %esi
movb (%rsi,%rax), %sil
cmpb $-0x1, %sil
je 0x373da
movzbl 0x2(%r15), %edi
movb (%rdi,%rax), %dil
cmpb $-0x1, %dil
je 0x373da
shlb $0x4, %sil
addq $0x3, %r15
addb %sil, %dil
movb %dil, (%rdx)
jmp 0x373df
incq %r15
movb %cl, (%rdx)
incq %rdx
cmpq %r13, %r15
jb 0x373a4
jmp 0x373ec
movq %r14, %rdx
cmpq %r12, %r15
jae 0x37408
subq %r15, %r12
xorl %eax, %eax
movb (%r15,%rax), %cl
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r12
jne 0x373f6
addq %rax, %rdx
leaq 0x10(%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, (%rbx)
callq 0x21600
movq %r14, %rdi
callq 0x22710
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/utils.cpp
// Function: REST::Utils::rfc1123_datetime[abi:cxx11](long)
std::string rfc1123_datetime( time_t time ) {
  struct tm * timeinfo;
  char buffer [80];

  timeinfo = gmtime ( &time );
  strftime (buffer,80,"%a, %d %b %Y %H:%M:%S GMT",timeinfo);

  return buffer;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
callq 0x21f80
leaq 0x10(%rsp), %r14
leaq 0x7d8e(%rip), %rdx      # 0x3f1e0
movl $0x50, %esi
movq %rax, %rcx
movq %r14, %rdi
callq 0x21dc0
leaq 0x10(%rbx), %rax
movq %r14, %rdi
movq %rax, (%rbx)
callq 0x21710
leaq 0x10(%rsp,%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x215e0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/service.cpp
// Function: REST::Service::make_action()
void Service::make_action() {
    for (auto feature = features.cbegin(); feature != features.cend(); ++feature) {
      (*feature)->feature_push();
    }

    before();

    method(request->method);

    after();

    for (auto feature = features.crbegin(); feature != features.crend(); ++feature) {
      (*feature)->feature_pop();
    }
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %r14
movq %rdi, %rbx
cmpq 0x20(%rdi), %r14
je 0x37a32
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r14
cmpq 0x20(%rbx), %r14
jne 0x37a1f
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x10(%rbx), %rcx
movq (%rbx), %rax
movq %rbx, %rdi
movl (%rcx), %esi
callq *0x28(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq 0x20(%rbx), %r14
cmpq 0x18(%rbx), %r14
je 0x37a6d
movq -0x8(%r14), %rdi
addq $-0x8, %r14
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x37a57
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/resource.cpp
// Function: REST::Resource::method(REST::Request::Method)
void Resource::method(Request::Method method) {
  switch (method) {
    case Request::Method::POST:
      create();
      break;
    case Request::Method::GET:
      read();
      break;
    case Request::Method::PATCH:
    case Request::Method::PUT:
      update();
      break;
    case Request::Method::DELETE:
      destroy();
      break;
    default:
      throw HTTP::MethodNotAllowed();
  }
}

// Assembly:
cmpl $0x8, %esi
ja 0x37b95
leaq 0x771e(%rip), %rcx      # 0x3f288
movl %esi, %eax
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdi), %rax
addq $0x10, %rax
jmpq *(%rax)
movq (%rdi), %rax
addq $0x18, %rax
jmpq *(%rax)
movq (%rdi), %rax
jmpq *(%rax)
movq (%rdi), %rax
addq $0x8, %rax
jmpq *(%rax)
pushq %rax
movl $0x8, %edi
callq 0x217b0
movq 0x15199(%rip), %rcx     # 0x4cd40
movq 0x15342(%rip), %rsi     # 0x4cef0
movq 0x15403(%rip), %rdx     # 0x4cfb8
movq %rax, %rdi
addq $0x10, %rcx
movq %rcx, (%rax)
callq 0x23090
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/dispatcher.cpp
// Function: REST::Dispatcher::Dispatcher(int, int)
Dispatcher::Dispatcher(int wc, int sc) : workers_count(wc), streamers_count(sc) {
  Worker::POOL_SIZE = workers_count;
  workers.resize(workers_count);

  for (int i = 0; i < workers_count; i++) {
    workers[i] = new Worker(i, sc);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x152d1(%rip), %rax     # 0x4ced0
movq 0x14ffa(%rip), %rcx     # 0x4cc00
leaq 0x10(%rdi), %rbx
vxorps %xmm0, %xmm0, %xmm0
movl %edx, %ebp
movq %rdi, %r14
addq $0x10, %rax
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
movl %edx, 0xc(%rdi)
vmovups %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movl %esi, (%rcx)
movslq %esi, %rsi
movq %rbx, %rdi
callq 0x21330
cmpl $0x0, 0x8(%r14)
jle 0x37c72
xorl %r15d, %r15d
movl $0xe0, %edi
callq 0x22250
movq %rax, %r12
movq %rax, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x21cc0
movq 0x10(%r14), %rax
movq %r12, (%rax,%r15,8)
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x37c44
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37c7d
movq %rax, %r14
jmp 0x37c8d
movq %r12, %rdi
movq %rax, %r14
callq 0x22130
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x37c9a
callq 0x22130
movq %r14, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/worker.cpp
// Function: REST::Worker::run()
void Worker::run() {
  should_run = true;

  thread = std::thread([this] () {
    THREAD_NAME(server_header.c_str());

    // while worker is alive
    while (should_run) {
      Request::client client;

      clients_queue.wait_dequeue(client);

      // make request
      Request request(client.handle, client.address);

      if (!should_run)
        break;

      Response response(request, streamers);
      response.headers["Server"] = server_header + ", waiting " + std::to_string(clients_count);

      try {
        request.process();

        make_action(request, response);
      } catch (HTTP::Error &e) {
        response.error(e);
      }

      response.send();

      clear_streamers();

      clients_count--;
      total_clients_count++;
    }

    std::cout << "Stopped worker #" << id << " with " << clients_count << " clients in queue (processed " << total_clients_count << ")" << std::endl;
  });
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb $0x1, 0x34(%rdi)
leaq 0x10(%rsp), %r14
movl $0x10, %edi
movq $0x0, (%r14)
callq 0x22250
leaq 0x1434b(%rip), %rcx     # 0x4c530
leaq 0x8(%rsp), %rsi
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, (%rsi)
movq %r14, %rdi
xorl %edx, %edx
callq 0x22050
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3820e
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, 0x40(%rbx)
jne 0x38226
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x213c0
movq 0x8(%rsp), %rdi
movq %rax, %rbx
testq %rdi, %rdi
je 0x3823e
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/worker.cpp
// Function: REST::Worker::make_action(REST::Request&, REST::Response&)
void Worker::make_action(Request &request, Response &response) {
  Service* service = Router::find(request, id);

  if (service == nullptr)
    throw HTTP::NotFound();

  service->request = &request;
  service->response = &response;

  service->make_action();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl 0x30(%rdi), %esi
movq %r14, %rdi
movq %rdx, %rbx
callq 0x22b10
testq %rax, %rax
je 0x3829f
movq %r14, 0x10(%rax)
movq %rbx, 0x8(%rax)
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x227b0
movl $0x8, %edi
callq 0x217b0
movq 0x149f0(%rip), %rcx     # 0x4cca0
movq 0x14c49(%rip), %rsi     # 0x4cf00
movq 0x14cfa(%rip), %rdx     # 0x4cfb8
movq %rax, %rdi
addq $0x10, %rcx
movq %rcx, (%rax)
callq 0x23090
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/worker.cpp
// Function: REST::Worker::stop()
void Worker::stop() {
  should_run = false;
  clear_streamers();
  Request::client c;
  clients_queue.enqueue(c);
  thread.join();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movb $0x0, 0x34(%rdi)
movq %rdi, %rbx
movq 0x50(%rdi), %r15
movq 0x48(%rdi), %r14
movl 0x38(%rdi), %ecx
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jb 0x38334
cmpq %r15, %r14
je 0x38319
movq %r14, %rdi
callq 0x23080
addq $0x8, %r14
cmpq %r15, %r14
jne 0x38300
movq 0x48(%rbx), %r14
movq 0x50(%rbx), %r15
cmpq %r14, %r15
je 0x38334
movq %r14, %rax
cmpq $0x0, (%rax)
jne 0x38370
addq $0x8, %rax
cmpq %r15, %rax
jne 0x38321
movq %r14, 0x50(%rbx)
leaq 0x60(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x21ea0
testb %al, %al
je 0x38357
leaq 0xb8(%rbx), %rdi
movl $0x1, %esi
callq 0x22c00
addq $0x40, %rbx
movq %rbx, %rdi
callq 0x23080
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x213c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/readerwriterqueue/readerwriterqueue.h
// Function: moodycamel::ReaderWriterQueue<REST::Request::client, 512ul>::make_block(unsigned long)
static Block* make_block(size_t capacity)
	{
		// Allocate enough memory for the block itself, as well as all the elements it will contain
		auto size = sizeof(Block) + std::alignment_of<Block>::value - 1;
		size += sizeof(T) * capacity + std::alignment_of<T>::value - 1;
		auto newBlockRaw = static_cast<char*>(std::malloc(size));
		if (newBlockRaw == nullptr) {
			return nullptr;
		}
		
		auto newBlockAligned = align_for<Block>(newBlockRaw);
		auto newBlockData = align_for<T>(newBlockAligned + sizeof(Block));
		return new (newBlockAligned) Block(capacity, newBlockRaw, newBlockData);
	}

// Assembly:
pushq %rbx
movq %rdi, %rax
shlq $0x7, %rax
movq %rdi, %rbx
leaq 0xae(%rax,%rdi,8), %rdi
callq 0x227d0
testq %rax, %rax
je 0x38c51
movl %eax, %edx
negl %edx
movq %rax, %rcx
vxorps %xmm0, %xmm0, %xmm0
decq %rbx
andl $0x7, %edx
leaq 0xa0(%rax,%rdx), %rsi
addq %rdx, %rcx
movq $0x0, 0x80(%rax,%rdx)
vmovups %xmm0, (%rax,%rdx)
vmovups %xmm0, 0x40(%rax,%rdx)
negl %esi
andl $0x7, %esi
leaq 0xa0(%rsi,%rcx), %rsi
movq %rsi, 0x88(%rax,%rdx)
movq %rbx, 0x90(%rax,%rdx)
movq %rax, 0x98(%rax,%rdx)
jmp 0x38c53
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/readerwriterqueue/atomicops.h
// Function: moodycamel::spsc_sema::LightweightSemaphore::signal(long)
void signal(ssize_t count = 1)
		    {
		    	assert(count >= 0);
		        ssize_t oldCount = m_count.fetch_add_release(count);
		        assert(oldCount >= -1);
		        if (oldCount < 0)
		        {
		            m_sema.signal(1);
		        }
		    }

// Assembly:
pushq %rax
testq %rsi, %rsi
js 0x38c96
lock
xaddq %rsi, (%rdi)
cmpq $-0x2, %rsi
jle 0x38cb5
testq %rsi, %rsi
js 0x38c8c
popq %rax
retq
addq $0x8, %rdi
popq %rax
jmp 0x23010
leaq 0x694b(%rip), %rdi      # 0x3f5e8
leaq 0x6688(%rip), %rsi      # 0x3f32c
leaq 0x6948(%rip), %rcx      # 0x3f5f3
movl $0x22a, %edx            # imm = 0x22A
callq 0x21b40
leaq 0x6979(%rip), %rdi      # 0x3f635
leaq 0x6669(%rip), %rsi      # 0x3f32c
leaq 0x6929(%rip), %rcx      # 0x3f5f3
movl $0x22c, %edx            # imm = 0x22C
callq 0x21b40
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/readerwriterqueue/readerwriterqueue.h
// Function: bool moodycamel::ReaderWriterQueue<REST::Request::client, 512ul>::inner_enqueue<(moodycamel::ReaderWriterQueue<REST::Request::client, 512ul>::AllocationMode)0, REST::Request::client const&>(REST::Request::client const&)
ReentrantGuard(bool& _inSection)
			: inSection(_inSection)
		{
			assert(!inSection);
			if (inSection) {
				throw std::runtime_error("ReaderWriterQueue does not support enqueuing or dequeuing elements from other elements' ctors and dtors");
			}

			inSection = true;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, 0x50(%rdi)
je 0x38e94
movb $0x1, 0x50(%rdi)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rdi), %r12
movq 0x48(%r12), %rdx
movq 0x40(%r12), %rcx
leaq 0x1(%rcx), %rax
andq 0x90(%r12), %rax
cmpq %rdx, %rax
jne 0x38dc7
movq (%r12), %rsi
movq %rsi, 0x48(%r12)
cmpq %rsi, %rdx
jne 0x38dc7
movq 0x80(%r12), %rax
movq (%rbx), %rcx
cmpq %rcx, %rax
jne 0x38e0c
movq 0x48(%rbx), %rax
cmpq $0x200, %rax            # imm = 0x200
setb %cl
shlxq %rcx, %rax, %r15
movq %r15, %rdi
callq 0x22d10
testq %rax, %rax
je 0x38e90
movq %r15, 0x48(%rbx)
movq 0x88(%rax), %rcx
movq 0x80(%r14), %rdx
movq %rdx, 0x80(%rcx)
vmovups (%r14), %zmm0
vmovups 0x40(%r14), %zmm1
vmovups %zmm1, 0x40(%rcx)
vmovups %zmm0, (%rcx)
movq (%rax), %rcx
testq %rcx, %rcx
jne 0x38ed2
movq $0x1, 0x8(%rax)
movq $0x1, 0x40(%rax)
movq 0x80(%r12), %rcx
movq %rcx, 0x80(%rax)
movq %rax, 0x80(%r12)
jmp 0x38e77
movq 0x88(%r12), %rdx
movq 0x80(%r14), %rdi
movq %rcx, %rsi
shlq $0x7, %rsi
leaq (%rsi,%rcx,8), %rcx
movq %rdi, 0x80(%rdx,%rcx)
vmovups (%r14), %zmm0
vmovups 0x40(%r14), %zmm1
vmovups %zmm1, 0x40(%rdx,%rcx)
vmovups %zmm0, (%rdx,%rcx)
movq %rax, 0x40(%r12)
jmp 0x38e7b
movq 0x80(%r12), %rax
movq (%rax), %rcx
movq %rcx, 0x48(%rax)
movq 0x40(%rax), %rdx
cmpq %rdx, %rcx
jne 0x38eb3
movq %rcx, 0x48(%rax)
movq %rcx, %rdx
shlq $0x7, %rdx
movq 0x88(%rax), %rsi
movq 0x80(%r14), %rdi
leaq (%rdx,%rcx,8), %rdx
incq %rcx
movq %rdi, 0x80(%rsi,%rdx)
vmovups (%r14), %zmm0
vmovups 0x40(%r14), %zmm1
vmovups %zmm1, 0x40(%rsi,%rdx)
vmovups %zmm0, (%rsi,%rdx)
andq 0x90(%rax), %rcx
movq %rcx, 0x40(%rax)
movq %rax, 0x40(%rbx)
movb $0x1, %al
movb $0x0, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
xorl %eax, %eax
jmp 0x38e7d
leaq 0x66b3(%rip), %rdi      # 0x3f54e
leaq 0x64c7(%rip), %rsi      # 0x3f369
leaq 0x66b0(%rip), %rcx      # 0x3f559
movl $0x222, %edx            # imm = 0x222
callq 0x21b40
leaq 0x6570(%rip), %rdi      # 0x3f42a
leaq 0x64a8(%rip), %rsi      # 0x3f369
leaq 0x6582(%rip), %rcx      # 0x3f44a
movl $0x1cb, %edx            # imm = 0x1CB
callq 0x21b40
leaq 0x6660(%rip), %rdi      # 0x3f539
leaq 0x6489(%rip), %rsi      # 0x3f369
leaq 0x6563(%rip), %rcx      # 0x3f44a
movl $0x1e2, %edx            # imm = 0x1E2
vzeroupper
callq 0x21b40
movq %rax, %rdi
movb $0x0, 0x50(%rbx)
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/readerwriterqueue/readerwriterqueue.h
// Function: void moodycamel::BlockingReaderWriterQueue<REST::Request::client, 512ul>::wait_dequeue<REST::Request::client>(REST::Request::client&)
void wait_dequeue(U& result)
	{
		sema.wait();
		bool success = inner.try_dequeue(result);
		AE_UNUSED(result);
		assert(success);
		AE_UNUSED(success);
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x58(%r14), %rax
addq $0x58, %rdi
movq %rsi, %rbx
testq %rax, %rax
jle 0x38f1d
lock
decq (%rdi)
jmp 0x38f22
callq 0x21780
movq %r14, %rdi
movq %rbx, %rsi
callq 0x224f0
testb %al, %al
je 0x38f39
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6745(%rip), %rdi      # 0x3f685
leaq 0x6422(%rip), %rsi      # 0x3f369
leaq 0x673f(%rip), %rcx      # 0x3f68d
movl $0x2c9, %edx            # imm = 0x2C9
callq 0x21b40
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::empty() const
bool empty() const noexcept
    {
        switch (m_type)
        {
            case value_t::null:
            {
                // null values are empty
                return true;
            }

            case value_t::array:
            {
                assert(m_value.array != nullptr);
                return m_value.array->empty();
            }

            case value_t::object:
            {
                assert(m_value.object != nullptr);
                return m_value.object->empty();
            }

            default:
            {
                // all other types are nonempty
                return false;
            }
        }
    }

// Assembly:
pushq %rax
movzbl (%rdi), %eax
testl %eax, %eax
je 0x3affb
cmpl $0x1, %eax
je 0x3afe8
cmpl $0x2, %eax
jne 0x3afff
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3b022
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jmp 0x3aff6
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3b003
cmpq $0x0, 0x28(%rax)
sete %al
jmp 0x3b001
movb $0x1, %al
jmp 0x3b001
xorl %eax, %eax
popq %rcx
retq
leaq 0x2ba1(%rip), %rdi      # 0x3dbab
leaq 0x2231(%rip), %rsi      # 0x3d242
leaq 0x4d8f(%rip), %rcx      # 0x3fda7
movl $0xfe3, %edx            # imm = 0xFE3
callq 0x21b40
leaq 0x2cfb(%rip), %rdi      # 0x3dd24
leaq 0x2212(%rip), %rsi      # 0x3d242
leaq 0x4d70(%rip), %rcx      # 0x3fda7
movl $0xfdd, %edx            # imm = 0xFDD
callq 0x21b40
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::dump(int) const
string_t dump(const int indent = -1) const
    {
        std::stringstream ss;

        if (indent >= 0)
        {
            dump(ss, true, static_cast<unsigned int>(indent));
        }
        else
        {
            dump(ss, false, 0);
        }

        return ss.str();
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movl %edx, %ebp
movq %rsi, %r14
callq 0x21c30
xorl %edx, %edx
testl %ebp, %ebp
movl %ebp, %eax
leaq 0x18(%rsp), %rsi
setns %dl
sarl $0x1f, %eax
andnl %ebp, %eax, %ecx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x210c0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x22dc0
movq 0x11bbc(%rip), %rsi     # 0x4cc50
leaq 0x8(%rsp), %rdi
callq 0x21ca0
leaq 0x88(%rsp), %rdi
callq 0x21510
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
movq 0x11b8f(%rip), %rsi     # 0x4cc50
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
callq 0x21ca0
leaq 0x88(%rsp), %rdi
callq 0x21510
movq %rbx, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::size() const
size_type size() const noexcept
    {
        switch (m_type)
        {
            case value_t::null:
            {
                // null values are empty
                return 0;
            }

            case value_t::array:
            {
                assert(m_value.array != nullptr);
                return m_value.array->size();
            }

            case value_t::object:
            {
                assert(m_value.object != nullptr);
                return m_value.object->size();
            }

            default:
            {
                // all other types have size 1
                return 1;
            }
        }
    }

// Assembly:
pushq %rax
movzbl (%rdi), %eax
testl %eax, %eax
je 0x3ba70
cmpl $0x1, %eax
je 0x3ba5c
cmpl $0x2, %eax
jne 0x3ba6b
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x3ba91
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
jmp 0x3ba70
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3ba72
movq 0x28(%rax), %rax
jmp 0x3ba70
movl $0x1, %eax
popq %rcx
retq
leaq 0x2132(%rip), %rdi      # 0x3dbab
leaq 0x17c2(%rip), %rsi      # 0x3d242
leaq 0x412f(%rip), %rcx      # 0x3fbb6
movl $0x101d, %edx           # imm = 0x101D
callq 0x21b40
leaq 0x228c(%rip), %rdi      # 0x3dd24
leaq 0x17a3(%rip), %rsi      # 0x3d242
leaq 0x4110(%rip), %rcx      # 0x3fbb6
movl $0x1017, %edx           # imm = 0x1017
callq 0x21b40
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::operator[](unsigned long) const
const_reference operator[](size_type idx) const
    {
        // at only works for arrays
        if (is_array())
        {
            assert(m_value.array != nullptr);
            return m_value.array->operator[](idx);
        }
        else
        {
            throw std::domain_error("cannot use operator[] with " + type_name());
        }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
cmpb $0x2, (%rdi)
movq %rdi, %r14
jne 0x3badc
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3bb30
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x217b0
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x22850
leaq 0x1ccf(%rip), %rsi      # 0x3d7ca
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x22fe0
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x225e0
xorl %ebp, %ebp
movq 0x111a7(%rip), %rsi     # 0x4ccc8
movq 0x11280(%rip), %rdx     # 0x4cda8
movq %rbx, %rdi
callq 0x23090
leaq 0x21ed(%rip), %rdi      # 0x3dd24
leaq 0x1704(%rip), %rsi      # 0x3d242
leaq 0x415f(%rip), %rcx      # 0x3fca4
movl $0xb96, %edx            # imm = 0xB96
callq 0x21b40
leaq 0x30(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x3bb65
callq 0x22130
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bb78
callq 0x22130
testb %bpl, %bpl
jne 0x3bb9a
jmp 0x3bba2
leaq 0x10(%rsp), %rcx
movq %rax, %r14
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x3bb9a
callq 0x22130
jmp 0x3bb9a
movq %rax, %r14
movq %rbx, %rdi
callq 0x21c50
movq %r14, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/server.cpp
// Function: REST::Server::Server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, REST::Dispatcher*)
Server::Server(std::string path, Dispatcher* d) : dispatcher(d) {
  srand(time(0));
  signal(SIGPIPE, SIG_IGN);
  Router::instance();

  unlink(path.c_str());
  struct sockaddr_un local;
  handle = socket(AF_UNIX, SOCK_STREAM, 0);
  local.sun_family = AF_UNIX;
  strcpy(local.sun_path, path.c_str());

  if (bind(handle, (struct sockaddr *)&local, strlen(local.sun_path) + sizeof(local.sun_family) + 1) == -1)
    throw PortInUseError();

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, (%rdi)
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x8(%rdi)
xorl %edi, %edi
callq 0x22090
movl %eax, %edi
callq 0x22170
movl $0x1, %esi
movl $0xd, %edi
callq 0x22570
movq 0x10d49(%rip), %rax     # 0x4cfa0
movb (%rax), %al
testb %al, %al
je 0x3c2b8
movq (%rbx), %rdi
callq 0x21760
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x21350
movl %eax, 0x48(%r14)
leaq 0x4(%rsp), %r14
movl %eax, %ebp
movw $0x1, -0x2(%r14)
movq %r14, %rdi
movq (%rbx), %rsi
callq 0x220d0
movq %r14, %rdi
callq 0x21710
leal 0x3(%rax), %edx
leaq 0x2(%rsp), %rsi
movl %ebp, %edi
callq 0x211b0
cmpl $-0x1, %eax
je 0x3c2ff
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10ce1(%rip), %rdi     # 0x4cfa0
callq 0x231d0
testl %eax, %eax
je 0x3c25d
movq 0x10cf9(%rip), %rdi     # 0x4cfc8
callq 0x231b0
movq 0x1097d(%rip), %rdi     # 0x4cc58
movq 0x10ce6(%rip), %rsi     # 0x4cfc8
leaq 0x11fa7(%rip), %rdx     # 0x4e290
callq 0x21fa0
movq 0x10cab(%rip), %rdi     # 0x4cfa0
callq 0x21b30
jmp 0x3c25d
movl $0x8, %edi
callq 0x217b0
movq 0x10910(%rip), %rcx     # 0x4cc20
movq 0x109b9(%rip), %rsi     # 0x4ccd0
movq 0x10c9a(%rip), %rdx     # 0x4cfb8
movq %rax, %rdi
addq $0x10, %rcx
movq %rcx, (%rax)
callq 0x23090
movq 0x10c6c(%rip), %rdi     # 0x4cfa0
movq %rax, %rbx
callq 0x21ac0
movq %rbx, %rdi
callq 0x23160
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/server.cpp
// Function: REST::Server::~Server()
Server::~Server() {
  is_running = false;

  delete dispatcher;

  freeaddrinfo(host_info_list);
  close(handle);

#ifdef SERVER_PATH
  unlink(STR(SERVER_PATH));
#endif
}

// Assembly:
pushq %rbx
movb $0x0, 0x8(%rdi)
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3c5d4
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rbx), %rdi
callq 0x22740
movl 0x48(%rbx), %edi
callq 0x23460
popq %rbx
retq
movq %rax, %rdi
callq 0x24985
nop
// File: /workspace/github_cpp_makefile_star2_O3/alfanick[P]rest-cpp/src/rest/server.cpp
// Function: REST::Server::run()
void Server::run() {
  int status;

  router()->print();

  status = listen(handle, SOMAXCONN);
  if (status == -1)
    throw ServerError();

  while (is_running) {
    Request::client client;
    socklen_t addr_size = sizeof(client.address);
    client.handle = accept(handle, (struct sockaddr *)&(client.address), &addr_size);

    try {
      if (client.handle == -1)
        throw ServerError();

      dispatcher->next(client);
    } catch (Exception &e) {
      if (is_running)
        std::cerr << "!!! " << e.what() << std::endl;
      close(client.handle);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0x21650
movq %rax, %rdi
callq 0x21d00
movl 0x48(%rbx), %edi
movl $0x1000, %esi           # imm = 0x1000
callq 0x22450
cmpl $-0x1, %eax
je 0x3c729
cmpb $0x1, 0x8(%rbx)
jne 0x3c717
movq 0x10630(%rip), %r13     # 0x4cc68
movq 0x109a9(%rip), %rbp     # 0x4cfe8
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
leaq 0x3910(%rip), %r12      # 0x3ff60
addq $0x10, %r13
movl $0x80, 0xc(%rsp)
movq %r14, %rsi
movq %r15, %rdx
movl 0x48(%rbx), %edi
callq 0x21480
movl %eax, 0x90(%rsp)
cmpl $-0x1, %eax
je 0x3c68c
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x23220
cmpb $0x0, 0x8(%rbx)
jne 0x3c654
jmp 0x3c717
movl $0x8, %edi
callq 0x217b0
movq %r13, (%rax)
movq 0x105a8(%rip), %rsi     # 0x4cc48
movq 0x10911(%rip), %rdx     # 0x4cfb8
movq %rax, %rdi
callq 0x23090
jmp 0x3c757
movq %rax, (%rsp)
cmpl $0x1, %edx
jne 0x3c760
movq (%rsp), %rdi
callq 0x21630
cmpb $0x1, 0x8(%rbx)
movq %rax, (%rsp)
jne 0x3c701
movl $0x4, %edx
movq %rbp, %rdi
movq %r12, %rsi
callq 0x22480
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rbp, %rdi
movq %rax, %rsi
callq 0x22240
movq %rax, %rdi
callq 0x217a0
movl 0x90(%rsp), %edi
callq 0x23460
callq 0x22ee0
jmp 0x3c681
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x217b0
movq 0x1052e(%rip), %rcx     # 0x4cc68
movq 0x10507(%rip), %rsi     # 0x4cc48
movq 0x10870(%rip), %rdx     # 0x4cfb8
movq %rax, %rdi
addq $0x10, %rcx
movq %rcx, (%rax)
callq 0x23090
movq %rax, (%rsp)
callq 0x22ee0
movq (%rsp), %rdi
callq 0x23160
movq %rax, %rdi
callq 0x24985
nop