LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/procenv.cc
// Function: asbi::load_procenv(asbi::Context*, int, char const**, int)
void asbi::load_procenv(Context* ctx, int argc, const char* argv[], int scriptArgs) {
	auto env = new MapContainer(ctx);
	auto args = new MapContainer(ctx);
	for (int i = scriptArgs, j = 0; i < argc; ++i, ++j)
		args->set(Value::number(j), Value::string(ctx->new_string(argv[i])));

	env->set(Value::symbol("all",  ctx), Value::macro(all_env_vars));
	env->set(Value::symbol("set",  ctx), Value::macro(set_env_var));
	env->set(Value::symbol("get",  ctx), Value::macro(get_env_var));
	env->set(Value::symbol("argv", ctx), Value::map(args));
	env->set(Value::symbol("$",    ctx), Value::macro(macro_system));
	env->set(Value::symbol("exit", ctx), Value::macro(macro_exit));
	ctx->global_env->decl(ctx, "env", Value::map(env));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r14
pushq $0x68
popq %rdi
callq 0x5390
movq %rax, (%rsp)
movq %rax, %rdi
movq %r14, %rsi
callq 0xd80c
pushq $0x68
popq %rdi
callq 0x5390
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %r14, %rbp
movq %r14, %rsi
callq 0xd80c
movslq %ebx, %r14
movslq %r13d, %r15
pxor %xmm0, %xmm0
pushq $0x4
popq %r13
cmpq %r15, %r14
jge 0x1135a
movq %xmm0, %rbx
movq (%r12,%r14,8), %rsi
movq %rbp, %rdi
movq %xmm0, 0x10(%rsp)
callq 0xf3f6
movq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rdx
movl %r13d, %ecx
movq %rax, %r8
callq 0xd90c
movsd 0x10(%rsp), %xmm0
incq %r14
addsd 0x4070(%rip), %xmm0     # 0x153c8
jmp 0x11315
leaq 0x3b8d(%rip), %rdi      # 0x14eee
movq %rbp, %r14
movq %rbp, %rsi
callq 0xda86
leaq 0x10f(%rip), %r8        # 0x11482
pushq $0x7
popq %rbp
movq (%rsp), %rbx
movq %rbx, %rdi
movl %eax, %esi
movl %ebp, %ecx
callq 0xd90c
leaq 0x4092(%rip), %rdi      # 0x1541f
movq %r14, %rsi
callq 0xda86
leaq 0x282(%rip), %r8        # 0x1161e
movq %rbx, %rdi
movl %eax, %esi
movl %ebp, %ecx
callq 0xd90c
leaq 0x4074(%rip), %rdi      # 0x15423
movq %r14, %rsi
callq 0xda86
leaq 0x330(%rip), %r8        # 0x116ee
movq %rbx, %rdi
movl %eax, %esi
movl %ebp, %ecx
callq 0xd90c
leaq 0x4056(%rip), %rdi      # 0x15427
movq %r14, %rsi
callq 0xda86
pushq $0x6
popq %r12
movq %rbx, %rdi
movl %eax, %esi
movl %r12d, %ecx
movq 0x8(%rsp), %r8
callq 0xd90c
leaq 0x4036(%rip), %rdi      # 0x1542c
movq %r14, %rsi
callq 0xda86
leaq 0x390(%rip), %r8        # 0x11795
movq %rbx, %rdi
movl %eax, %esi
movl %ebp, %ecx
callq 0xd90c
leaq 0x4016(%rip), %rdi      # 0x1542e
movq %r14, %rsi
callq 0xda86
leaq 0x4ed(%rip), %r8        # 0x11914
movq %rbx, %rdi
movl %eax, %esi
movl %ebp, %ecx
callq 0xd90c
movq 0x4f8(%r14), %rdi
leaq 0x3b9f(%rip), %rdx      # 0x14fe0
movq %r14, %rsi
movl %r12d, %ecx
movq %rbx, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xed4a
movq %rax, %r14
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
jmp 0x1146e
movq %rax, %r14
pushq $0x68
popq %rsi
movq (%rsp), %rdi
callq 0x53a0
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/procenv.cc
// Function: all_env_vars(int, asbi::Context*, std::shared_ptr<asbi::Env>)
static Value all_env_vars(int n, Context* ctx, std::shared_ptr<Env>) {
	if (n != 0)
		throw std::runtime_error("env:all usage error");

	auto vars = new MapContainer(ctx);
	for (int i = 0; environ[i] != NULL; ++i) {
		const char* str = environ[i];
		const char* pos = std::strchr(str, '=');
		if (pos == NULL)
			throw std::runtime_error("unexpected environment variable format");

		std::size_t len = std::abs(str - pos);
		std::string name(str, len);
		std::string value(str + len + 1);
		vars->set(Value::string(name, ctx), Value::string(value, ctx));
	}
	return Value::map(vars);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
testl %edi, %edi
jne 0x115b8
movq %rsi, %rbx
pushq $0x68
popq %rdi
callq 0x5390
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd80c
xorl %r14d, %r14d
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r12
movq 0xeb01(%rip), %rax      # 0x1ffc8
movq (%rax), %rax
movq (%rax,%r14), %rbp
testq %rbp, %rbp
je 0x11571
movq %rbp, %rdi
pushq $0x3d
popq %rsi
callq 0x5100
testq %rax, %rax
je 0x11588
movq %rbp, %rcx
subq %rax, %rcx
movq %rcx, %r13
negq %r13
cmovsq %rcx, %r13
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
addq %rbp, %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x6406
incq %r13
movq %r12, %rdi
movq %r13, %rsi
leaq 0xf(%rsp), %rdx
callq 0x60ee
movq %r15, %rdi
movq %rbx, %rsi
callq 0xdb3a
movl %eax, %ebp
movq %rdx, %r13
movq %r12, %rdi
movq %rbx, %rsi
callq 0xdb3a
movq %rdx, %r8
movq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r13, %rdx
movl %eax, %ecx
callq 0xd90c
movq %r12, %rdi
callq 0x5170
movq %r15, %rdi
callq 0x5170
addq $0x8, %r14
jmp 0x114c0
pushq $0x6
popq %rax
movq 0x10(%rsp), %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %r14
leaq 0x3ead(%rip), %rsi      # 0x15447
movq %rax, %rdi
callq 0x5120
movq 0xea47(%rip), %rsi      # 0x1fff0
movq 0xe9f8(%rip), %rdx      # 0x1ffa8
movq %r14, %rdi
callq 0x55f0
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %r14
leaq 0x3e69(%rip), %rsi      # 0x15433
movq %rax, %rdi
callq 0x5120
jmp 0x115a2
jmp 0x115e8
movq %rax, %rbx
pushq $0x68
popq %rsi
movq 0x10(%rsp), %rdi
callq 0x53a0
jmp 0x11616
movq %rax, %rbx
movq %r14, %rdi
callq 0x5290
jmp 0x11616
movq %rax, %rbx
jmp 0x11616
movq %rax, %rbx
jmp 0x1160c
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x5170
leaq 0x18(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/procenv.cc
// Function: set_env_var(int, asbi::Context*, std::shared_ptr<asbi::Env>)
static Value set_env_var(int n, Context* ctx, std::shared_ptr<Env>) {
	if (n != 2)
		throw std::runtime_error("env:set usage error");

	auto name = ctx->pop();
	auto value = ctx->pop();
	if (name.type != type_t::String || value.type != type_t::String)
		throw std::runtime_error("env:set usage error");

	if(setenv(name._string->data.c_str(), value._string->data.c_str(), 1) != 0)
		throw std::runtime_error(std::strerror(errno));

	return Value::nil();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x2, %edi
jne 0x11667
movq %rsi, %r14
movq %rsi, %rdi
callq 0xf1b4
movl %eax, %ebp
movq %rdx, %rbx
movq %r14, %rdi
callq 0xf1b4
cmpl $0x4, %ebp
jne 0x11683
cmpl $0x4, %eax
jne 0x11683
movq 0x20(%rbx), %rdi
movq 0x20(%rdx), %rsi
pushq $0x1
popq %rdx
callq 0x5540
testl %eax, %eax
jne 0x1169f
pushq $0x2
popq %rax
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3df5(%rip), %rsi      # 0x1546e
movq %rax, %rdi
callq 0x5120
jmp 0x116c1
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3dd9(%rip), %rsi      # 0x1546e
movq %rax, %rdi
callq 0x5120
jmp 0x116c1
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
callq 0x5040
movl (%rax), %edi
callq 0x50d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5120
movq 0xe928(%rip), %rsi      # 0x1fff0
movq 0xe8d9(%rip), %rdx      # 0x1ffa8
movq %rbx, %rdi
callq 0x55f0
jmp 0x116db
jmp 0x116db
movq %rax, %r14
movq %rbx, %rdi
callq 0x5290
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/procenv.cc
// Function: get_env_var(int, asbi::Context*, std::shared_ptr<asbi::Env>)
static Value get_env_var(int n, Context* ctx, std::shared_ptr<Env>) {
	if (n != 1)
		throw std::runtime_error("env:get usage error");

	auto name = ctx->pop();
	if (name.type != type_t::String)
		throw std::runtime_error("env:get usage error");

	const char* value = std::getenv(name._string->data.c_str());
	return value == NULL ? Value::nil() : Value::string(value, ctx);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x11734
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xf1b4
cmpl $0x4, %eax
jne 0x11750
movq 0x20(%rdx), %rdi
callq 0x5430
testq %rax, %rax
je 0x11727
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xdae0
pushq $0x2
popq %rax
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3d3c(%rip), %rsi      # 0x15482
movq %rax, %rdi
callq 0x5120
jmp 0x1176a
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3d20(%rip), %rsi      # 0x15482
movq %rax, %rdi
callq 0x5120
movq 0xe87f(%rip), %rsi      # 0x1fff0
movq 0xe830(%rip), %rdx      # 0x1ffa8
movq %rbx, %rdi
callq 0x55f0
jmp 0x11782
movq %rax, %r14
movq %rbx, %rdi
callq 0x5290
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/procenv.cc
// Function: macro_system(int, asbi::Context*, std::shared_ptr<asbi::Env>)
static Value macro_system(int n, Context* ctx, std::shared_ptr<Env>) {
	if (n != 2)
		throw std::runtime_error("env:$ usage error");

	auto arg = ctx->pop();
	auto callback = ctx->pop();
	if (arg.type != type_t::String || callback.type != type_t::Lambda)
		throw std::runtime_error("env:$ usage error");

	std::string cmd = arg._string->data;
	auto task = [ctx, cmd](evts::callback_t cb) -> void {
		pid_t pid = fork();
		if (pid == -1) {
			std::vector<Value> args;
			args.push_back(Value::symbol(ctx->names.err));
			args.push_back(Value::number(errno));
			cb(&args, true);
			return;
		}

		if (pid == 0) {
			const char* shell = getenv("SHELL");
			shell = shell != NULL ? shell : "/bin/sh";
			execl(shell, shell, "-c", cmd.c_str(), NULL);
			return;
		}

		int wstatus;
		if (waitpid(pid, &wstatus, 0) == -1) {
			// TODO...
			throw std::runtime_error("waitpid failed");
		}

		std::vector<Value> args;
		if (WIFEXITED(wstatus)) {
			args.push_back(Value::symbol(ctx->names.ok));
			args.push_back(Value::number(WEXITSTATUS(wstatus)));
		} else {
			args.push_back(Value::symbol(ctx->names.err));
			args.push_back(Value::number(WTERMSIG(wstatus)));
		}
		cb(&args, true);
	};

	ctx->evtloop.addTask(callback._lambda, task);

	return Value::nil();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
cmpl $0x2, %edi
jne 0x1187d
movq %rsi, %r14
movq %rsi, %rdi
callq 0xf1b4
movl %eax, %ebp
movq %rdx, %rbx
movq %r14, %rdi
callq 0xf1b4
cmpl $0x4, %ebp
jne 0x11899
cmpl $0x5, %eax
jne 0x11899
movq %rdx, %r15
addq $0x20, %rbx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x54d0
leaq 0x50(%rsp), %rbx
movq %r14, -0x8(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x54d0
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
pushq $0x28
popq %rdi
callq 0x5390
movq %rax, %r12
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x11c72
movq %rsp, %rdx
movq %r12, (%rdx)
leaq 0x16a(%rip), %rax       # 0x1199a
movq %rax, 0x18(%rdx)
leaq 0x3af(%rip), %rax       # 0x11bea
movq %rax, 0x10(%rdx)
addq $0x318, %r14            # imm = 0x318
movq %r14, %rdi
movq %r15, %rsi
callq 0x124f8
movq %rsp, %rdi
callq 0x11274
movq %rbx, %rdi
callq 0x5170
leaq 0x28(%rsp), %rdi
callq 0x5170
pushq $0x2
popq %rax
xorl %edx, %edx
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3c07(%rip), %rsi      # 0x15496
movq %rax, %rdi
callq 0x5120
jmp 0x118b3
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3beb(%rip), %rsi      # 0x15496
movq %rax, %rdi
callq 0x5120
movq 0xe736(%rip), %rsi      # 0x1fff0
movq 0xe6e7(%rip), %rdx      # 0x1ffa8
movq %rbx, %rdi
callq 0x55f0
jmp 0x118cb
movq %rax, %r14
movq %rbx, %rdi
callq 0x5290
jmp 0x1190c
jmp 0x118ea
movq %rax, %r14
pushq $0x28
popq %rsi
movq %r12, %rdi
callq 0x53a0
jmp 0x118ed
movq %rax, %r14
movq %rsp, %rdi
callq 0x11274
movq %rbx, %rdi
callq 0x5170
jmp 0x11902
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x5170
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/procenv.cc
// Function: macro_exit(int, asbi::Context*, std::shared_ptr<asbi::Env>)
static Value macro_exit(int n, Context* ctx, std::shared_ptr<Env>) {
	if (n != 1)
		throw std::runtime_error("exit macro usage error");

	auto exitcode = ctx->pop();
	if (exitcode.type != type_t::Number)
		throw std::runtime_error("exit macro usage error");

	std::exit(static_cast<unsigned int>(exitcode._number));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x11939
movq %rsi, %rdi
callq 0xf1b4
cmpl $0x1, %eax
jne 0x11955
movq %rdx, %xmm0
cvttsd2si %xmm0, %rdi
callq 0x5420
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3b7d(%rip), %rsi      # 0x154c8
movq %rax, %rdi
callq 0x5120
jmp 0x1196f
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x3b61(%rip), %rsi      # 0x154c8
movq %rax, %rdi
callq 0x5120
movq 0xe67a(%rip), %rsi      # 0x1fff0
movq 0xe62b(%rip), %rdx      # 0x1ffa8
movq %rbx, %rdi
callq 0x55f0
jmp 0x11987
movq %rax, %r14
movq %rbx, %rdi
callq 0x5290
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/utils.cc
// Function: asbi::evts::Semaphore::tryAcquire()
bool Semaphore::tryAcquire() {
	std::unique_lock<std::mutex> lock(mut);
	if (counter > 0) {
		counter--;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x11e24
movl 0x58(%rbx), %eax
testl %eax, %eax
jle 0x11d2c
leal -0x1(%rax), %ecx
movl %ecx, 0x58(%rbx)
testl %eax, %eax
setg %bl
movq %rsp, %rdi
callq 0x11e3a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/utils.cc
// Function: asbi::evts::Semaphore::acquireFor(std::chrono::duration<double, std::ratio<1l, 1000l>>)
bool Semaphore::acquireFor(std::chrono::duration<double, std::milli> timeout) {
	std::unique_lock<std::mutex> lock(mut);
	if (condvar.wait_for(lock, timeout, [this](){ return this->counter > 0; })) {
		counter--;
		return true;
	}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11e24
leaq 0x28(%rbx), %r15
callq 0x54b0
movsd 0x8(%rsp), %xmm0
mulsd 0x3763(%rip), %xmm0     # 0x154e0
cvttsd2si %xmm0, %rcx
movapd %xmm0, %xmm1
cvtsi2sd %rcx, %xmm0
xorl %edx, %edx
ucomisd %xmm0, %xmm1
seta %dl
addq %rcx, %rax
addq %rdx, %rax
leaq 0x20(%rsp), %r12
movq %rax, (%r12)
movl 0x58(%rbx), %eax
testl %eax, %eax
jg 0x11dc4
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11eb4
cmpl $0x1, %eax
jne 0x11da3
movl 0x58(%rbx), %eax
testl %eax, %eax
jle 0x11de3
decl %eax
movl %eax, 0x58(%rbx)
movb $0x1, %bl
leaq 0x10(%rsp), %rdi
callq 0x11e3a
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %ebx, %ebx
jmp 0x11dcb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x11e3a
movq %rbx, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/loop.cc
// Function: worker(asbi::evts::Loop*)
static void worker(evts::Loop* evtloop) {
	evts::Task* task = nullptr;
	while ((task = evtloop->getTask()) != nullptr) {
		task->fn([evtloop, task](std::vector<Value> *args, bool done) -> void {
			evtloop->addEvent(task, args, done);
		});

		// std::cerr << "Worker#" << std::this_thread::get_id() << " finished Task " << (void*)task << '\n';

		delete task;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x5ed(%rip), %r13       # 0x127dc
leaq 0x5fe(%rip), %rbp       # 0x127f4
leaq 0x8(%rsp), %r14
pushq $0x28
popq %r15
movq %rbx, %rdi
callq 0x12614
testq %rax, %rax
je 0x1224b
movq %rax, %r12
movq %rbx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %r13, 0x20(%rsp)
movq %rbp, 0x18(%rsp)
movq %rax, %rdi
movq %r14, %rsi
callq 0x12fb8
movq %r14, %rdi
callq 0x11274
movq %r12, %rdi
callq 0x11274
movq %r12, %rdi
movq %r15, %rsi
callq 0x53a0
jmp 0x121ff
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x11274
movq %rbx, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/loop.cc
// Function: asbi::evts::Loop::start()
void evts::Loop::start() {
	evts::Event* evt;
	while ((evt = getEvent()) != nullptr) {
		for (auto rit = evt->args.rbegin(); rit != evt->args.rend(); ++rit)
			ctx->push(*rit);

		Value::lambda(evt->callback).call(ctx, evt->args.size(), nullptr);
		delete evt;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x18(%rsp), %r15
movq %rsp, %r12
pushq $0x28
popq %r13
movq %r14, %rdi
callq 0x12338
testq %rax, %rax
je 0x12313
movq %rax, %rbp
movq 0x8(%rax), %rax
cmpq (%rbp), %rax
je 0x122bf
movq (%r14), %rdi
leaq -0x10(%rax), %rbx
movl -0x10(%rax), %esi
movq -0x8(%rax), %rdx
callq 0xf190
movq %rbx, %rax
jmp 0x122a1
movq 0x18(%rbp), %rax
movl $0x5, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq (%r14), %rsi
movq 0x8(%rbp), %rdx
subq (%rbp), %rdx
shrq $0x4, %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rcx
callq 0xdb52
leaq 0x8(%rsp), %rdi
callq 0x638a
movq %rbp, %rdi
callq 0xe2ee
movq %rbp, %rdi
movq %r13, %rsi
callq 0x53a0
jmp 0x1228d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x638a
movq %r14, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/loop.cc
// Function: asbi::evts::Loop::addTask(asbi::evts::Task*)
void evts::Loop::addTask(evts::Task* task) {
	std::unique_lock<std::mutex> lock(tasksMtx);
	task->callback->gc_manage = false;
	tasks.push_back(task);
	if (tasksRunning >= threads.size())
		newThread();

	tasksSem.release();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %rsi, (%r15)
leaq 0x10(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e24
movq 0x20(%r14), %rax
movb $0x0, 0x11(%rax)
leaq 0x98(%rbx), %rdi
movq %r15, %rsi
callq 0x1296a
movl 0x8(%rbx), %eax
movq 0x1d0(%rbx), %rcx
subq 0x1c8(%rbx), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
ja 0x125de
movq %rbx, %rdi
callq 0x12016
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x11c88
leaq 0x8(%rsp), %rdi
callq 0x11e3a
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x11e3a
movq %rbx, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/loop.cc
// Function: asbi::evts::Loop::getTask()
evts::Task* evts::Loop::getTask() {
	tasksSem.acquire();

	std::unique_lock<std::mutex> lock(tasksMtx);
	auto task = tasks.front();
	tasks.pop_front();
	tasksRunning++;
	return task;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x38, %rdi
callq 0x11cc2
leaq 0x10(%rbx), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x11e24
leaq 0x98(%rbx), %rdi
movq 0xa8(%rbx), %rax
movq (%rax), %r15
callq 0x1298c
incl 0x8(%rbx)
movq %r14, %rdi
callq 0x11e3a
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/loop.cc
// Function: asbi::evts::Loop::addEvent(asbi::evts::Task*, std::vector<asbi::Value, std::allocator<asbi::Value>>*, bool)
void evts::Loop::addEvent(evts::Task* task, std::vector<Value> *args, bool done) {
	auto evt = new evts::Event();
	evt->taskDone = done;
	evt->callback = task->callback;
	if (args == nullptr) {
		evt->doCall = false;
	} else {
		evt->args = *args;
		evt->doCall = true;
	}
	addEvent(evt);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x5390
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
movb %bpl, 0x20(%rax)
movq 0x20(%r12), %rax
movq %rax, 0x18(%r14)
testq %r15, %r15
je 0x126b4
movq %r14, %rdi
movq %r15, %rsi
callq 0x129aa
movb $0x1, %al
jmp 0x126b6
xorl %eax, %eax
movb %al, 0x21(%r14)
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x126ce
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/loop.cc
// Function: asbi::evts::Loop::addEvent(asbi::evts::Event*)
void evts::Loop::addEvent(evts::Event* evt) {
	std::unique_lock<std::mutex> lock(eventsMtx);

	if (evt->taskDone) {
		std::unique_lock<std::mutex> lock(tasksMtx);
		tasksRunning--;
	}

	events.push_back(evt);
	eventsSem.release();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, (%rsp)
leaq 0xe8(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e24
cmpb $0x1, 0x20(%r14)
jne 0x12712
leaq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x11e24
decl 0x8(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x11e3a
leaq 0x170(%rbx), %rdi
movq %rsp, %rsi
callq 0x12a76
addq $0x110, %rbx            # imm = 0x110
movq %rbx, %rdi
callq 0x11c88
leaq 0x8(%rsp), %rdi
callq 0x11e3a
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x12744
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x11e3a
movq %rbx, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/utils.hh
// Function: asbi::evts::SortedQueue<asbi::evts::Timer, std::less<asbi::evts::Timer>>::~SortedQueue()
~SortedQueue() {
			for (Node* node = head; node != nullptr;) {
				auto tmp = node->next;
				delete node;
				node = tmp;
			}
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rdi
pushq $0x18
popq %rbx
testq %rdi, %rdi
je 0x1288c
movq 0x10(%rdi), %r14
movq %rbx, %rsi
callq 0x53a0
movq %r14, %rdi
jmp 0x12876
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/utils.hh
// Function: asbi::evts::SortedQueue<asbi::evts::Timer, std::less<asbi::evts::Timer>>::removeFirst()
void removeFirst() {
			assert(head != nullptr);
			auto tmp = head->next;
			delete head;
			head = tmp;
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x12b0c
movq 0x10(%rdi), %r14
pushq $0x18
popq %rsi
callq 0x53a0
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2ab7(%rip), %rdi      # 0x155ca
leaq 0x2ac0(%rip), %rsi      # 0x155da
leaq 0x2b3c(%rip), %rcx      # 0x1565d
pushq $0x61
popq %rdx
callq 0x5220
nop
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/events/utils.hh
// Function: asbi::evts::SortedQueue<asbi::evts::Timer, std::less<asbi::evts::Timer>>::insert(asbi::evts::Timer)
void insert(T in) {
			Comp cmp = Comp();

			/*int s1 = size();
			Node **p = &head;
			while (*p != nullptr && cmp((*p)->value, in))
				p = &((*p)->next);

			if (*p == nullptr) {
				*p = node;
			} else {
			 	node->next = (*p)->next;
				*p = node;
			}
			assert(s1 + 1 == size());*/



			Node *drag = nullptr, *curr = head;
			while (curr != nullptr && cmp(curr->value, in)) {
				drag = curr;
				curr = curr->next;
			}

			if (drag == nullptr)
				head = new Node(in, head);
			else
				drag->next = new Node(in, curr);

		}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq %rdi, %rax
movq (%rax), %r12
testq %r12, %r12
je 0x12b59
ucomisd 0x8(%r12), %xmm0
jbe 0x12b59
leaq 0x10(%r12), %rax
movq %r12, %r15
jmp 0x12b3e
movsd %xmm0, (%rsp)
pushq $0x18
popq %rdi
callq 0x5390
testq %r15, %r15
je 0x12b85
movq %r14, (%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movq %r12, 0x10(%rax)
addq $0x10, %r15
movq %r15, %rbx
jmp 0x12b99
movq (%rbx), %rcx
movq %r14, (%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/tests.cc
// Function: tests::test(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, asbi::Value)
void test(const std::string code, Value expected) {
		Context ctx;
		std::cout << "test(\'" << code << "\'): " << std::flush;
		Value res = ctx.run(code);
		assert(res == expected);
		std::cout << "SUCCESS\n";
	}

// Assembly:
pushq %rbx
subq $0x590, %rsp            # imm = 0x590
movq %rdi, %rbx
movl %esi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xee50
movq 0xc78b(%rip), %rdi      # 0x1ffb8
leaq 0x1f15(%rip), %rsi      # 0x15749
callq 0x5380
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5320
leaq 0x1f05(%rip), %rsi      # 0x15750
movq %rax, %rdi
callq 0x5380
movq %rax, %rdi
callq 0x5250
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0xf1f6
leaq 0x18(%rsp), %rdi
movl %eax, (%rdi)
movq %rdx, 0x8(%rdi)
leaq 0x8(%rsp), %rsi
callq 0xdd22
testb %al, %al
je 0x138a7
movq 0xc730(%rip), %rdi      # 0x1ffb8
leaq 0x1f0a(%rip), %rsi      # 0x15799
callq 0x5380
leaq 0x28(%rsp), %rdi
callq 0xf048
addq $0x590, %rsp            # imm = 0x590
popq %rbx
retq
leaq 0x1ea7(%rip), %rdi      # 0x15755
leaq 0x1eb0(%rip), %rsi      # 0x15765
leaq 0x1eb2(%rip), %rcx      # 0x1576e
pushq $0x17
popq %rdx
callq 0x5220
jmp 0x138c6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xf048
movq %rbx, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/main.cpp
// Function: main
int main(int argc, char** argv) {
  std::vector<std::string> args;
  for (int i = 1; i < argc; i++) {
    args.push_back(std::string(argv[i]));
  }
  return App(args).run();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movslq %edi, %r13
pushq $0x1
popq %r14
leaq -0x70(%rbp), %r15
leaq -0x29(%rbp), %r12
cmpq %r13, %r14
jge 0x378b
movq (%rbx,%r14,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x37f8
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x3970
movq %r15, %rdi
callq 0x3130
incq %r14
jmp 0x375e
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3b60
leaq -0x70(%rbp), %rdi
callq 0x4476
movl %eax, %ebx
leaq -0x70(%rbp), %rdi
callq 0x4448
leaq -0x50(%rbp), %rdi
callq 0x3834
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x4448
jmp 0x37e7
jmp 0x37e4
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x3130
jmp 0x37e7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3834
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/app.cpp
// Function: App::run()
int App::run() {
  Cloud cloud;

  while (running_) {
    // Grab cloud
    if (running_ && cloud_grabber_) {
      if (!cloud_grabber_->read(cloud)) {
        running_ = false;
      }
    }

    // Do some additional things, depending on the selected scenario
    if (running_ && scenario_) {
      if (!scenario_->update(cloud)) {
        running_ = false;
      }
    }

    // Update the GUI with new data
    // Save output files on user's request
    if (running_ && gui_) {
      if (!gui_->update(cloud)) {
        running_ = false;
      }
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
pxor %xmm0, %xmm0
leaq -0x60(%rbp), %r14
movdqa %xmm0, 0x20(%r14)
movdqa %xmm0, 0x10(%r14)
movdqa %xmm0, (%r14)
movq $0x7f7fffff, 0x30(%r14) # imm = 0x7F7FFFFF
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x38(%r14)
andq $0x0, 0x48(%r14)
movb (%rbx), %al
cmpb $0x1, %al
jne 0x450c
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x44d2
movq (%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
testb %al, %al
je 0x4507
movb (%rbx), %al
testb $0x1, %al
je 0x44ee
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x44ee
movq (%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
testb %al, %al
je 0x4507
movb (%rbx), %al
testb $0x1, %al
je 0x44b4
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x44b4
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
testb %al, %al
jne 0x44b4
movb $0x0, (%rbx)
jmp 0x44b4
leaq -0x60(%rbp), %rdi
callq 0x4dbe
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4dbe
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/cloud-grabbers.cpp
// Function: CloudFileGrabber::CloudFileGrabber(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, float)
CloudFileGrabber::CloudFileGrabber(const std::string& filename, float rot_angle) {
  filename_ = filename;
  rot_angle_ = rot_angle;
  status_ = std::ifstream(filename_).good();
  if (!status_) {
    std::cerr << "Error: File does not contain a valid cloud." << std::endl;
    status_ = false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movd %xmm0, -0x1c(%rbp)
movq %rdi, %rbx
movb $0x1, 0x8(%rdi)
leaq 0x67fd(%rip), %rax      # 0xbb90
movq %rax, (%rdi)
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
leaq 0x10(%rdi), %r14
movb $0x0, 0x20(%rdi)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x38(%rdi)
movdqu %xmm0, 0x48(%rdi)
movdqu %xmm0, 0x58(%rdi)
movq $0x7f7fffff, 0x68(%rdi) # imm = 0x7F7FFFFF
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x70(%rdi)
andq $0x0, 0x80(%rdi)
movq %r14, %rdi
callq 0x3180
movd -0x1c(%rbp), %xmm0
movd %xmm0, 0x30(%rbx)
leaq -0x228(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x3410
leaq -0x228(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x208(%rbp,%rax)
sete 0x8(%rbx)
callq 0x3090
cmpb $0x0, 0x8(%rbx)
jne 0x543f
movq 0x6bc9(%rip), %rdi      # 0xbff0
leaq 0x30d6(%rip), %rsi      # 0x8504
callq 0x3290
movq %rax, %rdi
callq 0x3150
movb $0x0, 0x8(%rbx)
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x544f
movq %rax, %r15
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x4dbe
movq %r14, %rdi
callq 0x3130
movq %r15, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/cloud-grabbers.cpp
// Function: CloudFileSeriesGrabber::CloudFileSeriesGrabber(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
CloudFileSeriesGrabber::CloudFileSeriesGrabber(const std::string& filename) {
  filename_ = filename;
  clouds_cnt_ = 0;
  file_.open(filename_);
  open();
  next_cloud_time_ = std::chrono::steady_clock::now();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movb $0x1, 0x8(%rdi)
leaq 0x64dd(%rip), %rax      # 0xbbc0
movq %rax, (%rdi)
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movq %rsi, %r12
leaq 0x10(%rdi), %rbx
movb $0x0, 0x20(%rdi)
leaq 0x30(%rdi), %r15
movq %r15, %rdi
callq 0x32c0
andq $0x0, 0x240(%r14)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3180
andq $0x0, 0x238(%r14)
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3240
movq %r14, %rdi
callq 0x5770
callq 0x3330
movq %rax, 0x240(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x5760
movq %rax, %r14
movq %r15, %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3130
movq %r14, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/cloud-grabbers.cpp
// Function: CloudFileSeriesGrabber::open()
bool CloudFileSeriesGrabber::open() {
  while (file_.good()) {
    std::string line;
    std::getline(file_, line);
    if (line.empty() || line[0] == '!') {
      break;
    }
  }

  if (!file_.good()) {
    std::cerr << "Error: File does not contain a valid cloud series." << std::endl;
    status_ = false;
  }
  return status_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
leaq -0x38(%rbp), %r12
leaq -0x48(%rbp), %r15
movq 0x30(%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x50(%rbx,%rax)
jne 0x57de
movq %r12, -0x48(%rbp)
andq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3050
cmpq $0x0, -0x40(%rbp)
je 0x57d5
movq -0x48(%rbp), %rax
movb (%rax), %r13b
movq %r15, %rdi
callq 0x3130
cmpb $0x21, %r13b
jne 0x5790
jmp 0x57de
leaq -0x48(%rbp), %rdi
callq 0x3130
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
je 0x5810
movq 0x67fc(%rip), %rdi      # 0xbff0
leaq 0x2d47(%rip), %rsi      # 0x8542
callq 0x3290
movq %rax, %rdi
callq 0x3150
movb $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x5813
movb 0x8(%rbx), %al
andb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/cloud-writers.cpp
// Function: CloudFileSeriesWriter::write(Cloud const&)
bool CloudFileSeriesWriter::write(const Cloud& cloud) {
  if (clouds_cnt_ == 0) {
    time_begin_ = std::chrono::steady_clock::now();
  }
  auto time_now = std::chrono::steady_clock::now();
  auto time_diff =
      std::chrono::duration_cast<std::chrono::milliseconds>(time_now - time_begin_).count();
  time_begin_ = time_now;

  file_ << "! " << ++clouds_cnt_ << " " << time_diff << "\n";
  if (coord_sys_ == CoordSystem::CART) {
    for (const auto& pt : cloud.pts_cart) {
      file_ << pt.x << " " << pt.y << "\n";
    }
  } else if (coord_sys_ == CoordSystem::CYL) {
    for (const auto& pt : cloud.pts_cyl) {
      file_ << pt.angle << " " << pt.dist << "\n";
    }
  }

  file_.flush();
  status_ = file_.good();
  return status_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, 0x230(%rdi)
jne 0x6be0
callq 0x3330
movq %rax, 0x240(%rbx)
callq 0x3330
movq %rax, %rcx
subq 0x240(%rbx), %rax
movl $0xf4240, %esi          # imm = 0xF4240
cqto
idivq %rsi
movq %rax, %r12
movq %rcx, 0x240(%rbx)
leaq 0x30(%rbx), %r14
leaq 0x1bbb(%rip), %rsi      # 0x87c9
movq %r14, %rdi
callq 0x3290
movq 0x230(%rbx), %rsi
incq %rsi
movq %rsi, 0x230(%rbx)
movq %rax, %rdi
callq 0x31b0
leaq 0x1b94(%rip), %rsi      # 0x87ca
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
movq %r12, %rsi
callq 0x3280
leaq 0x15cc(%rip), %rsi      # 0x821c
movq %rax, %rdi
callq 0x3290
movq %rbx, -0x30(%rbp)
movl 0x238(%rbx), %eax
cmpl $0x1, %eax
je 0x6cc2
testl %eax, %eax
jne 0x6d14
movq 0x18(%r15), %r13
movq 0x20(%r15), %rbx
leaq 0x1b4c(%rip), %r15      # 0x87ca
leaq 0x1597(%rip), %r12      # 0x821c
cmpq %rbx, %r13
je 0x6d14
movl (%r13), %esi
movq %r14, %rdi
callq 0x3470
movq %rax, %rdi
movq %r15, %rsi
callq 0x3290
movl 0x4(%r13), %esi
movq %rax, %rdi
callq 0x3470
movq %rax, %rdi
movq %r12, %rsi
callq 0x3290
addq $0x8, %r13
jmp 0x6c85
movq (%r15), %r13
movq 0x8(%r15), %rbx
leaq 0x1afa(%rip), %r15      # 0x87ca
leaq 0x1545(%rip), %r12      # 0x821c
cmpq %rbx, %r13
je 0x6d14
movss (%r13), %xmm0
movq %r14, %rdi
callq 0x31f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x3290
movss 0x4(%r13), %xmm0
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x3290
addq $0x8, %r13
jmp 0x6cd7
movq %r14, %rdi
callq 0x31c0
movq -0x30(%rbp), %rcx
movq 0x30(%rcx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x50(%rcx,%rax)
sete %al
sete 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/knei-knurow[P]lidar-visualizations/src/guis.cpp
// Function: TerminalGUI::update(Cloud const&)
bool TerminalGUI::update(const Cloud& cloud) {
  std::cout << "!\t" << ++count_ << std::endl;
  if (verbose_) {
    for (const auto& pt : cloud.pts_cyl) {
      std::cout << pt.angle << "\t" << pt.dist << std::endl;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x4e5a(%rip), %rdi      # 0xbfd0
leaq 0x175c(%rip), %rsi      # 0x88d9
callq 0x3290
movq 0x10(%r14), %rsi
incq %rsi
movq %rsi, 0x10(%r14)
movq %rax, %rdi
callq 0x31b0
movq %rax, %rdi
callq 0x3150
cmpb $0x1, 0x8(%r14)
jne 0x71f2
movq (%rbx), %r15
movq 0x8(%rbx), %r12
movq 0x4e1e(%rip), %rbx      # 0xbfd0
leaq 0x1721(%rip), %r14      # 0x88da
cmpq %r12, %r15
je 0x71f2
movss (%r15), %xmm0
movq %rbx, %rdi
callq 0x31f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3290
movss 0x4(%r15), %xmm0
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
callq 0x3150
addq $0x8, %r15
jmp 0x71b9
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/addgrid.cpp
// Function: main
int main(int argc, char* argv[])
{
  Image inImage;
  char* infilename = NULL;

  double gridx = 10.0;
  double gridy = 10.0;
  Rgb gridcolor(0,0,0);

  char *progname = argv[0];
  argc--;argv++;
  while (argc > 0 && argv[0][0] == '-') {
    if (strcmp(argv[0], "-grid") == 0) {
      argc--; argv++;
      if (argc == 0) { error(usage, progname); };
      gridx = strtod(argv[0],NULL);
      gridy = gridx;
    } else if (strcmp(argv[0], "-gridx") == 0) {
      argc--; argv++;
      if (argc == 0) { error(usage, progname); };
      gridx = strtod(argv[0],NULL);
    } else if (strcmp(argv[0], "-gridy") == 0) {
      argc--; argv++;
      if (argc == 0) { error(usage, progname); };
      gridy = strtod(argv[0],NULL);
    } else {
      error(usage, progname);
    }
    argc--; argv++;
  }
  if (argc != 1) {
    error(usage, progname);
  }

  infilename = argv[0];

  inImage.Read(infilename, true);
  inImage.AddGrid(gridx, gridy, gridcolor);
  inImage.Close();
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9fbe
andw $0x0, 0x5(%rsp)
movb $0x0, 0x7(%rsp)
movq (%rbx), %r15
movsd 0x6b04(%rip), %xmm0     # 0xb008
leaq 0x6b33(%rip), %r12      # 0xb03e
leaq 0x6b32(%rip), %r13      # 0xb044
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
addq $0x10, %rbx
addl $-0x2, %r14d
leal 0x2(%r14), %eax
cmpl $0x2, %eax
jl 0x4602
movq -0x8(%rbx), %rbp
cmpb $0x2d, (%rbp)
jne 0x45fd
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4270
testl %eax, %eax
je 0x45da
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4270
testl %eax, %eax
je 0x458e
movq %rbp, %rdi
leaq 0x6ade(%rip), %rsi      # 0xb04b
callq 0x4270
testl %eax, %eax
je 0x45b7
movq 0xcc63(%rip), %rdi      # 0x111e0
addq $0x8, %rbx
decl %r14d
movq %r15, %rsi
callq 0x4680
jmp 0x4526
testl %r14d, %r14d
jne 0x45a2
movq 0xcc46(%rip), %rdi      # 0x111e0
movq %r15, %rsi
callq 0x4680
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x4170
movsd %xmm0, 0x10(%rsp)
jmp 0x451e
testl %r14d, %r14d
jne 0x45cb
movq 0xcc1d(%rip), %rdi      # 0x111e0
movq %r15, %rsi
callq 0x4680
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x4170
jmp 0x4518
testl %r14d, %r14d
jne 0x45ee
movq 0xcbfa(%rip), %rdi      # 0x111e0
movq %r15, %rsi
callq 0x4680
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x4170
jmp 0x4512
testl %r14d, %r14d
je 0x4615
movq 0xcbd7(%rip), %rdi      # 0x111e0
movq %r15, %rsi
callq 0x4680
movq -0x8(%rbx), %rbp
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbp, %rsi
callq 0xa142
leaq 0x18(%rsp), %rdi
leaq 0x5(%rsp), %rsi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0xa49c
leaq 0x18(%rsp), %rdi
callq 0xa006
leaq 0x18(%rsp), %rdi
callq 0x9ff6
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x466b
jmp 0x466b
jmp 0x466b
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x9ff6
movq %rbx, %rdi
callq 0x4330
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/ebwt_search.cpp
// Function: del_pid(char const*, int)
void del_pid(const char* dirname,int pid) {
	struct stat finfo;
	char* fname = (char*) calloc(FNAME_SIZE,sizeof(char));
	sprintf(fname,"%s/%d",dirname,pid);
	if(stat( fname, &finfo) != 0) {
		free(fname);
		return;
	}
	unlink(fname);
	free(fname);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %esi, %ebp
xorl %eax, %eax
cmpb $0x0, 0x58282(%rip)     # 0x65210
movq %rdi, %r14
movl $0xc8, %edi
cmoveq %rax, %rdi
pushq $0x1
popq %rsi
callq 0x92f0
movq %rax, %rbx
leaq 0x3ac78(%rip), %rsi     # 0x47c24
movq %rax, %rdi
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x90c0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x9920
testl %eax, %eax
jne 0xcfd2
movq %rbx, %rdi
callq 0x9200
movq %rbx, %rdi
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x95b0
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./tokenize.h
// Function: tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128>&, unsigned long)
static inline void tokenize(
	const string& s,
	const string& delims,
	EList<string>& ss,
	size_t max = std::numeric_limits<size_t>::max())
{
	string::size_type lastPos = s.find_first_not_of(delims, 0);
	string::size_type pos = s.find_first_of(delims, lastPos);
	while (string::npos != pos || string::npos != lastPos) {
		ss.push_back(s.substr(lastPos, pos - lastPos));
		lastPos = s.find_first_not_of(delims, pos);
		pos = s.find_first_of(delims, lastPos);
		if(ss.size() == (max - 1)) {
			pos = string::npos;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %edx, %edx
callq 0x9430
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x9470
movq %rax, %rbp
decq %r13
movq %r13, (%rsp)
leaq 0x8(%rsp), %r13
movq %rbx, %rax
andq %rbp, %rax
cmpq $-0x1, %rax
je 0xf4f1
movq %rbp, %rcx
subq %rbx, %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x9520
movq %r14, %rdi
movq %r13, %rsi
callq 0x16afe
movq %r13, %rdi
callq 0x9a68
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x9430
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x9470
movq %rax, %rbp
movq (%rsp), %rax
cmpq %rax, 0x18(%r14)
pushq $-0x1
popq %rax
cmoveq %rax, %rbp
jmp 0xf48b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9a68
movq %rbx, %rdi
callq 0x9950
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/ebwt_search.cpp
// Function: parseInt(int, int, char const*, char const*)
static int parseInt(int lower, int upper, const char *errmsg, const char *arg) {
	long l;
	char *endPtr= NULL;
	l = strtol(arg, &endPtr, 10);
	if (endPtr != NULL) {
		if (l < lower || l > upper) {
			cerr << errmsg << endl;
			printUsage(cerr);
			throw 1;
		}
		return (int32_t)l;
	}
	cerr << errmsg << endl;
	printUsage(cerr);
	throw 1;
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
movq %rsp, %r15
andq $0x0, (%r15)
pushq $0xa
popq %rdx
movq %rcx, %rdi
movq %r15, %rsi
callq 0x96d0
cmpq $0x0, (%r15)
je 0x128a5
movslq %r14d, %rcx
cmpq %rcx, %rax
jl 0x128a5
movl %ebp, %ecx
cmpq %rcx, %rax
jg 0x128a5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4f744(%rip), %r14     # 0x61ff0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x94e0
movq %rax, %rdi
callq 0x9210
movq %r14, %rdi
callq 0xeb7e
pushq $0x4
popq %rdi
callq 0x9220
movl $0x1, (%rax)
movq 0x4f67c(%rip), %rsi     # 0x61f58
movq %rax, %rdi
xorl %edx, %edx
callq 0x9910
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/ebwt_search.cpp
// Function: write_pid(char const*, int)
static void write_pid(const char* dirname,int pid) {
	struct stat dinfo;
	if(stat(dirname, &dinfo) != 0) {
		mkdir(dirname,0755);
	}
	char* fname = (char*) calloc(FNAME_SIZE,sizeof(char));
	sprintf(fname,"%s/%d",dirname,pid);
	FILE* f = fopen(fname,"w");
	fclose(f);
	free(fname);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %rsi
callq 0x9920
testl %eax, %eax
je 0x12b4d
movq %r14, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x91e0
xorl %eax, %eax
cmpb $0x0, 0x526ba(%rip)     # 0x65210
movl $0xc8, %edi
cmoveq %rax, %rdi
pushq $0x1
popq %rsi
callq 0x92f0
movq %rax, %r15
leaq 0x350b3(%rip), %rsi     # 0x47c24
movq %rax, %rdi
movq %r14, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x90c0
leaq 0x3490a(%rip), %rsi     # 0x47491
movq %r15, %rdi
callq 0x9570
movq %rax, %rdi
callq 0x94f0
movq %r15, %rdi
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x95b0
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/ebwt_search.cpp
// Function: steal_thread(int, int)
static bool steal_thread(int pid, int orig_nthreads) {
	int ncpu = thread_ceiling;
	if(thread_ceiling <= nthreads) {
		return false;
	}
	int num_pids = 0;
	int lowest_pid = read_dir(thread_stealing_dir.c_str(), &num_pids);
	if(lowest_pid != pid) {
		return false;
	}
	int in_use = ((num_pids-1) * orig_nthreads) + nthreads; //in_use is now baseline + ours
	float spare = ncpu - in_use;
	int spare_r = floor(spare);
	float r = rand() % 100/100.0;
	if(r <= (spare - spare_r)) {
		spare_r = ceil(spare);
	}
	return spare_r > 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x51107(%rip), %ebx     # 0x652a4
cmpl 0x510f9(%rip), %ebx     # 0x6529c
jle 0x142a1
movl %edi, %ebp
movl %esi, 0x10(%rsp)
xorl %eax, %eax
cmpb $0x0, 0x51058(%rip)     # 0x65210
movq 0x50ed9(%rip), %r15     # 0x65098
movl $0xc8, %edi
cmoveq %rax, %rdi
pushq $0x1
popq %rsi
callq 0x92f0
movq %rax, %r14
movq %r15, %rdi
callq 0x9770
testq %rax, %rax
je 0x142b2
movq %rax, %r15
movl %ebp, 0x14(%rsp)
pushq $-0x1
popq %rax
movl %eax, 0xc(%rsp)
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x9290
testq %rax, %rax
je 0x14257
movq %rax, %r12
cmpb $0x2e, 0x13(%rax)
je 0x141f4
addq $0x13, %r12
movq %r12, %rdi
callq 0x97b0
movl %eax, %r13d
movq %r14, %rdi
leaq 0x36ef3(%rip), %rsi     # 0x4b116
movq %r12, %rdx
xorl %eax, %eax
callq 0x90c0
movl %r13d, %edi
xorl %esi, %esi
callq 0x96e0
testl %eax, %eax
jne 0x141f4
incl %ebp
movl 0xc(%rsp), %ecx
cmpl %ecx, %r13d
movl %ecx, %eax
cmovll %r13d, %eax
cmpl $-0x1, %ecx
cmovel %r13d, %eax
movl %eax, 0xc(%rsp)
jmp 0x141f4
movq %r15, %rdi
callq 0x9830
pushq $0x1
popq %r15
subl %ebp, %r15d
movl 0x14(%rsp), %ebp
movl 0xc(%rsp), %r12d
movq %r14, %rdi
callq 0x95b0
cmpl %ebp, %r12d
jne 0x142a1
imull 0x10(%rsp), %r15d
addl %ebx, %r15d
subl 0x51010(%rip), %r15d    # 0x6529c
cvtsi2ss %r15d, %xmm0
cvttss2si %xmm0, %ebx
callq 0x9130
testl %ebx, %ebx
setg %al
jmp 0x142a3
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x382bc(%rip), %rdi     # 0x4c575
callq 0x9420
pushq $-0x1
popq %r12
pushq $0x1
popq %r15
jmp 0x1426f
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/ebwt_search.cpp
// Function: createPatsrcFactory(PatternComposer&, int, unsigned int)
static PatternSourcePerThreadFactory*
createPatsrcFactory(PatternComposer& _patsrc, int tid, uint32_t max_buf) {
	PatternSourcePerThreadFactory *patsrcFact;
	patsrcFact = new PatternSourcePerThreadFactory(_patsrc, max_buf, skipReads, seed);
	assert(patsrcFact != NULL);
	return patsrcFact;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x9500
movl 0x51021(%rip), %ecx     # 0x65300
movl 0x50f77(%rip), %edx     # 0x6525c
leaq 0x4c834(%rip), %rsi     # 0x60b20
movq %rsi, (%rax)
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
movl %ecx, 0x14(%rax)
movl %edx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq