LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/NGageMegaman[P]NEScutre/src/mem_ppu.cpp
// Function: Mem_ppu::write_OAMADDR(unsigned char)
void Mem_ppu::write_OAMADDR(uint8_t addr) {
    if (oamaddr_ptr_hl == 0) {
	//Writing high byte
	OAMADDR = (addr << 8);
	OAMADDR &= 0x3FFF; //Upper adddresses are mirrored
	oamaddr_ptr_hl = 1;
    }
    else {
	//Writing low byte
	OAMADDR |= (addr & 0x00FF);
	oamaddr_ptr_hl = 0;
    }
    //Lower bits of ppustatus are the last written bits
    PPUSTATUS = (PPUSTATUS & 0xe0) | (addr & 0x1f);
}

// Assembly:
cmpb $0x0, 0x3c01d(%rdi)
je 0x33a8
movzbl %sil, %eax
orw %ax, 0x3c016(%rdi)
xorl %eax, %eax
jmp 0x33bb
movzbl %sil, %eax
andl $0x3f, %eax
shll $0x8, %eax
movw %ax, 0x3c016(%rdi)
movb $0x1, %al
movb %al, 0x3c01d(%rdi)
movb 0x3c015(%rdi), %al
andb $-0x20, %al
andb $0x1f, %sil
orb %al, %sil
movb %sil, 0x3c015(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/NGageMegaman[P]NEScutre/src/mem_ppu.cpp
// Function: Mem_ppu::read_OAMDATA()
uint8_t Mem_ppu::read_OAMDATA() {
    uint8_t result = ram[OAMADDR];
    if (!in_vblank)
	OAMADDR = OAMADDR+1;
    return result;
}

// Assembly:
movq (%rdi), %rax
movzwl 0x3c016(%rdi), %ecx
movb (%rax,%rcx), %al
cmpb $0x0, 0x3c01f(%rdi)
jne 0x33f7
incl %ecx
movw %cx, 0x3c016(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/NGageMegaman[P]NEScutre/src/mem_ppu.cpp
// Function: Mem_ppu::write_PPUSCROLL(unsigned char)
void Mem_ppu::write_PPUSCROLL(uint8_t data) {
    if (ppuscroll_ptr_hl == 0) {
	//Writing high byte
	PPUSCROLL = (data << 8);
	ppuscroll_ptr_hl = 1;
    }
    else {
	//Writing low byte
	PPUSCROLL |= (data & 0x00FF);
	ppuscroll_ptr_hl = 0;
    }
    //Lower bits of ppustatus are the last written bits
    PPUSTATUS = (PPUSTATUS & 0xe0) | (data & 0x1f);
}

// Assembly:
cmpb $0x0, 0x3c01e(%rdi)
je 0x3450
movzbl %sil, %eax
orw %ax, 0x3c01a(%rdi)
xorl %eax, %eax
jmp 0x3460
movzbl %sil, %eax
shll $0x8, %eax
movw %ax, 0x3c01a(%rdi)
movb $0x1, %al
movb %al, 0x3c01e(%rdi)
movb 0x3c015(%rdi), %al
andb $-0x20, %al
andb $0x1f, %sil
orb %al, %sil
movb %sil, 0x3c015(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/NGageMegaman[P]NEScutre/src/ppu.cpp
// Function: Ppu::Ppu()
Ppu::Ppu() {
    di = XOpenDisplay(getenv("DISPLAY"));
    //Create window
    int x = 0, y = 0, width = 256, height = 240, border_width = 1;
    sc = DefaultScreen(di);
    ro = DefaultRootWindow(di);
    wi = XCreateSimpleWindow(di, ro, x, y, width, height, border_width, BlackPixel(di, sc), WhitePixel(di, sc));
    XSelectInput(di, wi, KeyPressMask | KeyReleaseMask | ExposureMask);
    XAutoRepeatOff(di);
    gc = XCreateGC(di, ro, 0, NULL);
    XMapWindow(di, wi); //Make window visible
    XStoreName(di, wi, "NEScutre");
    initColors();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x122d(%rip), %rdi      # 0x46c8
callq 0x1140
movq %rax, %rdi
callq 0x1170
movq %rax, 0x10(%rbx)
movslq 0xe0(%rax), %r10
movl %r10d, 0x18(%rbx)
movq 0xe8(%rax), %r11
shlq $0x7, %r10
movq 0x10(%r11,%r10), %rsi
movq %rsi, 0x20(%rbx)
subq $0x8, %rsp
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x100, %r8d            # imm = 0x100
movl $0xf0, %r9d
pushq 0x58(%r11,%r10)
pushq 0x60(%r11,%r10)
pushq $0x1
callq 0x1060
addq $0x20, %rsp
movq %rax, 0x28(%rbx)
movq 0x10(%rbx), %rdi
movl $0x8003, %edx           # imm = 0x8003
movq %rax, %rsi
callq 0x10a0
movq 0x10(%rbx), %rdi
callq 0x10c0
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1090
movq %rax, 0x30(%rbx)
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x1120
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
leaq 0x118a(%rip), %rdx      # 0x46d0
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x3554
// File: /workspace/github_cpp_makefile_star2_O2/NGageMegaman[P]NEScutre/src/ppu.cpp
// Function: Ppu::vblank()
void Ppu::vblank() {
    //Set the vblank bit
    mem_ppu->PPUSTATUS = mem_ppu->PPUSTATUS | 0x80;
    mem_ppu->in_vblank = true;
    if ((mem_ppu->PPUCTRL >> 7) & 1)
	cpu->NMI_execute();
}

// Assembly:
movq 0x8(%rdi), %rax
orb $-0x80, 0x3c015(%rax)
movb $0x1, 0x3c01f(%rax)
cmpb $0x0, 0x3c010(%rax)
js 0x3bfc
retq
movq (%rdi), %rdi
jmp 0x2810
// File: /workspace/github_cpp_makefile_star2_O2/NGageMegaman[P]NEScutre/main.cpp
// Function: main
int main() {
    int count = 0, n_scanline;
    unsigned int next_vblank = 89342;
    unsigned int next_vblank_end = 89342 + 7746;
    unsigned int next_sprite = 89342 + 7746 + 340;
    Clock nes_clock;
    Mem_ppu nes_mem_ppu;
    nes_mem_ppu.load_rom("smb.nes");
    Cpu nes_cpu;
    nes_cpu.clock = &nes_clock;
    nes_cpu.mem.mem_ppu = &nes_mem_ppu;
    Ppu nes_ppu;
    nes_ppu.cpu = &nes_cpu;
    nes_ppu.mem_ppu = &nes_mem_ppu;
    nes_cpu.mem.di = nes_ppu.di;
    while(1) {
	    nes_cpu.execute();
	    if (nes_clock.cycles >= next_vblank) {
		//usleep(400000);
		for (int i = 0; i<240; ++i)
		    nes_ppu.drawSprites(i);
		nes_ppu.drawScreen();
		count++;
		n_scanline = 0;
	        next_vblank += 89342;
		next_sprite = next_vblank_end + 340;
	        nes_ppu.vblank();
	    }
	    if (nes_clock.cycles >= next_vblank_end) {
		next_vblank_end = next_vblank + 7746;
		nes_mem_ppu.vblank_end();
		nes_mem_ppu.PPUSTATUS = nes_mem_ppu.PPUSTATUS & 0xbf;
	    }
	    //Draw for each scanline
	    //We assume the first sprite always does s0h
	    if (n_scanline != 0xee && nes_clock.cycles >= next_sprite) {
		nes_ppu.draw(n_scanline);
		nes_ppu.checkSprite0Hit(n_scanline);
		next_sprite = next_sprite + 340;
		n_scanline++;
	    }
	   
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4c198, %rsp          # imm = 0x4C198
leaq 0xc(%rsp), %r15
movq %r15, %rdi
callq 0x139c
leaq 0x10178(%rsp), %rbx
movq %rbx, %rdi
callq 0x3020
leaq 0x97f(%rip), %rsi       # 0x45b8
movq %rbx, %rdi
callq 0x317a
leaq 0x148(%rsp), %r14
movq %r14, %rdi
callq 0x13a0
movq %r15, (%r14)
movq %rbx, 0x10008(%r14)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x3490
movq %r14, (%r15)
movq %rbx, 0x8(%r15)
movq 0x10(%r15), %rax
movq %rax, 0x10018(%r14)
movl $0x17c94, %ebx          # imm = 0x17C94
movl $0x17b40, %r13d         # imm = 0x17B40
movl $0x15cfe, %r12d         # imm = 0x15CFE
leaq 0x148(%rsp), %rdi
callq 0x13f6
movl 0xc(%rsp), %eax
cmpl %r12d, %eax
jae 0x3ca6
movl %r14d, %ebp
jmp 0x3cdf
xorl %ebp, %ebp
movq %r15, %rdi
cmpl $0xf0, %ebp
je 0x3cbe
movl %ebp, %esi
callq 0x3642
incl %ebp
jmp 0x3ca8
callq 0x3b8e
addl $0x15cfe, %r12d         # imm = 0x15CFE
leal 0x154(%r13), %ebx
movq %r15, %rdi
callq 0x3be0
xorl %ebp, %ebp
movl 0xc(%rsp), %eax
cmpl %r13d, %eax
jb 0x3d01
leal 0x1e42(%r12), %r13d
leaq 0x10178(%rsp), %rdi
callq 0x347e
andb $-0x41, 0x4c18d(%rsp)
movl $0xee, %r14d
cmpl $0xee, %ebp
je 0x3c8b
movl %ebp, %r14d
cmpl %ebx, 0xc(%rsp)
jb 0x3c8b
movq %r15, %rdi
movl %ebp, %esi
callq 0x39b4
movq %r15, %rdi
movl %ebp, %esi
callq 0x362a
addl $0x154, %ebx            # imm = 0x154
incl %ebp
movl %ebp, %r14d
jmp 0x3c8b
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IMath.hpp
// Function: IMath::isNumber(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static bool isNumber(std::string numberStr){
		try{
			std::string::size_type sz;
			std::stof(numberStr, &sz);
			return true;
		}catch(std::invalid_argument& e){
			return false;
		}catch(std::out_of_range& ex){
			std::cout << "Erro ao avaliar string " << numberStr << std::endl;
			return false;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %rsi
callq 0xb654
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
cmpl $0x2, %edx
jne 0xa8d2
movq %r14, %rdi
callq 0x81a0
jmp 0xa905
cmpl $0x1, %edx
jne 0xa916
movq %r14, %rdi
callq 0x81a0
movq 0x316da(%rip), %rdi     # 0x3bfc0
leaq 0x1d766(%rip), %rsi     # 0x28053
callq 0x8390
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8340
movq %rax, %rdi
callq 0x81f0
callq 0x8720
xorl %eax, %eax
jmp 0xa8b7
movq %rax, %r14
callq 0x8720
movq %r14, %rdi
callq 0x87e0
movq %rax, %rdi
callq 0xb672
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IDefinition.hpp
// Function: IDefinition::addVar(IData*)
void addVar(IData *var){
		vars.push_back(var);

		if(ownerBlock == NULL)
			scheduledVariableRegister = true;
		else
			ownerBlock->registerLocalVariable(var, myLine);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x10(%rbp), %rax
movq %rsi, (%rax)
addq $0x38, %rdi
movq %rax, %rsi
callq 0xd5a8
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xabdf
movq -0x10(%rbp), %rsi
movl 0x8(%rbx), %edx
callq 0xd4ae
jmp 0xabe6
movb $0x1, 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IDefinition.hpp
// Function: IDefinition::addVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void addVar(std::string *leftVar, std::string *rightVar){
		varEqualsVarMapping[*leftVar] = *rightVar;

		if(ownerBlock == NULL)
			scheduledVariableRegister = true;
		else
			ownerBlock->registerLocalVariable(generateVariable(&type, leftVar), myLine);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
addq $0x50, %rdi
callq 0xd71e
movq %rax, %rdi
movq %r15, %rsi
callq 0x8240
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0xac42
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x8b9c
movl 0x8(%rbx), %edx
movq %r15, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd4ae
movb $0x1, 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IMath.hpp
// Function: IMath::IMath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
IMath(std::string *newExpression){
		expression.clear();
		expression.push_back('(');
		expression.append(*newExpression);
		expression.push_back(')');
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x20(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x2c(%rdi)
movl $0x1, 0x3c(%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
pushq $0x28
popq %rsi
callq 0x8320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x88e0
pushq $0x29
popq %rsi
movq %rbx, %rdi
callq 0x8320
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0xdb90
movq %rbx, %rdi
callq 0x8930
movq %r15, %rdi
callq 0x87e0
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IDefinition.hpp
// Function: IDefinition::addVar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, IMath*)
void addVar(std::string *leftValue, IMath *rightVar){
		varEqualsMathMapping[*leftValue] = rightVar;

		if(ownerBlock == NULL)
			scheduledVariableRegister = true;
		else
			ownerBlock->registerLocalVariable(generateVariable(&type, leftValue), myLine);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
addq $0x80, %rdi
callq 0xdbf6
movq %r15, (%rax)
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0xad47
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x8b9c
movl 0x8(%rbx), %edx
movq %r15, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd4ae
movb $0x1, 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IMath.hpp
// Function: IMath::isInteger(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static bool isInteger(std::string numberStr){
		if(isNumber(numberStr)){
			if(numberStr.find(".") != std::string::npos || numberStr.find("e") != std::string::npos ||
					numberStr.find("E") != std::string::npos)
				return false;

			return true;
		}

		return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x85b0
movq %r14, %rdi
callq 0xa89e
movl %eax, %r14d
leaq -0x30(%rbp), %rdi
callq 0x8930
testb %r14b, %r14b
je 0xae6f
leaq 0x21909(%rip), %rsi     # 0x2c730
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x88f0
cmpq $-0x1, %rax
jne 0xae72
leaq 0x1d4cc(%rip), %rsi     # 0x2830d
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x88f0
cmpq $-0x1, %rax
jne 0xae72
leaq 0x1d2ed(%rip), %rsi     # 0x28148
movq %rbx, %rdi
xorl %edx, %edx
callq 0x88f0
cmpq $-0x1, %rax
sete %r14b
jmp 0xae72
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x8930
movq %rbx, %rdi
callq 0x87e0
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IAssignment.hpp
// Function: IAssignment::IAssignment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int, int)
IAssignment(std::string* leftVariableId, int value, int myline) : IStatement(myline){
	  this->leftVariableId = new std::string(*leftVariableId);
	  rightValueInt = value;
	  rightIsValue = true;
	  rightIsInteger = true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
andq $0x0, 0x10(%rdi)
movq %rsi, %r12
movl %ecx, 0x8(%rdi)
leaq 0x3021c(%rip), %rax     # 0x3b0d0
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x24(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
andl $0x0, 0x58(%rdi)
pushq $0x20
popq %rdi
callq 0x83a0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x85b0
movq %r15, 0x48(%r14)
movl %ebx, 0x30(%r14)
movw $0x101, 0x58(%r14)      # imm = 0x101
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x8370
movq %rbx, %rdi
callq 0x87e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IFlowControl.hpp
// Function: IFlowControl::IFlowControl(IBlock*, IBlock*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int)
IFlowControl(IBlock* newIfBlock, IBlock* newElseBlock, string* exp, int myline) : IStatement(myline){
		ifBlock = newIfBlock;
		elseBlock = newElseBlock;
		expression = exp;

		if(ifBlock != NULL)
			ifBlock->setStatementOwner(this);

		if(elseBlock != NULL)
			elseBlock->setStatementOwner(this);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $0x0, 0x10(%rdi)
movl %r8d, 0x8(%rdi)
leaq 0x300dc(%rip), %rax     # 0x3b118
movq %rax, (%rdi)
movq %rsi, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
movq %rcx, 0x18(%rdi)
testq %rsi, %rsi
je 0xb054
movq %rdi, 0x38(%rsi)
testq %rdx, %rdx
je 0xb05d
movq %rdi, 0x38(%rdx)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IFlowControl.hpp
// Function: IFlowControl::addElseSingleStatement(IStatement*)
void addElseSingleStatement(IStatement *stmt){
		if(elseBlock == NULL && stmt != NULL){
			elseBlock = new IBlock();
			elseBlock->addStatement(stmt);
			stmt->setOwnerBlock(elseBlock);
			elseBlock->setStatementOwner(this);
		}
	}

// Assembly:
testq %rsi, %rsi
je 0xb0c7
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0xb0c3
movq %rsi, %r14
pushq $0x40
popq %rdi
callq 0x83a0
leaq 0x2ff68(%rip), %rcx     # 0x3aff0
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
andq $0x0, 0x38(%rax)
movq %rax, 0x28(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0xaa88
movq 0x28(%rbx), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq 0x28(%rbx), %rax
movq %rbx, 0x38(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IFlowControl.hpp
// Function: IFlowControl::addIfSingleStatement(IStatement*)
void addIfSingleStatement(IStatement *stmt){
		if(ifBlock == NULL && stmt != NULL){
			ifBlock = new IBlock();
			ifBlock->addStatement(stmt);
			stmt->setOwnerBlock(ifBlock);
			ifBlock->setStatementOwner(this);
		}
	}

// Assembly:
testq %rsi, %rsi
je 0xb12f
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0xb12b
movq %rsi, %r14
pushq $0x40
popq %rdi
callq 0x83a0
leaq 0x2ff00(%rip), %rcx     # 0x3aff0
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
andq $0x0, 0x38(%rax)
movq %rax, 0x20(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0xaa88
movq 0x20(%rbx), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq 0x20(%rbx), %rax
movq %rbx, 0x38(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IWhile.hpp
// Function: IWhile::addSingleStatement(IStatement*)
void addSingleStatement(IStatement *stmt) {
		if (innerBlock == NULL && stmt != NULL) {
			innerBlock = new IBlock();
			innerBlock->addStatement(stmt);
			stmt->setOwnerBlock(innerBlock);
			innerBlock->setStatementOwner(this);
		}
	}

// Assembly:
testq %rsi, %rsi
je 0xb197
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0xb193
movq %rsi, %r14
pushq $0x40
popq %rdi
callq 0x83a0
leaq 0x2fe98(%rip), %rcx     # 0x3aff0
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
andq $0x0, 0x38(%rax)
movq %rax, 0x20(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0xaa88
movq 0x20(%rbx), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq 0x20(%rbx), %rax
movq %rbx, 0x38(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IRepeat.hpp
// Function: IRepeat::IRepeat(IBlock*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int)
IRepeat(IBlock *block, string *var, int myline) : IStatement(myline){
		if(var == NULL)
			cout << "Erro: valor vazio para repeticao." << endl;

		innerBlock = block;

		varname = var;

		/* Se o valor for um numero, o repita se baseia em contadores numericos */
		if(IMath::isNumber(*varname)){
			if(IMath::isInteger(*varname))
				value = atoi(varname->c_str());
			else{
				/* Se for um valor real, mostramos o warning de arrendondamento */
				value = (int)atof(varname->c_str());
				//warning
				cout << "Atencao: a utilizacao de um valor real em uma expressao \'repita\' causa arredondamento para cima (i.e, `repita 3.3 vezes` repetiria o bloco de código 4 vezes)." << endl;
			}

			isValue = true;
		}
		/* Se o valor for uma string, setamos os boleanos correspondentes */
		else if(varname->find("\"") != std::string::npos)
			isValue = isStrValue = true;

		if(innerBlock != NULL)
			innerBlock->setStatementOwner(this);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rdi)
movl %ecx, 0x8(%rdi)
leaq 0x30a8f(%rip), %rax     # 0x3bc50
movq %rax, (%rdi)
andl $0x0, 0x20(%rdi)
andw $0x0, 0x30(%rdi)
testq %rdx, %rdx
jne 0xb1ed
movq 0x30de7(%rip), %rdi     # 0x3bfc0
leaq 0x21450(%rip), %rsi     # 0x2c630
callq 0x8390
movq %rax, %rdi
callq 0x81f0
movq %r14, 0x28(%rbx)
movq %r15, 0x18(%rbx)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x85b0
movq %r14, %rdi
callq 0xa89e
movl %eax, %r15d
leaq -0x58(%rbp), %rdi
callq 0x8930
movq 0x18(%rbx), %rax
testb %r15b, %r15b
je 0xb25a
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x85b0
movq %r14, %rdi
callq 0xadea
movl %eax, %r15d
leaq -0x38(%rbp), %rdi
callq 0x8930
movq 0x18(%rbx), %rax
movq (%rax), %rdi
testb %r15b, %r15b
je 0xb277
callq 0x86a0
movl %eax, 0x20(%rbx)
jmp 0xb29e
leaq 0x1ce3d(%rip), %rsi     # 0x2809e
movq %rax, %rdi
xorl %edx, %edx
callq 0x88f0
cmpq $-0x1, %rax
je 0xb2a2
movb $0x1, 0x31(%rbx)
jmp 0xb29e
callq 0x84f0
cvttsd2si %xmm0, %eax
movl %eax, 0x20(%rbx)
movq 0x30d36(%rip), %rdi     # 0x3bfc0
leaq 0x213c1(%rip), %rsi     # 0x2c652
callq 0x8390
movq %rax, %rdi
callq 0x81f0
movb $0x1, 0x30(%rbx)
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xb2af
movq %rbx, 0x38(%rax)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb2bc
movq %rax, %rbx
movq %r14, %rdi
callq 0x8930
movq %rbx, %rdi
callq 0x87e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IRepeat.hpp
// Function: IRepeat::addSingleStatement(IStatement*)
void addSingleStatement(IStatement *stmt){
		if(innerBlock == NULL && stmt != NULL){
			innerBlock = new IBlock();
			innerBlock->addStatement(stmt);
			stmt->setOwnerBlock(innerBlock);
			innerBlock->setStatementOwner(this);
		}
	}

// Assembly:
testq %rsi, %rsi
je 0xb337
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0xb333
movq %rsi, %r14
pushq $0x40
popq %rdi
callq 0x83a0
leaq 0x2fcf8(%rip), %rcx     # 0x3aff0
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
andq $0x0, 0x38(%rax)
movq %rax, 0x28(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0xaa88
movq 0x28(%rbx), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq 0x28(%rbx), %rax
movq %rbx, 0x38(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IBlock.hpp
// Function: IBlock::createCode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool createCode(std::string tempFile){
		std::fstream output(tempFile, std::ios::out);

		try{
			if(output){
				output << "#include <iostream>\n";
				output << "using namespace std;\n";
				output << "int main(){\n";
				generateCode(output);
				output << "return 0; }";
				output.close();

				return true;
			}else{
				std::cout << "Erro ao abrir arquivo fonte" << tempFile << std::endl;
				return false;
			}
		}catch(ISourceErrorException& exception){
			std::cout << exception.getErrorMessage() << std::endl;
			output.close();

			return false;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x248(%rbp), %r15
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x8760
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x228(%rbp,%rax)
je 0xb39b
movq 0x30c48(%rip), %rdi     # 0x3bfc0
leaq 0x21525(%rip), %rsi     # 0x2c8a4
callq 0x8390
movq %rax, %rdi
movq %r14, %rsi
callq 0x8340
movq %rax, %rdi
callq 0x81f0
xorl %ebx, %ebx
jmp 0xb3fb
leaq -0x238(%rbp), %r14
leaq 0x214b7(%rip), %rsi     # 0x2c860
movq %r14, %rdi
callq 0x8390
leaq 0x214bd(%rip), %rsi     # 0x2c875
movq %r14, %rdi
callq 0x8390
leaq 0x214c4(%rip), %rsi     # 0x2c88b
movq %r14, %rdi
callq 0x8390
movq (%rbx), %rax
leaq -0x248(%rbp), %rsi
movq %rbx, %rdi
callq *(%rax)
leaq 0x214b3(%rip), %rsi     # 0x2c898
movq %r14, %rdi
callq 0x8390
movb $0x1, %bl
leaq -0x248(%rbp), %rdi
callq 0x8060
leaq -0x248(%rbp), %rdi
callq 0x8920
movl %ebx, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0xb487
movq %rbx, %rdi
callq 0x81a0
leaq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x257fe
movq 0x30b86(%rip), %rdi     # 0x3bfc0
leaq -0x38(%rbp), %rsi
callq 0x8340
movq %rax, %rdi
callq 0x81f0
leaq -0x38(%rbp), %rdi
callq 0x8930
leaq -0x248(%rbp), %rdi
callq 0x8060
callq 0x8720
jmp 0xb397
movq %rax, %rbx
jmp 0xb487
jmp 0xb471
movq %rax, %rbx
jmp 0xb482
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x8930
callq 0x8720
leaq -0x248(%rbp), %rdi
callq 0x8920
movq %rbx, %rdi
callq 0x87e0
movq %rax, %rdi
callq 0xb672
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IDefinition.hpp
// Function: IDefinition::getCppType[abi:cxx11]()
std::string getCppType() {
		if(type == "inteiro")
			return "int";
		else if(type == "real")
			return "double";
		else if(type == "string")
			return "std::string";
		else{
			std::string errorMsg = "Tipo de variavel mal definido.";
			throw ISourceErrorException(errorMsg, myLine);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsi), %r15
leaq 0x1b5d7(%rip), %rsi     # 0x27c5b
movq %r15, %rdi
callq 0xa748
testb %al, %al
je 0xc699
leaq 0x1bc6d(%rip), %rsi     # 0x28304
jmp 0xc6cf
leaq 0x1b5b6(%rip), %rsi     # 0x27c56
movq %r15, %rdi
callq 0xa748
testb %al, %al
je 0xc6b5
leaq 0x1bc55(%rip), %rsi     # 0x28308
jmp 0xc6cf
leaq 0x1bc58(%rip), %rsi     # 0x28314
movq %r15, %rdi
callq 0xa748
testb %al, %al
je 0xc6e9
leaq 0x1bc40(%rip), %rsi     # 0x2830f
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x8180
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bc2b(%rip), %rsi     # 0x2831b
leaq -0x40(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
callq 0x8180
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x85b0
movl 0x8(%r14), %edx
movb $0x1, %r15b
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x2e97c(%rip), %rsi     # 0x3b0b0
leaq 0x1b5(%rip), %rdx       # 0xc8f0
movq %rbx, %rdi
callq 0x87a0
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x8930
testb %r15b, %r15b
jne 0xc759
jmp 0xc761
movq %rax, %r14
movq %rbx, %rdi
callq 0x82f0
leaq -0x40(%rbp), %rdi
callq 0x8930
movq %r14, %rdi
callq 0x87e0
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IBlock.hpp
// Function: IBlock::getLocalVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
IData* getLocalVariable(std::string variableId){
		for(ulong i = 0; i < blockVariables.size(); i++){

			if(blockVariables[i]->getId() == variableId)
				return blockVariables[i];
		}

		/* Caso o bloco local não possua a variavel, perguntamos aos blocos pai */
		if(stmtOwner != NULL){
			return stmtOwner->getOwnerBlock()->getLocalVariable(variableId);
		}

		return NULL;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq -0x68(%rbp), %r15
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jae 0xc7d4
movq (%rax,%r13,8), %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x85b0
movq %r15, %rdi
movq %rbx, %rsi
callq 0xce8f
movl %eax, %r12d
movq %r15, %rdi
callq 0x8930
testb %r12b, %r12b
jne 0xc809
incq %r13
jmp 0xc790
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xc813
movq 0x10(%rax), %r14
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x85b0
movq %r14, %rdi
movq %r15, %rsi
callq 0xc772
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x8930
jmp 0xc815
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rbx
jmp 0xc815
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x8930
movq %rbx, %rdi
callq 0x87e0
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IBlock.hpp
// Function: IBlock::registerLocalVariable(IData*, int)
void registerLocalVariable(IData* var, int myLine) {
		if(getLocalVariable(var->getId()) != NULL){
			std::string errorMsg = "Variavel referenciada ja existente.";
			throw ISourceErrorException(errorMsg, myLine);
		}
		blockVariables.push_back(var);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebx
movq %rdi, %r14
movq %rsi, -0x28(%rbp)
addq $0x8, %rsi
leaq -0x88(%rbp), %r15
movq %r15, %rdi
callq 0x85b0
movq %r14, %rdi
movq %r15, %rsi
callq 0xc772
movq %rax, %r15
leaq -0x88(%rbp), %rdi
callq 0x8930
testq %r15, %r15
jne 0xd511
addq $0x8, %r14
leaq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0xd5a8
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b173(%rip), %rsi     # 0x2868b
leaq -0x68(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x8180
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %r14
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x85b0
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x2db58(%rip), %rsi     # 0x3b0b0
leaq -0xc6f(%rip), %rdx      # 0xc8f0
movq %r14, %rdi
callq 0x87a0
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x8930
testb %r15b, %r15b
jne 0xd57d
jmp 0xd585
movq %rax, %rbx
movq %r14, %rdi
callq 0x82f0
leaq -0x68(%rbp), %rdi
jmp 0xd59a
movq %rax, %rbx
jmp 0xd59f
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x8930
movq %rbx, %rdi
callq 0x87e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IAssignment.hpp
// Function: IAssignment::~IAssignment()
virtual ~IAssignment(){
	  delete leftVariable;
	  delete rightVariable;
	  delete rightStrValue;
	  delete rightVariableMath;
	  delete leftVariableId;
	  delete rightVariableId;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2c599(%rip), %rax     # 0x3b0d0
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0xeb49
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xeb58
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0xeb69
movq %r14, %rdi
callq 0x8930
movq %r14, %rdi
callq 0x8370
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0xeb82
movq %r14, %rdi
callq 0xeee8
movq %r14, %rdi
callq 0x8370
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0xeb9b
movq %r14, %rdi
callq 0x8930
movq %r14, %rdi
callq 0x8370
movq 0x50(%rbx), %rbx
testq %rbx, %rbx
je 0xebb4
movq %rbx, %rdi
callq 0x8930
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8370
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IBlock.hpp
// Function: IBlock::generateRandomVariableName[abi:cxx11](unsigned long)
static std::string generateRandomVariableName( size_t length )
	{
	    auto randchar = []() -> char
	    {
	        const char charset[] =
	        "0123456789"
	        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	        "abcdefghijklmnopqrstuvwxyz";
	        const size_t max_index = (sizeof(charset) - 1);
	        return charset[ rand() % max_index ];
	    };
	    std::string str(length,0);
	    std::generate_n( str.begin(), length, randchar );
	    return str;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %edx, %edx
callq 0x8490
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x25297
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x8930
movq %r14, %rdi
callq 0x87e0
// File: /workspace/github_cpp_makefile_star2_O2/araujoigor[P]ipp-compiler/./src/include/IRead.hpp
// Function: IRead::generateCode(std::basic_fstream<char, std::char_traits<char>>&)
void generateCode(std::fstream& fileStream) {

		/* Um leia é representado por um cin */
		fileStream << "cin >> ";

		/* Obtemos a variável especificada, a partir dos blocos "pai" */
		IData *data = ownerBlock->getLocalVariable(varId);

		/* Se a variável não existir, geramos um erro. */
		 if(data == NULL){
			 std::string errorMsg = "Variavel \'" + *varId + "\' nao declarada.";
			 throw ISourceErrorException(errorMsg, myLine);
		 }

		 fileStream << *varId << ";" << endl;

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %r14
leaq 0x70b3(%rip), %rsi      # 0x2c741
movq %r14, %rdi
callq 0x8390
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0xebdc
testq %rax, %rax
je 0x256d5
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x8340
leaq 0x70b2(%rip), %rsi      # 0x2c76d
movq %rax, %rdi
callq 0x8390
movq %rax, %rdi
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x81f0
movq 0x18(%rbx), %rdx
leaq 0x7069(%rip), %rsi      # 0x2c749
leaq -0x58(%rbp), %r14
movq %r14, %rdi
callq 0xc83b
leaq 0x7061(%rip), %rdx      # 0x2c754
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0xc63c
leaq -0x58(%rbp), %rdi
callq 0x8930
pushq $0x28
popq %rdi
callq 0x8200
movq %rax, %r14
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x85b0
movl 0x8(%rbx), %edx
movb $0x1, %r15b
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0xc8b2
xorl %r15d, %r15d
leaq 0x15974(%rip), %rsi     # 0x3b0b0
leaq -0x18e53(%rip), %rdx    # 0xc8f0
movq %r14, %rdi
callq 0x87a0
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x8930
testb %r15b, %r15b
jne 0x25761
jmp 0x25769
movq %rax, %rbx
movq %r14, %rdi
callq 0x82f0
leaq -0x78(%rbp), %rdi
jmp 0x25776
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x8930
movq %rbx, %rdi
callq 0x87e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/hangman/GameData.cpp
// Function: GameData::init(int)
void GameData::init(int root_word_len) {
    word_length = root_word_len;
    memset(current_string, '_', word_length);
    current_string[word_length] = '\0';

    n_players = 2;
    current_turn = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, (%rdi)
addq $0x4, %rdi
movslq %esi, %r14
pushq $0x5f
popq %rsi
movq %r14, %rdx
callq 0x2170
movb $0x0, 0x4(%rbx,%r14)
movq $0x2, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/hangman/GameData.cpp
// Function: GameData::play(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int GameData::play(std::string root_word, std::string str) {
    int len = str.size();

    // std::cout<<"playing "<<str<<"on "<<root_word<<std::endl;
    // The word is being guessed
    if(len != 1) {
        return str == root_word;
    }

    // A letter is being guessed
    char letter = str[0];
    bool game_finished = true;

    for(int i = 0; i < word_length; ++i) {
        if(root_word[i] == letter) {
            current_string[i] = letter;
        }
        if(current_string[i] == '_') {
            game_finished = false;
        }
    }
    return game_finished;
}

// Assembly:
pushq %rax
cmpl $0x1, 0x8(%rdx)
jne 0x318f
movq (%rdx), %rax
movb (%rax), %al
movl (%rdi), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movb $0x1, %r8b
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x319c
movq (%rsi), %r10
cmpb %al, (%r10,%r9)
jne 0x3179
movb %al, 0x4(%rdi,%r9)
movl %eax, %r10d
jmp 0x317e
movb 0x4(%rdi,%r9), %r10b
cmpb $0x5f, %r10b
movzbl %r8b, %r8d
cmovel %edx, %r8d
incq %r9
jmp 0x3161
movq %rdx, %rdi
callq 0x33f0
movzbl %al, %eax
jmp 0x31a4
andb $0x1, %r8b
movzbl %r8b, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/hangman/GameData.cpp
// Function: GameData::serialize[abi:cxx11]()
std::string GameData::serialize() {
  //TODO send currently guessed characters too
  
  char data[1024];
  sprintf(data, "%d %s %d %d|", word_length, current_string, n_players, current_turn);
  std::string str(data);
  // std::cout<<"Serialized\t"<<str<<std::endl;
  return str;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x4(%rsi), %rcx
movl (%rsi), %edx
movl 0x18(%rsi), %r8d
movl 0x1c(%rsi), %r9d
leaq 0xe85(%rip), %rsi       # 0x40c9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2060
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x341a
movq %rbx, %rax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/hangman/GameData.cpp
// Function: GameData::deserialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void GameData::deserialize(std::string req){
    char data[1024]={0};
    req.copy(data, req.size());
    sscanf(data, "%d %s %d %d|", &word_length, current_string, &n_players, &current_turn);
    // std::cout<<"Deserializing\t"<<req<<std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x2170
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2040
leaq 0x4(%r14), %rcx
leaq 0x18(%r14), %r8
leaq 0x1c(%r14), %r9
leaq 0xe0f(%rip), %rsi       # 0x40c9
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2230
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/hangman/GameData.cpp
// Function: GameData::getRandomWord[abi:cxx11]()
std::string GameData::getRandomWord() {
    std::ifstream file("words.txt");
    std::string word;

    std::random_device rd;
    unsigned long rand_no = std::uniform_int_distribution<unsigned long>()(rd) % 367516;

    while(--rand_no) getline(file, word);
    getline(file, word);

    // Remove trailing newline char
    word.erase(word.length() - 1);
    std::cout<<"Root Word: "<<word<<std::endl;
    return word;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x15a0, %rsp           # imm = 0x15A0
movq %rdi, %rbx
leaq 0xdec(%rip), %rsi       # 0x40d6
leaq 0x10(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2360
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x218(%rsp), %rdi
callq 0x3456
movq %rsp, %rdi
andq $0x0, (%rdi)
orq $-0x1, 0x8(%rdi)
leaq 0x218(%rsp), %rsi
callq 0x34ac
movl $0x59b9c, %ecx          # imm = 0x59B9C
xorl %edx, %edx
divq %rcx
movq %rdx, %r14
leaq 0x10(%rsp), %r15
decq %r14
je 0x3351
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2070
jmp 0x333f
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x2070
movq 0x8(%rbx), %rsi
decq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x2080
movq 0x3c61(%rip), %rdi      # 0x6fd8
leaq 0xd62(%rip), %rsi       # 0x40e0
callq 0x2240
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2130
leaq 0x218(%rsp), %rdi
callq 0x34b4
leaq 0x10(%rsp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x15a0, %rsp           # imm = 0x15A0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x33c6
movq %rax, %r14
jmp 0x33d6
jmp 0x33c6
movq %rax, %r14
leaq 0x218(%rsp), %rdi
callq 0x34b4
movq %rbx, %rdi
callq 0x2120
leaq 0x10(%rsp), %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: Client::init(char const*, int)
void  Client::init(const char* serverIp , int port ){
      int socket_fd = socket(AF_INET, SOCK_STREAM, 0);
      sockaddr_in socket_address;
      socket_address.sin_family = AF_INET;
      socket_address.sin_port = htons(port);
      socket_address.sin_addr.s_addr = inet_addr(serverIp);

      connect(socket_fd, (struct sockaddr *)&socket_address, sizeof(socket_address) );
      mastersocket = socket_fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2090
movl %eax, %ebp
movq %rsp, %r12
movw $0x2, (%r12)
rolw $0x8, %bx
movw %bx, 0x2(%r12)
movq %r14, %rdi
callq 0x2260
movl %eax, 0x4(%r12)
pushq $0x10
popq %rdx
movl %ebp, %edi
movq %r12, %rsi
callq 0x21d0
movl %ebp, (%r15)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: Client::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void Client::init(std::string serverIp , int port ){
      char *IP;
      IP = (char*) malloc(serverIp.size());
      serverIp.copy(IP,serverIp.size());

      int socket_fd = socket(AF_INET, SOCK_STREAM, 0);
      sockaddr_in socket_address;
      socket_address.sin_family = AF_INET;
      socket_address.sin_port = htons(port);
      socket_address.sin_addr.s_addr = inet_addr(IP);

      connect(socket_fd, (struct sockaddr *)&socket_address, sizeof(socket_address) );
      mastersocket = socket_fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movq %r15, %rdi
callq 0x22b0
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x2040
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2090
movl %eax, %r14d
movq %rsp, %r15
movw $0x2, (%r15)
rolw $0x8, %bp
movw %bp, 0x2(%r15)
movq %r12, %rdi
callq 0x2260
movl %eax, 0x4(%r15)
pushq $0x10
popq %rdx
movl %r14d, %edi
movq %r15, %rsi
callq 0x21d0
movl %r14d, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: Client::forward(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Client::forward(std::string str){
    char data[1024]={0};
    str.copy(data, str.size());
    send(mastersocket, data,strlen(data),0);
    return str.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x2170
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2040
movl (%r14), %ebp
movq %r15, %rdi
callq 0x2100
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2140
movl 0x8(%rbx), %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: Client::forward(char const*)
int Client::forward(const char *str){
  char data[1024]={0};
  strcpy(data,str);
  send(mastersocket, data,strlen(data),0);
  return strlen(str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x2170
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2200
movl (%r14), %ebp
movq %r15, %rdi
callq 0x2100
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2140
movq %rbx, %rdi
callq 0x2100
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: Server::init(int, int)
void Server::init(int port, int maxClients = 20){
      //CREATE SOCKET
      //So it is just an integer number that uniquely represents an opened file/socket in operating system
      int socket_fd = socket(AF_INET, SOCK_STREAM, 0); // creating socket
      //AF_INET (IPv4 protocol) , AF_INET6 (IPv6 protocol)
      //SOCK_STREAM: TCP(reliable, connection oriented)
      //SOCK_DGRAM: UDP(unreliable, connectionless)

      //Bind ip and port to socket
      sockaddr_in socket_address;
      socket_address.sin_family = AF_INET;
      socket_address.sin_addr.s_addr = htonl(INADDR_ANY);
      socket_address.sin_port = htons(port);         // this is the port number of running server
      bind(socket_fd, (sockaddr*)&socket_address , sizeof(socket_address));

      //LISTEN Socket
      listen(socket_fd , maxClients);
      //20 - max no of connections
      mastersocket = socket_fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2090
leaq 0x8(%rsp), %rsi
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
movl %eax, %r15d
rolw $0x8, %bp
movw %bp, 0x2(%rsi)
pushq $0x10
popq %rdx
movl %eax, %edi
callq 0x2050
movl %r15d, %edi
movl %ebx, %esi
callq 0x2280
movl %r15d, (%r14)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: Server::forward(int, char const*)
int Server::forward(int client, const char *str){
    char data[1024]={0};
    strcpy(data,str);
    send(client, data,strlen(data),0);
    return strlen(str);
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdx, %rbx
movl %esi, %ebp
movq %rsp, %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x2170
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2100
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x2140
movq %rbx, %rdi
callq 0x2100
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: updateMaxFD(std::vector<Player, std::allocator<Player>>, int)
int updateMaxFD(std::vector<Player> clients, int maxfd){
    int x =maxfd;
    for(size_t i=0;i<clients.size();i++)
      x =std::max(x,clients[i].socket_id);
    return x;

}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x28
popq %rdi
cqto
idivq %rdi
addq $0x20, %rcx
subq $0x1, %rax
jb 0x3abc
movl (%rcx), %edx
cmpl %edx, %esi
cmovlel %edx, %esi
addq $0x28, %rcx
jmp 0x3aa9
movl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/milzar[P]Multiplayer-Hangman-Game/src/network/wrapper.cpp
// Function: initFdset(std::vector<Player, std::allocator<Player>>, int)
fd_set initFdset(std::vector<Player> clients, int master){
    fd_set temp;
    FD_ZERO(&temp);
    FD_SET(master,&temp);
    for(size_t i=0;i<clients.size();i++){
        if(clients[i].socket_id)
            FD_SET(clients[i].socket_id,&temp);
    }
    return temp;
}

// Assembly:
movl %edx, %ecx
xorl %eax, %eax
cmpq $0x10, %rax
je 0x3ad3
andq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x3ac3
pushq $0x40
popq %r8
movl %ecx, %eax
cltd
idivl %r8d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
pushq $0x1
popq %r9
movq %r9, %rax
shlq %cl, %rax
orq %rax, (%rdi,%rdx,8)
movq (%rsi), %r10
movq 0x8(%rsi), %rax
subq %r10, %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
addq $0x20, %r10
xorl %r11d, %r11d
cmpq %rsi, %r11
jae 0x3b3c
movl (%r10), %ecx
testl %ecx, %ecx
je 0x3b33
movl %ecx, %eax
cltd
idivl %r8d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
movq %r9, %rax
shlq %cl, %rax
orq %rax, (%rdi,%rdx,8)
incq %r11
addq $0x28, %r10
jmp 0x3b0f
movq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/SaadBazaz[P]RIP-Protocol-Simulation/ProxyRouter.cpp
// Function: printTable()
void printTable()
{
	cout << "Identifier\tFD\tHop Count\tIn Use?" << endl;
	cout << "----------------------------------------------------" << endl;
	for (int i = 0; i < table.size(); i++)
	{
		cout << table[i].identifier << "\t\t" << table[i].fd << "\t" << table[i].hop_count << "\t\t" << (table[i].in_use ? "Yes" : "No") << endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x73b2(%rip), %rbx      # 0x9fc8
leaq 0x3423(%rip), %rsi      # 0x6040
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
leaq 0x342c(%rip), %rsi      # 0x6060
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
xorl %r12d, %r12d
leaq 0x3447(%rip), %r14      # 0x6095
leaq 0x3441(%rip), %r15      # 0x6096
leaq 0x343c(%rip), %r13      # 0x6098
leaq 0x3439(%rip), %rbp      # 0x609c
xorl %ebx, %ebx
movq 0x75c4(%rip), %rcx      # 0xa230
movq 0x75b5(%rip), %rax      # 0xa228
subq %rax, %rcx
sarq $0x6, %rcx
cmpq %rbx, %rcx
jbe 0x2d0c
movl (%rax,%r12), %esi
movq 0x733a(%rip), %rdi      # 0x9fc8
callq 0x2390
movq %rax, %rdi
movq %r14, %rsi
callq 0x2240
movq 0x7583(%rip), %rcx      # 0xa228
movl 0x4(%rcx,%r12), %esi
movq %rax, %rdi
callq 0x2390
movq %rax, %rdi
movq %r15, %rsi
callq 0x2240
movq 0x7564(%rip), %rcx      # 0xa228
movl 0xc(%rcx,%r12), %esi
movq %rax, %rdi
callq 0x2390
movq %rax, %rdi
movq %r14, %rsi
callq 0x2240
movq 0x7545(%rip), %rcx      # 0xa228
cmpb $0x0, 0x30(%rcx,%r12)
movq %rbp, %rsi
cmovneq %r13, %rsi
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2110
incq %rbx
addq $0x40, %r12
jmp 0x2c65
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq