LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH04_Expressions/examples/cond.cc
// Function: main
int main()
{
	unsigned i;
	while (cin >> i)
		grades.push_back(i);

	for (auto grade : grades) {  // for each grade in grades
		// set the initial grade as pass or fail
		string finalgrade = (grade < 60) ?  "fail" : "pass";

		finalgrade = (grade > 90) ? "high pass"
				                  : (grade < 60) ? "fail" : "pass";

		cout << grade << " " + finalgrade << endl;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x2cdc(%rip), %rbx      # 0x3fe0
leaq -0x34(%rbp), %r14
leaq 0x2de1(%rip), %r15      # 0x40f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1150
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1335
movq %r15, %rdi
movq %r14, %rsi
callq 0x142a
jmp 0x130f
movq 0x2db4(%rip), %r12      # 0x40f0
movq 0x2db5(%rip), %rax      # 0x40f8
movq %rax, -0x30(%rbp)
leaq -0x78(%rbp), %rbx
leaq -0x58(%rbp), %r14
cmpq -0x30(%rbp), %r12
je 0x13eb
movl (%r12), %r13d
cmpq $0x3c, %r13
leaq 0xca6(%rip), %r15       # 0x200e
leaq 0xc95(%rip), %rax       # 0x2004
cmovbq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1060
cmpq $0x5b, %r13
leaq 0xc7d(%rip), %rax       # 0x2009
cmovaeq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1170
movq 0x2c2e(%rip), %rdi      # 0x3fd0
movq %r13, %rsi
callq 0x10c0
movq %rax, %r13
movq %r14, %rdi
leaq 0xc5c(%rip), %rsi       # 0x2013
movq %rbx, %rdx
callq 0x144f
movq %r13, %rdi
movq %r14, %rsi
callq 0x10f0
movq %rax, %rdi
callq 0x10a0
movq %r14, %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x1090
addq $0x4, %r12
jmp 0x134f
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x140c
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x1090
jmp 0x140f
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/ImageLoader.cpp
// Function: ImageLoader::LoadImage()
void ImageLoader::LoadImage()
{
    _intputFile.open(_filePath, std::ios::binary);
    if(!_intputFile)
    {
        std::cerr << "Error: File cannot be opened\b\tExiting" << std::endl;
        exit(1);
    }
        _intputFile.read(fileData, INPUT_SIZE);
    for (int itrFileData = 0, itrCfa = 0; itrFileData < INPUT_SIZE, itrCfa < TOTAL_PIX; itrFileData += 3, itrCfa+=2)
    {
        cfa[itrCfa] = fileData[itrFileData];
        cfa[itrCfa + 1] = Sensel(fileData[itrFileData + 1], fileData[itrFileData + 2]);
    }
    _intputFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
leaq 0x8(%rdi), %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x2100
movq 0x28(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%r14,%rax)
jne 0x2a57
movq (%r14), %rsi
movl $0x1200000, %edx        # imm = 0x1200000
movq %rbx, %rdi
callq 0x2170
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0xc00000, %rax         # imm = 0xC00000
jae 0x2a4b
movq (%r14), %rdx
movb (%rdx,%rcx), %dl
movq 0x230(%r14), %rsi
movb %dl, (%rsi,%rax)
movq (%r14), %rdx
movb 0x1(%rdx,%rcx), %sil
movb 0x2(%rdx,%rcx), %dl
shrb $0x4, %dl
shlb $0x4, %sil
orb %dl, %sil
movq 0x230(%r14), %rdx
movb %sil, 0x1(%rdx,%rax)
addq $0x3, %rcx
addq $0x2, %rax
jmp 0x2a07
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2060
movq 0x3592(%rip), %rdi      # 0x5ff0
leaq 0x1815(%rip), %rsi      # 0x427a
callq 0x2130
movq %rax, %rdi
callq 0x20b0
pushq $0x1
popq %rdi
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/OutputWriter.cpp
// Function: OutputWriter::Print5by5tile(unsigned char*)
void OutputWriter::Print5by5tile(uint8_t* array)
{
    for (int row = 0; row < 5; ++row)
    {
        for (int index = 0; index < 5; ++index)
        {
            std::cout << (int)array[row * IMAGE_WIDTH + index] << " ";
        }
        std::cout << std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0x3539(%rip), %r14      # 0x5fd0
leaq 0x187a(%rip), %r15      # 0x4318
cmpq $0x5, %r12
je 0x2ade
xorl %r13d, %r13d
cmpq $0x5, %r13
je 0x2aca
movzbl (%rbx,%r13), %esi
movq %r14, %rdi
callq 0x2200
movq %rax, %rdi
movq %r15, %rsi
callq 0x2130
incq %r13
jmp 0x2aa7
movq %r14, %rdi
callq 0x20b0
incq %r12
addq $0x1000, %rbx           # imm = 0x1000
jmp 0x2a9e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/OutputWriter.cpp
// Function: OutputWriter::ConvertToPPM(unsigned char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
uint8_t* OutputWriter::ConvertToPPM(uint8_t* channel, std::string chanelName)
{
    uint8_t* ppmBin = new uint8_t[3 * TOTAL_PIX]{0};
    for (int itrPpmBin = 0, itrChnl = 0; itrPpmBin < 3 * TOTAL_PIX, 
                            itrChnl < TOTAL_PIX; itrPpmBin += 3, ++itrChnl)
    {
        switch (chanelName[0])
        {
            case 'r':
                ppmBin[itrPpmBin] = channel[itrChnl];
                break;
            case 'g':
                ppmBin[itrPpmBin + 1] = channel[itrChnl];
                break;
            case 'b':
                ppmBin[itrPpmBin + 2] = channel[itrChnl];
                break;
        }      
    }
    return ppmBin;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movl $0x2400000, %edi        # imm = 0x2400000
callq 0x2030
movq %rax, %r14
leaq 0x1(%rax), %r12
xorl %r13d, %r13d
movl $0x2400000, %edx        # imm = 0x2400000
movq %rax, %rdi
xorl %esi, %esi
callq 0x20d0
movq (%r15), %rax
movzbl (%rax), %eax
movq %r14, %rcx
addq $0x2, %rcx
cmpq $0x2400000, %r13        # imm = 0x2400000
je 0x2e21
cmpl $0x62, %eax
je 0x2e0e
movq %r14, %rdx
cmpl $0x72, %eax
je 0x2e11
movq %r12, %rdx
cmpl $0x67, %eax
je 0x2e11
jmp 0x2e18
movq %rcx, %rdx
movb (%rbx), %sil
movb %sil, (%rdx,%r13)
addq $0x3, %r13
incq %rbx
jmp 0x2dee
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/OutputWriter.cpp
// Function: OutputWriter::WriteBmp(ImageProcessor*)
void OutputWriter::WriteBmp(ImageProcessor* debayeredImg)
{
    BitmapFileHeader flleHeader;
    BitmapInfoHeader infoHeader;

    flleHeader.fileSize   = sizeof(BitmapFileHeader) + sizeof(BitmapInfoHeader) 
                            + TOTAL_PIX * 3;
    flleHeader.dataOffset = sizeof(BitmapFileHeader) + sizeof(BitmapInfoHeader);

    std::ofstream outputBMP;
    outputBMP.open("result/BMP_output.bmp", std::ios::binary);
    if(!outputBMP)
    {
        std::cerr << "Error: File cannot be opened\n\tExiting" << std::endl;
        exit(1);
    }

    outputBMP.write(reinterpret_cast<const char*>(&flleHeader), sizeof(flleHeader));
    outputBMP.write(reinterpret_cast<const char*>(&infoHeader), sizeof(infoHeader));

    bmpImage = ConvertToBMP(debayeredImg->redChannel, debayeredImg->blueChannel, 
                            debayeredImg->greenChannel);
    outputBMP.write(reinterpret_cast<const char*>(bmpImage), 3 * TOTAL_PIX);
    
    outputBMP.close();
    if (!outputBMP)
    {
        std::cerr << "Error: File cannot be Closed\n\tExiting" << std::endl;
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %r14
movq %rdi, %rbx
movw $0x4d42, -0x26(%rbp)    # imm = 0x4D42
movq $0x2400036, -0x24(%rbp) # imm = 0x2400036
movabsq $0x100000000028, %rax   # imm = 0x100000000028
movq %rax, -0x50(%rbp)
movabsq $0x18000100000c00, %rax # imm = 0x18000100000C00
movq %rax, -0x48(%rbp)
movaps 0x1425(%rip), %xmm0     # 0x42a0
movups %xmm0, -0x40(%rbp)
andq $0x0, -0x30(%rbp)
movl $0x36, -0x1c(%rbp)
leaq -0x250(%rbp), %r15
movq %r15, %rdi
callq 0x21f0
leaq 0x14a9(%rip), %rsi      # 0x434a
pushq $0x4
popq %rdx
movq %r15, %rdi
callq 0x2040
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x230(%rbp,%rax)
jne 0x2f4d
leaq -0x250(%rbp), %rdi
leaq -0x26(%rbp), %rsi
pushq $0xe
popq %rdx
callq 0x2190
leaq -0x250(%rbp), %rdi
leaq -0x50(%rbp), %rsi
pushq $0x28
popq %rdx
callq 0x2190
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
callq 0x2fa4
movq %rax, (%rbx)
leaq -0x250(%rbp), %rdi
movl $0x2400000, %edx        # imm = 0x2400000
movq %rax, %rsi
callq 0x2190
leaq -0x250(%rbp), %rdi
callq 0x21b0
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x230(%rbp,%rax)
jne 0x2f6a
leaq -0x250(%rbp), %rdi
callq 0x21c0
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x309c(%rip), %rdi      # 0x5ff0
leaq 0x1392(%rip), %rsi      # 0x42ed
callq 0x2130
movq %rax, %rdi
callq 0x20b0
jmp 0x2f85
movq 0x307f(%rip), %rdi      # 0x5ff0
leaq 0x13ac(%rip), %rsi      # 0x4324
callq 0x2130
movq %rax, %rdi
callq 0x20b0
pushq $0x1
popq %rdi
callq 0x2160
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/OutputWriter.cpp
// Function: OutputWriter::ConvertToBMP(unsigned char*, unsigned char*, unsigned char*)
uint8_t* OutputWriter::ConvertToBMP(uint8_t* channelRed, uint8_t* channelBlue, 
                                  uint8_t* channelGreen)
{
    uint8_t* bmpBin = new uint8_t [TOTAL_PIX * 3];
    for (int row = IMAGE_HEIGHT - 1, itr = 0; row >= 0; --row)
    {
        for (int col = row * IMAGE_WIDTH; col < (row + 1) * IMAGE_WIDTH; ++col)
        {
            bmpBin[itr]     = channelBlue[col];
            bmpBin[itr + 1] = channelGreen[col];
            bmpBin[itr + 2] = channelRed[col];
            itr += 3;
        }
    }
    return bmpBin;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl $0x2400000, %edi        # imm = 0x2400000
callq 0x2030
movl $0xbff, %ecx            # imm = 0xBFF
movl $0xbff000, %edx         # imm = 0xBFF000
movl $0xc00000, %esi         # imm = 0xC00000
xorl %edi, %edi
testl %ecx, %ecx
js 0x3015
movl %edx, %r8d
movslq %edi, %rdi
cmpq %r8, %rsi
je 0x3004
movb (%r14,%r8), %r9b
movb %r9b, (%rax,%rdi)
movb (%rbx,%r8), %r9b
movb %r9b, 0x1(%rax,%rdi)
movb (%r15,%r8), %r9b
movb %r9b, 0x2(%rax,%rdi)
addq $0x3, %rdi
incq %r8
jmp 0x2fdc
decl %ecx
addl $0xfffff000, %edx       # imm = 0xFFFFF000
addq $-0x1000, %rsi          # imm = 0xF000
jmp 0x2fd2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/OutputWriter.cpp
// Function: Chunk::WriteToFile(std::basic_ofstream<char, std::char_traits<char>>*)
void Chunk::WriteToFile(std::ofstream* outputAVI)
{
    outputAVI->write(reinterpret_cast<const char*>(_fourCC), 4);
    outputAVI->write(reinterpret_cast<const char*>(&_size), 4);
    if (_avi == nullptr)
    {
        _size = 0;
    }
    outputAVI->write(reinterpret_cast<const char*>(_avi), _size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x4
popq %r12
movq %rsi, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2190
leaq 0x4(%r15), %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2190
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x3095
movl (%r14), %edx
jmp 0x309b
andl $0x0, (%r14)
xorl %edx, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/ImageProcessor.cpp
// Function: ImageProcessor::InitializeRedChannel(unsigned char*)
void ImageProcessor::InitializeRedChannel(uint8_t* cfa)
{
    for (int itrRed = 0; itrRed < TOTAL_PIX;)
    {
        int row = itrRed / IMAGE_WIDTH;
        if (row % 2 == 0)
        {
            redChannel[itrRed] = cfa[itrRed];
            itrRed += 2;
        }
        else
        {
            itrRed += IMAGE_WIDTH;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x2, %ecx
cmpl $0xc00000, %eax         # imm = 0xC00000
jae 0x374c
movl $0x1000, %edx           # imm = 0x1000
btl $0xc, %eax
jb 0x3748
movl %eax, %edx
movb (%rsi,%rdx), %r8b
movq (%rdi), %r9
movb %r8b, (%r9,%rdx)
movl %ecx, %edx
addl %edx, %eax
jmp 0x3727
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/ImageProcessor.cpp
// Function: ImageProcessor::InitializeBlueChannel(unsigned char*)
void ImageProcessor::InitializeBlueChannel(uint8_t* cfa)
{
    for (int itrBlue = IMAGE_WIDTH + 1; itrBlue < TOTAL_PIX;)
    {
        int row = itrBlue / IMAGE_WIDTH;
        if (row % 2 != 0)
        {
            blueChannel[itrBlue] = cfa[itrBlue];
            itrBlue += 2;
        }
        else
        {
            itrBlue += IMAGE_WIDTH;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1001, %eax           # imm = 0x1001
movl $0x2, %ecx
cmpl $0xc00000, %eax         # imm = 0xC00000
jae 0x37ce
movl $0x1000, %edx           # imm = 0x1000
btl $0xc, %eax
jae 0x37ca
movl %eax, %edx
movb (%rsi,%rdx), %r8b
movq 0x8(%rdi), %r9
movb %r8b, (%r9,%rdx)
movl %ecx, %edx
addl %edx, %eax
jmp 0x37a8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/ImageProcessor.cpp
// Function: ImageProcessor::Red()
void ImageProcessor::Red()
{
    int row;
    for (int itrChnl = 1; itrChnl < TOTAL_PIX; itrChnl += 2)
    {
        row = itrChnl / IMAGE_WIDTH;
        if (row % 2 == 1)
        {
            redChannel[itrChnl - 1] = (redChannel[itrChnl - 1 - IMAGE_WIDTH] 
                                 +  redChannel[itrChnl - 1 + IMAGE_WIDTH]) / 2;
            redChannel[itrChnl + 1] = (redChannel[itrChnl+1-IMAGE_WIDTH] 
                                 +  redChannel[itrChnl+1+IMAGE_WIDTH]) / 2;
        }
        redChannel[itrChnl] = (redChannel[itrChnl - 1] + redChannel[itrChnl + 1]) / 2;
    }
    std::fill(redChannel, redChannel+IMAGE_WIDTH, 0); // first row
    std::fill(redChannel + TOTAL_PIX - IMAGE_WIDTH, redChannel + TOTAL_PIX, 0); //last row
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movabsq $0x1, %rax
cmpq $0xc00000, %rax         # imm = 0xC00000
jae 0x383f
btl $0xc, %eax
jae 0x3824
movq (%rdi), %rcx
movzbl -0x1001(%rcx,%rax), %edx
movzbl 0xfff(%rcx,%rax), %esi
addl %edx, %esi
shrl %esi
movb %sil, -0x1(%rcx,%rax)
movq (%rdi), %rcx
movzbl -0xfff(%rcx,%rax), %edx
movzbl 0x1001(%rcx,%rax), %esi
addl %edx, %esi
shrl %esi
movb %sil, 0x1(%rcx,%rax)
movq (%rdi), %rcx
movzbl -0x1(%rcx,%rax), %edx
movzbl 0x1(%rcx,%rax), %esi
addl %edx, %esi
shrl %esi
movb %sil, (%rcx,%rax)
addq $0x2, %rax
jmp 0x37de
movq (%rdi), %rax
xorl %ecx, %ecx
cmpq $0x1000, %rcx           # imm = 0x1000
je 0x3856
movb $0x0, (%rax,%rcx)
incq %rcx
jmp 0x3844
movq (%rdi), %rax
xorl %ecx, %ecx
cmpq $0x1000, %rcx           # imm = 0x1000
je 0x3871
movb $0x0, 0xbff000(%rax,%rcx)
incq %rcx
jmp 0x385b
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/ImageProcessor.cpp
// Function: ImageProcessor::Blue()
void ImageProcessor::Blue()
{
    int row;
    for (int itrChnl = 0; itrChnl < TOTAL_PIX; itrChnl += 2)
    {
        row = itrChnl / IMAGE_WIDTH;
        if (row % 2 == 0)
        {
            blueChannel[itrChnl - 1] = (blueChannel[itrChnl - 1 - IMAGE_WIDTH] 
                                 +  blueChannel[itrChnl - 1 + IMAGE_WIDTH]) / 2;
            blueChannel[itrChnl + 1] = (blueChannel[itrChnl+1-IMAGE_WIDTH] 
                                 +  blueChannel[itrChnl+1+IMAGE_WIDTH]) / 2;
        }
        blueChannel[itrChnl] = (blueChannel[itrChnl - 1] + blueChannel[itrChnl + 1]) / 2;
    }
    std::fill(blueChannel, blueChannel+IMAGE_WIDTH, 0); // first row
    std::fill(blueChannel + TOTAL_PIX - IMAGE_WIDTH, blueChannel + TOTAL_PIX, 0); //last row
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpq $0xc00000, %rax         # imm = 0xC00000
jae 0x38ec
btl $0xc, %eax
jb 0x38ce
movq 0x8(%rdi), %rcx
movzbl -0x1001(%rcx,%rax), %edx
movzbl 0xfff(%rcx,%rax), %esi
addl %edx, %esi
shrl %esi
movb %sil, -0x1(%rcx,%rax)
movq 0x8(%rdi), %rdx
movq %rax, %rcx
orq $0x1, %rcx
movzbl -0xfff(%rdx,%rax), %esi
movzbl 0x1001(%rdx,%rax), %r8d
addl %esi, %r8d
shrl %r8d
movb %r8b, 0x1(%rdx,%rax)
jmp 0x38d2
leaq 0x1(%rax), %rcx
movq 0x8(%rdi), %rdx
movzbl -0x1(%rdx,%rax), %esi
movzbl (%rdx,%rcx), %ecx
addl %esi, %ecx
shrl %ecx
movb %cl, (%rdx,%rax)
addq $0x2, %rax
jmp 0x387a
movq 0x8(%rdi), %rax
xorl %ecx, %ecx
cmpq $0x1000, %rcx           # imm = 0x1000
je 0x3904
movb $0x0, (%rax,%rcx)
incq %rcx
jmp 0x38f2
movq 0x8(%rdi), %rax
xorl %ecx, %ecx
cmpq $0x1000, %rcx           # imm = 0x1000
je 0x3920
movb $0x0, 0xbff000(%rax,%rcx)
incq %rcx
jmp 0x390a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ksraj123[P]RAW12-to-bitmap-AVI/src/ImageProcessor.cpp
// Function: ImageProcessor::Green()
void ImageProcessor::Green()
{
    for (int itrChnl = IMAGE_WIDTH+1; itrChnl < TOTAL_PIX;)
    {
        greenChannel[itrChnl] = (greenChannel[itrChnl - 1] + greenChannel[itrChnl + 1] 
                         +  greenChannel[itrChnl - IMAGE_WIDTH]
                         +  greenChannel[itrChnl + IMAGE_WIDTH])/4;
        if (itrChnl / IMAGE_WIDTH != (itrChnl + 2) / IMAGE_WIDTH)
        {
            itrChnl += 3;
            continue;
        }
        itrChnl += 2;
    }
    std::fill(greenChannel, greenChannel+IMAGE_WIDTH, 0); //first row
    std::fill(greenChannel + TOTAL_PIX - IMAGE_WIDTH, greenChannel + TOTAL_PIX, 0); //last row
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1001, %ecx           # imm = 0x1001
movl $0x1000, %r9d           # imm = 0x1000
movq 0x10(%rdi), %rax
cmpl $0xc00000, %ecx         # imm = 0xC00000
jge 0x398d
movslq %ecx, %rdx
movzbl -0x1(%rax,%rdx), %esi
movzbl 0x1(%rax,%rdx), %r8d
addl %esi, %r8d
movzbl -0x1000(%rax,%rdx), %esi
movzbl 0x1000(%rax,%rdx), %r10d
addl %esi, %r10d
addl %r8d, %r10d
shrl $0x2, %r10d
movb %r10b, (%rax,%rdx)
movl %ecx, %eax
cltd
idivl %r9d
movl %eax, %r8d
leal 0x2(%rcx), %esi
movl %esi, %eax
cltd
idivl %r9d
cmpl %eax, %r8d
je 0x3989
addl $0x3, %ecx
movl %ecx, %esi
movl %esi, %ecx
jmp 0x3931
xorl %ecx, %ecx
cmpq $0x1000, %rcx           # imm = 0x1000
je 0x39a1
movb $0x0, (%rax,%rcx)
incq %rcx
jmp 0x398f
movq 0x10(%rdi), %rax
xorl %ecx, %ecx
cmpq $0x1000, %rcx           # imm = 0x1000
je 0x39bd
movb $0x0, 0xbff000(%rax,%rcx)
incq %rcx
jmp 0x39a7
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/razimantv[P]DancingLinks/spangram/Trie.cpp
// Function: TrieNode::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void TrieNode::insert(const std::string& word) {
  TrieNode* node = this;

  // Iterate through trie nodes for each character in the word
  for (char c : word) {
    // If the child node doesn't exist, create it
    if (!node->children[c - 'a']) node->children[c - 'a'] = new TrieNode();
    node = node->children[c - 'a'];
  }
  node->end = true; // Mark the end of the word
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x4985
movsbq (%r15,%r13), %rbp
movq -0x308(%rbx,%rbp,8), %r14
testq %r14, %r14
jne 0x497d
movl $0xd8, %edi
callq 0x2190
movq %rax, %r14
movl $0xd1, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20f0
movq %r14, -0x308(%rbx,%rbp,8)
incq %r13
movq %r14, %rbx
jmp 0x4942
movb $0x1, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/demos/convert/proc_U.c
// Function: main
int main(int argc, char **argv)
{
  TRACE_F("init");

  scdc_init(SCDC_INIT_DEFAULT);

#if USE_COMPS
  compS_init();
#endif

#if USE_COMPC
  compC_init();
#endif

#if USE_COMPU
  compU_run();
#elif defined(USE_COMPS) || defined(USE_COMPC)
  TRACE_F("press ENTER to exit");
  getchar();
#endif

#if USE_COMPS
  compS_release();
#endif

#if USE_COMPC
  compC_release();
#endif

  TRACE_F("release");

  scdc_release();

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x37e61(%rip), %rbx     # 0x44048
leaq 0x37e16(%rip), %r14     # 0x44004
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37e09(%rip), %rdi     # 0x4400b
xorl %eax, %eax
callq 0xb070
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0xb770
leaq 0x392e3(%rip), %rdi     # 0x454fd
xorl %eax, %eax
callq 0xc745
xorl %eax, %eax
callq 0xc598
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37dd4(%rip), %rdi     # 0x44010
xorl %eax, %eax
callq 0xb070
movl %ebp, %edi
callq 0xb770
callq 0xc85a
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/demos/convert/compU.c
// Function: compU_run
void compU_run()
{
  const char *file_in = "porsche.stl";
  const char *file_out = "porsche.msh";
  const char *compS_uri = "scdc:/compS/convert";
  const char *compC_uri = "scdc:/compC";

  char s[256];

  scdc_dataset_input_t _inp, *inp = &_inp;
  scdc_dataset_output_t _outp, *outp = &_outp;

  /* step U1: put to compS */
  sprintf(s, "%s put %s", compS_uri, file_in);
  TRACE_F("cmd: '%s'", s);
  inp = scdc_dataset_input_create(inp, "file", file_in);
  scdc_dataset_cmd(SCDC_DATASET_NULL, s, inp, NULL);
  scdc_dataset_input_destroy(inp);

  /* step U2: convert on compC */
  sprintf(s, "%s convert %s/%s %s/%s", compC_uri, compS_uri, file_in, compS_uri, file_out);
  TRACE_F("cmd: '%s'", s);
  scdc_dataset_cmd(SCDC_DATASET_NULL, s, NULL, NULL);

  /* step U3: get from compS */
  sprintf(s, "%s get %s", compS_uri, file_out);
  TRACE_F("cmd: '%s'", s);
  outp = scdc_dataset_output_create(outp, "file", file_out);
  scdc_dataset_cmd(SCDC_DATASET_NULL, s, NULL, outp);
  scdc_dataset_output_destroy(outp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
leaq 0x37ad8(%rip), %rsi     # 0x44088
leaq 0x37b44(%rip), %r14     # 0x440fb
leaq 0x37b25(%rip), %r12     # 0x440e3
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xb0c0
leaq 0x37a6b(%rip), %rdi     # 0x44048
leaq 0x37b37(%rip), %rsi     # 0x4411b
movq %rdi, %r13
movq %rsi, %rbp
xorl %eax, %eax
callq 0xb070
leaq 0x37a53(%rip), %rdi     # 0x4404b
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb070
pushq $0xa
popq %rdi
callq 0xb770
leaq 0x3903d(%rip), %rsi     # 0x4564e
leaq 0x68(%rsp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1ab5a
movq %rax, %r15
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xdb80
movq %r15, %rdi
callq 0x1ac5e
leaq 0x37aac(%rip), %r15     # 0x440ef
movq %r15, (%rsp)
leaq 0x37ad5(%rip), %rsi     # 0x44123
leaq 0x37aba(%rip), %rdx     # 0x4410f
movq %rbx, %rdi
movq %r14, %rcx
movq %r12, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0xb0c0
movq %r13, %r12
movq %r13, %rdi
movq %rbp, %r13
movq %rbp, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x379c9(%rip), %rbp     # 0x4404b
movq %rbp, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb070
pushq $0xa
popq %r14
movl %r14d, %edi
callq 0xb770
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xdb80
leaq 0x3798f(%rip), %rsi     # 0x44041
movq %rbx, %rdi
leaq 0x37a3f(%rip), %rdx     # 0x440fb
movq %r15, %rcx
xorl %eax, %eax
callq 0xb0c0
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0xb070
movq %rbp, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb070
movl %r14d, %edi
callq 0xb770
leaq 0x10(%rsp), %rdi
leaq 0x38f5a(%rip), %rsi     # 0x4564e
movq %r15, %rdx
xorl %eax, %eax
callq 0x1b6d0
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xdb80
movq %r14, %rdi
callq 0x1b78e
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/GameBoy.cpp
// Function: GameBoy::initParts()
void GameBoy::initParts() {
    cpu = new CPU();
    memory = new Memory();
    lcd = new LCD();
    timer = new Timer();
    ints = new Interrupts();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x60
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
callq 0x2d30
movq %r14, (%rbx)
pushq $0x30
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
callq 0x52fc
movq %r14, 0x8(%rbx)
pushq $0x18
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
callq 0x4f90
movq %r14, 0x10(%rbx)
pushq $0x18
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
callq 0x5630
movq %r14, 0x18(%rbx)
pushq $0x28
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
callq 0x56f8
movq %r14, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x28
jmp 0x2679
jmp 0x2666
movq %rax, %rbx
pushq $0x18
jmp 0x2679
movq %rax, %rbx
pushq $0x30
jmp 0x2679
movq %rax, %rbx
pushq $0x60
popq %rsi
movq %r14, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/GameBoy.cpp
// Function: GameBoy::GameBoy()
GameBoy::GameBoy() {
    DMATransfer = false;
    IME = true;
    Halt = false;
    Stop = false;
    RAM = new byte[0x10000];
    colors = new std::vector<Uint32>({ 
        0x01C4CFA1U, 
        0x018B956DU, 
        0x016B7353U, 
        0x01414141U 
    });
    setMode(2);
    setOAMInterrupt(true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x100, 0x58(%rdi)      # imm = 0x100
movl $0x10000, %edi          # imm = 0x10000
callq 0x2040
movq %rax, 0x48(%rbx)
pushq $0x18
popq %rdi
callq 0x2210
movq %rax, %r14
movaps 0x3951(%rip), %xmm0     # 0x6010
leaq -0x24(%rbp), %rsi
movups %xmm0, (%rsi)
pushq $0x4
popq %rdx
leaq -0x11(%rbp), %rcx
movq %rax, %rdi
callq 0x2ba4
movq %r14, 0x50(%rbx)
movq 0x48(%rbx), %rax
andb $-0x4, 0xff41(%rax)
movq 0x48(%rbx), %rax
orb $0x2, 0xff41(%rax)
movq 0x48(%rbx), %rax
orb $0x20, 0xff41(%rax)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/GameBoy.cpp
// Function: GameBoy::getInstance()
GameBoy* GameBoy::getInstance() {
    if (GameBoy::gb == nullptr) {
        gb = new GameBoy();
        gb->initParts();
    }
    return GameBoy::gb;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x7ab0(%rip), %rax      # 0xa1d8
testq %rax, %rax
jne 0x2756
pushq $0x60
popq %rdi
callq 0x2210
movq %rax, %rbx
movq %rax, %rdi
callq 0x268a
movq %rbx, 0x7a91(%rip)      # 0xa1d8
movq %rbx, %rdi
callq 0x25dc
movq 0x7a82(%rip), %rax      # 0xa1d8
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x60
popq %rsi
movq %rbx, %rdi
callq 0x2220
movq %r14, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/GameBoy.cpp
// Function: GameBoy::DrawPixel(int, int, int)
void GameBoy::DrawPixel(int x, int y, int color)
{
    for (int i = 0; i < scale; i++) {
        for (int j = 0; j < scale; j++) {
            int pxl = (y * scale + i) * 160 * scale + scale * x + j;
            pixels[pxl] = colors->at(color);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, -0x30(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdi, %r15
movslq %ecx, %r12
movl 0x40(%rdi), %eax
xorl %r13d, %r13d
cmpl %eax, %r13d
jge 0x27dd
xorl %ebx, %ebx
cmpl %eax, %ebx
jge 0x27d8
movl %eax, %ecx
imull -0x30(%rbp), %ecx
addl %r13d, %ecx
imull $0xa0, %ecx, %r14d
addl -0x2c(%rbp), %r14d
imull %eax, %r14d
addl %ebx, %r14d
movq 0x50(%r15), %rdi
movq %r12, %rsi
callq 0x2bda
movl (%rax), %eax
movq 0x38(%r15), %rcx
movslq %r14d, %rdx
movl %eax, (%rcx,%rdx,4)
incl %ebx
movl 0x40(%r15), %eax
jmp 0x2799
incl %r13d
jmp 0x2792
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/GameBoy.cpp
// Function: GameBoy::KeyDown(SDL_Event)
void GameBoy::KeyDown(SDL_Event e)
{
    byte key = 0;
    
    if (((RAM[0xFF00] >> 4) & 3) == 3 | ((RAM[0xFF00] >> 4) & 3) == 0)
        return;
    
    if (RAM[0xFF00] >> 4 == 0b1101)
        switch (e.key.keysym.sym)
        {
            case SDL_SCANCODE_1:
                key = 0b111;
                break;
            case SDL_SCANCODE_2:
                key = 0b1011;
                break;
            case SDL_SCANCODE_K:
                key = 0b1101;
                break;
            case SDL_SCANCODE_L:
                key = 0b1110;
                break;
            default:
                return;
        }
    else if (RAM[0xFF00] >> 4 == 0b1110)
        switch (e.key.keysym.sym)
        {
            case SDL_SCANCODE_W:
                key = 0b1011;
                break;
            case SDL_SCANCODE_A:
                key = 0b1101;
                break;
            case SDL_SCANCODE_S:
                key = 0b111;
                break;
            case SDL_SCANCODE_D:
                key = 0b1110;
                break;
            default:
                return;
        }
    
    RAM[0xFF0F] |= 0b10000;
    RAM[0xFF00] &= 0xF0;
    RAM[0xFF00] |= key;
    Stop = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x48(%rdi), %rax
movzbl 0xff00(%rax), %ecx
shrl $0x4, %ecx
movl %ecx, %edx
andl $0x3, %edx
je 0x2a5d
cmpl $0x3, %edx
je 0x2a5d
leaq 0x10(%rbp), %rdx
cmpb $0xe, %cl
je 0x2a14
movzbl %cl, %ecx
cmpl $0xd, %ecx
jne 0x2a2f
movl 0x14(%rdx), %ecx
cmpl $0xe, %ecx
je 0x2a2b
cmpl $0xf, %ecx
je 0x2a33
cmpl $0x1e, %ecx
je 0x2a37
cmpl $0x1f, %ecx
je 0x2a3b
jmp 0x2a5d
movl 0x14(%rdx), %ecx
cmpl $0x1a, %ecx
je 0x2a3b
cmpl $0x7, %ecx
je 0x2a33
cmpl $0x16, %ecx
je 0x2a37
cmpl $0x4, %ecx
jne 0x2a5d
movb $0xd, %cl
jmp 0x2a3d
xorl %ecx, %ecx
jmp 0x2a3d
movb $0xe, %cl
jmp 0x2a3d
movb $0x7, %cl
jmp 0x2a3d
movb $0xb, %cl
orb $0x10, 0xff0f(%rax)
movq 0x48(%rdi), %rax
andb $-0x10, 0xff00(%rax)
movq 0x48(%rdi), %rax
orb %cl, 0xff00(%rax)
movb $0x0, 0x5b(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/GameBoy.cpp
// Function: GameBoy::~GameBoy()
GameBoy::~GameBoy()
{
    delete cpu;
    delete memory;
    delete lcd;
    delete timer;
    delete ints;
    delete[] RAM;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
pushq $0x60
popq %rsi
callq 0x2220
movq 0x8(%rbx), %rdi
pushq $0x30
popq %rsi
callq 0x2220
movq 0x10(%rbx), %rdi
pushq $0x18
popq %r14
movq %r14, %rsi
callq 0x2220
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x2220
movq 0x20(%rbx), %rdi
pushq $0x28
popq %rsi
callq 0x2220
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x2ad7
popq %rbx
popq %r14
popq %rbp
jmp 0x2270
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::CPU()
CPU::CPU() {
    this->gb = GameBoy::getInstance();
    A = (byte*)&AF + 1;
    F = (byte*)&AF;
    B = (byte*)&BC + 1;
    C = (byte*)&BC;
    D = (byte*)&DE + 1;
    E = (byte*)&DE;
    H = (byte*)&HL + 1;
    L = (byte*)&HL;
    PC = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x271a
movq %rax, 0x58(%rbx)
leaq 0x1(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rbx, 0x18(%rbx)
leaq 0x2(%rbx), %rax
leaq 0x3(%rbx), %rcx
movq %rcx, 0x20(%rbx)
movq %rax, 0x28(%rbx)
leaq 0x4(%rbx), %rax
leaq 0x5(%rbx), %rcx
movq %rcx, 0x30(%rbx)
movq %rax, 0x38(%rbx)
leaq 0x6(%rbx), %rax
leaq 0x7(%rbx), %rcx
movq %rcx, 0x40(%rbx)
movq %rax, 0x48(%rbx)
andw $0x0, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::ADDsbyteToSP()
ushort CPU::ADDsbyteToSP()
{
    Zero = false;
    Substract = false;
    tmp = gb->Read(PC);
    PC++;
    ushort newSP = SP;
    char* sb = (char*)&tmp;
    newSP += *sb;
    
    if (*sb < 0)
    {
        HalfCarry = (newSP & 0xF) <= (SP & 0xF);
        Carry = (newSP & 0xFF) <= (SP & 0xFF);
    }
    else
    {
        HalfCarry = (((SP & 0xF) + (tmp & 0xF)) & 0x10) == 0x10;
        Carry = (((SP & 0xFF) + (tmp & 0xFF)) & 0x100) == 0x100;
    }
    gb->SyncCycles(8);
    return newSP;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
andw $0x0, 0x8(%rdi)
movq 0x58(%rdi), %rdi
movzwl 0x50(%rbx), %esi
callq 0x2b34
movb %al, 0x55(%rbx)
incw 0x50(%rbx)
movzwl 0x52(%rbx), %edx
movsbl %al, %esi
leal (%rdx,%rsi), %r14d
movzbl %dl, %ecx
testb %sil, %sil
js 0x4748
andl $0xf, %edx
movzbl %al, %esi
andb $0xf, %al
movzbl %al, %eax
addl %edx, %eax
cmpl $0x10, %eax
setae %al
addl %esi, %ecx
cmpl $0x100, %ecx            # imm = 0x100
setae %cl
jmp 0x4762
movzwl %r14w, %esi
movl %esi, %eax
andl $0xf, %eax
andl $0xf, %edx
cmpl %edx, %eax
setbe %al
movzbl %sil, %edx
cmpl %ecx, %edx
setbe %cl
movb %al, 0xa(%rbx)
movb %cl, 0xb(%rbx)
movq 0x58(%rbx), %rdi
pushq $0x8
popq %rsi
callq 0x2adc
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::POP(unsigned char*, unsigned char*)
void CPU::POP(byte* h, byte* l)
{
    *l = gb->Read(SP);
    SP++;
    *h = gb->Read(SP);
    SP++;
    gb->SyncCycles(4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x58(%rdi), %rdi
movzwl 0x52(%r15), %esi
callq 0x2b34
movb %al, (%rbx)
movzwl 0x52(%r15), %eax
incl %eax
movw %ax, 0x52(%r15)
movq 0x58(%r15), %rdi
movzwl %ax, %esi
callq 0x2b34
movb %al, (%r14)
incw 0x52(%r15)
movq 0x58(%r15), %rdi
pushq $0x4
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2adc
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::ADC(unsigned char)
void CPU::ADC(byte value)
{
    byte carry = Carry ? 1 : 0;
    Substract = false;
    HalfCarry = (((*A & 0xF) + (value & 0xF) + carry) & 0x10) == 0x10;
    Carry = ((*A + value + carry) & 0x100) == 0x100;
    *A += value + carry;
    Zero = (*A) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0xb(%rdi), %ecx
movb $0x0, 0x9(%rdi)
movq 0x10(%rdi), %rax
movl %ecx, %edx
addl %esi, %edx
leal (%rcx,%rsi), %r8d
movb (%rax), %r9b
andb $0xf, %r9b
andb $0xf, %sil
addb %cl, %sil
addb %r9b, %sil
shrb $0x4, %sil
movb %sil, 0xa(%rdi)
movzbl (%rax), %ecx
addl %ecx, %edx
movb %dh, 0xb(%rdi)
addb %r8b, (%rax)
movq 0x10(%rdi), %rax
cmpb $0x0, (%rax)
sete 0x8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::OR(unsigned char)
void CPU::OR(byte value)
{
    HalfCarry = false;
    Substract = false;
    Carry = false;
    *A |= value;
    Zero = (*A) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andw $0x0, 0x9(%rdi)
movb $0x0, 0xb(%rdi)
movq 0x10(%rdi), %rax
orb %sil, (%rax)
movq 0x10(%rdi), %rax
cmpb $0x0, (%rax)
sete 0x8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::XOR(unsigned char)
void CPU::XOR(byte value)
{
    HalfCarry = false;
    Substract = false;
    Carry = false;
    *A ^= value;
    Zero = (*A) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andw $0x0, 0x9(%rdi)
movb $0x0, 0xb(%rdi)
movq 0x10(%rdi), %rax
xorb %sil, (%rax)
movq 0x10(%rdi), %rax
cmpb $0x0, (%rax)
sete 0x8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::SWAP(unsigned char*)
void CPU::SWAP(byte* value)
{
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
    Carry = false;
    *value = (*value & 0xF0) >> 4 | (*value) << 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, (%rsi)
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
movb $0x0, 0xb(%rdi)
rolb $0x4, (%rsi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RLC(unsigned char*)
void CPU::RLC(byte* value)
{
    Carry = ((*value >> 7) & 1) == 1;
    *value = *value >> 7 | (*value) << 1;
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
shrb $0x7, %al
movb %al, 0xb(%rdi)
movb (%rsi), %al
movl %eax, %ecx
rolb %cl
movb %cl, (%rsi)
testb %al, %al
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RL(unsigned char*)
void CPU::RL(byte* value)
{
    byte temp = (*value);
    *value = *value << 1 | (Carry ? 1 : 0);
    Carry = ((temp >> 7) & 1) == 1;
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
leal (%rax,%rax), %ecx
orb 0xb(%rdi), %cl
movb %cl, (%rsi)
shrb $0x7, %al
movb %al, 0xb(%rdi)
cmpb $0x0, (%rsi)
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RRC(unsigned char*)
void CPU::RRC(byte* value)
{
    Carry = (*value & 1) == 1;
    *value = (*value >> 1) | ((*value & 1) << 7);
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
andb $0x1, %al
movb %al, 0xb(%rdi)
movb (%rsi), %al
movl %eax, %ecx
rorb %cl
movb %cl, (%rsi)
testb %al, %al
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RR(unsigned char*)
void CPU::RR(byte* value)
{
    byte temp = (*value);
    *value = *value >> 1 | (Carry ? 0x80 : 0);
    Carry = (temp & 1) == 1;
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
movb 0xb(%rdi), %cl
movl %eax, %edx
shrb %dl
shlb $0x7, %cl
orb %dl, %cl
movb %cl, (%rsi)
andb $0x1, %al
movb %al, 0xb(%rdi)
cmpb $0x0, (%rsi)
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::SLA(unsigned char*)
void CPU::SLA(byte* value)
{
    Carry = (*value & 0x80) == 0x80;
    *value = *value << 1;
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
shrb $0x7, %al
movb %al, 0xb(%rdi)
movb (%rsi), %al
addb %al, %al
movb %al, (%rsi)
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::SRA(unsigned char*)
void CPU::SRA(byte* value)
{
    Carry = (*value & 1) == 1;
    *value = (*value & 0x80) | (*value) >> 1;
    Zero = *value == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
andb $0x1, %al
movb %al, 0xb(%rdi)
movb (%rsi), %al
movl %eax, %ecx
andb $-0x80, %cl
shrb %al
orb %cl, %al
movb %al, (%rsi)
sete 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::SRL(unsigned char*)
void CPU::SRL(byte* value)
{
    Carry = (*value & 1) == 1;
    *value = *value >> 1;
    Zero = (*value) == 0;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rsi), %al
andb $0x1, %al
movb %al, 0xb(%rdi)
movb (%rsi), %al
movl %eax, %ecx
shrb %cl
movb %cl, (%rsi)
cmpb $0x2, %al
setb 0x8(%rdi)
andw $0x0, 0x9(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::DAA()
void CPU::DAA()
{
    byte bias = Carry ? 0x60 : 0;

    bias += HalfCarry ? 0x6 : 0;

    if (Substract)
        *A -= bias;
    else
    {
        if ((*A & 0xF) > 9)
            bias |= 6;
        if (*A > 0x99)
        {
            bias |= 0x60;
            Carry = true;
        }
        *A += bias;
    }

    HalfCarry = false;

    Zero = (*A) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpb $0x0, 0xa(%rdi)
movl $0x6, %edx
cmovel %eax, %edx
cmpb $0x0, 0xb(%rdi)
movl $0x60, %esi
cmovel %eax, %esi
orl %esi, %edx
movq 0x10(%rdi), %rax
movb (%rax), %cl
cmpb $0x1, 0x9(%rdi)
jne 0x4bcc
subb %dl, %cl
jmp 0x4bf7
movl %ecx, %r8d
andb $0xe, %r8b
orb $0x6, %sil
cmpb $0xa, %r8b
movzbl %dl, %r8d
movzbl %sil, %edx
cmovbl %r8d, %edx
cmpb $-0x66, %cl
jb 0x4bf5
orb $0x60, %dl
movb $0x1, 0xb(%rdi)
movb (%rax), %cl
addb %dl, %cl
movb %cl, (%rax)
movb $0x0, 0xa(%rdi)
movq 0x10(%rdi), %rax
cmpb $0x0, (%rax)
sete 0x8(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::HALT()
void CPU::HALT()
{
    bool halt = gb->EnterHALTMode();
    if (!halt) {
        gb->Clock();
        PC--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
callq 0x2b88
testb %al, %al
jne 0x4c5f
movq 0x58(%rbx), %rdi
callq 0x2b7a
decw 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::STOP()
void CPU::STOP()
{
    if (gb->Read(PC) == 0x00)
    {
        gb->Stop = true;
        PC++;
        gb->SyncCycles(-4);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
movzwl 0x50(%rbx), %esi
callq 0x2b34
testb %al, %al
je 0x4c87
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x58(%rbx), %rdi
movb $0x1, 0x5b(%rdi)
incw 0x50(%rbx)
pushq $-0x4
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2adc
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RLCA()
void CPU::RLCA()
{
    Carry = ((*A >> 7) & 1) == 1;
    *A = *A >> 7 | (*A) << 1;
    Zero = false;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rax
movb (%rax), %cl
shrb $0x7, %cl
movb %cl, 0xb(%rdi)
rolb (%rax)
andw $0x0, 0x8(%rdi)
movb $0x0, 0xa(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RLA()
void CPU::RLA()
{
    byte temp = (*A);
    *A = *A << 1 | (Carry ? 1 : 0);
    Carry = ((temp >> 7) & 1) == 1;
    Zero = false;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rax
movb (%rax), %cl
leal (%rcx,%rcx), %edx
orb 0xb(%rdi), %dl
movb %dl, (%rax)
shrb $0x7, %cl
movb %cl, 0xb(%rdi)
andw $0x0, 0x8(%rdi)
movb $0x0, 0xa(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RRCA()
void CPU::RRCA()
{
    Carry = (*A & 1) == 1;
    *A = (*A >> 1) | ((*A & 1) << 7);
    Zero = false;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rax
movb (%rax), %cl
andb $0x1, %cl
movb %cl, 0xb(%rdi)
rorb (%rax)
andw $0x0, 0x8(%rdi)
movb $0x0, 0xa(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RRA()
void CPU::RRA()
{
    byte temp = (*A);
    *A = *A >> 1 | (Carry ? 0x80 : 0);
    Carry = (temp & 1) == 1;
    Zero = false;
    HalfCarry = false;
    Substract = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rax
movb (%rax), %cl
movb 0xb(%rdi), %dl
shlb $0x7, %dl
movl %ecx, %esi
shrb %sil
orb %dl, %sil
movb %sil, (%rax)
andb $0x1, %cl
movb %cl, 0xb(%rdi)
andw $0x0, 0x8(%rdi)
movb $0x0, 0xa(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::JP(bool)
void CPU::JP(bool flag)
{
    if (flag)
        PC = gb->ReadWord(PC);
    else
    {
        PC += 2;
        gb->SyncCycles(4);
    }
    gb->SyncCycles(4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4d8a
movq 0x58(%rbx), %rdi
movzwl 0x50(%rbx), %esi
callq 0x2b42
movw %ax, 0x50(%rbx)
jmp 0x4d9b
addw $0x2, 0x50(%rbx)
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x2adc
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2adc
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::JR(bool)
void CPU::JR(bool flag)
{
    byte value;
    char* sb;
    if (flag)
    {
        value = gb->Read(PC);
        sb = (char*)&value;
        PC = (ushort)(PC + *sb);
    }
    PC++;
    gb->SyncCycles(4);
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4dd1
movq 0x58(%rbx), %rdi
movzwl 0x50(%rbx), %esi
callq 0x2b34
movsbl %al, %eax
addw 0x50(%rbx), %ax
jmp 0x4dd5
movzwl 0x50(%rbx), %eax
incl %eax
movw %ax, 0x50(%rbx)
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2adc
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::CALL(bool)
void CPU::CALL(bool flag)
{
    if (flag)
    {
        SP -= 2;
        gb->WriteWord(SP, (ushort)(PC + 2));
        PC = gb->ReadWord(PC);
    }
    else
    {
        PC += 2;
        gb->SyncCycles(4);
    }
    gb->SyncCycles(4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4e31
movzwl 0x52(%rbx), %esi
addl $-0x2, %esi
movw %si, 0x52(%rbx)
movq 0x58(%rbx), %rdi
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movl 0x50(%rbx), %edx
addl $0x2, %edx
andl %eax, %edx
callq 0x2b50
movq 0x58(%rbx), %rdi
movzwl 0x50(%rbx), %esi
callq 0x2b42
movw %ax, 0x50(%rbx)
jmp 0x4e42
addw $0x2, 0x50(%rbx)
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x2adc
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2adc
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RST(unsigned short)
void CPU::RST(ushort addr)
{
    SP -= 2;
    gb->WriteWord(SP, PC);
    PC = addr;
    gb->SyncCycles(4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movzwl 0x52(%rdi), %eax
addl $-0x2, %eax
movw %ax, 0x52(%rdi)
movq 0x58(%rdi), %rdi
movzwl %ax, %esi
movzwl 0x50(%r14), %edx
callq 0x2b50
movw %bx, 0x50(%r14)
movq 0x58(%r14), %rdi
pushq $0x4
popq %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2adc
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/CPU.cpp
// Function: CPU::RET(bool)
void CPU::RET(bool flag)
{
    if (flag)
    {
        PC = gb->ReadWord(SP);
        SP += 2;
        gb->SyncCycles(4);
    }
    gb->SyncCycles(4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4ec1
movq 0x58(%rbx), %rdi
movzwl 0x52(%rbx), %esi
callq 0x2b42
movw %ax, 0x50(%rbx)
addw $0x2, 0x52(%rbx)
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x2adc
movq 0x58(%rbx), %rdi
pushq $0x4
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2adc
nop
// File: /workspace/github_cpp_makefile_star2_O2/klyushinmisha[P]GBEmu/./src/LCD.cpp
// Function: LCD::LCD()
LCD::LCD()
{
    this->gb = GameBoy::getInstance();
    this->RAM = gb->getRAM();
    background = new Background();
    //s = new Sprite(gb);
    //window = new Window(gb);
    //sID = new byte[10];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x271a
movq %rax, (%rbx)
movq 0x48(%rax), %rax
movq %rax, 0x10(%rbx)
pushq $0x10
popq %rdi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
callq 0x50a0
movq %r14, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2310