LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/shangjingbo1226[P]MACFP/src/methods/../utils/suffix_array.h
// Function: SuffixArray::c12(int, int*, long long, long long)
int c12(int k, int *r, long long a, long long b) {
        if (k == 2) {
            return r[a] < r[b] || r[a] == r[b] && c12(1, r, a + 1, b + 1);
        } else {
            return r[a] < r[b] || r[a] == r[b] && wv[a + 1] < wv[b + 1];
        }
    }

// Assembly:
movl (%rdx,%rcx,4), %r9d
movl (%rdx,%r8,4), %r10d
movb $0x1, %al
cmpl $0x2, %esi
jne 0x657c
cmpl %r10d, %r9d
jl 0x6597
jne 0x6595
pushq %rax
incq %rcx
incq %r8
pushq $0x1
popq %rsi
callq 0x654c
testl %eax, %eax
setne %al
addq $0x8, %rsp
jmp 0x6597
cmpl %r10d, %r9d
jl 0x6597
jne 0x6595
movq 0x70(%rdi), %rax
movl 0x4(%rax,%rcx,4), %ecx
cmpl 0x4(%rax,%r8,4), %ecx
setl %al
jmp 0x6597
xorl %eax, %eax
movzbl %al, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/akshithasriraman[P]Accelerometer/run.cc
// Function: ExecuteShellCommand[abi:cxx11](char const*)
std::string ExecuteShellCommand(const char* cmd)
{
    char buffer[128];
    std::string result = "";
    std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);
    if (!pipe) throw std::runtime_error("popen() failed!");
    while (!feof(pipe.get())) {
        if (fgets(buffer, 128, pipe.get()) != NULL)
            result += buffer;
    }
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1263(%rip), %rsi      # 0x3588
movq %rsp, %rdx
callq 0x26a6
leaq 0xcd0(%rip), %rsi       # 0x3004
movq %r14, %rdi
callq 0x2040
movq 0x2c8d(%rip), %rdx      # 0x4fd0
movq %rsp, %rdi
movq %rax, %rsi
callq 0x27fe
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x23a6
leaq 0x10(%rsp), %r14
callq 0x2170
testl %eax, %eax
jne 0x238c
movq (%rsp), %rdx
movq %r14, %rdi
movl $0x80, %esi
callq 0x2180
testq %rax, %rax
je 0x2386
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%rsp), %rdi
jmp 0x235c
leaq 0x8(%rsp), %rdi
callq 0x26e2
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %r15
leaq 0xc4e(%rip), %rsi       # 0x3006
movq %rax, %rdi
callq 0x2060
movq 0x2c29(%rip), %rsi      # 0x4ff0
movq 0x2bea(%rip), %rdx      # 0x4fb8
movq %r15, %rdi
callq 0x21a0
jmp 0x23ea
movq %rax, %r14
movq %r15, %rdi
callq 0x20c0
jmp 0x23ed
movq %rax, %r14
jmp 0x23f7
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x26e2
movq %rbx, %rdi
callq 0x2090
movq %r14, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: add_message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void add_message(std::string msg)
{
	//if(msg.length() > viewport_width) return 1;
	rlmessages.push_back(msg);
	std::string word_so_far = "";
	for(unsigned int i=0; i<msg.length();i++)
	{
		if(msg[i] == ' ' || msg[i] == '\t' || msg[i] == '\n')
		{
			rlmessage_words.push_back(word_so_far);
			word_so_far = "";
		}
		else
		{
			word_so_far = word_so_far + msg[i];
		}
	}
	rlmessage_words.push_back(word_so_far);
	//return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x655b2(%rip), %rdi     # 0x6b238
movq %rbx, %rsi
callq 0x10c84
leaq 0x10427(%rip), %rsi     # 0x160bc
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x5110
xorl %ebp, %ebp
movabsq $0x100000600, %r14      # imm = 0x100000600
leaq 0x65593(%rip), %r13     # 0x6b250
movl %ebp, %ebp
cmpq %rbp, 0x8(%rbx)
jbe 0x5d19
movq (%rbx), %rax
movzbl (%rax,%rbp), %eax
cmpq $0x20, %rax
ja 0x5cf4
btq %rax, %r14
jae 0x5cf4
movq %r13, %rdi
movq %r15, %rsi
callq 0x10c84
movq %r15, %rdi
leaq 0x103cf(%rip), %rsi     # 0x160bc
callq 0x53f0
jmp 0x5d15
movsbl %al, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x10cb0
movq %r15, %rdi
movq %r12, %rsi
callq 0x52e0
movq %r12, %rdi
callq 0x5418
incl %ebp
jmp 0x5cbd
leaq 0x65530(%rip), %rdi     # 0x6b250
leaq 0x8(%rsp), %rsi
callq 0x10c84
leaq 0x8(%rsp), %rdi
callq 0x5418
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5d47
jmp 0x5d47
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_text_wodge(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void draw_text_wodge(std::string s)
{
	int lines = (int)ceil(((float)s.length())/viewport_width);
	attron(COLOR_PAIR(COLOR_WHITE));
	mvaddstr(lines-1,0,std::string(viewport_width,' ').c_str());
	for(int i=0;i<lines;i++)
	{
		mvaddstr(i,0,(s.substr(viewport_width*i,viewport_width).c_str()));
	}
	//getch();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, (%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
js 0x6986
cvtsi2ss %rax, %xmm0
jmp 0x699b
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
divss 0xd665(%rip), %xmm0     # 0x14008
callq 0x5190
cvttss2si %xmm0, %r12d
movq 0x17624(%rip), %rbp     # 0x1dfd8
movq (%rbp), %rdi
xorl %r14d, %r14d
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movq (%rbp), %rdi
leal -0x1(%r12), %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x6a13
movq (%rbp), %r15
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
pushq $0x31
popq %rsi
pushq $0x20
popq %rdx
callq 0x52a0
movq 0x8(%rsp), %rsi
pushq $-0x1
popq %rdx
movq %r15, %rdi
callq 0x50d0
leaq 0x8(%rsp), %rdi
callq 0x5418
testl %r12d, %r12d
cmovlel %r14d, %r12d
leaq 0x8(%rsp), %r15
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x6a71
movq (%rbp), %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x5260
cmpl $-0x1, %eax
je 0x6a68
movq (%rbp), %rbx
movq %r15, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
pushq $0x31
popq %rcx
callq 0x5250
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x50d0
movq %r15, %rdi
callq 0x5418
incq %r13
addq $0x31, %r14
jmp 0x6a22
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6a87
movq %rax, %rbx
jmp 0x6a94
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_last_msg()
void draw_last_msg()
{
	//attron(COLOR_PAIR(COLOR_WHITE));
	clear_area(0,0,viewport_width,message_area_height+1);
	pretty_print_message_words();
	/*std::string s = "";
	for(unsigned int i = last_message_seen; i < rlmessages.size(); i++)
	{
		s += rlmessages[i]; s += " ";
	}
	pretty_print(s);
	last_message_seen = std::max(last_message_seen,(int)rlmessages.size()-2);*/
	last_word_seen  = (int)rlmessage_words.size()-1;
	//mvaddstr(0,0,padmsg(rlmessages.back()).c_str());
}

// Assembly:
pushq %rax
pushq $0x31
popq %rdx
pushq $0x7
popq %rcx
xorl %edi, %edi
xorl %esi, %esi
callq 0x6a9c
callq 0x5d5c
movq 0x64704(%rip), %rax     # 0x6b258
subq 0x646f5(%rip), %rax     # 0x6b250
shrq $0x5, %rax
decl %eax
movl %eax, 0x64705(%rip)     # 0x6b26c
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: random_start_cluster[abi:cxx11]()
std::string random_start_cluster()
{
	switch (rand()%10)
	{
	case 0: case 1: case 2: case 3:
		return clusters_1[rand()%vclusters_1.size()];
	case 4: case 5: case 6:
		return start_clusters_2[rand()%vstart_clusters_2.size()];
	default:
		return start_clusters_3[rand()%vstart_clusters_3.size()];
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x5080
pushq $0xa
popq %rcx
cltd
idivl %ecx
cmpl $0x4, %edx
jae 0x6bb1
callq 0x5080
movq 0x648ab(%rip), %rcx     # 0x6b438
subq 0x6489c(%rip), %rcx     # 0x6b430
cltq
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x167ea(%rip), %rax     # 0x1d390
movq (%rax,%rdx,8), %rsi
leaq 0xf(%rsp), %rdx
jmp 0x6c17
addl $-0x4, %edx
cmpl $0x3, %edx
jae 0x6be9
callq 0x5080
movq 0x6488b(%rip), %rcx     # 0x6b450
subq 0x6487c(%rip), %rcx     # 0x6b448
cltq
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x16852(%rip), %rax     # 0x1d430
movq (%rax,%rdx,8), %rsi
leaq 0xe(%rsp), %rdx
jmp 0x6c17
callq 0x5080
movq 0x64873(%rip), %rcx     # 0x6b468
subq 0x64864(%rip), %rcx     # 0x6b460
cltq
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x16d02(%rip), %rax     # 0x1d910
movq (%rax,%rdx,8), %rsi
leaq 0xd(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: random_vowel[abi:cxx11]()
std::string random_vowel()
{
	switch (rand()%5)
	{
	case 0: case 1: case 2:
		return pure_vowels[rand()%vpure_vowels.size()];
	default:
		return diphthongs[rand()%vdiphthongs.size()];
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5080
pushq $0x5
popq %rcx
cltd
idivl %ecx
movl %edx, %ebp
callq 0x5080
cltq
cmpl $0x2, %ebp
ja 0x6c70
movq 0x64832(%rip), %rcx     # 0x6b480
subq 0x64823(%rip), %rcx     # 0x6b478
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x16cfb(%rip), %rax     # 0x1d960
movq (%rax,%rdx,8), %rsi
leaq 0x7(%rsp), %rdx
jmp 0x6c97
movq 0x64821(%rip), %rcx     # 0x6b498
subq 0x64812(%rip), %rcx     # 0x6b490
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x16d12(%rip), %rax     # 0x1d9a0
movq (%rax,%rdx,8), %rsi
leaq 0x6(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: random_end_cluster[abi:cxx11]()
std::string random_end_cluster()
{
	switch (rand()%7)
	{
	case 0: case 1: case 2: case 3:
		return clusters_1[rand()%vclusters_1.size()];
	default://case 4: case 5: case 6:
		return end_clusters_2[rand()%vend_clusters_2.size()];
	//default:
	//	return start_clusters_3[rand()%start_clusters_3->length()];
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5080
pushq $0x7
popq %rcx
cltd
idivl %ecx
movl %edx, %ebp
callq 0x5080
cltq
cmpl $0x3, %ebp
ja 0x6cf1
movq 0x64769(%rip), %rcx     # 0x6b438
subq 0x6475a(%rip), %rcx     # 0x6b430
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x166aa(%rip), %rax     # 0x1d390
movq (%rax,%rdx,8), %rsi
leaq 0x7(%rsp), %rdx
jmp 0x6d18
movq 0x647b8(%rip), %rcx     # 0x6b4b0
subq 0x647a9(%rip), %rcx     # 0x6b4a8
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
leaq 0x16d71(%rip), %rax     # 0x1da80
movq (%rax,%rdx,8), %rsi
leaq 0x6(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: random_syllable[abi:cxx11]()
std::string random_syllable()
{
	std::string syl = "";
	switch (rand()%5)
	{
	case 0:
		return random_vowel() + random_end_cluster();
	case 1:
		return random_start_cluster() + random_vowel();
	default:
		return random_start_cluster() + random_vowel() + random_end_cluster();
	}
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0xf380(%rip), %rsi      # 0x160bc
leaq 0x80(%rsp), %rdi
movq %rsp, %rdx
callq 0x5110
callq 0x5080
pushq $0x5
popq %rcx
cltd
idivl %ecx
cmpl $0x1, %edx
je 0x6d84
testl %edx, %edx
jne 0x6db5
movq %rsp, %rdi
callq 0x6c28
leaq 0x20(%rsp), %rdi
callq 0x6ca9
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x10ebd
jmp 0x6da6
movq %rsp, %rdi
callq 0x6b69
leaq 0x20(%rsp), %rdi
callq 0x6c28
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x10ebd
leaq 0x20(%rsp), %rdi
callq 0x5418
movq %rsp, %rdi
jmp 0x6e16
leaq 0x20(%rsp), %rdi
callq 0x6b69
leaq 0x60(%rsp), %rdi
callq 0x6c28
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x10ebd
leaq 0x40(%rsp), %rdi
callq 0x6ca9
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x10ebd
leaq 0x40(%rsp), %rdi
callq 0x5418
movq %rsp, %rdi
callq 0x5418
leaq 0x60(%rsp), %rdi
callq 0x5418
leaq 0x20(%rsp), %rdi
callq 0x5418
leaq 0x80(%rsp), %rdi
callq 0x5418
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5418
jmp 0x6e46
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5418
jmp 0x6e53
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x5418
jmp 0x6e73
jmp 0x6e61
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5418
jmp 0x6e7f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x6e82
jmp 0x6e7c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5418
jmp 0x6e90
jmp 0x6e8d
jmp 0x6e8d
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: init_human_sp()
void init_human_sp()
{
		species* human = new species();
	human->id = 0;
	human->health_range = 0; human->min_health = 100;
	human->ch = '@';
	human->psychic_range=0; human->hearing_thres = 1.0f;
	human->hearing_adapt = 0.5f;
	human->smell_clarity = 0.1f; human->vis_range = 8;
	human->syl1 = "hu"; human->syl2 = "man";
	human->name = "human";
	human->colour = COLOR_WHITE;
	human->damage = 1;
	human->walk_energy = 10;
	human->run_energy = 19;
	human->stamina = 1200;
	human->body_sections = 7;
	human->body_sections_tried = human->body_sections - 1;
	human->crit_part_name = "head";
	human->crit_known = true;
	human->size = 1;
	
	
	human->description = "A legendary advanced alien race whose technology is built specifically for murder, ecological destruction, deception, and gentle shaking. Members of this species must be killed immediately upon discovery to prevent catastrophic damage to the whole area.";
	zoo.push_back(human);
	human_sp = human;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x150, %edi            # imm = 0x150
callq 0x5230
movq %rax, %rbx
movl $0x150, %edx            # imm = 0x150
movq %rax, %rdi
xorl %esi, %esi
callq 0x5180
movq %rbx, %rdi
callq 0x10f24
movabsq $0x6400000000, %rax     # imm = 0x6400000000
movq %rax, (%rbx)
andl $0x0, 0x8(%rbx)
leaq 0x8(%rsp), %r14
movq %rbx, (%r14)
movb $0x40, 0x24(%rbx)
movq $0x3f000000, 0x1c(%rbx) # imm = 0x3F000000
movsd 0xd1b2(%rip), %xmm0     # 0x140b0
movsd %xmm0, 0x14(%rbx)
movl $0x8, 0x10(%rbx)
leaq 0xb0(%rbx), %rdi
leaq 0xd7f1(%rip), %rsi      # 0x14709
callq 0x53f0
leaq 0xd0(%rbx), %rdi
leaq 0xd7e3(%rip), %rsi      # 0x1470e
callq 0x53f0
leaq 0xf0(%rbx), %rdi
leaq 0xd7ce(%rip), %rsi      # 0x1470c
callq 0x53f0
pushq $0x1
popq %rbp
movl %ebp, 0xc(%rbx)
movaps 0xd170(%rip), %xmm0     # 0x140c0
movups %xmm0, 0x28(%rbx)
movabsq $0x600000007, %rax      # imm = 0x600000007
movq %rax, 0x3c(%rbx)
leaq 0x130(%rbx), %rdi
leaq 0xd7a2(%rip), %rsi      # 0x14712
callq 0x53f0
movb $0x1, 0x44(%rbx)
movl %ebp, 0x38(%rbx)
addq $0x110, %rbx            # imm = 0x110
leaq 0xd78d(%rip), %rsi      # 0x14717
movq %rbx, %rdi
callq 0x53f0
leaq 0x64457(%rip), %rdi     # 0x6b3f0
movq %r14, %rsi
callq 0x10fe0
movq (%r14), %rax
movq %rax, 0x6447d(%rip)     # 0x6b428
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: random_occupiable_square_away_from_player()
std::pair<int,int> random_occupiable_square_away_from_player()
{
	int target_x = rand()%MAP_SIZE; int target_y = rand()%MAP_SIZE;
	while((map_terrain[target_x][target_y] != DIRT && map_terrain[target_x][target_y] != FLOOR) || d22(target_x,target_y,p_ptr->x,p_ptr->y) <= (vis_range+2)*(vis_range+2))
	{
		target_x = rand()%MAP_SIZE; target_y = rand()%MAP_SIZE;
	}
	return std::make_pair(target_x,target_y);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x96, %ebp
leaq 0x15277(%rip), %r14     # 0x1e340
callq 0x5080
movl %eax, %ebx
callq 0x5080
movl %eax, %esi
movl %ebx, %eax
cltd
idivl %ebp
movl %edx, %ecx
movl %esi, %eax
cltd
idivl %ebp
movslq %ecx, %rax
movslq %edx, %rsi
imulq $0x258, %rax, %rax      # imm = 0x258
addq %r14, %rax
movl (%rax,%rsi,4), %eax
cmpl $0x3, %eax
je 0x90ff
testl %eax, %eax
jne 0x90c9
movq 0x623da(%rip), %rax     # 0x6b4e0
movl 0x20(%rax), %esi
movl %ecx, %edi
subl %esi, %edi
imull %edi, %edi
movl 0x24(%rax), %eax
movl %edx, %esi
subl %eax, %esi
imull %esi, %esi
addl %edi, %esi
cmpl $0x65, %esi
jb 0x90c9
shlq $0x20, %rdx
movl %ecx, %eax
orq %rdx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: react_to_noise(actor*, noise*, int, int)
void react_to_noise(actor* a,noise* n,int xx, int yy)
{
	if(a->is_player)
	{
		sound_this_turn = n->describe;
		if(on_map(xx,yy))
		{
			int dx = xx-a->x; int dy = yy-a->y;
			if(dx != 0)
			{
				float t = 180*atan(float(dy)/(float)dx)/PI;
				if(t<-67.5)
				{dir_this_turn = (dx>0?"North":"South");}
				else if(t<-22.5)
				{dir_this_turn = (dx>0?"NEast":"SWest");}
				else if(t<22.5)
				{dir_this_turn = (dx>0?"East":"West");}
				else if(t<67.5)
				{dir_this_turn = (dx>0?"SEast":"NWest");}
				else {dir_this_turn = (dx>0?"South":"North");}
			}
			else
			{
				if(dy == 0)
				{
					dir_this_turn = "here";
				}
				else {dir_this_turn = (dy>0)?"South":"North";}
			}
		}
		else{dir_this_turn = "???";}
	}
	else if(!a->is_hologram)
	{
		if(n->scary)
		{
			if(a->sspecies->size != 2)
			{
			a->runaway_x = xx;
			a->runaway_y = yy;
			}
		}
		else
		{
			if(!a->certain)
			{
				a->ai_x = xx;
				a->ai_y = yy;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movl %edx, %ebx
movq %rdi, %r14
cmpb $0x1, 0x8(%rdi)
jne 0x9192
addq $0x8, %rsi
leaq 0xba30d(%rip), %rdi     # 0xc3458
callq 0x5170
movl %ebp, %eax
orl %ebx, %eax
js 0x919e
movl $0x96, %eax
cmpl %eax, %ebx
setge %cl
cmpl %eax, %ebp
setge %al
orb %cl, %al
jne 0x919e
movl 0x24(%r14), %ecx
movl %ebp, %eax
subl %ecx, %eax
subl 0x20(%r14), %ebx
jne 0x91db
cmpl %ecx, %ebp
jne 0x921b
leaq 0xba2f2(%rip), %rdi     # 0xc3478
leaq 0xb999(%rip), %rsi      # 0x14b26
jmp 0x9293
cmpb $0x0, 0x9(%r14)
je 0x91b1
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xba2d3(%rip), %rdi     # 0xc3478
leaq 0xb97f(%rip), %rsi      # 0x14b2b
jmp 0x9293
cmpb $0x1, 0x28(%rsi)
jne 0x91ca
movq (%r14), %rax
cmpl $0x2, 0x38(%rax)
je 0x9199
movl %ebx, 0x30(%r14)
movl %ebp, 0x34(%r14)
jmp 0x9199
cmpb $0x0, 0x1d(%r14)
jne 0x9199
movl %ebx, 0x28(%r14)
movl %ebp, 0x2c(%r14)
jmp 0x9199
cvtsi2ss %eax, %xmm0
cvtsi2ss %ebx, %xmm1
divss %xmm1, %xmm0
callq 0x51d0
mulss 0xae70(%rip), %xmm0     # 0x14064
divss 0xae6c(%rip), %xmm0     # 0x14068
movss 0xae68(%rip), %xmm1     # 0x1406c
ucomiss %xmm0, %xmm1
jbe 0x922d
testl %ebx, %ebx
leaq 0xb8f0(%rip), %rax      # 0x14b02
leaq 0xb8ef(%rip), %rsi      # 0x14b08
jmp 0x9288
testl %eax, %eax
leaq 0xb8e4(%rip), %rax      # 0x14b08
leaq 0xb8d7(%rip), %rsi      # 0x14b02
jmp 0x9288
movss 0xae3b(%rip), %xmm1     # 0x14070
ucomiss %xmm0, %xmm1
jbe 0x924c
testl %ebx, %ebx
leaq 0xb8cb(%rip), %rax      # 0x14b0e
leaq 0xb8ca(%rip), %rsi      # 0x14b14
jmp 0x9288
movss 0xae20(%rip), %xmm1     # 0x14074
ucomiss %xmm0, %xmm1
jbe 0x926b
testl %ebx, %ebx
leaq 0xb8ad(%rip), %rax      # 0x14b0f
leaq 0xb8b8(%rip), %rsi      # 0x14b21
jmp 0x9288
movss 0xae05(%rip), %xmm1     # 0x14078
ucomiss %xmm0, %xmm1
jbe 0x929c
testl %ebx, %ebx
leaq 0xb899(%rip), %rax      # 0x14b1a
leaq 0xb898(%rip), %rsi      # 0x14b20
cmovgq %rax, %rsi
leaq 0xba1e5(%rip), %rdi     # 0xc3478
popq %rbx
popq %r14
popq %rbp
jmp 0x53f0
testl %ebx, %ebx
jmp 0x921d
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: count_inv_devices(int)
int count_inv_devices(int dev_type)
{
	int ret = 0;
	for(int i=0; i<DEVICE_CONFIGURATIONS;i++)
	{
		ret += dev_inv[dev_type][i].size();
	}
	return ret;
}

// Assembly:
movslq %edi, %rax
movq 0xb9fbd(%rip), %rcx     # 0xc3440
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rcx
xorl %eax, %eax
pushq $0x8
popq %rdx
cmpq $0x50, %rdx
je 0x94ab
movq (%rcx,%rdx), %rsi
subq -0x8(%rcx,%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %eax
addq $0x18, %rdx
jmp 0x9490
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: total_inv_devices()
int total_inv_devices()
{
	int ret = 0;
	for(int i=0;i<DEVICE_TYPES;i++)
		ret += count_inv_devices(i);
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %ebp, %ebp
cmpl $0x6, %ebp
je 0x94c5
movl %ebp, %edi
callq 0x9479
addl %eax, %ebx
incl %ebp
jmp 0x94b3
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: nearby_home_for_item(int, int)
std::pair<int,int> nearby_home_for_item(int x,int y)
{
	if(map_items[x][y] == NULL && !(map_terrain[x][y]==WALL))
	{
		return std::make_pair(x,y);
	}
	for(int d=0;d<8;d++)
	{
		std::pair<int,int> dir = directions[d];
		int xx = x+dir.first; int yy =y+dir.second;
		if(map_items[xx][yy] == NULL && !(map_terrain[xx][yy]==WALL))
		{
			return std::make_pair(xx,yy);
		}
	}
	return std::make_pair(-1,-1);

}

// Assembly:
movslq %edi, %rcx
movslq %esi, %rdx
imulq $0x4b0, %rcx, %rax      # imm = 0x4B0
leaq 0x8dfde(%rip), %r8      # 0x974c0
addq %r8, %rax
cmpq $0x0, (%rax,%rdx,8)
leaq 0x14e4f(%rip), %r9      # 0x1e340
jne 0x9503
imulq $0x258, %rcx, %rax      # imm = 0x258
addq %r9, %rax
cmpl $0x4, (%rax,%rdx,4)
jne 0x955f
pushq %rbx
xorl %esi, %esi
movabsq $-0x1, %rax
leaq 0xaf99(%rip), %rdi      # 0x144b0
cmpq $0x8, %rsi
je 0x955d
movslq (%rdi,%rsi,8), %r11
movslq 0x4(%rdi,%rsi,8), %r10
addq %rcx, %r11
addq %rdx, %r10
imulq $0x4b0, %r11, %rbx      # imm = 0x4B0
addq %r8, %rbx
cmpq $0x0, (%rbx,%r10,8)
jne 0x954e
imulq $0x258, %r11, %rbx      # imm = 0x258
addq %r9, %rbx
cmpl $0x4, (%rbx,%r10,4)
jne 0x9553
incq %rsi
jmp 0x9517
shlq $0x20, %r10
movl %r11d, %eax
orq %r10, %rax
popq %rbx
retq
shlq $0x20, %rsi
movl %edi, %eax
orq %rsi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: item_to_location(item*, int, int)
void item_to_location(item* a, int x, int y)
{
	if(a->player_has)
	{
		inv_remove(a);
		a->player_has = false;
	}
	std::pair<int,int> place_here = nearby_home_for_item(x,y);
	if(place_here != std::make_pair(-1,-1))
	{
		map_items[place_here.first][place_here.second] = a;
		a->x = place_here.first; a->y = place_here.second;
	}
	else
	{
		add_message("Abnormal item placement! Maybe it's in a wall, maybe it just squashed another item.");
		//draw_last_msg();
		map_items[x][y] = a;
		a->x = x; a->y = y;
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpb $0x1, 0x98(%rdi)
jne 0x95b9
movq %rbx, %rdi
callq 0x9569
movb $0x0, 0x98(%rbx)
movl %r14d, %edi
movl %ebp, %esi
callq 0x94ce
movq %rax, %rcx
shrq $0x20, %rcx
cmpl $-0x1, %eax
sete %dl
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpq %rsi, %rcx
sete %sil
testb %sil, %dl
jne 0x9604
movslq %eax, %rdx
movq %rax, %rsi
sarq $0x20, %rsi
imulq $0x4b0, %rdx, %rdx      # imm = 0x4B0
leaq 0x8dec7(%rip), %rdi     # 0x974c0
addq %rdx, %rdi
leaq (%rdi,%rsi,8), %rdx
movl %ecx, %ebp
jmp 0x964d
leaq 0xb524(%rip), %rsi      # 0x14b2f
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x5110
movq %r15, %rdi
callq 0x5c6e
leaq 0x8(%rsp), %rdi
callq 0x5418
movslq %r14d, %rax
movslq %ebp, %rcx
imulq $0x4b0, %rax, %rax      # imm = 0x4B0
leaq 0x8de7d(%rip), %rdx     # 0x974c0
addq %rax, %rdx
leaq (%rdx,%rcx,8), %rdx
movl %r14d, %eax
movq %rbx, (%rdx)
movl %eax, 0x90(%rbx)
movl %ebp, 0x94(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: device_to_inventory(item*)
void device_to_inventory(item* a)
{
	if(!a->player_has)
	{
		map_items[a->x][a->y] = NULL;
		a->player_has = true;
		dev_inv[a->device_type][a->configuration].push_back(a);
	}

}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
cmpb $0x0, 0x98(%rdi)
jne 0x96db
movslq 0x90(%rdi), %rax
movslq 0x94(%rdi), %rcx
imulq $0x4b0, %rax, %rax      # imm = 0x4B0
leaq 0x8de1a(%rip), %rdx     # 0x974c0
addq %rax, %rdx
andq $0x0, (%rdx,%rcx,8)
movb $0x1, 0x98(%rdi)
movslq 0x70(%rdi), %rax
movq 0xb9d80(%rip), %rcx     # 0xc3440
imulq $0x18, %rax, %rax
movslq 0x8c(%rdi), %rdx
imulq $0x18, %rdx, %rdi
addq (%rcx,%rax), %rdi
movq %rsp, %rsi
callq 0x110cc
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: add_junk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char, int, int, int)
void add_junk(std::string name, std::string description, char ch, int colour, int x, int y)
{
	item* it = new item();
	it->projection = NULL;
	it->colour = colour;
	it->ch = ch;
	it->device_type = NOT_DEVICE;
	it->name = name;
	it->description = description;
	it->base_description = "";
	it->player_has = false;
	items.push_back(it);
	item_to_location(it,x,y);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, 0x8(%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movl $0xa0, %edi
callq 0x5230
movq %rax, %r14
movl $0xa0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x5180
movq %r14, %rdi
callq 0x110ea
andq $0x0, (%r14)
leaq 0x10(%rsp), %r13
movq %r14, (%r13)
movl %ebx, 0x8(%r14)
movb %bpl, 0xc(%r14)
orl $-0x1, 0x70(%r14)
leaq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x5170
leaq 0x30(%r14), %rdi
movq %r15, %rsi
callq 0x5170
leaq 0x50(%r14), %rdi
leaq 0xc95c(%rip), %rsi      # 0x160bc
callq 0x53f0
movb $0x0, 0x98(%r14)
leaq 0xb9c84(%rip), %rdi     # 0xc33f8
movq %r13, %rsi
callq 0x110cc
movq (%r13), %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x958f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: add_actor(species*, bool, int, int, bool)
actor* add_actor(species* sp, bool p, int xx, int yy,bool hologram=false)
{
	actor* a = new actor();
	a->is_hologram = hologram;
	a->sspecies = sp;
	a->is_player = p;
	a->dead = false;
	a->running = false;
	a->stamina = sp->stamina;
	a->energy = 100*(int)(p);

	a->x = xx;
	a->y = yy;
	a->certain = false;
	a->ai_x = xx;
	a->ai_y = yy;
	a->most_noticeable_sound = 0.0f;
	a->runaway_x = -500;
	a->runaway_y = -500;
	actors.push_back(a);
	if(!hologram)
	{
	map_occupants[xx][yy] = a;
	}
	a->health = (sp->health_range? rand()%(sp->health_range):0)+sp->min_health;
	a->sound_threshold = a->sspecies->hearing_thres;
	if(hologram)
	{
		holograms.push_back(a);
	}
	return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
pushq $0x48
popq %rdi
callq 0x5230
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
andq $0x0, 0x40(%rax)
movaps %xmm0, 0x30(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movb %bl, 0x9(%rax)
movq %r14, (%rax)
movb %r12b, 0x8(%rax)
movb $0x0, 0x14(%rax)
testl %r12d, %r12d
pushq $0x64
popq %rcx
cmovel %r12d, %ecx
movl 0x34(%r14), %edx
movl %edx, 0x18(%rax)
movl %ecx, 0x10(%rax)
movl %r15d, 0x20(%rax)
movl %ebp, 0x24(%rax)
movl %r15d, 0x28(%rax)
movl %ebp, 0x2c(%rax)
movabsq $-0x1f3000001f4, %rcx   # imm = 0xFFFFFE0CFFFFFE0C
movq %rcx, 0x30(%rax)
leaq 0xb9bbe(%rip), %rdi     # 0xc33e0
callq 0x1111e
testl %ebx, %ebx
jne 0x984b
movq 0x8(%rsp), %rax
movslq %r15d, %rcx
movslq %ebp, %rdx
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
leaq 0x61cac(%rip), %rsi     # 0x6b4f0
addq %rcx, %rsi
movq %rax, (%rsi,%rdx,8)
cmpl $0x0, 0x8(%r14)
je 0x985e
callq 0x5080
cltd
idivl 0x8(%r14)
jmp 0x9860
xorl %edx, %edx
addl 0x4(%r14), %edx
movq 0x8(%rsp), %rax
movl %edx, 0xc(%rax)
movq (%rax), %rcx
movss 0x18(%rcx), %xmm0
movss %xmm0, 0x3c(%rax)
testb %bl, %bl
je 0x9894
leaq 0xb9b8c(%rip), %rdi     # 0xc3410
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x1111e
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: five_tries_to_make_room(std::pair<int, int>, int, int)
std::pair<int,int> five_tries_to_make_room(std::pair<int,int> xy, int xcentre, int ycentre)
{
	for(int i=0;i<5;i++)
	{
		std::pair<int,int> ret = can_make_room(xy,xcentre, ycentre);
		if(ret != std::make_pair(0,0)) return ret;
	}
	return std::make_pair(0,0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
pushq $0x6
popq %r12
xorl %ebx, %ebx
decl %r12d
je 0x9ff8
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x9d0f
testq %rax, %rax
je 0x9fde
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: player_in_ship()
bool player_in_ship()
{
	bool player_present = false;
	for(int i=ship_x-1;i<ship_x +2;i++)
	{
		for(int j=ship_y-1;j<ship_y+2;j++)
		{
			actor* a = map_occupants[i][j];
			if(a != NULL)
			{
				if(a->is_player)
				{
					player_present = true;
				}
			}
		}

	}
	actor* a = map_occupants[ship_x-2][ship_y];
	if(a != NULL)
	{
		if(a->is_player)
		{
			player_present = true;
		}
	}
	return player_present;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x61072(%rip), %rcx     # 0x6b1fc
leal -0x1(%rcx), %eax
leaq 0x2(%rcx), %rsi
movslq 0x61068(%rip), %rdx     # 0x6b200
leal -0x1(%rdx), %r8d
leaq 0x2(%rdx), %rdi
movslq %r8d, %r8
movslq %eax, %r10
imulq $0x4b0, %r10, %rax      # imm = 0x4B0
leaq (%rax,%r8,8), %r11
leaq 0x61338(%rip), %r9      # 0x6b4f0
addq %r9, %r11
xorl %eax, %eax
cmpq %rsi, %r10
jge 0xa1ee
movq %r11, %rbx
movq %r8, %r14
cmpq %rdi, %r14
jge 0xa1e2
movq (%rbx), %r15
testq %r15, %r15
je 0xa1d9
orb 0x8(%r15), %al
incq %r14
addq $0x8, %rbx
jmp 0xa1c8
incq %r10
addq $0x4b0, %r11            # imm = 0x4B0
jmp 0xa1bd
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %r9, %rcx
movq -0x960(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xa208
orb 0x8(%rcx), %al
andb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: win_condition()
bool win_condition()
{
	if (!transmitter_destroyed) return false;
	bool player_present = false;
	bool monster_present = false;
	for(int i=ship_x-1;i<ship_x +2;i++)
	{
		for(int j=ship_y-1;j<ship_y+2;j++)
		{
			actor* a = map_occupants[i][j];
			if(a != NULL)
			{
				if(a->is_player)
				{
					player_present = true;
				}
				else return false;
			}
		}

	}
	actor* a = map_occupants[ship_x-2][ship_y];
	if(a != NULL)
	{
		if(a->is_player)
		{
			player_present = true;
		}
		else return false;
	}
	if(map_occupants[ship_x+2][ship_y] != NULL)
	{return false;}
	return player_present;
}

// Assembly:
cmpb $0x1, 0x1405d(%rip)     # 0x1e310
jne 0xa32a
pushq %r15
pushq %r14
pushq %rbx
movslq 0x60f3b(%rip), %rdi     # 0x6b1fc
leal -0x1(%rdi), %edx
leaq 0x2(%rdi), %rcx
movslq 0x60f31(%rip), %rax     # 0x6b200
leal -0x1(%rax), %esi
leaq 0x2(%rax), %r8
movslq %esi, %r9
movslq %edx, %r10
imulq $0x4b0, %r10, %rdx      # imm = 0x4B0
leaq (%rdx,%r9,8), %r11
leaq 0x61202(%rip), %rdx     # 0x6b4f0
addq %rdx, %r11
xorl %esi, %esi
cmpq %rcx, %r10
jge 0xa32d
movq %r11, %rbx
movq %r9, %r14
cmpq %r8, %r14
jge 0xa31e
movq (%rbx), %r15
testq %r15, %r15
je 0xa315
movb $0x1, %sil
cmpb $0x1, 0x8(%r15)
jne 0xa364
incq %r14
addq $0x8, %rbx
jmp 0xa2fe
incq %r10
addq $0x4b0, %r11            # imm = 0x4B0
jmp 0xa2f3
xorl %eax, %eax
retq
imulq $0x4b0, %rdi, %rdi      # imm = 0x4B0
addq %rdx, %rdi
movq -0x960(%rdi,%rax,8), %rdi
testq %rdi, %rdi
je 0xa34d
movb $0x1, %sil
cmpb $0x1, 0x8(%rdi)
jne 0xa364
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rdx
cmpq $0x0, (%rdx,%rax,8)
sete %al
andb %sil, %al
jmp 0xa366
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: update_device_desciption(item*)
void update_device_desciption(item* dev)
{
	dev->description = dev->name + ". " + dev->base_description + ". "+ vconfig_names[dev->configuration];
	char desc[500] = "";
	if(dev->configuration == ON_TIMER)
	{
		sprintf(desc, ", %.1f seconds remaining.", (float)dev->time_remaining/10);
		dev->description += std::string(desc);
	}
	else if(dev->configuration == ON_REMOTE)
	{
		sprintf(desc, ", wavelength %d.", dev->wavelength+1);
		dev->description += std::string(desc);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x260, %rsp            # imm = 0x260
movq %rdi, %r14
leaq 0x10(%rdi), %rsi
leaq 0x9cd6(%rip), %rdx      # 0x14987
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x11030
leaq 0x50(%r14), %rdx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x10ce6
leaq 0x9cb1(%rip), %rdx      # 0x14987
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x111b3
movslq 0x8c(%r14), %rdx
shlq $0x5, %rdx
addq 0x604d3(%rip), %rdx     # 0x6b1c8
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0x10ce6
leaq 0x30(%r14), %rbx
leaq 0x60(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x52e0
movq %r15, %rdi
callq 0x5418
movq %rsp, %rdi
callq 0x5418
leaq 0x20(%rsp), %rdi
callq 0x5418
leaq 0x40(%rsp), %rdi
callq 0x5418
leaq 0x60(%rsp), %rdi
movl $0x1f4, %edx            # imm = 0x1F4
xorl %esi, %esi
callq 0x5180
movl 0x8c(%r14), %eax
cmpl $0x2, %eax
je 0xada5
cmpl $0x1, %eax
jne 0xade4
cvtsi2ssl 0x7c(%r14), %xmm0
divss 0x931e(%rip), %xmm0     # 0x1408c
cvtss2sd %xmm0, %xmm0
leaq 0x9e0a(%rip), %rsi      # 0x14b83
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x5050
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
callq 0x5110
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x5400
jmp 0xaddc
movl 0x74(%r14), %edx
incl %edx
leaq 0x9deb(%rip), %rsi      # 0x14b9d
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x5050
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
callq 0x5110
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x5400
movq %rsp, %rdi
callq 0x5418
addq $0x260, %rsp            # imm = 0x260
popq %rbx
popq %r14
popq %r15
retq
jmp 0xadf3
movq %rax, %rbx
movq %rsp, %rdi
jmp 0xae26
jmp 0xadfd
movq %rax, %rbx
jmp 0xae2b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5418
jmp 0xae12
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5418
jmp 0xae21
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: destroy_item(item*)
void destroy_item(item* a)
{
	if (a->device_type != NOT_DEVICE)
	{
		if(a->player_has)
		{
			inv_remove(a);
		}
		else
		{
			map_items[a->x][a->y] = NULL;
		}
		if (a->configuration == ON_REMOTE)
		{
			rm_devices[a->wavelength] = NULL;
		}
		if (a->configuration == ON_TIMER)
		{
			kill_velement(timer_devices,a);
		}
		if(a->device_type == LOW_EXPLOSIVE)
		{
			explosion ex;
			ex.x = a->x;
			ex.y = a->y;
			ex.radius = 2;
			ex.centre_damage = 20;
			explosions_this_turn.push_back(ex);
		}
		if(a->device_type == HIGH_EXPLOSIVE)
		{
			explosion ex;
			ex.x = a->x;
			ex.y = a->y;
			ex.radius = 4;
			ex.centre_damage = 60;
			explosions_this_turn.push_back(ex);
		}
	}
	kill_velement(items,a);

}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $-0x1, 0x70(%rdi)
je 0xb0eb
cmpb $0x1, 0x98(%rbx)
jne 0xb039
movq %rbx, %rdi
callq 0x9569
jmp 0xb05d
movslq 0x90(%rbx), %rax
movslq 0x94(%rbx), %rcx
imulq $0x4b0, %rax, %rax      # imm = 0x4B0
leaq 0x8c46b(%rip), %rdx     # 0x974c0
addq %rax, %rdx
andq $0x0, (%rdx,%rcx,8)
movl 0x8c(%rbx), %eax
cmpl $0x1, %eax
je 0xb07f
cmpl $0x2, %eax
jne 0xb08e
movslq 0x74(%rbx), %rax
leaq 0x8c3e8(%rip), %rcx     # 0x97460
andq $0x0, (%rcx,%rax,8)
jmp 0xb08e
leaq 0x8c402(%rip), %rdi     # 0x97488
movq %rbx, %rsi
callq 0x1109b
movl 0x70(%rbx), %eax
testl %eax, %eax
jne 0xb0bf
movq 0x90(%rbx), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movabsq $0x1400000002, %rax     # imm = 0x1400000002
movq %rax, 0x8(%rsi)
leaq 0x8c359(%rip), %rdi     # 0x97410
callq 0x111f6
movl 0x70(%rbx), %eax
cmpl $0x1, %eax
jne 0xb0eb
movq 0x90(%rbx), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movabsq $0x3c00000004, %rax     # imm = 0x3C00000004
movq %rax, 0x8(%rsi)
leaq 0x8c32a(%rip), %rdi     # 0x97410
callq 0x111f6
leaq 0xb8306(%rip), %rdi     # 0xc33f8
movq %rbx, %rsi
callq 0x1109b
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: walk_description[abi:cxx11](species*)
std::string walk_description(species* sp)
{
	if(!sp->walk_known) return "    ";
	if(sp->walk_energy > human_sp->run_energy) return "vfst";
	else if(sp->walk_energy > human_sp->walk_energy) return "fast";
	else if(sp->walk_energy < human_sp->walk_energy) return "slow";
	return "avrg";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x47(%rsi)
je 0xb69b
movl 0x2c(%rsi), %eax
movq 0x5fda0(%rip), %rcx     # 0x6b428
cmpl 0x30(%rcx), %eax
jle 0xb6b8
leaq 0x9867(%rip), %rsi      # 0x14efb
leaq 0xe(%rsp), %rdx
jmp 0xb6a7
leaq 0xaa16(%rip), %rsi      # 0x160b8
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
cmpl 0x2c(%rcx), %eax
jle 0xb6cb
leaq 0x983c(%rip), %rsi      # 0x14f00
leaq 0xd(%rsp), %rdx
jmp 0xb6a7
jge 0xb6db
leaq 0xb2f8(%rip), %rsi      # 0x169cc
leaq 0xc(%rsp), %rdx
jmp 0xb6a7
leaq 0x983f(%rip), %rsi      # 0x14f21
leaq 0xb(%rsp), %rdx
jmp 0xb6a7
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: run_description[abi:cxx11](species*)
std::string run_description(species* sp)
{
	if(!sp->run_known) return "    ";
	if(sp->run_energy > human_sp->run_energy) return "fast";
	else if(sp->run_energy < human_sp->walk_energy) return "vslw";
	else if(sp->run_energy < human_sp->run_energy) return "slow";
	return "avrg";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x48(%rsi)
je 0xb716
movl 0x30(%rsi), %eax
movq 0x5fd27(%rip), %rdx     # 0x6b428
movl 0x30(%rdx), %ecx
cmpl %ecx, %eax
jle 0xb733
leaq 0x97f1(%rip), %rsi      # 0x14f00
leaq 0xe(%rsp), %rdx
jmp 0xb722
leaq 0xa99b(%rip), %rsi      # 0x160b8
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
cmpl 0x2c(%rdx), %eax
jge 0xb746
leaq 0x97c6(%rip), %rsi      # 0x14f05
leaq 0xd(%rsp), %rdx
jmp 0xb722
cmpl %ecx, %eax
jge 0xb758
leaq 0xb27b(%rip), %rsi      # 0x169cc
leaq 0xc(%rsp), %rdx
jmp 0xb722
leaq 0x97c2(%rip), %rsi      # 0x14f21
leaq 0xb(%rsp), %rdx
jmp 0xb722
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: damage_description[abi:cxx11](species*)
std::string damage_description(species* sp)
{
	if(!sp->damage_known) return "    ";
	if(sp->damage <= 4) return "weak";
	if(sp->damage <= 8) return "strg";
	if(sp->damage <= 14) return "dngr";
	return "argh";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x45(%rsi)
je 0xb78a
movl 0xc(%rsi), %eax
cmpl $0x4, %eax
jg 0xb7a7
leaq 0xae7a(%rip), %rsi      # 0x165fd
leaq 0xe(%rsp), %rdx
jmp 0xb796
leaq 0xa927(%rip), %rsi      # 0x160b8
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x8, %eax
ja 0xb7ba
leaq 0x8efd(%rip), %rsi      # 0x146b0
leaq 0xd(%rsp), %rdx
jmp 0xb796
cmpl $0xe, %eax
ja 0xb7cd
leaq 0x9744(%rip), %rsi      # 0x14f0a
leaq 0xc(%rsp), %rdx
jmp 0xb796
leaq 0x973b(%rip), %rsi      # 0x14f0f
leaq 0xb(%rsp), %rdx
jmp 0xb796
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: health_description[abi:cxx11](species*)
std::string health_description(species* sp)
{
	if(!sp->health_known) return "     ";
	if(sp->min_health <= 4) return "fethr";
	if(sp->min_health <= 8) return "frail";
	else if(sp->min_health <= 14) return " avrg";
	else if(sp->min_health <= 22) return "tough";
	else if(sp->min_health <= 36) return "v tgh";
	return "vvtgh";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x46(%rsi)
je 0xb7ff
movl 0x4(%rsi), %eax
cmpl $0x4, %eax
jg 0xb81c
leaq 0x971c(%rip), %rsi      # 0x14f14
leaq 0xe(%rsp), %rdx
jmp 0xb80b
leaq 0xa8b1(%rip), %rsi      # 0x160b7
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x5110
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x8, %eax
ja 0xb82f
leaq 0x96f2(%rip), %rsi      # 0x14f1a
leaq 0xd(%rsp), %rdx
jmp 0xb80b
cmpl $0xe, %eax
ja 0xb842
leaq 0x96e5(%rip), %rsi      # 0x14f20
leaq 0xc(%rsp), %rdx
jmp 0xb80b
cmpl $0x16, %eax
ja 0xb855
leaq 0x96d8(%rip), %rsi      # 0x14f26
leaq 0xb(%rsp), %rdx
jmp 0xb80b
cmpl $0x24, %eax
ja 0xb868
leaq 0x96cb(%rip), %rsi      # 0x14f2c
leaq 0xa(%rsp), %rdx
jmp 0xb80b
leaq 0x96c3(%rip), %rsi      # 0x14f32
leaq 0x9(%rsp), %rdx
jmp 0xb80b
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: tile_visible(int, int)
bool tile_visible(int x, int y)
{
	if (debug) return true;
	if(sym_los_in_range(p_ptr->x,p_ptr->y,x,y,is_opaque)) return true;
	for(unsigned int i=0; i<active_devices.size(); i++)
	{
		//if(active_devices[i]->device_type == HOLOGRAM_PROJECTOR) // put spy cameras on *all* devices
		{
			if(sym_los_in_range(active_devices[i]->x,active_devices[i]->y,x,y,is_opaque)) return true;
		}
	}
	return false;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb $0x1, %r14b
cmpb $0x0, 0x12003(%rip)     # 0x1e312
jne 0xc385
movl %esi, %ebx
movl %edi, %ebp
movq 0x5f1c4(%rip), %rax     # 0x6b4e0
movl 0x20(%rax), %edi
movl 0x24(%rax), %esi
leaq -0x16da(%rip), %r8      # 0xac4f
movl %ebp, %edx
movl %ebx, %ecx
callq 0x112e7
testb %al, %al
jne 0xc385
xorl %ecx, %ecx
leaq -0x16f0(%rip), %r15     # 0xac4f
movl %ecx, %r12d
movq 0x8b0ff(%rip), %rcx     # 0x97448
movq 0x8b0f0(%rip), %rax     # 0x97440
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
seta %r14b
jbe 0xc385
movq (%rax,%r12,8), %rax
movl 0x90(%rax), %edi
movl 0x94(%rax), %esi
movl %ebp, %edx
movl %ebx, %ecx
movq %r15, %r8
callq 0x112e7
leal 0x1(%r12), %ecx
testb %al, %al
je 0xc33f
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: scent_strength(float)
char scent_strength(float scent)
{
	if (scent < 0.001) return '.';
	if (scent < 0.01) return ',';
	if (scent < 0.1) return ':';
	if (scent < 0.3) return ';';
	if (scent < 0.6) return '-';
	if (scent < 1.0) return '=';
	if (scent < 10.0) return '/';
	if(scent < 50.0) return '*';
	if (scent < 100.0) return '&';
	return '&';
	
	
}

// Assembly:
cvtss2sd %xmm0, %xmm1
movb $0x2e, %al
movsd 0x7ef9(%rip), %xmm2     # 0x145f8
ucomisd %xmm1, %xmm2
ja 0xc774
movb $0x2c, %al
movsd 0x7ef1(%rip), %xmm2     # 0x14600
ucomisd %xmm1, %xmm2
ja 0xc774
movb $0x3a, %al
movsd 0x7ee9(%rip), %xmm2     # 0x14608
ucomisd %xmm1, %xmm2
ja 0xc774
movb $0x3b, %al
movsd 0x7ee1(%rip), %xmm2     # 0x14610
ucomisd %xmm1, %xmm2
ja 0xc774
movb $0x2d, %al
movsd 0x7ed9(%rip), %xmm2     # 0x14618
ucomisd %xmm1, %xmm2
ja 0xc774
movb $0x3d, %al
movss 0x78c5(%rip), %xmm1     # 0x14014
ucomiss %xmm0, %xmm1
ja 0xc774
movb $0x2f, %al
movss 0x792e(%rip), %xmm1     # 0x1408c
ucomiss %xmm0, %xmm1
ja 0xc774
movb $0x2a, %al
movss 0x7923(%rip), %xmm1     # 0x14090
ucomiss %xmm0, %xmm1
ja 0xc774
movb $0x26, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: undraw_line(int, int, int, int)
void undraw_line(int x1, int y1, int x2, int y2)
{
    // if x1 == x2 or y1 == y2, then it does not matter what we set here
    int delta_x(x2 - x1);
    signed char ix((delta_x > 0) - (delta_x < 0));
    delta_x = std::abs(delta_x) << 1;
 
    int delta_y(y2 - y1);
    signed char iy((delta_y > 0) - (delta_y < 0));
    delta_y = std::abs(delta_y) << 1;
 
    if (delta_x >= delta_y)
    {
        // error may go below zero
        int error(delta_y - (delta_x >> 1));
 
        while (x1 != x2)
        {
            if (error >= 0)
            {
                if (error || (ix > 0))
                {
                    y1 += iy;
                    error -= delta_x;
                }
                // else do nothing
            }
            // else do nothing
 
            x1 += ix;
            error += delta_y;
			draw_tile(x1,y1);
        }
    }
    else
    {
        // error may go below zero
        int error(delta_x - (delta_y >> 1));
 
        while (y1 != y2)
        {
            if (error >= 0)
            {
                if (error || (iy > 0))
                {
                    x1 += ix;
                    error -= delta_y;
                }
                // else do nothing
            }
            // else do nothing
 
            y1 += iy;
            error += delta_x;
			draw_tile(x1,y1);
        }
    }
	move(y2,x2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movl %edi, %r15d
xorl %r12d, %r12d
movl %edx, 0x14(%rsp)
movl %edx, %eax
subl %edi, %eax
setne %r12b
movl %eax, %edx
sarl $0x1f, %edx
orl %edx, %r12d
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %edx, %edx
xorl %ebx, %ebx
movl %ecx, 0x10(%rsp)
movl %ecx, %eax
subl %esi, %eax
setne %bl
movl %eax, %ecx
sarl $0x1f, %ecx
orl %ecx, %ebx
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
addl %ebp, %ebp
cmpl %ebp, %edx
jge 0xcb80
movl %ebp, 0xc(%rsp)
movl %ebp, %eax
sarl %eax
movl %edx, %r13d
movl %edx, %ebp
subl %eax, %ebp
cmpl %r14d, 0x10(%rsp)
je 0xcbc1
testl %ebp, %ebp
js 0xcb6b
testl %ebx, %ebx
jg 0xcb64
testl %ebp, %ebp
jne 0xcb64
xorl %ebp, %ebp
jmp 0xcb6b
addl %r12d, %r15d
subl 0xc(%rsp), %ebp
addl %ebx, %r14d
addl %r13d, %ebp
movl %r15d, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0xc775
jmp 0xcb4d
movl %edx, 0xc(%rsp)
movl %edx, %eax
sarl %eax
movl %ebp, %r13d
subl %eax, %ebp
cmpl %r15d, 0x14(%rsp)
je 0xcbc1
testl %ebp, %ebp
js 0xcbac
testl %r12d, %r12d
jg 0xcba5
testl %ebp, %ebp
jne 0xcba5
xorl %ebp, %ebp
jmp 0xcbac
addl %ebx, %r14d
subl 0xc(%rsp), %ebp
addl %r12d, %r15d
addl %r13d, %ebp
movl %r15d, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0xc775
jmp 0xcb8d
movl 0x10(%rsp), %edi
movl 0x14(%rsp), %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x51a0
// File: /workspace/github_cpp_makefile_star2_O2/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_scene(bool)
void draw_scene(bool record_actors=false)
{
	
	draw_tile_description(p_ptr->x,p_ptr->y);
	centre_x = std::min(p_ptr->x,MAP_SIZE - viewport_width/2-1);
	centre_x = std::max(centre_x,viewport_width/2);
	centre_y = std::min(p_ptr->y,MAP_SIZE - viewport_height/2-1);
	centre_y = std::max(centre_y,viewport_height/2-1);
	for(int x=viewport_left_edge();x<=viewport_right_edge(); x++)
	{
		for(int y=viewport_top_edge();y<viewport_bottom_edge(); y++)
		{
			draw_tile(x,y,record_actors);
		}
	}
	draw_stats();
	//for(int x=
	sort(visible_actors.begin(),visible_actors.end(),nearer_actor);
	draw_last_msg();
	wrefresh(stdscr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movq 0x5e8c0(%rip), %rax     # 0x6b4e0
movl 0x20(%rax), %edi
movl 0x24(%rax), %esi
callq 0xc391
movq 0x5e8ae(%rip), %rax     # 0x6b4e0
movl 0x20(%rax), %ecx
cmpl $0x7d, %ecx
pushq $0x7d
popq %rdx
cmovll %ecx, %edx
cmpl $0x19, %edx
pushq $0x18
popq %rcx
cmovgel %edx, %ecx
movl %ecx, 0x5e593(%rip)     # 0x6b1e0
movl 0x24(%rax), %eax
movl $0x8c, %edx
cmpl %edx, %eax
cmovll %eax, %edx
cmpl $0x9, %edx
pushq $0x8
popq %rax
cmovgel %edx, %eax
movl %eax, 0x5e57b(%rip)     # 0x6b1e4
leal -0x18(%rcx), %ebx
movzbl %bpl, %ebp
addl $0x18, %ecx
cmpl %ecx, %ebx
jg 0xcca4
leal -0x8(%rax), %r14d
leal 0xa(%rax), %ecx
cmpl %ecx, %r14d
jge 0xcc9a
movl %ebx, %edi
movl %r14d, %esi
movl %ebp, %edx
callq 0xc775
incl %r14d
movl 0x5e54c(%rip), %eax     # 0x6b1e4
jmp 0xcc7b
incl %ebx
movl 0x5e53e(%rip), %ecx     # 0x6b1e0
jmp 0xcc70
callq 0xbd86
movq 0x5e818(%rip), %rdi     # 0x6b4c8
movq 0x5e819(%rip), %rsi     # 0x6b4d0
leaq -0xe2(%rip), %rdx       # 0xcbdc
callq 0x12b0d
callq 0x6b38
movq 0x11309(%rip), %rax     # 0x1dfd8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5280