LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/interface.c
// Function: printWeapon
void printWeapon(WINDOW *win, Weapons weaponHold)
{
	wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');
	mvwprintw(win,1,1,"WEAPON :");
	wattron(win,A_UNDERLINE);
	mvwprintw(win,2,(30-strlen(weaponHold.name))/2,"%s",weaponHold.name);
	wattroff(win,A_UNDERLINE);

	if(weaponHold.type > 0)
	{
		printBar(win,"AMMO",weaponHold.state,4,2,247);
		mvwprintw(win,5,2,"RANGE: %d",weaponHold.range);
	}
	else if(weaponHold.indice != 3)
	{
		printBar(win,"STATE",weaponHold.state,4,2,247);
	}

	mvwprintw(win,6,2,"DAMAGES: %d",weaponHold.degat);

	wrefresh(win);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rsp), %r15
subq $0x8, %rsp
pushq $0x2b
popq %r9
pushq $0x7c
popq %rdx
pushq $0x2d
popq %rcx
movl %edx, %esi
movl %ecx, %r8d
pushq %r9
pushq %r9
pushq %r9
callq 0x1120
addq $0x20, %rsp
leaq 0x793b(%rip), %rcx      # 0xe236
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %edx, %edx
callq 0x11c0
movq (%r15), %r14
movq %r14, %rdi
callq 0x10f0
pushq $0x1e
popq %rdx
subq %rax, %rdx
shrq %rdx
leaq 0x79e5(%rip), %rcx      # 0xe319
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %edx, %edx
callq 0x1060
cmpl $0x0, 0x24(%r15)
jle 0x6998
movl 0x1c(%r15), %edx
leaq 0x78da(%rip), %rsi      # 0xe23f
pushq $0x4
popq %rcx
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %r8d
movl $0xf7, %r9d
callq 0x667f
movl 0x20(%r15), %r8d
leaq 0x78bd(%rip), %rcx      # 0xe244
pushq $0x5
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1070
jmp 0x69bf
cmpl $0x3, 0x2c(%r15)
je 0x69bf
movl 0x1c(%r15), %edx
leaq 0x78a4(%rip), %rsi      # 0xe24e
pushq $0x4
popq %rcx
pushq $0x2
popq %r8
movq %rbx, %rdi
movl $0xf7, %r9d
callq 0x667f
movl 0x10(%r15), %r8d
leaq 0x788a(%rip), %rcx      # 0xe254
pushq $0x6
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/interface.c
// Function: setMessage
void setMessage(WINDOW *win, char message[], int colorPair)
{
	wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');
	wattron(win,A_UNDERLINE);
	mvwprintw(win,1,1,"MESSAGES:");
	wattroff(win,A_UNDERLINE);

	if(colorPair != 0)
	{
		wattron(win,COLOR_PAIR(colorPair));
		mvwprintw(win,2,1,message);
		wattroff(win,COLOR_PAIR(colorPair));	
	}
	else
	{
		mvwprintw(win,2,1,message);
	}

	wrefresh(win);	
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
subq $0x8, %rsp
pushq $0x2b
popq %r9
pushq $0x7c
popq %rdx
pushq $0x2d
popq %rcx
movl %edx, %esi
movl %ecx, %r8d
pushq %r9
pushq %r9
pushq %r9
callq 0x1120
addq $0x20, %rsp
movq %rbx, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %edx, %edx
callq 0x11c0
leaq 0x740d(%rip), %rcx      # 0xe396
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %edx, %edx
callq 0x1060
testl %ebp, %ebp
je 0x6fde
shll $0x8, %ebp
movzwl %bp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x11c0
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1060
jmp 0x6ff1
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/interface.c
// Function: printArmor
void printArmor(WINDOW *win, Armor armor)
{
	wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');
	mvwprintw(win,1,1,"ARMOR :");
	wattron(win,A_UNDERLINE);
	mvwprintw(win,2,(30-strlen(armor.name))/2,"%s",armor.name);
	wattroff(win,A_UNDERLINE);

	if(armor.indice != 10)
		printBar(win,"STATE",armor.state,4,2,247);
	
	mvwprintw(win,6,2,"RESISTANCE: %d",armor.resistance);

	wrefresh(win);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
subq $0x8, %rsp
pushq $0x2b
popq %r9
pushq $0x7c
popq %rdx
pushq $0x2d
popq %rcx
movl %edx, %esi
movl %ecx, %r8d
pushq %r9
pushq %r9
pushq %r9
callq 0x1120
addq $0x20, %rsp
leaq 0x736d(%rip), %rcx      # 0xe3a0
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %edx, %edx
callq 0x11c0
movq (%r15), %r14
movq %r14, %rdi
callq 0x10f0
pushq $0x1e
popq %rdx
subq %rax, %rdx
shrq %rdx
leaq 0x72ad(%rip), %rcx      # 0xe319
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %edx, %edx
callq 0x1060
cmpl $0xa, 0x20(%r15)
je 0x70b2
movl 0x18(%r15), %edx
leaq 0x71b1(%rip), %rsi      # 0xe24e
pushq $0x4
popq %rcx
pushq $0x2
popq %r8
movq %rbx, %rdi
movl $0xf7, %r9d
callq 0x667f
movl 0x14(%r15), %r8d
leaq 0x72eb(%rip), %rcx      # 0xe3a8
pushq $0x6
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1100
nop
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/item.c
// Function: shuffleDrugs
void shuffleDrugs(Map map[LONGUEUR][LARGEUR], Drug drugs[], int nbrDrugs, int *nbrDrugsInFloor)
{
	srand(time(NULL));

	int i = 0;

	*nbrDrugsInFloor = rand()%nbrDrugs+4;
	for(i = 0; i < *nbrDrugsInFloor; i++)
	{
		int indiceDrug = rand()%NBR_DRUGS;
		drugs[i].color = indiceDrug+COLOR_DRUGS;
		drugs[i].indice = i;
		drugs[i].type = indiceDrug;
		drugs[i].poisoned = rand()%4;
		drugs[i].discovered = 0;

		int posX = 0;
		int posY = 0;

		while(posX == 0 || posY == 0 || posX == LONGUEUR || posY == LARGEUR)
		{
			posX = rand()%LONGUEUR;
			posY = rand()%LARGEUR;
		}

		drugs[i].x = posX;
		drugs[i].y = posY;
		map[posX][posY].content = DRUG;
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x1210
movl %eax, %edi
callq 0x1170
callq 0x11d0
cltd
idivl %ebp
addl $0x4, %edx
movq %rbx, 0x10(%rsp)
movl %edx, (%rbx)
pushq $0x27
popq %r13
movl $0x82, %r15d
movslq %edx, %rax
cmpq %rax, %r12
jge 0x71c7
callq 0x11d0
cltd
pushq $0x7
popq %rcx
idivl %ecx
leal 0x32(%rdx), %eax
imulq $0x1c, %r12, %rbp
leaq (%r14,%rbp), %rbx
movl %eax, 0x8(%r14,%rbp)
movl %r12d, 0xc(%r14,%rbp)
movl %edx, (%r14,%rbp)
callq 0x11d0
cltd
pushq $0x4
popq %rcx
idivl %ecx
movl %edx, 0x4(%r14,%rbp)
andl $0x0, 0x10(%r14,%rbp)
xorl %ebp, %ebp
xorl %edx, %edx
testl %ebp, %ebp
sete %al
testl %edx, %edx
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x7195
callq 0x11d0
cltd
idivl %r13d
movl %edx, %ebp
callq 0x11d0
cltd
idivl %r15d
jmp 0x716e
movl %ebp, 0x14(%rbx)
movl %edx, 0x18(%rbx)
movslq %ebp, %rax
movslq %edx, %rcx
imulq $0xe38, %rax, %rax      # imm = 0xE38
addq 0x8(%rsp), %rax
imulq $0x1c, %rcx, %rcx
movl $0x5, (%rcx,%rax)
incq %r12
movq 0x10(%rsp), %rax
movl (%rax), %edx
jmp 0x7124
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/item.c
// Function: testDrug
int testDrug(Drug drugList[], int x, int y, int nbrDrugsInFloor)
{
	int ret = -1;
	int i = 0;

	for(i = 0; i < nbrDrugsInFloor; i++)
	{
		if(drugList[i].x == x && drugList[i].y == y)
		{
			ret = i;
			break;
		}
	}

	return ret;
}

// Assembly:
xorl %r8d, %r8d
testl %ecx, %ecx
cmovlel %r8d, %ecx
addq $0x18, %rdi
pushq $-0x1
popq %rax
cmpq %r8, %rcx
je 0x7200
cmpl %esi, -0x4(%rdi)
jne 0x71f4
cmpl %edx, (%rdi)
je 0x71fd
incq %r8
addq $0x1c, %rdi
jmp 0x71e6
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/item.c
// Function: testWeapon
int testWeapon(Weapons weapons[],int x, int y, int nbrWeapons)
{
	int ret = -1;
	int i = 0;

	for(i = 0; i < nbrWeapons; i++)
	{
		if(weapons[i].x == x && weapons[i].y == y)
		{
			ret = i;
			break;
		}
	}


	return ret;
}

// Assembly:
xorl %r8d, %r8d
testl %ecx, %ecx
cmovlel %r8d, %ecx
addq $0x38, %rdi
pushq $-0x1
popq %rax
cmpq %r8, %rcx
je 0x722b
cmpl %esi, -0x4(%rdi)
jne 0x721f
cmpl %edx, (%rdi)
je 0x7228
incq %r8
addq $0x40, %rdi
jmp 0x7211
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/item.c
// Function: testArmor
int testArmor(Armor armor[],int x, int y, int nbrArmors)
{
	int ret = -1;
	int i = 0;

	for(i = 0; i < nbrArmors; i++)
	{
		if(armor[i].x == x && armor[i].y == y)
		{
			ret = i;
			break;
		}
	}


	return ret;
}

// Assembly:
xorl %r8d, %r8d
testl %ecx, %ecx
cmovlel %r8d, %ecx
addq $0x2c, %rdi
pushq $-0x1
popq %rax
cmpq %r8, %rcx
je 0x7256
cmpl %esi, -0x4(%rdi)
jne 0x724a
cmpl %edx, (%rdi)
je 0x7253
incq %r8
addq $0x30, %rdi
jmp 0x723c
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/map.c
// Function: initMap
void initMap(Map map[LONGUEUR][LARGEUR], WINDOW *win)
{
	wclear(win);
	box(win,0,0);
	
	int i,j = 0;

	for(i = 0; i < LARGEUR; i++)
	{
		for(j = 0; j < LONGUEUR; j++)
		{
			map[j][i].content = 0;
			map[j][i].seen = 0;
			map[j][i].effect = 0;
			map[j][i].typeEnnemy = 0;
			map[j][i].typePnj = -1;
			map[j][i].trap = 0;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1030
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1120
pushq $0x18
popq %rax
xorps %xmm0, %xmm0
cmpq $0x82, %r15
je 0x8087
movq %rax, %rcx
cmpq $0x22aa0, %rcx          # imm = 0x22AA0
je 0x807e
movups %xmm0, -0x18(%rbx,%rcx)
orl $-0x1, -0x8(%rbx,%rcx)
andl $0x0, (%rbx,%rcx)
addq $0xe38, %rcx            # imm = 0xE38
jmp 0x805e
incq %r15
addq $0x1c, %rbx
jmp 0x8052
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/map.c
// Function: destroyWall
void destroyWall(Map map[LONGUEUR][LARGEUR], int x, int y, Weapons *weaponHold, int *gem)
{	
	if(x != 0 && x != LONGUEUR && y != 0 && y != LARGEUR)
	{
		if(map[x][y].resistance-weaponHold->degat > 0)
		{
			map[x][y].resistance -= weaponHold->degat;
			if(weaponHold->type == 0)
				weaponHold->state -= map[x][y].resistance/5+3;
			else
				weaponHold->state--;
		}
		else
		{
			map[x][y].resistance = 0;
			if(map[x][y].effect == 4) // if the player breaks a gem
			{
				(*gem)++;
				map[x][y].content = FLOOR;
			}
			else
			{
				if(rand()%100 <= 90)
					map[x][y].content = FLOOR;
				else
				{
					map[x][y].content = MINES;
					map[x][y].trap = 2;
				}
			}
		}
	}
}

// Assembly:
cmpl $0x82, %edx
je 0x8129
testl %esi, %esi
je 0x8129
cmpl $0x27, %esi
je 0x8129
testl %edx, %edx
je 0x8129
pushq %rbx
movslq %esi, %rax
movslq %edx, %rdx
imulq $0xe38, %rax, %rax      # imm = 0xE38
addq %rax, %rdi
imulq $0x1c, %rdx, %rax
leaq (%rdi,%rax), %rbx
movl 0x14(%rax,%rdi), %eax
subl 0x10(%rcx), %eax
jle 0x80de
movl %eax, 0x14(%rbx)
cmpl $0x0, 0x24(%rcx)
je 0x80ed
decl 0x1c(%rcx)
jmp 0x8128
andl $0x0, 0x14(%rbx)
cmpl $0x4, 0x4(%rbx)
jne 0x8103
incl (%r8)
jmp 0x8113
pushq $0x5
popq %rsi
xorl %edx, %edx
divl %esi
movl 0x1c(%rcx), %edx
negl %eax
addl %edx, %eax
addl $-0x3, %eax
movl %eax, 0x1c(%rcx)
jmp 0x8128
callq 0x11d0
pushq $0x64
popq %rcx
cltd
idivl %ecx
cmpl $0x5a, %edx
jg 0x811b
movl $0x1, (%rbx)
jmp 0x8128
movl $0x4, (%rbx)
movl $0x2, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/map.c
// Function: destroyMap
void destroyMap(Map map[LONGUEUR][LARGEUR], Player player)
{
	int x = rand()%LONGUEUR;
	int y = rand()%LARGEUR;
	int i = 0;
	int nbrDestroyed = rand()%3+1;

	if(x-5 <= 0)
		x+=5;
	if(y-5 <= 0)
		y+=5;
	if(x+5 >= LONGUEUR)
		x-=5;
	if(y+5 <= LARGEUR)
		y-=5;
	
	if((map[x][y].content >= 5 && map[x][y].content <= 9) || (x == player.x && y == player.y))
	{
		x = rand()%LONGUEUR;
		y = rand()%LARGEUR;

		if(x-5 <= 0)
			x+=5;
		if(y-5 <= 0)
			y+=5;
		if(x+5 >= LONGUEUR)
			x-=5;
		if(y+5 <= LARGEUR)
			y-=5;	
	}

	for(i = 0; i < nbrDestroyed; i++)
	{
		if(map[x][y].content != STAIRS)
			map[x][y].content = HOLE;
		x += 1-rand()%3;
		y += 1-rand()%3;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x11d0
pushq $0x27
popq %rcx
cltd
idivl %ecx
movl %edx, %r14d
callq 0x11d0
movl $0x82, %r13d
cltd
idivl %r13d
movl %edx, %r15d
callq 0x11d0
pushq $0x3
popq %r12
cltd
idivl %r12d
movl %edx, %ebp
leal 0x5(%r14), %eax
cmpl $0x6, %r14d
cmovgel %r14d, %eax
leal 0x5(%r15), %ecx
cmpl $0x6, %r15d
cmovgel %r15d, %ecx
leal -0x5(%rax), %r14d
cmpl $0x22, %eax
cmovll %eax, %r14d
leal -0x5(%rcx), %r15d
cmpl $0x7e, %ecx
cmovgel %ecx, %r15d
movslq %r14d, %rax
movslq %r15d, %rcx
imulq $0xe38, %rax, %rax      # imm = 0xE38
addq %rbx, %rax
imulq $0x1c, %rcx, %rcx
movl (%rcx,%rax), %eax
addl $-0x5, %eax
cmpl $0x5, %eax
jb 0x81c5
leaq 0x40(%rsp), %rax
cmpl 0x14(%rax), %r14d
jne 0x8207
cmpl 0x18(%rax), %r15d
jne 0x8207
callq 0x11d0
cltd
pushq $0x27
popq %rcx
idivl %ecx
movl %edx, %r14d
callq 0x11d0
cltd
idivl %r13d
leal 0x5(%r14), %eax
cmpl $0x6, %r14d
cmovgel %r14d, %eax
leal 0x5(%rdx), %ecx
cmpl $0x6, %edx
cmovgel %edx, %ecx
leal -0x5(%rax), %r14d
cmpl $0x22, %eax
cmovll %eax, %r14d
leal -0x5(%rcx), %r15d
cmpl $0x7e, %ecx
cmovgel %ecx, %r15d
testl %ebp, %ebp
pushq $-0x1
popq %r13
cmovnsl %ebp, %r13d
incl %r13d
subl $0x1, %r13d
jb 0x825a
movslq %r14d, %rax
movslq %r15d, %rcx
imulq $0xe38, %rax, %rax      # imm = 0xE38
addq %rbx, %rax
imulq $0x1c, %rcx, %rcx
cmpl $0x3, (%rcx,%rax)
je 0x823a
addq %rcx, %rax
andl $0x0, (%rax)
callq 0x11d0
cltd
idivl %r12d
subl %edx, %r14d
incl %r14d
callq 0x11d0
cltd
idivl %r12d
subl %edx, %r15d
incl %r15d
jmp 0x8214
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/menu.c
// Function: popUpArchitect
void popUpArchitect()
{
	WINDOW *win;
	win = newwin(5,30,rand()%LONGUEUR,rand()%LARGEUR);
	box(win,0,0);
	int color = rand()%255+1;
	wattron(win, COLOR_PAIR(color));
	mvwprintw(win,1,1,"PFL TRE'K VJTRGV !");
	mvwprintw(win,2,1,"JKFG");
	mvwprintw(win,3,1,"**WE ALREADY WON**");
	if(rand()%100 > 50)
		mvwprintw(win,4,1,"THEY PAID A LOT FOR THIS WEAPON...");
	wattroff(win, COLOR_PAIR(color));
	box(win, ' ', ' ');
	wborder(win, ' ', ' ', ' ',' ',' ',' ',' ',' ');
	wclear(win);
	wrefresh(win);
	delwin(win);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x11d0
pushq $0x27
popq %rcx
cltd
idivl %ecx
movl %edx, %ebx
callq 0x11d0
movl $0x82, %ecx
cltd
idivl %ecx
movl %edx, %ecx
pushq $0x5
popq %rdi
pushq $0x1e
popq %rsi
movl %ebx, %edx
callq 0x1130
movq %rax, %rbx
subq $0x20, %rsp
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1120
addq $0x20, %rsp
callq 0x11d0
movl $0xff, %ecx
cltd
idivl %ecx
shll $0x8, %edx
addl $0x100, %edx            # imm = 0x100
movzwl %dx, %ebp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x11c0
leaq 0x58fb(%rip), %rcx      # 0xef28
pushq $0x1
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1070
leaq 0x58f3(%rip), %rcx      # 0xef3b
pushq $0x2
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1070
leaq 0x58e1(%rip), %rcx      # 0xef40
pushq $0x3
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1070
callq 0x11d0
pushq $0x64
popq %rcx
cltd
idivl %ecx
cmpl $0x33, %edx
jl 0x9696
leaq 0x58cd(%rip), %rcx      # 0xef53
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1060
subq $0x8, %rsp
pushq $0x20
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
movl %r14d, %ecx
movl %r14d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
pushq $0x0
callq 0x1120
addq $0x18, %rsp
movq %rbx, %rdi
movl %r14d, %esi
movl %r14d, %edx
movl %r14d, %ecx
movl %r14d, %r8d
movl %r14d, %r9d
pushq %r14
pushq %r14
pushq %r14
callq 0x1120
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1100
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1110
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/player.c
// Function: hitEnnemy
int hitEnnemy(Player player, Ennemy *ennemy, Weapons weaponHold, int *components, int *blood)
{
	int ret = 0;
	if(rand()%100 < 100-player.hate)
	{
		if(weaponHold.type == 0)
			ennemy->life -= abs(weaponHold.degat+(int)(player.strength/2));
	}
	else
	{
		ret = 2;
		ennemy->life -= weaponHold.degat*(int)(player.hate/2);
	}
	if(ennemy->life <= 0)
	{
		ret = 1;
		if(ennemy->type == 1)
		{
			int compWin = rand()%10+5;
			*components += compWin;	
		}
		else if(ennemy->type == 2)
		{
			int compWin = rand()%15+7;
			*components += compWin;	
		}
		else if(ennemy->type == 3 || ennemy->type == 4)
		{
			*blood += rand()%10+5;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x70(%rsp), %r12
callq 0x11d0
pushq $0x64
popq %rcx
cltd
idivl %ecx
movl 0x58(%rsp), %eax
subl %eax, %ecx
cmpl %ecx, %edx
jge 0xa61f
cmpl $0x0, 0x24(%r12)
je 0xa638
movl 0x8(%r15), %eax
jmp 0xa65c
pushq $-0x2
popq %rcx
cltd
idivl %ecx
imull 0x10(%r12), %eax
addl 0x8(%r15), %eax
movl %eax, 0x8(%r15)
pushq $0x2
popq %rbp
jmp 0xa65e
leaq 0x30(%rsp), %rax
movl 0x20(%rax), %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %ecx
addl 0x10(%r12), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %ecx, %eax
addl 0x8(%r15), %eax
movl %eax, 0x8(%r15)
xorl %ebp, %ebp
testl %eax, %eax
jg 0xa69e
movl 0x20(%r15), %eax
pushq $0x5
popq %r15
pushq $0xa
popq %r12
pushq $0x1
popq %rbp
leal -0x3(%rax), %ecx
cmpl $0x2, %ecx
jb 0xa68d
cmpl $0x1, %eax
je 0xa690
cmpl $0x2, %eax
jne 0xa69e
pushq $0x7
popq %r15
pushq $0xf
popq %r12
jmp 0xa690
movq %r14, %rbx
callq 0x11d0
cltd
idivl %r12d
addl %r15d, %edx
addl %edx, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/player.c
// Function: crystalCanon
void crystalCanon(Map map[LONGUEUR][LARGEUR], Player player, char dir)
{

		int x, y = 0;
		int posX = player.x;
		int posY = player.y;

		switch(dir)
		{
			case 'z':
				x = -1;
				y = 0;
				break;
			case 's':
				x = 1;
				y = 0;
				break;
			case 'q':
				x = 0;
				y = -1;
				break;
			case 'd':
				x = 0;
				y = 1;
				break;
			case 'a':
				x = -1;
				y = -1;
				break;
			case 'e':
				x = -1;
				y = 1;
				break;
			case 'w':
				x = 1;
				y = -1;
				break;
			case 'x':
				x = 1;
				y = 1;
				break;
		}

		while(posX < LONGUEUR && posX > 0 && posY > 0 && posY < LARGEUR)
		{
			map[posX][posY].content = FLOOR;
			posX += x;
			posY += y;
		}
}

// Assembly:
xorl %ecx, %ecx
pushq $-0x1
popq %rax
leal -0x71(%rsi), %edx
cmpl $0x7, %edx
ja 0xac20
leaq 0x46f1(%rip), %rsi      # 0xf304
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
pushq $-0x1
jmp 0xac45
cmpl $0x61, %esi
je 0xac37
cmpl $0x64, %esi
je 0xac43
cmpl $0x65, %esi
jne 0xac48
pushq $0x1
popq %rcx
jmp 0xac48
pushq $0x1
popq %rax
movl %eax, %ecx
jmp 0xac48
pushq $-0x1
popq %rcx
pushq $0x1
popq %rax
jmp 0xac48
pushq $0x1
popq %rcx
xorl %eax, %eax
movl 0x1c(%rsp), %edx
movl 0x20(%rsp), %esi
leal -0x1(%rdx), %r8d
cmpl $0x25, %r8d
ja 0xac89
leal -0x1(%rsi), %r8d
cmpl $0x80, %r8d
ja 0xac89
movl %edx, %r8d
movl %esi, %r9d
imulq $0xe38, %r8, %r8        # imm = 0xE38
addq %rdi, %r8
imulq $0x1c, %r9, %r9
movl $0x1, (%r9,%r8)
addl %eax, %edx
addl %ecx, %esi
jmp 0xac50
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/pnj.c
// Function: testPnjOnPos
int testPnjOnPos(Pnj pnj[], int x, int y, int nbrPnj)
{
	int ret = -1;
	int i = 0;

	for(i = 0; i < nbrPnj; i++)
	{
		if(pnj[i].x == x && pnj[i].y == y)
		{
			ret = i;
			break;
		}
	}

	return ret;
}

// Assembly:
xorl %r8d, %r8d
testl %ecx, %ecx
cmovlel %r8d, %ecx
addq $0x18, %rdi
pushq $-0x1
popq %rax
cmpq %r8, %rcx
je 0xacf2
cmpl %esi, -0x4(%rdi)
jne 0xace6
cmpl %edx, (%rdi)
je 0xacef
incq %r8
addq $0x20, %rdi
jmp 0xacd8
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/pnj.c
// Function: clearQuest
void clearQuest(Quest quest[])
{
	int i = 0;
	for(i = 0; i < NBR_QUESTS_MAX; i++)
	{
		quest[i].isSet = 0;
		quest[i].name = "";
		quest[i].description = "";
		quest[i].typeReward = -1;
		quest[i].reward = -1;
		quest[i].indice = -1;
	}
}

// Assembly:
pushq $0x10
popq %rax
leaq 0x2146(%rip), %rcx      # 0xd1ff
movaps 0x42a0(%rip), %xmm0     # 0xf360
cmpq $0x70, %rax
je 0xb0da
movq %rcx, -0x10(%rdi,%rax)
movq %rcx, -0x8(%rdi,%rax)
movups %xmm0, (%rdi,%rax)
addq $0x20, %rax
jmp 0xb0c0
retq
// File: /workspace/github_c_makefile_star2_O2/S01den[P]Lost_CavernRL/screen.c
// Function: flashBomb
void flashBomb(WINDOW *win_map)
{
	int k = 0;
	int l = 0;
	
	for(k = 1; k < LONGUEUR-1; k++)
	{
		for(l = 1; l < LARGEUR-1; l++)
		{
			wattron(win_map,COLOR_PAIR(244));
			mvwprintw(win_map,k,l," ");
			wattroff(win_map,COLOR_PAIR(244));
		}
	}
	
	wrefresh(win_map);
	delay(15);
	for(k = 1; k < LONGUEUR-1; k++)
	{
		for(l = 1; l < LARGEUR-1; l++)
		{
			wattron(win_map,COLOR_BLACK);
			mvwprintw(win_map,k,l," ");
			wattroff(win_map,COLOR_BLACK);
		}
	}
	wrefresh(win_map);
	delay(9);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %r12
leaq 0x120b(%rip), %r14      # 0xd1fe
movl %r12d, %ebp
cmpl $0x26, %ebp
je 0xc040
movl %r12d, %r15d
cmpl $0x81, %r15d
je 0xc03c
movq %rbx, %rdi
movl $0xf400, %esi           # imm = 0xF400
xorl %edx, %edx
callq 0x11c0
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movl $0xf400, %esi           # imm = 0xF400
xorl %edx, %edx
callq 0x1060
incl %r15d
jmp 0xbffe
incl %ebp
jmp 0xbff6
movq %rbx, %rdi
callq 0x1100
pushq $0x1
popq %r12
leaq 0x11ab(%rip), %r14      # 0xd1fe
movl %r12d, %ebp
cmpl $0x26, %ebp
je 0xc09a
movl %r12d, %r15d
cmpl $0x81, %r15d
je 0xc096
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11c0
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1060
incl %r15d
jmp 0xc05e
incl %ebp
jmp 0xc056
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.6/mmap-read.c
// Function: main
int main (int argc, char* const argv[])
{
	int fd;
	void* file_memory;
	int integer;

	/*	Open the file */
	fd = open (argv[1], O_RDWR, S_IRUSR | S_IWUSR);
	/*	Create the memory mapping.	*/
	file_memory = mmap (0, FILE_LENGTH, PROT_READ | PROT_WRITE,
											MAP_SHARED, fd, 0);
	close (fd);
	/*	Read the integer, print ir out, and double it.	*/
	sscanf (file_memory, "%d\n", &integer);
	printf ("value: %d\n", integer);
	sprintf ((char*) file_memory, "%d\n", 2 * integer);
	/*	Release the memory (unnecessary because the program exits).	)*/
	munmap (file_memory, FILE_LENGTH);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rsi), %rdi
pushq $0x2
popq %rsi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x1080
movl %eax, %r14d
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
movl $0x100, %esi            # imm = 0x100
xorl %edi, %edi
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x1030
movq %rax, %rbx
movl %r14d, %edi
callq 0x1050
leaq 0xe25(%rip), %r14       # 0x200b
leaq -0x1c(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1060
movl (%r15), %esi
leaq 0xe00(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1040
movl (%r15), %edx
addl %edx, %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: find_client
Client *find_client(Window w) {
	struct list *iter;

	for (iter = clients_tab_order; iter; iter = iter->next) {
		Client *c = iter->data;
		if (w == c->parent || w == c->window)
			return c;
	}
	return NULL;
}

// Assembly:
leaq 0x9f25(%rip), %rcx      # 0xd798
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x388b
movq 0x8(%rcx), %rax
cmpq %rdi, 0x8(%rax)
je 0x388a
cmpq %rdi, (%rax)
jne 0x3873
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: set_wm_state
void set_wm_state(Client *c, int state) {
	/* Using "long" for the type of "data" looks wrong, but the
	 * fine people in the X Consortium defined it this way
	 * (even on 64-bit machines).
	 */
	long data[2];
	data[0] = state;
	data[1] = None;
	XChangeProperty(dpy, c->window, xa_wm_state, xa_wm_state, 32,
			PropModeReplace, (unsigned char *)data, 2);
}

// Assembly:
subq $0x18, %rsp
movslq %esi, %rax
movq %rsp, %r10
movq %rax, (%r10)
andq $0x0, 0x8(%r10)
leaq 0x9f13(%rip), %rax      # 0xd7e0
movq (%rax), %rax
movq (%rdi), %rsi
leaq 0x9d56(%rip), %rcx      # 0xd630
movq (%rcx), %rcx
pushq $0x20
popq %r8
movq %rax, %rdi
movq %rcx, %rdx
xorl %r9d, %r9d
pushq $0x2
pushq %r10
callq 0x3460
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: client_lower
void client_lower(Client *c) {
	struct list *iter;
	Client *below;
	Window order[2];
	/* Find lowest other client in stacking order that is visible on the
	 * same screen. */
	for (iter = clients_stacking_order; iter; iter = iter->next) {
		below = iter->data;
		if (below == c)
			return;
		if (below->screen == c->screen && (is_fixed(below) || below->vdesk == c->screen->vdesk))
			break;
	}
	if (!iter) return;
	order[0] = below->parent;
	order[1] = c->parent;
	XRestackWindows(dpy, order, 2);
	clients_stacking_order = list_delete(clients_stacking_order, c);
	clients_stacking_order = list_insert_before(clients_stacking_order, iter, c);
	ewmh_set_net_client_list_stacking(c->screen);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x9e3b(%rip), %r14      # 0xd7a8
movq (%r14), %r14
testq %r14, %r14
je 0x39e8
movq 0x8(%r14), %rax
cmpq %rbx, %rax
je 0x39e8
movq 0x10(%rbx), %rcx
cmpq %rcx, 0x10(%rax)
jne 0x396d
movl 0x74(%rax), %edx
cmpl $-0x1, %edx
je 0x3995
cmpl 0x40(%rcx), %edx
jne 0x396d
movq 0x8(%rax), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsi)
leaq 0x9e32(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
pushq $0x2
popq %rdx
callq 0x35a0
leaq 0x9de8(%rip), %r15      # 0xd7a8
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x5871
movq %rax, (%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5808
movq %rax, (%r15)
movq 0x10(%rbx), %rdi
callq 0x555a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: send_config
void send_config(Client *c) {
	XConfigureEvent ce;

	ce.type = ConfigureNotify;
	ce.event = c->window;
	ce.window = c->window;
	ce.x = c->x;
	ce.y = c->y;
	ce.width = c->width;
	ce.height = c->height;
	ce.border_width = 0;
	ce.above = None;
	ce.override_redirect = False;

	XSendEvent(dpy, c->window, False, StructureNotifyMask, (XEvent *)&ce);
}

// Assembly:
subq $0x58, %rsp
movq %rsp, %r8
movl $0x16, (%r8)
movq (%rdi), %rsi
movq %rsi, 0x20(%r8)
movq %rsi, 0x28(%r8)
movups 0x24(%rdi), %xmm0
movups %xmm0, 0x30(%r8)
andl $0x0, 0x40(%r8)
andq $0x0, 0x48(%r8)
andl $0x0, 0x50(%r8)
leaq 0x9db6(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movl $0x20000, %ecx          # imm = 0x20000
xorl %edx, %edx
callq 0x3050
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: gravitate_border
void gravitate_border(Client *c, int bw) {
	int dx = 0, dy = 0;
	switch (c->win_gravity) {
	default:
	case NorthWestGravity:
		dx = bw;
		dy = bw;
		break;
	case NorthGravity:
		dy = bw;
		break;
	case NorthEastGravity:
		dx = -bw;
		dy = bw;
		break;
	case EastGravity:
		dx = -bw;
		break;
	case CenterGravity:
		break;
	case WestGravity:
		dx = bw;
		break;
	case SouthWestGravity:
		dx = bw;
		dy = -bw;
		break;
	case SouthGravity:
		dy = -bw;
		break;
	case SouthEastGravity:
		dx = -bw;
		dy = -bw;
		break;
	}
	if (c->x != 0 || c->width != DisplayWidth(dpy, c->screen->screen)) {
		c->x += dx;
	}
	if (c->y != 0 || c->height != DisplayHeight(dpy, c->screen->screen)) {
		c->y += dy;
	}
}

// Assembly:
movl 0x6c(%rdi), %ecx
addl $-0x2, %ecx
cmpl $0x7, %ecx
ja 0x3a69
xorl %eax, %eax
leaq 0x55b2(%rip), %rdx      # 0x9004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
xorl %eax, %eax
jmp 0x3a77
negl %esi
movl %esi, %eax
xorl %esi, %esi
jmp 0x3a77
negl %esi
movl %esi, %eax
jmp 0x3a77
movl %esi, %eax
negl %eax
jmp 0x3a77
movl %esi, %eax
negl %esi
movl 0x24(%rdi), %ecx
testl %ecx, %ecx
jne 0x3aa4
movl 0x2c(%rdi), %edx
leaq 0x9d58(%rip), %r8       # 0xd7e0
movq (%r8), %r8
movq 0xe8(%r8), %r8
movq 0x10(%rdi), %r9
movslq (%r9), %r9
shlq $0x7, %r9
cmpl 0x18(%r8,%r9), %edx
je 0x3aa9
addl %eax, %ecx
movl %ecx, 0x24(%rdi)
movl 0x28(%rdi), %eax
testl %eax, %eax
jne 0x3ad6
movl 0x30(%rdi), %ecx
leaq 0x9d26(%rip), %rdx      # 0xd7e0
movq (%rdx), %rdx
movq 0xe8(%rdx), %rdx
movq 0x10(%rdi), %r8
movslq (%r8), %r8
shlq $0x7, %r8
cmpl 0x1c(%rdx,%r8), %ecx
je 0x3adb
addl %esi, %eax
movl %eax, 0x28(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: select_client
void select_client(Client *c) {
	if (current)
		XSetWindowBorder(dpy, current->parent, current->screen->bg.pixel);
	if (c) {
		unsigned long bpixel;
#ifdef VWM
		if (is_fixed(c))
			bpixel = c->screen->fc.pixel;
		else
#endif
			bpixel = c->screen->fg.pixel;
		XSetWindowBorder(dpy, c->parent, bpixel);
		XInstallColormap(dpy, c->cmap);
		XSetInputFocus(dpy, c->window, RevertToPointerRoot, CurrentTime);
	}
	current = c;
	ewmh_set_net_active_window(c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9cc5(%rip), %r14      # 0xd7b0
movq (%r14), %rax
testq %rax, %rax
je 0x3b0e
leaq 0x9ce6(%rip), %rcx      # 0xd7e0
movq (%rcx), %rdi
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rax
movq 0x30(%rax), %rdx
callq 0x3350
testq %rbx, %rbx
je 0x3b58
cmpl $-0x1, 0x74(%rbx)
movq 0x8(%rbx), %rsi
pushq $0x48
popq %rax
pushq $0x20
popq %rcx
cmoveq %rax, %rcx
movq 0x10(%rbx), %rax
movq (%rax,%rcx), %rdx
leaq 0x9cac(%rip), %r15      # 0xd7e0
movq (%r15), %rdi
callq 0x3350
movq (%r15), %rdi
movq 0x18(%rbx), %rsi
callq 0x36d0
movq (%r15), %rdi
movq (%rbx), %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x3710
movq %rbx, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x55fa
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: client_to_vdesk
void client_to_vdesk(Client *c, unsigned int vdesk) {
	if (valid_vdesk(vdesk)) {
		c->vdesk = vdesk;
		if (c->vdesk == c->screen->vdesk || c->vdesk == VDESK_FIXED) {
			client_show(c);
		} else {
			client_hide(c);
		}
		ewmh_set_net_wm_desktop(c);
		select_client(current);
	}
}

// Assembly:
leal 0x1(%rsi), %eax
cmpl $0x8, %eax
ja 0x3b8f
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x74(%rdi)
cmpl $-0x1, %esi
je 0x3b90
movq 0x10(%rbx), %rax
cmpl %esi, 0x40(%rax)
je 0x3b90
movq %rbx, %rdi
callq 0x388e
jmp 0x3b98
retq
movq %rbx, %rdi
callq 0x38f8
movq %rbx, %rdi
callq 0x568e
leaq 0x9c09(%rip), %rax      # 0xd7b0
movq (%rax), %rdi
popq %rbx
jmp 0x3adc
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: send_wm_delete
void send_wm_delete(Client *c, int kill_client) {
	int i, n, found = 0;
	Atom *protocols;

	if (!kill_client && XGetWMProtocols(dpy, c->window, &protocols, &n)) {
		for (i = 0; i < n; i++)
			if (protocols[i] == xa_wm_delete)
				found++;
		XFree(protocols);
	}
	if (found)
		send_xmessage(c->window, xa_wm_protos, xa_wm_delete);
	else
		XKillClient(dpy, c->window);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x3d30
leaq 0x9ac9(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movq (%rbx), %rsi
callq 0x3180
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9aa9(%rip), %r14      # 0xd7e0
movq (%r14), %rdi
movq (%rbx), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x3500
testl %eax, %eax
je 0x3d10
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rdi
leaq 0x98e0(%rip), %r15      # 0xd640
movq (%r15), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
xorl %ebp, %ebp
cmpq %rdx, %rax
je 0x3d82
xorl %esi, %esi
cmpq %rcx, (%rdi,%rdx,8)
sete %sil
addl %esi, %ebp
incq %rdx
jmp 0x3d6c
callq 0x3210
testl %ebp, %ebp
je 0x3d10
movq (%rbx), %rsi
leaq 0x98a3(%rip), %rax      # 0xd638
movq (%rax), %rax
movq (%r15), %rcx
leaq 0x18(%rsp), %r8
movl $0x21, (%r8)
movq %rsi, 0x20(%r8)
movq %rax, 0x28(%r8)
movl $0x20, 0x30(%r8)
movq %rcx, 0x38(%r8)
andq $0x0, 0x40(%r8)
movq (%r14), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3050
jmp 0x3d22
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/client.c
// Function: set_shape
void set_shape(Client *c) {
	int bounding_shaped;
	int i, b;  unsigned int u;  /* dummies */

	if (!have_shape) return;
	/* Logic to decide if we have a shaped window cribbed from fvwm-2.5.10.
	 * Previous method (more than one rectangle returned from
	 * XShapeGetRectangles) worked _most_ of the time. */
	if (XShapeQueryExtents(dpy, c->window, &bounding_shaped, &i, &i,
				&u, &u, &b, &i, &i, &u, &u) && bounding_shaped) {
		LOG_DEBUG("%d shape extents\n", bounding_shaped);
		XShapeCombineShape(dpy, c->parent, ShapeBounding, 0, 0,
				c->window, ShapeBounding, ShapeSet);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x9a31(%rip), %rax      # 0xd810
cmpl $0x0, (%rax)
je 0x3e4d
movq %rdi, %rbx
leaq 0x99f2(%rip), %r14      # 0xd7e0
movq (%r14), %rdi
movq (%rbx), %rsi
leaq 0xc(%rsp), %r9
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %rax
leaq 0x8(%rsp), %rdx
movq %rcx, %r8
pushq %r9
pushq %r9
pushq %rcx
pushq %rcx
pushq %rax
pushq %r9
callq 0x31f0
addq $0x30, %rsp
testl %eax, %eax
je 0x3e4d
cmpl $0x0, 0x8(%rsp)
je 0x3e4d
movq (%r14), %rdi
movq (%rbx), %r9
movq 0x8(%rbx), %rsi
subq $0x10, %rsp
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3540
popq %rax
popq %rcx
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_deinit_screen
void ewmh_deinit_screen(ScreenInfo *s) {
	XDeleteProperty(dpy, s->root, xa_net_supported);
	XDeleteProperty(dpy, s->root, xa_net_client_list);
	XDeleteProperty(dpy, s->root, xa_net_client_list_stacking);
#ifdef VWM
	XDeleteProperty(dpy, s->root, xa_net_number_of_desktops);
#endif
	XDeleteProperty(dpy, s->root, xa_net_desktop_geometry);
	XDeleteProperty(dpy, s->root, xa_net_desktop_viewport);
#ifdef VWM
	XDeleteProperty(dpy, s->root, xa_net_current_desktop);
#endif
	XDeleteProperty(dpy, s->root, xa_net_active_window);
	XDeleteProperty(dpy, s->root, xa_net_workarea);
	XDeleteProperty(dpy, s->root, xa_net_supporting_wm_check);
	XDestroyWindow(dpy, s->supporting);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8510(%rip), %r14      # 0xd7e0
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x838a(%rip), %rdx      # 0xd668
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x837f(%rip), %rdx      # 0xd670
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x8374(%rip), %rdx      # 0xd678
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x8369(%rip), %rdx      # 0xd680
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x835e(%rip), %rdx      # 0xd688
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x8353(%rip), %rdx      # 0xd690
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x8348(%rip), %rdx      # 0xd698
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x833d(%rip), %rdx      # 0xd6a0
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x8332(%rip), %rdx      # 0xd6a8
callq 0x3230
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movq 0x8327(%rip), %rdx      # 0xd6b0
callq 0x3230
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3300
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_init_client
void ewmh_init_client(Client *c) {
	Atom allowed_actions[] = {
		xa_net_wm_action_move,
		xa_net_wm_action_maximize_horz,
		xa_net_wm_action_maximize_vert,
		xa_net_wm_action_fullscreen,
		xa_net_wm_action_change_desktop,
		xa_net_wm_action_close,
		/* nelements reduced to omit this if not possible: */
		xa_net_wm_action_resize,
	};
	int nelements = sizeof(allowed_actions) / sizeof(Atom);
	/* Omit resize element if resizing not possible: */
	if (c->max_width && c->max_width == c->min_width
			&& c->max_height && c->max_height == c->min_height)
		nelements--;
	XChangeProperty(dpy, c->window, xa_net_wm_allowed_actions,
			XA_ATOM, 32, PropModeReplace,
			(unsigned char *)&allowed_actions,
			nelements);
}

// Assembly:
subq $0x38, %rsp
movq 0x8384(%rip), %rax      # 0xd730
movq %rax, (%rsp)
movq 0x8389(%rip), %rax      # 0xd740
movq %rax, 0x8(%rsp)
movq 0x8385(%rip), %rax      # 0xd748
movq %rax, 0x10(%rsp)
movq 0x8381(%rip), %rax      # 0xd750
movq %rax, 0x18(%rsp)
movq 0x837d(%rip), %rax      # 0xd758
movq %rax, 0x20(%rsp)
movq 0x8379(%rip), %rax      # 0xd760
movq %rax, 0x28(%rsp)
movq 0x8345(%rip), %rax      # 0xd738
movq %rax, 0x30(%rsp)
movl 0x50(%rdi), %eax
pushq $0x7
popq %r10
testl %eax, %eax
je 0x541d
cmpl 0x48(%rdi), %eax
jne 0x541d
movl 0x54(%rdi), %eax
testl %eax, %eax
je 0x541d
xorl %r10d, %r10d
cmpl 0x4c(%rdi), %eax
sete %r10b
xorl $0x7, %r10d
leaq 0x83bc(%rip), %rax      # 0xd7e0
movq (%rax), %rax
movq (%rdi), %rsi
movq 0x82f7(%rip), %rdx      # 0xd728
movq %rsp, %r11
pushq $0x4
popq %rcx
pushq $0x20
popq %r8
movq %rax, %rdi
xorl %r9d, %r9d
pushq %r10
pushq %r11
callq 0x3460
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_set_net_client_list
void ewmh_set_net_client_list(ScreenInfo *s) {
	Window *windows = alloc_window_array();
	struct list *iter;
	int i = 0;
	for (iter = clients_mapping_order; iter; iter = iter->next) {
		Client *c = iter->data;
		if (c->screen == s) {
			windows[i++] = c->window;
		}
	}
	XChangeProperty(dpy, s->root, xa_net_client_list,
			XA_WINDOW, 32, PropModeReplace,
			(unsigned char *)windows, i);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x82d5(%rip), %r15      # 0xd7a0
xorl %r14d, %r14d
callq 0x5523
movq (%r15), %r15
testq %r15, %r15
je 0x54f4
movq 0x8(%r15), %rcx
cmpq %rbx, 0x10(%rcx)
jne 0x54d3
movq (%rcx), %rcx
movl %r14d, %edx
incl %r14d
movq %rcx, (%rax,%rdx,8)
jmp 0x54d3
leaq 0x82e5(%rip), %rcx      # 0xd7e0
movq (%rcx), %rdi
movq 0x8(%rbx), %rsi
movq 0x8167(%rip), %rdx      # 0xd670
pushq $0x21
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq %r14
pushq %rax
callq 0x3460
popq %rcx
popq %rdx
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: alloc_window_array
static Window *alloc_window_array(void) {
	struct list *iter;
	unsigned int count = 0;
	for (iter = clients_mapping_order; iter; iter = iter->next) {
		count++;
	}
	if (count == 0) count++;
	/* Round up to next block of 128 */
	count = (count + 127) & ~127;
	window_array = realloc(window_array, count * sizeof(Window));
	return window_array;
}

// Assembly:
pushq %rax
leaq 0x8275(%rip), %rax      # 0xd7a0
pushq $-0x1
popq %rsi
movq (%rax), %rax
incl %esi
testq %rax, %rax
jne 0x552e
cmpl $0x1, %esi
adcl $0x7f, %esi
andl $-0x80, %esi
movq 0x8230(%rip), %rdi      # 0xd778
shlq $0x3, %rsi
callq 0x3510
movq %rax, 0x8220(%rip)      # 0xd778
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_set_net_client_list_stacking
void ewmh_set_net_client_list_stacking(ScreenInfo *s) {
	Window *windows = alloc_window_array();
	struct list *iter;
	int i = 0;
	for (iter = clients_stacking_order; iter; iter = iter->next) {
		Client *c = iter->data;
		if (c->screen == s) {
			windows[i++] = c->window;
		}
	}
	XChangeProperty(dpy, s->root, xa_net_client_list_stacking,
			XA_WINDOW, 32, PropModeReplace,
			(unsigned char *)windows, i);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x823f(%rip), %r15      # 0xd7a8
xorl %r14d, %r14d
callq 0x5523
movq (%r15), %r15
testq %r15, %r15
je 0x5592
movq 0x8(%r15), %rcx
cmpq %rbx, 0x10(%rcx)
jne 0x5571
movq (%rcx), %rcx
movl %r14d, %edx
incl %r14d
movq %rcx, (%rax,%rdx,8)
jmp 0x5571
leaq 0x8247(%rip), %rcx      # 0xd7e0
movq (%rcx), %rdi
movq 0x8(%rbx), %rsi
movq 0x80d1(%rip), %rdx      # 0xd678
pushq $0x21
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq %r14
pushq %rax
callq 0x3460
popq %rcx
popq %rdx
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_set_net_active_window
void ewmh_set_net_active_window(Client *c) {
	int i;
	for (i = 0; i < num_screens; i++) {
		Window w;
		if (c && i == c->screen->screen) {
			w = c->window;
		} else {
			w = None;
		}
		XChangeProperty(dpy, screens[i].root, xa_net_active_window,
				XA_WINDOW, 32, PropModeReplace,
				(unsigned char *)&w, 1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %r15
xorl %r12d, %r12d
movq %rsp, %r13
pushq $0x21
popq %r14
pushq $0x20
popq %rbp
leaq 0x81d0(%rip), %rax      # 0xd7f0
movslq (%rax), %rax
cmpq %rax, %r12
jge 0x567f
testq %rbx, %rbx
je 0x563d
movq 0x10(%rbx), %rax
movl (%rax), %eax
cmpq %rax, %r12
jne 0x563d
movq (%rbx), %rax
jmp 0x563f
xorl %eax, %eax
movq %rax, (%rsp)
leaq 0x8196(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
leaq 0x81a4(%rip), %rax      # 0xd7f8
movq (%rax), %rax
movq (%rax,%r15), %rsi
movq 0x803e(%rip), %rdx      # 0xd6a0
movq %r14, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq $0x1
pushq %r13
callq 0x3460
popq %rcx
popq %rdx
incq %r12
addq $0x70, %r15
jmp 0x5619
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_get_net_wm_window_type
unsigned int ewmh_get_net_wm_window_type(Window w) {
	Atom *aprop;
	unsigned long nitems, i;
	unsigned int type = 0;
	if ( (aprop = get_property(w, xa_net_wm_window_type, XA_ATOM, &nitems)) ) {
		for (i = 0; i < nitems; i++) {
			if (aprop[i] == xa_net_wm_window_type_desktop)
				type |= EWMH_WINDOW_TYPE_DESKTOP;
			if (aprop[i] == xa_net_wm_window_type_dock)
				type |= EWMH_WINDOW_TYPE_DOCK;
		}
		XFree(aprop);
	}
	return type;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x8016(%rip), %rsi      # 0xd6e8
pushq $0x4
popq %rdx
leaq 0x8(%rsp), %rcx
callq 0x3e55
testq %rax, %rax
je 0x572e
movq 0x8(%rsp), %rcx
movq 0x8000(%rip), %rdx      # 0xd6f0
xorl %esi, %esi
movq 0x7fff(%rip), %rdi      # 0xd6f8
xorl %ebx, %ebx
cmpq %rsi, %rcx
je 0x5724
movq (%rax,%rsi,8), %r8
xorl %r9d, %r9d
cmpq %rdx, %r8
sete %r9b
orl %r9d, %ebx
movl %ebx, %r9d
orl $0x2, %r9d
cmpq %rdi, %r8
cmovel %r9d, %ebx
incq %rsi
jmp 0x56fb
movq %rax, %rdi
callq 0x3210
jmp 0x5730
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_set_net_wm_state
void ewmh_set_net_wm_state(Client *c) {
	Atom state[3];
	int i = 0;
	if (c->oldh)
		state[i++] = xa_net_wm_state_maximized_vert;
	if (c->oldw)
		state[i++] = xa_net_wm_state_maximized_horz;
	if (c->oldh && c->oldw)
		state[i++] = xa_net_wm_state_fullscreen;
	XChangeProperty(dpy, c->window, xa_net_wm_state,
			XA_ATOM, 32, PropModeReplace,
			(unsigned char *)&state, i);
}

// Assembly:
subq $0x18, %rsp
cmpl $0x0, 0x44(%rdi)
je 0x576f
movq 0x7fbf(%rip), %rax      # 0xd708
movq %rax, (%rsp)
cmpl $0x0, 0x40(%rdi)
je 0x5780
movq 0x7fb6(%rip), %rax      # 0xd710
movq %rax, 0x8(%rsp)
movq 0x7fb2(%rip), %rax      # 0xd718
movq %rax, 0x10(%rsp)
pushq $0x3
jmp 0x5782
cmpl $0x0, 0x40(%rdi)
je 0x57b6
movq 0x7f94(%rip), %rax      # 0xd710
movq %rax, (%rsp)
pushq $0x1
popq %r10
leaq 0x8055(%rip), %rax      # 0xd7e0
movq (%rax), %rax
movq (%rdi), %rsi
movq 0x7f68(%rip), %rdx      # 0xd700
movq %rsp, %r11
pushq $0x4
popq %rcx
pushq $0x20
popq %r8
movq %rax, %rdi
xorl %r9d, %r9d
pushq %r10
pushq %r11
callq 0x3460
addq $0x28, %rsp
retq
xorl %r10d, %r10d
jmp 0x5784
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/list.c
// Function: list_insert_before
struct list *list_insert_before(struct list *list, struct list *before, void *data) {
	struct list *elem = list_new(data);
	struct list *iter;
	if (!elem) return list;
	if (!list) return elem;
	elem->next = before;
	if (before == list) return elem;
	for (iter = list; iter; iter = iter->next) {
		if (!iter->next || iter->next == before) {
			iter->next = elem;
			break;
		}
	}
	return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x3430
testq %rax, %rax
je 0x5853
andq $0x0, (%rax)
movq %r15, 0x8(%rax)
testq %rbx, %rbx
je 0x5850
movq %r14, (%rax)
cmpq %rbx, %r14
je 0x5850
movq %rbx, %rdx
movq %rdx, %rcx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x584b
cmpq %r14, %rdx
jne 0x583b
movq %rax, (%rcx)
jmp 0x5853
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/list.c
// Function: list_delete
struct list *list_delete(struct list *list, void *data) {
	struct list **elemp;
	if (!data) return list;
	for (elemp = &list; *elemp; elemp = &(*elemp)->next) {
		if ((*elemp)->data == data) break;
	}
	if (*elemp) {
		struct list *elem = *elemp;
		*elemp = elem->next;
		free(elem);
	}
	return list;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rdi, (%rsp)
testq %rsi, %rsi
je 0x58a4
movq %rsp, %rdi
movq %rax, %rdx
testq %rdx, %rdx
je 0x58a4
movq %rdi, %rcx
movq %rdx, %rdi
movq (%rdx), %rdx
cmpq %rsi, 0x8(%rdi)
jne 0x5884
movq %rdx, (%rcx)
callq 0x3090
movq (%rsp), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/list.c
// Function: list_find
struct list *list_find(struct list *list, void *data) {
	struct list *elem;
	for (elem = list; elem; elem = elem->next) {
		if (elem->data == data)
			return elem;
	}
	return NULL;
}

// Assembly:
movq %rdi, %rax
testq %rax, %rax
je 0x58f5
cmpq %rsi, 0x8(%rax)
je 0x58f5
movq (%rax), %rax
jmp 0x58e5
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/main.c
// Function: xmalloc
static void *xmalloc(size_t size) {
	void *ptr = malloc(size);
	if (!ptr) {
		/* C99 defines the 'z' printf modifier for variables of
		 * type size_t.  Fall back to casting to unsigned long. */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
		LOG_ERROR("out of memory, looking for %zu bytes\n", size);
#else
		LOG_ERROR("out of memory, looking for %lu bytes\n",
				(unsigned long)size);
#endif
		exit(1);
	}
	return ptr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3430
testq %rax, %rax
je 0x6083
popq %rbx
retq
movq 0x6f6e(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x35ed(%rip), %rsi      # 0x9681
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3330
pushq $0x1
popq %rdi
callq 0x3660