LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/mmu.cpp
// Function: MMU::reset()
void MMU::reset() {
  memory.resize(0x10000, 0);
  ram.resize(0x2000, 0);  // external RAM

  // Setup MBC info
  mbc.romOffset = 0x4000;
  mbc.romBank = 0;
  mbc.mode = 0;
  mbc.ramOffset = 0;
  mbc.type = 0;  // this will be determined in load()
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x8, %rdi
xorl %r14d, %r14d
leaq -0x12(%rbp), %rdx
movb %r14b, (%rdx)
movl $0x10000, %esi          # imm = 0x10000
callq 0x385c8
leaq 0x50(%rbx), %rdi
leaq -0x11(%rbp), %rdx
movb %r14b, (%rdx)
movl $0x2000, %esi           # imm = 0x2000
callq 0x385c8
movl $0x4000, 0x2(%rbx)      # imm = 0x4000
movb %r14b, 0x6(%rbx)
movw $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/mmu.cpp
// Function: MMU::load(char*)
bool MMU::load(char *filename) {
  romFilename = filename;

  std::ifstream file;
  file.open(filename, std::ios::binary);
  if (!file.is_open()) {
    return false;
  }

  // Get file size and read ROM into vector
  file.seekg(0, file.end);
  u32 romSize = file.tellg();
  rom.resize(romSize, 0);
  file.seekg(0, file.beg);
  file.read((char *)(&rom[0]), romSize);
  file.close();

  // Map ROM to memory
  memory.assign(rom.begin(),
                rom.begin() + (0x7FFF > rom.size() ? rom.size() : 0x7FFF));

  // Get MBC type from ROM header
  mbc.type = rom[0x147];

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x68(%rdi)
leaq -0x230(%rbp), %r15
movq %r15, %rdi
callq 0x72b0
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x7560
leaq -0x1b8(%rbp), %rdi
callq 0x7790
movl %eax, %r14d
testb %al, %al
je 0x382d2
leaq -0x230(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x7260
leaq -0x230(%rbp), %rdi
callq 0x7100
leaq 0x38(%rbx), %r12
movl %eax, %r15d
leaq -0x21(%rbp), %rdx
movb $0x0, (%rdx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x385c8
leaq -0x230(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7260
movq (%r12), %rsi
leaq -0x230(%rbp), %rdi
movq %r15, %rdx
callq 0x7370
leaq -0x230(%rbp), %rdi
callq 0x74b0
leaq 0x8(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
subq %rsi, %rdx
movl $0x7fff, %eax           # imm = 0x7FFF
cmpq %rax, %rdx
cmovaeq %rax, %rdx
addq %rsi, %rdx
callq 0x387d6
movq 0x38(%rbx), %rax
movb 0x147(%rax), %al
movb %al, (%rbx)
leaq -0x230(%rbp), %rdi
callq 0x7040
movl %r14d, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x382f9
jmp 0x382f9
jmp 0x382f9
jmp 0x382f9
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x7040
movq %rbx, %rdi
callq 0x74d0
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/mmu.cpp
// Function: MMU::read8(unsigned short)
u8 MMU::read8(u16 addr) {
  // ROM, switched bank
  if (addr >= 0x4000 && addr <= 0x7FFF) {
    return rom[mbc.romOffset + (addr & 0x3FFF)];
  }

  // RAM, switched bank
  else if (addr >= 0xA000 && addr <= 0x8FFF) {
    return ram[mbc.ramOffset + (addr & 0x1FFF)];
  }

  // Shadow of working RAM, less final 512 bytes
  else if (addr >= 0xE000 && addr <= 0xFDFF) {
    return memory[addr - 0x1000];
  }

  // Joypad
  else if (addr == 0xFF00) {
    return joypad->read(memory[0xFF00]);
  }

  // Default
  else {
    return memory[addr];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movswl %si, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jl 0x38334
movzwl 0x2(%rdi), %eax
movzwl %si, %ecx
andl $0x3fff, %ecx           # imm = 0x3FFF
addq 0x38(%rdi), %rcx
movb (%rax,%rcx), %al
jmp 0x3837a
leal 0x2000(%rsi), %eax
movzwl %ax, %eax
cmpl $0x1dff, %eax           # imm = 0x1DFF
ja 0x38354
movq 0x8(%rdi), %rax
movzwl %si, %ecx
movb -0x1000(%rax,%rcx), %al
jmp 0x3837a
movzwl %si, %eax
cmpl $0xff00, %eax           # imm = 0xFF00
jne 0x38373
movq 0x8(%rdi), %rax
movq 0x70(%rdi), %rdi
movzbl 0xff00(%rax), %esi
popq %rbp
jmp 0x380fc
movq 0x8(%rdi), %rcx
movb (%rcx,%rax), %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/gpu.cpp
// Function: GPU::reset()
void GPU::reset() {
  width = 160;
  height = 144;
  scanline = 0;
  mmu->memory[LY] = scanline;
  mmu->memory[STAT] = 0x84;
  modeclock = 0;
  memset(screenData, 0xFF, sizeof(screenData));
  vsync = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movabsq $0x90000000a0, %rax     # imm = 0x90000000A0
movq %rax, 0x14(%rdi)
xorl %r14d, %r14d
movb %r14b, 0x10(%rdi)
movq (%rdi), %rax
movq 0x8(%rax), %rax
movb %r14b, 0xff44(%rax)
movq (%rdi), %rax
movq 0x8(%rax), %rax
movb $-0x7c, 0xff41(%rax)
movl $0x0, 0x8(%rdi)
addq $0x1d, %rdi
movl $0x10e00, %edx          # imm = 0x10E00
movl $0xff, %esi
callq 0x7220
movb %r14b, 0x1c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/gpu.cpp
// Function: GPU::renderScanline()
void GPU::renderScanline() {
  u8 control = mmu->memory[LCDC];
  if (bitTest(control, LCDC_BG_ENABLE)) {
    renderBackground();
  }
  if (bitTest(control, LCDC_OBJ_ENABLE)) {
    renderSprites();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rax
movzbl 0xff40(%rax), %r14d
testb $0x1, %r14b
je 0x38b7f
movq %rbx, %rdi
callq 0x38bc8
testb $0x2, %r14b
jne 0x38b8a
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x38cf6
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: CPU::updateDivider(unsigned char)
void CPU::updateDivider(u8 cycles) {
  timerCounter += cycles;
  if (timerCounter >= 256) {
    timerCounter = 0;
    mmu.memory[DIV] = 0;
  } else {
    mmu.memory[DIV]++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
addl 0x2a4(%rdi), %esi
movl %esi, 0x2a4(%rdi)
cmpl $0x100, %esi            # imm = 0x100
jl 0x3b0b1
movl $0x0, 0x2a4(%rdi)
movq 0x20(%rdi), %rax
movb $0x0, 0xff04(%rax)
jmp 0x3b0bb
movq 0x20(%rdi), %rax
incb 0xff04(%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: CPU::checkInterrupts()
void CPU::checkInterrupts() {
  if (!ime || eiDelay) {  // IME disabled or the last instruction was EI
    eiDelay = false;
    return;
  }
  u8 requested = mmu.read8(IF);
  if (requested > 0) {
    u8 enabled = mmu.read8(IE);
    for (u8 i = 0; i < 5; i++) {
      if (bitTest(requested, i)) {
        if (bitTest(enabled, i)) {
          doInterrupt(i);
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x10(%rdi)
jne 0x3b158
cmpb $0x1, 0x11(%rbx)
jne 0x3b165
movb $0x0, 0x11(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbx), %r14
movq %r14, %rdi
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x38310
testb %al, %al
je 0x3b15c
movl %eax, %r15d
movq %r14, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x38310
movzbl %r15b, %r15d
movzbl %al, %r12d
xorl %r14d, %r14d
movl $0x1, %eax
movl %r14d, %ecx
shll %cl, %eax
btl %r14d, %r15d
jae 0x3b1b6
andl %r12d, %eax
je 0x3b1b6
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x3b1c2
incl %r14d
cmpl $0x5, %r14d
jne 0x3b195
jmp 0x3b15c
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: CPU::doInterrupt(unsigned char)
void CPU::doInterrupt(u8 interrupt) {
  ime = false;  // IME = disabled

  // Reset bit in Interrupt Request Register
  u8 flags = mmu.memory[IF];
  bitClear(flags, interrupt);
  mmu.memory[IF] = flags;

  reg.sp -= 2;
  mmu.write16(reg.sp, reg.pc);  // Push PC to the stack

  // Interrupts have specific service routines at defined memory locations
  switch (interrupt) {
    case 0:
      reg.pc = 0x40;
      break;

    case 1:
      reg.pc = 0x48;
      break;

    case 2:
      reg.pc = 0x50;
      break;

    case 4:
      reg.pc = 0x60;
      break;

    default:
      break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movb $0x0, 0x10(%rdi)
addq $0x18, %rdi
movq 0x20(%rbx), %rax
movl $0x1, %edx
movl %r14d, %ecx
shll %cl, %edx
notb %dl
andb %dl, 0xff0f(%rax)
movzwl 0xa(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xa(%rbx)
movzwl 0x8(%rbx), %edx
movzwl %ax, %esi
callq 0x38590
cmpb $0x4, %r14b
ja 0x3b227
movzbl %r14b, %eax
movl $0x17, %ecx
btl %eax, %ecx
jae 0x3b227
leaq 0xd8bd(%rip), %rcx      # 0x48adc
movzwl (%rcx,%rax,2), %eax
movw %ax, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::incrementReg<unsigned char>(unsigned char&)
void CPU::incrementReg(t &reg1) {
  reg1++;
  bool carry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
  if ((reg1 & 0xF) == 0) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incb (%rsi)
andb $0x10, (%rdi)
cmpb $0x0, (%rsi)
jne 0x3b2a7
orb $-0x80, (%rdi)
testb $0xf, (%rsi)
jne 0x3b2af
orb $0x20, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::decrementReg<unsigned char>(unsigned char&)
void CPU::decrementReg(t &reg1) {
  reg1--;
  bool carry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  bitSet(reg.f, FLAG_SUBTRACT);
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
  if ((reg1 & 0xF) == 0xF) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decb (%rsi)
movb (%rdi), %al
andb $0x10, %al
orb $0x40, %al
movb %al, (%rdi)
cmpb $0x0, (%rsi)
jne 0x3b2c8
orb $-0x80, (%rdi)
movb (%rsi), %al
notb %al
testb $0xf, %al
jne 0x3b2d3
orb $0x20, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::add16<unsigned short>(unsigned short&, unsigned short)
void CPU::add16(t &reg1, t n) {
  bool zero = bitTest(reg.f, FLAG_ZERO);
  reg.f = 0;
  if ((reg1 + n) > 0xFFFF) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg1 & 0x0FFF) + (n & 0x0FFF) > 0x0FFF) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitClear(reg.f, FLAG_SUBTRACT);
  reg1 += n;
  if (zero) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb $0x0, (%rdi)
movzwl (%rsi), %ecx
addl %edx, %ecx
cmpl $0x10000, %ecx          # imm = 0x10000
setae %cl
shlb $0x4, %cl
movb %cl, (%rdi)
movzwl (%rsi), %ecx
movl $0xfff, %r8d            # imm = 0xFFF
andl %r8d, %ecx
movl %edx, %r9d
andl %r8d, %r9d
addl %ecx, %r9d
cmpl $0x1000, %r9d           # imm = 0x1000
jb 0x3b313
orb $0x20, (%rdi)
andb $-0x41, (%rdi)
addw %dx, (%rsi)
testb %al, %al
jns 0x3b320
orb $-0x80, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateRightCarry<unsigned char>(unsigned char&)
void CPU::rotateRightCarry(t &reg1) {
  reg.f = 0;
  // Low bit of register is shifted into carry flag
  if (bitTest(reg1, 1)) {
    bitSet(reg.f, FLAG_CARRY);
  }
  reg1 >>= 1;  // Shift register right, high bit becomes 0
  if (bitTest(reg.f, FLAG_CARRY)) {
    bitSet(reg1, 7);  // Carry flag shifts into high bit of register
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, (%rdi)
movb (%rsi), %al
shlb $0x3, %al
andb $0x10, %al
movb %al, (%rdi)
movb (%rsi), %al
shrb %al
movb %al, (%rsi)
testb $0x10, (%rdi)
je 0x3b341
orb $-0x80, %al
movb %al, (%rsi)
cmpb $0x0, (%rsi)
jne 0x3b349
orb $-0x80, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateLeft<unsigned char>(unsigned char&)
void CPU::rotateLeft(t &reg1) {
  bool prevCarry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  bool carry = bitTest(reg1, 7);
  reg1 <<= 1;
  reg1 += prevCarry;
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb $0x0, (%rdi)
movb (%rsi), %cl
leal (%rcx,%rcx), %edx
shrb $0x4, %al
andb $0x1, %al
orb %dl, %al
movb %al, (%rsi)
testb %cl, %cl
jns 0x3b36a
orb $0x10, (%rdi)
cmpb $0x0, (%rsi)
jne 0x3b372
orb $-0x80, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateRight<unsigned char>(unsigned char&)
void CPU::rotateRight(t &reg1) {
  bool prevCarry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  bool carry = bitTest(reg1, 0);
  reg1 >>= 1;
  reg1 += (prevCarry << 7);
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb $0x0, (%rdi)
movb (%rsi), %cl
movl %ecx, %edx
shrb %dl
shlb $0x3, %al
andb $-0x80, %al
orb %dl, %al
movb %al, (%rsi)
testb $0x1, %cl
je 0x3b394
orb $0x10, (%rdi)
cmpb $0x0, (%rsi)
jne 0x3b39c
orb $-0x80, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::add<unsigned char>(unsigned char)
void CPU::add(t n) {
  reg.f = 0;
  if ((reg.a + n) > 0xFF) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg.a & 0xF) + (n & 0xF) > 0xF) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitClear(reg.f, FLAG_SUBTRACT);
  reg.a += n;
  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x1(%rdi), %eax
leal (%rax,%rsi), %ecx
cmpl $0x100, %ecx            # imm = 0x100
setae %cl
shlb $0x4, %cl
movb %cl, (%rdi)
movl %eax, %ecx
andl $0xf, %ecx
movl %esi, %edx
andl $0xf, %edx
addl %ecx, %edx
cmpl $0x10, %edx
jb 0x3b3cb
orb $0x20, (%rdi)
movb (%rdi), %cl
andb $-0x41, %cl
movb %cl, (%rdi)
addb %sil, %al
movb %al, 0x1(%rdi)
jne 0x3b3df
orb $-0x80, %cl
movb %cl, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::addCarry<unsigned char>(unsigned char)
void CPU::addCarry(t n) {
  u8 prevCarry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;

  if (reg.a + n + prevCarry > 0xFF) {
    bitSet(reg.f, FLAG_CARRY);
  }

  if ((reg.a & 0x0F) + (n & 0x0F) + prevCarry > 0x0F) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }

  reg.a += n + prevCarry;

  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
andl $0x10, %eax
movb $0x0, (%rdi)
movzbl 0x1(%rdi), %ecx
leal (%rcx,%rsi), %r8d
movl %eax, %edx
shrl $0x4, %edx
addl %edx, %r8d
cmpl $0x100, %r8d            # imm = 0x100
jb 0x3b40b
movb $0x10, (%rdi)
movl %ecx, %r8d
andl $0xf, %r8d
movl %esi, %r9d
andl $0xf, %r9d
addl %r8d, %r9d
addl %edx, %r9d
cmpl $0x10, %r9d
jb 0x3b428
orb $0x20, (%rdi)
shrb $0x4, %al
addb %sil, %al
addb %cl, %al
movb %al, 0x1(%rdi)
jne 0x3b438
orb $-0x80, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::subtract<unsigned char>(unsigned char)
void CPU::subtract(t n) {
  reg.f = 0;
  if (reg.a < n) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg.a & 0xF) < (n & 0xF)) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitSet(reg.f, FLAG_SUBTRACT);
  reg.a -= n;
  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1(%rdi), %al
cmpb %sil, %al
setb %cl
shlb $0x4, %cl
movb %cl, (%rdi)
movl %eax, %ecx
andb $0xf, %cl
movl %esi, %edx
andb $0xf, %dl
cmpb %cl, %dl
jbe 0x3b45d
orb $0x20, (%rdi)
movb (%rdi), %cl
movl %ecx, %edx
orb $0x40, %dl
movb %dl, (%rdi)
subb %sil, %al
movb %al, 0x1(%rdi)
jne 0x3b473
orb $-0x40, %cl
movb %cl, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::subtractCarry<unsigned char>(unsigned char)
void CPU::subtractCarry(t n) {
  u8 prevCarry = bitTest(reg.f, FLAG_CARRY);
  if (reg.a < n + prevCarry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg.a & 0x0F) < ((n + prevCarry) & 0x0F)) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitSet(reg.f, FLAG_SUBTRACT);
  reg.a -= (n + prevCarry);
  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
movzbl 0x1(%rdi), %eax
btl $0x4, %ecx
adcl $0x0, %esi
cmpl %eax, %esi
jbe 0x3b490
orb $0x10, %cl
movb %cl, (%rdi)
movl %eax, %ecx
andl $0xf, %ecx
movl %esi, %edx
andl $0xf, %edx
cmpl %ecx, %edx
jbe 0x3b4a1
orb $0x20, (%rdi)
movb (%rdi), %cl
movl %ecx, %edx
orb $0x40, %dl
movb %dl, (%rdi)
subb %sil, %al
movb %al, 0x1(%rdi)
jne 0x3b4b7
orb $-0x40, %cl
movb %cl, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::compare<unsigned char>(unsigned char)
void CPU::compare(t num) {
  reg.f = 0;
  if (reg.a < num) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg.a & 0xF) < (num & 0xF)) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitSet(reg.f, FLAG_SUBTRACT);
  if (reg.a - num == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1(%rdi), %al
cmpb %sil, %al
setb %cl
shlb $0x4, %cl
movb %cl, (%rdi)
movl %eax, %ecx
andb $0xf, %cl
movl %esi, %edx
andb $0xf, %dl
cmpb %cl, %dl
jbe 0x3b4dd
orb $0x20, (%rdi)
cmpb %sil, %al
setne %al
shlb $0x7, %al
addb $-0x40, %al
orb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateLeftCarry<unsigned char>(unsigned char&)
void CPU::rotateLeftCarry(t &reg1) {
  reg.f = 0;
  // High bit is shifted into carry flag
  if (bitTest(reg1, 7)) {
    bitSet(reg.f, FLAG_CARRY);
  }
  reg.a <<= 1;  // Shift register left, low bit becomes 0
  if (bitTest(reg.f, FLAG_CARRY)) {
    reg1++;
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, (%rdi)
movb (%rsi), %al
movl %eax, %ecx
shrb $0x3, %cl
andb $0x10, %cl
movb %cl, (%rdi)
shlb 0x1(%rdi)
testb %al, %al
jns 0x3b64e
incb (%rsi)
cmpb $0x0, (%rsi)
jne 0x3b656
orb $-0x80, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/main.cpp
// Function: handleSdlEvents()
void handleSdlEvents() {
  // Handle keydown, window close, etc
  SDL_Event event;
  while (SDL_PollEvent(&event)) {
    ImGui_ImplSdl_ProcessEvent(&event);
    switch (event.type) {
      case SDL_KEYDOWN:
        handleKeyPress(event.key.keysym.sym);
      case SDL_CONTROLLERBUTTONDOWN:
      case SDL_KEYUP:
      case SDL_CONTROLLERBUTTONUP:
        g_joypad.handleEvent(event);
        break;

      case SDL_CONTROLLERDEVICEADDED:
        // todo
        break;

      case SDL_CONTROLLERDEVICEREMOVED:
        // todo
        break;

      case SDL_QUIT:
        g_quit = true;
        break;

      default:
        break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
leaq -0x48(%rbp), %rdi
callq 0x7830
testl %eax, %eax
je 0x3b9ba
leaq -0x48(%rbp), %rbx
leaq 0x37593(%rip), %r14     # 0x72ed0
movq %rbx, %rdi
callq 0x3793e
movl -0x48(%rbp), %eax
cmpl $0x650, %eax            # imm = 0x650
jg 0x3b966
cmpl $0x100, %eax            # imm = 0x100
je 0x3b972
cmpl $0x300, %eax            # imm = 0x300
je 0x3b97b
cmpl $0x301, %eax            # imm = 0x301
je 0x3b983
jmp 0x3b9ae
addl $0xfffff9af, %eax       # imm = 0xFFFFF9AF
cmpl $0x2, %eax
jb 0x3b983
jmp 0x3b9ae
movb $0x1, 0x375e7(%rip)     # 0x72f60
jmp 0x3b9ae
movl -0x34(%rbp), %edi
callq 0x3c69f
movq -0x18(%rbp), %rax
movq %rax, 0x30(%rsp)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups -0x28(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x37f9c
movq %rbx, %rdi
callq 0x7830
testl %eax, %eax
jne 0x3b93d
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/main.cpp
// Function: imguiRegisters()
void imguiRegisters() {
  // Position to the right of disassembly window
  ImGui::SetNextWindowPos(ImVec2(DISASM_WINDOW_WIDTH, 0.0f));
  ImGui::SetNextWindowSize(ImVec2(REG_WINDOW_WIDTH, REG_WINDOW_HEIGHT));
  ImGui::Begin("reg", nullptr,
               ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
  ImGui::Text(
      "af = %04X\nbc = %04X\nde = %04X\nhl = %04X\nsp = %04X\npc = %04X",
      g_cpu.reg.af, g_cpu.reg.bc, g_cpu.reg.de, g_cpu.reg.hl, g_cpu.reg.sp,
      g_cpu.reg.pc);
  ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq -0x10(%rbp), %rbx
movq $0x43960000, (%rbx)     # imm = 0x43960000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x15803
movabsq $0x42f0000042c80000, %rax # imm = 0x42F0000042C80000
movq %rax, (%rbx)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xc578
leaq 0xe0b2(%rip), %rdi      # 0x49cac
xorl %esi, %esi
movl $0x6, %edx
callq 0xc59b
movzwl 0x241fb(%rip), %esi     # 0x5fe08
movzwl 0x241f6(%rip), %edx     # 0x5fe0a
movzwl 0x241f1(%rip), %ecx     # 0x5fe0c
movzwl 0x241eb(%rip), %r8d     # 0x5fe0e
movzwl 0x241e7(%rip), %r9d     # 0x5fe12
movzwl 0x241de(%rip), %eax     # 0x5fe10
movl %eax, (%rsp)
leaq 0xe074(%rip), %rdi      # 0x49cb0
xorl %eax, %eax
callq 0x1609c
callq 0xcdc7
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/main.cpp
// Function: imguiLcdStatus()
void imguiLcdStatus() {
  // Position to the right of disassembly window, below register window
  ImGui::SetNextWindowPos(ImVec2(DISASM_WINDOW_WIDTH, REG_WINDOW_HEIGHT));
  ImGui::SetNextWindowSize(ImVec2(REG_WINDOW_WIDTH, LCD_STATUS_WINDOW_HEIGHT));
  ImGui::Begin("lcd stat", nullptr,
               ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
  ImGui::Text(
      "%02X FF40 LCDC\n"
      "%02X FF41 STAT\n"
      "%02X FF42 SCY\n"
      "%02X FF43 SCX\n"
      "%02X FF44 LY\n"
      "%02X FF45 LYC\n"
      "%02X FF46 DMA\n"
      "%02X FF47 BGP\n"
      "%02X FF48 OBP0\n"
      "%02X FF49 OBP1\n"
      "%02X FF4A WY\n"
      "%02X FF4B WX\n",
      g_cpu.mmu.memory[0xFF40], g_cpu.mmu.memory[0xFF41],
      g_cpu.mmu.memory[0xFF42], g_cpu.mmu.memory[0xFF43],
      g_cpu.mmu.memory[0xFF44], g_cpu.mmu.memory[0xFF45],
      g_cpu.mmu.memory[0xFF46], g_cpu.mmu.memory[0xFF47],
      g_cpu.mmu.memory[0xFF48], g_cpu.mmu.memory[0xFF49],
      g_cpu.mmu.memory[0xFF4A], g_cpu.mmu.memory[0xFF4B]);
  ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movabsq $0x42f0000043960000, %rax # imm = 0x42F0000043960000
leaq -0x30(%rbp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x15803
movabsq $0x4348000042c80000, %rax # imm = 0x4348000042C80000
movq %rax, (%rbx)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xc578
leaq 0xe055(%rip), %rdi      # 0x49cec
xorl %esi, %esi
movl $0x6, %edx
callq 0xc59b
movq 0x2417e(%rip), %rax     # 0x5fe28
movzbl 0xff40(%rax), %esi
movzbl 0xff41(%rax), %edx
movzbl 0xff42(%rax), %ecx
movzbl 0xff43(%rax), %r8d
movzbl 0xff44(%rax), %r9d
movzbl 0xff45(%rax), %r10d
movzbl 0xff46(%rax), %r11d
movzbl 0xff47(%rax), %ebx
movzbl 0xff48(%rax), %r14d
movzbl 0xff49(%rax), %r15d
movzbl 0xff4a(%rax), %r12d
movzbl 0xff4b(%rax), %r13d
subq $0x8, %rsp
leaq 0xdfe4(%rip), %rdi      # 0x49cf5
xorl %eax, %eax
pushq %r13
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x1609c
addq $0x40, %rsp
callq 0xcdc7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/main.cpp
// Function: imguiHelp()
void imguiHelp() {
  ImGui::SetNextWindowPos(ImVec2(DISASM_WINDOW_WIDTH+REG_WINDOW_WIDTH, 0.0f));
  ImGui::Begin("controls", nullptr,
               ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
  ImGui::Text(
      "A: z\n"
      "B: x\n"
      "Select: space\n"
      "Start: enter\n"
      "Directions: arrows\n"
      "Fullscreen: f\n");
  ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x8(%rbp), %rdi
movq $0x43c80000, (%rdi)     # imm = 0x43C80000
xorl %esi, %esi
callq 0x15803
leaq 0xdc5f(%rip), %rdi      # 0x49e19
xorl %esi, %esi
movl $0x6, %edx
callq 0xc59b
leaq 0xdc55(%rip), %rdi      # 0x49e22
xorl %eax, %eax
callq 0x1609c
callq 0xcdc7
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/codebrainz[P]libutfxx/utf/./utfstring.h
// Function: utf::string<char>& utf::string<char>::append<char const*>(char const*)
string& append(T str) {
		string_type tmp;
		utf::convert(str, tmp);
		s += tmp;
		return *this;
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2d62
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2150
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e88
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2110
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2050
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2eb1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x2ede
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ee1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2110
jmp 0x2ee1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2ef8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/img2pd/img2pd.cpp
// Function: AddImageToPixelDatabase(gaps::R2PixelDatabase&, char const*)
static int
AddImageToPixelDatabase(R2PixelDatabase& pd, const char *image_filename)
{
  // Add image to pixel database
  R2Image image;
  if (!image.ReadFile(image_filename)) return 0;
  pd.InsertImage(image_filename, image);

  // Increment image counter
  image_count++;

  // Print message
  if (print_debug) {
    printf("  %s\n", image_filename);
    fflush(stdout);
  }
  
  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x8f78
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8f9c
testl %eax, %eax
je 0x6616
movq (%r14), %rax
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
incl 0x6ef12(%rip)           # 0x754f8
movl $0x1, %ebp
cmpb $0x1, 0x6ef0a(%rip)     # 0x754fc
jne 0x6618
leaq 0x4db27(%rip), %rdi     # 0x54122
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5060
movq 0x6e994(%rip), %rax     # 0x74fa0
movq (%rax), %rdi
callq 0x5390
jmp 0x6618
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x9502
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x9502
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O1/EDDRSoftware[P]libdefsEval/main.cpp
// Function: fullPath(char const*, boost::filesystem::path const&, boost::filesystem::path*)
int fullPath(const char *pathIn, const path &base, path *outPath)
{
    int retVal = 0;


    try {

        *outPath = canonical(pathIn, base);

    } catch(const filesystem_error &error) {
        if(is_symlink(error.path1())) {
            cerr << "ERROR: Path " << error.path1() << " contains a broken symlink." <<
                 endl;
        } else {
            cerr << "ERROR: " << error.code().message() << " " << error.path1() << endl;
        }

        retVal = error.code().value();
    }

    return retVal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq -0x58(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x6e70
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x4100
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4350
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x47e3
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47fc
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x42d0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4830
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x4830
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x4992
movq %rbx, %rdi
callq 0x4120
movq %rax, %rbx
movq 0x40(%rax), %rsi
testq %rsi, %rsi
je 0x4854
addq $0x8, %rsi
jmp 0x485c
callq 0x4520
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
xorl %edx, %edx
callq 0x40c0
cmpl $0x4, -0x38(%rbp)
jne 0x4894
movq 0x977c(%rip), %rdi      # 0xdff0
leaq 0x57a5(%rip), %rsi      # 0xa020
movl $0xc, %edx
callq 0x4300
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
je 0x48f7
addq $0x8, %rsi
jmp 0x48ff
movq 0x9755(%rip), %rdi      # 0xdff0
leaq 0x57a7(%rip), %rsi      # 0xa049
movl $0x7, %edx
callq 0x4300
movl 0x10(%rbx), %edx
movq 0x18(%rbx), %rsi
movq (%rsi), %rax
leaq -0x38(%rbp), %rdi
callq *0x20(%rax)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x9724(%rip), %rdi      # 0xdff0
callq 0x4300
movq %rax, %r14
leaq 0x5824(%rip), %rsi      # 0xa0ff
movl $0x1, %edx
movq %rax, %rdi
callq 0x4300
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
je 0x492c
addq $0x8, %rsi
jmp 0x4934
callq 0x4520
movq %rax, %rsi
movq 0x96ea(%rip), %rdi      # 0xdff0
callq 0x6de3
movq %rax, %r14
leaq 0x5718(%rip), %rsi      # 0xa02d
movl $0x1b, %edx
movq %rax, %rdi
callq 0x4300
movq %r14, %rdi
callq 0x4160
jmp 0x495d
callq 0x4520
movq %rax, %rsi
movq %r14, %rdi
callq 0x6de3
movq %rax, %rdi
callq 0x4160
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x495d
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42d0
movl 0x10(%rbx), %ebx
callq 0x4430
jmp 0x47fe
jmp 0x498a
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x498d
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x498d
movq %rax, %rbx
callq 0x4430
movq %rbx, %rdi
callq 0x44a0
movq %rax, %rdi
callq 0x6dd5
// File: /workspace/github_cpp_makefile_star2_O1/EDDRSoftware[P]libdefsEval/main.cpp
// Function: readUntilEOL(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void readUntilEOL(stringstream *stream, string *outVar)
{
    string buffer;

    getline(*stream, buffer);
    // getline does not trim the beginning of line.  There is usually whitespace.
    buffer.erase(buffer.begin(), find_if(buffer.begin(), buffer.end(),
                                         not1(ptr_fun<int, int>(isspace))));
    *outVar = buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x44e0
movq -0x38(%rbp), %r14
movq -0x30(%rbp), %rsi
addq %r14, %rsi
movq 0x9233(%rip), %rdx      # 0xdf90
movq %r14, %rdi
callq 0x7bfd
movq -0x38(%rbp), %rcx
movq %r14, %rsi
subq %rcx, %rsi
movq -0x30(%rbp), %rdx
addq %rcx, %rdx
cmpq %rax, %rdx
je 0x4d8c
subq %r14, %rax
leaq -0x38(%rbp), %rdi
movq %rax, %rdx
callq 0x4330
jmp 0x4d94
movq %rsi, -0x30(%rbp)
movb $0x0, (%rcx,%rsi)
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x4190
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x4db5
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42d0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4dc2
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x4dda
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44a0
// File: /workspace/github_cpp_makefile_star2_O1/EDDRSoftware[P]libdefsEval/main.cpp
// Function: isRecursiveInclude(boost::filesystem::path const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
bool
isRecursiveInclude(const path &fp, std::vector<string> *pLibDefFiles)
{
    for (int i = 0; i < pLibDefFiles->size(); ++i)
    {
        if (fp.string().c_str() == (*pLibDefFiles)[i])
        {
            return true;
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rsi), %rdi
cmpq %rdi, 0x8(%rsi)
setne %r15b
je 0x58f3
movq %rsi, %rbx
movq (%r14), %rsi
callq 0x40b0
testl %eax, %eax
je 0x58f3
movl $0x20, %r12d
xorl %r13d, %r13d
incq %r13
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r13, %rax
seta %r15b
jbe 0x58f3
movq (%r14), %rsi
addq %r12, %rdi
addq $0x20, %r12
callq 0x40b0
testl %eax, %eax
jne 0x58c6
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/oknenavin[P]cxon/examples/user-types-ex02.cxx
// Function: bool cxon::read<cxon::JSON<cxon::json::format_traits>, B*, void>::value<char const*, cxon::context<cxon::JSON<cxon::json::format_traits>>, cxon::JSON<cxon::json::format_traits>>(B*&, char const*&, char const*, cxon::context<cxon::JSON<cxon::json::format_traits>>&)
static bool value(B*& t, II& i, II e, Cx& cx) {
                    if (!cio::consume<Y>(i, e, cx)) // consume any white-spaces
                        return false;
                    if (cio::peek(i, e) == *Y::id::nil) // check/read null
                        return read_value<Y>(t, i, e, cx);
                    B_union p; // the union type that represents a B*
                        if (read_value<Y>(p, i, e, cx)) { // try reading it
                            if (p.d1) // let d1 != 0 indicates D1
                                return (t = alc::make_in_context<D1>(cx, p.d1)); // create and assign D1
                            // create and assign D2
                            return (t = alc::make_in_context<D2>(cx, std::move(p.d2)));
                        }
                        return false;
                }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x2bc9(%rip), %rax      # 0x5610
movq (%rdx), %rsi
cmpq %rcx, %rsi
je 0x2a60
movzbl (%rsi), %edi
testb $0x8, (%rdi,%rax)
je 0x2a60
incq %rsi
movq %rsi, (%rdx)
jmp 0x2a4a
movq (%rdx), %rsi
cmpq %rcx, %rsi
je 0x2a6d
cmpb $0x6e, (%rsi)
je 0x2a47
leaq 0x20(%rsp), %r14
movl $0x0, -0x18(%r14)
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x50a7(%rip), %rsi      # 0x7b38
leaq 0x8(%rsp), %rdi
callq 0x2b69
movl %eax, %ebp
testb %al, %al
je 0x2b35
cmpl $0x0, 0x8(%rsp)
je 0x2ad0
movl $0x10, %edi
callq 0x2110
movl 0x8(%rsp), %ecx
movl $0x0, 0x8(%rax)
leaq 0x50b0(%rip), %rdx      # 0x7b78
movq %rdx, (%rax)
movl %ecx, 0xc(%rax)
jmp 0x2b32
movl $0x30, %edi
callq 0x2110
movl $0x1, 0x8(%rax)
leaq 0x50f8(%rip), %rcx      # 0x7be0
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rdx
cmpq %r14, %rdx
je 0x2b0f
movq %rdx, 0x10(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x2b16
movups (%r14), %xmm0
movups %xmm0, (%rcx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq %r14, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %rax, (%rbx)
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b44
callq 0x2100
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b61
callq 0x2100
movq %rbx, %rdi
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O1/oknenavin[P]cxon/examples/user-types-ex02.cxx
// Function: bool cxon::write<cxon::JSON<cxon::json::format_traits>, B*, void>::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, cxon::context<cxon::JSON<cxon::json::format_traits>>, cxon::JSON<cxon::json::format_traits>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, B const*, cxon::context<cxon::JSON<cxon::json::format_traits>>&)
static bool value(O& o, const B* t, Cx& cx) {
                    if (!t) // check/write null
                            return write_value<Y>(o, nullptr, cx);
                    // cast and write the runtime type
                    switch (t->type) {
                        case B::D1:
                            return write_value<Y>(o, static_cast<const D1*>(t), cx);
                        case B::D2:
                            return write_value<Y>(o, static_cast<const D2*>(t), cx);
                    }
                    return false;
                }

// Assembly:
testq %rsi, %rsi
je 0x3b78
movl 0x8(%rsi), %eax
cmpl $0x1, %eax
je 0x3d80
testl %eax, %eax
je 0x3b92
xorl %eax, %eax
retq
pushq %rax
leaq 0x1686(%rip), %rsi      # 0x5206
movl $0x4, %edx
callq 0x2040
movb $0x1, %al
addq $0x8, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/lambda.cc
// Function: fcn3()
void fcn3()
{
    size_t v1 = 42;  // local variable
    // error: cannot assign to a variable captured by copy in a non-mutable lambda
    // auto f = [v1] () { return ++v1; };
    // f can change the value of the variables it captures
    auto f = [v1] () mutable { return ++v1; };
    v1 = 0;
    auto j = f(); // j is 43
    auto k = f(); // k is 44
    cout << v1 << endl;
    cout << j << endl;
    cout << k << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x2d63(%rip), %rbx      # 0x3fd8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1040
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1050
movl $0x2b, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1050
movl $0x2c, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1050
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/lambda.cc
// Function: fcn5()
void fcn5()
{
    size_t v1 = 42;
    // p is a const pointer to v1
    size_t* const p = &v1;
    // increments v1, the objet to which p points
    auto f = [p]() { return ++*p; };
    auto j = f();  // returns incremented value of *p
    cout << v1 << " " << j << endl; // prints 43 43
    v1 = 0;
    j = f();       // returns incremented value of *p
    cout << v1 << " " << j << endl; // prints 1 1
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x2c65(%rip), %rbx      # 0x3fd8
movl $0x2b, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %r15
leaq 0xc7a(%rip), %r14       # 0x2004
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1080
movl $0x2b, %esi
movq %r15, %rdi
callq 0x1040
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1050
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1080
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1040
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/lambda.cc
// Function: main
int main()
{
    fcn1();
    fcn2();
    fcn3();
    fcn4();
    fcn5();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x11dc
callq 0x1223
callq 0x1267
callq 0x131b
callq 0x1362
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/akw0088[P]openssl/aes_dec.cpp
// Function: main
int main(int argc, char *argv[])
{
	if (argc < 3)
	{
		printf("Usage:\taes_dec 256bit_key 128bit_iv plaintext\r\n");
		printf("Example:\taes_dec 01234567890123456789012345678901 0123456789012345 file.enc\r\n");
		return -1;
	}

	/* A 256 bit key */
	unsigned char *key = (unsigned char *)argv[1];

	/* A 128 bit IV */
	unsigned char *iv = (unsigned char *)argv[2];

	/* Message to be encrypted */
	char *filename = (char *)argv[3];
	unsigned int size = 0;
	unsigned char *ciphertext = (unsigned char *)get_file(filename, &size);

	/* Buffer for the decrypted text */
	unsigned char *decryptedtext = (unsigned char *)malloc(size);
	if (decryptedtext == NULL)
	{
		perror("malloc failed");
		return -1;
	}

	int decryptedtext_len, ciphertext_len = size;

	printf("Ciphertext is:\n");
	BIO_dump_fp (stdout, (const char *)ciphertext, ciphertext_len);

	/* Decrypt the ciphertext */
	decryptedtext_len = decrypt(ciphertext, ciphertext_len, key, iv, decryptedtext);

	/* Add a NULL terminator. We are expecting printable text */
	decryptedtext[decryptedtext_len] = '\0';

	/* Show the decrypted text */
	printf("Decrypted text is:\n");
	printf("%s\n", decryptedtext);
	
	write_file((char *)"file.txt", (char *)decryptedtext, decryptedtext_len);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jg 0x1400
leaq 0xc9a(%rip), %rdi       # 0x207f
callq 0x1170
leaq 0xcbd(%rip), %rdi       # 0x20ae
callq 0x1170
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1499
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %r15
movq 0x18(%rsi), %rdi
leaq -0x2c(%rbp), %rbx
movl $0x0, (%rbx)
movq %rbx, %rsi
callq 0x129c
movq %rax, %r12
movl (%rbx), %r13d
movq %r13, %rdi
callq 0x1150
testq %rax, %rax
je 0x14a8
movq %rax, %rbx
leaq 0xc22(%rip), %rdi       # 0x205d
callq 0x1170
movq 0x2b81(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x10b0
movq %r12, %rdi
movl %r13d, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x14b9
movslq %eax, %r14
movb $0x0, (%rbx,%r14)
leaq 0xbf4(%rip), %rdi       # 0x206c
callq 0x1170
movq %rbx, %rdi
callq 0x1170
leaq 0xbac(%rip), %rdi       # 0x2038
movq %rbx, %rsi
movl %r14d, %edx
callq 0x134e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb7b(%rip), %rdi       # 0x202a
callq 0x10f0
jmp 0x13f6
// File: /workspace/github_cpp_makefile_star2_O1/akw0088[P]openssl/aes_dec.cpp
// Function: decrypt(unsigned char*, int, unsigned char*, unsigned char*, unsigned char*)
int decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *key,
			unsigned char *iv, unsigned char *plaintext)
{
	EVP_CIPHER_CTX *ctx;

	int len;

	int plaintext_len;

	/* Create and initialise the context */
	if(!(ctx = EVP_CIPHER_CTX_new()))
		handleErrors();

	/*
	 * Initialise the decryption operation. IMPORTANT - ensure you use a key
	 * and IV size appropriate for your cipher
	 * In this example we are using 256 bit AES (i.e. a 256 bit key). The
	 * IV size for *most* modes is the same as the block size. For AES this
	 * is 128 bits
	 */
	if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, key, iv))
		handleErrors();

	/*
	 * Provide the message to be decrypted, and obtain the plaintext output.
	 * EVP_DecryptUpdate can be called multiple times if necessary.
	 */
	if(1 != EVP_DecryptUpdate(ctx, plaintext, &len, ciphertext, ciphertext_len))
		handleErrors();
	plaintext_len = len;

	/*
	 * Finalise the decryption. Further plaintext bytes may be written at
	 * this stage.
	 */
	if(1 != EVP_DecryptFinal_ex(ctx, plaintext + len, &len))
		handleErrors();
	plaintext_len += len;

	/* Clean up */
	EVP_CIPHER_CTX_free(ctx);

	return plaintext_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %r15
movl %esi, -0x30(%rbp)
movq %rdi, %r12
callq 0x10e0
testq %rax, %rax
je 0x1553
movq %rax, %rbx
callq 0x10d0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r13, %r8
callq 0x1060
cmpl $0x1, %eax
jne 0x1553
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rcx
movl -0x30(%rbp), %r8d
callq 0x10c0
cmpl $0x1, %eax
jne 0x1553
leaq -0x2c(%rbp), %rdx
movslq (%rdx), %r15
addq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1070
cmpl $0x1, %eax
jne 0x1553
addl -0x2c(%rbp), %r15d
movq %rbx, %rdi
callq 0x1110
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2a86(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x1080
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O1/akw0088[P]openssl/aes_dec.cpp
// Function: encrypt(unsigned char*, int, unsigned char*, unsigned char*, unsigned char*)
int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
			unsigned char *iv, unsigned char *ciphertext)
{
	EVP_CIPHER_CTX *ctx;

	int len;

	int ciphertext_len;

	/* Create and initialise the context */
	if(!(ctx = EVP_CIPHER_CTX_new()))
		handleErrors();

	/*
	 * Initialise the encryption operation. IMPORTANT - ensure you use a key
	 * and IV size appropriate for your cipher
	 * In this example we are using 256 bit AES (i.e. a 256 bit key). The
	 * IV size for *most* modes is the same as the block size. For AES this
	 * is 128 bits
	 */
	if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, key, iv))
		handleErrors();

	/*
	 * Provide the message to be encrypted, and obtain the encrypted output.
	 * EVP_EncryptUpdate can be called multiple times if necessary
	 */
	if(1 != EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len))
		handleErrors();
	ciphertext_len = len;

	/*
	 * Finalise the encryption. Further ciphertext bytes may be written at
	 * this stage.
	 */
	if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &len))
		handleErrors();
	ciphertext_len += len;

	/* Clean up */
	EVP_CIPHER_CTX_free(ctx);

	return ciphertext_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %r15
movl %esi, -0x30(%rbp)
movq %rdi, %r12
callq 0x10e0
testq %rax, %rax
je 0x1619
movq %rax, %rbx
callq 0x10d0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %r13, %r8
callq 0x10a0
cmpl $0x1, %eax
jne 0x1619
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rcx
movl -0x30(%rbp), %r8d
callq 0x1050
cmpl $0x1, %eax
jne 0x1619
leaq -0x2c(%rbp), %rdx
movslq (%rdx), %r15
addq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1180
cmpl $0x1, %eax
jne 0x1619
addl -0x2c(%rbp), %r15d
movq %rbx, %rdi
callq 0x1110
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x29c0(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x1080
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O1/istellartech[P]OpenTsiolkovsky/src/air.cpp
// Function: Air::altitude_with_variation(double, double)
Air Air::altitude_with_variation(double altitude, double input_percent){
    // Pseudo constructor.
    // Enter altitude and variation ratio air density with altitude to calculate air density
    Air air = Air::altitude(altitude);
    double coef = Air::coef_density_variance(altitude, input_percent);
    air.density = air.density * (1.0 + coef);
    return air;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x5b4c
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x5f52
addsd 0x210d8(%rip), %xmm0    # 0x27010
mulsd 0x118(%rbx), %xmm0
movsd %xmm0, 0x118(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop