LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/avg_price.cc
// Function: main
int main() 
{
	// iterators that can read and write Sales_items
	istream_iterator<Sales_item> item_iter(cin), eof;
	ostream_iterator<Sales_item> out_iter(cout, "\n");

	// store the first transaction in sum and read the next record
	Sales_item sum = *item_iter++; 

	while (item_iter != eof) {
		// if the current transaction (which is in item_iter) 
		// has the same ISBN
	    if (item_iter->isbn() == sum.isbn())
	        sum += *item_iter++; // add it to sum 
		                         // and read the next transaction
	    else {
	        out_iter = sum;      // write the current sum
	        sum = *item_iter++;  // read the next transaction
	    }
	}
	out_iter = sum;  // remember to print the last set of records

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq 0x2ba4(%rip), %rsi      # 0x3fe0
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
callq 0x1680
leaq -0x118(%rbp), %rax
xorpd %xmm0, %xmm0
movapd %xmm0, -0x18(%rax)
movapd %xmm0, 0x8(%rax)
movapd %xmm0, -0x8(%rax)
movq %rax, -0x10(%rax)
andq $0x0, 0x18(%rax)
movb $0x0, 0x20(%rax)
movq 0x2b57(%rip), %rax      # 0x3fd0
movq %rax, -0x38(%rbp)
leaq 0xb82(%rip), %rax       # 0x2006
movq %rax, -0x30(%rbp)
leaq -0xa8(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x16ca
leaq -0xa0(%rbp), %r14
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x163c
movq %r14, %rdi
callq 0x1040
leaq -0xa0(%rbp), %r15
leaq -0xa8(%rbp), %r13
leaq -0x150(%rbp), %rbx
leaq -0x68(%rbp), %r12
movb -0xb0(%rbp), %al
cmpb -0xf8(%rbp), %al
jne 0x14f7
testb %al, %al
je 0x15a0
movq -0xe8(%rbp), %rax
cmpq -0x130(%rbp), %rax
je 0x15a0
movq %r13, %rdi
leaq -0xe0(%rbp), %rsi
callq 0x10d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x10d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1703
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1040
movq %r13, %rdi
callq 0x1040
testb %r14b, %r14b
je 0x156b
movq %r13, %rdi
leaq -0xe8(%rbp), %rsi
xorl %edx, %edx
callq 0x16ca
movl -0x80(%rbp), %eax
addl %eax, -0x48(%rbp)
movsd -0x78(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x1040
jmp 0x14cd
leaq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x1726
movq %r13, %rdi
leaq -0xe8(%rbp), %rsi
xorl %edx, %edx
callq 0x16ca
movq %r12, %rdi
movq %r15, %rsi
callq 0x1752
movq %r15, %rdi
callq 0x1040
jmp 0x14cd
leaq -0x38(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1726
leaq -0x68(%rbp), %rdi
callq 0x1040
leaq -0x128(%rbp), %rdi
callq 0x1040
leaq -0xe0(%rbp), %rdi
callq 0x1040
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15ff
movq %rax, %rbx
movq %r14, %rdi
jmp 0x1617
movq %rax, %rbx
jmp 0x161c
jmp 0x15ff
movq %rax, %rbx
movq %r15, %rdi
jmp 0x160e
jmp 0x15ff
jmp 0x15ff
movq %rax, %rbx
jmp 0x1613
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x1040
leaq -0x68(%rbp), %rdi
callq 0x1040
leaq -0x128(%rbp), %rdi
callq 0x1040
leaq -0xe0(%rbp), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O2/brianwu02[P]ImageProcessing/median.cpp
// Function: main
int main(int argc, char** argv) {
    
    int sz, avg_nbrs;
    imageP I1, I2, paddedImg;
   
    cout << "in      : " << argv[1] << endl;
    cout << "sz      : " << argv[2] << endl;
    cout << "avg_nbrs: " << argv[3] << endl;
    cout << "out     : " << argv[4] << endl;
    
    sz = atoi(argv[2]);
    avg_nbrs = atoi(argv[3]);
    
    if ((sz & 1) == 0) {
        cerr << "sz is must be an odd number." << endl;
        exit(1);
    }

    if (sz != 3) {
        cerr << "sz only working for 3, as requested. exiting." << endl;
        exit(1);
    }

    if (avg_nbrs > sz) {
        cerr << "average number cannot be larger than sz, at least i dont think it can" << endl;
        exit(1);
    }

    I1 = IP_readImage(argv[1]);

    I2 = NEWIMAGE;
    paddedImg = NEWIMAGE;

    padImage(I1, sz, paddedImg);
    median(I1, paddedImg, sz, avg_nbrs, I2);

    //IP_saveImage(paddedImg, argv[4]);
    IP_saveImage(I2, argv[4]);
    IP_freeImage(I1);
    IP_freeImage(I2);
    IP_freeImage(paddedImg);
    return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x3ccf(%rip), %r14      # 0x4fd0
leaq 0x1d2c(%rip), %rsi      # 0x3034
movq %r14, %rdi
callq 0x10a0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x10a0
movq %rax, %rdi
callq 0x1060
leaq 0x1d14(%rip), %rsi      # 0x303f
movq %r14, %rdi
callq 0x10a0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x10a0
movq %rax, %rdi
callq 0x1060
leaq 0x1cfc(%rip), %rsi      # 0x304a
movq %r14, %rdi
callq 0x10a0
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x10a0
movq %rax, %rdi
callq 0x1060
leaq 0x1ce4(%rip), %rsi      # 0x3055
movq %r14, %rdi
callq 0x10a0
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x10a0
movq %rax, %rdi
callq 0x1060
movq 0x10(%rbx), %rdi
callq 0x1140
movl %eax, %r14d
movq 0x18(%rbx), %rdi
callq 0x1140
testb $0x1, %r14b
je 0x1441
cmpl $0x3, %r14d
jne 0x1451
movl %eax, %ebp
cmpl $0x4, %eax
jge 0x1461
movq 0x8(%rbx), %rdi
callq 0x1f40
movq %rax, %r14
pushq $0x10
popq %r12
movq %r12, %rdi
callq 0x1100
movq %rax, %r15
movq %r12, %rdi
callq 0x1100
movq %rax, %r12
pushq $0x3
popq %r13
movq %r14, %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x1484
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %ebp, %ecx
movq %r15, %r8
callq 0x179d
movq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x210a
movq %r14, %rdi
callq 0x220b
movq %r15, %rdi
callq 0x220b
movq %r12, %rdi
callq 0x220b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3ba8(%rip), %rdi      # 0x4ff0
leaq 0x1c11(%rip), %rsi      # 0x3060
jmp 0x146f
movq 0x3b98(%rip), %rdi      # 0x4ff0
leaq 0x1c1e(%rip), %rsi      # 0x307d
jmp 0x146f
movq 0x3b88(%rip), %rdi      # 0x4ff0
leaq 0x1c3c(%rip), %rsi      # 0x30ab
callq 0x10a0
movq %rax, %rdi
callq 0x1060
pushq $0x1
popq %rdi
callq 0x10d0
// File: /workspace/github_cpp_makefile_star2_O2/IshaySela[P]ChaCha20/src/ChaCha.cpp
// Function: ChaCha::ChaCha20::QuerterRound(int&, int&, int&, int&)
void ChaCha20::QuerterRound(int &a, int &b, int &c, int &d)
    {
        a += b;
        d ^= a;
        d = ROTL(d, 16);
        c += d;
        b ^= c;
        b = ROTL(b, 12);
        a += b;
        d ^= a;
        d = ROTL(d, 8);
        c += d;
        b ^= c;
        b = ROTL(b, 7);
    }

// Assembly:
movl (%rsi), %eax
addl (%rdx), %eax
movl %eax, (%rsi)
xorl (%r8), %eax
movl %eax, %edi
shll $0x10, %edi
sarl $0x10, %eax
orl %edi, %eax
movl %eax, (%r8)
addl (%rcx), %eax
movl %eax, (%rcx)
xorl (%rdx), %eax
movl %eax, %edi
shll $0xc, %edi
sarl $0x14, %eax
orl %edi, %eax
movl %eax, (%rdx)
addl (%rsi), %eax
movl %eax, (%rsi)
xorl (%r8), %eax
movl %eax, %esi
shll $0x8, %esi
sarl $0x18, %eax
orl %esi, %eax
movl %eax, (%r8)
addl (%rcx), %eax
movl %eax, (%rcx)
xorl (%rdx), %eax
movl %eax, %ecx
shll $0x7, %ecx
sarl $0x19, %eax
orl %ecx, %eax
movl %eax, (%rdx)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IshaySela[P]ChaCha20/src/ChaCha.cpp
// Function: ChaCha::ChaCha20::EncryptData(char const*, unsigned long, long long, std::optional<std::vector<long long, std::allocator<long long>>*>)
std::unique_ptr<char> ChaCha20::EncryptData(const char *data, size_t size, long long startPosition, std::optional<std::vector<long long> *> nonces)
    {
        // Create the encrypted buffer with the padding.
        char *encrypted = new char[size];

        int blocksCount = std::ceil((float)size / BLOCK_SIZE_BYTES);
        std::default_random_engine generator;
        std::uniform_int_distribution<long long> distribution(LONG_LONG_MIN, LONG_LONG_MAX);

        for (int i = 0; i < blocksCount; i++)
        {
            long long nonce = nonces.has_value() ? distribution(generator) : 0;

            auto key = this->GenerateKeyBlock(++startPosition, nonce);

            // Encrypt the block
            for (int j = 0; j < BLOCK_SIZE_BYTES && i * BLOCK_SIZE_BYTES + j < size; j++)
            {
                encrypted[i * BLOCK_SIZE_BYTES + j] = data[i * BLOCK_SIZE_BYTES + j] ^ key.data()[j];
            }

            if (nonces.has_value())
                nonces.value()->push_back(nonce);
        }

        return std::unique_ptr<char>(encrypted);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq %rcx, %rdi
callq 0x1030
movq %rax, %rbp
testq %r14, %r14
js 0x14ae
cvtsi2ss %r14, %xmm0
jmp 0x14c6
movq %r14, %rax
shrq %rax
movl %r14d, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
mulss 0xb52(%rip), %xmm0      # 0x2020
callq 0x10a0
cvttss2si %xmm0, %edx
leaq 0x30(%rsp), %rax
movq $0x1, (%rax)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x1(%rax), %rcx
leaq 0x38(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
xorl %r13d, %r13d
testl %edx, %edx
cmovlel %r13d, %edx
movq %rdx, 0x20(%rsp)
xorl %r15d, %r15d
cmpq 0x20(%rsp), %r15
je 0x15ba
leaq 0xa0(%rsp), %rax
cmpb $0x1, 0x8(%rax)
jne 0x153b
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x16d8
movq %rax, %rcx
jmp 0x153d
xorl %ecx, %ecx
movq %rcx, 0x28(%rsp)
movq 0x8(%rsp), %rdx
incq %rdx
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %rdx, 0x8(%rsp)
callq 0x12b2
movq %r13, %rax
pushq $0x20
popq %rdx
subq $0x1, %rdx
jb 0x1586
cmpq %r14, %rax
jae 0x1586
movb (%rbx), %sil
xorb (%r12,%rax), %sil
movb %sil, (%rbp,%rax)
incq %rbx
incq %rax
jmp 0x1567
leaq 0xa0(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x15ae
leaq 0xa0(%rsp), %rdi
callq 0x16e0
movq (%rax), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16f0
incq %r15
addq $0x20, %r13
jmp 0x150e
movq 0x10(%rsp), %rax
movq %rbp, (%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IshaySela[P]ChaCha20/src/ChaCha.cpp
// Function: ChaCha::ChaCha20::DecryptData(char const*, unsigned long, long long, std::optional<std::vector<long long, std::allocator<long long>>*>)
std::unique_ptr<char> ChaCha20::DecryptData(const char *data, size_t size, long long startPosition, std::optional<std::vector<long long> *> nonces)
    {
        auto decrypted = new char[size];
        int blocksCount = std::ceil((float)size / BLOCK_SIZE_BYTES);

        for (int i = 0; i < blocksCount; i++)
        {
            long long nonce = nonces.has_value() ? nonces.value()->at(i) : 0;

            auto key = this->GenerateKeyBlock(++startPosition, nonce);

            for (int j = 0; j < BLOCK_SIZE_BYTES && i * BLOCK_SIZE_BYTES + j < size; j++)
            {
                decrypted[i * BLOCK_SIZE_BYTES + j] = data[i * BLOCK_SIZE_BYTES + j] ^ key.data()[j];
            }
        }

        return std::unique_ptr<char>(decrypted);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq %rcx, %rdi
callq 0x1030
movq %rax, %rbp
testq %r14, %r14
js 0x160c
cvtsi2ss %r14, %xmm0
jmp 0x1624
movq %r14, %rax
shrq %rax
movl %r14d, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
mulss 0x9f4(%rip), %xmm0      # 0x2020
callq 0x10a0
cvttss2si %xmm0, %eax
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
cmpq 0x20(%rsp), %r13
je 0x16bf
leaq 0x80(%rsp), %rdi
cmpb $0x1, 0x8(%rdi)
jne 0x1670
callq 0x16e0
movq (%rax), %rdi
movq %r13, %rsi
callq 0x1710
movq (%rax), %rcx
jmp 0x1672
xorl %ecx, %ecx
movq 0x8(%rsp), %rdx
incq %rdx
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %rdx, 0x8(%rsp)
callq 0x12b2
movq %r15, %rax
pushq $0x20
popq %rdx
subq $0x1, %rdx
jb 0x16b6
cmpq %r14, %rax
jae 0x16b6
movb (%rbx), %sil
xorb (%r12,%rax), %sil
movb %sil, (%rbp,%rax)
incq %rbx
incq %rax
jmp 0x1697
incq %r13
addq $0x20, %r15
jmp 0x1646
movq 0x10(%rsp), %rax
movq %rbp, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IshaySela[P]ChaCha20/src/Source.cpp
// Function: main
int main()
{
    ChaCha::Key256 key = {1,2,3,4,5,6,7,8};
    char buffer[] = "Hello, World!";
    std::vector<long long> nonces;

    ChaCha::ChaCha20 encrytpor(key);
    auto cipher = encrytpor.EncryptData(buffer, sizeof(buffer), 0, &nonces);
    auto recoverd = encrytpor.DecryptData(cipher.get(), sizeof(buffer), 0, &nonces);

    std::cout << recoverd.get() << std::endl;
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movabsq $0x21646c726f5720, %rax # imm = 0x21646C726F5720
movq %rax, 0x36(%rsp)
movabsq $0x57202c6f6c6c6548, %rax # imm = 0x57202C6F6C6C6548
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
movups 0x68d(%rip), %xmm0      # 0x20c8
movups %xmm0, 0x10(%rsp)
movups 0x671(%rip), %xmm0      # 0x20b8
movups %xmm0, (%rsp)
leaq 0x7c(%rsp), %rdi
pushq $0xa
popq %rsi
callq 0x129c
leaq 0x40(%rsp), %rbx
movq %rbx, 0x68(%rsp)
movb $0x1, 0x70(%rsp)
movups 0x68(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
leaq 0x30(%rsp), %rdx
pushq $0xe
popq %rcx
xorl %r8d, %r8d
callq 0x1474
movq 0x28(%rsp), %rdx
movq %rbx, 0x58(%rsp)
movb $0x1, 0x60(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
pushq $0xe
popq %rcx
xorl %r8d, %r8d
callq 0x15d2
movq 0x20(%rsp), %rsi
movq 0x250d(%rip), %rdi      # 0x3fd0
callq 0x10d0
movq %rax, %rdi
callq 0x1070
leaq 0x20(%rsp), %rdi
callq 0x1b46
leaq 0x28(%rsp), %rdi
callq 0x1b46
leaq 0x7c(%rsp), %rdi
callq 0x16d6
leaq 0x40(%rsp), %rdi
callq 0x1b6c
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
retq
movq %rax, %rbx
jmp 0x1b1f
movq %rax, %rbx
jmp 0x1b29
movq %rax, %rbx
jmp 0x1b33
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1b46
leaq 0x28(%rsp), %rdi
callq 0x1b46
leaq 0x7c(%rsp), %rdi
callq 0x16d6
leaq 0x40(%rsp), %rdi
callq 0x1b6c
movq %rbx, %rdi
callq 0x1140
nop
// File: /workspace/github_cpp_makefile_star2_O2/porzell[P]PTest/examples/with_test_fixture.cpp
// Function: main
int main() {
    // Pick an individual test to run.
    bool success = PTest::PTestRegistry::Get().RunTest("MyTestFixture.FailTest");
    // Or run them all!
    return PTest::PTestRegistry::Get().RunAllTests();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
callq 0x26e4
movq %rax, %rbx
leaq 0x1abc(%rip), %rsi      # 0x40a9
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x2080
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a0
leaq -0x38(%rbp), %rdi
callq 0x20b0
callq 0x26e4
movq %rax, %rdi
callq 0x2a00
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/porzell[P]PTest/examples/../include/ptest.hpp
// Function: PTest::PTestRegistrar::PTestRegistrar(char const*, char const*, PTest::PTestFixture*)
PTestRegistrar(const char* testName, const char* fixtureName, PTestFixture* fixture) {
			SetConsoleColor(PColor::Blue);
			printf("Found test %s.%s...\n", fixtureName, testName);
			SetConsoleColor(PColor::Normal);
			PTestRegistry::Get().AddTest(std::move(PTest(testName, fixtureName, fixture)));
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x19e6(%rip), %rdi      # 0x4043
xorl %eax, %eax
callq 0x2030
leaq 0x1a55(%rip), %rdi      # 0x40c0
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2030
leaq 0x19ca(%rip), %rdi      # 0x4049
xorl %eax, %eax
callq 0x2030
callq 0x26e4
movq %rax, %r12
leaq -0xa0(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2dc2
movq %r12, %rdi
movq %r13, %rsi
callq 0x2c6a
leaq -0xa0(%rbp), %rdi
callq 0x2e26
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x2e26
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/porzell[P]PTest/examples/../include/ptest.hpp
// Function: PTest::PTestRegistry::RunTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool RunTest(std::string testName) {
			auto it = testMap_.find(testName);
			if (it == testMap_.end()) {
				SetConsoleColor(PColor::Red);
				printf("[TEST \"%s\" NOT FOUND!]\n", testName.c_str());
				SetConsoleColor(PColor::Normal);
				return false;
			}

			currentTest_ = &it->second;

			return it->second.Run();
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2f14
testq %rax, %rax
je 0x29cb
addq $0x28, %rax
movq %rax, 0x50(%r14)
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3c60
leaq 0x1665(%rip), %rdi      # 0x4037
xorl %eax, %eax
callq 0x2030
movq (%rbx), %rsi
leaq 0x183b(%rip), %rdi      # 0x421e
xorl %eax, %eax
callq 0x2030
leaq 0x1658(%rip), %rdi      # 0x4049
xorl %eax, %eax
callq 0x2030
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Danis98[P]PietGen/main.cpp
// Function: main
int main(int argc, char **argv){
	if(argc!=2)
		fatal("Select one input file");
	
	std::ifstream in_file(argv[1]);
	std::stringstream ss;
	ss<<in_file.rdbuf();
	std::string char_stream=ss.str();
	
	lex(char_stream);
	parse();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
cmpl $0x2, %edi
jne 0x2591
movq 0x8(%rsi), %rsi
leaq -0x3f8(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x2260
leaq -0x1f0(%rbp), %rdi
callq 0x2110
leaq -0x1e0(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x2060
leaq -0x1d8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2210
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x21d0
leaq -0x28(%rbp), %rdi
callq 0x260c
leaq -0x28(%rbp), %rdi
callq 0x20d0
callq 0x398e
leaq -0x48(%rbp), %rdi
callq 0x20d0
leaq -0x1f0(%rbp), %rdi
callq 0x2120
leaq -0x3f8(%rbp), %rdi
callq 0x2070
xorl %eax, %eax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %rbp
retq
leaq 0x2a75(%rip), %rsi      # 0x500d
leaq -0x68(%rbp), %rdi
leaq -0x3f8(%rbp), %rdx
callq 0x20a0
leaq -0x68(%rbp), %rdi
callq 0x24ac
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x20d0
jmp 0x2602
movq %rax, %rbx
jmp 0x2602
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x20d0
jmp 0x25e1
jmp 0x25d4
movq %rax, %rbx
jmp 0x25ea
movq %rax, %rbx
jmp 0x25f6
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20d0
leaq -0x1f0(%rbp), %rdi
callq 0x2120
leaq -0x3f8(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/Danis98[P]PietGen/lex.cpp
// Function: lex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void lex(std::string stream){
	token tok="";
	for(int i=0;i<stream.length();i++){
		if(stream[i]==' ' || stream[i]=='\t' || stream[i]=='\n'){
			if(tok.length()) tokens.push_back(tok);
			tok="";
		}
		else
			tok+=stream[i];
	}
	tokens.push_back("$");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x2b52(%rip), %r14      # 0x5179
leaq -0x70(%rbp), %r15
leaq -0x50(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x20a0
xorl %r13d, %r13d
movabsq $0x100000600, %r12      # imm = 0x100000600
cmpq %r13, 0x8(%rbx)
jbe 0x2694
movq (%rbx), %rax
movzbl (%rax,%r13), %eax
cmpq $0x20, %rax
ja 0x2684
btq %rax, %r12
jae 0x2684
cmpq $0x0, -0x68(%rbp)
je 0x2677
leaq 0x5b01(%rip), %rdi      # 0x8170
movq %r15, %rsi
callq 0x272a
movq %r15, %rdi
movq %r14, %rsi
callq 0x2280
jmp 0x268f
movsbl %al, %esi
movq %r15, %rdi
callq 0x2140
incq %r13
jmp 0x2647
leaq 0x2988(%rip), %rsi      # 0x5023
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x20a0
leaq 0x5ac1(%rip), %rdi      # 0x8170
leaq -0x50(%rbp), %rsi
callq 0x2996
leaq -0x50(%rbp), %rdi
callq 0x20d0
leaq -0x70(%rbp), %rdi
callq 0x20d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20d0
jmp 0x26ec
jmp 0x26e9
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/Danis98[P]PietGen/parse.cpp
// Function: to_num(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int to_num(token t){
	int n=0;
	for(int i=0;i<t.length();i++){
		if(t[i]<'0' || t[i]>'9') return -1;
		n*=10;
		n+=t[i]-'0';
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpq %rdx, %rcx
jbe 0x2fa5
movq (%rdi), %r8
movzbl (%r8,%rdx), %r8d
leal -0x3a(%r8), %r9d
cmpb $-0xa, %r9b
jb 0x2fa3
imull $0xa, %eax, %eax
addl %r8d, %eax
addl $-0x30, %eax
incq %rdx
jmp 0x2f7e
movl %esi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Danis98[P]PietGen/parse.cpp
// Function: keyword_to_str[abi:cxx11](Keywords_enum)
std::string keyword_to_str(Keyword k){
	switch(k){
	#define o(id, val, num) case id: return val;
		LEX_LIST
	#undef o
	default: return "INVALID KEYWORD";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
decl %esi
cmpl $0x14, %esi
ja 0x30ca
leaq 0x201b(%rip), %rax      # 0x5040
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x206f(%rip), %rsi      # 0x50a4
jmp 0x3107
leaq 0x20b1(%rip), %rsi      # 0x50f2
jmp 0x3107
leaq 0x209d(%rip), %rsi      # 0x50ea
jmp 0x3107
leaq 0x207e(%rip), %rsi      # 0x50d7
jmp 0x3107
leaq 0x2051(%rip), %rsi      # 0x50b6
jmp 0x3107
leaq 0x206e(%rip), %rsi      # 0x50df
jmp 0x3107
leaq 0x204e(%rip), %rsi      # 0x50cb
jmp 0x3107
leaq 0x2024(%rip), %rsi      # 0x50ad
jmp 0x3107
leaq 0x205d(%rip), %rsi      # 0x50ef
jmp 0x3107
leaq 0x2017(%rip), %rsi      # 0x50b2
jmp 0x3107
leaq 0x201f(%rip), %rsi      # 0x50c3
jmp 0x3107
leaq 0x1ffc(%rip), %rsi      # 0x50a9
jmp 0x3107
leaq 0x2040(%rip), %rsi      # 0x50f6
jmp 0x3107
leaq 0x1f64(%rip), %rsi      # 0x5023
jmp 0x3107
leaq 0x1ff2(%rip), %rsi      # 0x50ba
jmp 0x3107
leaq 0x2033(%rip), %rsi      # 0x5104
jmp 0x3107
leaq 0x200c(%rip), %rsi      # 0x50e6
jmp 0x3107
leaq 0x1fdb(%rip), %rsi      # 0x50be
jmp 0x3107
leaq 0x200e(%rip), %rsi      # 0x50fa
jmp 0x3107
leaq 0x1fda(%rip), %rsi      # 0x50cf
jmp 0x3107
leaq 0x1fc9(%rip), %rsi      # 0x50c7
jmp 0x3107
leaq 0x1ff8(%rip), %rsi      # 0x50ff
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Danis98[P]PietGen/parse.cpp
// Function: parse_stmt_list()
void parse_stmt_list(){
	token t=peek();
	if(keyword_map[t]==TOK_EOS
		|| keyword_map[t]==TOK_END) return;
	if(keyword_map[t]==TOK_END 
		|| keyword_map[t]==TOK_INT 
		|| keyword_map[t]==TOK_CHAR) 
		parse_error("Wrong token: "+t);
	else parse_stmt();
	parse_stmt_list();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
callq 0x2fa7
leaq 0x499d(%rip), %rdi      # 0x81b0
movq %rbx, %rsi
callq 0x3a38
cmpl $0x15, (%rax)
je 0x387e
leaq 0x4989(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x2, (%rax)
je 0x387e
leaq 0x4974(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x2, (%rax)
je 0x388e
leaq 0x495f(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x12, (%rax)
je 0x388e
leaq 0x494a(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x13, (%rax)
je 0x388e
callq 0x334d
callq 0x37f7
leaq -0x28(%rbp), %rdi
callq 0x20d0
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0x19bd(%rip), %rsi      # 0x5252
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x3b14
leaq -0x48(%rbp), %rdi
callq 0x2a88
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20d0
jmp 0x38bc
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/Danis98[P]PietGen/parse.cpp
// Function: parse_prog()
void parse_prog(){
	token t=peek();
	if(keyword_map[t]==TOK_EOS) return;
	if(keyword_map[t]==TOK_END 
		|| keyword_map[t]==TOK_INT 
		|| keyword_map[t]==TOK_CHAR) 
		parse_error("Wrong token: "+t);
	else parse_stmt_list();
	
	print_ast();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
callq 0x2fa7
leaq 0x48c7(%rip), %rdi      # 0x81b0
movq %rbx, %rsi
callq 0x3a38
cmpl $0x15, (%rax)
je 0x393f
leaq 0x48b3(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x2, (%rax)
je 0x394f
leaq 0x489e(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x12, (%rax)
je 0x394f
leaq 0x4889(%rip), %rdi      # 0x81b0
leaq -0x28(%rbp), %rsi
callq 0x3a38
cmpl $0x13, (%rax)
je 0x394f
callq 0x37f7
callq 0x311d
leaq -0x28(%rbp), %rdi
callq 0x20d0
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0x18fc(%rip), %rsi      # 0x5252
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x3b14
leaq -0x48(%rbp), %rdi
callq 0x2a88
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20d0
jmp 0x397d
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: zalloc
void* zalloc(int size)
{
	void* p = malloc(size);
	if (!p)
	{
		printf("out of memory!\r\n");
		exit(1);
	}
	memset(p,0,size);
	return p;
}

// Assembly:
pushq %rax
movslq %edi, %rsi
pushq $0x1
popq %rdi
callq 0x21e0
testq %rax, %rax
je 0x24f7
popq %rcx
retq
leaq 0xefde(%rip), %rdi      # 0x114dc
callq 0x20d0
pushq $0x1
popq %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_remove
void item_remove(item* i)
{
	item** child;
	item* p = i->parent;
	for (child = p->child;child != p->childend;++child)
		if (*child == i)
		{
			memmove(child,child+1,(p->childend-child-1)*sizeof(item*));
			--p->childend;
			break;
		}

	i->parent = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x18(%r14), %rcx
movq 0x20(%r14), %rax
movq %rax, %rdx
subq %rcx, %rdx
cmpq %rax, %rcx
je 0x258d
leaq 0x8(%rcx), %rsi
addq $-0x8, %rdx
cmpq %rbx, (%rcx)
movq %rsi, %rcx
jne 0x256a
leaq -0x8(%rsi), %rdi
callq 0x22c0
addq $-0x8, 0x20(%r14)
andq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_add
void item_add(item* p,item* child)
{
	if (!child)
		return;

	if (child->parent)
		item_remove(child);

	if (p->childalloc == p->childend)
	{
		intptr_t count = p->childend - p->child;
		intptr_t alloc = count+16;
		p->child = (item**)realloc(p->child,sizeof(item*)*alloc);
		if (!p->child)
		{
			printf("out of memory!\r\n");
			exit(1);
		}
		p->childend = p->child+count;
		p->childalloc = p->child+alloc;
	}
	*(p->childend++) = child;
	child->parent = p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x260e
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x10(%rsi)
je 0x25bc
movq %rbx, %rdi
callq 0x2551
movq 0x20(%r14), %rax
movq 0x28(%r14), %r15
cmpq %rax, %r15
jne 0x25ff
movq 0x18(%r14), %rdi
subq %rdi, %r15
movq %r15, %r12
sarq $0x3, %r12
leaq 0x80(,%r12,8), %rsi
callq 0x22a0
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x261a
addq $0x10, %r12
addq %rax, %r15
leaq (%rax,%r12,8), %rax
movq %rax, 0x28(%r14)
movq %r15, %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x20(%r14)
movq %rbx, (%rax)
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xeebb(%rip), %rdi      # 0x114dc
callq 0x20d0
pushq $0x1
popq %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_find
item* item_find(const item* parent,const char* value)
{
	if (parent)
	{
		item** child;
		for (child = parent->child;child != parent->childend;++child)
			if (stricmp((*child)->value,value)==0)
				return *child;
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2663
movq %rsi, %rbx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0x2663
movq (%r15), %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2070
addq $0x8, %r15
testl %eax, %eax
jne 0x2646
jmp 0x2666
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_get
item* item_get(item* parent,const char* value,int defined)
{
	item* p = item_find(parent,value);
	if (!p)
	{
		p = (item*)zalloc(sizeof(item));
		if (value)
			p->value = strdup(value);
		if (parent)
			item_add(parent,p);
	}
	if (defined)
		p->flags |= FLAG_DEFINED;
	return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r15
callq 0x262e
movq %rax, %r14
testq %rax, %rax
jne 0x26ea
pushq $0x38
popq %rdi
callq 0x24e4
movq %rax, %r14
testq %r12, %r12
je 0x26da
movq %r12, %rdi
callq 0x2340
movq %rax, (%r14)
testq %r15, %r15
je 0x26ea
movq %r15, %rdi
movq %r14, %rsi
callq 0x259a
testl %ebx, %ebx
je 0x26f3
orb $0x20, 0x30(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: getvalue
item* getvalue(item* p)
{
	if (p)
	{
		item** child;
		for (child=p->child;child!=p->childend;++child)
			if (!((*child)->flags & FLAG_REMOVED))
				return *child;
	}
	return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x272e
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %rdx
cmpq %rdx, %rcx
je 0x272e
movq (%rcx), %rax
addq $0x8, %rcx
testb $0x40, 0x30(%rax)
jne 0x271b
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: setvalue
void setvalue(item* p,const char* value)
{
    item* v = getvalue(p);
    if (v)
    {
        if (strcmp(v->value,value)==0)
            return;
        v->flags |= FLAG_REMOVED;
    }
    item_get(p,value,1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x270e
testq %rax, %rax
je 0x275d
movq %rax, %r15
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x21f0
testl %eax, %eax
je 0x2770
orb $0x40, 0x30(%r15)
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x26a2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: compare_use
int compare_use(const item* a, const item* b)
{
	item* refa = findref(a);
	item* refb = findref(b);
	if (refa && refb)
	{
		size_t i;
		item* use;

		use = item_get(refb,"use",0);
		for (i=0;i<item_childcount(use);++i)
			if (refa == findref(use->child[i]))
			{
				use = item_get(refa,"use",0);
				for (i=0;i<item_childcount(use);++i)
					if (refb == findref(use->child[i]))
					{
						// circular reference
						return compare_name(refa,refb);
					}

				return 1;
			}

	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
callq 0x2776
movq %rax, %rbx
movq %r14, %rdi
callq 0x2776
movq %rax, %r14
testq %rbx, %rbx
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x2a5b
leaq 0xd71c(%rip), %rsi      # 0x100dc
xorl %r12d, %r12d
movq %r14, %rdi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r15
testq %r15, %r15
je 0x29e3
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0x29e5
xorl %eax, %eax
cmpq %rax, %r12
jae 0x2a5b
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x2776
incq %r12
cmpq %rax, %rbx
jne 0x29d0
leaq 0xd6d6(%rip), %rsi      # 0x100dc
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r15
pushq $0x1
popq %rbp
testq %r15, %r15
je 0x2a2c
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0x2a2e
xorl %eax, %eax
cmpq %rax, %r12
jae 0x2a5d
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x2776
incq %r12
cmpq %rax, %r14
jne 0x2a19
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2675
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: precompare_use
int precompare_use(const item* refa, const item* refb)
{
	size_t i;
	item* use;

	use = item_get((item*)refb,"use",0);
	for (i=0;i<item_childcount(use);++i)
		if (refa == findref(use->child[i]))
		{
			use = item_get((item*)refa,"use",0);
			for (i=0;i<item_childcount(use);++i)
				if (refb == findref(use->child[i]))
				{
					// circular reference
					return compare_name(refa,refb);
				}

			return 1;
		}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xd65f(%rip), %rsi      # 0x100dc
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r15
testq %r15, %r15
je 0x2aa0
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0x2aa2
xorl %eax, %eax
cmpq %rax, %r12
jae 0x2b18
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x2776
incq %r12
cmpq %r14, %rax
jne 0x2a8d
leaq 0xd619(%rip), %rsi      # 0x100dc
xorl %r12d, %r12d
movq %r14, %rdi
xorl %edx, %edx
callq 0x26a2
movq %rax, %r15
pushq $0x1
popq %rbp
testq %r15, %r15
je 0x2ae9
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x3, %rax
jmp 0x2aeb
xorl %eax, %eax
cmpq %rax, %r12
jae 0x2b1a
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x2776
incq %r12
cmpq %rbx, %rax
jne 0x2ad6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2675
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_sort
void item_sort(item* p,int(*compare)(const item*, const item*))
{
	if (item_childcount(p)>=2)
	{
		int changed;
		do
		{
			size_t i,j,n=item_childcount(p);
            changed=0;

			for (i=0;i<n;++i)
                for (j=i+1;j<n;++j)
                    if (compare(p->child[i],p->child[j]))
				    {
					    item* tmp = p->child[i];
					    p->child[i] = p->child[j];
					    p->child[j] = tmp;
    				    changed=1;
                    }

		} while (changed);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2bbe
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x20(%rdi), %rax
subq 0x18(%rdi), %rax
cmpq $0x9, %rax
jb 0x2bb0
movq %rsi, %rbx
movq 0x20(%r14), %r15
subq 0x18(%r14), %r15
sarq $0x3, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq %r15, %r12
je 0x2bab
leaq 0x1(%r12), %rbp
movq %rbp, (%rsp)
cmpq %r15, %rbp
jae 0x2ba5
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
movq (%rax,%rbp,8), %rsi
callq *%rbx
testl %eax, %eax
je 0x2ba0
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rcx
movq (%rax,%rbp,8), %rdx
movq %rdx, (%rax,%r12,8)
movq 0x18(%r14), %rax
movq %rcx, (%rax,%rbp,8)
pushq $0x1
popq %r13
incq %rbp
jmp 0x2b6d
movq (%rsp), %r12
jmp 0x2b5f
testl %r13d, %r13d
jne 0x2b4d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_delete
void itemcond_delete(itemcond* p)
{
	if (p && --p->refcount==0)
	{
		itemcond_delete(p->a);
		itemcond_delete(p->b);
		free(p);
	}
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2bcc
movq %rdi, %rbx
decl (%rdi)
je 0x2bce
popq %rbx
retq
movq 0x10(%rbx), %rdi
callq 0x2bbf
movq 0x18(%rbx), %rdi
callq 0x2bbf
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_delete
void item_delete(item* p)
{
	item** child;
	if (!p)
		return;
	if (p->parent)
		item_remove(p);
	for (child = p->child;child != p->childend;++child)
	{
		(*child)->parent = NULL;
		item_delete(*child);
	}
	itemcond_delete(p->cond);
	free(p->value);
	free(p);
}

// Assembly:
testq %rdi, %rdi
je 0x2c44
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x2c04
movq %rbx, %rdi
callq 0x2551
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x2c24
movq (%r14), %rax
andq $0x0, 0x10(%rax)
movq (%r14), %rdi
callq 0x2be9
addq $0x8, %r14
jmp 0x2c08
movq 0x8(%rbx), %rdi
callq 0x2bbf
movq (%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_new
itemcond* itemcond_new(int func, item* value)
{
	itemcond* p = (itemcond*)zalloc(sizeof(itemcond));
    p->refcount = 1;
	p->func = func;
	p->value = value;
	return p;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x20
popq %rdi
callq 0x24e4
movl $0x1, (%rax)
movl %ebp, 0x4(%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_same
int itemcond_same(itemcond* a,itemcond* b)
{
	if (!a && !b)
		return 1;
	if (!a || !b)
		return 0;
	if (a->func != b->func)
		return 0;
	switch (a->func)
	{
	case COND_GET:
		return a->value == b->value;
	case COND_AND:
	case COND_OR:
		return (itemcond_same(a->a,b->a) && itemcond_same(a->b,b->b)) ||
               (itemcond_same(a->b,b->a) && itemcond_same(a->a,b->b));
	case COND_NOT:
		return itemcond_same(a->a,b->a);
	default:
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x18
popq %r13
xorl %ebp, %ebp
movq %r14, %rax
orq %rbx, %rax
je 0x2cf7
testq %r14, %r14
je 0x2cfa
testq %rbx, %rbx
je 0x2cfa
movl 0x4(%r14), %eax
cmpl 0x4(%rbx), %eax
jne 0x2cfa
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2ce2
movq 0x10(%r14), %r15
movq 0x10(%rbx), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2c69
movq 0x18(%r14), %r14
testl %eax, %eax
je 0x2cce
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2c69
testl %eax, %eax
jne 0x2cf7
movq %r14, %rdi
movq %r12, %rsi
callq 0x2c69
movq %r13, %rcx
testl %eax, %eax
jne 0x2cee
jmp 0x2cfa
cmpl $0x3, %eax
jne 0x2d0b
movq 0x10(%r14), %r15
pushq $0x10
popq %rcx
movq (%rbx,%rcx), %rbx
movq %r15, %r14
jmp 0x2c80
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rbp
testl %eax, %eax
jne 0x2cfa
movq 0x8(%r14), %rax
xorl %ebp, %ebp
cmpq 0x8(%rbx), %rax
sete %bpl
jmp 0x2cfa
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_reduce
void itemcond_reduce(itemcond* cond)
{
    if (cond->func == COND_OR)
    {
        itemcond_reduce(cond->a);
        itemcond_reduce(cond->b);
        if (cond->a->value)
        {
            if (itemcond_same(cond->a,cond->b))
            {
                cond->func = COND_GET;
                cond->value = cond->a->value;
            }
        }
        if (cond->a->func == COND_GET && itemcond_contains(cond->b,cond->a->value))
        {
            cond->func = COND_GET;
            cond->value = cond->a->value;
        }
        if (cond->b->func == COND_GET && itemcond_contains(cond->a,cond->b->value))
        {
            cond->func = COND_GET;
            cond->value = cond->b->value;
        }
    }
    else
    if (cond->func == COND_AND)
    {
        itemcond_reduce(cond->a);
        itemcond_reduce(cond->b);
        if (cond->a->value)
        {
            if (itemcond_same(cond->a,cond->b))
            {
                cond->func = COND_GET;
                cond->value = cond->a->value;
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
cmpl $0x2, %eax
je 0x2dd7
cmpl $0x1, %eax
jne 0x2e0b
movq 0x10(%rbx), %rdi
callq 0x2d47
movq 0x18(%rbx), %rdi
callq 0x2d47
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %r15
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x2d9d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2c69
testl %eax, %eax
je 0x2d9d
andl $0x0, 0x4(%rbx)
movq %r12, 0x8(%rbx)
cmpl $0x0, 0x4(%r14)
jne 0x2dbf
movq 0x8(%r14), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2d22
testl %eax, %eax
je 0x2dbf
andl $0x0, 0x4(%rbx)
movq %r12, 0x8(%rbx)
cmpl $0x0, 0x4(%r15)
jne 0x2e0b
movq 0x8(%r15), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2d22
jmp 0x2dff
movq 0x10(%rbx), %rdi
callq 0x2d47
movq 0x18(%rbx), %rdi
callq 0x2d47
movq 0x10(%rbx), %rdi
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x2e0b
movq 0x18(%rbx), %rsi
callq 0x2c69
testl %eax, %eax
je 0x2e0b
andl $0x0, 0x4(%rbx)
movq %r15, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_eval
int itemcond_eval(itemcond* p)
{
	switch (p->func)
	{
	case COND_GET:
		if (!(p->value->flags & FLAG_PROCESSED))
			preprocess_condeval(p->value);
		return (p->value->flags & FLAG_DEFINED)==FLAG_DEFINED;
	case COND_AND:
		return itemcond_eval(p->a) && itemcond_eval(p->b);
	case COND_OR:
		return itemcond_eval(p->a) || itemcond_eval(p->b);
	case COND_NOT:
		return !itemcond_eval(p->a);
	case COND_0:
        return 0;
	case COND_1:
        return 1;
	default:
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebp, %ebp
pushq $0x1
popq %rbx
leaq 0xd185(%rip), %r15      # 0x10004
movl 0x4(%r14), %eax
cmpq $0x5, %rax
ja 0x2ede
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0x2e69
testl %eax, %eax
je 0x2eae
jmp 0x2ede
movq 0x10(%r14), %rdi
callq 0x2e69
testl %eax, %eax
je 0x2ebd
movq 0x18(%r14), %r14
jmp 0x2e7f
movq 0x10(%r14), %r14
xorl $0x1, %ebp
jmp 0x2e7f
xorl %ebx, %ebx
jmp 0x2ede
movq 0x8(%r14), %rdi
movl 0x30(%rdi), %ebx
testb %bl, %bl
js 0x2ed8
callq 0x2eed
movq 0x8(%r14), %rax
movl 0x30(%rax), %ebx
shrl $0x5, %ebx
andl $0x1, %ebx
xorl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: preprocess_condeval
void preprocess_condeval(item* p)
{
	item** child;

	p->flags |= FLAG_PROCESSED;

	if (p->cond)
	{
		if (!itemcond_eval(p->cond))
			preprocess_setremoved(p);
	}

	if (!(p->flags & FLAG_REMOVED))
		for (child=p->child;child!=p->childend;++child)
			preprocess_condeval(*child);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
orb $-0x80, 0x30(%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x2f12
callq 0x2e69
testl %eax, %eax
jne 0x2f12
movq %rbx, %rdi
callq 0x55ad
testb $0x40, 0x30(%rbx)
jne 0x2f30
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x2f30
movq (%r14), %rdi
callq 0x2eed
addq $0x8, %r14
jmp 0x2f1c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_and
itemcond* itemcond_and(itemcond* p,itemcond* cond)
{
	if (cond)
	{
		if (p)
		{
			itemcond* v = itemcond_new(COND_AND,NULL);
			v->a = itemcond_dup(cond);
			v->b = p;
			p = v;
		}
		else
			p = itemcond_dup(cond);
	}
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
testq %rsi, %rsi
je 0x2f65
movq %rsi, %rbx
testq %r14, %r14
je 0x2f6a
pushq $0x2
popq %rdi
xorl %esi, %esi
callq 0x2c45
incl (%rbx)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rax, %rbx
jmp 0x2f6c
movq %r14, %rbx
jmp 0x2f6c
incl (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: itemcond_or
itemcond* itemcond_or(itemcond* p,itemcond* cond)
{
	if (cond && p)
	{
		itemcond* v = itemcond_new(COND_OR,NULL);
		v->a = itemcond_dup(cond);
		v->b = p;
		p = v;
	}
	else
	{
		itemcond_delete(p);
		p = NULL;
	}
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x2fa8
movq %rsi, %r14
pushq $0x1
popq %rdi
xorl %esi, %esi
callq 0x2c45
incl (%r14)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
jmp 0x2fb2
movq %rbx, %rdi
callq 0x2bbf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_getmerge
item* item_getmerge(item* p,const item* child,int removed,int *exists)
{
    item* dup;
	*exists = item_find(p,child->value) != NULL;
	dup = item_get(p,child->value,(child->flags & FLAG_DEFINED)==FLAG_DEFINED);
    if (((child->flags & FLAG_REMOVED) || removed) && (!*exists || (dup->flags & FLAG_REMOVED)))
        dup->flags |= FLAG_REMOVED;
    else
        dup->flags &= ~FLAG_REMOVED;
    dup->flags |= (child->flags & ~FLAG_REMOVED);
    return dup;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq (%rsi), %r12
movq %r12, %rsi
callq 0x262e
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, (%r14)
movl 0x30(%rbx), %edx
shrl $0x5, %edx
andl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x26a2
movl 0x30(%rbx), %ecx
andl $0x40, %ecx
orl %ebp, %ecx
je 0x3016
movl 0x30(%rax), %ecx
cmpl $0x0, (%r14)
je 0x3011
movl %ecx, %edx
andl $0x40, %edx
je 0x3019
orl $0x40, %ecx
jmp 0x301c
movl 0x30(%rax), %ecx
andl $-0x41, %ecx
movl %ecx, 0x30(%rax)
movl 0x30(%rbx), %edx
andl $-0x41, %edx
orl %ecx, %edx
movl %edx, 0x30(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_merge2
void item_merge2(item* p,item* group,itemcond* cond0,int removed,int exists)
{
	if (group)
	{
		item** child;
		itemcond* cond = itemcond_and(itemcond_dup(group->cond),cond0);

		for (child = group->child;child != group->childend;++child)
		{
			int child_exists;
			item* dup = item_getmerge(p,*child,removed,&child_exists);
			item_merge2(dup,*child,cond,removed,child_exists);
		}

		if (!item_childcount(group) || (p->flags & FLAG_ATTRIB))
		{
			if (exists)
				p->cond = itemcond_or(p->cond,cond);
			else
			{
				itemcond_delete(p->cond);
				p->cond = itemcond_dup(cond);
			}
		}
		itemcond_delete(cond);
	}
}

// Assembly:
testq %rsi, %rsi
je 0x30cb
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl %r8d, (%rsp)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x305f
incl (%rdi)
movq %rdx, %rsi
callq 0x2f38
movq %rax, %r14
movq 0x18(%r12), %rbp
leaq 0x4(%rsp), %r13
cmpq 0x20(%r12), %rbp
je 0x30aa
movq (%rbp), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movq %r13, %rcx
callq 0x2fba
movq (%rbp), %rsi
movl 0x4(%rsp), %r8d
movq %rax, %rdi
movq %r14, %rdx
movl %r15d, %ecx
callq 0x3033
addq $0x8, %rbp
jmp 0x3074
cmpq 0x18(%r12), %rbp
je 0x30b7
testb $0x1, 0x31(%rbx)
je 0x30e3
movq 0x8(%rbx), %rdi
cmpl $0x0, (%rsp)
je 0x30cc
movq %r14, %rsi
callq 0x2f77
jmp 0x30df
retq
callq 0x2bbf
movq %r14, %rax
testq %r14, %r14
je 0x30df
incl (%r14)
movq %r14, %rax
movq %rax, 0x8(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bbf
// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: item_merge
void item_merge(item* p,item* group,item* plus)
{
	if (group)
	{
		int removed=0;
		item* i;
		itemcond* cond = NULL;
		for (i=group->parent;i;i=i->parent)
			cond = itemcond_and(cond,i->cond);
		if (plus)
		{
			removed = (plus->flags & FLAG_REMOVED)==FLAG_REMOVED;
			cond = itemcond_and(cond,plus->cond);
		}
		item_merge2(p,group,cond,removed,1);
		itemcond_delete(cond);
	}
}

// Assembly:
testq %rsi, %rsi
je 0x3154
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq %rsi, %r13
movq 0x10(%r13), %r13
testq %r13, %r13
je 0x3132
movq 0x8(%r13), %rsi
movq %r15, %rdi
callq 0x2f38
movq %rax, %r15
jmp 0x3118
testq %r12, %r12
je 0x3155
movl 0x30(%r12), %ebp
shrl $0x6, %ebp
andl $0x1, %ebp
movq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x2f38
movq %rax, %r15
jmp 0x3157
retq
xorl %ebp, %ebp
pushq $0x1
popq %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x3033
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bbf