LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0xe3ab
movl 0x4(%rsi), %eax
cmpl $0x4, %eax
jg 0xe3cd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xac19(%rip), %rsi      # 0x18fbb
leaq 0xac17(%rip), %rdx      # 0x18fc0
jmp 0xe3c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xbda5(%rip), %rsi      # 0x1a15e
leaq 0xbda3(%rip), %rdx      # 0x1a163
movq %rbx, %rdi
callq 0x15b1a
movq %rbx, %rax
popq %rbx
retq
cmpl $0x8, %eax
ja 0xe3e9
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xabe1(%rip), %rsi      # 0x18fc1
leaq 0xabdf(%rip), %rdx      # 0x18fc6
jmp 0xe3c0
cmpl $0xe, %eax
ja 0xe405
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xabcb(%rip), %rsi      # 0x18fc7
leaq 0xabc9(%rip), %rdx      # 0x18fcc
jmp 0xe3c0
cmpl $0x16, %eax
ja 0xe421
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xabb5(%rip), %rsi      # 0x18fcd
leaq 0xabb3(%rip), %rdx      # 0x18fd2
jmp 0xe3c0
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpl $0x24, %eax
ja 0xe43d
leaq 0xab9f(%rip), %rsi      # 0x18fd3
leaq 0xab9d(%rip), %rdx      # 0x18fd8
jmp 0xe3c0
leaq 0xab95(%rip), %rsi      # 0x18fd9
leaq 0xab93(%rip), %rdx      # 0x18fde
jmp 0xe3c0
// File: /workspace/github_cpp_makefile_star2_O3/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, %bl
cmpb $0x0, 0x11c0d(%rip)     # 0x21312
jne 0xf7d7
movl %esi, %ebp
movl %edi, %r14d
movq 0x5edc9(%rip), %rax     # 0x6e4e0
movl 0x20(%rax), %r15d
movl 0x24(%rax), %r12d
leaq -0x231b(%rip), %r8      # 0xd40b
movl %r15d, %edi
movl %r12d, %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xf6ac
testb %al, %al
je 0xf755
subl %r14d, %r15d
imull %r15d, %r15d
subl %ebp, %r12d
imull %r12d, %r12d
addl %r15d, %r12d
cmpl $0x41, %r12d
jb 0xf7d7
movq 0x8ace4(%rip), %rax     # 0x9a440
cmpq %rax, 0x8ace5(%rip)     # 0x9a448
je 0xf7d1
movl $0x1, %ebx
xorl %ecx, %ecx
leaq -0x2368(%rip), %r15     # 0xd40b
movq (%rax,%rcx,8), %rax
movl 0x90(%rax), %r12d
movl 0x94(%rax), %r13d
movl %r12d, %edi
movl %r13d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %r15, %r8
callq 0xf6ac
testb %al, %al
je 0xf7b3
subl %r14d, %r12d
imull %r12d, %r12d
subl %ebp, %r13d
imull %r13d, %r13d
addl %r12d, %r13d
cmpl $0x41, %r13d
jb 0xf7d5
movl %ebx, %ecx
movq 0x8ac8c(%rip), %rdx     # 0x9a448
movq 0x8ac7d(%rip), %rax     # 0x9a440
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebx
cmpq %rcx, %rdx
ja 0xf773
xorl %ebx, %ebx
jmp 0xf7d7
movb $0x1, %bl
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_O3/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 0x8b0c(%rip), %xmm2     # 0x186a8
ucomisd %xmm1, %xmm2
ja 0xfc11
movb $0x2c, %al
movsd 0x8b04(%rip), %xmm2     # 0x186b0
ucomisd %xmm1, %xmm2
ja 0xfc11
movb $0x3a, %al
movsd 0x8afc(%rip), %xmm2     # 0x186b8
ucomisd %xmm1, %xmm2
ja 0xfc11
movb $0x3b, %al
movsd 0x8af4(%rip), %xmm2     # 0x186c0
ucomisd %xmm1, %xmm2
ja 0xfc11
movb $0x2d, %al
movsd 0x8aec(%rip), %xmm2     # 0x186c8
ucomisd %xmm1, %xmm2
ja 0xfc11
movb $0x3d, %al
movss 0x8428(%rip), %xmm1     # 0x18014
ucomiss %xmm0, %xmm1
ja 0xfc11
movb $0x2f, %al
movss 0x8491(%rip), %xmm1     # 0x1808c
ucomiss %xmm0, %xmm1
ja 0xfc11
movb $0x2a, %al
movss 0x848a(%rip), %xmm1     # 0x18094
ucomiss %xmm0, %xmm1
ja 0xfc11
movb $0x26, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x102c1
cmpl %r14d, %ecx
je 0x10303
movl %r13d, %eax
sarl %eax
movl 0xc(%rsp), %ebp
subl %eax, %ebp
testl %ebp, %ebp
js 0x102a4
testl %ebx, %ebx
jg 0x1029e
testl %ebp, %ebp
jne 0x1029e
xorl %ebp, %ebp
jmp 0x102a4
addl %r12d, %r15d
subl %r13d, %ebp
addl %ebx, %r14d
addl 0xc(%rsp), %ebp
movl %r15d, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0xfc12
cmpl %r14d, 0x10(%rsp)
jne 0x1028e
jmp 0x10303
cmpl %r15d, %edx
je 0x10303
movl 0xc(%rsp), %eax
sarl %eax
movl %r13d, %ebp
subl %eax, %ebp
testl %ebp, %ebp
js 0x102e9
testl %r12d, %r12d
jg 0x102e2
testl %ebp, %ebp
jne 0x102e2
xorl %ebp, %ebp
jmp 0x102e9
addl %ebx, %r14d
subl 0xc(%rsp), %ebp
addl %r12d, %r15d
addl %r13d, %ebp
movl %r15d, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0xfc12
cmpl %r15d, 0x14(%rsp)
jne 0x102d1
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_O3/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 0x5e17b(%rip), %rax     # 0x6e4e0
movl 0x20(%rax), %edi
movl 0x24(%rax), %esi
callq 0xf7e8
movq 0x5e169(%rip), %rax     # 0x6e4e0
movl 0x20(%rax), %ecx
cmpl $0x7d, %ecx
movl $0x7d, %edx
cmovll %ecx, %edx
cmpl $0x19, %edx
movl $0x18, %ebx
cmovgel %edx, %ebx
movl %ebx, 0x5de4a(%rip)     # 0x6e1e0
movl 0x24(%rax), %eax
movl $0x8c, %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
cmpl $0x9, %ecx
movl $0x8, %eax
cmovgel %ecx, %eax
movl %eax, 0x5de30(%rip)     # 0x6e1e4
addl $-0x18, %ebx
movzbl %bpl, %ebp
addl $-0x9, %eax
movl %eax, %r14d
incl %r14d
movl %ebx, %edi
movl %r14d, %esi
movl %ebp, %edx
callq 0xfc12
movl 0x5de0e(%rip), %eax     # 0x6e1e4
leal 0x9(%rax), %ecx
cmpl %ecx, %r14d
jl 0x103c1
movl 0x5ddfc(%rip), %ecx     # 0x6e1e0
leal 0x1(%rbx), %edx
addl $0x18, %ecx
cmpl %ecx, %ebx
movl %edx, %ebx
jl 0x103bb
callq 0xf035
movq 0x5e0cc(%rip), %rbx     # 0x6e4c8
movq 0x5e0cd(%rip), %r14     # 0x6e4d0
cmpq %r14, %rbx
je 0x10442
movq %r14, %rax
subq %rbx, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x108(%rip), %r15      # 0x1031e
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x170ce
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x171ff
callq 0x74d7
movq 0x10b8a(%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_O3/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 0x105a7
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 0x105a7
cmpl $0x95, %ebx
jg 0x105a7
cmpl $0x95, %r14d
jg 0x105a7
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0xafef
testb %al, %al
jne 0x105a7
cmpb $0x1, 0x8(%r15)
jne 0x10513
movq 0xb5f58(%rip), %rax     # 0xc6430
movq 0xb5f49(%rip), %rcx     # 0xc6428
subq %rcx, %rax
je 0x10513
sarq $0x3, %rax
movq 0x5dff1(%rip), %rdx     # 0x6e4e0
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
cmpb $0x1, 0x98(%rdi)
jne 0x10509
movq 0x20(%rdx), %r8
movq %r8, 0x90(%rdi)
incq %rsi
movl %esi, %edi
cmpq %rdi, %rax
ja 0x104f1
imulq $0x4b0, %r13, %rax      # imm = 0x4B0
leaq 0x5dfcf(%rip), %rcx     # 0x6e4f0
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 0x1054e
cmpl %r12d, 0x2c(%r15)
jne 0x1054e
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 0x10dd6(%rip), %rdx     # 0x21340
addq %rcx, %rdx
movslq (%rdx,%r14,4), %rcx
leaq 0x5dda0(%rip), %rdx     # 0x6e318
leaq 0x5dd81(%rip), %rsi     # 0x6e300
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 0xb2bd
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_O3/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 0x5dcac(%rip), %rcx     # 0x6e4f0
addq %rax, %rcx
movq $0x0, (%rcx,%rsi,8)
cmpq %rbx, 0x5dc6a(%rip)     # 0x6e4c0
jne 0x10863
movq $0x0, 0x5dc5d(%rip) # 0x6e4c0
movb $0x1, 0x1c(%rbx)
callq 0xf6f1
testb %al, %al
je 0x10910
movl $0xf0, %edx
addq (%rbx), %rdx
leaq 0x89e1(%rip), %rsi      # 0x19264
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x157ab
leaq 0x89d2(%rip), %rsi      # 0x19269
movq %r14, %rdi
callq 0x5410
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x108c6
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x108cd
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 0x5f0e
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x108fd
callq 0x5230
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10910
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 0x15f56
leaq 0x892d(%rip), %rsi      # 0x19270
movq %r14, %rdi
callq 0x5410
movl $0xf0, %edx
addq (%rbx), %rdx
leaq 0x891e(%rip), %rsi      # 0x19278
leaq 0x40(%rsp), %rdi
callq 0x157ab
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 0xb791
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10997
callq 0x5230
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x109a5
callq 0x5230
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x109c9
callq 0x5230
jmp 0x109c9
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x109ff
jmp 0x10a04
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x109f6
callq 0x5230
jmp 0x109f6
jmp 0x109f3
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x10a04
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc4c0
leaq 0x8(%rsp), %rbx
movw $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
callq 0x10a0c
leaq 0x8633(%rip), %rsi      # 0x19290
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 0x15b1a
leaq 0x85fa(%rip), %rcx      # 0x19293
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 0x10cd2
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x10cd9
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 0x993b(%rip), %rsi      # 0x1a637
callq 0x5410
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10d29
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x10d31
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 0x5f0e
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x10d61
callq 0x5230
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x10d70
callq 0x5230
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x10d7f
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 0x10da2
callq 0x5230
jmp 0x10da2
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x10db6
callq 0x5230
jmp 0x10db6
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x10dc5
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x10545(%rip)     # 0x21320
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x84b7(%rip), %rsi      # 0x192a2
leaq 0x84cb(%rip), %rdx      # 0x192bd
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x15b1a
movq %rbx, %rdi
callq 0x5f0e
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10e16
callq 0x5230
callq 0x10c2f
xorl %edi, %edi
callq 0x10355
movq 0x101af(%rip), %r14     # 0x20fd8
movq (%r14), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
cmpl $0x51, %ebx
jne 0x10e29
callq 0x52d0
xorl %edi, %edi
callq 0x52f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10e5b
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5d389(%rip), %rax     # 0x6e1fc
imulq $0x258, %rax, %rax      # imm = 0x258
movslq 0x5d37f(%rip), %rcx     # 0x6e200
leaq 0x104b8(%rip), %r14     # 0x21340
addq %r14, %rax
cmpl $0x5, 0x4b0(%rax,%rcx,4)
jne 0x10ec8
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8419(%rip), %rsi      # 0x192be
leaq 0x8444(%rip), %rdx      # 0x192f0
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x15b1a
movq %rbx, %rdi
callq 0x5f0e
movq 0x20(%rsp), %rdi
jmp 0x10ef6
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8419(%rip), %rsi      # 0x192f1
leaq 0x845a(%rip), %rdx      # 0x19339
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x15b1a
movq %rbx, %rdi
callq 0x5f0e
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x10f00
callq 0x5230
callq 0xc4c0
movb $0x1, %al
movb %al, 0x10419(%rip)      # 0x21326
movb %al, 0x10414(%rip)      # 0x21327
callq 0x10c2f
movslq 0x5d2dd(%rip), %rax     # 0x6e1fc
imulq $0x258, %rax, %rax      # imm = 0x258
movslq 0x5d2d3(%rip), %rcx     # 0x6e200
addq %r14, %rax
movl $0xa, 0x4b0(%rax,%rcx,4)
xorl %edi, %edi
callq 0x10355
movq 0x1008f(%rip), %r14     # 0x20fd8
movq (%r14), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
cmpl $0x51, %ebx
jne 0x10f49
callq 0x52d0
xorl %edi, %edi
callq 0x52f0
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x10f7a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x10f84
callq 0x5230
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movq %rdi, %rbp
movslq 0x20(%rdi), %rdx
movslq 0x24(%rdi), %rsi
imulq $0x258, %rdx, %rax      # imm = 0x258
leaq 0x2572a(%rip), %rcx     # 0x372d0
addq %rcx, %rax
movss (%rax,%rsi,4), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x5c666(%rip), %rbx     # 0x6e220
movq 0x5c667(%rip), %r14     # 0x6e228
cmpq %r14, %rbx
je 0x11c2f
leaq 0x8(%rbx), %rax
cmpq %r14, %rax
je 0x11c2f
movl $0x8, %r15d
callq 0x5070
cltq
movq %r15, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %r15
je 0x11c18
leaq (%rbx,%rdx,8), %rax
movl (%rbx,%r15), %ecx
movl (%rax), %edx
movl %edx, (%rbx,%r15)
movl %ecx, (%rax)
movl 0x4(%rbx,%r15), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%rbx,%r15)
movl %ecx, 0x4(%rax)
leaq (%rbx,%r15), %rax
addq $0x8, %rax
addq $0x8, %r15
cmpq %r14, %rax
jne 0x11bd5
movl 0x20(%rbp), %edx
movl 0x24(%rbp), %esi
xorl %r14d, %r14d
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
leaq 0x68c7(%rip), %rax      # 0x18510
movl (%rax,%r14,8), %ebx
movl 0x4(%rax,%r14,8), %r13d
movq %rdx, 0x10(%rsp)
leal (%rdx,%rbx), %r15d
movq %rsi, 0x18(%rsp)
leal (%rsi,%r13), %r12d
movq %rbp, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0xafef
testb %al, %al
je 0x11c85
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
jmp 0x11d15
movslq %r15d, %rax
movslq %r12d, %rcx
imulq $0x258, %rax, %rax      # imm = 0x258
leaq 0x25637(%rip), %r15     # 0x372d0
addq %r15, %rax
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x10(%rsp)
callq 0x5070
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x6349(%rip), %xmm0     # 0x18004
movslq 0x20(%rbp), %rdx
movslq 0x24(%rbp), %rsi
imulq $0x258, %rdx, %rax      # imm = 0x258
addq %r15, %rax
mulss (%rax,%rsi,4), %xmm0
mulss 0x63aa(%rip), %xmm0     # 0x18084
addss 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm3
ucomiss %xmm3, %xmm0
movaps %xmm3, %xmm1
cmpnless %xmm0, %xmm1
movaps %xmm1, %xmm2
andnps %xmm0, %xmm2
andps %xmm3, %xmm1
cmovbl 0x8(%rsp), %r13d
cmovbl 0xc(%rsp), %ebx
orps %xmm2, %xmm1
movaps %xmm1, 0x20(%rsp)
movl %r13d, 0x8(%rsp)
movl %ebx, 0xc(%rsp)
incq %r14
cmpq $0x8, %r14
jne 0x11c42
movq %rbp, %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10460
// File: /workspace/github_cpp_makefile_star2_O3/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 0x67a0(%rip), %r15      # 0x18510
leaq 0xf5c9(%rip), %r12      # 0x21340
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 0x11dbc
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 0x11ddc
callq 0x5070
cltd
idivl %r13d
movslq %edx, %rax
movl (%rsp,%rax,8), %esi
movl 0x4(%rsp,%rax,8), %edx
movq %rbx, %rdi
callq 0x10460
addq $0x8, %r14
cmpq $0x40, %r14
jne 0x11d7a
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5bf70(%rip), %rax     # 0x6e4e0
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 0x50c4a(%rip), %r15     # 0x631f0
movq 0x8(%rsp), %r14
movl %r14d, %eax
orl %ebx, %eax
js 0x125e2
cmpq $0x95, %rbx
jg 0x125e2
cmpq $0x95, %r14
jg 0x125e2
leaq (%r14,%rbp), %r13
cmpb $0x0, (%r15,%r13)
jne 0x125e2
movl %ebx, %edi
movl %r14d, %esi
callq 0xf6f1
testb %al, %al
je 0x125e2
movb $0x1, (%r15,%r13)
leaq 0x1(%r14), %rax
cmpq %r12, %r14
movq %rax, %r14
jl 0x125ab
leaq 0x1(%rbx), %rax
addq $0x96, %rbp
cmpq 0x10(%rsp), %rbx
movq %rax, %rbx
jl 0x125a6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb3124(%rip), %rcx     # 0xc6440
leaq (%rax,%rax,2), %rax
movslq %esi, %rdx
movq (%rcx,%rax,8), %rax
leaq (%rdx,%rdx,2), %rcx
leaq (%rax,%rcx,8), %r15
movq 0xdca2(%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 0x742a
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x133ac
leaq 0x61cd(%rip), %rbx      # 0x1953c
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 0x13374
movq (%r12), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
xorl %edi, %edi
callq 0x10355
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_O3/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 %r15
pushq %r14
pushq %rbx
xorl %edi, %edi
xorl %esi, %esi
movl $0x31, %edx
movl $0x1, %ecx
callq 0x742a
movq 0xdbdc(%rip), %r14      # 0x20fd8
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x13421
movq (%r14), %rdi
leaq 0x6147(%rip), %rsi      # 0x1955e
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movq (%r14), %rdi
callq 0x50f0
movl %eax, %ebx
callq 0x5130
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x1b, %ebx
je 0x13450
cmpl $0x51, %ebx
je 0x13450
cmpl $0x71, %ebx
je 0x13450
addl $-0x30, %ebx
movl %ebx, %r15d
cmpl $0x9, %ebx
ja 0x13421
xorl %edi, %edi
callq 0x10355
addl %r15d, %r15d
leal (%r15,%r15,4), %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x742a
movq 0xdb4f(%rip), %r12      # 0x20fd8
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x134b0
movq (%r12), %rdi
leaq 0x60ea(%rip), %rsi      # 0x19590
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movq (%r12), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x134da
movq (%r12), %rdi
leaq 0x60ec(%rip), %rsi      # 0x195bc
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movq (%r12), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5280
cmpl $-0x1, %eax
je 0x13504
movq (%r12), %rdi
leaq 0x6083(%rip), %rsi      # 0x1957d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x50d0
movl $0x3, %ebx
leaq 0x86f50(%rip), %r13     # 0x9a460
leaq 0x60d4(%rip), %r14      # 0x195eb
leaq 0x60e5(%rip), %r15      # 0x19603
xorl %ebp, %ebp
movq (%rbp,%r13), %rax
testq %rax, %rax
je 0x1353e
movq 0x10(%rax), %rcx
movl %ebx, %edi
xorl %esi, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5320
jmp 0x1354f
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 0x13520
jmp 0x13571
cmpl $0x51, %ebp
je 0x1358b
cmpl $0x71, %ebp
je 0x1358b
addl $-0x31, %ebp
movl %ebp, %ebx
cmpl $0x4, %ebp
jbe 0x1358b
movq (%r12), %rdi
callq 0x50f0
movl %eax, %ebp
callq 0x5130
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x1b, %ebp
jne 0x1355d
xorl %edi, %edi
callq 0x10355
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_O3/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rdi, 0x8(%rsp)
cmpb $0x1, 0x98(%rdi)
jne 0x1361f
movslq 0x8c(%rbx), %rax
testq %rax, %rax
je 0x1361f
movslq 0x70(%rbx), %rcx
movq 0xb2e70(%rip), %rdx     # 0xc6440
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq (%rdx,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x15a0e
movslq 0x70(%rbx), %rax
movq 0xb2e4d(%rip), %rcx     # 0xc6440
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x1360f
movq %rbx, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x1361f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0x1658c
movq (%rbx), %rbx
movl 0x8c(%rbx), %eax
cmpl $0x2, %eax
je 0x1364c
cmpl $0x1, %eax
jne 0x13666
movl $0xffffffff, 0x7c(%rbx) # imm = 0xFFFFFFFF
leaq 0x86e4b(%rip), %rdi     # 0x9a488
movq %rbx, %rsi
callq 0x15a0e
movq 0x8(%rsp), %rbx
jmp 0x13666
movslq 0x74(%rbx), %rax
leaq 0x86e09(%rip), %rcx     # 0x9a460
movq $0x0, (%rcx,%rax,8)
movl $0xffffffff, 0x74(%rbx) # imm = 0xFFFFFFFF
movl $0x0, 0x8c(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq %rdi, (%rsp)
cmpl $0x1, 0x8c(%rdi)
je 0x136c6
movq %r14, %rdi
callq 0x135a3
movq 0x86df5(%rip), %rsi     # 0x9a490
cmpq 0x86df6(%rip), %rsi     # 0x9a498
je 0x136b1
movq %r14, (%rsi)
addq $0x8, 0x86de1(%rip)     # 0x9a490
jmp 0x136c6
leaq 0x86dd0(%rip), %rdi     # 0x9a488
movq %rsp, %r14
movq %r14, %rdx
callq 0x1658c
movq (%r14), %r14
cmpl $0x3, 0x70(%r14)
jne 0x136ed
callq 0x5070
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
negl %ecx
addl %ecx, %eax
incl %eax
movq (%rsp), %r14
movl %eax, 0x88(%r14)
movl $0x1, 0x8c(%r14)
movl %ebx, 0x7c(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: set_remote(item*, int)
void set_remote(item* dev,int w)
{
	if(dev->player_has && dev->configuration != ON_REMOTE)
	{
		set_unconfigured(dev);
		inv_remove(dev);
		dev_inv[dev->device_type][ON_REMOTE].push_back(dev);
	}
	//if(dev->configuration == ON_TIMER)
	//{
	//	dev->time_remaining = -1;
	//	kill_velement(timer_devices,dev);
	//}
	dev->configuration = ON_REMOTE;
	dev->wavelength = w;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq %rdi, (%rsp)
cmpb $0x1, 0x98(%rdi)
jne 0x1378f
cmpl $0x2, 0x8c(%r14)
je 0x1378f
movq %r14, %rdi
callq 0x135a3
movslq 0x70(%r14), %rax
movq 0xb2d09(%rip), %rcx     # 0xc6440
leaq (%rax,%rax,2), %rax
movslq 0x8c(%r14), %rdx
leaq (%rdx,%rdx,2), %rdi
shlq $0x3, %rdi
addq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0x15a0e
movslq 0x70(%r14), %rax
movq 0xb2cdf(%rip), %rcx     # 0xc6440
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdi
movq 0x38(%rdi), %rsi
cmpq 0x40(%rdi), %rsi
je 0x1377d
movq %r14, (%rsi)
addq $0x8, 0x38(%rdi)
jmp 0x1378f
addq $0x30, %rdi
movq %rsp, %r14
movq %r14, %rdx
callq 0x1658c
movq (%r14), %r14
movl $0x2, 0x8c(%r14)
movl %ebx, 0x74(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: autotarget()
int autotarget()
{
	int tab_ind = -1;
	if(current_target == NULL || current_target == p_ptr)
	{
		if(visible_actors.size() == 0)
		{
			current_target = p_ptr;
		}
		else
		{
			current_target = visible_actors[0];
			tab_ind = 0;
		}
	}
	if(!symmetrical_los(current_target->x,current_target->y,p_ptr->x,p_ptr->y,is_opaque))
	{
		if(visible_actors.size() == 0)
		{
			current_target = p_ptr;
		}
		else
		{
			current_target = visible_actors[0];
			tab_ind = 0;
		}
	}
	return tab_ind;
}

// Assembly:
pushq %rbx
movq 0x5a775(%rip), %rcx     # 0x6e4c0
testq %rcx, %rcx
sete %dl
movq 0x5a788(%rip), %rax     # 0x6e4e0
cmpq %rax, %rcx
sete %sil
orb %dl, %sil
cmpb $0x1, %sil
jne 0x13d7f
movq 0x5a759(%rip), %rcx     # 0x6e4c8
cmpq %rcx, 0x5a75a(%rip)     # 0x6e4d0
je 0x13d86
movq (%rcx), %rcx
xorl %ebx, %ebx
jmp 0x13d8e
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x13d95
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rcx
movq %rcx, 0x5a72b(%rip)     # 0x6e4c0
movl 0x20(%rcx), %edi
movl 0x24(%rcx), %esi
movl 0x20(%rax), %edx
movl 0x24(%rax), %ecx
leaq -0x699d(%rip), %r8      # 0xd40b
callq 0xf6ac
testb %al, %al
jne 0x13dd9
movq 0x5a710(%rip), %rax     # 0x6e4c8
xorl %ecx, %ecx
cmpq %rax, 0x5a70f(%rip)     # 0x6e4d0
leaq 0x5a718(%rip), %rdx     # 0x6e4e0
cmovneq %rax, %rdx
cmovnel %ecx, %ebx
movq (%rdx), %rax
movq %rax, 0x5a6e7(%rip)     # 0x6e4c0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: diffuse_scent_human()
void diffuse_scent_human()
{
	for (int x=0;x<MAP_SIZE;x++)
	{
		for(int y=0; y < MAP_SIZE;y++)
		{
			if(!is_wall(x,y))
			{
				spare_scent_map[x][y] = map_human_scent[x][y];
				int count = 1;
				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(!undiffusable(xx,yy))
					{
						spare_scent_map[x][y] += map_human_scent[xx][yy];
						count++;
					}
				}
				map_human_scent[x][y] = 0.9999f*spare_scent_map[x][y]/count;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %eax, %eax
leaq 0xc5e2(%rip), %rcx      # 0x21340
leaq 0x2256b(%rip), %rdx     # 0x372d0
leaq 0x37a4(%rip), %rdi      # 0x18510
movss 0x332c(%rip), %xmm0     # 0x180a0
imulq $0x258, %rax, %r8       # imm = 0x258
leaq (%rcx,%r8), %r9
leaq (%rdx,%r8), %rsi
movq %rsi, -0x10(%rsp)
leaq 0x384d1(%rip), %rsi     # 0x4d260
addq %rsi, %r8
movq %r8, -0x8(%rsp)
movq %rax, -0x18(%rsp)
movslq %eax, %r11
xorl %ebx, %ebx
cmpl $0x4, (%r9,%rbx,4)
je 0x14e31
movq -0x10(%rsp), %rax
leaq (%rax,%rbx,4), %r14
movss (%r14), %xmm1
movq -0x8(%rsp), %rax
leaq (%rax,%rbx,4), %r15
movss %xmm1, (%r15)
movl $0x1, %ebp
movslq %ebx, %r12
xorl %r13d, %r13d
movslq (%rdi,%r13,8), %rax
addq %r11, %rax
movslq 0x4(%rdi,%r13,8), %rsi
addq %r12, %rsi
imulq $0x258, %rax, %rax      # imm = 0x258
leaq (%rcx,%rax), %r10
movl (%r10,%rsi,4), %r10d
leal -0x6(%r10), %r8d
cmpl $0x7, %r8d
jae 0x14e06
incq %r13
cmpq $0x8, %r13
jne 0x14dd3
jmp 0x14e1d
cmpl $0x4, %r10d
je 0x14dfb
addq %rdx, %rax
addss (%rax,%rsi,4), %xmm1
movss %xmm1, (%r15)
incl %ebp
jmp 0x14dfb
xorps %xmm2, %xmm2
cvtsi2ss %ebp, %xmm2
mulss %xmm0, %xmm1
divss %xmm2, %xmm1
movss %xmm1, (%r14)
incq %rbx
cmpq $0x96, %rbx
jne 0x14da1
movq -0x18(%rsp), %rax
incq %rax
cmpq $0x96, %rax
jne 0x14d74
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: main
int main()
{
	srand((unsigned int)time(NULL));
	init();
#ifdef KILL_ESCAPE
	ESCDELAY=0;
#endif
	int end_game = 0;
	for(turn_count = 0;!end_game; turn_count++)
	{
		end_game = play_turn();
	}
	endwin();
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x5220
movl %eax, %edi
callq 0x5240
callq 0xddfc
movq 0xb941(%rip), %rax      # 0x20fc8
movl $0x0, (%rax)
movl %ebx, 0xbc81(%rip)      # 0x21314
callq 0x14e60
movl 0xbc76(%rip), %ebx      # 0x21314
incl %ebx
jmp 0x1568d
// File: /workspace/github_cpp_makefile_star2_O3/syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::rdp()
rdp()
    {
        disks = 4;
        pnumRdp = 257;
        stripe_unit_size = DATA_LENGTH;
        w = pnumRdp - 1;
        allDisks = disks + TOLERENCE;

        idata=(char **)malloc(sizeof(char *)*disks);
        for(int i=0; i<disks; i++)
        {
            idata[i]=(char *) malloc(sizeof(char)*stripe_unit_size);
            memset(idata[i],0,stripe_unit_size);
        }

        odata=(char **)malloc(sizeof(char *)*TOLERENCE);
        for(int i=0; i<TOLERENCE; i++)
        {
            odata[i]=(char *) malloc(sizeof(char)*stripe_unit_size);
            memset(odata[i],0,stripe_unit_size);
        }

        data=(char **)malloc(sizeof(char *)*allDisks);
        for(int i=0; i<allDisks; i++)
        {
            data[i]=(char *) malloc(sizeof(char)*stripe_unit_size);
            memset(data[i],0,stripe_unit_size);
        }

        inthis = (int *)malloc(sizeof(int *)*allDisks);

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3a8e(%rip), %rax      # 0x4d60
movq %rax, (%rdi)
movabsq $0x40000000004, %rax    # imm = 0x40000000004
movq %rax, 0x8(%rdi)
movl $0x101, 0x10(%rdi)      # imm = 0x101
movabsq $0x600000100, %rax      # imm = 0x600000100
movq %rax, 0x14(%rdi)
movl $0x20, %edi
callq 0x10a0
movq %rax, 0x20(%rbx)
xorl %r15d, %r15d
movslq 0xc(%rbx), %r14
movq %r14, %rdi
callq 0x10a0
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1050
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x1309
movl $0x10, %edi
callq 0x10a0
movq %rax, %r14
movq %rax, 0x28(%rbx)
movslq 0xc(%rbx), %r15
movq %r15, %rdi
callq 0x10a0
movq %rax, (%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1050
movq %r15, %rdi
callq 0x10a0
movq 0x28(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1050
movslq 0x18(%rbx), %r15
leaq (,%r15,8), %r14
movq %r14, %rdi
callq 0x10a0
movq %rax, 0x30(%rbx)
testq %r15, %r15
jle 0x13e0
xorl %r15d, %r15d
movslq 0xc(%rbx), %r14
movq %r14, %rdi
callq 0x10a0
movq 0x30(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1050
incq %r15
movslq 0x18(%rbx), %r14
cmpq %r14, %r15
jl 0x13aa
shlq $0x3, %r14
movq %r14, %rdi
callq 0x10a0
movq %rax, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::setData()
void setData()
    {
        for(int i = 0; i < disks; i++)
        {
            for(int j = 0; j < stripe_unit_size; j++)
            {
                idata[i][j]=(char) ('a' + i);
            }
        }

        memcpy(odata[0], idata[0], stripe_unit_size* sizeof(char));
        memcpy(odata[1], idata[0], stripe_unit_size* sizeof(char));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %edx
testl %edx, %edx
jle 0x146b
movl 0xc(%rbx), %ecx
xorl %eax, %eax
testl %ecx, %ecx
jle 0x145e
leal 0x61(%rax), %edx
xorl %esi, %esi
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movb %dl, (%rcx,%rsi)
incq %rsi
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rsi
jl 0x1444
movl 0x8(%rbx), %edx
incq %rax
movslq %edx, %rsi
cmpq %rsi, %rax
jl 0x143b
jmp 0x146e
movl 0xc(%rbx), %ecx
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rdx
movq (%rdx), %rdi
movq (%rax), %rsi
movslq %ecx, %rdx
callq 0x1070
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x8(%rcx), %rdi
movq (%rax), %rsi
movslq 0xc(%rbx), %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1070
// File: /workspace/github_cpp_makefile_star2_O3/syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::outputOrigin()
void outputOrigin()
    {

        printf("After decoding:");
        for(int i=0; i < disks; i++)
        {
            printf("idata:%d:  ",i);
            printf(idata[i]);
            printf("\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18e7(%rip), %rdi      # 0x305d
xorl %eax, %eax
callq 0x1040
cmpl $0x0, 0x8(%rbx)
jle 0x17bf
leaq 0x18b1(%rip), %r14      # 0x303b
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1040
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10b0
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x178d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::outputData()
void outputData()
    {

        printf("The res:");
        printf("odata:0:  ");
        printf(odata[0]);
        printf("\n");
        printf("odata:1:  ");
        printf(odata[1]);
        printf("\n");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1893(%rip), %rdi      # 0x306d
xorl %eax, %eax
callq 0x1040
leaq 0x185f(%rip), %rdi      # 0x3047
xorl %eax, %eax
callq 0x1040
movq 0x28(%rbx), %rax
movq (%rax), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10b0
leaq 0x1844(%rip), %rdi      # 0x3052
xorl %eax, %eax
callq 0x1040
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10b0
// File: /workspace/github_cpp_makefile_star2_O3/syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::outputRes()
void outputRes()
    {

        for(int i=0; i < disks; i++)
        {
            printf("idata:%d:  ",i);
            printf(idata[i]);
            printf("\n");
        }
        printf("odata:0:  ");
        printf(odata[0]);
        printf("\n");
        printf("odata:1:  ");
        printf(odata[1]);
        printf("\n");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x1921
leaq 0x174f(%rip), %r14      # 0x303b
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1040
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10b0
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x18ef
leaq 0x171f(%rip), %rdi      # 0x3047
xorl %eax, %eax
callq 0x1040
movq 0x28(%rbx), %rax
movq (%rax), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10b0
leaq 0x1704(%rip), %rdi      # 0x3052
xorl %eax, %eax
callq 0x1040
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10b0