LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ksherlock[P]wdc-utils/disassembler.cpp
// Function: analyzer::process()
void analyzer::process() {

	if (_traits & disassembler::track_rep_sep) {
		switch(_op) {
			case 0xc2: // REP
				_flags |= (_arg & 0x30);
				break;
			case 0xe2: // SEP
				_flags &= ~(_arg & 0x30);
				break;
		}
	}

	switch (_mode & 0xf000) {
		case mRelative: {

			uint32_t pc = _pc + 1 + _size + _arg;

			if ((_size == 1) && (_arg & 0x80))
				pc += 0xff00;
			pc &= 0xffff;

			_labels.push_back(pc);
			break;
		}
		case mAbsolute:
		case mAbsoluteI:
		case mAbsoluteLong: {
			_labels.push_back(_arg);
			break;
		}
	}
	reset();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testb $0x10, (%rdi)
je 0x924d
movzbl 0x10(%rbx), %eax
cmpl $0xe2, %eax
je 0x9242
cmpl $0xc2, %eax
jne 0x924d
movl 0x20(%rbx), %eax
andl $0x30, %eax
orl %eax, 0x18(%rbx)
jmp 0x924d
movl 0x20(%rbx), %eax
notl %eax
orl $-0x31, %eax
andl %eax, 0x18(%rbx)
movl $0xf000, %eax           # imm = 0xF000
andl 0x24(%rbx), %eax
addl $0xffffe000, %eax       # imm = 0xFFFFE000
shrl $0xc, %eax
cmpl $0x2, %eax
jb 0x92aa
cmpl $0x3, %eax
je 0x92aa
cmpl $0x7, %eax
jne 0x92d0
movl 0x14(%rbx), %eax
movl 0x20(%rbx), %ecx
movl 0x1c(%rbx), %edx
addl %eax, %edx
leal (%rcx,%rdx), %esi
incl %esi
testb %cl, %cl
leal 0xff01(%rcx,%rdx), %ecx
cmovnsl %esi, %ecx
cmpl $0x1, %eax
cmovnel %esi, %ecx
movzwl %cx, %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
jne 0x92b7
leaq 0x28(%rbx), %rdi
leaq 0xc(%rsp), %rdx
jmp 0x92cb
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x92c3
movl 0x20(%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%rbx)
jmp 0x92d0
leaq 0x20(%rbx), %rdx
leaq 0x28(%rbx), %rdi
callq 0x96d8
movl 0xc(%rbx), %eax
addl %eax, 0x1c(%rbx)
xorl %eax, %eax
movl %eax, 0x20(%rbx)
movl %eax, 0xc(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::set_section(int)
void zrdz_disassembler::set_section(int section) {
	if (section == _section) return;
	if (section >= _sections.size()) {
		warnx("Invalid section %d", section);
		return;
	}
	auto &e = _sections[section];
	if (section >5 && !e.valid) {
		warnx("Invalid section %d", section);
		return;		
	}

	if (_section >= 0) {
		flush();
		_sections[_section].pc = pc();
		emit("", "ends");
		putchar('\n');
	}

	print_section(e);

	if (!e.processed) {
		print_globals(section);
		print_equs(section);
		e.processed = true;
	}

	_section = section;
	set_pc(e.pc);
	set_code((e.flags & SEC_DATA) == 0);
	recalc_next_label();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl 0x68(%rdi), %eax
cmpl %esi, %eax
je 0xada3
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %rcx
movq 0x50(%rdi), %r14
movq 0x58(%rdi), %rdx
subq %r14, %rdx
sarq $0x4, %rdx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rsi
cmpq %rcx, %rsi
jbe 0xadb0
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
addq %rcx, %r14
cmpl $0x6, %ebp
jl 0xac8e
cmpb $0x0, 0x2d(%r14)
je 0xadb0
testl %eax, %eax
js 0xad36
movq %rbx, %rdi
callq 0x81ae
movl 0x20(%rbx), %eax
movslq 0x68(%rbx), %rcx
movq 0x50(%rbx), %rdx
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
movl %eax, 0x48(%rdx,%rcx)
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x467f(%rip), %rdx      # 0xf344
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x6a64
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5018(%rip), %rsi      # 0xfcfb
leaq 0x5015(%rip), %rdx      # 0xfcff
movq %rsp, %rdi
callq 0x6a64
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x752e
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xad15
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xad2c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
movl $0xa, %edi
callq 0x2240
movq %r14, %rsi
callq 0xa59e
cmpb $0x0, 0x2c(%r14)
jne 0xad5e
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa8c4
movq %rbx, %rdi
movl %ebp, %esi
callq 0xaa76
movb $0x1, 0x2c(%r14)
movl %ebp, 0x68(%rbx)
movl 0x48(%r14), %ebp
cmpl %ebp, 0x20(%rbx)
je 0xad75
movq %rbx, %rdi
callq 0x81ae
movl %ebp, 0x20(%rbx)
movb 0x21(%r14), %bpl
notb %bpl
shrb $0x7, %bpl
cmpb %bpl, 0x28(%rbx)
je 0xad92
movq %rbx, %rdi
callq 0x81ae
movb %bpl, 0x28(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *0x38(%rax)
movl %eax, 0x30(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5021(%rip), %rdi      # 0xfdd8
movl %ebp, %esi
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21d0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xadea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xadea
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xae01
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::next_label(int)
int32_t zrdz_disassembler::next_label(int32_t pc) {
	if (_section < 0) return -1;

	auto &symbols = _sections[_section].symbols;
	if (pc >= 0) {

		for(; !symbols.empty(); symbols.pop_back()) {
			auto &s = symbols.back();
			if (s.offset > pc) return s.offset;
			if (s.offset == pc) emit(s.name);
			else {
				warnx("Unable to place symbol %s at offset $%04x in section %d",
					s.name.c_str(), s.offset, _section);
			}
		}

	}
	if (symbols.empty()) return -1;
	return symbols.back().offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq 0x68(%rdi), %rcx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rcx, %rcx
js 0xb220
movl %esi, %ebp
movq %rdi, %r14
movq 0x50(%rdi), %rax
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
movq 0x30(%rax,%rcx), %rdx
movq 0x38(%rax,%rcx), %rdi
testl %esi, %esi
js 0xb214
cmpq %rdi, %rdx
je 0xb214
leaq (%rax,%rcx), %r12
addq $0x30, %r12
leaq 0x4c32(%rip), %r15      # 0xfdeb
movl -0x4(%rdi), %edx
addq $-0x28, %rdi
cmpl %ebp, %edx
ja 0xb21e
jne 0xb1cd
callq 0x750c
jmp 0xb1de
movq (%rdi), %rsi
movl 0x68(%r14), %ecx
movq %r15, %rdi
xorl %eax, %eax
callq 0x21d0
movq 0x8(%r12), %rcx
leaq -0x28(%rcx), %rdi
movq %rdi, 0x8(%r12)
movq -0x28(%rcx), %rax
addq $-0x18, %rcx
cmpq %rcx, %rax
je 0xb20c
movq (%rcx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x21c0
movq 0x8(%r12), %rdi
cmpq %rdi, (%r12)
jne 0xb1b9
jmp 0xb220
cmpq %rdi, %rdx
je 0xb220
movl -0x4(%rdi), %ebx
jmp 0xb220
movl %edx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::symbol_name[abi:cxx11](unsigned int) const
std::string zrdz_disassembler::symbol_name(unsigned entry) const {
	if (entry >= _symbols.size()) {
		warnx("Invalid symbol %d", entry);
		return "$";
	}
	return _symbols[entry].name;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, %ecx
movq 0x38(%rsi), %rax
movq 0x40(%rsi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rsi, %rdi
leaq 0x10(%rbx), %r14
cmpq %rcx, %rdi
jbe 0xb732
leaq (%rcx,%rcx,4), %rcx
movq %r14, (%rbx)
movq (%rax,%rcx,8), %rsi
movq 0x8(%rax,%rcx,8), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x69ce
jmp 0xb75b
leaq 0x46ed(%rip), %rdi      # 0xfe26
movl %edx, %esi
xorl %eax, %eax
callq 0x21d0
movq %r14, (%rbx)
leaq 0x4640(%rip), %rsi      # 0xfd8c
leaq 0x463a(%rip), %rdx      # 0xfd8d
movq %rbx, %rdi
callq 0x6a64
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::glx_get_fb_config_attrib(_XDisplay*, __GLXFBConfigRec*, int, int*)
int glx_get_fb_config_attrib(Display *dpy, GLXFBConfig config, int attribute, int *value) {
	SP_TRACE("%d", attribute);
	const EGLConfig &egl_cfg = *reinterpret_cast<EGLConfig*>(config);
	auto fnd_attr = egl_attr_map.find(attribute);
	if (fnd_attr != egl_attr_map.end()) {
		fn_eglGetConfigAttrib(disp(), egl_cfg, fnd_attr->second, value);
		SP_TRACE(" val=%d", *value);
	} else if (attribute == GLX_VISUAL_ID) {
		*value = XVisualIDFromVisual(get_visual(dpy, 0)->visual);
	} else if (attribute == GLX_DRAWABLE_TYPE) {
		*value = (GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT);
	} else if (attribute == GLX_RENDER_TYPE) {
		*value = GLX_RGBA_BIT;
	} else if (attribute == GLX_X_RENDERABLE) {
		*value = True;
	} else if (attribute == GLX_MAX_PBUFFER_WIDTH || attribute == GLX_MAX_PBUFFER_HEIGHT) {
		*value = 4096;
	} else if (attribute == GLX_MAX_PBUFFER_PIXELS) {
		*value = 4096*4096;
	}
	return Success;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl %edx, 0x4(%rsp)
cmpb $0x1, 0x6e18(%rip)      # 0xd398
je 0x664f
leaq 0x6d43(%rip), %rdi      # 0xd2d0
leaq 0x4(%rsp), %rsi
callq 0x42f0
testq %rax, %rax
je 0x65d6
movq %rax, %r12
movq 0x6eca(%rip), %r14      # 0xd470
callq 0x6bef
movq (%r15), %rsi
movl 0xc(%r12), %edx
movq %rax, %rdi
movq %rbx, %rcx
callq *%r14
cmpb $0x1, 0x6dd5(%rip)      # 0xd398
jne 0x6668
movq %rbx, %rdi
callq 0x4b46
jmp 0x6668
movl 0x4(%rsp), %eax
leal -0x800b(%rax), %ecx
cmpl $0x7, %ecx
ja 0x663a
leaq 0x2a14(%rip), %rdx      # 0x9000
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x1, (%rbx)
jmp 0x6668
movl $0x40, %edi
callq 0x4280
movq %rax, %r15
movq 0xe8(%r14), %rax
movl 0x38(%rax), %edx
movq %r14, %rdi
xorl %esi, %esi
movl $0x4, %ecx
movq %r15, %r8
callq 0x4320
movq (%r15), %rdi
callq 0x4470
movl %eax, (%rbx)
jmp 0x6668
movl $0x7, (%rbx)
jmp 0x6668
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x8016, %ecx           # imm = 0x8016
jne 0x665b
movl $0x1000, (%rbx)         # imm = 0x1000
jmp 0x6668
movl %edx, %edi
callq 0x4afc
jmp 0x6586
cmpl $0x8018, %eax           # imm = 0x8018
jne 0x6668
movl $0x1000000, (%rbx)      # imm = 0x1000000
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::get_proc_address(unsigned char const*)
void *get_proc_address(const GLubyte *procName) {
	std::string name_str(reinterpret_cast<const char*>(procName));
	// SP_TRACE("%s", name_str.c_str());

	auto glx_fnd = glx_procs.find(name_str);
	if (glx_fnd != glx_procs.end())
		return glx_fnd->second;
	// Unsupported extensions
	if (name_str == "glXImportContextEXT" ||
		name_str == "glXFreeContextEXT")
		return nullptr;
	// Use EGL for the base OpenGL functions
	return egl_imports.getProcAddress(name_str.c_str());
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x44b0
leaq 0x6891(%rip), %rdi      # 0xd358
movq %rbx, %rsi
callq 0x4230
testq %rax, %rax
je 0x6ada
movq 0x28(%rax), %rbx
jmp 0x6b16
leaq 0x2f5a(%rip), %rsi      # 0x9a3b
leaq 0x10(%rsp), %rdi
callq 0x40b0
testl %eax, %eax
je 0x6b14
leaq 0x2f59(%rip), %rsi      # 0x9a4f
leaq 0x10(%rsp), %rdi
callq 0x40b0
testl %eax, %eax
je 0x6b14
movq 0x10(%rsp), %rdi
callq *0x6909(%rip)           # 0xd418
movq %rax, %rbx
jmp 0x6b16
xorl %ebx, %ebx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b31
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b58
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::create_context(__GLXFBConfigRec*, __GLXcontextRec*)
GLXContext create_context(GLXFBConfig cfg, GLXContext share_context) {
	EGLDisplay dp = disp();
	SP_CHECK(fn_eglBindAPI(EGL_OPENGL_API));

	EGLConfig egl_cfg;
	if (cfg == nullptr) {
		get_config(dp, &egl_cfg);
	} else {
		egl_cfg = *reinterpret_cast<EGLConfig*>(cfg);
	}

	std::array<int, 1> ctx_attrs{EGL_NONE};
	EGLContext share = EGL_NO_CONTEXT;
	if (share_context)
		share = get_context(share_context).egl_ctx;

	EGLContext egl_ctx = fn_eglCreateContext(dp, egl_cfg, share, ctx_attrs.data());

	return reinterpret_cast<GLXContext>(new GLXConfigImpl(egl_ctx));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x6bef
movq %rax, %rbx
movl $0x30a2, %edi           # imm = 0x30A2
callq *0x691a(%rip)           # 0xd4a0
cmpl $0x1, %eax
jne 0x6be8
testq %r15, %r15
je 0x6b9a
movq (%r15), %rax
movq %rax, 0x8(%rsp)
jmp 0x6ba7
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6c2c
movl $0x3038, 0x4(%rsp)      # imm = 0x3038
testq %r14, %r14
je 0x6bb9
movq (%r14), %rdx
jmp 0x6bbb
xorl %edx, %edx
movq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
callq *0x68aa(%rip)           # 0xd478
movq %rax, %rbx
movl $0x8, %edi
callq 0x4280
movq %rbx, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x4d56
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::disp()
EGLDisplay disp() {
	EGLDisplay d = egl_imports.getPlatformDisplay(EGL_PLATFORM_DEVICE_EXT, nullptr, nullptr);
	if (!egl_initialised.test_and_set()) {
		SP_CHECK(fn_eglInitialize(d, nullptr, nullptr));
	}
	return d;
}

// Assembly:
pushq %rbx
movl $0x313f, %edi           # imm = 0x313F
xorl %esi, %esi
xorl %edx, %edx
callq *0x6801(%rip)           # 0xd400
movq %rax, %rbx
movb $0x1, %al
xchgb %al, 0x68be(%rip)       # 0xd4c8
testb %al, %al
jne 0x6c20
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *0x683d(%rip)           # 0xd458
cmpl $0x1, %eax
jne 0x6c25
movq %rbx, %rax
popq %rbx
retq
movl %eax, %edi
callq 0x4d8e
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::get_config(void*, void**)
void get_config(EGLDisplay dp, EGLConfig *egl_cfg) {
	// TODO: proper config choosing
	int cfg_attrs[] = {EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
		EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
		EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER,
		EGL_RED_SIZE, 8,
		EGL_GREEN_SIZE, 8,
		EGL_BLUE_SIZE, 8,
		EGL_NONE};
	int num_configs;
	SP_CHECK(fn_eglChooseConfig(dp, cfg_attrs, egl_cfg, 1, &num_configs));
	SP_ASSERT(num_configs > 0);
}

// Assembly:
subq $0x48, %rsp
movq %rsi, %rdx
movaps 0x2446(%rip), %xmm0     # 0x9080
leaq 0x10(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps 0x2426(%rip), %xmm0     # 0x9070
movaps %xmm0, 0x10(%rsi)
movaps 0x240b(%rip), %xmm0     # 0x9060
movaps %xmm0, (%rsi)
movl $0x3038, 0x30(%rsi)     # imm = 0x3038
leaq 0xc(%rsp), %r8
movl $0x1, %ecx
callq *0x67f9(%rip)           # 0xd468
cmpl $0x1, %eax
jne 0x6c80
cmpl $0x0, 0xc(%rsp)
jle 0x6c87
addq $0x48, %rsp
retq
movl %eax, %edi
callq 0x4dc6
callq 0x4dfe
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::lookup_drawable(_XDisplay*, unsigned long, __GLXFBConfigRec*)
EGLSurface lookup_drawable(Display *dpy, GLXDrawable drawable, GLXFBConfig cfg = nullptr) {
	if (drawable2surface.count(drawable))
		return drawable2surface.at(drawable).egl_sfc;
	// Create a new backing PBuffer
	EGLDisplay dp = disp();
	EGLConfig egl_cfg;
	if (cfg == nullptr) {
		get_config(dp, &egl_cfg);
	} else {
		egl_cfg = *reinterpret_cast<EGLConfig*>(cfg);
	}
	unsigned width, height;
	std::tie(width, height) = get_drawable_dims(dpy, drawable);
	std::vector<int> attrs{EGL_WIDTH, int(width), EGL_HEIGHT, int(height), EGL_NONE};
	EGLSurface surface = fn_eglCreatePbufferSurface(dp, egl_cfg, attrs.data());
	drawable2surface[drawable].egl_sfc = surface;
	drawable2surface[drawable].width = width;
	drawable2surface[drawable].height = height;
	drawable2surface[drawable].cfg = cfg;
	return surface;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x6dcc
testq %rax, %rax
je 0x6cc4
movq %r15, %rdi
callq 0x6e34
movq (%rax), %r14
jmp 0x6d98
callq 0x6bef
movq %rax, %r14
testq %rbx, %rbx
je 0x6cdb
movq (%rbx), %rax
movq %rax, 0x18(%rsp)
jmp 0x6ce8
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x6c2c
movq %r12, %rdi
movq %r15, %rsi
callq 0x6e93
movq %rax, %r15
movq %rax, %r13
shrq $0x20, %r13
leaq 0x3c(%rsp), %rsi
movl $0x3057, (%rsi)         # imm = 0x3057
movl %r15d, 0x4(%rsi)
movl $0x3056, 0x8(%rsi)      # imm = 0x3056
movl %r13d, 0xc(%rsi)
movl $0x3038, 0x10(%rsi)     # imm = 0x3038
leaq 0x20(%rsp), %r12
leaq 0xf(%rsp), %rcx
movl $0x5, %edx
movq %r12, %rdi
callq 0x4510
movq 0x18(%rsp), %rsi
movq (%r12), %rdx
movq %r14, %rdi
callq *0x6741(%rip)           # 0xd488
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6eee
movq %r14, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x6eee
movl %r15d, 0x8(%rax)
leaq 0x10(%rsp), %rdi
callq 0x6eee
movl %r13d, 0xc(%rax)
leaq 0x10(%rsp), %rdi
callq 0x6eee
movq %rbx, 0x10(%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6d98
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x42a0
movq %r14, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6dc3
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::get_drawable_dims(_XDisplay*, unsigned long)
std::pair<unsigned, unsigned> get_drawable_dims(Display *dpy, GLXDrawable drawable) {
	Window root;
	int x, y;
	unsigned int width = 0, height = 0, border_width, depth;
	auto st = XGetGeometry(dpy, drawable, &root, &x, &y, &width, &height, &border_width, &depth);
	return std::make_pair(width, height);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
leaq 0x14(%rsp), %rbx
movl %eax, (%rbx)
leaq 0x10(%rsp), %r14
movl %eax, (%r14)
subq $0x8, %rsp
leaq 0x10(%rsp), %rax
leaq 0x14(%rsp), %r10
leaq 0x28(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %rbx, %r9
pushq %rax
pushq %r10
pushq %r14
callq 0x43e0
addq $0x20, %rsp
movl (%rbx), %ecx
movl (%r14), %eax
shlq $0x20, %rax
orq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kulpreet[P]lightning-network-graph-analysis/src/include/support.hpp
// Function: lncentrality::print_edges_with_components(boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, lncentrality::LitVertex, lncentrality::LitEdge, boost::no_property, boost::listS>&)
void print_edges_with_components(LitGraph &g) {
  graph_traits<LitGraph>::vertex_descriptor src, tgt;
  graph_traits<LitGraph>::edge_iterator ei, ei_end;
  for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) {
    src = source(*ei, g);
    tgt = target(*ei, g);
    if (degree(src, g) > 1 && degree(src, g) > 1) {
      std::cout << g[src].name << " -- " << g[tgt].name << " [label=\""
                << g[*ei].component << "\"]\n";
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
cmpq %rdi, %r14
je 0x7998
movq %rdi, %rbx
leaq 0x157e8(%rip), %r12     # 0x1d0d5
leaq 0x157eb(%rip), %r13     # 0x1d0df
movq 0x18(%rbx), %rax
imulq $0xb8, 0x10(%r14), %rcx
movq 0x8(%rax,%rcx), %rdx
subq (%rax,%rcx), %rdx
cmpq $0x11, %rdx
jb 0x798c
movq 0x58(%rax,%rcx), %rsi
movq 0x60(%rax,%rcx), %rdx
imulq $0xb8, 0x18(%r14), %r15
movq 0x23680(%rip), %rdi     # 0x2afa8
callq 0x7350
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x15791(%rip), %rsi     # 0x1d0d0
callq 0x7350
movq 0x18(%rbx), %rax
movq 0x58(%rax,%r15), %rsi
movq 0x60(%rax,%r15), %rdx
movq %rbp, %rdi
callq 0x7350
movq %rax, %rbp
movl $0x9, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x7350
movl 0xf8(%r14), %esi
movq %rbp, %rdi
callq 0x7520
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x7350
movq (%r14), %r14
cmpq %rbx, %r14
jne 0x78f4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kulpreet[P]lightning-network-graph-analysis/src/include/degree_stats.hpp
// Function: lncentrality::get_degrees(std::vector<unsigned long, std::allocator<unsigned long>>&, std::vector<unsigned long, std::allocator<unsigned long>>&, std::vector<unsigned long, std::allocator<unsigned long>>&, boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, lncentrality::LitVertex, lncentrality::LitEdge, boost::no_property, boost::listS>&)
void get_degrees(vector<Degree> &in_degrees, vector<Degree> &out_degrees,
                 vector<Degree> &degrees, LitGraph &g) {
  graph_traits<LitGraph>::vertex_iterator i, end;
  for (boost::tie(i, end) = vertices(g); i != end; ++i) {
    in_degrees.push_back(in_degree(*i, g));
    out_degrees.push_back(out_degree(*i, g));
    degrees.push_back(degree(*i, g));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq 0x20(%rcx), %rax
movq 0x18(%rcx), %rcx
subq %rcx, %rax
je 0x8ee6
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
sarq $0x3, %rax
movabsq $-0x2c8590b21642c859, %rbp # imm = 0xD37A6F4DE9BD37A7
imulq %rax, %rbp
movl $0x8, %r13d
movq 0x18(%rbx), %rax
movq (%rax,%r13), %rcx
subq -0x8(%rax,%r13), %rcx
sarq $0x4, %rcx
movq %rcx, (%rsp)
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x8e5d
movq %rcx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r12)
jmp 0x8e6c
movq %r12, %rdi
movq %rsp, %rdx
callq 0xefd6
movq 0x18(%rbx), %rax
movq (%rax,%r13), %rcx
subq -0x8(%rax,%r13), %rcx
sarq $0x4, %rcx
movq %rcx, (%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x8e94
movq %rcx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r15)
jmp 0x8ea3
movq %r15, %rdi
movq %rsp, %rdx
callq 0xefd6
movq 0x18(%rbx), %rax
movq (%rax,%r13), %rcx
subq -0x8(%rax,%r13), %rcx
sarq $0x4, %rcx
movq %rcx, (%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x8ecb
movq %rcx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r14)
jmp 0x8ed6
movq %r14, %rdi
movq %rsp, %rdx
callq 0xefd6
addq $0xb8, %r13
decq %rbp
jne 0x8e2e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/2TallTim[P]modern-raytracing/hitable_list.cpp
// Function: hitable_list::hit(ray const&, double, double, hit_record&) const
bool hitable_list::hit(const ray& r, double t_min, double t_max, hit_record& rec) const{
    hit_record temp_rec;
    bool hit_anything = false;
    double closest_so_far = t_max;
    for (auto ht : list){
        if (ht->hit(r,t_min,closest_so_far,temp_rec)){
            hit_anything = true;
            closest_so_far = temp_rec.t;
            rec = temp_rec;
        }
    }
    return hit_anything;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %r13
cmpq %r13, %r15
je 0x3932
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x40(%rdx), %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
movq (%r15), %rdi
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x38a0
movq 0xa73a(%rip), %rax      # 0xdfc8
cmpb $0x0, (%rax)
je 0x389a
incl 0x8(%r12)
jmp 0x38a0
lock
incl 0x8(%r12)
movq (%rdi), %rax
movq %r14, %rsi
movsd 0x18(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x20(%rsp), %rdx
callq *(%rax)
testb %al, %al
je 0x3907
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rbx)
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups 0x40(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rbx)
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x376c
movb $0x1, %bpl
testq %r12, %r12
je 0x3914
movq %r12, %rdi
callq 0x37b6
addq $0x10, %r15
cmpq %r13, %r15
jne 0x387b
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3934
callq 0x37b6
jmp 0x3934
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r12, %r12
je 0x3959
movq %r12, %rdi
callq 0x37b6
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3968
callq 0x37b6
movq %rbx, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/2TallTim[P]modern-raytracing/rng.cpp
// Function: rng::random_in_unit_sphere()
vec3 rng::random_in_unit_sphere(){
    vec3 p;
    do {
        p = 2.0 * vec3(gen01(), gen01(), gen01()) - vec3(1, 1, 1);
    } while(p.squared_length() >= 1.0);
    return p;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x3ce0
movapd %xmm0, (%rsp)
callq 0x3ce0
movapd %xmm0, 0x10(%rsp)
callq 0x3ce0
movapd (%rsp), %xmm3
addsd %xmm0, %xmm0
unpcklpd 0x10(%rsp), %xmm3       # xmm3 = xmm3[0],mem[0]
addpd %xmm3, %xmm3
addpd 0x631b(%rip), %xmm3     # 0xa070
addsd 0x630b(%rip), %xmm0     # 0xa068
movapd %xmm3, %xmm1
mulpd %xmm3, %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
movapd %xmm3, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
ucomisd 0x62d7(%rip), %xmm1     # 0xa060
jae 0x3d20
movsd %xmm0, 0x10(%rbx)
movupd %xmm3, (%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/2TallTim[P]modern-raytracing/rng.cpp
// Function: rng::random_in_unit_disk()
vec3 rng::random_in_unit_disk(){
    vec3 p;
    do {
        p = 2.0 * vec3(gen01(),gen01(),0) - vec3(1,1,0);
    } while(p.squared_length() >= 1.0);
    return p;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3ce0
movapd %xmm0, (%rsp)
callq 0x3ce0
movapd (%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
addpd %xmm2, %xmm2
addpd 0x62a6(%rip), %xmm2     # 0xa070
movapd %xmm2, %xmm0
mulpd %xmm2, %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
ucomisd 0x6276(%rip), %xmm1     # 0xa060
jae 0x3da6
movq $0x0, 0x10(%rbx)
movupd %xmm2, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/2TallTim[P]modern-raytracing/bvh.cpp
// Function: bvh_node::hit(ray const&, double, double, hit_record&) const
bool bvh_node::hit(const ray& r, double t_min, double t_max, hit_record& rec) const {
    if(box.hit(r,t_min,t_max)){
        hit_record left_rec, right_rec;
        bool hit_left = left->hit(r,t_min,t_max,left_rec);
        bool hit_right = right->hit(r,t_min,t_max,right_rec);
        if(hit_left && hit_right){
            rec = left_rec.t < right_rec.t ? left_rec : right_rec;
            return true;
        } else if(hit_left) {
            rec = left_rec;
            return true;
        } else if(hit_right) {
            rec = right_rec;
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
addq $0x28, %rdi
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x7790
testb %al, %al
je 0x7346
xorps %xmm0, %xmm0
leaq 0x58(%rsp), %r14
movups %xmm0, 0x38(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %r14, %rdx
callq *(%rax)
movl %eax, %ebp
movq 0x18(%r12), %rdi
movq (%rdi), %rax
leaq 0x10(%rsp), %r12
movq %r15, %rsi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %r12, %rdx
callq *(%rax)
movl %ebp, %ecx
andb %al, %cl
cmpb $0x1, %cl
jne 0x72ce
leaq 0x10(%rsp), %r14
movsd (%r14), %xmm0
leaq 0x58(%rsp), %rax
ucomisd (%rax), %xmm0
cmovaq %rax, %r14
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x38(%r14), %rax
jmp 0x7305
testb %bpl, %bpl
je 0x7358
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rbx)
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups 0x78(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x90(%rsp), %rax
movq %rax, 0x38(%rbx)
addq $0x40, %rbx
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x376c
xorl %ebp, %ebp
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x732d
callq 0x37b6
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x733f
callq 0x37b6
movb $0x1, %al
testb %bpl, %bpl
je 0x7348
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
testb %al, %al
je 0x731e
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rbx)
movups 0x10(%rsp), %xmm0
movups 0x20(%rsp), %xmm1
movups 0x30(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rbx)
movq %r12, %r14
jmp 0x7309
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x73aa
callq 0x37b6
jmp 0x73aa
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x73bc
callq 0x37b6
movq %rbx, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/2TallTim[P]modern-raytracing/./aabb.hpp
// Function: aabb::hit(ray const&, double, double) const
bool hit(const ray& r, double tmin, double tmax) const {
        for (int a = 0; a < 3; a++){
            double invD = 1.0 / r.direction()[a];
            double t0 = (_min[a] - r.origin()[a]) * invD;
            double t1 = (_max[a] - r.origin()[a]) * invD;

            if(invD < 0) std::swap(t0,t1);

            tmin = t0 > tmin ? t0 : tmin;
            tmax = t1 < tmax ? t1 : tmax;

            if (tmax <= tmin) return false;
        }
        return true;
    }

// Assembly:
leaq 0x18(%rsi), %rcx
xorl %edx, %edx
movsd 0x28c2(%rip), %xmm2     # 0xa060
xorpd %xmm3, %xmm3
xorl %eax, %eax
movq 0x10(%rcx), %r8
movq %r8, -0x8(%rsp)
movups (%rcx), %xmm4
movaps %xmm4, -0x18(%rsp)
movapd %xmm2, %xmm4
divsd -0x18(%rsp,%rdx,8), %xmm4
movsd (%rdi,%rdx,8), %xmm5
movq 0x10(%rsi), %r8
movq %r8, -0x8(%rsp)
movups (%rsi), %xmm6
movaps %xmm6, -0x18(%rsp)
subsd -0x18(%rsp,%rdx,8), %xmm5
mulsd %xmm4, %xmm5
movsd 0x18(%rdi,%rdx,8), %xmm7
movq 0x10(%rsi), %r8
movq %r8, -0x8(%rsp)
movups (%rsi), %xmm6
movaps %xmm6, -0x18(%rsp)
subsd -0x18(%rsp,%rdx,8), %xmm7
mulsd %xmm4, %xmm7
ucomisd %xmm4, %xmm3
movapd %xmm7, %xmm6
ja 0x780e
movapd %xmm5, %xmm6
maxsd %xmm0, %xmm6
cmpltsd %xmm3, %xmm4
andpd %xmm4, %xmm5
andnpd %xmm7, %xmm4
orpd %xmm5, %xmm4
minsd %xmm1, %xmm4
ucomisd %xmm4, %xmm6
jae 0x784d
cmpq $0x2, %rdx
leaq 0x1(%rdx), %r8
setae %al
movq %r8, %rdx
movapd %xmm4, %xmm1
movapd %xmm6, %xmm0
cmpq $0x3, %r8
jne 0x77a4
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/0x6D70[P]chip8_emu/src/cpu.cpp
// Function: Cpu::load_rom(char*)
void Cpu::load_rom(char *path) {
    FILE *fp = fopen(path, "rb");
    std::filesystem::path p{path};
    fread(&this->state.ram[0x200], 1, (size_t)std::filesystem::file_size(p), fp);
    fclose(fp);

    this->state.pc = 0x200;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %rsi, (%r15)
leaq 0x1bf9(%rip), %rsi      # 0x4160
movq %rax, %rdi
callq 0x2240
movq %rax, %r14
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x2f78
movq %r12, %rdi
callq 0x2250
leaq 0x200(%rbx), %rdi
movl $0x1, %esi
movq %rax, %rdx
movq %r14, %rcx
callq 0x2280
movq %r14, %rdi
callq 0x2200
movw $0x200, 0x1860(%rbx)    # imm = 0x200
leaq -0x50(%rbp), %rdi
callq 0x3000
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3000
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/0x6D70[P]chip8_emu/src/main.cpp
// Function: main
int main(int argc, char **argv) {

	if (argc < 2) {
		std::cout << "no file specified" << std::endl;
		return EXIT_FAILURE;
	}

	SDL_Init(SDL_INIT_EVERYTHING);
		
	SDL_Window *window = SDL_CreateWindow(
		"CHIP8 interpreter",
		SDL_WINDOWPOS_CENTERED,
		SDL_WINDOWPOS_CENTERED,
		VIDEO_WIDTH * VIDEO_MULTI,
		VIDEO_HEIGHT * VIDEO_MULTI,
		SDL_WINDOW_SHOWN
		//SDL_WINDOW_HIDDEN
	);

	SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, 0);
	
	if (window == NULL) {
		std::cout << "Could not create window: " << SDL_GetError() << std::endl;
		return 1;
	}

	Cpu cpu;
	cpu.load_rom(argv[1]);
	cpu.run(renderer);
	
	SDL_Delay(1000);	
	SDL_DestroyWindow(window);	
	SDL_Quit();

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1870, %rsp           # imm = 0x1870
cmpl $0x1, %edi
jg 0x3547
movq 0x2ad6(%rip), %rbx      # 0x5fd8
leaq 0xcd3(%rip), %rsi       # 0x41dc
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movl $0x1, %eax
jmp 0x35e1
movq %rsi, %r14
movl $0xf231, %edi           # imm = 0xF231
callq 0x21c0
leaq 0xc93(%rip), %rdi       # 0x41ee
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
movl $0x500, %ecx            # imm = 0x500
movl $0x280, %r8d            # imm = 0x280
movl $0x4, %r9d
callq 0x2060
movq %rax, %rbx
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x2050
testq %rbx, %rbx
je 0x35f1
movq %rax, %r15
leaq -0x1888(%rbp), %r12
movq %r12, %rdi
callq 0x24b2
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x2544
leaq -0x1888(%rbp), %rdi
movq %r15, %rsi
callq 0x2686
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2160
movq %rbx, %rdi
callq 0x2030
callq 0x2070
leaq -0x78(%rbp), %rdi
callq 0x3664
xorl %eax, %eax
addq $0x1870, %rsp           # imm = 0x1870
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x29e0(%rip), %rbx      # 0x5fd8
leaq 0xc01(%rip), %rsi       # 0x4200
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2230
callq 0x2170
testq %rax, %rax
je 0x3633
movq %rax, %r14
movq %rax, %rdi
callq 0x20f0
movq 0x29b0(%rip), %rdi      # 0x5fd8
movq %r14, %rsi
movq %rax, %rdx
jmp 0x3511
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x22c0
jmp 0x3516
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x3664
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/apps/demo.cpp
// Function: main
int main() {
        baduk::Board board(19, 19);
        board.place("E4", baduk::Stone::black);
        board.place(baduk::Point(4, 4), baduk::Stone::white);
        board.place(baduk::Point(4, 3), baduk::Stone::black);
        board.place(baduk::Point(4, 5), baduk::Stone::white);
        board.place(baduk::Point(3, 5), baduk::Stone::black);
        board.place(baduk::Point(5, 5), baduk::Stone::black);
        board.place(baduk::Point(5, 4), baduk::Stone::black);
        board.place(baduk::Point(3, 3), baduk::Stone::white);
        board.place(baduk::Point(4, 6), baduk::Stone::black);
        print_board(board);
        return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5b38, %rsp           # imm = 0x5B38
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x13, %esi
movl $0x13, %edx
callq 0xf75a
leaq 0x8c5(%rip), %rsi       # 0x1160b
movq %rsp, %r14
movq %r14, %rdi
callq 0x10e18
movq (%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf82e
movabsq $0x400000004, %r14      # imm = 0x400000004
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xf82e
movabsq $0x300000003, %r15      # imm = 0x300000003
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf82e
movabsq $0x500000003, %r12      # imm = 0x500000003
leaq 0x1(%r12), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0xf82e
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xf82e
addq $0x2, %r12
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xf82e
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xf82e
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xf82e
movabsq $0x600000004, %rsi      # imm = 0x600000004
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf82e
movq %rbx, %rdi
callq 0x10c58
xorl %eax, %eax
addq $0x5b38, %rsp           # imm = 0x5B38
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./bench/benchmark.h
// Function: benchmark_t<unsigned long>::benchmark_t(bool)
benchmark_t(bool enable_pcm){
	    if(enable_pcm){
		pcm = PCM::getInstance();
		auto status = pcm->program();
		if(status != PCM::Success){
		    std::cout << "Error opening PCM: " << status << std::endl;
		    exit(0);
		}
	    }
	    else
		pcm = nullptr;
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq $0x0, (%rdi)
testl %esi, %esi
je 0xb7ba
callq 0x1b5e0
movq %rax, 0x18(%rbx)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1f990
movl %eax, %ebp
testl %eax, %eax
je 0xb7c2
movq 0x3082c(%rip), %rdi     # 0x3bfb8
leaq 0x21e08(%rip), %rsi     # 0x2d59b
movl $0x13, %edx
callq 0x5470
movq 0x30814(%rip), %rdi     # 0x3bfb8
movl %ebp, %esi
callq 0x5710
movq %rax, %rdi
callq 0x51c0
xorl %edi, %edi
callq 0x54d0
movq $0x0, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xb7c9
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xb7da
movq (%rdi), %rax
callq *0x10(%rax)
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0x5740
nop
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./pcm/cpucounters.h
// Function: SystemCounterState::SystemCounterState()
SystemCounterState() :
        uncoreTSC(0)
    {
        PCM * m = PCM::getInstance();
        incomingQPIPackets.resize(m->getNumSockets(),
                                  std::vector<uint64>((uint32)m->getQPILinksPerSocket(), 0));
        outgoingQPIIdleFlits.resize(m->getNumSockets(),
                                    std::vector<uint64>((uint32)m->getQPILinksPerSocket(), 0));
        outgoingQPIDataNonDataFlits.resize(m->getNumSockets(),
                                           std::vector<uint64>((uint32)m->getQPILinksPerSocket(), 0));
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movl $0x80000000, 0xa0(%rdi) # imm = 0x80000000
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movups %xmm0, 0x88(%rdi)
movq $0x0, 0x98(%rdi)
movups %xmm0, 0xa8(%rdi)
movups %xmm0, 0xb8(%rdi)
addq $0xd0, %rdi
movl $0x90, %edx
xorl %esi, %esi
callq 0x5210
leaq 0x2b05a(%rip), %rax     # 0x3ba20
movq %rax, (%r12)
leaq 0x2b06f(%rip), %rax     # 0x3ba40
movq %rax, 0xc8(%r12)
leaq 0x160(%r12), %rbx
leaq 0x178(%r12), %r14
leaq 0x190(%r12), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x160(%r12)
movups %xmm0, 0x170(%r12)
movups %xmm0, 0x180(%r12)
movups %xmm0, 0x190(%r12)
movups %xmm0, 0x1a0(%r12)
callq 0x1b5e0
movq %rax, %r12
movq %rax, %rdi
callq 0x14d10
movl %eax, %ebp
movq %r12, %rdi
callq 0x10bc6
movl %eax, %esi
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x10c36
movl %ebp, %esi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x10b84
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10a7e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5410
movq %r12, %rdi
callq 0x14d10
movl %eax, %ebp
movq %r12, %rdi
callq 0x10bc6
movl %eax, %esi
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x10c36
movl %ebp, %esi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x10b84
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10ad3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5410
movq %r12, %rdi
callq 0x14d10
movl %eax, %ebp
movq %r12, %rdi
callq 0x10bc6
movl %eax, %esi
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x10c36
movl %ebp, %esi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x10b84
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10b28
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5410
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10b41
jmp 0x10b61
jmp 0x10b61
jmp 0x10b41
jmp 0x10b61
jmp 0x10b61
movq %rax, %r12
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10b64
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x5410
jmp 0x10b64
jmp 0x10b61
jmp 0x10b61
movq %rax, %r12
movq %r15, %rdi
callq 0x10d56
movq %r14, %rdi
callq 0x10d56
movq %rbx, %rdi
callq 0x10d56
movq %r12, %rdi
callq 0x5740
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./pcm/cpucounters.h
// Function: PCM::getQPILinksPerSocket() const
uint64 getQPILinksPerSocket() const
    {
        switch (cpu_model)
        {
        case NEHALEM_EP:
        case WESTMERE_EP:
        case CLARKDALE:
            if (num_sockets == 2)
                return 2;
            else
                return 1;
        case NEHALEM_EX:
        case WESTMERE_EX:
            return 4;
        case JAKETOWN:
        case IVYTOWN:
        case HASWELLX:
        case BDX_DE:
        case BDX:
            return (server_pcicfg_uncore.size() && server_pcicfg_uncore[0].get()) ? (server_pcicfg_uncore[0]->getNumQPIPorts()) : 0;
        }
        return 0;
    }

// Assembly:
movl 0x4(%rdi), %eax
leal -0x25(%rax), %ecx
cmpl $0xa, %ecx
jbe 0x10bea
leal -0x3e(%rax), %ecx
cmpl $0x18, %ecx
ja 0x10be3
movl $0x1020003, %edx        # imm = 0x1020003
btl %ecx, %edx
jb 0x10c07
cmpl $0x1a, %eax
je 0x10bfa
jmp 0x10c2c
leaq 0x1c6cb(%rip), %rax     # 0x2d2bc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %eax, %eax
cmpl $0x2, 0x18(%rdi)
sete %al
incq %rax
retq
movq 0xd8(%rdi), %rax
cmpq %rax, 0xe0(%rdi)
je 0x10c2c
movq (%rax), %rcx
testq %rcx, %rcx
je 0x10c2c
movq 0x48(%rcx), %rax
subq 0x40(%rcx), %rax
sarq $0x4, %rax
retq
xorl %eax, %eax
retq
movl $0x4, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Sooryakiran[P]dotV/src/verilog.cpp
// Function: wire_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
wire wire_name(wire full_name){
    /*------------------------------------------------------------------------------------------
    This is a very usefull function to extract the wire name from a wire declaration string.

    Params : full_name (wire), full name including width. Example : "[9:0] my_wire"
    Returns : Parsed string, if input contains infomration about widths. Example : "my_wire"                      
    ------------------------------------------------------------------------------------------*/
    string delim = "] ";
    size_t index;
    if(string::npos != (index = full_name.find(delim, 0))){
        return full_name.substr(index + 2);
    }
    else{
        return full_name;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2e322(%rip), %rsi     # 0x36053
leaq 0x2e31d(%rip), %rdx     # 0x36055
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x7200
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x7830
cmpq $-0x1, %rax
je 0x7d76
addq $0x2, %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x7540
jmp 0x7db3
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x7d95
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x7d9b
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x7dc8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x7510
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x7df0
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x7510
movq %rbx, %rdi
callq 0x7870
// File: /workspace/github_cpp_makefile_star2_O3/Sooryakiran[P]dotV/src/verilog.cpp
// Function: Chip::generate_verilog[abi:cxx11]()
string Chip::generate_verilog(){
    /*------------------------------------------------------------------------------------------
    This function generates a formated output string verilog code.       

    Params : None
    Returns : code (string), output verilog code                          
    ------------------------------------------------------------------------------------------*/
    string code = "// Generated code\n// Sooryakiran P\n// ME17B174\n";
    set<string> headers = this->define_headers();
    for (set<string>::iterator i = headers.begin(); i != headers.end(); i++){
        code += "\n" + *i + "\n";
    }
    return code;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x2e1ff(%rip), %rsi     # 0x36020
leaq 0x2e227(%rip), %rdx     # 0x3604f
callq 0x7200
leaq -0xa0(%rbp), %rdi
movq %r14, %rsi
callq 0x7660
leaq -0x98(%rbp), %rax
movq 0x10(%rax), %r14
cmpq %rax, %r14
je 0x7f11
leaq -0x40(%rbp), %r13
leaq 0x2e2ad(%rip), %r15     # 0x36108
leaq -0x70(%rbp), %r12
leaq 0x20(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x7480
movq %r12, %rdi
movq %r15, %rsi
callq 0x7910
movq %r13, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7e99
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x7ea1
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x7140
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x7edd
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x7ef6
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x75d0
movq %rax, %r14
leaq -0x98(%rbp), %rax
cmpq %rax, %r14
jne 0x7e5f
leaq -0xa0(%rbp), %rdi
callq 0x7770
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x7f7b
movq %rax, %r14
jmp 0x7f6f
movq %rax, %r14
jmp 0x7f56
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f56
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x7f6f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
leaq -0xa0(%rbp), %rdi
callq 0x7770
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x7f93
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x7870
nop
// File: /workspace/github_cpp_makefile_star2_O3/Sooryakiran[P]dotV/src/verilog.cpp
// Function: Chip::define_headers[abi:cxx11]()
set<string> Chip::define_headers(){
    /*------------------------------------------------------------------------------------------
    This function recursively iterates through all the submodules if any to generate a set of
    module definitions.         

    Params : None
    Returns : all_headers (set<string>), a set of all module and submodule definitions.                          
    ------------------------------------------------------------------------------------------*/
    set<string> all_headers;
    all_headers.insert(this->definition);

    for(vector<Chip>::iterator sub = this->submodules.begin();
                               sub != this->submodules.end();
                               sub++){
        set<string> sub_header = sub->define_headers();
        all_headers.insert(sub_header.begin(), sub_header.end());
    }

    return all_headers;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
addq $0x20, %rsi
callq 0x7790
movq 0x68(%r14), %r15
cmpq 0x70(%r14), %r15
je 0x801a
leaq -0x50(%rbp), %r12
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x7660
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x77f0
movq %r13, %rdi
callq 0x7770
addq $0x198, %r15            # imm = 0x198
cmpq 0x70(%r14), %r15
jne 0x7feb
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x802e
movq %rax, %r14
jmp 0x803f
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x7770
movq %rbx, %rdi
callq 0x7770
movq %r14, %rdi
callq 0x7870
nop