LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Game.cpp
// Function: Game::winMessage()
void Game::winMessage() {
    if (chewbaccaFree) {
    cout << "You quickly glance around the Launch Bay. Luckily, there is one star ship available for you to commandeer and escape the ship. As you board the ship, Poe and Chewbacca run up the ramp to give you a high five for defeating Kylo Ren. The action music again starts to blare as alarms go off in the launch bay. You fire up the engines and take off from the ship knowing that Supreme Leader Snoke still needs to be found and dealt with. After a long deliberation with Poe and Chewbacca, you all decide to stop at the Mos Eisley cantina for a well deserved break! As you engage the light drive, the ship you left behind disintegrates into billions of pieces... Chewy must have made some modifications in the core reactor." << endl << endl;
    } else {
        cout << "You quickly glance around the Launch Bay. Luckily, there is one star ship available for you to commandeer and escape the ship. As you board the ship, Poe runs up the ramp to give you a high five for defeating Kylo Ren. The action music again starts to blare as alarms go off in the launch bay. You fire up the engines and take off from the ship knowing that Supreme Leader Snoke still needs to be found and dealt with. After a long deliberation with Poe, you all decide to stop at the Mos Eisley cantina for a well deserved break! As you engage the light drive, you hear a faint grrrwaaaaaarggggh and can't help but to think that someone was left in the detention block. Oh well... " << endl << endl;
    }
    
    cout << "Congratulation you have COMPLETED this Star Wars adventure!" << endl << endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0x23(%rdi)
jne 0x5cc5
movq 0x8319(%rip), %rdi      # 0xdfd0
leaq 0x3891(%rip), %rsi      # 0x954f
movl $0x2cb, %edx            # imm = 0x2CB
jmp 0x5cd8
movq 0x8304(%rip), %rdi      # 0xdfd0
leaq 0x3b48(%rip), %rsi      # 0x981b
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x2160
movq 0x82ec(%rip), %rbx      # 0xdfd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x3d8a(%rip), %rsi      # 0x9ac6
movl $0x3b, %edx
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Game.cpp
// Function: Game::printItems()
void Game::printItems() {
    cout << setw(18) << "Inventory" << endl  //Header
    << "---------------------------------" << endl;
    for (int i = 0; i < inventory.size(); i++) {
        cout << inventory[i].itemName << ": " << inventory[i].itemDescription << endl;
    }
    cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x7f65(%rip), %rbx      # 0xdfd0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rbx,%rax)
leaq 0x2cd2(%rip), %rsi      # 0x8d54
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
leaq 0x2c9e(%rip), %rsi      # 0x8d5e
movl $0x21, %edx
movq %rax, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq 0x30(%r14), %rax
cmpq %rax, 0x38(%r14)
je 0x6193
xorl %ebp, %ebp
movq 0x7ec5(%rip), %r15      # 0xdfd0
leaq 0x212e(%rip), %r12      # 0x8240
xorl %ebx, %ebx
movq (%rax,%rbp), %rsi
movq 0x8(%rax,%rbp), %rdx
movq %r15, %rdi
callq 0x2160
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
movq 0x30(%r14), %rax
movq 0x20(%rax,%rbp), %rsi
movq 0x28(%rax,%rbp), %rdx
movq %r13, %rdi
callq 0x2160
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
incq %rbx
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
addq $0x40, %rbp
cmpq %rbx, %rcx
ja 0x6114
movq 0x7e36(%rip), %rbx      # 0xdfd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Game.cpp
// Function: Game::addLightsaber()
void Game::addLightsaber() {
    Items lightsaber;
    lightsaber.itemName = "GREEN LIGHT SABER: ";
    lightsaber.itemDescription = "The weapon of choice for a jedi.";
    inventory.push_back(lightsaber);
    kyloWinGame = false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4308
movq 0x8(%r14), %rdx
leaq 0x2b8e(%rip), %rcx      # 0x8d80
movl $0x13, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x21c0
leaq 0x28(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x2b82(%rip), %rcx      # 0x8d94
movl $0x20, %r8d
xorl %esi, %esi
callq 0x21c0
leaq 0x30(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6368
movb $0x0, 0x21(%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x624c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2150
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6267
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6392
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Game.cpp
// Function: Game::addPaper()
void Game::addPaper() {
    Items accessCode;
    accessCode.itemName = "CRUMPLED PAPER: ";
    accessCode.itemDescription = "There is some writing in Ewokese: 1225... how mysterious...";
    inventory.push_back(accessCode);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4308
movq 0x8(%r14), %rdx
leaq 0x2b0f(%rip), %rcx      # 0x8db5
movl $0x10, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x21c0
leaq 0x28(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x2b00(%rip), %rcx      # 0x8dc6
movl $0x3b, %r8d
xorl %esi, %esi
callq 0x21c0
addq $0x30, %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6368
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x62ff
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2150
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x631a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6392
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/getInteger.cpp
// Function: getInteger()
int getInteger() {                      //See code citation in comment at top of page
    int integer;
    while (true) {
        string line;
        getline(cin, line);
        
        istringstream stream(line);
        stream >> integer;
        if (!stream.fail() && stream.eof() && integer >= 0) { //Num Validation & Pos Number Validation
            break;
        } else {
            cout << "The value you entered is not a valid integer. Please \n"
                    << "enter another integer: ";
        }
    }
    
    return integer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
leaq 0x18(%rsp), %r13
movq 0x7833(%rip), %r14      # 0xdfe0
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
movq 0x7812(%rip), %rbx      # 0xdfd0
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2240
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x21e0
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0x20c0
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x48(%rsp,%rax), %eax
testb $0x5, %al
je 0x688a
movl $0x36, %edx
movq %rbx, %rdi
leaq 0x3304(%rip), %rsi      # 0x9b34
callq 0x2160
movb $0x1, %bpl
movl $0x17, %edx
movq %rbx, %rdi
leaq 0x3324(%rip), %rsi      # 0x9b6b
callq 0x2160
movq %r12, %rdi
movq 0x7772(%rip), %rsi      # 0xdfc8
callq 0x2190
leaq 0xa0(%rsp), %rdi
callq 0x2060
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x687f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
testb %bpl, %bpl
jne 0x67be
jmp 0x6899
testb $0x2, %al
je 0x6821
cmpl $0x0, 0x4(%rsp)
js 0x6821
xorl %ebp, %ebp
jmp 0x684c
movl 0x4(%rsp), %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x68b1
movq %rax, %rbx
jmp 0x68d7
movq %rax, %rbx
movq 0x7708(%rip), %rsi      # 0xdfc8
leaq 0x28(%rsp), %rdi
callq 0x2190
leaq 0xa0(%rsp), %rdi
callq 0x2060
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x68ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Door.cpp
// Function: Door::Door()
Door::Door() {
    Space::roomName = "Door";
    Space::roomDescription= "There appears to be a big startanium door impeding the way. It looks like some access code needs to be entered.";
    
    Space::top = new Corridor;
    Space::top->setBottom(this);
    Space::bottom = new KyloSpace;
    Space::bottom->setTop(this);
    Space::left = nullptr;
    Space::right = nullptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x754c
leaq 0x7394(%rip), %rax      # 0xdca0
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
leaq 0x33d9(%rip), %rcx      # 0x9cf7
movl $0x4, %r8d
xorl %esi, %esi
callq 0x21c0
leaq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rdx
leaq 0x3260(%rip), %rcx      # 0x9b9a
movl $0x6f, %r8d
xorl %esi, %esi
callq 0x21c0
movl $0x68, %edi
callq 0x2140
movq %rax, %r15
movq %rax, %rdi
callq 0x4410
movq %r15, 0x48(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76b8
movl $0x68, %edi
callq 0x2140
movq %rax, %r15
movq %rax, %rdi
callq 0x7148
movq %r15, 0x50(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76b2
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
popq %rbx
popq %r14
popq %r15
retq
jmp 0x699e
movq %rax, %r14
movl $0x68, %esi
movq %r15, %rdi
callq 0x2150
jmp 0x69b3
movq %rax, %r14
movq %rbx, %rdi
callq 0x75fa
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/DetentionBlock.cpp
// Function: DetentionBlock::DetentionBlock()
DetentionBlock::DetentionBlock() {
    Space::roomName = "Detention Block";
    Space::roomDescription= "A bunch of cells line the wall of the room. It appears there is only one prisoner currently in the First Order's captivity. Who could it be?";
    
    Space::top = nullptr;
    Space::bottom = nullptr;
    Space::left = nullptr;
    Space::right = nullptr;
    
    doorOpen = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x754c
leaq 0x7015(%rip), %rax      # 0xdce8
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
leaq 0x2f50(%rip), %rcx      # 0x9c35
movl $0xf, %r8d
xorl %esi, %esi
callq 0x21c0
leaq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rdx
leaq 0x2f44(%rip), %rcx      # 0x9c45
movl $0x8c, %r8d
xorl %esi, %esi
callq 0x21c0
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movb $0x0, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x75fa
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/DetentionBlock.cpp
// Function: DetentionBlock::printChoices()
void DetentionBlock::printChoices() {
    if (!doorOpen) {
        cout << "1) North - Core Reactor" << endl
             << "2) Item Inventory " << endl
             << "3) Look around" << endl
             << "4) Open Cell Door" << endl << endl;
    } else {
        cout << "1) North " << endl
        << "2) Item Inventory " << endl
        << "3) Look around" << endl << endl;
    }
}

// Assembly:
pushq %rbx
cmpb $0x0, 0x68(%rdi)
je 0x6e37
movq 0x7226(%rip), %rbx      # 0xdfd0
leaq 0x2f4b(%rip), %rsi      # 0x9cfc
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x1580(%rip), %rsi      # 0x836f
movl $0x12, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x1555(%rip), %rsi      # 0x8382
movl $0xe, %edx
jmp 0x6f04
movq 0x7192(%rip), %rbx      # 0xdfd0
leaq 0x2e8d(%rip), %rsi      # 0x9cd2
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x14ec(%rip), %rsi      # 0x836f
movl $0x12, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x14c1(%rip), %rsi      # 0x8382
movl $0xe, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
leaq 0x2deb(%rip), %rsi      # 0x9cea
movl $0x11, %edx
movq %rax, %rdi
callq 0x2160
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
jmp 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/DetentionBlock.cpp
// Function: DetentionBlock::getChoice[abi:cxx11]()
string DetentionBlock::getChoice() {
    if (!doorOpen) {
        cout << "Please select a choice (enter integer): ";
        int choice = getInteger();
        validate(choice, 1, 4);
        cout << endl;
        
        if (choice == 1) {
            return "north";
        } else if (choice == 2) {
            return "items";
        } else if (choice == 3){
            return "look";
        } else {
            doorOpen = true;
            return "open";
        }
    } else {
        cout << "Please select a choice (enter integer): ";
        int choice = getInteger();
        validate(choice, 1, 4);
        cout << endl;
        
        if (choice == 1) {
            return "north";
        } else if (choice == 2) {
            return "items";
        } else {
            return "look";
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb 0x68(%rsi), %bpl
movq 0x7055(%rip), %r15      # 0xdfd0
leaq 0x1298(%rip), %rsi      # 0x821a
movl $0x28, %edx
movq %r15, %rdi
callq 0x2160
testb %bpl, %bpl
je 0x7011
callq 0x6790
leaq 0x8(%rsp), %r14
movl %eax, (%r14)
movq %r14, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x3d98
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl (%r14), %eax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpl $0x2, %eax
je 0x7091
cmpl $0x1, %eax
jne 0x70a9
leaq 0x1246(%rip), %rsi      # 0x8243
leaq 0x1244(%rip), %rdx      # 0x8248
movq %rbx, %rdi
callq 0x2b74
jmp 0x7121
callq 0x6790
leaq 0xc(%rsp), %r12
movl %eax, (%r12)
movq %r12, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x3d98
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl (%r12), %eax
cmpl $0x3, %eax
je 0x70e0
cmpl $0x2, %eax
je 0x70c1
cmpl $0x1, %eax
jne 0x70ff
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x11c6(%rip), %rsi      # 0x8243
leaq 0x11c4(%rip), %rdx      # 0x8248
movq %rbx, %rdi
callq 0x2b74
jmp 0x7121
leaq 0x11bc(%rip), %rsi      # 0x8254
leaq 0x11ba(%rip), %rdx      # 0x8259
movq %rbx, %rdi
callq 0x2b74
jmp 0x7121
leaq 0x11aa(%rip), %rsi      # 0x825a
leaq 0x11a7(%rip), %rdx      # 0x825e
movq %rbx, %rdi
callq 0x2b74
jmp 0x7121
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1185(%rip), %rsi      # 0x8254
leaq 0x1183(%rip), %rdx      # 0x8259
movq %rbx, %rdi
callq 0x2b74
jmp 0x7121
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x116c(%rip), %rsi      # 0x825a
leaq 0x1169(%rip), %rdx      # 0x825e
movq %rbx, %rdi
callq 0x2b74
jmp 0x7121
movb $0x1, 0x68(%r14)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1b1d(%rip), %rsi      # 0x8c2f
leaq 0x1b1a(%rip), %rdx      # 0x8c33
movq %rbx, %rdi
callq 0x2b74
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x713d
jmp 0x713d
jmp 0x713d
jmp 0x713d
jmp 0x713d
jmp 0x713d
movq %rax, %rdi
callq 0x2220
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/KyloSpace.cpp
// Function: KyloSpace::KyloSpace()
KyloSpace::KyloSpace() {
    Space::roomName = "Command Center";
    Space::roomDescription= "The Command Center where all the nefarious bad guys tend to hang out. Oh look, Kylo Ren is here and he does not look happy to see you!";
    
    Space::top = nullptr;
    Space::bottom = new SnokeSpace;
    Space::bottom->setTop(this);
    Space::left = new LaunchBay;
    Space::left->setRight(this);
    Space::right = new SnokeSpace;
    Space::right->setLeft(this);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x754c
leaq 0x6bd4(%rip), %rax      # 0xdd30
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
leaq 0x2aa7(%rip), %rcx      # 0x9c15
movl $0xe, %r8d
xorl %esi, %esi
callq 0x21c0
leaq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rdx
leaq 0x2ba9(%rip), %rcx      # 0x9d33
movl $0x86, %r8d
xorl %esi, %esi
callq 0x21c0
movq $0x0, 0x48(%rbx)
movl $0x68, %edi
callq 0x2140
movq %rax, %r15
movq %rax, %rdi
callq 0x2c04
movq %r15, 0x50(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76b2
movl $0x68, %edi
callq 0x2140
movq %rax, %r15
movq %rax, %rdi
callq 0x2dcc
movq %r15, 0x60(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76c4
movl $0x68, %edi
callq 0x2140
movq %rax, %r15
movq %rax, %rdi
callq 0x2c04
movq %r15, 0x58(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x76be
popq %rbx
popq %r14
popq %r15
retq
jmp 0x7215
jmp 0x7215
movq %rax, %r14
movl $0x68, %esi
movq %r15, %rdi
callq 0x2150
jmp 0x722a
movq %rax, %r14
movq %rbx, %rdi
callq 0x75fa
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Space.cpp
// Function: Space::Space()
Space::Space() {
    Space::roomName = "";
    Space::roomDescription= "";
    
    Space::top = nullptr;
    Space::bottom = nullptr;
    Space::left = nullptr;
    Space::right = nullptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
leaq 0x6819(%rip), %rax      # 0xdd78
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %r14
movq %r14, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r12
leaq 0x38(%rdi), %r13
movq %r13, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0xba0(%rip), %rcx       # 0x8131
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x21c0
movq 0x30(%r15), %rdx
leaq 0xb86(%rip), %rcx       # 0x8131
movq %r12, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21c0
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x75e7
movq (%r13), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2299
movq %r15, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/./acutest.h
// Function: acutest_finish_test_line_
static void
acutest_finish_test_line_(enum acutest_state_ state)
{
    if(acutest_tap_) {
        printf("%s %d - %s%s\n",
                (state == ACUTEST_STATE_SUCCESS || state == ACUTEST_STATE_SKIPPED) ? "ok" : "not ok",
                acutest_current_index_ + 1,
                acutest_current_test_->name,
                (state == ACUTEST_STATE_SKIPPED) ? " # SKIP" : "");

        if(state == ACUTEST_STATE_SUCCESS  &&  acutest_timer_) {
            printf("# Duration: ");
            acutest_timer_print_diff_();
            printf("\n");
        }
    } else {
        int color;
        const char* str;

        switch(state) {
            case ACUTEST_STATE_SUCCESS: color = ACUTEST_COLOR_GREEN_INTENSIVE_; str = "OK"; break;
            case ACUTEST_STATE_SKIPPED: color = ACUTEST_COLOR_YELLOW_INTENSIVE_; str = "SKIPPED"; break;
            case ACUTEST_STATE_FAILED:  /* Fall through. */
            default:                    color = ACUTEST_COLOR_RED_INTENSIVE_; str = "FAILED"; break;
        }

        printf("[ ");
        acutest_colored_printf_(color, "%s", str);
        printf(" ]");

        if(state == ACUTEST_STATE_SUCCESS  &&  acutest_timer_) {
            printf("  ");
            acutest_timer_print_diff_();
        }

        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpb $0x1, 0x89d6(%rip)      # 0xb494
jne 0x2b23
cmpl $0x2, %ebx
leaq 0x4de1(%rip), %rax      # 0x78ab
leaq 0x4dd6(%rip), %rsi      # 0x78a7
cmoveq %rax, %rsi
leaq 0x4dd2(%rip), %rcx      # 0x78ae
leaq 0x4faf(%rip), %r8       # 0x7a92
cmoveq %rcx, %r8
testl %ebx, %ebx
movl 0x89c1(%rip), %edx      # 0xb4b0
movq 0x8852(%rip), %rcx      # 0xb348
movq (%rcx), %rcx
cmoveq %rax, %rsi
incl %edx
leaq 0x4d93(%rip), %rdi      # 0x7899
xorl %eax, %eax
callq 0x2180
testl %ebx, %ebx
jne 0x2b3a
cmpl $0x0, 0x899c(%rip)      # 0xb4b4
je 0x2b3a
leaq 0x4d95(%rip), %rdi      # 0x78b6
jmp 0x2b9c
testl %ebx, %ebx
je 0x2b3f
cmpl $0x2, %ebx
jne 0x2b4d
leaq 0x4d93(%rip), %r14      # 0x78c6
movl $0xd, %ebp
jmp 0x2b59
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x4d7d(%rip), %r14      # 0x78c3
movl $0xc, %ebp
jmp 0x2b59
leaq 0x4d7a(%rip), %r14      # 0x78ce
movl $0xb, %ebp
leaq 0x4d75(%rip), %rdi      # 0x78d5
xorl %eax, %eax
callq 0x2180
leaq 0x4dbc(%rip), %rsi      # 0x792a
movl %ebp, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2c57
leaq 0x4d57(%rip), %rdi      # 0x78d8
xorl %eax, %eax
callq 0x2180
testl %ebx, %ebx
jne 0x2be3
cmpl $0x0, 0x8921(%rip)      # 0xb4b4
je 0x2be3
leaq 0x45e5(%rip), %rdi      # 0x7181
xorl %eax, %eax
callq 0x2180
movq 0x891e(%rip), %rax      # 0xb4c8
movq 0x891f(%rip), %rcx      # 0xb4d0
subq 0x8900(%rip), %rax      # 0xb4b8
cvtsi2sd %rax, %xmm1
subq 0x88fc(%rip), %rcx      # 0xb4c0
cvtsi2sd %rcx, %xmm0
divsd 0x4437(%rip), %xmm0     # 0x7008
addsd %xmm1, %xmm0
leaq 0x4cff(%rip), %rdi      # 0x78db
movb $0x1, %al
callq 0x2180
movl $0xa, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/./acutest.h
// Function: acutest_line_indent_
static void
acutest_line_indent_(int level)
{
    static const char spaces[] = "                ";
    int n = level * 2;

    if(acutest_tap_  &&  n > 0) {
        n--;
        printf("#");
    }

    while(n > 16) {
        printf("%s", spaces);
        n -= 16;
    }
    printf("%.*s", n, spaces);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
addl %ebx, %ebx
cmpb $0x1, 0x8893(%rip)      # 0xb494
jne 0x2c0f
decl %ebx
movl $0x23, %edi
callq 0x2050
cmpl $0x11, %ebx
jl 0x2c3b
leaq 0x4d0f(%rip), %r14      # 0x792a
leaq 0x444e(%rip), %r15      # 0x7070
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2180
leal -0x10(%rbx), %esi
cmpl $0x20, %ebx
movl %esi, %ebx
jg 0x2c22
jmp 0x2c3d
movl %ebx, %esi
leaq 0x4ca2(%rip), %rdi      # 0x78e6
leaq 0x4425(%rip), %rdx      # 0x7070
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x2180
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/./acutest.h
// Function: acutest_case_
acutest_case_(const char* fmt, ...)
{
    va_list args;

    if(acutest_verbose_level_ < 2)
        return;

    if(acutest_case_name_[0]) {
        acutest_case_already_logged_ = 0;
        acutest_case_name_[0] = '\0';
    }

    if(fmt == NULL)
        return;

    va_start(args, fmt);
    vsnprintf(acutest_case_name_, sizeof(acutest_case_name_) - 1, fmt, args);
    va_end(args);
    acutest_case_name_[sizeof(acutest_case_name_) - 1] = '\0';

    if(acutest_verbose_level_ >= 3) {
        acutest_line_indent_(1);
        acutest_colored_printf_(ACUTEST_COLOR_DEFAULT_INTENSIVE_, "Case %s:\n", acutest_case_name_);
        acutest_test_already_logged_++;
        acutest_case_already_logged_++;
    }
}

// Assembly:
subq $0xd8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2dd7
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x2, 0x8442(%rip)      # 0xb220
jl 0x2e7f
movq %rdi, %r10
cmpb $0x0, 0x8572(%rip)      # 0xb360
je 0x2e01
movl $0x0, 0x855e(%rip)      # 0xb358
movb $0x0, 0x855f(%rip)      # 0xb360
testq %r10, %r10
je 0x2e7f
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x852e(%rip), %rdi      # 0xb360
movl $0x3f, %esi
movq %r10, %rdx
callq 0x20d0
movb $0x0, 0x8559(%rip)      # 0xb39f
cmpl $0x3, 0x83d3(%rip)      # 0xb220
jl 0x2e7f
movl $0x1, %edi
callq 0x2bf1
leaq 0x4302(%rip), %rsi      # 0x7162
leaq 0x84f9(%rip), %rdx      # 0xb360
movl $0xa, %edi
xorl %eax, %eax
callq 0x2c57
incl 0x84cb(%rip)            # 0xb344
incl 0x84d9(%rip)            # 0xb358
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/./acutest.h
// Function: acutest_message_
acutest_message_(const char* fmt, ...)
{
    char buffer[TEST_MSG_MAXSIZE];
    char* line_beg;
    char* line_end;
    va_list args;

    if(acutest_verbose_level_ < 2)
        return;

    /* We allow extra message only when something is already wrong in the
     * current test. */
    if(acutest_current_test_ == NULL  ||  !acutest_cond_failed_)
        return;

    va_start(args, fmt);
    vsnprintf(buffer, TEST_MSG_MAXSIZE, fmt, args);
    va_end(args);
    buffer[TEST_MSG_MAXSIZE-1] = '\0';

    line_beg = buffer;
    while(1) {
        line_end = strchr(line_beg, '\n');
        if(line_end == NULL)
            break;
        acutest_line_indent_(acutest_case_name_[0] ? 3 : 2);
        printf("%.*s\n", (int)(line_end - line_beg), line_beg);
        line_beg = line_end + 1;
    }
    if(line_beg[0] != '\0') {
        acutest_line_indent_(acutest_case_name_[0] ? 3 : 2);
        printf("%s\n", line_beg);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2ee7
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x2, 0x8332(%rip)      # 0xb220
jl 0x2fdc
cmpq $0x0, 0x844c(%rip)      # 0xb348
je 0x2fdc
cmpl $0x0, 0x8497(%rip)      # 0xb3a0
je 0x2fdc
movq %rdi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x20d0
movb $0x0, 0x3ff(%rbx)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
testq %rax, %rax
je 0x2fbb
movq %rax, %r14
leaq 0xd0(%rsp), %rbx
leaq 0x41f2(%rip), %r15      # 0x716c
cmpb $0x1, 0x83df(%rip)      # 0xb360
movl $0x3, %edi
sbbl $0x0, %edi
callq 0x2bf1
movl %r14d, %esi
subl %ebx, %esi
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2180
movq %r14, %rbx
incq %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movq %rax, %r14
testq %rax, %rax
jne 0x2f7a
cmpb $0x0, (%rbx)
je 0x2fdc
cmpb $0x1, 0x8399(%rip)      # 0xb360
movl $0x3, %edi
sbbl $0x0, %edi
callq 0x2bf1
movq %rbx, %rdi
callq 0x20a0
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/./acutest.h
// Function: acutest_abort_
void
acutest_abort_(void)
{
    if(acutest_abort_has_jmp_buf_) {
        longjmp(acutest_abort_jmp_buf_, 1);
    } else {
        if(acutest_current_test_ != NULL)
            acutest_fini_(acutest_current_test_->name);
        fflush(stdout);
        fflush(stderr);
        acutest_exit_(ACUTEST_STATE_FAILED);
    }
}

// Assembly:
pushq %rax
cmpb $0x1, 0x81fa(%rip)      # 0xb3a4
jne 0x31bd
leaq 0x81fd(%rip), %rdi      # 0xb3b0
movl $0x1, %esi
callq 0x22e0
movq 0x7e0c(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22a0
movq 0x7e1d(%rip), %rax      # 0xaff0
movq (%rax), %rdi
callq 0x22a0
movl $0x1, %edi
callq 0x31e5
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart_test.c
// Function: test_open
void test_open(void)
{
    struct simple_uart *uart;
    pid_t pid;

    pid = setup_loopback();

    uart = simple_uart_open(UART_LOOPBACK_1, 115200, "8N1");
    TEST_ASSERT(uart != NULL);
    simple_uart_close(uart);

    shutdown_loopback(pid);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x4256
movl %eax, %ebx
leaq 0x315e(%rip), %rdi      # 0x7347
leaq 0x3162(%rip), %rdx      # 0x7352
movl $0x1c200, %esi          # imm = 0x1C200
callq 0x5b0d
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
leaq 0x3149(%rip), %rsi      # 0x7356
leaq 0x3716(%rip), %rcx      # 0x792a
leaq 0x314e(%rip), %r8       # 0x7369
movl $0x41, %edx
xorl %eax, %eax
callq 0x28d6
testl %eax, %eax
je 0x4251
movq %r14, %rdi
callq 0x5ad5
movl %ebx, %edi
movl $0x1, %esi
callq 0x2270
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22f0
callq 0x31a2
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart_test.c
// Function: setup_loopback
static pid_t setup_loopback(void)
{
    pid_t pid;
    char *const args[] = {"socat", "PTY,link=" UART_LOOPBACK_1 ",raw,echo=0,iexten=0",
                          "PTY,link=" UART_LOOPBACK_2 ",raw,echo=0,iexten=0", NULL};
    pid = fork();

    TEST_ASSERT(pid >= 0);

    if (pid == 0) {
        execvp(args[0], args);
    }
    /* Give it time to start */
    usleep(100000);
    return pid;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movaps 0x6b6e(%rip), %xmm0     # 0xadd0
movaps %xmm0, 0x10(%rsp)
movaps 0x6b52(%rip), %xmm0     # 0xadc0
movaps %xmm0, (%rsp)
callq 0x23c0
movl %eax, %ebx
movl %eax, %edi
notl %edi
shrl $0x1f, %edi
leaq 0x30cf(%rip), %rsi      # 0x7356
leaq 0x369c(%rip), %rcx      # 0x792a
leaq 0x3a3a(%rip), %r8       # 0x7ccf
movl $0x28, %edx
xorl %eax, %eax
callq 0x28d6
testl %eax, %eax
je 0x42c6
testl %ebx, %ebx
jne 0x42b4
movq %rsp, %rsi
movq (%rsi), %rdi
callq 0x2350
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x2410
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
callq 0x31a2
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/./acutest.h
// Function: acutest_error_
acutest_error_(const char* fmt, ...)
{
    if(acutest_verbose_level_ == 0)
        return;

    if(acutest_verbose_level_ >= 2) {
        va_list args;

        acutest_line_indent_(1);
        if(acutest_verbose_level_ >= 3)
            acutest_colored_printf_(ACUTEST_COLOR_RED_INTENSIVE_, "ERROR: ");
        va_start(args, fmt);
        vprintf(fmt, args);
        va_end(args);
        printf("\n");
    }

    if(acutest_verbose_level_ >= 3) {
        printf("\n");
    }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
testb %al, %al
je 0x54e6
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movl 0x5d1b(%rip), %eax      # 0xb220
testl %eax, %eax
je 0x5581
cmpl $0x2, %eax
jl 0x556e
movq %rdi, %rbx
movl $0x1, %edi
callq 0x2bf1
cmpl $0x3, 0x5cfe(%rip)      # 0xb220
jl 0x5537
leaq 0x26f3(%rip), %rsi      # 0x7c1e
movl $0xb, %edi
xorl %eax, %eax
callq 0x2c57
leaq 0x20(%rsp), %rax
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x22b0
movl $0xa, %edi
callq 0x2050
cmpl $0x3, 0x5cab(%rip)      # 0xb220
jl 0x5581
movl $0xa, %edi
callq 0x2050
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart.c
// Function: simple_uart_write
ssize_t simple_uart_write(struct simple_uart *sc, const void *buffer, size_t len)
{
    if (!sc || !buffer)
        return -EINVAL;
    if (len == 0)
        return 0; // Nothing to write, but not an error

#ifdef _WIN32
    ssize_t r = 0;
    DWORD bytes_written = 0;
    /* TODO: Support char_delay_us */
    if (len > ULONG_MAX)
        len = ULONG_MAX; // avoid overflow at typecast
    if (!WriteFile(sc->port, buffer, (DWORD)len, &bytes_written, NULL))
        return win32_errno();
    r = (ssize_t)bytes_written;
#else
    ssize_t r;
    if (len > SSIZE_MAX)
        len = SSIZE_MAX; // avoid overflow at cast to signed type
    if (sc->char_delay_us > 0) {
        const uint8_t *buf8 = buffer;
        for (size_t i = 0; i < len; i++) {
            ssize_t e = write(sc->fd, &buf8[i], 1);
            if (e < 0)
                return e;
            if (e == 0)
                return (ssize_t)i;
            usleep(sc->char_delay_us);
        }
        r = (ssize_t)len;
    } else {
        r = write(sc->fd, buffer, len);
        if (r < 0)
            r = -errno;
    }
#endif

    if (r > 0 && sc->logfile) {
        fwrite(buffer, (size_t)r, 1, sc->logfile);
        fflush(sc->logfile);
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
movq $-0x16, %r12
orb %al, %cl
jne 0x5ac3
testq %rdx, %rdx
je 0x5a74
movq %rsi, %r14
movq %rdi, %rbx
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
cmpq %r15, %rdx
cmovbq %rdx, %r15
cmpl $0x0, 0x4(%rdi)
je 0x5a79
movb $0x1, %bpl
xorl %r13d, %r13d
movl (%rbx), %edi
leaq (%r14,%r13), %rsi
movl $0x1, %edx
callq 0x2110
testq %rax, %rax
js 0x5a50
je 0x5a57
movl 0x4(%rbx), %edi
callq 0x2410
movb $0x1, %cl
jmp 0x5a5c
xorl %ecx, %ecx
movq %rax, %r12
jmp 0x5a5c
xorl %ecx, %ecx
movq %r13, %r12
testb %cl, %cl
je 0x5a6c
incq %r13
cmpq %r15, %r13
setb %bpl
jne 0x5a2d
testb $0x1, %bpl
je 0x5a99
jmp 0x5ac3
xorl %r12d, %r12d
jmp 0x5ac3
movl (%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2110
movq %rax, %r15
testq %rax, %rax
jns 0x5a99
callq 0x2060
movslq (%rax), %r15
negq %r15
testq %r15, %r15
jle 0x5ac0
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x5ac0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2390
movq 0x8(%rbx), %rdi
callq 0x22a0
movq %r15, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart.c
// Function: simple_uart_has_data
int simple_uart_has_data(struct simple_uart *sc)
{
    if (!sc)
        return 0;

#ifdef _WIN32
    COMSTAT cs;
    DWORD r;
    if (!ClearCommError(sc->port, NULL, &cs)) {
        return 0;
    }
    r = cs.cbInQue;
    if (r > INT_MAX)
        r = INT_MAX;
    return (int)r;
#else
    int bytes_available;
    if (ioctl(sc->fd, FIONREAD, &bytes_available) < 0)
        return -errno;
    return bytes_available;
#endif
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x618b
movl (%rdi), %edi
xorl %ebx, %ebx
leaq 0xc(%rsp), %rdx
movl $0x541b, %esi           # imm = 0x541B
xorl %eax, %eax
callq 0x21c0
testl %eax, %eax
js 0x618f
movl 0xc(%rsp), %ebx
jmp 0x6196
xorl %ebx, %ebx
jmp 0x6196
callq 0x2060
subl (%rax), %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart.c
// Function: readfile
static bool readfile(const char *dir, const char *filename, char *result, size_t max_result_len)
{
    FILE *fp;
    size_t len = 0;
    char path[PATH_MAX];
    snprintf(path, sizeof(path), "%s/%s", dir, filename);
    result[0] = '\0';
    if ((fp = fopen(path, "rb")) != NULL) {
        len = fread(result, 1, max_result_len - 1, fp);
        if (len) {
            result[len - 1] = '\0';
        }
        fclose(fp);
    }
    return len != 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdx, %rbx
movq %rsi, %r8
movq %rdi, %rcx
leaq 0x1d31(%rip), %rdx      # 0x840a
xorl %ebp, %ebp
movq %rsp, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %eax, %eax
callq 0x2190
movb $0x0, (%rbx)
leaq 0x1d19(%rip), %rsi      # 0x8410
movq %r14, %rdi
callq 0x2330
testq %rax, %rax
je 0x6739
movq %rax, %r14
movl $0x1, %esi
movl $0xff, %edx
movq %rbx, %rdi
movq %rax, %rcx
callq 0x20c0
movq %rax, %r15
testq %rax, %rax
je 0x672a
movb $0x0, -0x1(%rbx,%r15)
movq %r14, %rdi
callq 0x2130
testq %r15, %r15
setne %bpl
movl %ebp, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart.c
// Function: simple_uart_set_logfile
int simple_uart_set_logfile(struct simple_uart *uart, const char *logfile, ...)
{
    va_list ap;
    char *buffer;
    int len;

    if (!uart || !logfile)
        return -EINVAL;

    va_start(ap, logfile);
    len = vasprintf(&buffer, logfile, ap);
    va_end(ap);
    if (len < 0)
        return -errno;
    if (uart->logfile) {
        fclose(uart->logfile);
        uart->logfile = NULL;
    }
    uart->logfile = fopen(buffer, "a");
    if (!uart->logfile) {
        int e = -errno;
        free(buffer);
        return e;
    }
    free(buffer);
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xe8, %rsp
movq %rdx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x58(%rsp)
testb %al, %al
je 0x67a4
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
orb %al, %cl
jne 0x6851
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
leaq 0x8(%rsp), %rdi
callq 0x2120
testl %eax, %eax
js 0x6833
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x680b
callq 0x2130
movq $0x0, 0x8(%rbx)
movq 0x8(%rsp), %rdi
leaq 0xd12(%rip), %rsi       # 0x7529
callq 0x2330
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x683e
movq 0x8(%rsp), %rdi
callq 0x2040
xorl %ebp, %ebp
jmp 0x6851
callq 0x2060
xorl %ebp, %ebp
subl (%rax), %ebp
jmp 0x6851
callq 0x2060
xorl %ebp, %ebp
subl (%rax), %ebp
movq 0x8(%rsp), %rdi
callq 0x2040
movl %ebp, %eax
addq $0xe8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart.c
// Function: simple_uart_get_pin
int simple_uart_get_pin(struct simple_uart *uart, int pin)
{
    if (!uart)
        return -EINVAL;

#if defined(__linux__) || defined(__APPLE__)
    int status;

    if (ioctl(uart->fd, TIOCMGET, &status) < 0)
        return -errno;

    switch (pin) {
    case SIMPLE_UART_CTS: return (status & TIOCM_CTS) ? 1 : 0;
    case SIMPLE_UART_DSR: return (status & TIOCM_DSR) ? 1 : 0;
    case SIMPLE_UART_DCD: return (status & TIOCM_CAR) ? 1 : 0;
    case SIMPLE_UART_RI: return (status & TIOCM_RI) ? 1 : 0;
    default: return -EINVAL;
    }
#else
    DWORD status;
    if (!GetCommModemStatus(uart->port, &status))
        return win32_errno();
    switch (pin) {
    case SIMPLE_UART_CTS: return (status & MS_CTS_ON) ? 1 : 0;
    case SIMPLE_UART_DSR: return (status & MS_DSR_ON) ? 1 : 0;
    case SIMPLE_UART_DCD: return (status & MS_RLSD_ON) ? 1 : 0;
    case SIMPLE_UART_RI: return (status & MS_RING_ON) ? 1 : 0;
    default: return -EINVAL;
    }
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6ae2
movl %esi, %r14d
movl (%rdi), %edi
xorl %ebx, %ebx
leaq 0x4(%rsp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x21c0
testl %eax, %eax
js 0x6ae9
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
decl %r14d
cmpl $0x4, %r14d
ja 0x6b0e
leaq 0x183c(%rip), %rax      # 0x830c
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0x4(%rsp), %ebx
shrl $0x5, %ebx
jmp 0x6b0b
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
jmp 0x6b0e
callq 0x2060
subl (%rax), %ebx
jmp 0x6b0e
movl 0x4(%rsp), %ebx
shrl $0x6, %ebx
jmp 0x6b0b
movl 0x4(%rsp), %ebx
shrl $0x8, %ebx
jmp 0x6b0b
movl 0x4(%rsp), %ebx
shrl $0x7, %ebx
andl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreRenaud[P]simple_uart/simple_uart.c
// Function: simple_uart_set_pin
int simple_uart_set_pin(struct simple_uart *uart, int pin, bool high)
{
    if (!uart)
        return -EINVAL;

#if defined(__linux__) || defined(__APPLE__)
    int bits;

    if (uart->fd < 0)
        return -EINVAL;

    switch (pin) {
    case SIMPLE_UART_RTS: bits = TIOCM_RTS; break;
    case SIMPLE_UART_DTR: bits = TIOCM_DTR; break;
    default: return -EINVAL;
    }
    if (ioctl(uart->fd, high ? TIOCMBIS : TIOCMBIC, &bits) < 0)
        return -errno;

    return 0;
#else
    bool res;
    switch (pin) {
    case SIMPLE_UART_RTS: res = EscapeCommFunction(uart->port, high ? SETRTS : CLRRTS); break;
    case SIMPLE_UART_DTR: res = EscapeCommFunction(uart->port, high ? SETDTR : CLRDTR); break;
    default: return -EINVAL;
    }
    if (!res)
        return win32_errno();
    return 0;
#endif
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x6b3d
movl (%rdi), %edi
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
testl %edi, %edi
js 0x6b73
testl %esi, %esi
je 0x6b44
cmpl $0x4, %esi
jne 0x6b73
movl $0x2, %ecx
jmp 0x6b49
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
jmp 0x6b73
movl $0x4, %ecx
leaq 0xc(%rsp), %rax
movl %ecx, (%rax)
movzbl %dl, %esi
xorq $0x5417, %rsi           # imm = 0x5417
xorl %ebx, %ebx
movq %rax, %rdx
xorl %eax, %eax
callq 0x21c0
testl %eax, %eax
jns 0x6b73
callq 0x2060
xorl %ebx, %ebx
subl (%rax), %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/michalfapso[P]enum_strings/./enum_conversions.h
// Function: EnumManager<Day>::toString[abi:cxx11](Day)
std::string EnumManager<Enum>::toString (const Enum en) {
    auto it = EnumManager<Enum>::enumToStringMap.find (en);  // std::map::find is the fastest lookup method
    if (it != EnumManager<Enum>::enumToStringMap.end())
        return it->second;
    return "[[[Enum to string not found. Programmer made an error]]]";
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x59f1(%rip), %rdx      # 0x8158
leaq 0x59e2(%rip), %rax      # 0x8150
movq %rax, %rcx
testq %rdx, %rdx
je 0x2794
leaq 0x59d3(%rip), %rcx      # 0x8150
xorl %edi, %edi
cmpl %esi, 0x20(%rdx)
setl %dil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x277d
movq %rax, %rdx
cmpq %rax, %rcx
je 0x27aa
cmpl %esi, 0x20(%rcx)
leaq 0x59aa(%rip), %rdx      # 0x8150
cmovleq %rcx, %rdx
cmpq %rax, %rdx
je 0x27cb
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x28(%rdx), %rsi
movq 0x30(%rdx), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x30fe
jmp 0x27e8
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x28ef(%rip), %rsi      # 0x50c8
leaq 0x2920(%rip), %rdx      # 0x5100
movq %rbx, %rdi
callq 0x2da8
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/michalfapso[P]enum_strings/./enum_conversions.h
// Function: std::enable_if<enum_serializable<Day>::value, std::istream&>::type operator>><Day>(std::istream&, Day&)
typename std::enable_if<enum_serializable<Enum>::value, std::istream&>::type operator>>(std::istream& is, Enum& e)
{
    std::string buf;
    is >> buf;
	e = EnumManager<Enum>::toEnum(buf);
    return is;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rsp, %rsi
callq 0x21c0
leaq 0x5960(%rip), %rdi      # 0x8180
movq %rsp, %rsi
callq 0x3416
leaq 0x5959(%rip), %rcx      # 0x8188
cmpq %rcx, %rax
je 0x2839
movl 0x40(%rax), %eax
jmp 0x283e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%r14)
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2857
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x287d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/michalfapso[P]enum_strings/./enum_conversions.h
// Function: EnumManager<Day>::initializeEnumToStringMap[abi:cxx11]()
std::map<Enum, std::string> EnumManager<Enum>::initializeEnumToStringMap() {
    std::map<Enum, std::string> m;
    //for (const auto& x: EnumConversions<Enum>::enumToStringVector)
	for (const auto& x: splitStringToVector(EnumConversions<Enum>::enumToStringStr))
		m[x.first] = x.second;
    return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2751(%rip), %rsi      # 0x5010
leaq 0x2788(%rip), %rdx      # 0x504e
leaq 0x8(%rsp), %rdi
callq 0x2da8
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a7a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x28f6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %r15
cmpq %r15, %r14
je 0x2925
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c78
addq $0x8, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x20c0
addq $0x20, %r14
jmp 0x2900
leaq 0x28(%rsp), %rdi
callq 0x2cdc
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x296a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x296a
movq %rax, %r14
jmp 0x296a
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x2cdc
movq %rbx, %rdi
callq 0x33c8
movq %r14, %rdi
callq 0x2220