LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::print_equs(int)
void zrdz_disassembler::print_equs(int section) {

	std::vector<symbol> tmp;

	std::copy_if(_symbols.begin(), _symbols.end(), std::back_inserter(tmp),
		[=](const symbol &s) { return s.section == section && s.type == equ_type; }
	);

	if (tmp.empty()) return;
	std::sort(tmp.begin(), tmp.end());

	for (const auto &s : tmp) emit(s.name, "gequ", to_x(s.offset, 4, '$'));
	putchar('\n');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x7d00
movq -0xf8(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0xf0(%rbp)
callq 0xa6a0
movq -0xf0(%rbp), %rdi
movq %rax, -0x30(%rbp)
callq 0xa490
movq -0xe8(%rbp), %rdi
movq %rax, -0x38(%rbp)
callq 0x160c0
movq %rax, -0xe0(%rbp)
jmp 0x131dd
movq -0xe0(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl -0x50(%rbp), %ecx
callq 0x13c70
movq %rax, -0x100(%rbp)
jmp 0x1320b
movq -0x100(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x15dd0
testb $0x1, %al
jne 0x13225
jmp 0x13242
movl $0x1, -0x5c(%rbp)
jmp 0x133d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x133e3
leaq -0x28(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0xa6a0
movq -0x108(%rbp), %rdi
movq %rax, -0x68(%rbp)
callq 0xa490
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x16080
jmp 0x13275
leaq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0xa6a0
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0xa490
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x15c30
testb $0x1, %al
jne 0x132b3
jmp 0x133be
leaq -0x80(%rbp), %rdi
callq 0xab10
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x3460
movq -0x110(%rbp), %rdx
leaq 0x8a47(%rip), %rsi      # 0x1bd39
leaq -0xb0(%rbp), %rdi
callq 0x8060
jmp 0x13300
movq -0x90(%rbp), %rax
movl 0x24(%rax), %esi
leaq -0xd8(%rbp), %rdi
movl $0x4, %edx
movl $0x24, %ecx
callq 0xcb90
jmp 0x13322
movq -0x118(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0xce40
jmp 0x1333e
leaq -0xd8(%rbp), %rdi
callq 0x3160
leaq -0xb0(%rbp), %rdi
callq 0x3160
leaq -0xb1(%rbp), %rdi
callq 0x32b0
leaq -0x80(%rbp), %rdi
callq 0x15cf0
jmp 0x1329a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x133b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x133a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x3160
leaq -0xb0(%rbp), %rdi
callq 0x3160
leaq -0xb1(%rbp), %rdi
callq 0x32b0
jmp 0x133e3
movl $0xa, %edi
callq 0x3390
jmp 0x133ca
movl $0x0, -0x5c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7e00
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x7e00
movq -0x48(%rbp), %rdi
callq 0x3440
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x68(%rax)
jge 0x13d29
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13dff
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x50, %rdi
movslq 0x68(%rax), %rsi
callq 0x15bb0
addq $0x30, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x13dd8
jmp 0x13d51
movq -0x20(%rbp), %rdi
callq 0x15dd0
xorb $-0x1, %al
testb $0x1, %al
jne 0x13d62
jmp 0x13dd6
movq -0x20(%rbp), %rdi
callq 0xa4c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x14(%rbp), %eax
jbe 0x13d87
movq -0x28(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x13dff
movq -0x28(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x13d9e
movq -0x28(%rbp), %rdi
callq 0xcd30
jmp 0x13dc6
movq -0x28(%rbp), %rdi
callq 0x30f0
movq %rax, %rsi
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x24(%rcx), %edx
movl 0x68(%rax), %ecx
leaq 0x7ff8(%rip), %rdi      # 0x1bdb7
movb $0x0, %al
callq 0x32a0
jmp 0x13dc8
movq -0x20(%rbp), %rdi
callq 0x15e90
jmp 0x13d51
jmp 0x13dd8
movq -0x20(%rbp), %rdi
callq 0x15dd0
testb $0x1, %al
jne 0x13de7
jmp 0x13df0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13dff
movq -0x20(%rbp), %rdi
callq 0xa4c0
movl 0x24(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x30(%rbp)
addq $0x38, %rdi
callq 0xa7a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jb 0x14278
movl -0x14(%rbp), %esi
leaq 0x7bc6(%rip), %rdi      # 0x1bdf2
xorl %eax, %eax
callq 0x32a0
leaq -0x15(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x3460
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
leaq 0x7b09(%rip), %rsi      # 0x1bd58
callq 0x8060
jmp 0x14256
leaq -0x15(%rbp), %rdi
callq 0x32b0
jmp 0x14296
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x15(%rbp), %rdi
callq 0x32b0
jmp 0x142a0
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x16270
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3100
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3440
nopl (%rax)
// File: ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::section_name[abi:cxx11](unsigned int) const
std::string zrdz_disassembler::section_name(unsigned section) const {

	std::string defname = std::string("section") + std::to_string(section);

	if (section >= _sections.size()) {
		warnx("Invalid section %d", section);
		return defname;
	}
	auto &e = _sections[section];
	if (!e.valid) {
		warnx("Invalid section %d", section);
		return defname;
	}

	return e.name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x3460
movq -0xa8(%rbp), %rdx
leaq 0x7a9c(%rip), %rsi      # 0x1bd9c
leaq -0x58(%rbp), %rdi
callq 0x8060
jmp 0x1430b
movl -0x14(%rbp), %esi
leaq -0x90(%rbp), %rdi
callq 0x8980
jmp 0x1431c
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x8340
jmp 0x14332
leaq -0x90(%rbp), %rdi
callq 0x3160
leaq -0x58(%rbp), %rdi
callq 0x3160
leaq -0x59(%rbp), %rdi
callq 0x32b0
movq -0xb0(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0xc8(%rbp)
addq $0x50, %rdi
callq 0x15af0
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jb 0x14414
movl -0x14(%rbp), %esi
leaq 0x7a1d(%rip), %rdi      # 0x1bda4
xorl %eax, %eax
callq 0x32a0
jmp 0x14390
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3150
movl $0x1, -0x94(%rbp)
jmp 0x1448b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x143ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x143e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3160
leaq -0x58(%rbp), %rdi
callq 0x3160
leaq -0x59(%rbp), %rdi
callq 0x32b0
jmp 0x144a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3160
jmp 0x144a4
movq -0xb0(%rbp), %rdi
addq $0x50, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x16190
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
testb $0x1, 0x2d(%rax)
jne 0x1446c
movl -0x14(%rbp), %esi
leaq 0x795d(%rip), %rdi      # 0x1bda4
xorl %eax, %eax
callq 0x32a0
jmp 0x14450
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3150
movl $0x1, -0x94(%rbp)
jmp 0x1448b
movq -0xc0(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x3100
jmp 0x14481
movl $0x1, -0x94(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3160
movq -0xb8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3440
nopl (%rax)
// File: gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::glx_make_current(_XDisplay*, unsigned long, __GLXcontextRec*)
Bool glx_make_current(Display *dpy, GLXDrawable drawable, GLXContext ctx) {
	SP_TRACE("");
	EGLDisplay dp = disp();
	curr_surface = drawable ? lookup_drawable(dpy, drawable) : EGL_NO_SURFACE;
	curr_context = ctx ? get_context(ctx).egl_ctx : EGL_NO_CONTEXT;
	SP_CHECK(fn_eglMakeCurrent(dp, curr_surface, curr_surface, curr_context));
	curr_drawable = drawable;
	if (curr_context != EGL_NO_CONTEXT)
		last_valid_context = curr_context;
	return True;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
testb $0x1, 0x13216(%rip)     # 0x2b110
je 0x17f4b
movq 0x120d5(%rip), %rax     # 0x29fd8
movq (%rax), %rdi
leaq 0xb453(%rip), %rsi      # 0x23360
leaq 0xb6c2(%rip), %rdx      # 0x235d6
movb $0x0, %al
callq 0x16680
movq 0x120b6(%rip), %rax     # 0x29fd8
movq (%rax), %rdi
leaq 0xb428(%rip), %rsi      # 0x23354
movb $0x0, %al
callq 0x16680
movq 0x1209e(%rip), %rax     # 0x29fd8
movq (%rax), %rdi
leaq 0xb40f(%rip), %rsi      # 0x23353
movb $0x0, %al
callq 0x16680
jmp 0x17f4d
callq 0x1a260
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x17f79
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1a4e0
movq %rax, 0x18(%rsp)
jmp 0x17f82
xorl %eax, %eax
movq %rax, 0x18(%rsp)
jmp 0x17f82
movq 0x18(%rsp), %rax
movq %rax, 0x132ba(%rip)     # 0x2b248
cmpq $0x0, 0x30(%rsp)
je 0x17faa
movq 0x30(%rsp), %rdi
callq 0x1a470
movq (%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x17fb3
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x17fb3
movq 0x10(%rsp), %rax
movq %rax, 0x13291(%rip)     # 0x2b250
movq 0x13242(%rip), %rax     # 0x2b208
movq 0x28(%rsp), %rdi
movq 0x13276(%rip), %rsi     # 0x2b248
movq 0x1326f(%rip), %rdx     # 0x2b248
movq 0x13270(%rip), %rcx     # 0x2b250
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x1, 0x24(%rsp)
je 0x1802e
movq 0x11fe4(%rip), %rax     # 0x29fd8
movq (%rax), %rax
movq %rax, (%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq *0x131ef(%rip)          # 0x2b1f8
movq (%rsp), %rdi
movl 0xc(%rsp), %ecx
movl %eax, %r8d
leaq 0xb476(%rip), %rsi      # 0x23491
leaq 0xb5c5(%rip), %rdx      # 0x235e7
movb $0x0, %al
callq 0x16680
callq 0x153b0
jmp 0x18030
movq 0x38(%rsp), %rax
movq %rax, 0x1321c(%rip)     # 0x2b258
cmpq $0x0, 0x1320c(%rip)     # 0x2b250
je 0x18054
movq 0x13203(%rip), %rax     # 0x2b250
movq %rax, 0x1320c(%rip)     # 0x2b260
movl $0x1, %eax
addq $0x48, %rsp
retq
nop
// File: gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::glx_query_server_string(_XDisplay*, int, int)
const char *glx_query_server_string(Display *dpy, int screen, int name) {
	switch (name) {
		case GLX_VENDOR: return glx_vendor;
		case GLX_VERSION: return glx_version;
		case GLX_EXTENSIONS: return glx_extensions;
		default: return nullptr;;
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl %edx, -0x18(%rsp)
movl -0x18(%rsp), %eax
movl %eax, -0x1c(%rsp)
subl $0x1, %eax
je 0x187d2
jmp 0x187bc
movl -0x1c(%rsp), %eax
subl $0x2, %eax
je 0x187e0
jmp 0x187c7
movl -0x1c(%rsp), %eax
subl $0x3, %eax
je 0x187ee
jmp 0x187fc
movq 0x12847(%rip), %rax     # 0x2b020
movq %rax, -0x8(%rsp)
jmp 0x18805
movq 0x12841(%rip), %rax     # 0x2b028
movq %rax, -0x8(%rsp)
jmp 0x18805
movq 0x1283b(%rip), %rax     # 0x2b030
movq %rax, -0x8(%rsp)
jmp 0x18805
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax,%rax)
// File: gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::glx_get_client_string(_XDisplay*, int)
const char *glx_get_client_string(Display *dpy, int name) {
	switch (name) {
		case GLX_VENDOR: return glx_vendor;
		case GLX_VERSION: return glx_version;
		case GLX_EXTENSIONS: return glx_extensions;
		default: return nullptr;
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl -0x14(%rsp), %eax
movl %eax, -0x18(%rsp)
subl $0x1, %eax
je 0x1883e
jmp 0x18828
movl -0x18(%rsp), %eax
subl $0x2, %eax
je 0x1884c
jmp 0x18833
movl -0x18(%rsp), %eax
subl $0x3, %eax
je 0x1885a
jmp 0x18868
movq 0x127db(%rip), %rax     # 0x2b020
movq %rax, -0x8(%rsp)
jmp 0x18871
movq 0x127d5(%rip), %rax     # 0x2b028
movq %rax, -0x8(%rsp)
jmp 0x18871
movq 0x127cf(%rip), %rax     # 0x2b030
movq %rax, -0x8(%rsp)
jmp 0x18871
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
// File: 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:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x16be0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x16af0
jmp 0x19971
leaq 0x67(%rsp), %rdi
callq 0x16080
leaq 0x1174e(%rip), %rdi     # 0x2b0d0
leaq 0x68(%rsp), %rsi
callq 0x16bb0
movq %rax, 0x20(%rsp)
jmp 0x19993
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x1172c(%rip), %rdi     # 0x2b0d0
callq 0x15440
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x16980
testb $0x1, %al
jne 0x199c3
jmp 0x19a20
leaq 0x48(%rsp), %rdi
callq 0x15840
movq 0x20(%rax), %rax
movq %rax, 0x90(%rsp)
movl $0x1, 0x3c(%rsp)
jmp 0x19ab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x67(%rsp), %rdi
callq 0x16080
jmp 0x19ace
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x158f0
jmp 0x19ace
leaq 0xa011(%rip), %rsi      # 0x23a38
leaq 0x68(%rsp), %rdi
callq 0x17010
movb %al, 0x1f(%rsp)
jmp 0x19a37
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x19a62
jmp 0x19a41
leaq 0xa004(%rip), %rsi      # 0x23a4c
leaq 0x68(%rsp), %rdi
callq 0x17010
movb %al, 0x1e(%rsp)
jmp 0x19a58
movb 0x1e(%rsp), %al
testb $0x1, %al
jne 0x19a62
jmp 0x19a78
movq $0x0, 0x90(%rsp)
movl $0x1, 0x3c(%rsp)
jmp 0x19ab4
movq 0x11711(%rip), %rax     # 0x2b190
movq %rax, 0x8(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x155e0
movq %rax, %rdi
movq 0x8(%rsp), %rax
callq *%rax
movq %rax, 0x10(%rsp)
jmp 0x19a9f
movq 0x10(%rsp), %rax
movq %rax, 0x90(%rsp)
movl $0x1, 0x3c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x158f0
movq 0x90(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x16bc0
nopl (%rax,%rax)
// File: gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::get_visual(_XDisplay*, int)
static XVisualInfo* get_visual(Display *dpy, int screen)
{
    XVisualInfo *ret = new XVisualInfo;
    if (XMatchVisualInfo(dpy, screen,
                         DefaultDepth(dpy, screen),
                         TrueColor,
                         ret) == 0) {
        return nullptr;
    }
    return ret;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl $0x40, %edi
callq 0x15f60
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x18(%rsp), %rax
movq 0xe8(%rax), %rax
movslq 0x14(%rsp), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x38(%rax), %edx
movq 0x8(%rsp), %r8
movl $0x4, %ecx
callq 0x163d0
cmpl $0x0, %eax
jne 0x1a0bf
movq $0x0, 0x20(%rsp)
jmp 0x1a0c9
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
callq 0x1a260
movq %rax, 0x70(%rsp)
movl $0x30a2, %edi           # imm = 0x30A2
callq *0x1110f(%rip)          # 0x2b218
movl %eax, 0x6c(%rsp)
cmpl $0x1, 0x6c(%rsp)
je 0x1a157
movq 0xfebd(%rip), %rax      # 0x29fd8
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x38(%rsp)
callq *0x110c7(%rip)          # 0x2b1f8
movq 0x30(%rsp), %rdi
movl 0x38(%rsp), %ecx
movl %eax, %r8d
leaq 0x934d(%rip), %rsi      # 0x23491
leaq 0x936b(%rip), %rdx      # 0x234b6
movb $0x0, %al
callq 0x16680
callq 0x153b0
jmp 0x1a159
cmpq $0x0, 0x80(%rsp)
jne 0x1a175
movq 0x70(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x1a390
jmp 0x1a185
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movl 0x8e79(%rip), %eax      # 0x23004
movl %eax, 0x5c(%rsp)
movq $0x0, 0x50(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x1a1b2
movq 0x78(%rsp), %rdi
callq 0x1a470
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x11037(%rip), %rax     # 0x2b1f0
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x5c(%rsp), %rdi
callq 0x16350
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
movq 0x20(%rsp), %rax
callq *%rax
movq %rax, 0x48(%rsp)
movl $0x8, %edi
callq 0x15f60
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rsi
callq 0x1a480
jmp 0x1a225
movq 0x28(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
movl $0x8, %esi
callq 0x15fd0
movq 0x40(%rsp), %rdi
callq 0x16bc0
nopl (%rax)
// File: 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:
subq $0x48, %rsp
movq 0x10f0d(%rip), %rax     # 0x2b178
xorl %ecx, %ecx
movl %ecx, %edx
movl $0x313f, %edi           # imm = 0x313F
movq %rdx, %rsi
callq *%rax
movq %rax, 0x30(%rsp)
leaq 0x10fbb(%rip), %rax     # 0x2b240
movq %rax, 0x40(%rsp)
movl $0x5, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x3c(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x20(%rsp)
subl $0x4, %eax
ja 0x1a2c3
movq 0x20(%rsp), %rax
leaq 0x8d56(%rip), %rcx      # 0x23010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, 0x17(%rsp)
jmp 0x1a30c
movq 0x18(%rsp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, 0x17(%rsp)
jmp 0x1a30c
movq 0x18(%rsp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, 0x17(%rsp)
jmp 0x1a30c
movq 0x18(%rsp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, 0x17(%rsp)
jmp 0x1a30c
movq 0x18(%rsp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
cmpb $0x0, %al
jne 0x1a37d
jmp 0x1a316
movq 0x10eb3(%rip), %rax     # 0x2b1d0
movq 0x30(%rsp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, 0x2c(%rsp)
cmpl $0x1, 0x2c(%rsp)
je 0x1a379
movq 0xfc9b(%rip), %rax      # 0x29fd8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x10(%rsp)
callq *0x10ea5(%rip)          # 0x2b1f8
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %ecx
movl %eax, %r8d
leaq 0x912b(%rip), %rsi      # 0x23491
leaq 0x9167(%rip), %rdx      # 0x234d4
movb $0x0, %al
callq 0x16680
callq 0x153b0
jmp 0x1a37b
jmp 0x1a37d
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: 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 $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x8cc6(%rip), %rsi      # 0x23070
movl $0x34, %edx
callq 0x15c20
movq 0x10e25(%rip), %rax     # 0x2b1e0
movq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq 0x58(%rsp), %rdx
movl $0x1, %ecx
leaq 0x1c(%rsp), %r8
callq *%rax
movl %eax, 0x18(%rsp)
cmpl $0x1, 0x18(%rsp)
je 0x1a424
movq 0xfbf0(%rip), %rax      # 0x29fd8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x14(%rsp)
callq *0x10dfa(%rip)          # 0x2b1f8
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %ecx
movl %eax, %r8d
leaq 0x9080(%rip), %rsi      # 0x23491
leaq 0x90e2(%rip), %rdx      # 0x234fa
movb $0x0, %al
callq 0x16680
callq 0x153b0
jmp 0x1a426
jmp 0x1a428
cmpl $0x0, 0x1c(%rsp)
jg 0x1a45f
movq 0xfba2(%rip), %rax      # 0x29fd8
movq (%rax), %rdi
leaq 0x90f6(%rip), %rsi      # 0x23536
leaq 0x9114(%rip), %rdx      # 0x2355b
movl $0x69, %ecx
leaq 0x9115(%rip), %r8       # 0x23568
movb $0x0, %al
callq 0x16680
callq 0x153b0
jmp 0x1a461
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::get_new_id(_XDisplay*)
XID get_new_id(Display *dpy) {
    XID id;
    XLockDisplay(dpy);
    id = XAllocID(dpy);
    XUnlockDisplay(dpy);
    return id;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x15800
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x156c0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x34(%rsp), %rcx
leaq 0x30(%rsp), %r8
leaq 0x2c(%rsp), %r9
leaq 0x28(%rsp), %r11
leaq 0x24(%rsp), %r10
leaq 0x20(%rsp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x16710
movl %eax, 0x1c(%rsp)
leaq 0x2c(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x15260
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
// File: gatecat[P]subprime/subprime.cpp
// Function: (anonymous namespace)::convert_attribute_list(int const*)
std::vector<int> convert_attribute_list(const int *attrs) {
	std::vector<int> result{EGL_SURFACE_TYPE, EGL_PBUFFER_BIT};
	int ptr = 0;
	while (true) {
		int attr = attrs[ptr++];
		if (attr == None)
			break;
		int value = attrs[ptr++];
		auto fnd = egl_attr_map.find(attr);
		SP_TRACE("    %d = %d", attr, value);
		if (fnd != egl_attr_map.end()) {
			result.push_back(fnd->second);
			result.push_back(value);
		}
	}
	result.push_back(EGL_NONE);
	return result;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movb $0x0, 0x77(%rsp)
movl $0x3033, 0x58(%rsp)     # imm = 0x3033
movl $0x1, 0x5c(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, 0x60(%rsp)
movq $0x2, 0x68(%rsp)
leaq 0x57(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x15730
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x16ca0
jmp 0x1bc63
leaq 0x57(%rsp), %rdi
callq 0x151c0
movl $0x0, 0x40(%rsp)
jmp 0x1bc77
movq 0x78(%rsp), %rax
movl 0x40(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x40(%rsp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x3c(%rsp)
movslq 0x3c(%rsp), %rax
cmpq $0x0, %rax
jne 0x1bcc0
jmp 0x1bdd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x57(%rsp), %rdi
callq 0x151c0
jmp 0x1be13
movq 0x78(%rsp), %rax
movslq 0x40(%rsp), %rcx
movl %ecx, %edx
incl %edx
movl %edx, 0x40(%rsp)
movl (%rax,%rcx,4), %eax
movl %eax, 0x38(%rsp)
leaq 0xf368(%rip), %rdi      # 0x2b048
leaq 0x3c(%rsp), %rsi
callq 0x16640
movq %rax, (%rsp)
jmp 0x1bcf0
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
testb $0x1, 0xf410(%rip)      # 0x2b110
je 0x1bd78
movq 0xe2cf(%rip), %rax      # 0x29fd8
movq (%rax), %rdi
leaq 0x764d(%rip), %rsi      # 0x23360
leaq 0x7b63(%rip), %rdx      # 0x2387d
movb $0x0, %al
callq 0x16680
movq 0xe2b0(%rip), %rax      # 0x29fd8
movq (%rax), %rdi
movl 0x3c(%rsp), %edx
movl 0x38(%rsp), %ecx
leaq 0x7b5a(%rip), %rsi      # 0x23894
movb $0x0, %al
callq 0x16680
movq 0xe290(%rip), %rax      # 0x29fd8
movq (%rax), %rdi
leaq 0x7601(%rip), %rsi      # 0x23353
movb $0x0, %al
callq 0x16680
jmp 0x1bd78
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x15bb0
jmp 0x1be13
jmp 0x1bd7a
jmp 0x1bd7c
leaq 0xf2c5(%rip), %rdi      # 0x2b048
callq 0x16cf0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x169d0
testb $0x1, %al
jne 0x1bda2
jmp 0x1bdd2
leaq 0x30(%rsp), %rdi
callq 0x15fc0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
addq $0x4, %rsi
callq 0x15220
jmp 0x1bdbf
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x15220
jmp 0x1bdd0
jmp 0x1bdd2
jmp 0x1bc75
movq 0x10(%rsp), %rdi
movl $0x3038, 0x24(%rsp)     # imm = 0x3038
leaq 0x24(%rsp), %rsi
callq 0x15430
jmp 0x1bdf0
movb $0x1, 0x77(%rsp)
testb $0x1, 0x77(%rsp)
jne 0x1be06
movq 0x10(%rsp), %rdi
callq 0x15bb0
movq 0x8(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x16bc0
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xe3f0
leaq -0x28(%rbp), %rdi
callq 0xe3f0
movq -0x8(%rbp), %rdi
callq 0xe410
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0xe490
leaq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xe4d0
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xe500
testb $0x1, %al
jne 0xac16
jmp 0xad64
leaq -0x60(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xe560
movq -0x8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0xe540
movq %rax, -0x10(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xe560
movq -0x8(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0xe5a0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xe5c0
cmpq $0x1, %rax
jbe 0xad54
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xe5c0
cmpq $0x1, %rax
jbe 0xad54
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe5f0
movq %rax, %rsi
addq $0x40, %rsi
movq 0x6a315(%rip), %rdi     # 0x74fb0
callq 0xa3e0
movq %rax, %rdi
leaq 0x403bb(%rip), %rsi     # 0x4b065
callq 0xa410
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe5f0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
addq $0x40, %rsi
callq 0xa3e0
movq %rax, %rdi
leaq 0x4038a(%rip), %rsi     # 0x4b06a
callq 0xa410
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xe560
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xe640
movq -0x98(%rbp), %rdi
movl 0xd8(%rax), %esi
callq 0xa7a0
movq %rax, %rdi
leaq 0x40325(%rip), %rsi     # 0x4b074
callq 0xa410
jmp 0xad56
leaq -0x20(%rbp), %rdi
callq 0xe6b0
jmp 0xac00
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xe7d0
leaq -0x30(%rbp), %rdi
callq 0xe7d0
movq -0x20(%rbp), %rdi
callq 0xeb90
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xec10
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xec50
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xec80
testb $0x1, %al
jne 0xc7b2
jmp 0xc84a
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xecc0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xfda0
movq -0x80(%rbp), %rdi
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rsi
callq 0xfd70
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xecc0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xfdd0
movq -0x78(%rbp), %rdi
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0xfd70
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xecc0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xe5c0
movq -0x70(%rbp), %rdi
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rsi
callq 0xfd70
leaq -0x28(%rbp), %rdi
callq 0xedb0
jmp 0xc79c
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sudocode1[P]radio/compiler.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
std::vector<std::string> split(std::string str, char delimiter) {
  std::vector<std::string> result;
  std::stringstream ss(str); // Turn the string into a stream.
  std::string tok;
  
  while(std::getline(ss,tok,delimiter)) {
    result.push_back(tok);
  }
  
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rsi, -0x1f0(%rbp)
movq %rdi, -0x1e8(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x1e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
callq 0x45c0
movl $0x10, %edi
movl $0x8, %esi
callq 0x45e0
movl %eax, -0x1d4(%rbp)
jmp 0x24f0
movl -0x1d4(%rbp), %edx
movq -0x1f0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x22c0
jmp 0x250b
leaq -0x1d0(%rbp), %rdi
callq 0x2270
movsbl -0x11(%rbp), %edx
leaq -0x1a0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x2340
movq %rax, -0x1f8(%rbp)
jmp 0x2537
movq -0x1f8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2250
movb %al, -0x1f9(%rbp)
jmp 0x2555
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x2561
jmp 0x25b8
movq -0x1e8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x4600
jmp 0x2576
jmp 0x2517
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
jmp 0x25f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x2100
leaq -0x1a0(%rbp), %rdi
callq 0x2140
jmp 0x25f6
movb $0x1, -0x12(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x2100
leaq -0x1a0(%rbp), %rdi
callq 0x2140
testb $0x1, -0x12(%rbp)
jne 0x25e6
movq -0x1e8(%rbp), %rdi
callq 0x4670
movq -0x1e0(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x1e8(%rbp), %rdi
callq 0x4670
movq -0x1a8(%rbp), %rdi
callq 0x2310
nop
// File: sudocode1[P]radio/compiler.cpp
// Function: readIncl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
void readIncl(std::string fileName, std::vector<std::string> *lines) {
    std::string curLine;
    std::ifstream inclFile(fileName);
    while (std::getline(inclFile, curLine)) {
        (*lines).push_back(curLine);
    }
    inclFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x250(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2270
movq -0x250(%rbp), %rsi
leaq -0x238(%rbp), %rdi
movl $0x8, %edx
callq 0x22d0
jmp 0x264d
jmp 0x264f
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2040
movq %rax, -0x258(%rbp)
jmp 0x2668
movq -0x258(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2250
movb %al, -0x259(%rbp)
jmp 0x2686
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x2692
jmp 0x26d7
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4600
jmp 0x26a1
jmp 0x264f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x2703
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x2060
jmp 0x2703
leaq -0x238(%rbp), %rdi
callq 0x2050
jmp 0x26e5
leaq -0x238(%rbp), %rdi
callq 0x2060
leaq -0x30(%rbp), %rdi
callq 0x2100
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x2100
movq -0x240(%rbp), %rdi
callq 0x2310
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4600
movq -0xc0(%rbp), %rax
movb $0x0, -0x71(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
addq $0x8, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x4640
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x4670
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x46a0
testb $0x1, %al
jne 0x4377
jmp 0x4439
leaq -0x90(%rbp), %rdi
callq 0x46e0
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x4700
movq -0xd0(%rbp), %rdi
callq 0x4730
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movsd -0x18(%rbp), %xmm0
movsd -0x80(%rbp), %xmm1
movq (%rdi), %rax
movq (%rax), %rax
leaq -0x70(%rbp), %rdx
callq *%rax
movb %al, -0xc1(%rbp)
jmp 0x43ca
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x43d6
jmp 0x441c
movb $0x1, -0x71(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4750
jmp 0x441c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x47a0
leaq -0x70(%rbp), %rdi
callq 0x47e0
jmp 0x445c
leaq -0xa8(%rbp), %rdi
callq 0x47a0
leaq -0x90(%rbp), %rdi
callq 0x47c0
jmp 0x435b
movb -0x71(%rbp), %al
movb %al, -0xd1(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x47e0
movb -0xd1(%rbp), %al
andb $0x1, %al
addq $0xe0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x3390
nopl (%rax,%rax)
// File: 2TallTim[P]modern-raytracing/hitable_list.cpp
// Function: hitable_list::bounding_box(aabb&)
bool hitable_list::bounding_box(aabb& box){
    if(list.size() < 1) return false;
    aabb temp_box;
    bool first_true = list.front()->bounding_box(temp_box);
    if(!first_true)
        return false;
    else
        box = temp_box;
    
    for(auto iter = ++(list.begin()); iter != list.end(); iter++){
        if((*iter)->bounding_box(temp_box))
            box = aabb::surrounding_box(box,temp_box);
        else
            return false;
    } 

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
addq $0x8, %rdi
callq 0x4870
cmpq $0x1, %rax
jae 0x44d6
movb $0x0, -0x1(%rbp)
jmp 0x45e5
leaq -0x48(%rbp), %rdi
callq 0x4890
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x48c0
movq %rax, %rdi
callq 0x4730
movq %rax, %rdi
movq (%rdi), %rax
leaq -0x48(%rbp), %rsi
callq *0x8(%rax)
andb $0x1, %al
movb %al, -0x49(%rbp)
testb $0x1, -0x49(%rbp)
jne 0x4518
movb $0x0, -0x1(%rbp)
jmp 0x45e5
movq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x30, %edx
callq 0x31a0
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x48f0
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4920
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x4980
movq %rax, -0x68(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4940
testb $0x1, %al
jne 0x4575
jmp 0x45e3
leaq -0x58(%rbp), %rdi
callq 0x49b0
movq %rax, %rdi
callq 0x4730
movq %rax, %rdi
movq (%rdi), %rax
leaq -0x48(%rbp), %rsi
callq *0x8(%rax)
testb $0x1, %al
jne 0x4599
jmp 0x45c4
movq -0x18(%rbp), %rsi
leaq -0x98(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x49d0
movq -0x18(%rbp), %rdi
leaq -0x98(%rbp), %rsi
movl $0x30, %edx
callq 0x31a0
jmp 0x45ca
movb $0x0, -0x1(%rbp)
jmp 0x45e5
jmp 0x45cc
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x4ce0
movq %rax, -0xa0(%rbp)
jmp 0x454e
ud2
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
callq 0x4d20
callq 0x5970
movsd %xmm0, -0x78(%rbp)
callq 0x5970
movsd %xmm0, -0x80(%rbp)
callq 0x5970
movsd -0x80(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x78(%rbp), %xmm0
leaq -0x48(%rbp), %rdi
callq 0x3e10
leaq -0x30(%rbp), %rdi
movsd 0x11662(%rip), %xmm0    # 0x17068
leaq -0x48(%rbp), %rsi
callq 0x3fb0
leaq -0x60(%rbp), %rdi
movsd 0x11645(%rip), %xmm2    # 0x17060
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x3e10
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x3ba0
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rdi
callq 0x5c00
movsd 0x115fd(%rip), %xmm1    # 0x17060
ucomisd %xmm1, %xmm0
jae 0x59cb
movq -0x68(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
callq 0x4d20
callq 0x5970
movsd %xmm0, -0x78(%rbp)
callq 0x5970
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
leaq -0x48(%rbp), %rdi
xorps %xmm2, %xmm2
callq 0x3e10
leaq -0x30(%rbp), %rdi
movsd 0x1159e(%rip), %xmm0    # 0x17068
leaq -0x48(%rbp), %rsi
callq 0x3fb0
leaq -0x60(%rbp), %rdi
movsd 0x11581(%rip), %xmm1    # 0x17060
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq 0x3e10
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x3ba0
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rdi
callq 0x5c00
movsd 0x11539(%rip), %xmm1    # 0x17060
ucomisd %xmm1, %xmm0
jae 0x5a9b
movq -0x68(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nop
// File: 2TallTim[P]modern-raytracing/./material.hpp
// Function: lambert::scatter(ray const&, hit_record const&, vec3&, ray&) const
virtual bool scatter(const ray& r_in,
                         const hit_record& rec,
                         vec3& attenuation,
                         ray& scattered) const {
        vec3 target = rec.p + rec.normal + rng::random_in_unit_sphere();
        scattered = ray(rec.p, target-rec.p);
        attenuation = albedo;
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
leaq -0x58(%rbp), %rdi
callq 0x3e50
leaq -0x70(%rbp), %rdi
callq 0x59b0
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x3e50
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
leaq -0xb8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3ba0
movq -0xc8(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0xaf10
movq -0x28(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x30, %edx
callq 0x31a0
movq -0xc0(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 2TallTim[P]modern-raytracing/./material.hpp
// Function: metal::scatter(ray const&, hit_record const&, vec3&, ray&) const
virtual bool scatter(const ray& r_in,
                         const hit_record& rec,
                         vec3& attenuation,
                         ray& scattered) const {
        vec3 reflected = ray::reflect(unit_vector(r_in.direction()), rec.normal);
        scattered = ray(rec.p, reflected + fuzz*rng::random_in_unit_sphere());
        attenuation = albedo;
        return (dot(scattered.direction(), rec.normal) > 0);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3cf0
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8fd0
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xbc90
movq -0x108(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x110(%rbp)
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x59b0
movsd -0x118(%rbp), %xmm0
leaq -0xd0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x3fb0
leaq -0xb8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x3e50
movq -0x110(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0xaf10
movq -0x28(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x30, %edx
callq 0x31a0
movq -0x108(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x3cf0
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
leaq -0x100(%rbp), %rdi
callq 0x3c50
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)
// File: 2TallTim[P]modern-raytracing/./ray.hpp
// Function: ray::refract(vec3 const&, vec3 const&, double, vec3&)
static inline bool refract(const vec3& v, const vec3& n, double ni_over_nt, vec3& refracted) {
        vec3 uv = unit_vector(v);
        double dt = dot(uv,n);
        double discriminant = 1.0 - ni_over_nt*ni_over_nt*(1-dt*dt);
        if(discriminant > 0){
            refracted = ni_over_nt * (uv - n*dt) - n*sqrt(discriminant);
            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8fd0
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3c50
movsd %xmm0, -0x60(%rbp)
movsd -0x20(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
movsd -0x60(%rbp), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
movsd 0x998a(%rip), %xmm2     # 0x17060
addsd %xmm2, %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm1, %xmm0
movsd 0x9963(%rip), %xmm1     # 0x17060
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xd7cc
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0xf0(%rbp)
movq -0x18(%rbp), %rsi
movsd -0x60(%rbp), %xmm0
leaq -0xc8(%rbp), %rdi
callq 0xd880
leaq -0xb0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
callq 0x3ba0
movsd -0xf0(%rbp), %xmm0
leaq -0x98(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3fb0
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
movsd -0x68(%rbp), %xmm0
callq 0x3170
movq -0xe8(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0xd880
leaq -0x80(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x3ba0
movq -0x28(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, (%rax)
movq -0x78(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xd7d0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nop