LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/alsmd[P]so_long/src/actions/fireball_action.c
// Function: render_fireball
void	render_fireball(t_game *game)
{
	t_fireball	*fireball;
	t_fireball	*last_one;

	fireball = game->fireballs;
	last_one = 0;
	while (fireball)
	{
		if (is_on_map(fireball->x, fireball->y, game))
			draw_fireball(fireball, game);
		if (fireball->steps == 8)
		{
			free_fireball(last_one, fireball, game);
			fireball = last_one;
			if (!fireball)
				fireball = game->fireballs;
			if (!fireball)
				break ;
		}
		else
		{
			fireball->x += 1;
			fireball->steps += 1;
		}
		last_one = fireball;
		fireball = fireball->next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x140(%rdi), %r15
testq %r15, %r15
je 0x7f3d
movq %rdi, %rbx
leaq 0x140(%rdi), %r12
leaq 0xf8(%rdi), %r14
xorl %r13d, %r13d
movl 0x28(%r15), %edi
movl 0x2c(%r15), %esi
movq %rbx, %rdx
callq 0x7c90
testl %eax, %eax
je 0x7ee8
movl 0x28(%r15), %edi
movl 0x2c(%r15), %esi
subl 0x120(%rbx), %edi
shll $0x6, %edi
subl 0x124(%rbx), %esi
shll $0x6, %esi
movl $0x40, %edx
movl $0x40, %ecx
callq 0x6a61
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x69b8
movl 0x28(%r15), %edi
movl 0x2c(%r15), %esi
movq %rbx, %rdx
callq 0x780a
movl 0x30(%r15), %eax
cmpl $0x8, %eax
jne 0x7f23
leaq 0x38(%r13), %rax
testq %r13, %r13
movq 0x38(%r15), %rcx
cmoveq %r12, %rax
movq %rcx, (%rax)
movq (%r15), %rdi
callq 0x6190
movq %r15, %rdi
callq 0x6190
testq %r13, %r13
jne 0x7f1c
movq (%r12), %r13
testq %r13, %r13
jne 0x7f30
jmp 0x7f3d
incl 0x28(%r15)
incl %eax
movl %eax, 0x30(%r15)
movq %r15, %r13
movq 0x38(%r13), %r15
testq %r15, %r15
jne 0x7e8d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/alsmd[P]so_long/src/actions/game_over.c
// Function: print_over
void	print_over(t_game *game)
{
	t_data			game_over;
	int				x;
	int				y;

	game_over.w = 544;
	game_over.h = 416;
	load_img(&game_over, "./imgs/over.xpm", game);
	x = (game->width * BLOCK_SIZE) - game_over.w;
	if (x < 0)
		x = 0;
	y = (game->height * BLOCK_SIZE) - game_over.h;
	if (y < 0)
		y = 0;
	mlx_clear_window(game->vars.mlx, game->vars.win);
	mlx_put_image_to_window(game->vars.mlx, game->vars.win,
		game_over.img, x, y);
	free(game_over.img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movabsq $0x1a000000220, %rax    # imm = 0x1A000000220
movq %rsp, %rbx
movq %rax, 0x1c(%rbx)
leaq 0x31d3(%rip), %rsi      # 0xb140
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6a94
movl 0x148(%r14), %ebp
shll $0x6, %ebp
subl 0x1c(%rbx), %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
movl 0x14c(%r14), %r15d
shll $0x6, %r15d
subl 0x20(%rbx), %r15d
testl %r15d, %r15d
cmovlel %eax, %r15d
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x8f90
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq (%rbx), %rdx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x8d90
movq (%rbx), %rdi
callq 0x6190
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/alsmd[P]so_long/src/actions/game_over.c
// Function: print_screen
void	print_screen(t_game *game)
{
	t_data			img;
	int				x;
	int				y;

	img.w = 255;
	img.h = 255;
	load_img(&img, "./imgs/v.xpm", game);
	x = (game->width * BLOCK_SIZE) / 2 - img.w;
	if (x < 0)
		x = 0;
	y = ((game->height * BLOCK_SIZE) / 2) - img.h;
	if (y < 0)
		y = 0;
	mlx_clear_window(game->vars.mlx, game->vars.win);
	mlx_put_image_to_window(game->vars.mlx, game->vars.win,
		img.img, x, y);
	free(img.img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movabsq $0xff000000ff, %rax     # imm = 0xFF000000FF
movq %rsp, %rbx
movq %rax, 0x1c(%rbx)
leaq 0x3156(%rip), %rsi      # 0xb150
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6a94
movl 0x148(%r14), %ebp
shll $0x5, %ebp
subl 0x1c(%rbx), %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
movl 0x14c(%r14), %r15d
shll $0x5, %r15d
subl 0x20(%rbx), %r15d
testl %r15d, %r15d
cmovlel %eax, %r15d
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x8f90
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq (%rbx), %rdx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x8d90
movq (%rbx), %rdi
callq 0x6190
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/tests/pthread_create_blocking_np/main.c
// Function: main
int
main(int argc, char ** argv)
{

	WARNP_INIT;
	(void)argc; /* UNUSED */

	/* Check basic stuff. */
	if (check_basic())
		goto err0;

	/* Check the relative timing of points in the code. */
	if (check_timing())
		goto err0;

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x1451
callq 0x1e2c
movq $0x0, (%rsp)
leaq 0xc0(%rip), %rdx        # 0x1520
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x20f0
testl %eax, %eax
jne 0x14a3
movq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x11c0
testl %eax, %eax
jne 0x14cf
movq (%rsp), %rsi
leaq 0x3c9e(%rip), %rax      # 0x512c
cmpq %rax, %rsi
jne 0x14f6
callq 0x1528
testl %eax, %eax
jne 0x1516
xorl %edi, %edi
callq 0x11a0
movl %eax, %ebp
callq 0x1060
movq %rax, %rbx
movl (%rax), %r14d
movl %ebp, %edi
callq 0x11e0
leaq 0x1b46(%rip), %rdi      # 0x3004
movq %rax, %rsi
xorl %eax, %eax
testl %r14d, %r14d
jne 0x14e9
callq 0x1fcb
jmp 0x1516
movl %eax, %edi
callq 0x11e0
leaq 0x1b46(%rip), %rdi      # 0x3023
movq %rax, %rsi
xorl %eax, %eax
callq 0x1fcb
jmp 0x150b
callq 0x1eac
movl $0x0, (%rbx)
jmp 0x1516
leaq 0x1b37(%rip), %rdi      # 0x3034
leaq 0x3c28(%rip), %rdx      # 0x512c
xorl %eax, %eax
callq 0x1fcb
callq 0x1060
movl $0x0, (%rax)
movl $0x1, %edi
callq 0x11a0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/tests/pthread_create_blocking_np/timing.c
// Function: workfunc
static void *
workfunc(void * cookie)
{
	struct info * info = cookie;

	/* For checking the order. */
	if (monoclock_get(&info->thr_start))
		warnp("monoclock_get");

	/* Wait if the test calls for it. */
	if (info->options & WAIT_THREAD_AFTER_START)
		millisleep(WAIT_MS);

	/* For checking the order. */
	if (monoclock_get(&info->thr_stop))
		warnp("monoclock_get");

	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
addq $0x38, %rdi
callq 0x1bf0
testl %eax, %eax
je 0x1b82
callq 0x1060
cmpl $0x0, (%rax)
je 0x1b74
movq %rax, %r14
leaq 0x152c(%rip), %rdi      # 0x3090
xorl %eax, %eax
callq 0x1eac
movl $0x0, (%r14)
jmp 0x1b82
leaq 0x1515(%rip), %rdi      # 0x3090
xorl %eax, %eax
callq 0x1fcb
testb $0x1, (%rbx)
je 0x1ba2
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
movq $0x989680, 0x8(%rdi)    # imm = 0x989680
xorl %esi, %esi
callq 0x10b0
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x1bf0
testl %eax, %eax
je 0x1be3
callq 0x1060
cmpl $0x0, (%rax)
je 0x1bd5
movq %rax, %rbx
leaq 0x14ca(%rip), %rdi      # 0x3090
xorl %eax, %eax
callq 0x1eac
movl $0x0, (%rbx)
jmp 0x1be3
leaq 0x14b4(%rip), %rdi      # 0x3090
xorl %eax, %eax
callq 0x1fcb
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/vmtest.c
// Function: main
int
main(void)
{
	printf("Starting VM tests.\n");
	test1();
	test2();
	printf("VM tests complete.\n");

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0xb64(%rip), %rdi       # 0x2128
callq 0x1050
movabsq $0x6060002050100, %rax  # imm = 0x6060002050100
movq %rax, 0x6(%rsp)
movabsq $0x100020503000505, %rax # imm = 0x100020503000505
movq %rax, (%rsp)
callq 0x13a0
testq %rax, %rax
je 0x16a9
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movl $0xf, %edx
callq 0x1552
testl %eax, %eax
je 0x16b7
movq %rbx, %rdi
callq 0x1576
cmpw $0x14, %ax
jne 0x169b
leaq 0xb2a(%rip), %rdi       # 0x214e
callq 0x1050
movq %rbx, %rdi
callq 0x13ec
movaps 0xa88(%rip), %xmm0      # 0x20c0
movaps %xmm0, (%rsp)
movl $0x60606, 0xf(%rsp)     # imm = 0x60606
callq 0x13a0
testq %rax, %rax
je 0x16a9
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movl $0x13, %edx
callq 0x1552
testl %eax, %eax
je 0x16b7
movq %rbx, %rdi
callq 0x1576
cmpw $0x8, %ax
jne 0x16a2
leaq 0xae2(%rip), %rdi       # 0x215c
callq 0x1050
movq %rbx, %rdi
callq 0x13ec
leaq 0xaad(%rip), %rdi       # 0x213b
callq 0x1050
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
callq 0x112c
jmp 0x1629
callq 0x114e
jmp 0x167f
leaq 0xa23(%rip), %rsi       # 0x20d3
movl $0x47, %edi
jmp 0x16c3
leaq 0xa37(%rip), %rsi       # 0x20f5
movl $0x46, %edi
xorl %eax, %eax
callq 0x1060
// File: /workspace/github_c_makefile_star2_O1/aligrudi[P]gpss/datcnf.c
// Function: main
int main(int argc, char *argv[])
{
	int id = atoi(argv[1]);
	if (id == 0)
		test2();
	if (id == 1)
		test3();
	if (id == 2)
		test4();
	if (id == 3)
		test5();
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rsi), %rdi
callq 0x1060
cmpl $0x3, %eax
ja 0x1346
leaq 0xed8(%rip), %r15       # 0x206b
movl %eax, %eax
leaq 0xe68(%rip), %rcx       # 0x2004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xe73(%rip), %rdi       # 0x201f
callq 0x1040
leaq 0xe6b(%rip), %rax       # 0x2023
movq %rax, 0x10(%rsp)
leaq 0xe8b(%rip), %rax       # 0x204f
movq %rax, 0x8(%rsp)
leaq 0xe77(%rip), %r12       # 0x2047
leaq 0xe68(%rip), %r13       # 0x203f
leaq 0xe59(%rip), %r14       # 0x2037
leaq 0xe4a(%rip), %r15       # 0x202f
leaq 0xe7f(%rip), %rdi       # 0x206b
jmp 0x12e9
leaq 0xea3(%rip), %rbp       # 0x209b
leaq 0xe94(%rip), %rbx       # 0x2093
leaq 0xe85(%rip), %r14       # 0x208b
leaq 0xe76(%rip), %rax       # 0x2083
movq %rax, 0x8(%rsp)
leaq 0xe62(%rip), %r12       # 0x207b
leaq 0xe53(%rip), %r13       # 0x2073
leaq 0xe40(%rip), %rdi       # 0x2067
jmp 0x1307
leaq 0xde1(%rip), %rdi       # 0x2014
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x1f4, %edx            # imm = 0x1F4
xorl %eax, %eax
callq 0x1050
leaq 0xdd1(%rip), %rbx       # 0x201c
leaq 0xdc9(%rip), %r14       # 0x201b
xorl %r15d, %r15d
movl $0x3, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %eax, %eax
callq 0x1050
movl %r15d, %r12d
movl %r12d, %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %r12d, %esi
subl %eax, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
incl %r12d
decl %ebp
jne 0x126c
movl $0xa, %edi
callq 0x1030
leal 0x2(%r15), %eax
cmpl $0x3e6, %r15d           # imm = 0x3E6
movl %eax, %r15d
jb 0x1255
jmp 0x1346
leaq 0xd93(%rip), %rax       # 0x204f
movq %rax, 0x10(%rsp)
leaq 0xd7f(%rip), %rax       # 0x2047
movq %rax, 0x8(%rsp)
leaq 0xd6b(%rip), %r12       # 0x203f
leaq 0xd5c(%rip), %r13       # 0x2037
leaq 0xd4d(%rip), %r14       # 0x202f
leaq 0xd42(%rip), %rdi       # 0x202b
callq 0x1040
leaq 0xd6a(%rip), %rbp       # 0x205f
leaq 0xd5b(%rip), %rbx       # 0x2057
movq %r15, %rdi
movq %r14, %r15
movq 0x10(%rsp), %r14
callq 0x1040
movq %r15, %rdi
callq 0x1040
movq %r13, %rdi
callq 0x1040
movq %r12, %rdi
callq 0x1040
movq 0x8(%rsp), %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1040
movq %rbp, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_opml_import.c
// Function: main
int
main(void)
{
	if (pledge("stdio", NULL) == -1)
		err(1, "pledge");

	parser.xmlattr = xml_handler_attr;
	parser.xmlattrentity = xml_handler_attrentity;
	parser.xmltagend = xml_handler_end_element;

	fputs(
	    "#sfeedpath=\"$HOME/.sfeed/feeds\"\n"
	    "\n"
	    "# list of feeds to fetch:\n"
	    "feeds() {\n"
	    "	# feed <name> <feedurl> [basesiteurl] [encoding]\n", stdout);
	/* NOTE: getnext is defined in xml.h for inline optimization */
	xml_parse(&parser);
	fputs("}\n", stdout);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x61(%rip), %rax        # 0x1238
movq %rax, 0x3eb2(%rip)      # 0x5090
leaq 0x3eab(%rip), %rbx      # 0x5090
leaq 0xdc(%rip), %rax        # 0x12c8
movq %rax, 0x3eb5(%rip)      # 0x50a8
leaq 0x11d(%rip), %rax       # 0x1317
movq %rax, 0x3eff(%rip)      # 0x5100
movq 0x3dd8(%rip), %r14      # 0x4fe0
movq (%r14), %rsi
leaq 0x1df2(%rip), %rdi      # 0x3004
callq 0x1080
movq %rbx, %rdi
callq 0x15f1
movq (%r14), %rsi
leaq 0x1e53(%rip), %rdi      # 0x307c
callq 0x1080
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_opml_import.c
// Function: xml_handler_attr
static void
xml_handler_attr(XMLParser *p, const char *tag, size_t taglen,
	const char *name, size_t namelen, const char *value, size_t valuelen)
{
	if (strcasecmp(tag, "outline"))
		return;

	if (!strcasecmp(name, "title"))
		strlcat(title, value, sizeof(title));
	else if (!strcasecmp(name, "text"))
		strlcat(text, value, sizeof(text));
	else if (!strcasecmp(name, "xmlurl"))
		strlcat(url, value, sizeof(url));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rsi, %rdi
leaq 0x1e33(%rip), %rsi      # 0x307f
callq 0x1040
testl %eax, %eax
je 0x125d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1e23(%rip), %rsi      # 0x3087
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
je 0x12a4
leaq 0x1e16(%rip), %rsi      # 0x308d
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
je 0x12ad
leaq 0x1e08(%rip), %rsi      # 0x3092
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
jne 0x1255
leaq 0x6893(%rip), %rdi      # 0x7b30
movl $0x800, %edx            # imm = 0x800
jmp 0x12b9
leaq 0x6685(%rip), %rdi      # 0x7930
jmp 0x12b4
leaq 0x677c(%rip), %rdi      # 0x7a30
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x210c
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_opml_import.c
// Function: xml_handler_attrentity
static void
xml_handler_attrentity(XMLParser *p, const char *tag, size_t taglen,
	const char *name, size_t namelen, const char *value, size_t valuelen)
{
	char buf[16];
	ssize_t len;

	if ((len = xml_entitytostr(value, buf, sizeof(buf))) < 0)
		return;
	if (len > 0)
		xml_handler_attr(p, tag, taglen, name, namelen, buf, len);
	else
		xml_handler_attr(p, tag, taglen, name, namelen, value, valuelen);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r9, %r14
movq %rcx, %rbx
movq %rsi, %r15
leaq 0x10(%rsp), %rsi
movl $0x10, %edx
movq %r9, %rdi
callq 0x1450
testl %eax, %eax
js 0x130d
je 0x12ff
leaq 0x10(%rsp), %r9
movq %r15, %rsi
movq %rbx, %rcx
jmp 0x1308
movq %r15, %rsi
movq %rbx, %rcx
movq %r14, %r9
callq 0x1238
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_opml_import.c
// Function: xml_handler_end_element
static void
xml_handler_end_element(XMLParser *p, const char *tag, size_t taglen,
	int isshort)
{
	if (strcasecmp(tag, "outline"))
		return;

	if (url[0]) {
		fputs("\tfeed '", stdout);
		if (title[0])
			printsafe(title);
		else if (text[0])
			printsafe(text);
		else
			fputs("unnamed", stdout);
		fputs("' '", stdout);
		printsafe(url);
		fputs("'\n", stdout);
	}
	url[0] = text[0] = title[0] = '\0';
}

// Assembly:
pushq %rbx
movq %rsi, %rdi
leaq 0x1d5d(%rip), %rsi      # 0x307f
callq 0x1040
testl %eax, %eax
jne 0x13b3
cmpb $0x0, 0x67fa(%rip)      # 0x7b30
je 0x139f
movq 0x3ca1(%rip), %rbx      # 0x4fe0
movq (%rbx), %rsi
leaq 0x1d50(%rip), %rdi      # 0x3099
callq 0x1080
cmpb $0x0, 0x65db(%rip)      # 0x7930
je 0x1360
leaq 0x65d2(%rip), %rdi      # 0x7930
jmp 0x1370
cmpb $0x0, 0x66c9(%rip)      # 0x7a30
je 0x13b5
leaq 0x66c0(%rip), %rdi      # 0x7a30
callq 0x13c6
movq (%rbx), %rsi
leaq 0x1d2a(%rip), %rdi      # 0x30a9
callq 0x1080
leaq 0x67a5(%rip), %rdi      # 0x7b30
callq 0x13c6
movq (%rbx), %rsi
leaq 0x1d13(%rip), %rdi      # 0x30ad
callq 0x1080
xorl %eax, %eax
movb %al, 0x6589(%rip)       # 0x7930
movb %al, 0x6683(%rip)       # 0x7a30
movb %al, 0x677d(%rip)       # 0x7b30
popq %rbx
retq
movq (%rbx), %rsi
leaq 0x1ce2(%rip), %rdi      # 0x30a1
callq 0x1080
jmp 0x1375
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_opml_import.c
// Function: printsafe
static void
printsafe(const char *s)
{
	for (; *s; s++) {
		if (iscntrl((unsigned char)*s))
			continue;
		else if (*s == '\\')
			fputs("\\\\", stdout);
		else if (*s == '\'')
			fputs("'\\''", stdout);
		else
			putchar(*s);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x143f
movq %rdi, %rbx
callq 0x10c0
movq %rax, %r14
incq %rbx
movq 0x3bf2(%rip), %r13      # 0x4fe0
leaq 0x1cbe(%rip), %r15      # 0x30b3
leaq 0x1cb4(%rip), %r12      # 0x30b0
movq (%r14), %rcx
movzbl %bpl, %eax
testb $0x2, (%rcx,%rax,2)
jne 0x1434
cmpb $0x27, %bpl
je 0x141d
cmpl $0x5c, %eax
jne 0x142b
movq (%r13), %rsi
movq %r12, %rdi
jmp 0x1424
movq (%r13), %rsi
movq %r15, %rdi
callq 0x1080
jmp 0x1434
movsbl %bpl, %edi
callq 0x1030
movb (%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0x13fc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.11/socket-client.c
// Function: main
int main (int argc, char* const argv[])
{
  const char* const socket_name = argv[1];
  const char* const message = argv[2];
  int socket_fd;
  struct sockaddr_un name;

  /* Create the socket. */
  socket_fd = socket (PF_LOCAL, SOCK_STREAM, 0);
  /* Store the server’s name in the socket address. */
  name.sun_family = AF_LOCAL;
  strcpy (name.sun_path, socket_name);
  /* Connect the socket. */
  connect (socket_fd, (const struct sockaddr *)&name, SUN_LEN (&name));
  /* Write the text on the command line to the socket. */
  write_text (socket_fd, message);
  close (socket_fd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq 0x8(%rsi), %r15
movq 0x10(%rsi), %rbx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1080
movl %eax, %r14d
leaq -0x8c(%rbp), %r12
movw $0x1, -0x2(%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1030
movq %r12, %rdi
callq 0x1050
leal 0x2(%rax), %edx
leaq -0x8e(%rbp), %rsi
movl %r14d, %edi
callq 0x1070
movl %r14d, %edi
movq %rbx, %rsi
callq 0x118c
movl %r14d, %edi
callq 0x1060
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/acidDrain[P]st/st.c
// Function: newterm
void
newterm(const Arg* a)
{
	switch (fork()) {
	case -1:
		die("fork failed: %s\n", strerror(errno));
		break;
	case 0:
		chdir(getcwd_by_pid(pid));
		execlp("st", "./st", "-c", "st-256color", "-t", "Suckless Terminal", "-f", "Fira Code:style=bold:size=11:hinting=true:autohint=true:antialias=true:hintstyle=hintslight", NULL);
		break;
	}
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
callq 0x68a0
testl %eax, %eax
je 0x89c9
cmpl $-0x1, %eax
je 0x8a49
addq $0x20, %rsp
jmp 0x8a47
movl 0x1312d(%rip), %ecx     # 0x1bafc
leaq 0x7e56(%rip), %rdx      # 0x1082c
movq %rsp, %rbx
movl $0x20, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6410
movq %rax, %rdi
callq 0x6060
subq $0x8, %rsp
leaq 0x7c6d(%rip), %r10      # 0x10672
leaq 0x7c63(%rip), %r11      # 0x1066f
leaq 0x7c35(%rip), %rdi      # 0x10648
leaq 0x7c2c(%rip), %rsi      # 0x10646
leaq 0x7c2a(%rip), %rdx      # 0x1064b
leaq 0x7c26(%rip), %rcx      # 0x1064e
leaq 0x7c2b(%rip), %r8       # 0x1065a
leaq 0x7c27(%rip), %r9       # 0x1065d
xorl %eax, %eax
pushq $0x0
pushq %r10
pushq %r11
callq 0x6230
addq $0x40, %rsp
popq %rbx
retq
callq 0x6600
movl (%rax), %edi
callq 0x64b0
leaq 0x7b7e(%rip), %rdi      # 0x105da
movq %rax, %rsi
xorl %eax, %eax
callq 0x6f56
// File: /workspace/github_c_makefile_star2_O1/acidDrain[P]st/x.c
// Function: setpalette
void setpalette(const Arg *arg) {

    if ( arg->i < LEN(palettes) )   {
        colorname = palettes[arg->i];
        xloadcols();
        cresize(win.w, win.h);
    }
}

// Assembly:
movl (%rdi), %eax
cmpq $0x3, %rax
ja 0xeca8
pushq %rax
shlq $0x7, %rax
leaq 0x88e9(%rip), %rcx      # 0x17570
addq %rax, %rcx
movq %rcx, 0xf3cf(%rip)      # 0x1e060
callq 0xb5b6
movl 0xf3dc(%rip), %edi      # 0x1e078
movl 0xf3da(%rip), %esi      # 0x1e07c
popq %rax
jmp 0xe1b2
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/moshmap.c
// Function: usage
void usage (void)
{ fprintf (stderr, "Usage: moshmap <commands>\n") ;
  fprintf (stderr, "Commands are executed in order - set parameters before using them!\n") ;
  fprintf (stderr, "  -K | --kmer <kmer size> [%d]\n", params.k) ;
  fprintf (stderr, "  -W | --window <window> [%d]\n", params.w) ;
  fprintf (stderr, "  -S | --seed <random number seed> [%d]\n", params.s) ;
  fprintf (stderr, "  -B | --tableBits <hash index table bitcount> [%d]\n", params.B) ;
  fprintf (stderr, "  -v | --verbose : toggle verbose mode\n") ;
  fprintf (stderr, "  -t | --threads <number of threads for parallel ops> [%d]\n", numThreads) ;
  fprintf (stderr, "  -o | --output <output filename> : '-' for stdout\n") ;
  fprintf (stderr, "  -f | --referenceFasta <reference fasta file>\n") ;
  fprintf (stderr, "  -w | --referenceWrite <file stem> : writes reference hash files\n") ;
  fprintf (stderr, "  -r | --referenceRead <file stem> : read reference hash files\n") ;
  fprintf (stderr, "  -q | --query <query fasta file>\n") ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x9dbd(%rip), %r14      # 0xaff8
movq (%r14), %rcx
leaq 0x6165(%rip), %rdi      # 0x73aa
pushq $0x1a
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rcx
leaq 0x6168(%rip), %rdi      # 0x73c5
pushq $0x43
popq %rsi
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rdi
movl 0xb0d7(%rip), %edx      # 0xc348
leaq 0x6191(%rip), %rsi      # 0x7409
xorl %eax, %eax
callq 0x1120
movq (%r14), %rdi
movl 0xb0c4(%rip), %edx      # 0xc34c
leaq 0x619a(%rip), %rsi      # 0x7429
xorl %eax, %eax
callq 0x1120
movq (%r14), %rdi
movl 0xb0b1(%rip), %edx      # 0xc350
leaq 0x61a2(%rip), %rsi      # 0x7448
xorl %eax, %eax
callq 0x1120
movq (%r14), %rdi
movl 0xb09e(%rip), %edx      # 0xc354
leaq 0x61b4(%rip), %rsi      # 0x7471
xorl %eax, %eax
callq 0x1120
movq (%r14), %rcx
leaq 0x61d8(%rip), %rdi      # 0x74a6
pushq $0x27
popq %rsi
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rdi
movl 0x9e3e(%rip), %edx      # 0xb120
leaq 0x61e5(%rip), %rsi      # 0x74ce
xorl %eax, %eax
callq 0x1120
movq (%r14), %rcx
leaq 0x6210(%rip), %rdi      # 0x750a
pushq $0x33
popq %rsi
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rcx
leaq 0x622f(%rip), %rdi      # 0x753e
pushq $0x2f
popq %rsi
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rcx
leaq 0x624a(%rip), %rdi      # 0x756e
pushq $0x42
popq %rsi
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rcx
leaq 0x6278(%rip), %rdi      # 0x75b1
pushq $0x3f
popq %rsi
movq %rbx, %rdx
callq 0x11f0
movq (%r14), %rcx
leaq 0x62a3(%rip), %rdi      # 0x75f1
pushq $0x22
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11f0
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/moshmap.c
// Function: referenceCreate
Reference *referenceCreate (Moshset *ms, U32 size)
{
  if (!ms || !ms->size) die ("moshset must be initialised before reference") ;
  if (!size) die ("refCreate must have size > 0") ;
  Reference *ref = new0 (1, Reference) ;
  ref->ms = ms ;
  ref->depth = ms->max ? new0 (ms->max, U32) : new0 (ms->size, U32) ;
  ref->size = size ;
  ref->index = new (size, U32) ;
  ref->offset = new (size, U32) ;
  ref->id = new (size, U32) ;
  ref->dict = dictCreate (1024) ;
  ref->len = arrayCreate (1024, U32) ;
  /* NB don't create loc and rev here */
  return ref ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r15
testq %rdi, %rdi
je 0x1c32
cmpl $0x0, 0xc(%r15)
jne 0x1c40
leaq 0x53e7(%rip), %rdi      # 0x7020
xorl %eax, %eax
callq 0x614c
testl %ebx, %ebx
jne 0x1c52
leaq 0x5402(%rip), %rdi      # 0x704d
xorl %eax, %eax
callq 0x614c
movl $0x1, %edi
movl $0x50, %esi
callq 0x623c
movq %rax, %r14
movq %r15, (%rax)
movl 0x40(%r15), %eax
testl %eax, %eax
jne 0x1c73
movl 0xc(%r15), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x623c
movq %rax, 0x28(%r14)
movl %ebx, 0x8(%r14)
movl %ebx, %ebx
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x6214
movq %rax, 0x10(%r14)
movq %rbx, %rdi
callq 0x6214
movq %rax, 0x18(%r14)
movq %rbx, %rdi
callq 0x6214
movq %rax, 0x20(%r14)
movl $0x400, %edi            # imm = 0x400
callq 0x53a4
movq %rax, 0x40(%r14)
movl $0x400, %edi            # imm = 0x400
movl $0x4, %esi
callq 0x59b4
movq %rax, 0x48(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/moshmap.c
// Function: referenceDestroy
void referenceDestroy (Reference *ref)
{ free (ref->depth) ;
  if (ref->loc) free (ref->loc) ; if (ref->rev) free (ref->rev) ;
  free (ref->index) ; free (ref->offset) ; free (ref->id) ;
  dictDestroy (ref->dict) ; arrayDestroy (ref->len) ;
  free (ref) ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x1040
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x1cf6
callq 0x1040
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x1d04
callq 0x1040
movq 0x10(%rbx), %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
callq 0x1040
movq 0x20(%rbx), %rdi
callq 0x1040
movq 0x40(%rbx), %rdi
callq 0x5417
movq 0x48(%rbx), %rdi
callq 0x5b0d
movq %rbx, %rdi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/moshmap.c
// Function: referencePack
void referencePack (Reference *ref)
{
  resize (ref->depth, ref->ms->size, ref->ms->max+1, U32) ;
  resize (ref->index, ref->size, ref->max, U32) ;
  resize (ref->offset, ref->size, ref->max, U32) ;
  resize (ref->id, ref->size, ref->max, U32) ;
  ref->size = ref->max ;
  
  ref->rev = new (ref->size, U32) ;			/* now build rev and loc */
  ref->loc = new (ref->ms->max + 1, U32) ; ref->loc[0] = 0 ;
  int i ;
  for (i = 1 ; i <= ref->ms->max ; ++i)
    { ref->loc[i] = ref->loc[i-1] + ref->depth[i-1] ; }
  memset (ref->depth, 0, ref->ms->size*sizeof(U32)) ; /* build this up again in loop below */
  U32 *ri = ref->index ;
  for (i = 0 ; i < ref->max ; ++i, ++ri)
    ref->rev[ref->loc[*ri] + ref->depth[*ri]++] = i ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x40(%rax), %edi
incl %edi
shlq $0x2, %rdi
callq 0x6214
movq %rax, %r14
movq (%rbx), %rax
movq 0x28(%rbx), %rsi
movl 0xc(%rax), %ecx
movl 0x40(%rax), %edx
incl %edx
cmpl %edx, %ecx
cmovbl %ecx, %edx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1140
movq 0x28(%rbx), %rdi
callq 0x1040
movq %r14, 0x28(%rbx)
movl 0xc(%rbx), %edi
shlq $0x2, %rdi
callq 0x6214
movq %rax, %r14
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %edx
cmpl %edx, %eax
cmovbl %eax, %edx
movq 0x10(%rbx), %rsi
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1140
movq 0x10(%rbx), %rdi
callq 0x1040
movq %r14, 0x10(%rbx)
movl 0xc(%rbx), %edi
shlq $0x2, %rdi
callq 0x6214
movq %rax, %r14
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %edx
cmpl %edx, %eax
cmovbl %eax, %edx
movq 0x18(%rbx), %rsi
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1140
movq 0x18(%rbx), %rdi
callq 0x1040
movq %r14, 0x18(%rbx)
movl 0xc(%rbx), %edi
shlq $0x2, %rdi
callq 0x6214
movq %rax, %r14
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %edx
cmpl %edx, %eax
cmovbl %eax, %edx
movq 0x20(%rbx), %rsi
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x1140
movq 0x20(%rbx), %rdi
callq 0x1040
movq %r14, 0x20(%rbx)
movl 0xc(%rbx), %edi
movl %edi, 0x8(%rbx)
shlq $0x2, %rdi
callq 0x6214
movq %rax, 0x30(%rbx)
movq (%rbx), %rax
movl 0x40(%rax), %edi
incl %edi
shlq $0x2, %rdi
callq 0x6214
movq %rax, 0x38(%rbx)
movl $0x0, (%rax)
movq (%rbx), %rcx
cmpl $0x0, 0x40(%rcx)
je 0x1e79
movq 0x28(%rbx), %rdx
movl (%rax), %esi
xorl %edi, %edi
addl (%rdx,%rdi,4), %esi
movl %esi, 0x4(%rax,%rdi,4)
movl 0x40(%rcx), %r8d
incq %rdi
cmpq %r8, %rdi
jb 0x1e66
movq 0x28(%rbx), %rdi
movl 0xc(%rcx), %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x10d0
cmpl $0x0, 0xc(%rbx)
je 0x1ec3
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq 0x38(%rbx), %rsi
xorl %edi, %edi
movl (%rax,%rdi,4), %r8d
movl (%rcx,%r8,4), %r9d
leal 0x1(%r9), %r10d
addl (%rsi,%r8,4), %r9d
movl %r10d, (%rcx,%r8,4)
movl %edi, (%rdx,%r9,4)
incq %rdi
cmpl 0xc(%rbx), %edi
jb 0x1ea3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: user_join_battle
void user_join_battle(uint32_t bid, uint32_t uid) {
	int ux = (rand() & 0x7FFF) % BATTLE_W;
	int uy = (rand() & 0x7FFF) % BATTLE_H;
	battles[bid].users[uid].pos.x = ux;
	battles[bid].users[uid].pos.y = uy;
	log("alloc position (%hhu, %hhu) for launcher #%d@%s\n",
			ux, uy, uid, sessions[uid].user_name);

	sessions[uid].state = USER_STATE_BATTLE;

	if(battles[bid].users[uid].battle_state == BATTLE_STATE_UNJOINED) {
		user_join_battle_common_part(bid, uid, USER_STATE_BATTLE);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
callq 0x1180
andl $0x7fff, %eax           # imm = 0x7FFF
pushq $0x3c
popq %rcx
xorl %edx, %edx
divl %ecx
movl %edx, %r15d
callq 0x1180
andl $0xf, %eax
movl %r14d, -0x2c(%rbp)
movl %r14d, %ecx
movl %ebx, %edx
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
leaq 0x80ea(%rip), %r12      # 0x92f0
addq %rcx, %r12
imulq $0x14, %rdx, %r13
movb %r15b, 0x20(%r13,%r12)
movb %al, 0x21(%r13,%r12)
movq 0x7dd2(%rip), %rcx      # 0x8ff0
movq (%rcx), %rdi
imulq $0x48, %rdx, %r14
leaq 0x7f54(%rip), %rcx      # 0x9180
leaq (%rcx,%r14), %r10
leaq 0x3fa5(%rip), %rsi      # 0x51dc
leaq 0x3fe7(%rip), %rdx      # 0x5225
movl $0x89, %ecx
movl %r15d, %r8d
movl %eax, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbx
callq 0x10d0
popq %rcx
popq %rdx
leaq 0x7f24(%rip), %rax      # 0x9180
movl $0x3, 0xc(%r14,%rax)
cmpl $0x0, 0x10(%r13,%r12)
je 0x127c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x3
popq %rdx
movl -0x2c(%rbp), %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2fcd
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: find_uid_by_user_name
int find_uid_by_user_name(const char *user_name) {
	int ret_uid = -1;
	log("find user '%s'\n", user_name);
	for(int i = 0; i < USER_CNT; i++) {
		if(query_session_built(i)) {
			if(strncmp(user_name, sessions[i].user_name, USERNAME_SIZE - 1) == 0) {
				ret_uid = i;
				break;
			}
		}
	}

	if(ret_uid == -1) {
		logi("fail\n");
	}else{
		logi("found: %d@%s\n", ret_uid, sessions[ret_uid].user_name);
	}

	return ret_uid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x7d41(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x3ff9(%rip), %rsi      # 0x52b2
leaq 0x401a(%rip), %rdx      # 0x52da
xorl %r13d, %r13d
movl $0x9f, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x10d0
leaq 0x7ea7(%rip), %r15      # 0x9180
pushq $-0x1
popq %rbx
pushq $0x6
popq %r12
cmpl $0x2, 0xc(%r15)
jb 0x12f9
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1050
testl %eax, %eax
je 0x1308
incq %r13
addq $0x48, %r15
cmpq $0x5, %r13
jne 0x12e0
jmp 0x130b
movl %r13d, %ebx
movq 0x7cde(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
cmpl $-0x1, %ebx
jne 0x1336
leaq 0x3fcf(%rip), %rsi      # 0x52f0
leaq 0x3fb2(%rip), %rdx      # 0x52da
movl $0xaa, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x1364
movslq %ebx, %rax
imulq $0x48, %rax, %rax
leaq 0x7e3c(%rip), %r9       # 0x9180
addq %rax, %r9
leaq 0x3fc4(%rip), %rsi      # 0x5312
leaq 0x3f85(%rip), %rdx      # 0x52da
movl $0xac, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x10d0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: battle_ruler
void *battle_ruler(void *args) {
	int bid = (int)(uintptr_t)args;
	log("battle ruler for battle #%d\n", bid);
	// FIXME: battle re-alloced before exiting loop 
	while(battles[bid].is_alloced) {
		move_bullets(bid);
		check_who_get_blood_vial(bid);
		check_who_traped_in_magma(bid);
		check_who_got_charger(bid);
		check_who_is_shooted(bid);
		check_who_is_dead(bid);
		
		random_generate_items(bid);

		inform_all_user_battle_state(bid);

		usleep(50000);
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x7c6a(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x4384(%rip), %rsi      # 0x5714
leaq 0x43b2(%rip), %rdx      # 0x5749
movl $0x1ce, %ecx            # imm = 0x1CE
movl %ebx, %r8d
xorl %eax, %eax
callq 0x10d0
movslq %ebx, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x7f39(%rip), %r14      # 0x92f0
cmpl $0x0, (%rax,%r14)
je 0x1409
addq %rax, %r14
movl %ebx, %edi
callq 0x3410
movl %ebx, %edi
callq 0x34e9
movl %ebx, %edi
callq 0x3605
movl %ebx, %edi
callq 0x3735
movl %ebx, %edi
callq 0x37be
movl %ebx, %edi
callq 0x3850
movl %ebx, %edi
callq 0x339d
movl %ebx, %edi
callq 0x38b1
movl $0xc350, %edi           # imm = 0xC350
callq 0x1190
cmpl $0x0, (%r14)
jne 0x13c1
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: launch_battle
void launch_battle(int bid) {
	pthread_t thread;

	log("try to create battle_ruler thread\n");
	if(pthread_create(&thread, NULL, battle_ruler, (void *)(uintptr_t)bid) == -1) {
		eprintf("fail to launch battle\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movq 0x7bcc(%rip), %r14      # 0x8ff0
movq (%r14), %rdi
leaq 0x43c1(%rip), %rsi      # 0x57ef
leaq 0x4a05(%rip), %rdx      # 0x5e3a
movl $0x1f5, %ecx            # imm = 0x1F5
xorl %eax, %eax
callq 0x10d0
movslq %ebx, %rcx
leaq -0xd6(%rip), %rdx       # 0x1375
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1130
cmpl $-0x1, %eax
je 0x1464
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq (%r14), %rdi
leaq 0x43bc(%rip), %rsi      # 0x582a
leaq 0x49c5(%rip), %rdx      # 0x5e3a
movl $0x1f7, %ecx            # imm = 0x1F7
xorl %eax, %eax
callq 0x10d0
xorl %edi, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: client_command_user_logout
int client_command_user_logout(int uid) {
	if(sessions[uid].state == USER_STATE_BATTLE
	|| sessions[uid].state == USER_STATE_WAIT_TO_BATTLE) {
		log("user %d@%s tries to logout was in battle\n", uid, sessions[uid].user_name);
		user_quit_battle(sessions[uid].bid, uid);
	}

	log("user %d@%s logout\n", uid, sessions[uid].user_name);
	sessions[uid].state = USER_STATE_NOT_LOGIN;
	inform_friends(uid, SERVER_MESSAGE_FRIEND_LOGOUT);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movslq %edi, %rax
imulq $0x48, %rax, %rax
leaq 0x7923(%rip), %rcx      # 0x9180
leaq (%rcx,%rax), %r14
movl 0xc(%rax,%rcx), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x18a2
movq 0x777c(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x4285(%rip), %rsi      # 0x5b03
leaq 0x42c0(%rip), %rdx      # 0x5b45
movl $0x24d, %ecx            # imm = 0x24D
movl %ebx, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x10d0
movl 0x10(%r14), %edi
movl %ebx, %esi
callq 0x2f4c
movq 0x7747(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x42ad(%rip), %rsi      # 0x5b60
leaq 0x428b(%rip), %rdx      # 0x5b45
movl $0x251, %ecx            # imm = 0x251
movl %ebx, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x10d0
movl $0x1, 0xc(%r14)
pushq $0x15
popq %rsi
movl %ebx, %edi
callq 0x3255
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: client_command_fetch_all_users
int client_command_fetch_all_users(int uid) {
	char *user_name = sessions[uid].user_name;
	log("user %d@'%s' tries to fetch all users' info\n", uid, user_name);

	if(!query_session_built(uid)) {
		logi("user %d@'%s' who tries to list users hasn't login\n", uid, user_name);
		send_to_client(uid, SERVER_RESPONSE_YOU_HAVE_NOT_LOGIN);
		return 0;
	}

	server_message_t sm;
	memset(&sm, 0, sizeof(server_message_t));
	list_all_users(&sm);
	sm.response = SERVER_RESPONSE_ALL_USERS_INFO;

	wrap_send(sessions[uid].conn, &sm);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edi, %r14d
movslq %edi, %r15
imulq $0x48, %r15, %rbx
leaq 0x7876(%rip), %r13      # 0x9180
addq %r13, %rbx
movq 0x76dc(%rip), %r12      # 0x8ff0
movq (%r12), %rdi
leaq 0x42b0(%rip), %rsi      # 0x5bcf
leaq 0x42ee(%rip), %rdx      # 0x5c14
movl $0x264, %ecx            # imm = 0x264
movl %r15d, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x10d0
cmpl $0x5, %r15d
jae 0x19ef
movl %r14d, %eax
imulq $0x48, %rax, %rax
cmpl $0x1, 0xc(%rax,%r13)
jbe 0x19be
leaq -0x1cb(%rbp), %r14
xorl %r15d, %r15d
movl $0x1a3, %r12d           # imm = 0x1A3
movl $0x1a3, %edx            # imm = 0x1A3
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movq %r14, %rdi
callq 0x3afa
movb $0xb, (%r14)
movl 0x8(%rbx), %ebx
imulq $0x1a3, %r15, %rax      # imm = 0x1A3
leaq (%rax,%rbp), %rsi
addq $-0x1cb, %rsi           # imm = 0xFE35
movl $0x1a3, %edx            # imm = 0x1A3
subq %r15, %rdx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x1070
addq %rax, %r15
cmpq %r12, %r15
jb 0x197f
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdi
leaq 0x426a(%rip), %rsi      # 0x5c33
leaq 0x4244(%rip), %rdx      # 0x5c14
movl $0x267, %ecx            # imm = 0x267
movl %r14d, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x10d0
pushq $0x6
popq %rsi
movl %r14d, %edi
callq 0x357d
jmp 0x19aa
leaq 0x365b(%rip), %rdi      # 0x5051
leaq 0x3617(%rip), %rsi      # 0x5014
leaq 0x3619(%rip), %rcx      # 0x501d
pushq $0x4a
popq %rdx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: client_command_fetch_all_friends
int client_command_fetch_all_friends(int uid) {
	char *user_name = sessions[uid].user_name;
	log("user %d@'%s' tries to fetch all friends' info\n", uid, user_name);

	if(!query_session_built(uid)) {
		logi("user %d@'%s' who tries to list users hasn't login\n", uid, user_name);
		send_to_client(uid, SERVER_RESPONSE_YOU_HAVE_NOT_LOGIN);
		return 0;
	}

	server_message_t sm;
	memset(&sm, 0, sizeof(server_message_t));
	list_all_users(&sm);
	sm.all_users[uid].user_state = USER_STATE_UNUSED;
	sm.response = SERVER_RESPONSE_ALL_FRIENDS_INFO;

	wrap_send(sessions[uid].conn, &sm);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edi, %r14d
movslq %edi, %r15
imulq $0x48, %r15, %rbx
leaq 0x774f(%rip), %r13      # 0x9180
addq %r13, %rbx
movq 0x75b5(%rip), %r12      # 0x8ff0
movq (%r12), %rdi
leaq 0x423c(%rip), %rsi      # 0x5c82
leaq 0x427c(%rip), %rdx      # 0x5cc9
movl $0x278, %ecx            # imm = 0x278
movl %r15d, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x10d0
cmpl $0x5, %r15d
jae 0x1b1f
movl %r14d, %eax
imulq $0x48, %rax, %rax
cmpl $0x1, 0xc(%rax,%r13)
jbe 0x1aee
leaq -0x1cb(%rbp), %r14
xorl %r12d, %r12d
movl $0x1a3, %r13d           # imm = 0x1A3
movl $0x1a3, %edx            # imm = 0x1A3
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movq %r14, %rdi
callq 0x3afa
movb $0x0, -0x1c3(%rbp,%r15,8)
movb $0xc, (%r14)
movl 0x8(%rbx), %ebx
imulq $0x1a3, %r12, %rax      # imm = 0x1A3
leaq (%rax,%rbp), %rsi
addq $-0x1cb, %rsi           # imm = 0xFE35
movl $0x1a3, %edx            # imm = 0x1A3
subq %r12, %rdx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x1070
addq %rax, %r12
cmpq %r13, %r12
jb 0x1aaf
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdi
leaq 0x413a(%rip), %rsi      # 0x5c33
leaq 0x41c9(%rip), %rdx      # 0x5cc9
movl $0x27b, %ecx            # imm = 0x27B
movl %r14d, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x10d0
pushq $0x6
popq %rsi
movl %r14d, %edi
callq 0x357d
jmp 0x1ada
leaq 0x352b(%rip), %rdi      # 0x5051
leaq 0x34e7(%rip), %rsi      # 0x5014
leaq 0x34e9(%rip), %rcx      # 0x501d
pushq $0x4a
popq %rdx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: invite_friend_to_battle
int invite_friend_to_battle(int bid, int uid, char *friend_name) {
	int friend_id = find_uid_by_user_name(friend_name);
	if(friend_id == -1) {
		// fail to find friend
		logi("friend '%s' hasn't login\n", friend_name);
		send_to_client(uid, SERVER_MESSAGE_FRIEND_NOT_LOGIN);
	}else if(friend_id == uid){
		logi("launch battle %d for %s\n", bid, sessions[uid].user_name);
		sessions[uid].inviter_id = uid;
		send_to_client(uid, SERVER_RESPONSE_INVITATION_SENT);
	}else if(sessions[friend_id].state == USER_STATE_BATTLE) {
		// friend already in battle
		logi("friend '%s' already in battle\n", friend_name);
		send_to_client(uid, SERVER_MESSAGE_FRIEND_ALREADY_IN_BATTLE);
	}else{
		// invite friend
		logi("friend %d@'%s' found\n", friend_id, friend_name);

		user_invited_to_join_battle(bid, friend_id);
		// WARNING: can't move this statement
		sessions[friend_id].inviter_id = uid;

		send_to_client_with_username(friend_id, SERVER_MESSAGE_INVITE_TO_BATTLE, sessions[uid].user_name);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movl %edi, %r15d
movq %rdx, %rdi
callq 0x1297
cmpl $-0x1, %eax
jne 0x1b8d
movq 0x748a(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x417a(%rip), %rsi      # 0x5cea
leaq 0x41a9(%rip), %rdx      # 0x5d20
movl $0x290, %ecx            # imm = 0x290
movq %r14, %r8
xorl %eax, %eax
callq 0x10d0
pushq $0x18
jmp 0x1c15
movl %eax, %r12d
cmpl %ebx, %eax
jne 0x1bd6
movq 0x7455(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
movslq %ebx, %rax
imulq $0x48, %rax, %r14
leaq 0x75d4(%rip), %r12      # 0x9180
leaq (%r12,%r14), %r9
leaq 0x4181(%rip), %rsi      # 0x5d38
leaq 0x4162(%rip), %rdx      # 0x5d20
movl $0x293, %ecx            # imm = 0x293
movl %r15d, %r8d
xorl %eax, %eax
callq 0x10d0
movl %ebx, 0x14(%r14,%r12)
pushq $0x11
jmp 0x1c15
movslq %r12d, %rax
imulq $0x48, %rax, %r13
leaq 0x759c(%rip), %rcx      # 0x9180
cmpl $0x3, 0xc(%r13,%rcx)
movq 0x73ff(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
jne 0x1c2e
leaq 0x4170(%rip), %rsi      # 0x5d6d
leaq 0x411c(%rip), %rdx      # 0x5d20
movl $0x298, %ecx            # imm = 0x298
movq %r14, %r8
xorl %eax, %eax
callq 0x10d0
pushq $0x19
popq %rsi
movl %ebx, %edi
callq 0x357d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rcx, %r13
leaq 0x4170(%rip), %rsi      # 0x5da8
leaq 0x40e1(%rip), %rdx      # 0x5d20
movl $0x29c, %ecx            # imm = 0x29C
movl %r12d, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x10d0
movl %r15d, %edi
movl %r12d, %esi
callq 0x3007
movl %ebx, 0x14(%r13)
movslq %ebx, %rax
imulq $0x48, %rax, %rdx
leaq 0x7512(%rip), %rax      # 0x9180
addq %rax, %rdx
pushq $0x1a
popq %rsi
movl %r12d, %edi
callq 0x304f
jmp 0x1c1d
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: client_command_quit_battle
int client_command_quit_battle(int uid) {
	log("user %d@%s tries to quit battle\n", uid, sessions[uid].user_name);
	if(sessions[uid].state != USER_STATE_BATTLE) {
		logi("but he hasn't join battle\n");
		send_to_client(uid, SERVER_RESPONSE_YOURE_NOT_IN_BATTLE);
	}else{
		logi("call user_quit_battle to quit\n");
		user_quit_battle(sessions[uid].bid, uid);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x735b(%rip), %r15      # 0x8ff0
movq (%r15), %rdi
movslq %ebx, %r8
imulq $0x48, %r8, %r12
leaq 0x74da(%rip), %r13      # 0x9180
leaq (%r12,%r13), %r14
leaq 0x4282(%rip), %rsi      # 0x5f33
leaq 0x42b4(%rip), %rdx      # 0x5f6c
movl $0x2c6, %ecx            # imm = 0x2C6
movq %r14, %r9
xorl %eax, %eax
callq 0x10d0
cmpl $0x3, 0xc(%r12,%r13)
movq (%r15), %rdi
jne 0x1cf9
leaq 0x42e5(%rip), %rsi      # 0x5fbe
leaq 0x428c(%rip), %rdx      # 0x5f6c
movl $0x2cb, %ecx            # imm = 0x2CB
xorl %eax, %eax
callq 0x10d0
movl 0x10(%r14), %edi
movl %ebx, %esi
callq 0x2f4c
jmp 0x1d1d
leaq 0x4287(%rip), %rsi      # 0x5f87
leaq 0x4265(%rip), %rdx      # 0x5f6c
movl $0x2c8, %ecx            # imm = 0x2C8
xorl %eax, %eax
callq 0x10d0
pushq $0xf
popq %rsi
movl %ebx, %edi
callq 0x357d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wierton[P]socket-based-naive-game/server.c
// Function: client_command_invite_user
int client_command_invite_user(int uid) {
	client_message_t *pcm = &sessions[uid].cm;
	int bid = sessions[uid].bid;
	int friend_id = find_uid_by_user_name(pcm->user_name);
	log("user %d@%s tries to invite friend\n", uid, sessions[uid].user_name);

	if(sessions[uid].state != USER_STATE_BATTLE) {
		log("user %s who invites friend %s wasn't in battle\n", sessions[uid].user_name, pcm->user_name);
		send_to_client(uid, SERVER_RESPONSE_YOURE_NOT_IN_BATTLE);
	}else{
		logi("invite user %s to battle #%d\n", sessions[friend_id].user_name, bid);
		invite_friend_to_battle(bid, uid, pcm->user_name);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, -0x2c(%rbp)
movslq %edi, %rbx
imulq $0x48, %rbx, %rax
leaq 0x7430(%rip), %r12      # 0x9180
leaq (%r12,%rax), %r13
leaq (%rax,%r12), %r14
addq $0x19, %r14
movl -0x9(%r14), %eax
movl %eax, -0x34(%rbp)
movq %r14, %rdi
callq 0x1297
movl %eax, -0x30(%rbp)
movq 0x727b(%rip), %r15      # 0x8ff0
movq (%r15), %rdi
leaq 0x427a(%rip), %rsi      # 0x5ff9
leaq 0x42ae(%rip), %rdx      # 0x6034
movl $0x2d5, %ecx            # imm = 0x2D5
movl %ebx, %r8d
movq %r13, %r9
xorl %eax, %eax
callq 0x10d0
cmpl $0x3, -0xd(%r14)
movq (%r15), %rdi
jne 0x1ddf
movslq -0x30(%rbp), %rax
imulq $0x48, %rax, %rax
addq %rax, %r12
leaq 0x42e3(%rip), %rsi      # 0x6097
leaq 0x4279(%rip), %rdx      # 0x6034
movl $0x2db, %ecx            # imm = 0x2DB
movq %r12, %r8
movl -0x34(%rbp), %ebx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x10d0
movl %ebx, %edi
movl -0x2c(%rbp), %esi
movq %r14, %rdx
callq 0x1b3c
jmp 0x1e0a
leaq 0x4269(%rip), %rsi      # 0x604f
leaq 0x4247(%rip), %rdx      # 0x6034
movl $0x2d8, %ecx            # imm = 0x2D8
movq %r13, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x10d0
pushq $0xf
popq %rsi
movl -0x2c(%rbp), %edi
callq 0x357d
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq