LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./Block.hpp
// Function: Block::Block(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int, unsigned int, Transaction)
Block(std::uint64_t index, std::string previousBlockHash, std::uint32_t difficulty, std::uint32_t maxTransactionsCount, Transaction transaction)
    {
        this->index = index;
        this->previousBlockHash = previousBlockHash;
        this->difficulty = difficulty;
        this->maxTransactionsCount = maxTransactionsCount;
        transactions.push_back(transaction);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x40(%rsp)
movl %r8d, 0xc(%rsp)
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x18(%rsp)
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
movq %rax, 0x48(%rdi)
movl $0x3, 0x50(%rdi)
leaq 0x58(%rdi), %rcx
movq %rcx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movq %rax, 0x68(%rdi)
addq $0x70, %rdi
leaq 0x80(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x70(%rbx)
leaq 0x12b36(%rip), %rdx     # 0x19eff
movq %rdi, 0x38(%rsp)
movq %rdx, %rsi
callq 0xeb7a
leaq 0x90(%rbx), %r12
leaq 0xa0(%rbx), %rbp
movq %rbp, 0x90(%rbx)
leaq 0x124b6(%rip), %rsi     # 0x198a8
leaq 0x124bc(%rip), %rdx     # 0x198b5
movq %r12, %rdi
callq 0xeb7a
movq %r13, (%rbx)
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x41d0
movl %r14d, 0x54(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x50(%rbx)
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x74c8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x745c
movq %rax, %r14
jmp 0x747b
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0x745c
movq (%rbp), %rsi
incq %rsi
callq 0x4340
movq 0x38(%rsp), %rax
movq (%rax), %rdi
cmpq 0x10(%rsp), %rdi
je 0x747b
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq 0x28(%rsp), %rdi
callq 0x74f2
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x18(%rsp), %rdi
je 0x74a4
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq 0x8(%rbx), %rdi
cmpq 0x20(%rsp), %rdi
je 0x74bf
movq 0x20(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq %r14, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./Block.hpp
// Function: Block::mine(unsigned int)
void mine(std::uint32_t difficulty = 1)
    {
        std::cout << "Starting mining of block " << index << '\n';
        const auto miningStartTime = std::chrono::system_clock::now();

        do
        {
            ++nounce;
            blockHash = calculateHash();
        } while (!std::all_of(blockHash.begin(), blockHash.begin() + difficulty, [](char & a){
                return a == '0';
            }));

        minedAt = getTimestampAsString(std::chrono::system_clock::now());
        std::cout << "Block "<< index << " mined, nounce " << nounce << ", hash: " << blockHash << '\n'; 
        std::cout << "Took " << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - miningStartTime).count() << " milliseconds to mine block\n";
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %r14
movq 0x1d53c(%rip), %rbx     # 0x24fd0
leaq 0x11e45(%rip), %rsi     # 0x198e0
movl $0x19, %edx
movq %rbx, %rdi
callq 0x43a0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4230
leaq 0x8(%rsp), %r15
movb $0xa, (%r15)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x43a0
callq 0x4060
movq %rax, (%rsp)
leaq 0x8(%r14), %r12
leaq 0x18(%rsp), %rbx
movl %ebp, %ebp
incq 0x48(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x7c48
movq %r12, %rdi
movq %r15, %rsi
callq 0x43d0
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7b11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq (%r12), %rdi
leaq (%rdi,%rbp), %r13
movq %r13, %rsi
callq 0x8055
cmpq %r13, %rax
jne 0x7ae0
callq 0x4060
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x4e7e
leaq 0x90(%r14), %rdi
movq %r15, %rsi
callq 0x43d0
movq (%r15), %rdi
cmpq %rbx, %rdi
je 0x7b5f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1d46a(%rip), %r15     # 0x24fd0
leaq 0x11d8d(%rip), %rsi     # 0x198fa
movl $0x6, %edx
movq %r15, %rdi
callq 0x43a0
movq (%r14), %rsi
movq %r15, %rdi
callq 0x4230
movq %rax, %r12
leaq 0x11d72(%rip), %rsi     # 0x19901
movl $0xf, %edx
movq %rax, %rdi
callq 0x43a0
movq 0x48(%r14), %rsi
movq %r12, %rdi
callq 0x4230
movq %rax, %r12
leaq 0x11d5f(%rip), %rsi     # 0x19911
movl $0x8, %edx
movq %rax, %rdi
callq 0x43a0
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %r12, %rdi
callq 0x43a0
leaq 0x8(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x43a0
leaq 0x11d2f(%rip), %rsi     # 0x1991a
movl $0x5, %edx
movq %r15, %rdi
callq 0x43a0
callq 0x4060
subq (%rsp), %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x12, %rdx
addq %rdx, %rsi
movq %r15, %rdi
callq 0x4310
leaq 0x11cf5(%rip), %rsi     # 0x19920
movl $0x1c, %edx
movq %rax, %rdi
callq 0x43a0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./nlohmann/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::push_back(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>> const&)
void push_back(const basic_json& val)
    {
        // push_back only works for null objects or arrays
        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
        {
            JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name())));
        }

        // transform null object into an array
        if (is_null())
        {
            m_type = value_t::array;
            m_value = value_t::array;
            assert_invariant();
        }

        // add element to array
        m_value.array->push_back(val);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0xb789
cmpl $0x2, %eax
je 0xb7b1
movl $0x20, %edi
callq 0x41a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x9b0e
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, %rdi
callq 0x4190
leaq (%rax,%r14), %rdx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xeb7a
leaq 0xe5e6(%rip), %rsi      # 0x19d33
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x9a9e
movb $0x1, %bpl
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi            # imm = 0x134
callq 0x9594
xorl %ebp, %ebp
leaq 0x193e6(%rip), %rsi     # 0x24b60
leaq 0x7437(%rip), %rdx      # 0x12bb8
movq %rbx, %rdi
callq 0x4500
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x4330
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
callq 0x9364
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc4f2
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb7ed
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xb7ed
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xb80c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xb80c
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb819
movq %rbx, %rdi
callq 0x4270
movq %r14, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./nlohmann/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::push_back(std::initializer_list<nlohmann::detail::json_ref<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>>)
void push_back(initializer_list_t init)
    {
        if (is_object() && init.size() == 2 && (*init.begin())->is_string())
        {
            basic_json&& key = init.begin()->moved_or_copied();
            push_back(typename object_t::value_type(
                          std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied()));
        }
        else
        {
            push_back(basic_json(init));
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, (%rdi)
sete %al
cmpq $0x2, %rdx
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xbc33
movq 0x10(%r14), %rax
cmpb $0x3, (%rax)
jne 0xbc33
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xa01a
movq %r15, %rdi
callq 0xc03a
movq %rax, %r15
addq $0x20, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0xa01a
leaq 0x20(%rsp), %r14
movq %rsp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xa8b4
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbcf8
leaq 0x40(%rsp), %rdi
callq 0x9364
leaq 0x48(%rsp), %rbx
movzbl -0x8(%rbx), %esi
movq %rbx, %rdi
callq 0xaab2
movq -0x28(%rbx), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xbc0c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4340
movq %rsp, %rdi
callq 0x9364
leaq 0x8(%rsp), %rdi
movzbl -0x8(%rdi), %esi
callq 0xaab2
leaq 0x10(%rsp), %rdi
callq 0x9364
leaq 0x18(%rsp), %rdi
jmp 0xbc68
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x86cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0xbe3c
leaq 0x20(%rsp), %rdi
callq 0x9364
leaq 0x28(%rsp), %rdi
movzbl -0x8(%rdi), %esi
callq 0xaab2
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xa418
movq %rsp, %rdi
callq 0x8834
jmp 0xbc97
jmp 0xbc94
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0xbca6
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8834
movq %rbx, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./nlohmann/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>> const&)
void push_back(const typename object_t::value_type& val)
    {
        // push_back only works for null objects or objects
        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
        {
            JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name())));
        }

        // transform null object into an object
        if (is_null())
        {
            m_type = value_t::object;
            m_value = value_t::object;
            assert_invariant();
        }

        // add element to array
        m_value.object->insert(val);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movb (%rdi), %al
cmpb $0x2, %al
jae 0xbd64
movq %rsi, %rbx
testb %al, %al
jne 0xbd4e
movb $0x1, (%r14)
movl $0x30, %edi
callq 0x4330
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
callq 0x9364
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xbf76
movl $0x20, %edi
callq 0x41a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x9b0e
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, %rdi
callq 0x4190
leaq (%rax,%r14), %rdx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xeb7a
leaq 0xdf8e(%rip), %rsi      # 0x19d33
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x9a9e
movb $0x1, %bpl
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi            # imm = 0x134
callq 0x9594
xorl %ebp, %ebp
leaq 0x18d8e(%rip), %rsi     # 0x24b60
leaq 0x6ddf(%rip), %rdx      # 0x12bb8
movq %rbx, %rdi
callq 0x4500
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbe07
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xbe07
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xbe26
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xbe26
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbe33
movq %rbx, %rdi
callq 0x4270
movq %r14, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./nlohmann/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::push_back(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>&&)
void push_back(basic_json&& val)
    {
        // push_back only works for null objects or arrays
        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
        {
            JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name())));
        }

        // transform null object into an array
        if (is_null())
        {
            m_type = value_t::array;
            m_value = value_t::array;
            assert_invariant();
        }

        // add element to array (move semantics)
        m_value.array->push_back(std::move(val));
        // if val is moved from, basic_json move constructor marks it null so we do not call the destructor
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0xbedd
cmpl $0x2, %eax
je 0xbf05
movl $0x20, %edi
callq 0x41a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x9b0e
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, %rdi
callq 0x4190
leaq (%rax,%r14), %rdx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xeb7a
leaq 0xde92(%rip), %rsi      # 0x19d33
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x9a9e
movb $0x1, %bpl
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi            # imm = 0x134
callq 0x9594
xorl %ebp, %ebp
leaq 0x18c92(%rip), %rsi     # 0x24b60
leaq 0x6ce3(%rip), %rdx      # 0x12bb8
movq %rbx, %rdi
callq 0x4500
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x4330
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
callq 0x9364
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xaeb4
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf41
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xbf41
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xbf60
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xbf60
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbf6d
movq %rbx, %rdi
callq 0x4270
movq %r14, %rdi
callq 0x4510
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./nlohmann/json.hpp
// Function: nlohmann::detail::input_stream_adapter::~input_stream_adapter()
~input_stream_adapter()
    {
        // clear stream flags; we use underlying streambuf I/O, do not
        // maintain ifstream flags, except eof
        if (is != nullptr)
        {
            is->clear(is->rdstate() & std::ios::eofbit);
        }
    }

// Assembly:
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x1020c
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
andl $0x2, %esi
callq 0x44e0
popq %rax
retq
movq %rax, %rdi
callq 0x6cab
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./nlohmann/json.hpp
// Function: nlohmann::detail::input_stream_adapter::get_character()
std::char_traits<char>::int_type get_character()
    {
        auto res = sb->sbumpc();
        // set eof manually, as we don't use the istream interface.
        if (JSON_HEDLEY_UNLIKELY(res == EOF))
        {
            is->clear(is->rdstate() | std::ios::eofbit);
        }
        return res;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x10f90
movzbl (%rax), %ebp
incq %rax
movq %rax, 0x10(%rdi)
cmpl $-0x1, %ebp
je 0x10f9a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq (%rdi), %rax
callq *0x50(%rax)
movl %eax, %ebp
jmp 0x10f82
movq %rbx, %rdi
callq 0x4701
jmp 0x10f87
// File: /workspace/github_cpp_makefile_star2_O1/ArthoPacini[P]blockchaincpp/./Transaction.hpp
// Function: Transaction::Transaction(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>)
Transaction(nlohmann::json transaction_json)
    {
        this->amount = transaction_json["amount"];
        this->senderKey = transaction_json["senderKey"];
        this->receiverKey = transaction_json["receiverKey"];
        this->timestamp = transaction_json["timestamp"];
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r13
movq %rdi, %r15
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %rbx
leaq 0x38(%rdi), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x48(%rdi), %r12
callq 0x4060
movq %r12, %rdi
movq %rax, %rsi
movq %r14, 0x30(%rsp)
callq 0x4e7e
leaq 0x13e7(%rip), %rsi      # 0x19d0c
movq %r13, %rdi
callq 0xb53e
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x18e10
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r15)
leaq 0x13c7(%rip), %rsi      # 0x19d13
movq %r13, %rdi
callq 0xb53e
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x18bb2
leaq 0x10(%rsp), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x43d0
movq (%rbp), %rdi
leaq 0x20(%rsp), %r14
cmpq %r14, %rdi
je 0x1898c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x138a(%rip), %rsi      # 0x19d1d
movq %r13, %rdi
callq 0xb53e
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x18bb2
leaq 0x10(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x43d0
movq (%rbp), %rdi
cmpq %r14, %rdi
je 0x189ce
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1354(%rip), %rsi      # 0x19d29
movq %r13, %rdi
callq 0xb53e
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x18bb2
leaq 0x10(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x43d0
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x18a0f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
jmp 0x18a44
jmp 0x18a29
jmp 0x18a29
jmp 0x18a29
movq %rax, %r12
movq 0x48(%r15), %rdi
addq $0x58, %r15
cmpq %r15, %rdi
je 0x18a44
movq (%r15), %rsi
incq %rsi
callq 0x4340
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x18a5c
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x18a7b
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq %r12, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O1/divinity76[P]pi_compression/compressor/compressor.cpp
// Function: file_get_contents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static std::string file_get_contents(const std::string &$filename)
{
    std::ostringstream ss;
    std::ifstream ifs($filename,std::ifstream::binary);
    ifs.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
    ss << ifs.rdbuf();
    return ss.str();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x388, %rsp            # imm = 0x388
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x21d0
leaq 0x180(%rsp), %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x2210
movq 0x180(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x180, %rdi            # imm = 0x180
movl $0x5, 0x1c(%rdi)
movl 0x20(%rdi), %esi
callq 0x2220
leaq 0x190(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2040
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2200
leaq 0x180(%rsp), %rdi
callq 0x2060
movq 0x25ef(%rip), %rsi      # 0x4fc8
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x2090
movq %rbx, %rax
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x2a10
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x2060
movq 0x25b1(%rip), %rsi      # 0x4fc8
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2240
nop
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: aes_encrypt_cbc
int aes_encrypt_cbc(const BYTE in[], size_t in_len, BYTE out[], const WORD key[], int keysize, const BYTE iv[])
{
	BYTE buf_in[AES_BLOCK_SIZE], buf_out[AES_BLOCK_SIZE], iv_buf[AES_BLOCK_SIZE];
	int blocks, idx;

	if (in_len % AES_BLOCK_SIZE != 0)
		return(FALSE);

	blocks = in_len / AES_BLOCK_SIZE;

	memcpy(iv_buf, iv, AES_BLOCK_SIZE);

	for (idx = 0; idx < blocks; idx++) {
		memcpy(buf_in, &in[idx * AES_BLOCK_SIZE], AES_BLOCK_SIZE);
		xor_buf(iv_buf, buf_in, AES_BLOCK_SIZE);
		aes_encrypt(buf_in, buf_out, key, keysize);
		memcpy(&out[idx * AES_BLOCK_SIZE], buf_out, AES_BLOCK_SIZE);
		memcpy(iv_buf, buf_out, AES_BLOCK_SIZE);
	}

	return(TRUE);
}

// Assembly:
xorl %eax, %eax
testb $0xf, %sil
je 0x136b
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
shrq $0x4, %rsi
movups (%r9), %xmm0
movaps %xmm0, 0x10(%rsp)
movl $0x1, %eax
testl %esi, %esi
jle 0x140a
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %r13
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movq %rsi, 0x8(%rsp)
movq %rbp, %rbx
shlq $0x4, %rbx
movq %rdi, %r12
movups (%rdi,%rbx), %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %eax, %eax
movb 0x10(%rsp,%rax), %cl
xorb %cl, 0x30(%rsp,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x13ba
leaq 0x30(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x1419
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%r13,%rbx)
movaps 0x20(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
incq %rbp
movq 0x8(%rsp), %rsi
cmpq %rsi, %rbp
movq %r12, %rdi
jne 0x13a5
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: aes_encrypt_cbc_mac
int aes_encrypt_cbc_mac(const BYTE in[], size_t in_len, BYTE out[], const WORD key[], int keysize, const BYTE iv[])
{
	BYTE buf_in[AES_BLOCK_SIZE], buf_out[AES_BLOCK_SIZE], iv_buf[AES_BLOCK_SIZE];
	int blocks, idx;

	if (in_len % AES_BLOCK_SIZE != 0)
		return(FALSE);

	blocks = in_len / AES_BLOCK_SIZE;

	memcpy(iv_buf, iv, AES_BLOCK_SIZE);

	for (idx = 0; idx < blocks; idx++) {
		memcpy(buf_in, &in[idx * AES_BLOCK_SIZE], AES_BLOCK_SIZE);
		xor_buf(iv_buf, buf_in, AES_BLOCK_SIZE);
		aes_encrypt(buf_in, buf_out, key, keysize);
		memcpy(iv_buf, buf_out, AES_BLOCK_SIZE);
		// Do not output all encrypted blocks.
	}

	memcpy(out, buf_out, AES_BLOCK_SIZE);   // Only output the last block.

	return(TRUE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
xorl %eax, %eax
testb $0xf, %r15b
jne 0x1aa8
movq %rdx, 0x8(%rsp)
shrq $0x4, %r15
movups (%r9), %xmm0
movaps %xmm0, 0x10(%rsp)
testl %r15d, %r15d
jle 0x1a96
movl %r8d, %ebp
movq %rcx, %r14
movq %rdi, %r12
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbx
movq %r13, %rax
shlq $0x4, %rax
movups (%r12,%rax), %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %eax, %eax
movb 0x10(%rsp,%rax), %cl
xorb %cl, 0x30(%rsp,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1a61
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1419
movaps 0x20(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
incq %r13
cmpq %r15, %r13
jne 0x1a4e
movaps 0x20(%rsp), %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: aes_decrypt_cbc
int aes_decrypt_cbc(const BYTE in[], size_t in_len, BYTE out[], const WORD key[], int keysize, const BYTE iv[])
{
	BYTE buf_in[AES_BLOCK_SIZE], buf_out[AES_BLOCK_SIZE], iv_buf[AES_BLOCK_SIZE];
	int blocks, idx;

	if (in_len % AES_BLOCK_SIZE != 0)
		return(FALSE);

	blocks = in_len / AES_BLOCK_SIZE;

	memcpy(iv_buf, iv, AES_BLOCK_SIZE);

	for (idx = 0; idx < blocks; idx++) {
		memcpy(buf_in, &in[idx * AES_BLOCK_SIZE], AES_BLOCK_SIZE);
		aes_decrypt(buf_in, buf_out, key, keysize);
		xor_buf(iv_buf, buf_out, AES_BLOCK_SIZE);
		memcpy(&out[idx * AES_BLOCK_SIZE], buf_out, AES_BLOCK_SIZE);
		memcpy(iv_buf, buf_in, AES_BLOCK_SIZE);
	}

	return(TRUE);
}

// Assembly:
xorl %eax, %eax
testb $0xf, %sil
je 0x1ac0
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
shrq $0x4, %rsi
movups (%r9), %xmm0
movaps %xmm0, 0x10(%rsp)
movl $0x1, %eax
testl %esi, %esi
jle 0x1b69
movq %rdx, %r13
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movq %rsi, 0x8(%rsp)
movq %rbp, %rbx
shlq $0x4, %rbx
movq %rdi, %r12
movups (%rdi,%rbx), %xmm0
movaps %xmm0, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rcx, %r15
movq %rcx, %rdx
movl %r8d, %r14d
movl %r8d, %ecx
callq 0x1b78
xorl %eax, %eax
movb 0x10(%rsp,%rax), %cl
xorb %cl, 0x20(%rsp,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1b28
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%r13,%rbx)
movaps 0x30(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
incq %rbp
movq 0x8(%rsp), %rsi
cmpq %rsi, %rbp
movl %r14d, %r8d
movq %r15, %rcx
movq %r12, %rdi
jne 0x1af8
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: increment_iv
void increment_iv(BYTE iv[], int counter_size)
{
	int idx;

	// Use counter_size bytes at the end of the IV as the big-endian integer to increment.
	for (idx = AES_BLOCK_SIZE - 1; idx >= AES_BLOCK_SIZE - counter_size; idx--) {
		iv[idx]++;
		if (iv[idx] != 0 || idx == AES_BLOCK_SIZE - counter_size)
			break;
	}
}

// Assembly:
testl %esi, %esi
jle 0x2195
movl $0x10, %eax
subl %esi, %eax
cltq
movl $0xf, %ecx
incb (%rdi,%rcx)
sete %dl
cmpq %rax, %rcx
jle 0x2195
decq %rcx
testb %dl, %dl
jne 0x2183
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: aes_encrypt_ctr
void aes_encrypt_ctr(const BYTE in[], size_t in_len, BYTE out[], const WORD key[], int keysize, const BYTE iv[])
{
	size_t idx = 0, last_block_length;
	BYTE iv_buf[AES_BLOCK_SIZE], out_buf[AES_BLOCK_SIZE];

	if (in != out)
		memcpy(out, in, in_len);

	memcpy(iv_buf, iv, AES_BLOCK_SIZE);
	last_block_length = in_len - AES_BLOCK_SIZE;

	if (in_len > AES_BLOCK_SIZE) {
		for (idx = 0; idx < last_block_length; idx += AES_BLOCK_SIZE) {
			aes_encrypt(iv_buf, out_buf, key, keysize);
			xor_buf(out_buf, &out[idx], AES_BLOCK_SIZE);
			increment_iv(iv_buf, AES_BLOCK_SIZE);
		}
	}

	aes_encrypt(iv_buf, out_buf, key, keysize);
	xor_buf(out_buf, &out[idx], in_len - idx);   // Use the Most Significant bytes.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
cmpq %rdx, %rdi
je 0x21c6
movq %rdi, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x10e0
movups (%r12), %xmm0
movaps %xmm0, 0x10(%rsp)
cmpq $0x11, %r14
movq %rbx, 0x20(%rsp)
jb 0x222a
leaq -0x10(%r14), %r13
xorl %r12d, %r12d
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x1419
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x21f6
movl $0xf, %eax
incb 0x10(%rsp,%rax)
sete %cl
addq $-0x1, %rax
jae 0x221b
testb %cl, %cl
jne 0x220a
addq $0x10, %r12
addq $0x10, %rbx
cmpq %r13, %r12
jb 0x21e2
jmp 0x222d
xorl %r12d, %r12d
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x1419
subq %r12, %r14
movq 0x20(%rsp), %rdx
je 0x225c
addq %r12, %rdx
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x224e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: aes_key_setup
void aes_key_setup(const BYTE key[], WORD w[], int keysize)
{
	int Nb=4,Nr,Nk,idx;
	WORD temp,Rcon[]={0x01000000,0x02000000,0x04000000,0x08000000,0x10000000,0x20000000,
	                  0x40000000,0x80000000,0x1b000000,0x36000000,0x6c000000,0xd8000000,
	                  0xab000000,0x4d000000,0x9a000000};

	switch (keysize) {
		case 128: Nr = 10; Nk = 4; break;
		case 192: Nr = 12; Nk = 6; break;
		case 256: Nr = 14; Nk = 8; break;
		default: return;
	}

	for (idx=0; idx < Nk; ++idx) {
		w[idx] = ((key[4 * idx]) << 24) | ((key[4 * idx + 1]) << 16) |
				   ((key[4 * idx + 2]) << 8) | ((key[4 * idx + 3]));
	}

	for (idx = Nk; idx < Nb * (Nr+1); ++idx) {
		temp = w[idx - 1];
		if ((idx % Nk) == 0)
			temp = SubWord(KE_ROTWORD(temp)) ^ Rcon[(idx-1)/Nk];
		else if (Nk > 6 && (idx % Nk) == 4)
			temp = SubWord(temp);
		w[idx] = w[idx-Nk] ^ temp;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x80, %edx
je 0x2577
cmpl $0x100, %edx            # imm = 0x100
je 0x2567
cmpl $0xc0, %edx
jne 0x25f9
movl $0x6, %eax
movl $0x34, %r15d
jmp 0x2582
movl $0x8, %eax
movb $0x1, %bpl
movl $0x3c, %r15d
jmp 0x2584
movl $0x4, %eax
movl $0x2c, %r15d
xorl %ebp, %ebp
movl %eax, %r12d
xorl %eax, %eax
movl (%rdi,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r12
jne 0x2589
movl -0x4(%rbx,%r12,4), %edi
xorl %r13d, %r13d
xorb $0x1, %bpl
movq %r12, %r14
movl %r14d, %eax
xorl %edx, %edx
divl %r12d
testl %edx, %edx
je 0x25c8
cmpl $0x4, %edx
setne %al
orb %bpl, %al
jne 0x25e5
callq 0x2a70
movl %eax, %edi
jmp 0x25e5
roll $0x8, %edi
callq 0x2a70
movl %eax, %edi
leal -0x1(%r14), %eax
xorl %edx, %edx
divl %r12d
leaq 0x2b3e(%rip), %rcx      # 0x5120
xorl (%rcx,%rax,4), %edi
xorl (%rbx,%r13), %edi
movl %edi, (%rbx,%r14,4)
incq %r14
addq $0x4, %r13
cmpq %r14, %r15
jne 0x25a8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: ccm_prepare_first_format_blk
void ccm_prepare_first_format_blk(BYTE buf[], int assoc_len, int payload_len, int payload_len_store_size, int mac_len, const BYTE nonce[], int nonce_len)
{
	// Set the flags for the first byte of the first block.
	buf[0] = ((((mac_len - 2) / 2) & 0x07) << 3) | ((payload_len_store_size - 1) & 0x07);
	if (assoc_len > 0)
		buf[0] += 0x40;
	// Format the rest of the first block, storing the nonce and the size of the payload.
	memcpy(&buf[1], nonce, nonce_len);
	memset(&buf[1 + nonce_len], 0, AES_BLOCK_SIZE - 1 - nonce_len);
	buf[15] = payload_len & 0x000000FF;
	buf[14] = (payload_len >> 8) & 0x000000FF;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movslq 0x20(%rsp), %r15
movl %r8d, %eax
addl $-0x2, %eax
shrl $0x1f, %eax
addl %r8d, %eax
addl $-0x2, %eax
andl $0xe, %eax
decl %ecx
andl $0x7, %ecx
leal (%rcx,%rax,4), %eax
leal 0x40(%rax), %ecx
testl %esi, %esi
movzbl %cl, %ecx
cmovlel %eax, %ecx
movb %cl, (%rdi)
incq %rdi
movq %r9, %rsi
movq %r15, %rdx
callq 0x10e0
leaq (%r14,%r15), %rdi
incq %rdi
movl $0xf, %eax
subl %r15d, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x1080
rolw $0x8, %bx
movw %bx, 0xe(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: ccm_format_assoc_data
void ccm_format_assoc_data(BYTE buf[], int *end_of_buf, const BYTE assoc[], int assoc_len)
{
	int pad;

	buf[*end_of_buf + 1] = assoc_len & 0x00FF;
	buf[*end_of_buf] = (assoc_len >> 8) & 0x00FF;
	*end_of_buf += 2;
	memcpy(&buf[*end_of_buf], assoc, assoc_len);
	*end_of_buf += assoc_len;
	pad = AES_BLOCK_SIZE - (*end_of_buf % AES_BLOCK_SIZE); /*BUG?*/
	memset(&buf[*end_of_buf], 0, pad);
	*end_of_buf += pad;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rbp
movslq (%rsi), %rax
movb %cl, 0x1(%rdi,%rax)
movslq (%rsi), %rax
movb %ch, (%rdi,%rax)
movslq (%rsi), %rax
leaq 0x2(%rax), %rsi
movl %esi, (%rbx)
leaq 0x2(%rdi,%rax), %rdi
movslq %ecx, %r14
movq %rdx, %rsi
movq %r14, %rdx
callq 0x10e0
movslq (%rbx), %rdi
addq %r14, %rdi
movl %edi, (%rbx)
leal 0xf(%rdi), %r14d
testl %edi, %edi
cmovnsl %edi, %r14d
andl $-0x10, %r14d
subl %edi, %r14d
addl $0x10, %r14d
addq %rbp, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1080
addl %r14d, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: ccm_format_payload_data
void ccm_format_payload_data(BYTE buf[], int *end_of_buf, const BYTE payload[], int payload_len)
{
	int pad;

	memcpy(&buf[*end_of_buf], payload, payload_len);
	*end_of_buf += payload_len;
	pad = *end_of_buf % AES_BLOCK_SIZE;
	if (pad != 0)
		pad = AES_BLOCK_SIZE - pad;
	memset(&buf[*end_of_buf], 0, pad);
	*end_of_buf += pad;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rsi), %rdi
addq %r14, %rdi
movslq %ecx, %r15
movq %rdx, %rsi
movq %r15, %rdx
callq 0x10e0
movslq (%rbx), %rdi
addq %r15, %rdi
movl %edi, (%rbx)
leal 0xf(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
andl $-0x10, %eax
movl %edi, %ecx
subl %eax, %ecx
movl $0x10, %r15d
subl %ecx, %r15d
testl %ecx, %ecx
cmovel %ecx, %r15d
addq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1080
addl %r15d, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: SubWord
WORD SubWord(WORD word)
{
	unsigned int result;

	result = (int)aes_sbox[(word >> 4) & 0x0000000F][word & 0x0000000F];
	result += (int)aes_sbox[(word >> 12) & 0x0000000F][(word >> 8) & 0x0000000F] << 8;
	result += (int)aes_sbox[(word >> 20) & 0x0000000F][(word >> 16) & 0x0000000F] << 16;
	result += (int)aes_sbox[(word >> 28) & 0x0000000F][(word >> 24) & 0x0000000F] << 24;
	return(result);
}

// Assembly:
movl %edi, %ecx
andl $0xf, %ecx
movl $0xf0, %edx
movl %edi, %esi
andl %edx, %esi
leaq 0x259b(%rip), %rax      # 0x5020
addq %rax, %rsi
movzbl (%rcx,%rsi), %ecx
movl %edi, %esi
shrl $0x8, %esi
movl %esi, %r8d
andl $0xf, %r8d
andl %edx, %esi
addq %rax, %rsi
movzbl (%r8,%rsi), %esi
shll $0x8, %esi
orl %ecx, %esi
movl %edi, %ecx
shrl $0x10, %ecx
movl %ecx, %r8d
andl $0xf, %r8d
andl %edx, %ecx
addq %rax, %rcx
movzbl (%r8,%rcx), %ecx
shll $0x10, %ecx
orl %esi, %ecx
shrl $0x18, %edi
movl %edi, %edx
andl $0xf, %edx
andl $-0x10, %edi
addq %rax, %rdi
movzbl (%rdx,%rdi), %eax
shll $0x18, %eax
orl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./aes/aes.c
// Function: AddRoundKey
void AddRoundKey(BYTE state[][4], const WORD w[])
{
	BYTE subkey[4];

	// memcpy(subkey,&w[idx],4); // Not accurate for big endian machines
	// Subkey 1
	subkey[0] = w[0] >> 24;
	subkey[1] = w[0] >> 16;
	subkey[2] = w[0] >> 8;
	subkey[3] = w[0];
	state[0][0] ^= subkey[0];
	state[1][0] ^= subkey[1];
	state[2][0] ^= subkey[2];
	state[3][0] ^= subkey[3];
	// Subkey 2
	subkey[0] = w[1] >> 24;
	subkey[1] = w[1] >> 16;
	subkey[2] = w[1] >> 8;
	subkey[3] = w[1];
	state[0][1] ^= subkey[0];
	state[1][1] ^= subkey[1];
	state[2][1] ^= subkey[2];
	state[3][1] ^= subkey[3];
	// Subkey 3
	subkey[0] = w[2] >> 24;
	subkey[1] = w[2] >> 16;
	subkey[2] = w[2] >> 8;
	subkey[3] = w[2];
	state[0][2] ^= subkey[0];
	state[1][2] ^= subkey[1];
	state[2][2] ^= subkey[2];
	state[3][2] ^= subkey[3];
	// Subkey 4
	subkey[0] = w[3] >> 24;
	subkey[1] = w[3] >> 16;
	subkey[2] = w[3] >> 8;
	subkey[3] = w[3];
	state[0][3] ^= subkey[0];
	state[1][3] ^= subkey[1];
	state[2][3] ^= subkey[2];
	state[3][3] ^= subkey[3];
}

// Assembly:
movl (%rsi), %eax
movl %eax, %ecx
shrl $0x18, %ecx
movl %eax, %edx
shrl $0x10, %edx
xorb %cl, (%rdi)
movl %eax, %ecx
xorb %dl, 0x4(%rdi)
shrl $0x8, %ecx
xorb %cl, 0x8(%rdi)
xorb %al, 0xc(%rdi)
movl 0x4(%rsi), %eax
movl %eax, %ecx
shrl $0x18, %ecx
movl %eax, %edx
shrl $0x10, %edx
xorb %cl, 0x1(%rdi)
movl %eax, %ecx
xorb %dl, 0x5(%rdi)
shrl $0x8, %ecx
xorb %cl, 0x9(%rdi)
xorb %al, 0xd(%rdi)
movl 0x8(%rsi), %eax
movl %eax, %ecx
shrl $0x18, %ecx
movl %eax, %edx
shrl $0x10, %edx
xorb %cl, 0x2(%rdi)
movl %eax, %ecx
xorb %dl, 0x6(%rdi)
shrl $0x8, %ecx
xorb %cl, 0xa(%rdi)
xorb %al, 0xe(%rdi)
movl 0xc(%rsi), %eax
movl %eax, %ecx
shrl $0x18, %ecx
movl %eax, %edx
shrl $0x10, %edx
xorb %cl, 0x3(%rdi)
movl %eax, %ecx
xorb %dl, 0x7(%rdi)
shrl $0x8, %ecx
xorb %cl, 0xb(%rdi)
xorb %al, 0xf(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./DaviesMeyerHash.h
// Function: DM_Hash::hash(unsigned char const*, unsigned int, unsigned char*)
static bool hash(const uint8_t* input, uint32_t length, uint8_t* output)
   {
      if( (length == 0) || ((length & (HashWordSize-1)) != 0) )
      {
         return false;
      }
      unsigned int schedule[60];
      uint8_t state1[HashWordSize];
      uint8_t state2[HashWordSize];
      uint8_t* stateInPtr  = state1;
      uint8_t* stateOutPtr = state2;
      memset(stateInPtr,0,HashWordSize);
      for(uint32_t i=0; i < length;i += 16)
      {
          aes_key_setup(input+i,
                        schedule, 
                        HashWordSizeBits);

          aes_encrypt(stateInPtr, 
                      stateOutPtr,
                      schedule,  
                      HashWordSizeBits) ;
          uint8_t* temp = stateInPtr;
          stateInPtr = stateOutPtr;
          stateOutPtr = temp;
      }
      memcpy(output,stateInPtr,HashWordSize);//stateInPtr is in fact the output here
      return true;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %esi, %ebx
testl %esi, %esi
setne %cl
testb $0xf, %bl
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x34c5
movq %rdi, %r14
movb %al, -0x29(%rbp)
movq %rdx, -0x38(%rbp)
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r13
movaps %xmm0, (%r13)
leaq -0x50(%rbp), %rax
xorl %r12d, %r12d
movq %r13, %r15
movq %rax, %r13
movl %r12d, %edi
addq %r14, %rdi
leaq -0x150(%rbp), %rsi
movl $0x80, %edx
callq 0x2530
movq %r15, %rdi
movq %r13, %rsi
leaq -0x150(%rbp), %rdx
movl $0x80, %ecx
callq 0x1419
addl $0x10, %r12d
movq %r15, %rax
cmpl %ebx, %r12d
jb 0x3476
movups (%r13), %xmm0
movq -0x38(%rbp), %rax
movups %xmm0, (%rax)
movb -0x29(%rbp), %al
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./Util.h
// Function: Util::dumpHex(unsigned char const*, unsigned int)
static void dumpHex(const uint8_t* buffer,uint32_t length)
  {
     for(uint32_t i=0; i < length; i++)
     {
         uint8_t octet = buffer[i];

         uint8_t nibbleUpper = octet >> 4;
         uint8_t nibbleLower = octet & 0xF;
         printNibble(nibbleUpper);
         printNibble(nibbleLower);
     }
     cout << endl;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
je 0x3517
movq %rdi, %rbx
movl %esi, %r15d
xorl %r12d, %r12d
movzbl (%rbx,%r12), %r14d
movl %r14d, %eax
shrb $0x4, %al
movzbl %al, %edi
callq 0x36d0
andl $0xf, %r14d
movl %r14d, %edi
callq 0x36d0
incq %r12
cmpq %r12, %r15
jne 0x34f0
movq 0x4aba(%rip), %rbx      # 0x7fd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./Protocol.h
// Function: MST_Hash::createAuthPlaintext(unsigned char*, unsigned int, unsigned char**, unsigned int*)
bool createAuthPlaintext(uint8_t* sourcePlaintext,//the plaintext
                            uint32_t length,         //length of plaintext
                            uint8_t** outputBuffer,  //typically a reference to a pointer
                            uint32_t* outputSize)    //typically a reference to a uint32_t 
   {
        if( (length == 0) || (length > (UINT_MAX-32) ) )
        {
          return false;
        }
        if( _outputBufferSize < (length+32) )
        {
           memset(_outputBuffer,0,_outputBufferSize);
           delete[] _outputBuffer;
           
           _outputBufferSize = length + 4 + 32;
           _outputBuffer = new uint8_t[_outputBufferSize];
           if( _outputBuffer == NULL )
           {
              return false;
           }
        }
        Util::int2Octets(length,_outputBuffer);
        memcpy(_outputBuffer+4,sourcePlaintext,length);
        uint32_t pos;
        for( pos = length+4; (pos & 0xF) != 0; pos++)
        {
           _outputBuffer[pos]=0;
        }
         
        if( DM_Hash::hash(_outputBuffer,pos,_outputBuffer+pos) == false)
        {
           return false;
        }
        *outputBuffer = _outputBuffer;
        *outputSize = pos + 16;
        return true;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
leal 0x20(%r14), %eax
cmpl $0x21, %eax
jae 0x356f
xorl %eax, %eax
jmp 0x3616
movq %r8, %rbx
movq %rcx, %r15
movq %rsi, %r13
movq %rdi, %r12
movl 0x8(%rdi), %edx
cmpl %eax, %edx
jae 0x35ad
movq (%r12), %rdi
xorl %esi, %esi
callq 0x1080
movq (%r12), %rdi
testq %rdi, %rdi
je 0x359b
callq 0x1150
leal 0x24(%r14), %edi
movl %edi, 0x8(%r12)
callq 0x1030
movq %rax, (%r12)
movq (%r12), %rax
xorl %ecx, %ecx
movl %r14d, %edx
movb %dl, (%rax,%rcx)
shrl $0x8, %edx
incq %rcx
cmpq $0x4, %rcx
jne 0x35b6
movq (%r12), %rdi
addq $0x4, %rdi
movl %r14d, %edx
movq %r13, %rsi
callq 0x10e0
addl $0x4, %r14d
testb $0xf, %r14b
je 0x35f2
movq (%r12), %rax
movl %r14d, %ecx
movb $0x0, (%rax,%rcx)
incl %r14d
jmp 0x35dc
movq (%r12), %rdi
movl %r14d, %edx
addq %rdi, %rdx
movl %r14d, %esi
callq 0x3432
testb %al, %al
je 0x3616
movq (%r12), %rcx
movq %rcx, (%r15)
addl $0x10, %r14d
movl %r14d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./Protocol.h
// Function: MST_Hash::checkAndExtractPlaintext(unsigned char*, unsigned int, unsigned char**, unsigned int*)
bool checkAndExtractPlaintext(uint8_t*   authPlaintext,   //AuthPlainText PDU
                                 uint32_t   length,          //length of PDU
                                 uint8_t**  plaintext,       //typically a reference to a pointer
                                 uint32_t*  lengthPlaintext )//typically a reference to a uint32_t
   {
      *plaintext = NULL;
      if( length < 32 )
      {
        return false;
      }
      uint8_t computedHash[16];
      if(DM_Hash::hash(authPlaintext,length-16,computedHash) )
      {
         if( memcmp(computedHash,authPlaintext+length-16,16) == 0 )
         {
            Util::octets2Int(authPlaintext,lengthPlaintext);
            if( (*lengthPlaintext) < (length-16) )
            {
               *plaintext = authPlaintext+4;
               return true;
            }            
         }
      } 
      return false;
   }

// Assembly:
movq $0x0, (%rcx)
cmpl $0x20, %edx
jae 0x3635
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %rbx
movl %edx, %r13d
movq %rsi, %r14
leal -0x10(%r13), %r12d
leaq -0x40(%rbp), %rdx
movq %rsi, %rdi
movl %r12d, %esi
callq 0x3432
testb %al, %al
je 0x36be
movl %r13d, %eax
movdqu -0x10(%r14,%rax), %xmm0
pcmpeqb -0x40(%rbp), %xmm0
pmovmskb %xmm0, %ecx
xorl %eax, %eax
cmpl $0xffff, %ecx           # imm = 0xFFFF
jne 0x36c0
movl $0x0, (%r15)
movl $0x3, %ecx
movzbl (%r14,%rcx), %edx
addl %eax, %edx
movl %edx, %eax
shll $0x8, %eax
subq $0x1, %rcx
cmovbl %edx, %eax
movl %eax, (%r15)
cmpq $-0x1, %rcx
jne 0x3692
cmpl %r12d, %eax
jae 0x36be
addq $0x4, %r14
movq %r14, (%rbx)
movb $0x1, %al
jmp 0x36c0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/./Util.h
// Function: Util::printNibble(unsigned char)
static void printNibble(uint8_t value)
  {
      if(value < 10)
      {
        cout << char('0'+value);
      }
      else
      {
        cout << char('A'-10+value);
      }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpb $0x9, %dil
ja 0x36e8
orb $0x30, %dil
leaq -0x1(%rbp), %rsi
jmp 0x36f0
addb $0x37, %dil
leaq -0x2(%rbp), %rsi
movb %dil, (%rsi)
movq 0x48de(%rip), %rdi      # 0x7fd8
movl $0x1, %edx
callq 0x1130
addq $0x10, %rsp
popq %rbp
retq
nop