LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::operator>>(uint256_t const&) const
uint256_t uint256_t::operator>>(const uint256_t & rhs) const{
    const uint128_t shift = rhs.LOWER;
    if (((bool) rhs.UPPER) | (shift >= uint128_256)){
        return uint256_0;
    }
    else if (shift == uint128_128){
        return uint256_t(UPPER);
    }
    else if (shift == uint128_0){
        return *this;
    }
    else if (shift < uint128_128){
        return uint256_t(UPPER >> shift, (UPPER << (uint128_128 - shift)) + (LOWER >> shift));
    }
    else if ((uint128_256 > shift) && (shift > uint128_128)){
        return uint256_t(UPPER >> (shift - uint128_128));
    }
    else{
        return uint256_0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movups (%rdx), %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x10(%rdx), %rdi
callq 0x2592
movl %eax, %ebp
leaq 0x93f2(%rip), %rsi      # 0xd188
movq %r15, %rdi
callq 0x27a8
testb %bpl, %bpl
jne 0x3eed
testb %al, %al
jne 0x3eed
leaq 0x93c2(%rip), %rsi      # 0xd178
movq %rsp, %rdi
callq 0x2744
testb %al, %al
je 0x3ddd
movups 0x10(%r14), %xmm0
movups %xmm0, (%rbx)
leaq 0x4237(%rip), %rax      # 0x8008
movups (%rax), %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x3f02
leaq 0x4224(%rip), %r15      # 0x8008
movq %rsp, %rdi
movq %r15, %rsi
callq 0x2744
testb %al, %al
je 0x3e05
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
jmp 0x3eff
leaq 0x936c(%rip), %rsi      # 0xd178
movq %rsp, %rdi
callq 0x278c
testb %al, %al
je 0x3e90
leaq 0x10(%r14), %r13
movq %rsp, %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2692
movq %rax, %r15
movq %rdx, %r12
leaq 0x9341(%rip), %rdi      # 0xd178
movq %rbp, %rsi
callq 0x2802
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r13, %rdi
callq 0x261c
leaq 0x18(%rsp), %r13
movq %rax, (%r13)
movq %rdx, 0x8(%r13)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x2692
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r13, %rdi
callq 0x27e0
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movq %r12, 0x18(%rbx)
jmp 0x3f02
leaq 0x92f1(%rip), %rdi      # 0xd188
movq %rsp, %rsi
callq 0x2770
testb %al, %al
je 0x3eed
leaq 0x92ce(%rip), %rsi      # 0xd178
movq %rsp, %rdi
callq 0x2770
testb %al, %al
je 0x3eed
addq $0x10, %r14
leaq 0x92b7(%rip), %rsi      # 0xd178
movq %rsp, %rdi
callq 0x2802
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x2692
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movups (%r15), %xmm0
jmp 0x3dd4
movups 0x92b4(%rip), %xmm0     # 0xd1a8
movups %xmm0, 0x10(%rbx)
movups 0x9299(%rip), %xmm0     # 0xd198
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::operator>(uint256_t const&) const
bool uint256_t::operator>(const uint256_t & rhs) const{
    if (UPPER == rhs.UPPER){
        return (LOWER > rhs.LOWER);
    }
    if (UPPER > rhs.UPPER){
        return true;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %r15
leaq 0x10(%rsi), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2744
testb %al, %al
je 0x41e1
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x41e7
movq %r15, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2770
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::bits() const
uint16_t uint256_t::bits() const{
    uint16_t out = 0;
    if (UPPER){
        out = 128;
        uint128_t up = UPPER;
        while (up){
            up >>= uint128_1;
            out++;
        }
    }
    else{
        uint128_t low = LOWER;
        while (low){
            low >>= uint128_1;
            out++;
        }
    }
    return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x2592
testb %al, %al
je 0x4efc
movups (%r14), %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
callq 0x2592
movw $0x80, %bx
testb %al, %al
je 0x4f33
movw $0x80, %bx
leaq 0x313a(%rip), %r14      # 0x8018
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x26f4
incl %ebx
movq %r15, %rdi
callq 0x2592
testb %al, %al
jne 0x4ee1
jmp 0x4f33
movups (%rbx), %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
callq 0x2592
xorl %ebx, %ebx
testb %al, %al
je 0x4f33
leaq 0x3101(%rip), %r14      # 0x8018
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x26f4
incl %ebx
movq %r15, %rdi
callq 0x2592
testb %al, %al
jne 0x4f1a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::export_bits() const
std::vector<uint8_t> uint256_t::export_bits() const {
    std::vector<uint8_t> ret;
    ret.reserve(32);
    UPPER.export_bits(ret);
    LOWER.export_bits(ret);
    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x20, %esi
callq 0x65fc
leaq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x29f4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29f4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5305
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2150
movq %r14, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::export_bits_truncate() const
std::vector<uint8_t> uint256_t::export_bits_truncate() const {
    std::vector<uint8_t> ret = export_bits();

	//prune the zeroes
	int i = 0;
	while (ret[i] == 0 && i < 64) i++;
	ret.erase(ret.begin(), ret.begin() + i);

	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x52aa
movq (%rbx), %rdi
xorl %eax, %eax
leaq 0x1(%rax), %r14
cmpq $0x3f, %rax
ja 0x5332
cmpb $0x0, (%rdi,%rax)
movq %r14, %rax
je 0x531f
cmpq $0x1, %r14
je 0x536c
leaq (%rdi,%r14), %rsi
decq %rsi
movq 0x8(%rbx), %rdx
cmpq %rdx, %rsi
je 0x535a
subq %rdi, %rdx
subq %r14, %rdx
incq %rdx
callq 0x2220
movq 0x8(%rbx), %rsi
movq %rsi, %rax
subq %r14, %rsi
incq %rsi
cmpq %rax, %rsi
je 0x536c
movq %rsi, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: operator<<(std::ostream&, uint256_t const&)
std::ostream & operator<<(std::ostream & stream, const uint256_t & rhs){
    if (stream.flags() & stream.oct){
        stream << rhs.str(8);
    }
    else if (stream.flags() & stream.dec){
        stream << rhs.str(10);
    }
    else if (stream.flags() & stream.hex){
        stream << rhs.str(16);
    }
    return stream;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %eax
testb $0x40, %al
jne 0x60ba
testb $0x2, %al
jne 0x60e8
testb $0x8, %al
je 0x612f
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x5378
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
jmp 0x6114
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x5378
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
jmp 0x6114
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0xa, %edx
callq 0x5378
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2160
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x612f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x613e
jmp 0x613e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x615c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: operator>>(std::istream&, uint256_t&)
std::istream &operator>>(std::istream &stream, uint256_t &rhs)
{
    std::string hexstring;
    stream >> hexstring;
    uint256_t temp = hexstring;
    rhs = std::move(temp);
    return stream;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rsp, %rsi
callq 0x2190
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3588
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x61c7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x61d6
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x61ef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::powmod(uint256_t, uint256_t const&) const
uint256_t uint256_t::powmod(uint256_t power, const uint256_t &modulo) const
{
    uint256_t a = *this;
    uint256_t result = 1;

    while (power)
    {
        if (power & 1)
        {
            // assert(uint256_max / a > result);
            result = result.mulmod(a, modulo);
            // result = result * a % modulo;
        }

        // assert(uint256_max / a > a);
        a = a.mulmod(a, modulo);
        // a = a * a % modulo;
        power >>= 1;
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xb0(%rsp), %r15
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movq $0x1, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0x1dcd(%rip), %rax      # 0x8008
movups (%rax), %xmm0
movups %xmm0, 0x10(%rdi)
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0x25ce
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
callq 0x2592
testb %al, %al
je 0x6379
leaq 0x30(%rsp), %r13
leaq 0x40(%rsp), %rbp
leaq 0x20(%rsp), %r12
movq $0x1, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x25ae
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
leaq 0x1d60(%rip), %rax      # 0x8008
movups (%rax), %xmm0
movups %xmm0, (%r13)
movq %r13, %rdi
movq %r12, %rsi
callq 0x25ce
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %rbp, %rdi
callq 0x2592
testb %al, %al
je 0x6305
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x638c
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdi
leaq 0x50(%rsp), %rsi
movq %rbx, %rdx
callq 0x638c
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movl $0x1, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x668e
leaq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0x25ce
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %r12, %rdi
callq 0x2592
testb %al, %al
jne 0x627a
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::mulmod(uint256_t, uint256_t const&) const
uint256_t uint256_t::mulmod(uint256_t another, const uint256_t &modulo) const
{
    uint256_t result = 0;
    uint256_t a = *this;

    if (a > another)
    {
        uint256_t temp = a;
        a = another;
        another = temp;
    }

    while (a)
    {
        if (a & 1)
        {
            result = result.addmod(another, modulo);
        }

        another = another.addmod(another, modulo);
        a >>= 1;
    }

    // while (another)
    // {
    //     if (another % 2)
    //     {
    //         if (modulo - result < a)
    //         {
    //             // assert(result - (uint256_max - a) == result + a);
    //             result -= modulo - a;
    //         }
    //         else
    //         {
    //             // assert(modulo - result >= a);
    //             result += a;
    //         }
    //     }

    //     if (modulo - a < a)
    //     {
    //         a -= modulo - a;
    //     }
    //     else
    //     {
    //         // assert(uint256_max - a >= a);
    //         a *= 2;
    //     }
        
    //     another /= 2;
    // }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x90(%rsp), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x1c53(%rip), %rax      # 0x8008
movups (%rax), %xmm0
movups %xmm0, 0x10(%rdi)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
leaq 0x30(%rsp), %rdi
movaps %xmm1, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq %r15, %rsi
callq 0x41b4
testb %al, %al
je 0x640a
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movups (%r15), %xmm2
movups 0x10(%r15), %xmm3
movaps %xmm3, 0x40(%rsp)
movaps %xmm2, 0x30(%rsp)
movups %xmm0, (%r15)
movups %xmm1, 0x10(%r15)
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x25ce
movq %rsp, %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
callq 0x2592
testb %al, %al
je 0x6511
leaq 0x30(%rsp), %rbp
leaq 0x20(%rsp), %r12
movq %rsp, %r13
movq $0x1, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x25ae
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
leaq 0x1b9e(%rip), %rax      # 0x8008
movups (%rax), %xmm0
leaq 0x10(%rsp), %rdi
movups %xmm0, (%rdi)
movq %r13, %rsi
callq 0x25ce
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %r12, %rdi
callq 0x2592
testb %al, %al
je 0x64b6
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x6524
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq %r13, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x6524
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movl $0x1, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x668e
leaq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0x25ce
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq %r13, %rdi
callq 0x2592
testb %al, %al
jne 0x643d
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::addmod(uint256_t&, uint256_t const&) const
uint256_t uint256_t::addmod(uint256_t &another, const uint256_t &modulo) const
{
    uint256_t result;

    if (modulo - *this > another)
    {
        result = *this + another;
    }
    else
    {
        result = another - (modulo - *this);
    }

    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r13
movq %r13, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x4448
movq %r13, %rdi
movq %r14, %rsi
callq 0x41b4
testb %al, %al
je 0x656d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4354
jmp 0x658c
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4448
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x4448
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/uint256_t/uint256_t.cpp
// Function: uint256_t::from_bytes(unsigned char const*)
void uint256_t::from_bytes(const uint8_t *const bytes)
{
    uint64_t buffer64[4] = { 0 };
    for (uint8_t i = 0; i < 4; i++)
    {
        uint64_t value = 0;
        for (int8_t j = (i * 8) + 7; j >= (i * 8); j--)
        {
            value <<= 8;
            value |= (uint64_t)bytes[j];
        }

        buffer64[i] = value;
    }

    uint128_t upper(buffer64[3], buffer64[2]), lower(buffer64[1], buffer64[0]);
    UPPER = upper;
    LOWER = lower;
}

// Assembly:
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%rsp)
movaps %xmm0, -0x28(%rsp)
movl $0x8, %eax
xorl %ecx, %ecx
leaq (,%rcx,8), %rdx
movq %rax, %r8
xorl %r9d, %r9d
movq %r9, %r10
shlq $0x8, %r10
movzbl -0x1(%rsi,%r8), %r9d
orq %r10, %r9
decq %r8
cmpq %rdx, %r8
jg 0x65c0
movq %r9, -0x28(%rsp,%rcx,8)
incq %rcx
addq $0x8, %rax
cmpq $0x4, %rcx
jne 0x65b2
movaps -0x18(%rsp), %xmm0
movups %xmm0, 0x10(%rdi)
movaps -0x28(%rsp), %xmm0
movups %xmm0, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sokolcom[P]tp-blockchain-task06/src/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        throw std::invalid_argument("Error!\nInvalid amount of the options!");
        return FAILURE;
    }
    else
    {
        if (!strcmp(argv[1], "split"))
        {
            mode_split();
        }
        else if (!strcmp(argv[1], "recover"))
        {
            mode_recover();
        }
        else
        {
            throw std::invalid_argument("Error!\nUnknown option!");
            return FAILURE;
        }
    }

    return SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jne 0x6749
movq 0x8(%rsi), %rbx
leaq 0x1a25(%rip), %rsi      # 0x8139
movq %rbx, %rdi
callq 0x21b0
testl %eax, %eax
je 0x673a
leaq 0x1a18(%rip), %rsi      # 0x813f
movq %rbx, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x6767
callq 0x67b0
jmp 0x673f
callq 0x73d8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x19b6(%rip), %rsi      # 0x8113
movq %rax, %rdi
callq 0x2280
jmp 0x6783
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x19cc(%rip), %rsi      # 0x8147
movq %rax, %rdi
callq 0x2280
movq 0x6846(%rip), %rsi      # 0xcfd0
movq 0x682f(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x2240
jmp 0x679b
movq %rax, %r14
movq %rbx, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICEMain.cpp
// Function: calc_CDICE(DICE*, DICE*)
void calc_CDICE(DICE *dice1, DICE *dice2)
{
	
  // Run the model over the dice object
  processModel(dice1);
  
  // Make temporary variables to hold the changes in utility
  double dutil_e;
  double dutil_c;
  int i;
  int t;
  int tsub;
  
  // Loop over the available time steps
  for(t=1; t<dice1->config.nPeriods; t++) {
    
    // Reset the temp dice object
    processModel(dice2);
    
    // Increment the consumption at this time step
    dice2->econ.c[t-1] += 1.0;
    
    // Do the post processing of this run
    postProcess(dice2);
    
    // Store the utility from this run
    dutil_c = dice2->econ.utility - dice1->econ.utility;
    
    // Reset the consumption
    dice2->econ.c[t-1] = dice1->econ.c[t-1];        
    
    // Increment the emissions at this time step
    dice2->econ.e[t-1] += 1.0;
    
    // Run the model on the temporary dice object
    for(tsub=t; tsub<dice1->config.nPeriods; tsub++) {
      calcCarb(dice2, tsub);
      if(dice2->ctrl.use_doeclim) {
				doeclim_dice_ts(dice2, tsub);
      }
      else {
				calcClim(dice2, tsub);
      }
      calcEcon(dice2, tsub);
    }
    
    // Do the post processing of this run
    postProcess(dice2);
    
    // Store the utility from this run
    dutil_e = dice2->econ.utility - dice1->econ.utility;
    
    // Calculate the SCC from these differences in utility
    dice1->econ.scc[t-1] = -1000.0 * (dutil_e / dutil_c);
  }
  
  // Delete the temporary DICE object
  //free_CDICE(dice2);
	
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5d2a
cmpl $0x2, (%r14)
jl 0x26f3
movl $0x1, %r15d
movq %rbx, %rdi
callq 0x5d2a
movq 0x308(%rbx), %rax
movsd -0x8(%rax,%r15,8), %xmm0
movsd 0x59fc(%rip), %xmm1     # 0x8008
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rax,%r15,8)
movq %rbx, %rdi
callq 0x5a3f
movsd 0x380(%rbx), %xmm0
subsd 0x380(%r14), %xmm0
movsd %xmm0, (%rsp)
movq 0x308(%r14), %rax
movsd -0x8(%rax,%r15,8), %xmm0
movq 0x308(%rbx), %rax
movsd %xmm0, -0x8(%rax,%r15,8)
movq 0x3b8(%rbx), %rax
movsd -0x8(%rax,%r15,8), %xmm0
addsd 0x59a1(%rip), %xmm0     # 0x8008
movsd %xmm0, -0x8(%rax,%r15,8)
movslq (%r14), %rax
cmpq %rax, %r15
jge 0x26b0
movl %r15d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5382
cmpl $0x0, 0x58(%rbx)
je 0x2695
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7667
jmp 0x269f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x54c9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5598
incl %ebp
cmpl (%r14), %ebp
jl 0x2679
movq %rbx, %rdi
callq 0x5a3f
movsd 0x380(%rbx), %xmm0
subsd 0x380(%r14), %xmm0
divsd (%rsp), %xmm0
mulsd 0x593a(%rip), %xmm0     # 0x8010
movq 0x2b0(%r14), %rax
movsd %xmm0, -0x8(%rax,%r15,8)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x25ee
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICEMain.cpp
// Function: readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
vector< vector<double> > readFile(string filename, int idx1, int idx2)
{
	ifstream inFile;
	inFile.open(filename.c_str());
	
	vector< vector <double> > params;
	vector<double> param_hold;
	string line;
	double p;
	int i=0;
	int j=0;
	
	while(getline(inFile, line))
	{
		param_hold.clear();
		stringstream inFile(line);
		if (i>=idx1)
		{
			if (i<idx2)
			{
				while(inFile >> p)
				{
					param_hold.push_back(p);
				}
				params.push_back(param_hold);
			}
		}
		i++;
	}
	
	return params;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movl %ecx, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x1e0(%rsp), %r15
movq %r15, %rdi
callq 0x21f0
movq (%rbx), %rsi
movq %r15, %rdi
movl $0x8, %edx
callq 0x20f0
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
xorl %r14d, %r14d
movq %r12, (%rsp)
movq %r14, 0x10(%r12)
leaq 0x10(%rsp), %r13
movq %r14, 0x10(%r13)
movaps %xmm0, (%r13)
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %rbx
leaq 0x58(%rsp), %r12
leaq 0x30(%rsp), %rbp
movq 0x1e0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2390
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2863
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x27c8
movq %rax, 0x18(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movl $0x18, %edx
callq 0x22e0
cmpl 0x8(%rsp), %r14d
setl %al
cmpl 0xc(%rsp), %r14d
setge %cl
orb %al, %cl
jne 0x283f
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2833
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2826
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x27ec
movq %r13, %rdi
movq %rbp, %rdx
callq 0x3510
jmp 0x27ec
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x31b6
incl %r14d
movq %r12, %rdi
movq 0x8764(%rip), %rsi      # 0xafb0
callq 0x2130
leaq 0xd8(%rsp), %rdi
callq 0x2090
jmp 0x277e
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x287f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq (%rsp), %rbx
je 0x289a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
leaq 0x1e0(%rsp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2927
jmp 0x28ca
jmp 0x28c5
movq %rax, %rbx
jmp 0x28eb
movq %rax, %rbx
movq 0x86dc(%rip), %rsi      # 0xafb0
leaq 0x58(%rsp), %rdi
callq 0x2130
leaq 0xd8(%rsp), %rdi
callq 0x2090
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x2907
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x291e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq (%rsp), %rdi
callq 0x31e2
leaq 0x1e0(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICEInit.cpp
// Function: allocateLims(DICE*)
void allocateLims(DICE *dice)
{
  dice->lims.k_lo = 1.0;
  dice->lims.mat_lo = 10.0;
  dice->lims.mu_lo = 100.0;
  dice->lims.ml_lo = 1000.0;
  dice->lims.c_lo = 2.0;
  dice->lims.tocean_up = 20.0;
  dice->lims.tocean_lo = -1.0;
  dice->lims.tatm_lo = 0.0;
  dice->lims.tatm_up = 40.0;
  dice->lims.cpc_lo = 0.01;
  dice->lims.y_lo = 0.0;
  dice->lims.ygross_lo = 0.0;
  dice->lims.i_lo = 0.0;
  dice->lims.miu_up = new double[dice->config.nPeriods];	// Upper limit of control policy for each time period

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movaps 0x433d(%rip), %xmm0     # 0x8080
movups %xmm0, 0x4b0(%rdi)
movaps 0x433f(%rip), %xmm0     # 0x8090
movups %xmm0, 0x4c0(%rdi)
movaps 0x4341(%rip), %xmm0     # 0x80a0
movups %xmm0, 0x4d0(%rdi)
movsd 0x4362(%rip), %xmm0     # 0x80d0
movups %xmm0, 0x4e0(%rdi)
movaps 0x4334(%rip), %xmm0     # 0x80b0
movups %xmm0, 0x4f0(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x500(%rdi)
movq $0x0, 0x510(%rdi)
movslq (%rdi), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x528(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICEInit.cpp
// Function: allocateDICE(DICE*)
void allocateDICE(DICE *dice)
{
	allocateCtrl(dice);
	allocateConfig(dice);
	allocateCarb(dice);
	allocateEcon(dice);
	allocateDvars(dice);
	allocateLims(dice);
	allocateClim(dice);
	
	if(dice->ctrl.use_doeclim == 1) {	
  	doeclim_load_calibration(dice, dice->config.n_calpoints);
  }

	return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x58(%rdi)
callq 0x3838
movq %rbx, %rdi
callq 0x3887
movq %rbx, %rdi
callq 0x3a78
movslq (%rbx), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %r14
cmovnsq %rcx, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x48(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x50(%rbx)
movq %rbx, %rdi
callq 0x3d38
movq %rbx, %rdi
callq 0x3927
cmpl $0x1, 0x58(%rbx)
jne 0x468e
movl 0x30(%rbx), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x79a1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE.cpp
// Function: calcCarb1(DICE*)
void calcCarb1(DICE *dice)
{

  Carb *carb = &dice->carb;
  Lims *lims = &dice->lims;
  
  // Carbon pools
  carb->mat[0] = carb->mat0;
  if(carb->mat[0] < lims->mat_lo) {
    carb->mat[0] = lims->mat_lo;
  }
  
  carb->mu[0] = carb->mu0;
  if(carb->mu[0] < lims->mu_lo) {
    carb->mu[0] = lims->mu_lo;
  }

  carb->ml[0] = carb->ml0;
  if(carb->ml[0] < lims->ml_lo) {
    carb->ml[0] = lims->ml_lo;
  }

  // Radiative forcing
  carb->forc[0] = carb->fco22x*(log(carb->mat[0]/588.000)/log(2.0))+carb->forcoth[0];
  
  return;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movsd 0x3e0(%rdi), %xmm1
movq 0x478(%rdi), %rax
movsd %xmm1, (%rax)
movsd 0x4b8(%rdi), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4f14
movsd %xmm0, (%rax)
movsd 0x3e8(%rbx), %xmm1
movq 0x480(%rbx), %rcx
movsd %xmm1, (%rcx)
movsd 0x4c0(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4f39
movsd %xmm0, (%rcx)
movsd 0x3f0(%rbx), %xmm1
movq 0x488(%rbx), %rcx
movsd %xmm1, (%rcx)
movsd 0x4c8(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4f5e
movsd %xmm0, (%rcx)
movsd 0x448(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rax), %xmm0
divsd 0x3180(%rip), %xmm0     # 0x80f8
callq 0x2170
divsd 0x317b(%rip), %xmm0     # 0x8100
mulsd 0x8(%rsp), %xmm0
movq 0x468(%rbx), %rax
movq 0x470(%rbx), %rcx
addsd (%rax), %xmm0
movsd %xmm0, (%rcx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE.cpp
// Function: calcClim1(DICE*)
void calcClim1(DICE *dice)
{
  Clim *clim = &dice->clim;
  Lims *lims = &dice->lims;

  // Atmospheric temperature
  clim->tatm[0] = clim->tatm0;
  if(clim->tatm[0] < lims->tatm_lo) {
    clim->tatm[0] = lims->tatm_lo;
  }
  if(clim->tatm[0] > lims->tatm_up) {
    clim->tatm[0] = lims->tatm_up;
  }
  
  // Oceanic temperature
  clim->tocean[0] = clim->tocean0;
  if(clim->tocean[0] < lims->tocean_lo) {
    clim->tocean[0] = lims->tocean_lo;
  }
  if(clim->tocean[0] > lims->tocean_up) {
    clim->tocean[0] = lims->tocean_up;
  }
  
  return;
}

// Assembly:
movsd 0x70(%rdi), %xmm0
movq 0x128(%rdi), %rax
movsd %xmm0, (%rax)
movsd 0x4e8(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x4fcd
movsd %xmm1, (%rax)
movapd %xmm1, %xmm0
movsd 0x4f0(%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4fdf
movsd %xmm1, (%rax)
movsd 0x68(%rdi), %xmm0
movq 0x130(%rdi), %rax
movsd %xmm0, (%rax)
movsd 0x4e0(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5005
movsd %xmm1, (%rax)
movapd %xmm1, %xmm0
movsd 0x4d8(%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5017
movsd %xmm1, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE.cpp
// Function: calcCarb(DICE*, int)
void calcCarb(DICE *dice, int t)
{

  Econ *econ = &dice->econ;
  Carb *carb = &dice->carb;
  Lims *lims = &dice->lims;
  
  // Carbon pools (carbon cycle box model)
  carb->mat[t] = (econ->e[t-1]*(5.0/3.666))+carb->b11*carb->mat[t-1]+carb->b21*carb->mu[t-1];
  if(carb->mat[t] < lims->mat_lo) {
    carb->mat[t] = lims->mat_lo;
  }

  carb->mu[t] = carb->b12*carb->mat[t-1]+carb->b22*carb->mu[t-1]+carb->b32*carb->ml[t-1];
  if(carb->mu[t] < lims->mu_lo) {
    carb->mu[t] = lims->mu_lo;
  }
  carb->ml[t] = carb->b33*carb->ml[t-1]+carb->b23*carb->mu[t-1];
  if(carb->ml[t] < lims->ml_lo) {
    carb->ml[t] = lims->ml_lo;
  }
  
  // Radiatice forcing
  carb->forc[t] = carb->fco22x*(log(carb->mat[t]/588.000)/log(2.0))+carb->forcoth[t];
  
  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x3b8(%rdi), %rax
movslq %esi, %r14
leaq -0x1(%r14), %rcx
movsd -0x8(%rax,%r14,8), %xmm1
movq 0x478(%rdi), %rax
movsd -0x8(%rax,%r14,8), %xmm0
movsd 0x420(%rdi), %xmm2
mulsd %xmm0, %xmm2
mulsd 0x2d28(%rip), %xmm1     # 0x80e8
addsd %xmm2, %xmm1
movsd 0x428(%rdi), %xmm2
movq 0x480(%rdi), %rdx
mulsd -0x8(%rdx,%r14,8), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, (%rax,%r14,8)
movsd 0x4b8(%rdi), %xmm1
ucomisd %xmm2, %xmm1
jbe 0x53f8
movsd %xmm1, (%rax,%r14,8)
movsd (%rdx,%rcx,8), %xmm1
movsd 0x430(%rbx), %xmm2
mulsd %xmm1, %xmm2
mulsd 0x410(%rbx), %xmm0
addsd %xmm2, %xmm0
movsd 0x438(%rbx), %xmm2
movq 0x488(%rbx), %rsi
mulsd (%rsi,%rcx,8), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, (%rdx,%r14,8)
movsd 0x4c0(%rbx), %xmm0
ucomisd %xmm2, %xmm0
jbe 0x5447
movsd %xmm0, (%rdx,%r14,8)
mulsd 0x418(%rbx), %xmm1
movsd 0x440(%rbx), %xmm2
mulsd (%rsi,%rcx,8), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, (%rsi,%r14,8)
movsd 0x4c8(%rbx), %xmm0
ucomisd %xmm2, %xmm0
jbe 0x547a
movsd %xmm0, (%rsi,%r14,8)
movsd 0x448(%rbx), %xmm0
movsd %xmm0, (%rsp)
movsd (%rax,%r14,8), %xmm0
divsd 0x2c63(%rip), %xmm0     # 0x80f8
callq 0x2170
divsd 0x2c5e(%rip), %xmm0     # 0x8100
mulsd (%rsp), %xmm0
movq 0x468(%rbx), %rax
movq 0x470(%rbx), %rcx
addsd (%rax,%r14,8), %xmm0
movsd %xmm0, (%rcx,%r14,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE.cpp
// Function: calcClim(DICE*, int)
void calcClim(DICE *dice, int t)
{

  Config *config = &dice->config;
  Econ *econ = &dice->econ;
  Carb *carb = &dice->carb;
  Clim *clim = &dice->clim;
  Dvars *dvars = &dice->dvars;
  Ctrl *ctrl = &dice->ctrl;
  Lims *lims = &dice->lims;

  clim->tatm[t] = clim->tatm[t-1]+clim->c1*((carb->forc[t]-((carb->fco22x/clim->t2xco2)*clim->tatm[t-1]))-(clim->c3*(clim->tatm[t-1]-clim->tocean[t-1])));
  if(clim->tatm[t] < lims->tatm_lo) {
    clim->tatm[t] = lims->tatm_lo;
  }
  if(clim->tatm[t] > lims->tatm_up) {
    clim->tatm[t] = lims->tatm_up;
  }

  clim->tocean[t] = clim->tocean[t-1]+clim->c4*(clim->tatm[t-1]-clim->tocean[t-1]);
  if(clim->tocean[t] < lims->tocean_lo) {
    clim->tocean[t] = lims->tocean_lo;
  }
  if(clim->tocean[t] > lims->tocean_up) {
    clim->tocean[t] = lims->tocean_up;
  }

  return;
}

// Assembly:
movq 0x128(%rdi), %rdx
movq 0x130(%rdi), %rax
movslq %esi, %rcx
movsd -0x8(%rdx,%rcx,8), %xmm0
movq 0x470(%rdi), %rsi
movsd 0x448(%rdi), %xmm2
divsd 0x60(%rdi), %xmm2
movsd (%rsi,%rcx,8), %xmm1
mulsd %xmm0, %xmm2
subsd %xmm2, %xmm1
movapd %xmm0, %xmm2
subsd -0x8(%rax,%rcx,8), %xmm2
mulsd 0x80(%rdi), %xmm2
subsd %xmm2, %xmm1
mulsd 0x78(%rdi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rcx,8)
movsd 0x4e8(%rdi), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x553c
movsd %xmm2, (%rdx,%rcx,8)
movapd %xmm2, %xmm1
leaq -0x1(%rcx), %rsi
movsd 0x4f0(%rdi), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x5553
movsd %xmm2, (%rdx,%rcx,8)
movsd (%rax,%rsi,8), %xmm1
subsd %xmm1, %xmm0
mulsd 0x88(%rdi), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x4e0(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5584
movsd %xmm1, (%rax,%rcx,8)
movapd %xmm1, %xmm0
movsd 0x4d8(%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5597
movsd %xmm1, (%rax,%rcx,8)
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE.cpp
// Function: processModel(DICE*)
void processModel(DICE *dice)
{
	
  // Calculate exogenous time series
  calcExog(dice);
  
   // Calculate the first time step of carbon model
  calcCarb1(dice);

  // Calculate the first time step of climate model
  if(dice->ctrl.use_doeclim == 1) {
    doeclim_hindcast(dice);
  }
  else {
    calcClim1(dice);
  }
  
  // Calculate the first time step of economic model
  calcEcon1(dice);
  
  // Calculate the rest of the time series
  for (int tIndex=1; tIndex<dice->config.nPeriods; tIndex++)
    {
      calcCarb(dice, tIndex);

      if(dice->ctrl.use_doeclim == 1) {
				doeclim_dice_ts(dice, tIndex);
    	}
      else {
				calcClim(dice, tIndex);
      }

      calcEcon(dice, tIndex);
    }
  
  // Do the post-processing
  postProcess(dice);
  
  return;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4ae8
movq %rbx, %rdi
callq 0x4ee7
cmpl $0x1, 0x58(%rbx)
jne 0x5d4d
movq %rbx, %rdi
callq 0x753f
jmp 0x5d55
movq %rbx, %rdi
callq 0x4fa7
movq %rbx, %rdi
callq 0x5018
cmpl $0x2, (%rbx)
jl 0x5d9d
movl $0x1, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5382
cmpl $0x1, 0x58(%rbx)
jne 0x5d83
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7667
jmp 0x5d8d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x54c9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5598
incl %ebp
cmpl (%rbx), %ebp
jl 0x5d67
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5a3f
nop
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE_doeclim.cpp
// Function: count_lines(char const*, int*)
void count_lines(const char *filename, int *numlines)
{
	int ch;	
	*numlines = 0;
	FILE * fp = fopen(filename, "r");
	
	do {
		ch = fgetc(fp);
		if(ch == '\n') { *numlines = *numlines + 1; }
	} while (ch != EOF);

//	if(ch != '\n' && *numlines != 0) 
//    *numlines = *numlines + 1;

	fclose(fp);
	
	return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x0, (%rsi)
leaq 0x24d0(%rip), %rsi      # 0x8290
callq 0x2220
movq %rax, %r14
movq %r14, %rdi
callq 0x22c0
cmpl $0xa, %eax
je 0x5ddc
cmpl $-0x1, %eax
jne 0x5dc8
jmp 0x5de0
incl (%rbx)
jmp 0x5dc8
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE_doeclim.cpp
// Function: invert_1d_2x2_matrix(double*, double*)
void invert_1d_2x2_matrix(double * x, double * y)
{
  double temp_d = (x[0]*x[3] - x[1]*x[2]);
  if(temp_d == 0) {
    fprintf(stderr, "Matrix inversion divide by zero. Aborting...\n");
    exit(EXIT_FAILURE);
  }
  double temp = 1/temp_d;
  y[0] = temp * x[3];
  y[1] = temp * -1 * x[1];
  y[2] = temp * -1 * x[2];
  y[3] = temp * x[0];

  return;
}

// Assembly:
movsd 0x10(%rdi), %xmm2
movsd 0x18(%rdi), %xmm0
mulsd 0x8(%rdi), %xmm2
movsd (%rdi), %xmm1
mulsd %xmm0, %xmm1
subsd %xmm2, %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x5e16
jnp 0x5e58
movsd 0x21ea(%rip), %xmm2     # 0x8008
divsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, (%rsi)
movapd 0x230e(%rip), %xmm0     # 0x8140
xorpd %xmm2, %xmm0
movsd 0x8(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsi)
mulsd 0x10(%rdi), %xmm0
movsd %xmm0, 0x10(%rsi)
mulsd (%rdi), %xmm2
movsd %xmm2, 0x18(%rsi)
retq
pushq %rax
callq 0x2413
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE_doeclim.cpp
// Function: doeclim_load_hind_forc(DICE*)
void doeclim_load_hind_forc(DICE *dice)
{

  FILE * fp;
  fp = fopen("./giss_forc_component_1900_2015_extrap.txt", "r");

  int counter = 0;
  float temp_forc;
	float yr, ghg, o3, sh2o, refa, aie, bc, snow, stra, solar, land;
  while(!feof(fp)) {
    if (fscanf(fp, "%g %g %g %g %g %g %g %g %g %g %g", &yr, &ghg, &o3, &sh2o, &refa, &aie, &bc, &snow, &stra, &solar, &land) != 11) { break; }

    temp_forc = ghg + o3 + sh2o + stra + solar + land + (dice->clim.alpha * (refa + aie + bc + snow));

    dice->clim.forc[counter] = double(temp_forc);
    counter++;
    if (counter >= dice->config.hind_ns) {
      break;
    }
  }
  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0xa3c(%rip), %rdi       # 0x82c0
leaq 0xa05(%rip), %rsi       # 0x8290
callq 0x2220
movq %rax, %r14
leaq 0x30(%rsp), %r13
leaq 0x2c(%rsp), %rbp
leaq 0x28(%rsp), %r15
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x798a
subq $0x8, %rsp
movq %r14, %rdi
leaq 0xa28(%rip), %rsi       # 0x82eb
leaq 0x3c(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %r15, %r9
xorl %eax, %eax
leaq 0x14(%rsp), %r10
pushq %r10
leaq 0x20(%rsp), %r10
pushq %r10
leaq 0x2c(%rsp), %r10
pushq %r10
leaq 0x38(%rsp), %r10
pushq %r10
leaq 0x44(%rsp), %r10
pushq %r10
leaq 0x50(%rsp), %r10
pushq %r10
leaq 0x5c(%rsp), %r10
pushq %r10
callq 0x2380
addq $0x40, %rsp
cmpl $0xb, %eax
jne 0x798a
movss 0x30(%rsp), %xmm0
addss 0x2c(%rsp), %xmm0
addss 0x28(%rsp), %xmm0
addss 0x14(%rsp), %xmm0
addss 0x10(%rsp), %xmm0
addss 0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movss 0x24(%rsp), %xmm1
addss 0x20(%rsp), %xmm1
addss 0x1c(%rsp), %xmm1
addss 0x18(%rsp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd 0xa8(%rbx), %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq 0xb0(%rbx), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x20(%rbx), %rax
cmpq %rax, %r12
jl 0x78a5
movq %r14, %rdi
callq 0x21c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE_doeclim.cpp
// Function: doeclim_load_calibration(DICE*, int)
void doeclim_load_calibration(DICE *dice, int n)
{
	// Calibration file name
	const char calfile[] = "calibration_results.txt";
	
	// Open the file and read in the calibration data
	FILE * fp;
  fp = fopen(calfile, "r");

  int counter = 0;
  float this_cs, this_kv, this_alpha;
  while(!feof(fp)) {
    if (fscanf(fp, "%g %g %g", &this_cs, &this_kv, &this_alpha) != 3) {
      break;
    }
    dice->clim.cs_cal[counter] = this_cs;
    dice->clim.kv_cal[counter] = this_kv;
    dice->clim.alpha_cal[counter] = this_alpha;
    counter++;
    if (counter >= n) {
      break;
    }
  }
  fclose(fp);
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x955(%rip), %rdi       # 0x8310
leaq 0x8ce(%rip), %rsi       # 0x8290
callq 0x2220
movq %rax, %r14
cmpl $0x2, %ebp
movl $0x1, %r15d
cmovgel %ebp, %r15d
leaq 0x10(%rsp), %r13
leaq 0xc(%rsp), %rbp
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x7a5b
movq %r14, %rdi
leaq 0x909(%rip), %rsi       # 0x8303
leaq 0x14(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x2380
cmpl $0x3, %eax
jne 0x7a5b
xorps %xmm0, %xmm0
cvtss2sd 0x14(%rsp), %xmm0
movq 0x178(%rbx), %rax
movsd %xmm0, (%rax,%r12,8)
xorps %xmm0, %xmm0
cvtss2sd 0x10(%rsp), %xmm0
movq 0x180(%rbx), %rax
movsd %xmm0, (%rax,%r12,8)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movq 0x188(%rbx), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x79e4
movq %r14, %rdi
callq 0x21c0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/JRLamontagne[P]cdice_sa/CDICE_doeclim.cpp
// Function: apply_calibration(DICE*, double)
void apply_calibration(DICE *dice, double this_cs)
{
	// Loop iterator
	int i;
	
	// Setup variables to find the bounds around a particular cs
	int ihigh = 0;
	int ilow = 0;
	double diffh = 999.9;
	double diffl = -999.9;
	double this_diff = 0.0;
	double cs_range = 0.0;
	double cs_diff = 0.0;
		
	// Loop through the calibration data
	for(i=0; i<dice->config.n_calpoints; i++) {

		// Find the difference between this_cs and the calibration point
		this_diff = dice->clim.cs_cal[i] - this_cs;
		
		// If this is an exact match, set the kv and alpha values and return
		if(this_diff == 0.0) {
			ilow = i;
			ihigh = i;
			break;
		}
		
		// Otherwise, test this index as a bound
		if(this_diff >= 0.0 && this_diff < diffh) {
			ihigh = i;
			diffh = this_diff;
			}
		else if(this_diff <= 0.0 && this_diff > diffl) {
			ilow = i;
			diffl = this_diff;
		}	
	}
	
	// Now that we have the bounds, calculate the kv and alpha values
	// through a simple linear-interpolation between the bound points
	if(ilow == ihigh) {
		dice->clim.kappa = dice->clim.kv_cal[ilow];
		dice->clim.alpha = dice->clim.alpha_cal[ilow];
	}
	else {
		cs_range = dice->clim.cs_cal[ihigh] - dice->clim.cs_cal[ilow];
		cs_diff = this_cs - dice->clim.cs_cal[ilow];
		dice->clim.kappa = ((cs_diff/cs_range) * (dice->clim.kv_cal[ihigh] - dice->clim.kv_cal[ilow])) + dice->clim.kv_cal[ilow];
		dice->clim.alpha = ((cs_diff/cs_range) * (dice->clim.alpha_cal[ihigh] - dice->clim.alpha_cal[ilow])) + dice->clim.alpha_cal[ilow];
	}

	return;
}

// Assembly:
movslq 0x30(%rdi), %rax
testq %rax, %rax
jle 0x7b4d
movq 0x178(%rdi), %rsi
xorl %ecx, %ecx
movsd 0x790(%rip), %xmm2      # 0x8220
movsd 0x790(%rip), %xmm3      # 0x8228
xorpd %xmm1, %xmm1
xorl %r8d, %r8d
xorl %edx, %edx
movsd (%rsi,%rcx,8), %xmm4
subsd %xmm0, %xmm4
ucomisd %xmm1, %xmm4
jne 0x7ab6
jnp 0x7b51
jb 0x7ac6
ucomisd %xmm4, %xmm2
jbe 0x7ac6
movl %ecx, %edx
movapd %xmm4, %xmm2
jmp 0x7ad9
ucomisd %xmm4, %xmm1
jb 0x7ad9
ucomisd %xmm3, %xmm4
jbe 0x7ad9
movl %ecx, %r8d
movapd %xmm4, %xmm3
incq %rcx
cmpq %rcx, %rax
jne 0x7aa1
cmpl %edx, %r8d
je 0x7b53
movslq %edx, %rax
movq 0x178(%rdi), %rcx
movq 0x180(%rdi), %rdx
movsd (%rcx,%rax,8), %xmm1
movslq %r8d, %rsi
movsd (%rcx,%rsi,8), %xmm2
subsd %xmm2, %xmm1
subsd %xmm2, %xmm0
divsd %xmm1, %xmm0
movsd (%rdx,%rax,8), %xmm1
movsd (%rdx,%rsi,8), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0xa0(%rdi)
movq 0x188(%rdi), %rcx
movsd (%rcx,%rax,8), %xmm1
movsd (%rcx,%rsi,8), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
jmp 0x7b76
xorl %edx, %edx
jmp 0x7b53
movl %ecx, %edx
movslq %edx, %rax
movq 0x180(%rdi), %rcx
movq 0x188(%rdi), %rdx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0xa0(%rdi)
movsd (%rdx,%rax,8), %xmm1
movsd %xmm1, 0xa8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/FreeSlave[P]def2fgd/src/main.cpp
// Function: globMatch(char const*, char const*)
static bool globMatch(const char *str, const char *wild) {
    const char *tail = 0;
    const char* afterStar = 0;

    while (*str != '\0' && *wild != '*') {
        if (*wild == *str || *wild == '?') {
            wild++;
            str++;
        } else {
            return false;
        }
    }

    while (*str != '\0') {
        if (*wild == '*') {
            ++wild;
            if (*wild == '\0') {
                return true;
            }
            afterStar = wild;
            tail = str+1;
        } else if (*wild == *str || *wild == '?') {
            wild++;
            str++;
        } else {
            wild = afterStar;
            str = tail++;
        }
    }

    while (*wild == '*') {
        wild++;
    }
    return *wild == '\0';
}

// Assembly:
movb (%rdi), %dl
testb %dl, %dl
je 0x4aec
movb (%rsi), %al
cmpb $0x2a, %al
je 0x4aa3
cmpb %dl, %al
setne %cl
cmpb $0x3f, %al
setne %al
testb %al, %cl
jne 0x4afb
incq %rsi
movb 0x1(%rdi), %dl
incq %rdi
jmp 0x4a80
xorl %eax, %eax
xorl %ecx, %ecx
movb (%rsi), %r8b
cmpb $0x2a, %r8b
jne 0x4ac2
cmpb $0x0, 0x1(%rsi)
je 0x4afe
incq %rsi
leaq 0x1(%rdi), %rcx
movq %rsi, %rax
jmp 0x4ae6
cmpb %dl, %r8b
setne %dl
cmpb $0x3f, %r8b
setne %r8b
testb %r8b, %dl
jne 0x4add
incq %rsi
incq %rdi
jmp 0x4ae6
movq %rcx, %rdi
incq %rcx
movq %rax, %rsi
movb (%rdi), %dl
testb %dl, %dl
jne 0x4aa7
movb (%rsi), %al
incq %rsi
cmpb $0x2a, %al
je 0x4aec
testb %al, %al
sete %al
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/FreeSlave[P]def2fgd/src/main.cpp
// Function: printHelp(char const*)
void printHelp(const char* programName)
{
    printf( translate("Usage: %s [options] [input-file] [output-file]\n"
            "\n"
            "  -format format       specify format of input: def or ent\n"
            "\n"
            "  -offset-glob pattern add offset to entities matching given pattern;\n"
            "                       this option can be passed multiple times\n"
            "  -noauto-offset-glob  don't use default patterns when setting offset\n"
            "\n"
            "  -bob                 same as -bobparms \"180 8 0\"\n"
            "  -bobparms \"x y z\"    set bob parameters\n"
            "  -bob-glob pattern    add bobparms to entities matching given pattern;\n"
            "                       this option can be passed multiple times\n"
            "  -noauto-bob-glob     don't use default patterns when setting bobparms\n"
            "\n"
            "  -help                display this help and exit\n"
            "  -version             show version information and exit\n"
            "  -- [arguments...]    treat the rest of arguments as positional arguments\n"
            "\n"
            "When input-file is omitted or -, read standard input.\n"
            "When output-file is omitted or -, write to standard output.\n").c_str()
    , programName);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x66e7(%rip), %rsi      # 0xb1f9
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xaed9
movq (%r14), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3060
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4b46
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/FreeSlave[P]def2fgd/src/entity.cpp
// Function: Entity::hasKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool Entity::hasKey(const std::string& name) const
{
    for (size_t i=0; i<keys.size(); ++i)
    {
        if (keys[i].name == name) {
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x40(%rdi), %r15
movq 0x48(%rdi), %rax
subq %r15, %rax
je 0x83a8
sarq $0x5, %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
movq (%rsi), %rax
movq %rax, (%rsp)
xorl %r13d, %r13d
cmpq $0x1, %r12
sbbq %r12, %r13
movq 0x8(%rsi), %r14
addq $0x8, %r15
movb $0x1, %bpl
movl $0x1, %ebx
cmpq %r14, (%r15)
jne 0x838b
testq %r14, %r14
je 0x83aa
movq -0x8(%r15), %rdi
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x3270
testl %eax, %eax
je 0x83aa
cmpq %r12, %rbx
setb %bpl
leaq (%rbx,%r13), %rax
incq %rax
incq %rbx
addq $0x60, %r15
cmpq $0x1, %rax
jne 0x836d
jmp 0x83aa
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq