LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: check_who_get_blood_vial
void check_who_get_blood_vial(int bid) {
	for(int i = 0; i < MAX_ITEM; i++) {
		if(battles[bid].items[i].is_used == false
		|| battles[bid].items[i].kind != ITEM_BLOOD_VIAL)
			continue;

		int ix = battles[bid].items[i].pos.x;
		int iy = battles[bid].items[i].pos.y;

		for(int j = 0; j < USER_CNT; j++) {
			if(battles[bid].users[j].battle_state != BATTLE_STATE_LIVE)
				continue;
			int ux = battles[bid].users[j].pos.x;
			int uy = battles[bid].users[j].pos.y;

			if(ix == ux && iy == uy) {
				battles[bid].users[j].life += LIFE_PER_VIAL;
				log("user %d@%s got blood vial\n", j, sessions[j].user_name);
				if(battles[bid].users[j].life > MAX_LIFE) {
					log("user %d@%s life exceeds max value\n", j, sessions[j].user_name);
					battles[bid].users[j].life = MAX_LIFE;
				}

				battles[bid].items[i].is_used = false;
				battles[bid].num_of_other --;
				send_to_client(j, SERVER_MESSAGE_YOU_GOT_BLOOD_VIAL);
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %edi, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x5dca(%rip), %rcx      # 0x92f0
leaq (%rax,%rcx), %r14
addq $0x78, %r14
leaq (%rax,%rcx), %r15
addq $0x10, %r15
leaq (%rax,%rcx), %rbx
addq $0x74, %rbx
xorl %r12d, %r12d
leaq (%r12,%r12,4), %rax
cmpl $0x0, (%r14,%rax,4)
je 0x357d
leaq (%r14,%rax,4), %rdx
cmpl $0x4, 0xc(%rdx)
jne 0x357d
movb 0x10(%rdx), %al
movb 0x11(%rdx), %cl
movq %r15, %rsi
xorl %edi, %edi
cmpl $0x1, (%rsi)
jne 0x3570
cmpb 0x10(%rsi), %al
jne 0x3570
cmpb 0x11(%rsi), %cl
je 0x358b
incq %rdi
addq $0x14, %rsi
cmpq $0x5, %rdi
jne 0x3561
incq %r12
cmpq $0x87, %r12
jne 0x3541
jmp 0x3595
movq %rbx, %rcx
callq 0x2800
jmp 0x357d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: send_to_client
void send_to_client(int uid, int message) {
	int conn = sessions[uid].conn;
	server_message_t sm;
	memset(&sm, 0, sizeof(server_message_t));
	sm.response = message;
	wrap_send(conn, &sm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %esi, %r14d
movslq %edi, %rax
leaq (%rax,%rax,8), %rax
leaq 0x5bbf(%rip), %rcx      # 0x9180
movl 0x8(%rcx,%rax,8), %ebx
leaq -0x1c2(%rbp), %r15
xorl %r12d, %r12d
movl $0x1a2, %edx            # imm = 0x1A2
movq %r15, %rdi
xorl %esi, %esi
callq 0x10a0
movb %r14b, -0x1(%r15)
movl $0x1a3, %r14d           # imm = 0x1A3
imulq $0x1a3, %r12, %rax      # imm = 0x1A3
leaq (%rax,%rbp), %rsi
addq $-0x1c3, %rsi           # imm = 0xFE3D
movl $0x1a3, %edx            # imm = 0x1A3
subq %r12, %rdx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x1070
addq %rax, %r12
cmpq %r14, %r12
jb 0x35e8
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: check_who_traped_in_magma
void check_who_traped_in_magma(int bid) {
	for(int i = 0; i < MAX_ITEM; i++) {
		if(battles[bid].items[i].is_used == false
		|| battles[bid].items[i].kind != ITEM_MAGMA)
			continue;

		int ix = battles[bid].items[i].pos.x;
		int iy = battles[bid].items[i].pos.y;

		for(int j = 0; j < USER_CNT; j++) {
			if(battles[bid].users[j].battle_state != BATTLE_STATE_LIVE)
				continue;
			int ux = battles[bid].users[j].pos.x;
			int uy = battles[bid].users[j].pos.y;

			if(ix == ux && iy == uy) {
				battles[bid].users[j].life --;
				battles[bid].items[i].times --;
				log("user %d@%s is trapped in magma\n", j, sessions[j].user_name);
				send_to_client(j, SERVER_MESSAGE_YOU_ARE_TRAPPED_IN_MAGMA);
				if(battles[bid].items[i].times <= 0) {
					log("magma %d is exhausted\n", i);
					battles[bid].items[i].is_used = false;
					battles[bid].num_of_other --;
				}
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq %edi, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x5cae(%rip), %rcx      # 0x92f0
leaq (%rax,%rcx), %r15
addq $0x78, %r15
leaq 0x74(%rax,%rcx), %r8
leaq 0x21(%rax,%rcx), %rbx
leaq 0x5b25(%rip), %rsi      # 0x9180
leaq 0x1eef(%rip), %r10      # 0x5551
leaq 0x1f20(%rip), %rdx      # 0x5589
xorl %r12d, %r12d
leaq (%r12,%r12,4), %rax
cmpl $0x0, (%r15,%rax,4)
je 0x36b3
leaq (%r15,%rax,4), %r13
cmpl $0x2, 0xc(%r13)
jne 0x36b3
movb 0x10(%r13), %al
movb 0x11(%r13), %cl
movq %rbx, %rdi
movq %rsi, %r9
xorl %r14d, %r14d
cmpl $0x1, -0x11(%rdi)
jne 0x36a2
cmpb -0x1(%rdi), %al
jne 0x36a2
cmpb (%rdi), %cl
je 0x36c4
incq %r14
addq $0x48, %r9
addq $0x14, %rdi
cmpq $0x5, %r14
jne 0x3693
incq %r12
cmpq $0x87, %r12
jne 0x366c
jmp 0x3744
decl -0x5(%rdi)
decl 0x8(%r13)
movq 0x591e(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
movq %r10, %rsi
movl $0x156, %ecx            # imm = 0x156
movq %r8, -0x30(%rbp)
movl %r14d, %r8d
xorl %eax, %eax
callq 0x10d0
movl %r14d, %edi
movl $0x21, %esi
callq 0x359e
leaq 0x1e8a(%rip), %rdx      # 0x5589
leaq 0x1e4b(%rip), %r10      # 0x5551
leaq 0x5a73(%rip), %rsi      # 0x9180
movq -0x30(%rbp), %r8
cmpl $0x0, 0x8(%r13)
jg 0x36b3
movq %r12, %rdi
movq %r13, %rsi
movq %r8, %rdx
callq 0x28b2
leaq 0x1e5c(%rip), %rdx      # 0x5589
leaq 0x1e1d(%rip), %r10      # 0x5551
leaq 0x5a45(%rip), %rsi      # 0x9180
movq -0x30(%rbp), %r8
jmp 0x36b3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: check_who_got_charger
void check_who_got_charger(int bid) {
	for(int i = 0; i < MAX_ITEM; i++) {
		if(battles[bid].items[i].is_used == false
		|| battles[bid].items[i].kind != ITEM_MAGAZINE)
			continue;

		int ix = battles[bid].items[i].pos.x;
		int iy = battles[bid].items[i].pos.y;

		for(int j = 0; j < USER_CNT; j++) {
			if(battles[bid].users[j].battle_state != BATTLE_STATE_LIVE)
				continue;
			int ux = battles[bid].users[j].pos.x;
			int uy = battles[bid].users[j].pos.y;

			if(ix == ux && iy == uy) {
				battles[bid].users[j].nr_bullets += BULLETS_PER_MAGAZINE;
				log("user %d@%s is got magazine\n", j, sessions[j].user_name);
				if(battles[bid].users[j].nr_bullets > MAX_BULLETS) {
					log("user %d@%s's bullets exceeds max value\n", j, sessions[j].user_name);
					battles[bid].users[j].nr_bullets = MAX_BULLETS;
				}

				send_to_client(j, SERVER_MESSAGE_YOU_GOT_MAGAZINE);
				battles[bid].items[i].is_used = false;
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x5b82(%rip), %rcx      # 0x92f0
leaq (%rax,%rcx), %rbx
addq $0x78, %rbx
leaq (%rax,%rcx), %r14
addq $0x10, %r14
xorl %r15d, %r15d
leaq (%r15,%r15,4), %rax
cmpl $0x0, (%rbx,%rax,4)
je 0x37bc
leaq (%rbx,%rax,4), %rdx
cmpl $0x1, 0xc(%rdx)
jne 0x37bc
movb 0x10(%rdx), %al
movb 0x11(%rdx), %cl
movq %r14, %rsi
xorl %edi, %edi
cmpl $0x1, (%rsi)
jne 0x37af
cmpb 0x10(%rsi), %al
jne 0x37af
cmpb 0x11(%rsi), %cl
je 0x37ca
incq %rdi
addq $0x14, %rsi
cmpq $0x5, %rdi
jne 0x37a0
incq %r15
cmpq $0x87, %r15
jne 0x3781
jmp 0x37d1
callq 0x28f1
jmp 0x37bc
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: check_who_is_shooted
void check_who_is_shooted(int bid) {
	for(int i = 0; i < MAX_ITEM; i++) {
		if(battles[bid].items[i].is_used == false
		|| battles[bid].items[i].kind != ITEM_BULLET)
			continue;

		int ix = battles[bid].items[i].pos.x;
		int iy = battles[bid].items[i].pos.y;

		for(int j = 0; j < USER_CNT; j++) {
			if(battles[bid].users[j].battle_state != BATTLE_STATE_LIVE)
				continue;
			int ux = battles[bid].users[j].pos.x;
			int uy = battles[bid].users[j].pos.y;

			if(ix == ux && iy == uy
			&& battles[bid].items[i].owner != j) {
				battles[bid].users[j].life --;
				log("user %d@%s is shooted\n", j, sessions[j].user_name);
				send_to_client(j, SERVER_MESSAGE_YOU_ARE_SHOOTED);
				battles[bid].items[i].is_used = false;
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x5af9(%rip), %rcx      # 0x92f0
leaq (%rax,%rcx), %rbx
addq $0x78, %rbx
leaq (%rax,%rcx), %r14
addq $0x10, %r14
xorl %r15d, %r15d
leaq (%r15,%r15,4), %rax
cmpl $0x0, (%rbx,%rax,4)
je 0x384e
leaq (%rbx,%rax,4), %rdx
cmpl $0x6, 0xc(%rdx)
jne 0x384e
movb 0x10(%rdx), %al
movb 0x11(%rdx), %cl
movq %r14, %rsi
xorl %edi, %edi
cmpl $0x1, (%rsi)
jne 0x3841
cmpb 0x10(%rsi), %al
jne 0x3841
cmpb 0x11(%rsi), %cl
jne 0x3841
movl 0x8(%rdx), %r8d
cmpq %r8, %rdi
jne 0x385c
incq %rdi
addq $0x14, %rsi
cmpq $0x5, %rdi
jne 0x3829
incq %r15
cmpq $0x87, %r15
jne 0x380a
jmp 0x3863
callq 0x2997
jmp 0x384e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: check_who_is_dead
void check_who_is_dead(int bid) {
	for(int i = 0; i < USER_CNT; i++) {
		if(battles[bid].users[i].battle_state == BATTLE_STATE_LIVE
		&& battles[bid].users[i].life <= 0) {
			log("user %d@%s is dead\n", i, sessions[i].user_name);
			battles[bid].users[i].battle_state = BATTLE_STATE_DEAD;
			log("send dead info to user %d@%s\n", i, sessions[i].user_name);
			send_to_client(i, SERVER_MESSAGE_YOU_ARE_DEAD);
		}else if(battles[bid].users[i].battle_state == BATTLE_STATE_DEAD){
			battles[bid].users[i].battle_state = BATTLE_STATE_WITNESS;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq %edi, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x5a6a(%rip), %rcx      # 0x92f0
leaq (%rax,%rcx), %rbx
addq $0x10, %rbx
xorl %r14d, %r14d
movl (%rbx), %eax
cmpl $0x3, %eax
je 0x38b0
cmpl $0x1, %eax
jne 0x38b6
cmpl $0x0, 0xc(%rbx)
jg 0x38b6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29ef
jmp 0x38b6
movl $0x2, (%rbx)
incq %r14
addq $0x14, %rbx
cmpq $0x5, %r14
jne 0x3891
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: inform_all_user_battle_state
void inform_all_user_battle_state(int bid) {
	server_message_t sm;
	sm.message = SERVER_MESSAGE_BATTLE_INFORMATION;
	for(int i = 0; i < USER_CNT; i++) {
		if(battles[bid].users[i].battle_state == BATTLE_STATE_LIVE) {
			sm.user_pos[i].x = battles[bid].users[i].pos.x;
			sm.user_pos[i].y = battles[bid].users[i].pos.y;
		}else{
			sm.user_pos[i].x = -1;
			sm.user_pos[i].y = -1;
		}
	}

	for(int i = 0; i < MAX_ITEM; i++) {
		if(battles[bid].items[i].is_used) {
			sm.item_kind[i] = battles[bid].items[i].kind;
			sm.item_pos[i].x = battles[bid].items[i].pos.x;
			sm.item_pos[i].y = battles[bid].items[i].pos.y;
		}else{
			sm.item_kind[i] = ITEM_NONE;
		}
	}

	for(int i = 0; i < USER_CNT; i++) {
		sm.index = i;
		sm.life = battles[bid].users[i].life;
		sm.bullets_num = battles[bid].users[i].nr_bullets;
		if(battles[bid].users[i].battle_state != BATTLE_STATE_UNJOINED) {
			wrap_send(sessions[i].conn, &sm);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movb $0x1e, -0x1cb(%rbp)
movslq %edi, %rax
imulq $0xb08, %rax, %rax      # imm = 0xB08
leaq 0x59fc(%rip), %r14      # 0x92f0
leaq (%rax,%r14), %rcx
addq $0x21, %rcx
movl $0x2, %edx
cmpl $0x1, -0x11(%rcx)
jne 0x3918
movb -0x1(%rcx), %sil
movb %sil, -0x1cb(%rbp,%rdx,2)
movb (%rcx), %sil
jmp 0x3923
movb $-0x1, -0x1cb(%rbp,%rdx,2)
movb $-0x1, %sil
movb %sil, -0x1ca(%rbp,%rdx,2)
incq %rdx
addq $0x14, %rcx
cmpq $0x7, %rdx
jne 0x3901
leaq (%rax,%r14), %rcx
addq $0x89, %rcx
movl $0x4b, %edx
cmpl $0x0, -0x11(%rcx)
je 0x3973
movb -0x5(%rcx), %sil
movb %sil, -0x208(%rbp,%rdx)
movb -0x1(%rcx), %sil
movb %sil, -0x1cc(%rbp,%rdx,2)
movb (%rcx), %sil
movb %sil, -0x1cb(%rbp,%rdx,2)
jmp 0x397b
movb $0x0, -0x208(%rbp,%rdx)
incq %rdx
addq $0x14, %rcx
cmpq $0xd2, %rdx
jne 0x3948
xorl %r15d, %r15d
addq %rax, %r14
movl $0x1a3, %r13d           # imm = 0x1A3
movb %r15b, -0x1c9(%rbp)
leaq (%r15,%r15,4), %rax
movb 0x1c(%r14,%rax,4), %cl
movb %cl, -0x1ca(%rbp)
movb 0x14(%r14,%rax,4), %cl
movb %cl, -0x1c8(%rbp)
cmpl $0x0, 0x10(%r14,%rax,4)
je 0x39fd
leaq (%r15,%r15,8), %rax
leaq 0x57b5(%rip), %rcx      # 0x9180
movl 0x8(%rcx,%rax,8), %ebx
xorl %r12d, %r12d
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 0x39d2
incq %r15
cmpq $0x5, %r15
jne 0x3997
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: check_user_registered
int check_user_registered(char *user_name, char *password) {
	for(int i = 0; i < REGISTERED_USER_LIST_SIZE; i++) {
		if(strncmp(user_name, registered_user_list[i].user_name, USERNAME_SIZE - 1) != 0)
			continue;

		if(strncmp(password, registered_user_list[i].password, PASSWORD_SIZE - 1) != 0) {
			logi("user name '%s' sent error password\n", user_name);
			return SERVER_RESPONSE_LOGIN_FAIL_ERROR_PASSWORD;
		}else{
			return SERVER_RESPONSE_LOGIN_SUCCESS;
		}
	}

	logi("user name '%s' hasn't been registered\n", user_name);
	return SERVER_RESPONSE_LOGIN_FAIL_UNREGISTERED_USERID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90c0(%rip), %r15      # 0xcaf0
movl $0xa, %r12d
movl $0x6, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1050
testl %eax, %eax
je 0x3a81
addq $0xe, %r15
decq %r12
jne 0x3a36
movq 0x5596(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x1d48(%rip), %rsi      # 0x57ac
leaq 0x1d2b(%rip), %rdx      # 0x5796
movl $0x1ee, %ecx            # imm = 0x1EE
movq %rbx, %r8
xorl %eax, %eax
callq 0x10d0
movl $0x7, %eax
jmp 0x3aa0
addq $0x7, %r15
movl $0x6, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1050
movl %eax, %ecx
movl $0x4, %eax
testl %ecx, %ecx
jne 0x3aa9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x5540(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x1c9c(%rip), %rsi      # 0x5756
leaq 0x1cd5(%rip), %rdx      # 0x5796
movl $0x1e7, %ecx            # imm = 0x1E7
movq %rbx, %r8
xorl %eax, %eax
callq 0x10d0
movl $0x8, %eax
jmp 0x3aa0
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: list_all_users
void list_all_users(server_message_t *psm) {
	for(int i = 0; i < USER_CNT; i++) {
		if(query_session_built(i)) {
			log("%s: found '%s' %s\n", __func__, sessions[i].user_name,
					sessions[i].state == USER_STATE_BATTLE ? "in battle" : "");
			psm->all_users[i].user_state = sessions[i].state;
			strncpy(psm->all_users[i].user_name, sessions[i].user_name, USERNAME_SIZE - 1);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incq %rbx
leaq 0x569e(%rip), %r15      # 0x918c
xorl %r14d, %r14d
movl (%r15), %esi
cmpl $0x2, %esi
jae 0x3b08
incq %r14
addq $0x48, %r15
cmpq $0x5, %r14
jne 0x3af1
jmp 0x3b15
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2a7e
jmp 0x3af9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: client_command_launch_battle
int client_command_launch_battle(int uid) {
	if(sessions[uid].state == USER_STATE_BATTLE) {
		log("user '%s' who tries to launch battle has been in battle\n", sessions[uid].user_name);
		send_to_client(uid, SERVER_RESPONSE_YOURE_ALREADY_IN_BATTLE);
		return 0;
	}else{
		log("user '%s' tries to launch battle\n", sessions[uid].user_name);
	}

	int bid = get_unalloced_battle();
	client_message_t *pcm = &sessions[uid].cm;

	log("%s launch battle with %s\n", sessions[uid].user_name, pcm->user_name);

	if(bid == -1) {
		loge("fail to create battle for %s and %s\n", sessions[uid].user_name, pcm->user_name);
		send_to_client(uid, SERVER_RESPONSE_LAUNCH_BATTLE_FAIL);
		return 0;
	}else{
		logi("launch battle %d for %s, invite %s\n", bid, sessions[uid].user_name, pcm->user_name);
		user_join_battle(bid, uid);
		invite_friend_to_battle(bid, uid, pcm->user_name);
		launch_battle(bid);
		send_to_client(uid, SERVER_RESPONSE_LAUNCH_BATTLE_SUCCESS);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movslq %edi, %rax
leaq (%rax,%rax,8), %rax
leaq 0x5645(%rip), %rcx      # 0x9180
leaq (%rcx,%rax,8), %r8
cmpl $0x3, 0xc(%r8)
movq 0x54a5(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
jne 0x3b71
leaq 0x2283(%rip), %rsi      # 0x5dda
leaq 0x22cd(%rip), %rdx      # 0x5e2b
movl $0x2aa, %ecx            # imm = 0x2AA
xorl %eax, %eax
callq 0x10d0
movl $0x10, %esi
jmp 0x3b85
leaq -0x14(%rbp), %r14
movq %r8, %rsi
movl %ebx, %edx
movq %r14, %rcx
callq 0x2b09
movl (%r14), %esi
movl %ebx, %edi
callq 0x359e
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: client_command_send_message
int client_command_send_message(int uid) 
{
	client_message_t *pcm = &sessions[uid].cm;
	server_message_t sm;
	memset(&sm,0,sizeof(server_message_t));
	sm.message=SERVER_MESSAGE_FRIEND_MESSAGE;
	strncpy(sm.from_user,sessions[uid].user_name,USERNAME_SIZE);
	strncpy(sm.msg,pcm->message,MSG_SIZE);
	if(pcm->user_name[0]=='\0')
	{
		logi("user %d:%s yells at all users: %s\n", uid, sessions[uid].user_name, pcm->message);
		int i;
		for(i=0;i<USER_CNT;i++)
		{
			if(uid==i)continue;
			wrap_send(sessions[i].conn,&sm);
		}
	}
	else
	{
		int friend_id=find_uid_by_user_name(pcm->user_name);
		if(friend_id==-1||friend_id==uid)
		{
			logi("user %d:%s fails to speak to '%s':\"%s\"\n",uid,sessions[uid].user_name,pcm->user_name,pcm->message);
		}
		else
		{
			logi("uiser %d:%s speaks to %d:%s : \"%s\"\n",uid,sessions[uid].user_name,friend_id,pcm->user_name,pcm->message);
			wrap_send(sessions[friend_id].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, %ebx
movslq %edi, %rax
leaq (%rax,%rax,8), %r12
leaq 0x55c5(%rip), %r13      # 0x9180
leaq (%r13,%r12,8), %r14
leaq -0x19b(%rbp), %r15
movl $0x173, %edx            # imm = 0x173
movq %r15, %rdi
xorl %esi, %esi
callq 0x10a0
movb $0x1b, -0x30(%r15)
leaq -0x1ca(%rbp), %rdi
movl $0x7, %edx
movq %r14, %rsi
callq 0x1040
leaq -0x1c3(%rbp), %rdi
leaq 0x20(,%r12,8), %r15
addq %r13, %r15
movl $0x28, %edx
movq %r15, %rsi
callq 0x1040
cmpb $0x0, -0x7(%r15)
jne 0x3c2e
leaq -0x1cb(%rbp), %rcx
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2c01
jmp 0x3cff
leaq 0x19(,%r12,8), %r12
addq %r13, %r12
movq %r12, %rdi
callq 0x129a
movl %eax, %r13d
cmpl $-0x1, %eax
setne %al
cmpl %ebx, %r13d
setne %cl
movq 0x5399(%rip), %rdx      # 0x8ff0
movq (%rdx), %rdi
testb %cl, %al
jne 0x3c88
leaq 0x24c7(%rip), %rsi      # 0x612c
leaq 0x24a4(%rip), %rdx      # 0x6110
movl $0x2f8, %ecx            # imm = 0x2F8
movl %ebx, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r15
pushq %r12
callq 0x10d0
addq $0x10, %rsp
jmp 0x3cff
subq $0x8, %rsp
leaq 0x24dd(%rip), %rsi      # 0x6170
leaq 0x2476(%rip), %rdx      # 0x6110
movq %r12, %r10
xorl %r12d, %r12d
movl $0x2fc, %ecx            # imm = 0x2FC
movl %ebx, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq %r15
pushq %r10
pushq %r13
callq 0x10d0
addq $0x20, %rsp
movslq %r13d, %rax
leaq (%rax,%rax,8), %rax
leaq 0x54b6(%rip), %rcx      # 0x9180
movl 0x8(%rcx,%rax,8), %ebx
movl $0x1a3, %r14d           # imm = 0x1A3
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 %r14, %r12
jb 0x3cd4
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: server_start
int server_start() {
	int sockfd = socket(AF_INET, SOCK_STREAM, 0);

	if(sockfd < 0) {
		eprintf("Create Socket Failed!\n");
	}

	struct sockaddr_in servaddr;
	memset(&servaddr, 0, sizeof(servaddr));
    servaddr.sin_family = AF_INET;
    servaddr.sin_port = htons(PORT);
    servaddr.sin_addr.s_addr = htonl(INADDR_ANY);

	if(bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) == -1) {
		eprintf("Can not bind to port %d!\n", PORT);
	}

	if(listen(sockfd, USER_CNT) == -1) {
		eprintf("fail to listen on socket.\n");
	}

	return sockfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x11a0
testl %eax, %eax
js 0x3e10
movl %eax, %ebx
leaq -0x18(%rbp), %rsi
movq $0x0, 0x8(%rsi)
movq $0x50c30002, (%rsi)     # imm = 0x50C30002
movl %eax, %edi
movl $0x10, %edx
callq 0x1120
cmpl $-0x1, %eax
je 0x3e15
movl %ebx, %edi
movl $0x5, %esi
callq 0x1110
cmpl $-0x1, %eax
je 0x3e1a
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
callq 0x2e35
callq 0x2e00
callq 0x2dd1
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: terminate_process
void terminate_process(int recved_signal) {
	for(int i = 0; i < USER_CNT; i++) {
		if(sessions[i].conn >= 0) {
			close(sessions[i].conn);
			log("close conn:%d\n", sessions[i].conn);
		}
	}

	if(server_fd) {
		close(server_fd);
		log("close server fd:%d\n", server_fd);
	}

	pthread_mutex_destroy(&sessions_lock);
	pthread_mutex_destroy(&battles_lock);
	for(int i = 0; i < USER_CNT; i++) {
		pthread_mutex_destroy(&items_lock[i]);
	}

	log("receive terminate signal and exit(0)\n");
	exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x8, %r12d
leaq 0x5346(%rip), %r13      # 0x9180
movq 0x51af(%rip), %r15      # 0x8ff0
leaq 0x28ae(%rip), %rbx      # 0x66f6
leaq 0x28ce(%rip), %r14      # 0x671d
movl (%r12,%r13), %edi
testl %edi, %edi
jns 0x3e66
addq $0x48, %r12
cmpq $0x170, %r12            # imm = 0x170
jne 0x3e4f
jmp 0x3e86
callq 0x10b0
movq (%r15), %rdi
movl (%r12,%r13), %r8d
movq %rbx, %rsi
movq %r14, %rdx
movl $0x403, %ecx            # imm = 0x403
xorl %eax, %eax
callq 0x10d0
jmp 0x3e57
movl 0x52ec(%rip), %edi      # 0x9178
testl %edi, %edi
je 0x3eb9
callq 0x10b0
movq (%r15), %rdi
movl 0x52d9(%rip), %r8d      # 0x9178
leaq 0x2889(%rip), %rsi      # 0x672f
leaq 0x2870(%rip), %rdx      # 0x671d
movl $0x409, %ecx            # imm = 0x409
xorl %eax, %eax
callq 0x10d0
leaq 0x5268(%rip), %rdi      # 0x9128
callq 0x1080
leaq 0x5284(%rip), %rdi      # 0x9150
callq 0x1080
xorl %ebx, %ebx
leaq 0x8b46(%rip), %r14      # 0xca20
leaq (%r14,%rbx), %rdi
callq 0x1080
addq $0x28, %rbx
cmpq $0xc8, %rbx
jne 0x3eda
movq (%r15), %rdi
leaq 0x2861(%rip), %rsi      # 0x675b
leaq 0x281c(%rip), %rdx      # 0x671d
movl $0x412, %ecx            # imm = 0x412
xorl %eax, %eax
callq 0x10d0
xorl %edi, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/wierton[P]socket-based-naive-game/server.c
// Function: main
int main() {
	srand(time(NULL));

	pthread_t thread;

	if(signal(SIGINT, terminate_process) == SIG_ERR) {
		eprintf("An error occurred while setting a signal handler.\n");
	}

	for(int i = 0; i < USER_CNT; i++) {
		pthread_mutex_init(&items_lock[i], NULL);
	}

	server_fd = server_start();

	for(int i = 0; i < USER_CNT; i++)
		sessions[i].conn = -1;

	struct sockaddr_in client_addr;
	socklen_t length = sizeof(client_addr);
	while(1) {
		int conn = accept(server_fd, (struct sockaddr*)&client_addr, &length);
		log("connected by %s:%d, conn:%d\n", inet_ntoa(client_addr.sin_addr), client_addr.sin_port, conn);
		if(conn < 0) {
			loge("fail to accept client.\n");
		}else if(pthread_create(&thread, NULL, session_start, (void *)(uintptr_t)conn) != 0) {
			loge("fail to create thread.\n");
		}
		logi("bind thread #%lu\n", thread);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %edi, %edi
callq 0x10f0
movl %eax, %edi
callq 0x10c0
leaq -0x11b(%rip), %rsi      # 0x3e1f
movl $0x2, %edi
callq 0x10e0
cmpq $-0x1, %rax
je 0x4065
xorl %ebx, %ebx
leaq 0x8ac9(%rip), %r14      # 0xca20
leaq (%r14,%rbx), %rdi
xorl %esi, %esi
callq 0x1160
addq $0x28, %rbx
cmpq $0xc8, %rbx
jne 0x3f57
callq 0x3db2
movl %eax, %edi
movl %eax, 0x51fc(%rip)      # 0x9178
movl $0x8, %eax
leaq 0x51f8(%rip), %rcx      # 0x9180
movl $0xffffffff, (%rax,%rcx) # imm = 0xFFFFFFFF
addq $0x48, %rax
cmpq $0x170, %rax            # imm = 0x170
jne 0x3f88
leaq -0x2c(%rbp), %rax
movl $0x10, (%rax)
movq 0x5044(%rip), %r15      # 0x8ff0
leaq 0x2833(%rip), %r12      # 0x67e6
leaq 0x28ca(%rip), %r13      # 0x6884
leaq -0x48(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x1140
movl %eax, %ebx
movq (%r15), %r14
movl -0x44(%rbp), %edi
callq 0x1060
movzwl -0x46(%rbp), %r9d
movl %ebx, (%rsp)
movq %r14, %rdi
leaq 0x2805(%rip), %rsi      # 0x67eb
movq %r12, %rdx
movl $0x42c, %ecx            # imm = 0x42C
movq %rax, %r8
xorl %eax, %eax
callq 0x10d0
testl %ebx, %ebx
jns 0x4010
movq (%r15), %rdi
leaq 0x281a(%rip), %rsi      # 0x6820
movq %r12, %rdx
movl $0x42e, %ecx            # imm = 0x42E
jmp 0x403a
movl %ebx, %ecx
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
leaq -0x2ae(%rip), %rdx      # 0x3d71
callq 0x1130
testl %eax, %eax
je 0x4041
movq (%r15), %rdi
leaq 0x2820(%rip), %rsi      # 0x6852
movq %r12, %rdx
movl $0x430, %ecx            # imm = 0x430
xorl %eax, %eax
callq 0x10d0
movq (%r15), %rdi
movq -0x38(%rbp), %r8
movq %r13, %rsi
movq %r12, %rdx
movl $0x432, %ecx            # imm = 0x432
xorl %eax, %eax
callq 0x10d0
movl 0x5118(%rip), %edi      # 0x9178
jmp 0x3fba
movq 0x4f84(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x2723(%rip), %rsi      # 0x6799
leaq 0x2769(%rip), %rdx      # 0x67e6
movl $0x41c, %ecx            # imm = 0x41C
xorl %eax, %eax
callq 0x10d0
xorl %edi, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/service.c
// Function: main
int main() 
{
  char* service_name = (char*)malloc(sizeof(char)*50);
  char* service_name_other = (char*)malloc(sizeof(char)*50);

  strcpy(service_name, GUI);
  strcpy(service_name_other, "GUI2");

	if(nbb_init_service(NUM_CHANNELS, service_name)) {
		printf("Error initializing as service, failing!\n");
		return -1;
	}

  sleep(1);

  if(nbb_init_service(NUM_CHANNELS, service_name_other)) {
 		printf("Error initializing as service, failing!\n");
		return -1;
	}

  nbb_set_cb_new_connection(service_name, on_new_connection, NULL);
  nbb_set_cb_new_connection(service_name_other, on_new_conn_other, NULL);

  int counter = 0;

  while(1) {
    sleep(1);

/*
    if(is_client == 2 && !(counter % 5)) {
      nbb_send("Client", "Test message", sizeof("Test message"));
      nbb_send("Client2", "Test message", sizeof("Test message"));
    }*/
    counter++;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x32, %edi
callq 0x1160
movq %rax, %r14
movl $0x32, %edi
callq 0x1160
movq %rax, %rbx
movl $0x495547, (%r14)       # imm = 0x495547
movl $0x32495547, (%rax)     # imm = 0x32495547
movb $0x0, 0x4(%rax)
movl $0x5, %edi
movq %r14, %rsi
callq 0x1a65
testl %eax, %eax
jne 0x1387
movl $0x1, %edi
callq 0x1220
movl $0x5, %edi
movq %rbx, %rsi
callq 0x1a65
testl %eax, %eax
je 0x13a0
leaq 0x1cc2(%rip), %rdi      # 0x3050
callq 0x1070
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x27(%rip), %rsi        # 0x13ce
movq %r14, %rdi
xorl %edx, %edx
callq 0x226c
leaq 0x2f(%rip), %rsi        # 0x13e7
movq %rbx, %rdi
xorl %edx, %edx
callq 0x226c
movl $0x1, %edi
callq 0x1220
jmp 0x13c2
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: inform
static void inform(const char *msg, va_list ap)
{
   int my_errno = errno;

   fprintf(stderr, "%s: ", g_progname);
   vfprintf(stderr, msg, ap);

   size_t len = strlen(msg);
   if (len && msg[len - 1] == ':')
      fprintf(stderr, " %s", my_errno ? strerror(my_errno) : "<unknown error>");

   putc('\n', stderr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
callq 0x2060
movl (%rax), %ebx
movq 0x10ed5c(%rip), %r12    # 0x110ff8
movq (%r12), %rdi
movq 0x10eea1(%rip), %rdx    # 0x111148
leaq 0x8010(%rip), %rsi      # 0xa2be
xorl %eax, %eax
callq 0x21b0
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2230
movq %r14, %rdi
callq 0x20e0
testq %rax, %rax
je 0x22d9
cmpb $0x3a, -0x1(%r14,%rax)
je 0x22f0
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2190
movq (%r12), %r14
testl %ebx, %ebx
jne 0x2301
leaq 0x7fc4(%rip), %rdx      # 0xa2c3
jmp 0x230b
movl %ebx, %edi
callq 0x2250
movq %rax, %rdx
leaq 0x8185(%rip), %rsi      # 0xa497
movq %r14, %rdi
xorl %eax, %eax
callq 0x21b0
jmp 0x22d9
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: parse_command
noreturn void parse_command(struct command *commands, const char *help,
                            int argc, char **argv)
{
   set_progname(*argv);
   set_help(help);

   if (argc == 1)
      display_help();

   const char *arg = argv[1];
   for (struct command *cmd = commands; cmd->name; cmd++) {
      if (!strcmp(cmd->name, arg)) {
         cmd->func(argc - 2, argv + 2);
         exit(EXIT_SUCCESS);
      }
   }
   if (*arg == '-') {
      arg++;
      if (*arg == '-') {
         arg++;
         if (!strcmp(arg, help_option.name))
            display_help();
      } else if (*arg == help_option.letter && !arg[1]) {
         display_help();
      }
   }
   die("unknown command: '%s'", argv[1]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq (%rcx), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x2120
testq %rax, %rax
je 0x34fa
cmpb $0x0, 0x1(%rax)
je 0x34fa
incq %rax
movq %rax, %r12
movq %r12, 0x10dc47(%rip)    # 0x111148
movq %r15, %rdi
callq 0x3598
cmpl $0x1, %ebp
jne 0x3513
callq 0x3627
movq 0x8(%rbx), %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x353b
addq $0x10, %r14
movq %r15, %rsi
callq 0x2180
testl %eax, %eax
je 0x3561
movq (%r14), %rdi
addq $0x10, %r14
testq %rdi, %rdi
jne 0x3523
cmpb $0x2d, (%r15)
jne 0x3587
movsbl 0x1(%r15), %eax
cmpl $0x2d, %eax
jne 0x3578
leaq 0x2(%r15), %rdi
movq 0x10dc02(%rip), %rsi    # 0x111158
callq 0x2180
testl %eax, %eax
je 0x350e
jmp 0x3587
addl $-0x2, %ebp
addq $0x10, %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq *-0x8(%r14)
xorl %edi, %edi
callq 0x2240
cmpl %eax, 0x10dbd2(%rip)    # 0x111150
jne 0x3587
cmpb $0x0, 0x2(%r15)
je 0x350e
leaq 0x6c43(%rip), %rdi      # 0xa1d1
movq %r15, %rsi
xorl %eax, %eax
callq 0x343c
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: set_help
static void check_help(const char *help)
{
   assert(help);
   bool legit = false;

   for (;;) {
      help = strchr(help, '%');
      if (!help)
         break;
      switch (*++help) {
      case 's':
         if (legit) {
            legit = false;
            goto fini;
         }
         legit = true;
         break;
      case '%':
         help++;
         break;
      default:
         legit = false;
         goto fini;
      }
   }

fini:
   if (!legit)
      die("invalid help screen");
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3608
movq %rdi, %rbx
movl $0x25, %esi
callq 0x20f0
testq %rax, %rax
je 0x35fa
xorl %ebp, %ebp
movzbl 0x1(%rax), %ecx
cmpl $0x25, %ecx
je 0x35d0
cmpl $0x73, %ecx
jne 0x35fa
testb $0x1, %bpl
jne 0x35fa
incq %rax
movb $0x1, %bpl
jmp 0x35d4
addq $0x2, %rax
movq %rax, %rdi
movl $0x25, %esi
callq 0x20f0
testq %rax, %rax
jne 0x35b4
testb $0x1, %bpl
je 0x35fa
movq %rbx, 0x10dbcd(%rip)    # 0x1111c0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x6cf5(%rip), %rdi      # 0xa2f6
xorl %eax, %eax
callq 0x343c
leaq 0x6cc4(%rip), %rdi      # 0xa2d3
leaq 0x6bda(%rip), %rsi      # 0xa1f0
leaq 0x6cbb(%rip), %rcx      # 0xa2d8
movl $0x96, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: short_option
static struct option *short_option(struct option *options, int letter)
{
   assert(letter);

   while (options->name) {
      if (options->letter == letter)
         return options;
      options++;
   }
   if (letter == help_option.letter)
      return &help_option;

   die("unknown option: -%c", letter);
}

// Assembly:
pushq %rax
testl %esi, %esi
je 0x395c
cmpq $0x0, 0x8(%rdi)
je 0x3948
cmpl %esi, (%rdi)
je 0x3957
cmpq $0x0, 0x28(%rdi)
leaq 0x20(%rdi), %rdi
jne 0x3939
cmpl %esi, 0x10d802(%rip)    # 0x111150
jne 0x397b
leaq 0x10d7f9(%rip), %rdi    # 0x111150
movq %rdi, %rax
popq %rcx
retq
leaq 0x69a7(%rip), %rdi      # 0xa30a
leaq 0x6886(%rip), %rsi      # 0xa1f0
leaq 0x69a0(%rip), %rcx      # 0xa311
movl $0x48, %edx
callq 0x2130
leaq 0x69c1(%rip), %rdi      # 0xa343
xorl %eax, %eax
callq 0x343c
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/cmd/cmd.c
// Function: handle_option
static void handle_option(struct option *opt, const char *arg)
{
   bool legit = true;

   switch (opt->type) {
   case OPT_STR:
      *opt->s = arg;
      break;
   case OPT_BOOL:
      *opt->b = true;
      break;
   case OPT_FUNC:
      opt->f();
      break;
   case OPT_DOUBLE: {
      char *end;
      errno = 0;
      *opt->d = strtod(arg, &end);
      if (errno || *end)
         legit = false;
      break;
   }
   case OPT_SIZE_T:
      if (!strcmp(arg, "inf")) {
         *opt->z = SIZE_MAX;
      } else {
         char *end;
         errno = 0;
         long long num = strtoll(arg, &end, 10);
         if (errno || *end || num < 0 || (uintmax_t)num > SIZE_MAX)
            legit = false;
         else
            *opt->z = num;
      }
      break;
   default:       // NUM_OPTS handled in switch.
      break;
   }

   if (!legit)
      die("invalid argument '%s' for option --%s", arg, opt->name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl 0x10(%rdi), %eax
cmpq $0x4, %rax
ja 0x3a81
movq %rsi, %rbx
leaq 0x6807(%rip), %rcx      # 0xa1b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rdi), %rax
movq %rbx, (%rax)
jmp 0x3a81
movq %rdi, %r15
leaq 0x698f(%rip), %rsi      # 0xa357
movq %rbx, %rdi
callq 0x2180
testl %eax, %eax
je 0x3a76
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl $0xa, %edx
callq 0x21a0
cmpl $0x0, (%r14)
jne 0x3a58
movq 0x8(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x3a58
testq %rax, %rax
js 0x3a58
movq 0x18(%r15), %rcx
movq %rax, (%rcx)
jmp 0x3a81
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *0x18(%rdi)
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x20b0
movq 0x18(%r15), %rax
movsd %xmm0, (%rax)
cmpl $0x0, (%r14)
jne 0x3a58
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
je 0x3a81
movq 0x8(%r15), %rdx
leaq 0x68f8(%rip), %rdi      # 0xa35b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x343c
movq 0x18(%rdi), %rax
movb $0x1, (%rax)
jmp 0x3a81
movq 0x18(%r15), %rax
movq $-0x1, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/cmd/gourgandine.c
// Function: process
static int process(struct mascara *mr, struct gourgandine *gn, const char *path)
{
   size_t len;
   char *str = read_file(path, &len);
   if (!str)
      return -1;

   mr_set_text(mr, str, len);

   struct mr_token *sent;
   while ((len = mr_next(mr, &sent))) {
      struct gn_acronym def = {0};
      while (gn_search(gn, sent, len, &def))
         printf("%s\t%s\n", def.acronym, def.expansion);
   }
   free(str);
   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x3cd4
movq %rdx, %r12
leaq 0x9515b(%rip), %rsi     # 0x98e19
movq %rdx, %rdi
callq 0x2220
testq %rax, %rax
je 0x3d7c
movq %rax, %r15
jmp 0x3ce5
movq 0x10d2f5(%rip), %rax    # 0x110fd0
movq (%rax), %r15
leaq 0x6757(%rip), %r12      # 0xa43c
leaq 0x10d4c4(%rip), %rdi    # 0x1111b0
movl $0x2000, %esi           # imm = 0x2000
movl $0x1, %edx
callq 0x2cd8
movq %rax, %rbp
leaq -0x10(%rax), %r13
movq -0x10(%rax), %rdi
addq %rax, %rdi
movl $0x1, %esi
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rcx
callq 0x20a0
testq %rax, %rax
je 0x3d3f
addq (%r13), %rax
movq %rax, (%r13)
cmpq $0x3200001, %rax        # imm = 0x3200001
jae 0x3d61
movl $0x2000, %esi           # imm = 0x2000
movl $0x1, %edx
movq %r13, %rdi
jmp 0x3cf6
movq %r15, %rdi
callq 0x2090
testl %eax, %eax
je 0x3d92
leaq 0x671a(%rip), %rdi      # 0xa46c
movq %r12, %rsi
xorl %eax, %eax
callq 0x231e
jmp 0x3e85
leaq 0x66dc(%rip), %rdi      # 0xa444
movq %r12, %rsi
movl $0x3200000, %edx        # imm = 0x3200000
xorl %eax, %eax
callq 0x231e
jmp 0x3e85
leaq 0x66a7(%rip), %rdi      # 0xa42a
movq %r12, %rsi
xorl %eax, %eax
callq 0x231e
jmp 0x3e9e
movq (%r13), %rsi
leaq 0x10(%rsp), %rdx
movq %rbp, %rdi
movl $0xa, %ecx
callq 0x9722
movq %rax, %rbp
testq %rax, %rax
js 0x3e69
cmpq 0x10d21d(%rip), %r13    # 0x110fd8
je 0x3dc5
movq %r13, %rdi
callq 0x2040
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x3e9e
movq %r14, %rdi
movq %rsi, 0x8(%rsp)
movq %rbp, %rdx
callq 0x4622
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4652
testq %rax, %rax
je 0x3e5b
movq %rax, %r12
leaq 0x10(%rsp), %r13
movq %rsp, %rbp
leaq 0x661e(%rip), %r15      # 0xa423
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq (%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x249c
testl %eax, %eax
je 0x3e48
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2100
jmp 0x3e1c
movq %r14, %rdi
movq %rbp, %rsi
callq 0x4652
movq %rax, %r12
testq %rax, %rax
jne 0x3e05
movq 0x8(%rsp), %rdi
callq 0x2040
xorl %eax, %eax
jmp 0x3ea3
movq %rbp, %rdi
callq 0x8684
leaq 0x6606(%rip), %rdi      # 0xa47e
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x231e
cmpq 0x10d14c(%rip), %r13    # 0x110fd8
je 0x3e96
movq %r13, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x20d0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cirocosta[P]stress/src/mem.c
// Function: allocate_memory
void
allocate_memory(int n)
{
	const unsigned int chunksize = _STRESS_MB(1);
	int i = 0;
	void* p;

	printf("%d MB will be allocated\n", n);
	for (; i++ < n;) {
		_STRESS_MUST((p = malloc(chunksize * sizeof(char))),
		             "Couldn't allocate.");
		memset(p, 0xA, chunksize);
		printf("\rAllocated: %d", i);
	}
	printf("\nDone.");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x9ec(%rip), %rdi       # 0x2108
movl %ebx, %esi
xorl %eax, %eax
callq 0x10a0
testl %ebx, %ebx
jle 0x1758
negl %ebx
movl $0x1, %r15d
leaq 0x9e9(%rip), %r14       # 0x2121
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x10a0
leal (%rbx,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x1738
leaq 0x9d1(%rip), %rdi       # 0x2130
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O3/cirocosta[P]stress/src/mem.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };

	setbuf(stdout, NULL);
	stress_parse_args(argc, argv, &args);
	allocate_memory(args.n);
	stress_wait_until_signalized();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x2008, %edx           # imm = 0x2008
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movq 0x2832(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1090
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x14d9
movl (%r14), %edi
callq 0x170e
callq 0x1602
xorl %eax, %eax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: dfs_start_over_or_continue
void	dfs_start_over_or_continue(t_info *info, int index)
{
	if (index != info->end_index
	&& info->tmp_string[0] >= 0)
	{
		copy_check_rooms(info);
		info->level++;
		search_from_room(info);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl %esi, 0x103c(%rdi)
je 0x147a
movq %rdi, %rbx
cmpl $0x0, 0x107c(%rdi)
js 0x147a
movq %rbx, %rdi
callq 0x34b4
incl 0x1050(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1481
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: search_from_room
void	search_from_room(t_info *info)
{
	int		c;
	int		s;
	int		l;
	int		j;

	c = -1;
	j = -1;
	while (info->check_rooms[++c] != EMPTY && info->path_saved == 0)
	{
		s = info->check_rooms[c];
		while (info->rooms[s]->links[++j] != NULL && info->path_saved == 0)
		{
			l = find_a_room(info, info->rooms[s]->links[j]);
			if (info->rooms[l]->visited == 0)
				set_visited(info, s, l);
			if (l == info->end_index)
				break ;
		}
		info->rooms[s]->visited++;
		j = -1;
	}
	dfs_start_over_or_continue(info, l);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x34(%rdi), %r15d
xorl %r12d, %r12d
cmpl $0x0, 0x1068(%rbx)
jne 0x1552
movslq %r15d, %rcx
movq 0x18a8(%rbx), %rax
movq %rcx, -0x30(%rbp)
movq (%rax,%rcx,8), %rcx
movq 0x8(%rcx), %rdx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x14d5
cmpl $0x0, 0x1068(%rbx)
je 0x14e8
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
incl 0x5c(%rcx)
movl 0x38(%rbx,%r12,4), %r15d
incq %r12
cmpl $-0x1, %r15d
jne 0x1499
jmp 0x1552
movl $0x8, %r13d
movq %rbx, %rdi
callq 0x2d20
movl %eax, %r14d
movq 0x18a8(%rbx), %rax
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rcx
cmpl $0x0, 0x5c(%rcx)
jne 0x1522
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x35c8
movq 0x18a8(%rbx), %rax
cmpl 0x103c(%rbx), %r14d
je 0x14cd
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%r13), %rsi
testq %rsi, %rsi
je 0x14cd
addq $0x8, %r13
cmpl $0x0, 0x1068(%rbx)
je 0x14ee
jmp 0x14cd
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1444
// File: /workspace/github_c_makefile_star2_O3/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: get_lvl_2_rooms
void	get_lvl_2_rooms(t_info *info, int i)
{
	int		j;
	int		s;
	int		t;

	j = 0;
	t = 0;
	while (info->rooms[info->lvl_1_rooms[i]]->links[j] != NULL)
	{
		s = find_a_room(info, info->rooms[info->lvl_1_rooms[i]]->links[j]);
		if (info->rooms[info->lvl_1_rooms[i]]->path_2 < 0
		&& info->rooms[s]->visited == 0)
		{
			info->rooms[s]->visited = 1;
			info->rooms[s]->level = info->level;
			info->index_stack[t][0] = info->lvl_1_rooms[i];
			info->index_stack[t][1] = s;
			info->check_rooms[t] = s;
			t++;
		}
		j++;
	}
	info->rooms[info->lvl_1_rooms[i]]->visited = 2;
	info->level++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
movq 0x18a8(%rdi), %rax
movslq 0x838(%rdi,%r14,4), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rcx), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x1626
xorl %r15d, %r15d
movl $0x8, %r12d
movq %rbx, %rdi
callq 0x2d20
movq 0x18a8(%rbx), %rdx
movslq 0x838(%rbx,%r14,4), %rcx
movq (%rdx,%rcx,8), %rcx
cmpl $0x0, 0x54(%rcx)
jns 0x1615
movslq %eax, %rsi
movq (%rdx,%rsi,8), %rsi
cmpl $0x0, 0x5c(%rsi)
jne 0x1615
movl $0x1, 0x5c(%rsi)
movl 0x1050(%rbx), %ecx
movl %ecx, 0x4c(%rsi)
movl 0x838(%rbx,%r14,4), %ecx
movq 0x1048(%rbx), %rsi
movslq %r15d, %r15
movq (%rsi,%r15,8), %rsi
movl %ecx, (%rsi)
movl %eax, 0x4(%rsi)
movl %eax, 0x34(%rbx,%r15,4)
incl %r15d
movslq 0x838(%rbx,%r14,4), %rax
movq (%rdx,%rax,8), %rcx
movq 0x8(%rcx), %rax
movq (%rax,%r12), %rsi
addq $0x8, %r12
testq %rsi, %rsi
jne 0x15a8
movl $0x2, 0x5c(%rcx)
incl 0x1050(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MikeyLHolm[P]Hive-lem-in/source/dfs_search.c
// Function: dfs_search
void	dfs_search(t_info *info, int i)
{
	while (info->lvl_1_rooms[++i] != EMPTY)
	{
		info->level = 2;
		get_lvl_2_rooms(info, i);
		search_from_room(info);
		reset_tmp_stacks(info);
		if (info->last_found_used_2 == 0)
			return ;
		info->path_saved = 0;
	}
}

// Assembly:
movslq %esi, %rax
cmpl $-0x1, 0x83c(%rdi,%rax,4)
je 0x16b4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leal 0x1(%rax), %r14d
leaq (%rdi,%rax,4), %r15
addq $0x840, %r15            # imm = 0x840
movl $0x2, 0x1050(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x156b
movq %rbx, %rdi
callq 0x1481
movq %rbx, %rdi
callq 0x1b98
cmpl $0x0, 0x188c(%rbx)
je 0x16aa
movl $0x0, 0x1068(%rbx)
incl %r14d
cmpl $-0x1, (%r15)
leaq 0x4(%r15), %r15
jne 0x1665
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/MikeyLHolm[P]Hive-lem-in/source/flag_management.c
// Function: parse_flags
void			parse_flags(int ac, char **av, t_info *info)
{
	int			i;

	info->ants = -1;
	info->flag_storage = 0;
	while (ac > 1 && av[1] && av[1][0] == '-')
	{
		i = 1;
		while (av[1][i] && ft_strchr("aehlpvx", av[1][i]))
			save_flag(info, av[1][i++]);
		av++;
	}
	if (info->flag_storage & ANTS)
		info->ants = ft_atoi(av[1]);
}

// Assembly:
movl $0xffffffff, 0x28(%rdx) # imm = 0xFFFFFFFF
movl $0x0, 0x1040(%rdx)
cmpl $0x2, %edi
jl 0x18fc
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x18dc
leaq 0x8(%r14), %rdx
leaq 0x5cf4(%rip), %r15      # 0x7510
movq %r14, %rcx
cmpb $0x2d, (%rax)
jne 0x18df
movq %rdx, %r14
movb 0x1(%rax), %al
testb %al, %al
je 0x18c6
movl $0x2, %r12d
movsbl %al, %esi
movq %r15, %rdi
callq 0x4694
testq %rax, %rax
je 0x18c6
movq (%r14), %rax
movzbl -0x1(%rax,%r12), %ecx
cmpl $0x6b, %ecx
jle 0x1870
cmpl $0x75, %ecx
jg 0x1886
cmpl $0x6c, %ecx
je 0x189e
cmpl $0x70, %ecx
jne 0x18b7
movl $0x20, %ecx
jmp 0x18b1
cmpl $0x61, %ecx
je 0x1897
cmpl $0x65, %ecx
je 0x18ac
cmpl $0x68, %ecx
jne 0x18b7
movl $0x4, %ecx
jmp 0x18b1
cmpl $0x76, %ecx
je 0x18a5
cmpl $0x78, %ecx
jne 0x18b7
movl $0x8, %ecx
jmp 0x18b1
movl $0x1, %ecx
jmp 0x18b1
movl $0x10, %ecx
jmp 0x18b1
movl $0x40, %ecx
jmp 0x18b1
movl $0x2, %ecx
orl %ecx, 0x1040(%rbx)
movb (%rax,%r12), %al
incq %r12
testb %al, %al
jne 0x183c
leaq 0x8(%r14), %rdx
movq 0x8(%r14), %rax
movq %r14, %rcx
testq %rax, %rax
jne 0x181c
jmp 0x18df
movq %r14, %rcx
testb $0x1, 0x1040(%rbx)
je 0x18f4
movq 0x8(%rcx), %rdi
callq 0x4430
movl %eax, 0x28(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)