LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x48, %edi
callq 0x5250
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movq $0x0, 0x40(%rax)
movq %rax, 0x8(%rsp)
movb %bl, 0x9(%rax)
movq %r14, (%rax)
movb %r12b, 0x8(%rax)
xorl %ecx, %ecx
movb %cl, 0x1c(%rax)
movb %cl, 0x14(%rax)
movl 0x34(%r14), %edx
movl %edx, 0x18(%rax)
testl %r12d, %r12d
movl $0x64, %edx
cmovel %r12d, %edx
movl %edx, 0x10(%rax)
movl %r15d, 0x20(%rax)
movl %ebp, 0x24(%rax)
movb %cl, 0x1d(%rax)
movl %r15d, 0x28(%rax)
movl %ebp, 0x2c(%rax)
movl $0x0, 0x40(%rax)
movabsq $-0x1f3000001f4, %rcx   # imm = 0xFFFFFE0CFFFFFE0C
movq %rcx, 0x30(%rax)
movq 0xba6f6(%rip), %rsi     # 0xc63f8
cmpq 0xba6f7(%rip), %rsi     # 0xc6400
je 0xbd18
movq %rax, (%rsi)
addq $0x8, 0xba6e2(%rip)     # 0xc63f8
jmp 0xbd29
leaq 0xba6d1(%rip), %rdi     # 0xc63f0
leaq 0x8(%rsp), %rdx
callq 0x16e3a
testb %bl, %bl
jne 0xbd4d
movq 0x8(%rsp), %rax
movslq %r15d, %rcx
movslq %ebp, %rdx
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
leaq 0x627ba(%rip), %rsi     # 0x6e500
addq %rcx, %rsi
movq %rax, (%rsi,%rdx,8)
cmpl $0x0, 0x8(%r14)
je 0xbd60
callq 0x5070
cltd
idivl 0x8(%r14)
jmp 0xbd62
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 0xbdad
movq 0xba6a2(%rip), %rsi     # 0xc6428
cmpq 0xba6a3(%rip), %rsi     # 0xc6430
je 0xbd9c
movq %rax, (%rsi)
addq $0x8, 0xba68e(%rip)     # 0xc6428
jmp 0xbdad
leaq 0xba67d(%rip), %rdi     # 0xc6420
leaq 0x8(%rsp), %rdx
callq 0x16e3a
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x5, %r12d
xorl %ebx, %ebx
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0xc30f
testq %rax, %rax
jne 0xc778
decl %r12d
jne 0xc75f
jmp 0xc77b
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
movslq 0x61907(%rip), %rcx     # 0x6e20c
leal -0x1(%rcx), %eax
movslq 0x61901(%rip), %rdx     # 0x6e210
leal -0x1(%rdx), %esi
movslq %esi, %rdi
movslq %eax, %r9
imulq $0x4b0, %r9, %rax       # imm = 0x4B0
leaq (%rax,%rdi,8), %r8
decq %rdi
leaq 0x61bd3(%rip), %rsi     # 0x6e500
addq %rsi, %r8
xorl %eax, %eax
movl $0x1, %r10d
movq %r8, %r11
movq %rdi, %rbx
movq (%r11), %r14
testq %r14, %r14
je 0xc952
movzbl %al, %eax
cmpb $0x0, 0x8(%r14)
cmovnel %r10d, %eax
incq %rbx
addq $0x8, %r11
cmpq %rdx, %rbx
jle 0xc93e
leaq 0x1(%r9), %r11
addq $0x4b0, %r8             # imm = 0x4B0
cmpq %rcx, %r9
movq %r11, %r9
jle 0xc938
addl $-0x2, %ecx
movslq %ecx, %rcx
movslq 0x61892(%rip), %rdx     # 0x6e210
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rsi
movq (%rsi,%rdx,8), %rcx
testq %rcx, %rcx
je 0xc9a0
cmpb $0x0, 0x8(%rcx)
movzbl %al, %ecx
movl $0x1, %eax
cmovel %ecx, %eax
andb $0x1, %al
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x148d7(%rip)     # 0x21320
jne 0xcb40
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x617ac(%rip), %rdx     # 0x6e20c
leal -0x1(%rdx), %eax
leal 0x2(%rdx), %ecx
movslq 0x617a3(%rip), %rdi     # 0x6e210
leal -0x1(%rdi), %esi
movslq %esi, %r8
movslq %eax, %r9
movslq %ecx, %rcx
cmpl %ecx, %edx
movl %ecx, %r10d
cmovgl %edx, %r10d
imulq $0x4b0, %r9, %rax       # imm = 0x4B0
leaq (%rax,%r8,8), %r11
decq %r8
leaq 0x61a69(%rip), %rsi     # 0x6e500
addq %rsi, %r11
movb $0x1, %bl
xorl %eax, %eax
movl $0x1, %ebp
movq %r11, %r14
movq %r8, %r15
movb $0x1, %r12b
movq (%r14), %r13
testq %r13, %r13
je 0xcac3
movb 0x8(%r13), %r13b
movzbl %al, %eax
testb %r13b, %r13b
cmovnel %ebp, %eax
jmp 0xcac6
movb $0x1, %r13b
testb %r13b, %r13b
je 0xcadb
incq %r15
addq $0x8, %r14
cmpq %rdi, %r15
setle %r12b
jle 0xcaac
testb $0x1, %r12b
jne 0xcaf6
incq %r9
cmpq %rcx, %r9
setl %bl
addq $0x4b0, %r11            # imm = 0x4B0
cmpl %r9d, %r10d
jne 0xcaa3
testb $0x1, %bl
jne 0xcb32
imulq $0x4b0, %rdx, %rdi      # imm = 0x4B0
movslq 0x61707(%rip), %rdx     # 0x6e210
addq %rsi, %rdi
movq -0x960(%rdi,%rdx,8), %rdi
testq %rdi, %rdi
je 0xcb21
movb $0x1, %al
cmpb $0x1, 0x8(%rdi)
jne 0xcb32
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rsi
cmpq $0x0, (%rsi,%rdx,8)
je 0xcb34
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcb42
xorl %eax, %eax
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movslq 0x70(%rdi), %rax
cmpq $-0x1, %rax
je 0xe088
cmpb $0x1, 0x98(%rbx)
jne 0xdf8d
movq 0xb84e4(%rip), %rcx     # 0xc6450
leaq (%rax,%rax,2), %rax
movslq 0x8c(%rbx), %rdx
leaq (%rdx,%rdx,2), %rdi
shlq $0x3, %rdi
addq (%rcx,%rax,8), %rdi
movq %rbx, %rsi
callq 0x16158
jmp 0xdfb4
movslq 0x90(%rbx), %rax
movslq 0x94(%rbx), %rcx
imulq $0x4b0, %rax, %rax      # imm = 0x4B0
leaq 0x8c527(%rip), %rdx     # 0x9a4d0
addq %rax, %rdx
movq $0x0, (%rdx,%rcx,8)
movl 0x8c(%rbx), %eax
cmpl $0x1, %eax
je 0xdfd9
cmpl $0x2, %eax
jne 0xdfe8
movslq 0x74(%rbx), %rax
leaq 0x8c4a1(%rip), %rcx     # 0x9a470
movq $0x0, (%rcx,%rax,8)
jmp 0xdfe8
leaq 0x8c4b8(%rip), %rdi     # 0x9a498
movq %rbx, %rsi
callq 0x16158
cmpl $0x0, 0x70(%rbx)
jne 0xe038
movq 0x90(%rbx), %rax
movq %rax, (%rsp)
movabsq $0x1400000002, %rax     # imm = 0x1400000002
movq %rax, 0x8(%rsp)
movq 0x8c419(%rip), %rsi     # 0x9a428
cmpq 0x8c41a(%rip), %rsi     # 0x9a430
je 0xe029
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8c401(%rip)    # 0x9a428
jmp 0xe038
leaq 0x8c3f0(%rip), %rdi     # 0x9a420
movq %rsp, %rdx
callq 0x172a4
cmpl $0x1, 0x70(%rbx)
jne 0xe088
movq 0x90(%rbx), %rax
movq %rax, (%rsp)
movabsq $0x3c00000004, %rax     # imm = 0x3C00000004
movq %rax, 0x8(%rsp)
movq 0x8c3c9(%rip), %rsi     # 0x9a428
cmpq 0x8c3ca(%rip), %rsi     # 0x9a430
je 0xe079
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8c3b1(%rip)    # 0x9a428
jmp 0xe088
leaq 0x8c3a0(%rip), %rdi     # 0x9a420
movq %rsp, %rdx
callq 0x172a4
leaq 0xb8379(%rip), %rdi     # 0xc6408
movq %rbx, %rsi
callq 0x16158
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
cmpb $0x0, 0x47(%rsi)
je 0xe753
movl 0x2c(%rsi), %eax
movq 0x5fd01(%rip), %rcx     # 0x6e438
cmpl 0x30(%rcx), %eax
jle 0xe775
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa7e8(%rip), %rsi      # 0x18f32
leaq 0xa7e5(%rip), %rdx      # 0x18f36
jmp 0xe768
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xb98e(%rip), %rsi      # 0x1a0ef
leaq 0xb98b(%rip), %rdx      # 0x1a0f3
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rax
popq %rbx
retq
movl 0x2c(%rcx), %ecx
cmpl %ecx, %eax
jle 0xe793
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa7ad(%rip), %rsi      # 0x18f37
leaq 0xa7aa(%rip), %rdx      # 0x18f3b
jmp 0xe768
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
cmpl %ecx, %eax
jge 0xe7ae
leaq 0xc25e(%rip), %rsi      # 0x1aa03
leaq 0xc25b(%rip), %rdx      # 0x1aa07
jmp 0xe768
leaq 0xa7a3(%rip), %rsi      # 0x18f58
leaq 0xa7a0(%rip), %rdx      # 0x18f5c
jmp 0xe768
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
cmpb $0x0, 0x48(%rsi)
je 0xe7f0
movl 0x30(%rsi), %eax
movq 0x5fc66(%rip), %rdx     # 0x6e438
movl 0x30(%rdx), %ecx
cmpl %ecx, %eax
jle 0xe812
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa750(%rip), %rsi      # 0x18f37
leaq 0xa74d(%rip), %rdx      # 0x18f3b
jmp 0xe805
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xb8f1(%rip), %rsi      # 0x1a0ef
leaq 0xb8ee(%rip), %rdx      # 0x1a0f3
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rax
popq %rbx
retq
cmpl 0x2c(%rdx), %eax
jge 0xe82e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa717(%rip), %rsi      # 0x18f3c
leaq 0xa714(%rip), %rdx      # 0x18f40
jmp 0xe805
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
cmpl %ecx, %eax
jge 0xe849
leaq 0xc1c3(%rip), %rsi      # 0x1aa03
leaq 0xc1c0(%rip), %rdx      # 0x1aa07
jmp 0xe805
leaq 0xa708(%rip), %rsi      # 0x18f58
leaq 0xa705(%rip), %rdx      # 0x18f5c
jmp 0xe805
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
cmpb $0x0, 0x45(%rsi)
je 0xe882
movl 0xc(%rsi), %eax
cmpl $0x4, %eax
jg 0xe8a4
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xbdbb(%rip), %rsi      # 0x1a634
leaq 0xbdb8(%rip), %rdx      # 0x1a638
jmp 0xe897
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xb85f(%rip), %rsi      # 0x1a0ef
leaq 0xb85c(%rip), %rdx      # 0x1a0f3
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rax
popq %rbx
retq
cmpl $0x8, %eax
jg 0xe8c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x9e39(%rip), %rsi      # 0x186f0
leaq 0x9e36(%rip), %rdx      # 0x186f4
jmp 0xe897
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpl $0xe, %eax
jg 0xe8dc
leaq 0xa66e(%rip), %rsi      # 0x18f41
leaq 0xa66b(%rip), %rdx      # 0x18f45
jmp 0xe897
leaq 0xa663(%rip), %rsi      # 0x18f46
leaq 0xa660(%rip), %rdx      # 0x18f4a
jmp 0xe897
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
cmpb $0x0, 0x46(%rsi)
je 0xe915
movl 0x4(%rsi), %eax
cmpl $0x4, %eax
jg 0xe937
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa63f(%rip), %rsi      # 0x18f4b
leaq 0xa63d(%rip), %rdx      # 0x18f50
jmp 0xe92a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xb7cb(%rip), %rsi      # 0x1a0ee
leaq 0xb7c9(%rip), %rdx      # 0x1a0f3
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rax
popq %rbx
retq
cmpl $0x8, %eax
jg 0xe953
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa607(%rip), %rsi      # 0x18f51
leaq 0xa605(%rip), %rdx      # 0x18f56
jmp 0xe92a
cmpl $0xe, %eax
jg 0xe96f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa5f1(%rip), %rsi      # 0x18f57
leaq 0xa5ef(%rip), %rdx      # 0x18f5c
jmp 0xe92a
cmpl $0x16, %eax
jg 0xe98b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa5db(%rip), %rsi      # 0x18f5d
leaq 0xa5d9(%rip), %rdx      # 0x18f62
jmp 0xe92a
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpl $0x24, %eax
jg 0xe9a7
leaq 0xa5c5(%rip), %rsi      # 0x18f63
leaq 0xa5c3(%rip), %rdx      # 0x18f68
jmp 0xe92a
leaq 0xa5bb(%rip), %rsi      # 0x18f69
leaq 0xa5b9(%rip), %rdx      # 0x18f6e
jmp 0xe92a
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %r14b
cmpb $0x0, 0x11648(%rip)     # 0x21322
jne 0xfdab
movl %esi, %ebx
movl %edi, %ebp
movq 0x5e805(%rip), %rax     # 0x6e4f0
movl 0x20(%rax), %r15d
movl 0x24(%rax), %r12d
leaq -0x23d1(%rip), %r8      # 0xd929
movl %r15d, %edi
movl %r12d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0xfc80
testb %al, %al
je 0xfd28
subl %ebp, %r15d
imull %r15d, %r15d
subl %ebx, %r12d
imull %r12d, %r12d
addl %r15d, %r12d
cmpl $0x41, %r12d
jb 0xfdab
movq 0x8a721(%rip), %rax     # 0x9a450
cmpq %rax, 0x8a722(%rip)     # 0x9a458
setne %r14b
je 0xfdab
movl $0x1, %r15d
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl 0x90(%rax), %r12d
movl 0x94(%rax), %r13d
movl %r12d, %edi
movl %r13d, %esi
movl %ebp, %edx
movl %ebx, %ecx
leaq -0x243e(%rip), %r8      # 0xd929
callq 0xfc80
testb %al, %al
je 0xfd87
subl %ebp, %r12d
imull %r12d, %r12d
subl %ebx, %r13d
imull %r13d, %r13d
addl %r12d, %r13d
cmpl $0x41, %r13d
jb 0xfdab
movl %r15d, %ecx
movq 0x8a6c7(%rip), %rdx     # 0x9a458
movq 0x8a6b8(%rip), %rax     # 0x9a450
subq %rax, %rdx
sarq $0x3, %rdx
incl %r15d
cmpq %rcx, %rdx
seta %r14b
ja 0xfd44
andb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x84c3(%rip), %xmm2     # 0x18638
ucomisd %xmm1, %xmm2
ja 0x101ea
movb $0x2c, %al
movsd 0x84bb(%rip), %xmm2     # 0x18640
ucomisd %xmm1, %xmm2
ja 0x101ea
movb $0x3a, %al
movsd 0x84b3(%rip), %xmm2     # 0x18648
ucomisd %xmm1, %xmm2
ja 0x101ea
movb $0x3b, %al
movsd 0x84ab(%rip), %xmm2     # 0x18650
ucomisd %xmm1, %xmm2
ja 0x101ea
movb $0x2d, %al
movsd 0x84a3(%rip), %xmm2     # 0x18658
ucomisd %xmm1, %xmm2
ja 0x101ea
movb $0x3d, %al
movss 0x7e4f(%rip), %xmm1     # 0x18014
ucomiss %xmm0, %xmm1
ja 0x101ea
movb $0x2f, %al
movss 0x7eb8(%rip), %xmm1     # 0x1808c
ucomiss %xmm0, %xmm1
ja 0x101ea
movb $0x2a, %al
movss 0x7ead(%rip), %xmm1     # 0x18090
ucomiss %xmm0, %xmm1
ja 0x101ea
movb $0x26, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %eax
subl %edi, %eax
setne %r12b
movl %eax, %esi
sarl $0x1f, %esi
orl %esi, %r12d
movl %eax, %edi
negl %edi
cmovsl %eax, %edi
addl %edi, %edi
xorl %ebx, %ebx
movl %ecx, %eax
subl %r14d, %eax
setne %bl
movl %eax, %esi
sarl $0x1f, %esi
orl %esi, %ebx
movl %eax, %r13d
negl %r13d
cmovsl %eax, %r13d
addl %r13d, %r13d
movl %edi, 0xc(%rsp)
cmpl %r13d, %edi
movl %edx, 0x14(%rsp)
movl %ecx, 0x10(%rsp)
jge 0x108aa
cmpl %r14d, %ecx
je 0x108ec
movl %r13d, %eax
sarl %eax
movl 0xc(%rsp), %ebp
subl %eax, %ebp
testl %ebp, %ebp
js 0x1088d
testl %ebx, %ebx
jg 0x10887
testl %ebp, %ebp
jne 0x10887
xorl %ebp, %ebp
jmp 0x1088d
addl %r12d, %r15d
subl %r13d, %ebp
addl %ebx, %r14d
addl 0xc(%rsp), %ebp
movl %r15d, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0x101eb
cmpl %r14d, 0x10(%rsp)
jne 0x10877
jmp 0x108ec
cmpl %r15d, %edx
je 0x108ec
movl 0xc(%rsp), %eax
sarl %eax
movl %r13d, %ebp
subl %eax, %ebp
testl %ebp, %ebp
js 0x108d2
testl %r12d, %r12d
jg 0x108cb
testl %ebp, %ebp
jne 0x108cb
xorl %ebp, %ebp
jmp 0x108d2
addl %ebx, %r14d
subl 0xc(%rsp), %ebp
addl %r12d, %r15d
addl %r13d, %ebp
movl %r15d, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0x101eb
cmpl %r15d, 0x14(%rsp)
jne 0x108ba
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_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movq 0x5dba2(%rip), %rax     # 0x6e4f0
movl 0x20(%rax), %edi
movl 0x24(%rax), %esi
callq 0xfdc1
movq 0x5db90(%rip), %rax     # 0x6e4f0
movl 0x20(%rax), %ecx
cmpl $0x7d, %ecx
movl $0x7d, %edx
cmovll %ecx, %edx
cmpl $0x19, %edx
movl $0x18, %ecx
cmovgel %edx, %ecx
movl %ecx, 0x5d871(%rip)     # 0x6e1f0
movl 0x24(%rax), %eax
movl $0x8c, %edx
cmpl %edx, %eax
cmovll %eax, %edx
cmpl $0x9, %edx
movl $0x8, %eax
cmovgel %edx, %eax
movl %eax, 0x5d857(%rip)     # 0x6e1f4
leal -0x18(%rcx), %ebx
addl $0x18, %ecx
cmpl %ecx, %ebx
jg 0x109e5
movzbl %bpl, %ebp
movl 0x5d842(%rip), %r14d    # 0x6e1f4
addl $-0x9, %r14d
incl %r14d
movl %ebx, %edi
movl %r14d, %esi
movl %ebp, %edx
callq 0x101eb
movl 0x5d829(%rip), %eax     # 0x6e1f4
addl $0x9, %eax
cmpl %eax, %r14d
jl 0x109b6
leal 0x1(%rbx), %eax
movl 0x5d814(%rip), %ecx     # 0x6e1f0
addl $0x18, %ecx
cmpl %ecx, %ebx
movl %eax, %ebx
jl 0x109ab
callq 0xf5d5
movq 0x5dae7(%rip), %rbx     # 0x6e4d8
movq 0x5dae8(%rip), %r14     # 0x6e4e0
cmpq %r14, %rbx
je 0x10a37
movq %r14, %rax
subq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x114(%rip), %r15      # 0x10907
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x17846
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x17977
callq 0x74e9
movq 0x10595(%rip), %rax     # 0x20fd8
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x52a0
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: move_actor(actor*, int, int)
int move_actor(actor* a, int dx, int dy)
{

	if (dx==0 && dy==0)
		return 1;
	int ox = a->x; int oy = a->y;
	int x = ox+dx; int y = oy+dy;
	if(!on_map(x,y)) return 1;
	if (terrain_immovable(a,x,y))
	{

		return 1;
	}
	if(a->is_player)
	{
		for(unsigned int i=0;i<devices.size();i++)
		{
			if(devices[i]->player_has)
			{
				devices[i]->x = p_ptr->x; devices[i]->y = p_ptr->y;
			}
		}
	}
	map_occupants[ox][oy] = NULL;
	map_occupants[x][y] = a;
	if(a->ai_x == a->x && a->ai_y == a->y)
	{
		a->ai_x = x; a->ai_y = y;
	}
	a->x = x; a->y = y;
	if(a->running)
	{
		make_noise(x,y,&run_noise[a->sspecies->id][map_terrain[x][y]]);
	}
	else
	{
		make_noise(x,y,&walk_noise[a->sspecies->id][map_terrain[x][y]]);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebp
movl %edx, %eax
orl %esi, %eax
je 0x10b9c
movq %rdi, %r15
movslq 0x20(%rdi), %r13
movslq 0x24(%rdi), %r12
movslq %esi, %rbx
addq %r13, %rbx
movslq %edx, %r14
addq %r12, %r14
movl %r14d, %eax
orl %ebx, %eax
js 0x10b9c
cmpl $0x95, %ebx
jg 0x10b9c
cmpl $0x95, %r14d
jg 0x10b9c
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0xb382
testb %al, %al
jne 0x10b9c
cmpb $0x1, 0x8(%r15)
jne 0x10b08
movq 0xb5973(%rip), %rax     # 0xc6440
movq 0xb5964(%rip), %rcx     # 0xc6438
subq %rcx, %rax
je 0x10b08
sarq $0x3, %rax
movq 0x5da0c(%rip), %rdx     # 0x6e4f0
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
cmpb $0x1, 0x98(%rdi)
jne 0x10afe
movq 0x20(%rdx), %r8
movq %r8, 0x90(%rdi)
incq %rsi
movl %esi, %edi
cmpq %rdi, %rax
ja 0x10ae6
imulq $0x4b0, %r13, %rax      # imm = 0x4B0
leaq 0x5d9ea(%rip), %rcx     # 0x6e500
addq %rcx, %rax
movq $0x0, (%rax,%r12,8)
imulq $0x4b0, %rbx, %rax      # imm = 0x4B0
addq %rcx, %rax
movq %r15, (%rax,%r14,8)
cmpl %r13d, 0x28(%r15)
jne 0x10b43
cmpl %r12d, 0x2c(%r15)
jne 0x10b43
movl %ebx, 0x28(%r15)
movl %r14d, 0x2c(%r15)
movl %ebx, 0x20(%r15)
movl %r14d, 0x24(%r15)
movq (%r15), %rax
movslq (%rax), %rax
imulq $0x258, %rbx, %rcx      # imm = 0x258
leaq 0x107f1(%rip), %rdx     # 0x21350
addq %rcx, %rdx
movslq (%rdx,%r14,4), %rcx
leaq 0x5d7bb(%rip), %rdx     # 0x6e328
leaq 0x5d79c(%rip), %rsi     # 0x6e310
cmpb $0x0, 0x14(%r15)
cmovneq %rdx, %rsi
movq (%rsi), %rsi
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rcx,2), %rdx
shlq $0x4, %rdx
addq (%rsi,%rax,8), %rdx
movl %ebx, %edi
movl %r14d, %esi
callq 0xb650
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: kill_actor(actor*)
void kill_actor(actor* a)
{
	map_occupants[a->x][a->y] = NULL;
	if(current_target == a) current_target = NULL;
	a->dead = true;
	//if(sym_los_in_range(p_ptr->x,p_ptr->y,a->x,a->y,is_opaque))
	if(tile_visible(a->x,a->y))
	{
		add_message("The "+a->sspecies->name+" dies.");
	}
	a->sspecies->health_known = true;
	add_junk(a->sspecies->name +" corpse","the bloody corpse of a "+a->sspecies->name,'%',a->sspecies->colour,a->x,a->y);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movslq 0x20(%rdi), %rdi
movslq 0x24(%rbx), %rsi
imulq $0x4b0, %rdi, %rax      # imm = 0x4B0
leaq 0x5d6c7(%rip), %rcx     # 0x6e500
addq %rax, %rcx
movq $0x0, (%rcx,%rsi,8)
cmpq %rbx, 0x5d685(%rip)     # 0x6e4d0
jne 0x10e58
movq $0x0, 0x5d678(%rip) # 0x6e4d0
movb $0x1, 0x1c(%rbx)
callq 0xfcc5
testb %al, %al
je 0x10f05
movl $0xf0, %edx
addq (%rbx), %rdx
leaq 0x837c(%rip), %rsi      # 0x191f4
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x15e6b
leaq 0x836d(%rip), %rsi      # 0x191f9
movq %r14, %rdi
callq 0x5420
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10ebb
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x10ec2
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x5eae
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x10ef2
callq 0x5230
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10f05
callq 0x5230
movq (%rbx), %rax
movb $0x1, 0x46(%rax)
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xf0(%rax), %rsi
movq 0xf8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x166e0
leaq 0x82c8(%rip), %rsi      # 0x19200
movq %r14, %rdi
callq 0x5420
movl $0xf0, %edx
addq (%rbx), %rdx
leaq 0x82b9(%rip), %rsi      # 0x19208
leaq 0x40(%rsp), %rdi
callq 0x15e6b
movq (%rbx), %rax
movl 0x28(%rax), %ecx
movl 0x20(%rbx), %r8d
movl 0x24(%rbx), %r9d
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
movl $0x25, %edx
callq 0xbb4b
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10f8c
callq 0x5230
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x10f9a
callq 0x5230
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x10fbe
callq 0x5230
jmp 0x10fbe
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x10ff4
jmp 0x10ff9
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10feb
callq 0x5230
jmp 0x10feb
jmp 0x10fe8
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x10ff9
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: add_score_str()
void add_score_str()
{
	check_achievements();
	char score_str[10] = "";
	sprintf(score_str,"%d",calculate_score());
	//itoa(calculate_score(),score_str,10);
	add_message("Your score is " + std::string(score_str) + ".");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
callq 0xc9a6
leaq 0x8(%rsp), %rbx
movw $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
callq 0x11001
leaq 0x7fce(%rip), %rsi      # 0x19220
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x5050
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x5140
leaq (%rsp,%rax), %rdx
addq $0x8, %rdx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16274
leaq 0x7f95(%rip), %rcx      # 0x19223
movl $0xe, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x112c7
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x112ce
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x92d6(%rip), %rsi      # 0x1a5c7
callq 0x5420
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1131e
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x11326
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x38(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x5eae
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x11356
callq 0x5230
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x11365
callq 0x5230
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x11374
callq 0x5230
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x11397
callq 0x5230
jmp 0x11397
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x113ab
callq 0x5230
jmp 0x113ab
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x113ba
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: lose()
void lose()
{
	died = true;
	
	add_message("You die. Press 'Q' to quit.");
	
	add_score_str();
	draw_scene();
	int kp = 0;
	while(kp != 'Q') kp = fgetch();
	endwin();
	exit(0);

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movb $0x1, 0xff60(%rip)      # 0x21330
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x7e52(%rip), %rsi      # 0x19232
leaq 0x7e66(%rip), %rdx      # 0x1924d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rdi
callq 0x5eae
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1140b
callq 0x5230
callq 0x11224
xorl %edi, %edi
callq 0x1093e
movq 0xfbba(%rip), %r14      # 0x20fd8
movq (%r14), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
cmpl $0x51, %ebx
jne 0x1141e
callq 0x52d0
xorl %edi, %edi
callq 0x52f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x11450
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: win()
void win()
{
	if(map_terrain[ship_x+2][ship_y] == DOOR)
	{
		add_message("You close the doors and fly away! Press Q to quit.");
	}
	else
	{
		add_message("You wipe some blood off the control panel and fly away! Press Q to quit.");
	}
	check_achievements();
	closed_doors = true;
	left_planet = true;
	add_score_str();
	map_terrain[ship_x+2][ship_y] = NS;
	draw_scene();
	int kp = 0;
	while(kp != 'Q') kp = fgetch();
	endwin();
	exit(0);

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movslq 0x5cda4(%rip), %rax     # 0x6e20c
imulq $0x258, %rax, %rax      # imm = 0x258
movslq 0x5cd9a(%rip), %rcx     # 0x6e210
leaq 0xfed3(%rip), %r14      # 0x21350
addq %r14, %rax
cmpl $0x5, 0x4b0(%rax,%rcx,4)
jne 0x114bd
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7db4(%rip), %rsi      # 0x1924e
leaq 0x7ddf(%rip), %rdx      # 0x19280
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rdi
callq 0x5eae
movq 0x20(%rsp), %rdi
jmp 0x114eb
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7db4(%rip), %rsi      # 0x19281
leaq 0x7df5(%rip), %rdx      # 0x192c9
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x16274
movq %rbx, %rdi
callq 0x5eae
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x114f5
callq 0x5230
callq 0xc9a6
movb $0x1, %al
movb %al, 0xfe34(%rip)       # 0x21336
movb %al, 0xfe2f(%rip)       # 0x21337
callq 0x11224
movslq 0x5ccf8(%rip), %rax     # 0x6e20c
imulq $0x258, %rax, %rax      # imm = 0x258
movslq 0x5ccee(%rip), %rcx     # 0x6e210
addq %r14, %rax
movl $0xa, 0x4b0(%rax,%rcx,4)
xorl %edi, %edi
callq 0x1093e
movq 0xfa9a(%rip), %r14      # 0x20fd8
movq (%r14), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
cmpl $0x51, %ebx
jne 0x1153e
callq 0x52d0
xorl %edi, %edi
callq 0x52f0
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x1156f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x11579
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: scent_walk(actor*)
void scent_walk(actor* a)
{
	std::pair<int,int> valid_dirs[8];
	int dir_count = 0;
	int best_x = 0; int best_y = 0;
	float best_scent = map_human_scent[a->x][a->y];
	random_shuffle(vdirections.begin(),vdirections.end());
	for(int d=0;d<8;d++)
	{
		std::pair<int,int> dir = directions[d];
		if(!terrain_immovable(a,a->x+dir.first,a->y+dir.second))
		{
			float detect = map_human_scent[a->x+dir.first][a->y+dir.second] + randfloat()*map_human_scent[a->x][a->y]*0.001f;
			if(detect >= best_scent)
			{
				best_scent = detect;
				best_x = dir.first; best_y = dir.second;
			}
		}
	}
	move_actor(a,best_x,best_y);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x20(%rdi), %rax
movslq 0x24(%rdi), %rcx
imulq $0x258, %rax, %rax      # imm = 0x258
leaq 0x25127(%rip), %rdx     # 0x372e0
addq %rdx, %rax
movss (%rax,%rcx,4), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x5c063(%rip), %r14     # 0x6e230
movq 0x5c064(%rip), %r15     # 0x6e238
cmpq %r15, %r14
je 0x1223c
leaq 0x8(%r14), %rax
cmpq %r15, %rax
je 0x1223c
movl $0x8, %r12d
callq 0x5070
cltq
movq %r12, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %r12
je 0x1222b
leaq (%r14,%rdx,8), %rax
movl (%r14,%r12), %ecx
movl (%rax), %edx
movl %edx, (%r14,%r12)
movl %ecx, (%rax)
movl 0x4(%r14,%r12), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%r14,%r12)
movl %ecx, 0x4(%rax)
leaq (%r14,%r12), %rax
addq $0x8, %rax
addq $0x8, %r12
cmpq %r15, %rax
jne 0x121e8
xorl %r13d, %r13d
movl $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
leaq 0x629a(%rip), %rax      # 0x184f0
movslq (%rax,%r13,8), %rbp
movslq 0x4(%rax,%r13,8), %r14
movslq 0x20(%rbx), %r15
addq %rbp, %r15
movslq 0x24(%rbx), %r12
addq %r14, %r12
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0xb382
testb %al, %al
jne 0x1230e
imulq $0x258, %r15, %rax      # imm = 0x258
leaq 0x2504f(%rip), %r15     # 0x372e0
addq %r15, %rax
movss (%rax,%r12,4), %xmm0
movss %xmm0, 0xc(%rsp)
callq 0x5070
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x5d50(%rip), %xmm0     # 0x18004
movslq 0x20(%rbx), %rax
movslq 0x24(%rbx), %rcx
imulq $0x258, %rax, %rax      # imm = 0x258
addq %r15, %rax
mulss (%rax,%rcx,4), %xmm0
mulss 0x5db1(%rip), %xmm0     # 0x18084
addss 0xc(%rsp), %xmm0
movaps 0x10(%rsp), %xmm3
ucomiss %xmm3, %xmm0
movaps %xmm3, %xmm1
cmpnless %xmm0, %xmm1
movaps %xmm1, %xmm2
andnps %xmm0, %xmm2
andps %xmm3, %xmm1
cmovbl 0x4(%rsp), %r14d
cmovbl 0x8(%rsp), %ebp
orps %xmm2, %xmm1
movaps %xmm1, 0x10(%rsp)
movl %r14d, 0x4(%rsp)
movl %ebp, 0x8(%rsp)
incq %r13
cmpq $0x8, %r13
jne 0x1224f
movq %rbx, %rdi
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10a55
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: random_walk(actor*)
void random_walk(actor* a)
{
	std::pair<int,int> valid_dirs[8];
	int dir_count = 0;
	for(int d=0;d<8;d++)
	{
		std::pair<int,int> dir = directions[d];
		if(is_wall(a->x+dir.first,a->y+dir.second))
		{
			valid_dirs[dir_count] = dir;
			dir_count++;
		}
		if(dir_count != 0)
		{
			int choice = rand()%dir_count;
			move_actor(a,valid_dirs[choice].first,valid_dirs[choice].second);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
xorl %r14d, %r14d
leaq 0x6187(%rip), %r15      # 0x184f0
leaq 0xefe0(%rip), %r12      # 0x21350
xorl %r13d, %r13d
movq (%r14,%r15), %rax
movslq 0x20(%rbx), %rcx
movslq %eax, %rdx
addq %rcx, %rdx
movslq 0x24(%rbx), %rcx
movq %rax, %rsi
sarq $0x20, %rsi
addq %rcx, %rsi
imulq $0x258, %rdx, %rcx      # imm = 0x258
addq %r12, %rcx
cmpl $0x4, (%rcx,%rsi,4)
jne 0x123b5
movq %rax, %rcx
shrq $0x20, %rcx
movslq %r13d, %r13
movl %eax, (%rsp,%r13,8)
movl %ecx, 0x4(%rsp,%r13,8)
incl %r13d
testl %r13d, %r13d
je 0x123d5
callq 0x5070
cltd
idivl %r13d
movslq %edx, %rax
movl (%rsp,%rax,8), %esi
movl 0x4(%rsp,%rax,8), %edx
movq %rbx, %rdi
callq 0x10a55
addq $0x8, %r14
cmpq $0x40, %r14
jne 0x12373
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: update_map_seen()
void update_map_seen()
{
	int px = p_ptr->x;
	int py = p_ptr->y;
	for (int x=px - vis_range;x <= px + vis_range; x++)
	{
		for (int y=py - vis_range;y <= py + vis_range; y++)
		{
			if(on_map(x,y))
			{
				if (!map_seen[x][y])
				{
					if(tile_visible(x,y))
						map_seen[x][y] = true;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x5b971(%rip), %rax     # 0x6e4f0
movslq 0x20(%rax), %rcx
movslq 0x24(%rax), %r12
leal -0x8(%rcx), %eax
addq $0x8, %rcx
movq %rcx, 0x10(%rsp)
leal -0x8(%r12), %ecx
addq $0x8, %r12
movslq %ecx, %rcx
movq %rcx, 0x8(%rsp)
movslq %eax, %rbx
imulq $0x96, %rbx, %rbp
leaq 0x5064b(%rip), %r15     # 0x63200
movq 0x8(%rsp), %r14
movl %r14d, %eax
orl %ebx, %eax
js 0x12bf1
cmpq $0x95, %rbx
jg 0x12bf1
cmpq $0x95, %r14
jg 0x12bf1
leaq (%r14,%rbp), %r13
cmpb $0x0, (%r15,%r13)
jne 0x12bf1
movl %ebx, %edi
movl %r14d, %esi
callq 0xfcc5
testb %al, %al
je 0x12bf1
movb $0x1, (%r15,%r13)
leaq 0x1(%r14), %rax
cmpq %r12, %r14
movq %rax, %r14
jl 0x12bba
leaq 0x1(%rbx), %rax
addq $0x96, %rbp
cmpq 0x10(%rsp), %rbx
movq %rax, %rbx
jl 0x12bb5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: selectghjk_individual_device_from_type_and_config(int, int)
item* selectghjk_individual_device_from_type_and_config(int type, int config)
{
	bool unacceptable = true;
	std::vector<item*>* options = &dev_inv[type][config];
	attron(COLOR_PAIR(COLOR_WHITE));
	clear_area(0,0,viewport_width,options->size());
	for(unsigned int i=0;i<options->size();i++)
	{
		mvprintw(i,0,"(%c) %s with %d seconds remaining",'a'+i, (*options)[i]->name.c_str(), (*options)[i]->time_remaining);
	}

	int kp = fgetch();
	while(unacceptable)
	{
		unacceptable = false;
	}
	draw_scene();
	return (*options)[kp-'a'];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq %edi, %rax
movq 0xb2adf(%rip), %rcx     # 0xc6450
leaq (%rax,%rax,2), %rax
movslq %esi, %rdx
movq (%rcx,%rax,8), %rax
leaq (%rdx,%rdx,2), %rcx
leaq (%rax,%rcx,8), %r15
movq 0xd64d(%rip), %r12      # 0x20fd8
movq (%r12), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movq 0x8(%r15), %rcx
subq (%r15), %rcx
shrq $0x3, %rcx
xorl %edi, %edi
xorl %esi, %esi
movl $0x31, %edx
callq 0x743c
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x13a01
leaq 0x5b08(%rip), %rbx      # 0x194cc
xorl %ecx, %ecx
xorl %r14d, %r14d
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %r8
movl 0x7c(%rax), %r9d
leal 0x61(%r14), %ecx
movl %r14d, %edi
xorl %esi, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5320
incl %r14d
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq %r14, %rcx
cmpq %r14, %rdx
ja 0x139c9
movq (%r12), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
xorl %edi, %edi
callq 0x1093e
movq (%r15), %rax
movslq %ebx, %rcx
movq -0x308(%rax,%rcx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: ask_for_time()
int ask_for_time()
{
	clear_area(0,0,viewport_width,1);
	mvaddstr(0,0,"Choose delay (0 to 9 seconds). q or ESC to cancel");
	int t = -2;
	while(t == -2)
	{
		int kp = fgetch();
		if(kp == 'q' || kp == 'Q' || kp == KEY_ESC)
		{
			t = -1;
		}
		else if(kp >='0' && kp <= '9')
		{
			t = kp - '0';
		}
	}
	draw_scene();
	return t*10;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %edi, %edi
xorl %esi, %esi
movl $0x31, %edx
movl $0x1, %ecx
callq 0x743c
movq 0xd585(%rip), %r14      # 0x20fd8
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x13a78
movq (%r14), %rdi
leaq 0x5a80(%rip), %rsi      # 0x194ee
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movq (%r14), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x1b, %ebx
je 0x13aad
cmpl $0x51, %ebx
je 0x13aad
cmpl $0x71, %ebx
je 0x13aad
addl $-0x30, %ebx
cmpl $0xa, %ebx
cmovael %ebp, %ebx
movl %ebx, %r15d
cmpl $-0x2, %r15d
je 0x13a7d
xorl %edi, %edi
callq 0x1093e
addl %r15d, %r15d
leal (%r15,%r15,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: ask_for_wavelength()
int ask_for_wavelength()
{
	clear_area(0,0,viewport_width,3);
	mvaddstr(0,0,"Use which wavelength? Choosing a wavelength");
	mvaddstr(1,0,"already in use will destroy the existing link.");
	mvaddstr(2,0,"q or ESC to cancel");
	for (int i=0;i<WAVELENGTHS;i++)
	{
		item* a = rm_devices[i];
		if (a==NULL)
		{
			mvprintw(i+3,0,"(%d) no device detected",i+1);
		}
		else
		{
			mvprintw(i+3,0,"(%d) %s", a->name.c_str());
		}
	}
	int w = -2;
	while(w == -2)
	{
		int kp = fgetch();
		if(kp == 'q' || kp == 'Q' || kp == KEY_ESC)
		{
			w = -1;
		}
		else if(kp >'0' && kp <= '0'+WAVELENGTHS)
		{
			w = kp - '1';
		}
	}
	draw_scene();
	return w;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %edi, %edi
xorl %esi, %esi
movl $0x31, %edx
movl $0x3, %ecx
callq 0x743c
movq 0xd4e7(%rip), %r12      # 0x20fd8
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x13b18
movq (%r12), %rdi
leaq 0x5a12(%rip), %rsi      # 0x19520
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movq (%r12), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x13b42
movq (%r12), %rdi
leaq 0x5a14(%rip), %rsi      # 0x1954c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movq (%r12), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x13b6c
movq (%r12), %rdi
leaq 0x59ab(%rip), %rsi      # 0x1950d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movl $0x3, %ebx
leaq 0x868f8(%rip), %r13     # 0x9a470
leaq 0x59fc(%rip), %r14      # 0x1957b
leaq 0x5a0d(%rip), %r15      # 0x19593
xorl %ebp, %ebp
movq (%rbp,%r13), %rax
testq %rax, %rax
je 0x13ba6
movq 0x10(%rax), %rcx
movl %ebx, %edi
xorl %esi, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5320
jmp 0x13bb7
leal -0x2(%rbx), %ecx
movl %ebx, %edi
xorl %esi, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5320
incl %ebx
addq $0x8, %rbp
cmpq $0x28, %rbp
jne 0x13b88
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
movq (%r12), %rdi
callq 0x50f0
movl %eax, %ebp
callq 0x5130
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x1b, %ebp
je 0x13bf9
cmpl $0x51, %ebp
je 0x13bf9
cmpl $0x71, %ebp
je 0x13bf9
addl $-0x31, %ebp
cmpl $0x5, %ebp
cmovael %r14d, %ebp
movl %ebp, %ebx
cmpl $-0x2, %ebx
je 0x13bc9
xorl %edi, %edi
callq 0x1093e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: set_unconfigured(item*)
void set_unconfigured(item* dev)
{
	if(dev->player_has && dev->configuration != UNCONFIGURED)
	{
		inv_remove(dev);
		dev_inv[dev->device_type][UNCONFIGURED].push_back(dev);
	}
	if(dev->configuration == ON_TIMER)
	{
		dev->time_remaining = -1;
		kill_velement(timer_devices,dev);
	}
	else if(dev->configuration == ON_REMOTE)
	{
		rm_devices[dev->wavelength] = NULL;
		dev->wavelength = -1;
	}
	dev->configuration = UNCONFIGURED;
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
cmpb $0x1, 0x98(%rdi)
jne 0x13c86
movq %rdi, %rsi
movslq 0x8c(%rdi), %rax
testq %rax, %rax
je 0x13c86
movslq 0x70(%rsi), %rcx
movq 0xb2812(%rip), %rdx     # 0xc6450
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq (%rdx,%rcx,8), %rdi
callq 0x16158
movq (%rsp), %rax
movslq 0x70(%rax), %rcx
movq 0xb27ee(%rip), %rdx     # 0xc6450
leaq (%rcx,%rcx,2), %rcx
movq (%rdx,%rcx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x13c7e
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x13c86
movq %rsp, %rdx
callq 0x16d04
movq (%rsp), %rsi
movl 0x8c(%rsi), %eax
cmpl $0x2, %eax
je 0x13caf
cmpl $0x1, %eax
jne 0x13cc9
movl $0xffffffff, 0x7c(%rsi) # imm = 0xFFFFFFFF
leaq 0x867f0(%rip), %rdi     # 0x9a498
callq 0x16158
jmp 0x13cc9
movslq 0x74(%rsi), %rax
leaq 0x867b6(%rip), %rcx     # 0x9a470
movq $0x0, (%rcx,%rax,8)
movl $0xffffffff, 0x74(%rsi) # imm = 0xFFFFFFFF
movq (%rsp), %rax
movl $0x0, 0x8c(%rax)
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: set_timer(item*, int)
void set_timer(item* dev,int t)
{
	if(dev->configuration != ON_TIMER)
	{
		set_unconfigured(dev);
		timer_devices.push_back(dev);
		//if(dev->player_has)
		//{
		//	//inv_remove(dev);
		//	//dev_inv[dev->device_type][ON_TIMER].push_back(dev);
		//}
	}
	//if(dev->configuration == ON_REMOTE)
	//{
	//	rm_devices[dev->wavelength] = NULL;
	//	dev->wavelength = -1;
	//}
	if(dev->device_type == NOISE_GENERATOR)
	{
		dev->next_action = rand()%2+1;
	}
	dev->configuration = ON_TIMER;
	dev->time_remaining = t;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, 0x8(%rsp)
cmpl $0x1, 0x8c(%rdi)
je 0x13d26
callq 0x13c16
movq 0x867a6(%rip), %rsi     # 0x9a4a0
cmpq 0x867a7(%rip), %rsi     # 0x9a4a8
je 0x13d15
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8678d(%rip)     # 0x9a4a0
jmp 0x13d26
leaq 0x8677c(%rip), %rdi     # 0x9a498
leaq 0x8(%rsp), %rdx
callq 0x16d04
movq 0x8(%rsp), %rax
cmpl $0x3, 0x70(%rax)
jne 0x13d51
callq 0x5070
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
negl %ecx
addl %ecx, %eax
incl %eax
movq 0x8(%rsp), %rcx
movl %eax, 0x88(%rcx)
movq 0x8(%rsp), %rax
movl $0x1, 0x8c(%rax)
movl %ebx, 0x7c(%rax)
addq $0x10, %rsp
popq %rbx
retq