LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/arush15june[P]DFA-CPP/dfa.cpp
// Function: DFA::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool execute(std::string input) {
        /*
        Execute the DFA over the input string.

        TODO: Templatize for any type of vector of input symbols

        Algorithm
            1) set current state to q i.e initial state of DFA.
            2) Iterate over the string.
                a) get the adjacency list for the current state.
                b) Iterate over the adjancency list
                    i) if the state's weight is same as the current symbols ASCII value
                        set the current state to the state's no and break the iteration.
            3) If the current state is same as the final state, set the final_state_reached flag true
            4) return final_state_reached

        @param std::string input: Input string to execute DFA on.
        @return bool final_state_reached: True if the final state was reached, else False.
        */

        bool final_state_reached = false;
        int current_state = q; 

        for(char symbol: input) {
            auto symbol_val = int(symbol);
            auto curr_adj_list = state_diagram.getState(current_state);

            for(auto &state: curr_adj_list) {
                if(state.first == symbol_val and state.second != current_state) {
                    current_state = state.second;
                    break;
                }
            }
        }


        if(current_state == f) final_state_reached = true;

        return final_state_reached;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x6d88(%rdi), %r15d
movq 0x8(%rsi), %r12
testq %r12, %r12
je 0x3440
movq (%rsi), %r13
addq %r13, %r12
movsbl (%r13), %r14d
movslq %r15d, %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %rsi
leaq -0x40(%rbp), %rdi
callq 0x36d8
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rdi, %rcx
cmpq %rax, %rdi
je 0x3427
movl 0x4(%rcx), %edx
cmpl %r14d, (%rcx)
setne %sil
cmpl %r15d, %edx
sete %r8b
orb %sil, %r8b
je 0x3424
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0x3403
jmp 0x3427
movl %edx, %r15d
testq %rdi, %rdi
je 0x3438
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
incq %r13
cmpq %r12, %r13
jne 0x33da
cmpl 0x6d8c(%rbx), %r15d
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/shuhaosun[P]ECM-Sketch/./ECM_Sketch.h
// Function: ECM_Sketch::ECM_Sketch(int, int)
ECM_Sketch(int _w, int _d)
	{
		mem_acc = 0;
		counter_index_size = 20;
		w = _w;
		d = _d;
		
		for(int i = 0; i < d; i++)	
		{
			counter[i] = new Counter[w];
			memset(counter[i], -1, sizeof(Counter) * w);
		}

		MAX_CNT = (1 << COUNTER_SIZE) - 1;

		for(int i = 0; i < d; i++)
		{
			bobhash32[i] = new BOBHash32(i);
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x1a8(%rdi)
movl $0x14, 0x19c(%rdi)
movl %esi, 0x190(%rdi)
movl %edx, 0x194(%rdi)
testl %edx, %edx
jle 0x1a9b
movl %edx, %ebp
movslq %esi, %rax
movl $0x4b4, %ecx            # imm = 0x4B4
mulq %rcx
movq %rax, %r14
movq $-0x1, %r15
cmovnoq %rax, %r15
movl %ebp, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x1030
movq %rax, 0xf0(%rbx,%r13,8)
movq %rax, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x10a0
incq %r13
cmpq %r13, %r12
jne 0x1a47
movl $0xffff, 0x198(%rbx)    # imm = 0xFFFF
testl %ebp, %ebp
jle 0x1aa5
xorl %r14d, %r14d
movl $0x4, %edi
callq 0x1120
movl %r14d, (%rax)
movq %rax, (%rbx,%r14,8)
incq %r14
cmpq %r14, %r12
jne 0x1a80
jmp 0x1aa5
movl $0xffff, 0x198(%rbx)    # imm = 0xFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/shuhaosun[P]ECM-Sketch/./ECM_Sketch.h
// Function: ECM_Sketch::Insert(char const*, int)
void Insert(const char * str, int t)
	{
		for(int i = 0; i < d; i++)
		{
			index[i] = (bobhash32[i]->run(str, strlen(str))) % w;

			Expire_bucket(i, index[i], t);
			Insert_bucket(i, index[i], t);

			mem_acc ++;
		}
	}

// Assembly:
cmpl $0x0, 0x194(%rdi)
jle 0x1b3c
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %r13
movq %r14, %rdi
callq 0x1090
movq %r13, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x13bc
xorl %edx, %edx
divl 0x190(%r15)
movl %edx, 0xa0(%r15,%r12,4)
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %ecx
callq 0x1c74
movl 0xa0(%r15,%r12,4), %edx
movq %r15, %rdi
movl %r12d, %esi
movl %ebx, %ecx
callq 0x1cd2
incl 0x1a8(%r15)
incq %r12
movslq 0x194(%r15), %rax
cmpq %rax, %r12
jl 0x1ad1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/shuhaosun[P]ECM-Sketch/./ECM_Sketch.h
// Function: ECM_Sketch::Query(char const*, int)
int Query(const char *str, int t)
	{
		int min_value = MAX_CNT;
		int temp;
		for(int i = 0; i < d; i++)
		{
			index[i] = (bobhash32[i]->run(str, strlen(str))) % w;
			Expire_bucket(i, index[i], t);
			temp = Bucket_sum(i, index[i], t);
			min_value = temp < min_value ? temp : min_value;
		}
		return min_value;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x198(%rdi), %ebx
cmpl $0x0, 0x194(%rdi)
jle 0x1bc3
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %r13
movq %r14, %rdi
callq 0x1090
movq %r13, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x13bc
xorl %edx, %edx
divl 0x190(%r15)
movl %edx, 0xa0(%r15,%r12,4)
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %ecx
callq 0x1c74
movl 0xa0(%r15,%r12,4), %edx
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %ecx
callq 0x1efa
cmpl %ebx, %eax
cmovll %eax, %ebx
incq %r12
movslq 0x194(%r15), %rax
cmpq %rax, %r12
jl 0x1b63
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/shuhaosun[P]ECM-Sketch/./ECM_Sketch.h
// Function: ECM_Sketch::Expire_bucket(int, int, int)
void Expire_bucket(int i, int j, int t)
	{
		int z = counter[i][j].number - 1;
		if (z != -2)
		{
			for (int q = z; q >= 0; q--)
			{
				if (counter[i][j].bucket[q].end <= (t - WINDOW_SIZE))
				{
					counter[i][j].bucket[q].exponent = -1;
					counter[i][j].bucket[q].start = -1;
					counter[i][j].bucket[q].end = -1;
					counter[i][j].number--;
				}
				else
				{
					break;
				}
			}
		}
	}

// Assembly:
movslq %esi, %rax
movq 0xf0(%rdi,%rax,8), %rax
movslq %edx, %rdx
imulq $0x4b4, %rdx, %rdi      # imm = 0x4B4
movl 0x4b0(%rax,%rdi), %edx
cmpl $-0x1, %edx
je 0x1cd1
testl %edx, %edx
jle 0x1cd1
leaq (%rax,%rdi), %rsi
addq $0x4b0, %rsi            # imm = 0x4B0
addq %rdi, %rax
addl $0xfffb6c20, %ecx       # imm = 0xFFFB6C20
decl %edx
leaq (%rdx,%rdx,2), %rdi
cmpl %ecx, 0x4(%rax,%rdi,4)
jg 0x1cd1
leaq (%rax,%rdi,4), %rdi
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
movq $-0x1, 0x4(%rdi)
movl %edx, (%rsi)
testl %edx, %edx
jg 0x1cad
retq
// File: /workspace/github_cpp_makefile_star2_O3/shuhaosun[P]ECM-Sketch/./ECM_Sketch.h
// Function: ECM_Sketch::Bucket_sum(int, int, int)
int Bucket_sum(int i, int j, int t)
	{
		int z = counter[i][j].number;
		if (z == -1)
		{
			return 0;
		}
		else
		{
			int exp;
			int count_bucket = 1;
			int count = 0;
			int q;
			for (q = 0; q < z - 1; ++q)
			{
				exp = counter[i][j].bucket[q].exponent;
				for (int k = 0; k < exp; ++k)
				{
					count_bucket = 2 * count_bucket;
				}
				count = count + count_bucket;
				count_bucket = 1;
			}
			for (int k = 0; k < counter[i][j].bucket[q].exponent; ++k)
			{
				count_bucket = 2 * count_bucket;
			}
			
			count = count + count_bucket / 2;

			return count;
		}
	}

// Assembly:
movslq %esi, %rax
movq 0xf0(%rdi,%rax,8), %rsi
movslq %edx, %rax
imulq $0x4b4, %rax, %rdx      # imm = 0x4B4
movl 0x4b0(%rsi,%rdx), %edi
xorl %eax, %eax
cmpl $-0x1, %edi
je 0x1f7c
cmpl $0x2, %edi
jl 0x1f55
decl %edi
leaq (%rsi,%rdx), %r8
xorl %r9d, %r9d
xorl %ecx, %ecx
leaq (%r9,%r9,2), %r10
movl (%r8,%r10,4), %r11d
movl $0x1, %r10d
testl %r11d, %r11d
jle 0x1f48
addl %r10d, %r10d
decl %r11d
jne 0x1f40
addl %r10d, %ecx
incq %r9
cmpq %rdi, %r9
jne 0x1f2d
jmp 0x1f59
xorl %ecx, %ecx
xorl %edi, %edi
addq %rdx, %rsi
leaq (%rdi,%rdi,2), %rdx
movl (%rsi,%rdx,4), %edx
testl %edx, %edx
jle 0x1f7a
movl $0x1, %esi
movl %esi, %eax
leal (%rax,%rax), %esi
decl %edx
jne 0x1f6c
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/server.cpp
// Function: next_map_forced(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void next_map_forced(const string &loadmap)
{
	if(intermission && loadmap.empty())
		goto_next_map();
	else
		goto_intermission(loadmap);
}

// Assembly:
cmpb $0x1, 0x32c35(%rip)     # 0x40408
jne 0xd802
cmpq $0x0, 0x8(%rdi)
jne 0xd802
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x32c21(%rip)     # 0x40408
movw $0x0, 0x332e0(%rip)     # 0x40ad0
callq 0x1af3d
leaq 0x332c4(%rip), %rdi     # 0x40ac0
popq %rbp
jmp 0x2aebc
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/server.cpp
// Function: (anonymous namespace)::goto_intermission(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void goto_intermission(const string &loadmap)
{
	intermission = true;
	Game::next_map(loadmap);
	if(turns_lagged)
	{
		string str = "Warning: the server lagged "
			+ lex_cast(turns_lagged) + " turns this map.";
		to_log(str);
	}
	interm_over = time(NULL) + Config::int_settings[Config::IS_INTERM_SECS];
	Network::clocksync(interm_over - time(NULL), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movb $0x1, 0x32bf2(%rip)     # 0x40408
callq 0x19870
movswl 0x332ae(%rip), %esi     # 0x40ad0
testl %esi, %esi
je 0xd92f
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
callq 0x2ba03
leaq 0x1e964(%rip), %rcx     # 0x2c1a1
movl $0x1b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4440
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xd873
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0xd87a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x58(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e921(%rip), %rsi     # 0x2c1bd
callq 0x47b0
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xd8c5
movq %rdx, -0x38(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x28(%rbp)
jmp 0xd8cc
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x30(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0xd8f8
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd911
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x38(%rbp), %rdi
callq 0x14f24
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xd92f
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
xorl %edi, %edi
callq 0x43b0
leaq 0x34f63(%rip), %rcx     # 0x428a0
movl 0x18(%rcx), %ebx
addq %rax, %rbx
movq %rbx, 0x3316e(%rip)     # 0x40ab8
xorl %edi, %edi
callq 0x43b0
subl %eax, %ebx
movzwl %bx, %edi
xorl %esi, %esi
callq 0xf73d
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xd9b0
movq -0x28(%rbp), %rsi
jmp 0xd9a8
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0xd997
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0xd997
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd9b0
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::shutdown()
void Network::shutdown()
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_QUIT);
	broadcast();
	close(s_me);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x32da8(%rip), %rbx     # 0x41128
movq %rbx, %rdi
callq 0x2af20
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2af34
movl $0xffff, %edi           # imm = 0xFFFF
movq %rbx, %rsi
callq 0xe3b3
movl 0x33da0(%rip), %edi     # 0x42148
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x47c0
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::construct_msg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned char)
void Network::construct_msg(string &s, const unsigned char cpair)
{
	/* Note: all message are server-generated, and pretty much the only content
	 * unknown at compile time and beyond the admin's control are the player nicks,
	 * which have limited lenght. Hence, we can rest assured that the strings do
	 * not contain words of lenght > MSG_WIN_X (=57). */
	vector<string> blocks;
	size_t i;
	// break up at spaces:
	while(num_syms(s) > MSG_WIN_X)
	{
		if((i = s.rfind(' ', MSG_WIN_X)) == string::npos)
			i = MSG_WIN_X;
		blocks.push_back(s.substr(0, i));
		s.erase(0, i+1);
	}
	if(!s.empty())
		blocks.push_back(s);
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_ADD_MSG);
	send_buffer.add(cpair);
	send_buffer.add((unsigned char)blocks.size());
	for(i = 0; i < blocks.size(); ++i)
		send_buffer.add(blocks[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movl $0x39, %ebx
leaq -0x70(%rbp), %r12
movq %r14, %rdi
callq 0x2b440
cmpw $0x3a, %ax
jl 0xf494
movl $0x39, %edx
movq %r14, %rdi
movl $0x20, %esi
callq 0x47d0
movq %rax, %r13
cmpq $-0x1, %rax
cmoveq %rbx, %r13
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x4410
movq %r15, %rdi
movq %r12, %rsi
callq 0xfbcc
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf482
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
incq %r13
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x40c0
jmp 0xf423
cmpq $0x0, 0x8(%r14)
je 0xf4a7
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0xf8c0
leaq 0x31c7a(%rip), %rdi     # 0x41128
callq 0x2af20
leaq 0x31c6e(%rip), %rdi     # 0x41128
movl $0xa, %esi
callq 0x2af34
movzbl -0x2c(%rbp), %esi
leaq 0x31c59(%rip), %rdi     # 0x41128
callq 0x2af34
movl -0x48(%rbp), %eax
subl -0x50(%rbp), %eax
shrl $0x5, %eax
movzbl %al, %esi
leaq 0x31c41(%rip), %rdi     # 0x41128
callq 0x2af34
movq -0x50(%rbp), %rsi
cmpq %rsi, -0x48(%rbp)
je 0xf529
xorl %r14d, %r14d
leaq 0x31c28(%rip), %rbx     # 0x41128
xorl %r15d, %r15d
addq %r14, %rsi
movq %rbx, %rdi
callq 0x2af72
incq %r15
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r14
cmpq %rax, %r15
jb 0xf503
leaq -0x50(%rbp), %rdi
callq 0xf90c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf565
jmp 0xf565
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf568
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0xf568
jmp 0xf565
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0xf90c
movq %r14, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::to_chat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Network::to_chat(const string &s)
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_SAY_CHAT);
	send_buffer.add((unsigned short)0);
	send_buffer.add(s);
	send_buffer.add(string("* "));
	send_buffer.add((unsigned char)T_NO_TEAM); // no team, server speaking
	broadcast();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x31b98(%rip), %rbx     # 0x41128
movq %rbx, %rdi
callq 0x2af20
movq %rbx, %rdi
movl $0x4, %esi
callq 0x2af34
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2af48
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2af72
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1cd25(%rip), %rsi     # 0x2c2ee
leaq 0x1cd20(%rip), %rdx     # 0x2c2f0
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0xe01c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2af72
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xf5fc
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq 0x31b25(%rip), %rbx     # 0x41128
movq %rbx, %rdi
movl $0x3, %esi
callq 0x2af34
movl $0xffff, %edi           # imm = 0xFFFF
movq %rbx, %rsi
callq 0xe3b3
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xf640
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::clocksync(unsigned short, unsigned char)
void Network::clocksync(const unsigned short time, const unsigned char spawn)
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_TIME_UPD);
	send_buffer.add(time);
	send_buffer.add(spawn);
	broadcast();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
leaq 0x319d5(%rip), %r15     # 0x41128
movq %r15, %rdi
callq 0x2af20
movq %r15, %rdi
movl $0xe, %esi
callq 0x2af34
movq %r15, %rdi
movl %r14d, %esi
callq 0x2af48
movq %r15, %rdi
movl %ebx, %esi
callq 0x2af34
movl $0xffff, %edi           # imm = 0xFFFF
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe3b3
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/settings.cpp
// Function: (anonymous namespace)::construct_value_list(std::vector<char, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*)
string construct_value_list(const vector<char> &l, string const* const s)
{
	string ret = "";
	for(vector<char>::const_iterator it = l.begin(); it != l.end(); ++it)
		ret += s[*it] + '/';
	ret.erase(ret.size()-1, 1);
	if(ret.size() > MAX_LIST_LEN)
	{
		ret.erase(ret.rfind('/', MAX_LIST_LEN-4));
		ret += "...";
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rdi)
leaq 0x1a887(%rip), %rdx     # 0x2c2f0
movq %rdi, -0x30(%rbp)
movq %rdx, %rsi
callq 0xe01c
movq (%r15), %rbx
cmpq 0x8(%r15), %rbx
je 0x11aee
leaq -0x48(%rbp), %r13
leaq -0x58(%rbp), %r12
movsbq (%rbx), %rax
shlq $0x5, %rax
movq %r13, -0x58(%rbp)
movq (%r14,%rax), %rsi
movq 0x8(%r14,%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xf988
movq -0x50(%rbp), %rsi
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
movl $0x2f, %r8d
callq 0x47a0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x4130
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x11ae5
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
incq %rbx
cmpq 0x8(%r15), %rbx
jne 0x11a86
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %rsi
decq %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40c0
cmpq $0x51, 0x8(%rbx)
jb 0x11b42
movl $0x4c, %edx
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x47d0
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
jb 0x11b51
movq %rax, 0x8(%rbx)
movq (%rbx), %rcx
movb $0x0, (%rcx,%rax)
leaq 0x2400c(%rip), %rsi     # 0x35b46
movq %rbx, %rdi
callq 0x47b0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1abb1(%rip), %rdi     # 0x2c709
leaq 0x1ab96(%rip), %rsi     # 0x2c6f5
movq %rax, %rdx
xorl %eax, %eax
callq 0x4600
jmp 0x11b6b
movq %rax, %r14
jmp 0x11b8a
jmp 0x11b72
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x11b8a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x11ba6
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x43f0
movq %r14, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: PlayerStats::PlayerStats()
PlayerStats::PlayerStats() : last_known_as(""), deaths(0), tks(0),
	healing_recvd(0), total_time(0), time_specced(0), arch_hits(0),
	arch_shots(0), cm_hits(0), cm_shots(0), ad_lvl(AL_GUEST)
{
	int i;
	for(i = 0; i < NO_CLASS; ++i)
		time_played[i] = 0;
	for(i = 0; i < MAX_WAY_TO_KILL; ++i)
		kills[i] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
leaq 0x19f0c(%rip), %rdx     # 0x2c2f0
movq %rdx, %rsi
callq 0xe01c
movl $0x0, 0x130(%rbx)
addq $0x30, %rbx
movl $0xf8, %edx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: Player::burn_torch()
bool Player::burn_torch()
{
	--torch_left;
	if(torch_left == 3*TORCH_DURATION/2 || torch_left == TORCH_DURATION/2
		|| torch_left == TORCH_DURATION || !torch_left)
		needs_state_upd = true;
	return !torch_left;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x160(%rdi), %ecx
leal -0x1(%rcx), %eax
movw %ax, 0x160(%rdi)
cmpl $0x1f4, %ecx            # imm = 0x1F4
jg 0x12580
cmpl $0x1, %ecx
je 0x12590
cmpl $0xfb, %ecx
je 0x12590
jmp 0x12597
cmpl $0x2ef, %ecx            # imm = 0x2EF
je 0x12590
cmpl $0x1f5, %ecx            # imm = 0x1F5
jne 0x12597
movb $0x1, 0x14d(%rdi)
testw %ax, %ax
sete %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: Player::torch_symbol(bool) const
unsigned char Player::torch_symbol(const bool lit) const
{
	if(cl_props.torch)
	{
		if(!torch_left)
			return ',';
		if(lit)
			return torch_sym[2*torch_left/TORCH_DURATION];
		return ' '; // torch not lit
	}
	return '-'; // no torch whatsoever
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x2d, %al
cmpb $0x1, 0x14b(%rdi)
jne 0x125fb
movzwl 0x160(%rdi), %ecx
testw %cx, %cx
setne %dl
movl $0x20, %edi
movl $0x2c, %eax
cmovnel %edi, %eax
andb %sil, %dl
cmpb $0x1, %dl
jne 0x125fb
movswl %cx, %eax
imull $0xffff8313, %eax, %eax # imm = 0xFFFF8313
shrl $0x10, %eax
addl %ecx, %eax
movzwl %ax, %eax
movswl %ax, %ecx
shrl $0xf, %eax
sarl $0x7, %ecx
addl %eax, %ecx
movswq %cx, %rax
leaq 0x1a46a(%rip), %rcx     # 0x2ca62
movb (%rax,%rcx), %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: store_known_players()
void store_known_players()
{
	// This function is called when the server shuts down. Now, it might be that
	// there were players connected at that time, and we need to stat their
	// playing times here!
	extern bool intermission;
	for(list<Player>::iterator pit = cur_players.begin();
		pit != cur_players.end(); ++pit)
	{
		if(pit->botpid != -1) // it's a bot
			known_players.erase(pit->stats_i);
		else
		{
			pit->stats_i->total_time += time(NULL) - pit->stats_i->last_seen;
			time(&(pit->stats_i->last_seen));
		
			if(pit->is_alive())
				pit->stats_i->time_played[pit->cl] += time(NULL) - pit->last_switched_cl;
			else if(pit->team == T_SPEC && !intermission)
				pit->stats_i->time_specced += time(NULL) - pit->last_switched_cl;
		}
	}

	// Now start actually storing the player statistics:
	write_player_stats();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x30376(%rip), %r14     # 0x430c0
leaq 0x3036f(%rip), %r15     # 0x430c0
cmpq %r15, %r14
je 0x12e1e
leaq 0x2d6a7(%rip), %r12     # 0x40408
leaq 0x30340(%rip), %rbx     # 0x430a8
cmpl $-0x1, 0x174(%r14)
je 0x12d86
movq 0x90(%r14), %rsi
movq %rbx, %rdi
callq 0x14da4
jmp 0x12e12
xorl %edi, %edi
callq 0x43b0
movq 0x90(%r14), %rcx
subq 0x138(%rcx), %rax
leaq 0x138(%rcx), %rdi
addq %rax, 0xb0(%rcx)
callq 0x43b0
movl 0xbc(%r14), %eax
cmpl $0x2, %eax
je 0x12dea
cmpb $0x0, 0x153(%r14)
jle 0x12dea
xorl %edi, %edi
callq 0x43b0
subq 0xc8(%r14), %rax
movq 0x90(%r14), %rcx
movl 0xc0(%r14), %edx
addq %rax, 0xc0(%rcx,%rdx,8)
jmp 0x12e12
cmpl $0x2, %eax
jne 0x12e12
cmpb $0x0, (%r12)
jne 0x12e12
xorl %edi, %edi
callq 0x43b0
subq 0xc8(%r14), %rax
movq 0x90(%r14), %rcx
addq %rax, 0xb8(%rcx)
movq (%r14), %r14
cmpq %r15, %r14
jne 0x12d68
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12e2b
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: (anonymous namespace)::equal_ip(sockaddr_storage const*, sockaddr_storage const*)
bool equal_ip(const sockaddr_storage *first, const sockaddr_storage *second)
{
	if(first->ss_family == second->ss_family)
	{
		if(first->ss_family == AF_INET)
			return !memcmp(&(((const sockaddr_in*)first)->sin_addr),
				&(((const sockaddr_in*)second)->sin_addr), sizeof(in_addr));
		// else address family is AF_INET6
		return !memcmp(&(((const sockaddr_in6*)first)->sin6_addr),
				&(((const sockaddr_in6*)second)->sin6_addr), sizeof(in6_addr));
	}
	return false; // one is IPv4, other IPv6
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
cmpw (%rsi), %ax
jne 0x13358
cmpw $0x2, %ax
jne 0x1335c
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jmp 0x13373
xorl %eax, %eax
jmp 0x13376
movdqu 0x8(%rdi), %xmm0
movdqu 0x8(%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: (anonymous namespace)::add_and_register_player(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, sockaddr_storage&, bool)
unsigned short add_and_register_player(const string &nick, string &passw,
	sockaddr_storage &sas, const bool is_bot)
{
	list<PlayerStats>::iterator newpl = new_player();
	register_player(nick, sas, newpl, is_bot);
	passw.assign(newpl->password);
	return newpl->ID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %ecx, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r12
leaq -0x170(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq -0x160(%rbp), %rdi
movl $0x0, 0x100(%rdi)
xorl %r13d, %r13d
movl $0xf8, %edx
xorl %esi, %esi
callq 0x4200
movzwl 0x2fd19(%rip), %eax     # 0x430f0
movq 0x2fcca(%rip), %rcx     # 0x430a8
leaq 0x2fcc3(%rip), %rdx     # 0x430a8
cmpq %rdx, %rcx
je 0x13409
movq %rcx, %rsi
cmpw %ax, 0x10(%rsi)
je 0x133fd
movq (%rsi), %rsi
cmpq %rdx, %rsi
jne 0x133ed
jmp 0x13409
incl %eax
cmpw $-0x5, %ax
cmovel %r13d, %eax
jmp 0x133ea
movw %ax, -0x190(%rbp)
incl %eax
movw %ax, 0x2fcd7(%rip)      # 0x430f0
movl $0x2, %r13d
movabsq $0x572620ae4c415c99, %r15 # imm = 0x572620AE4C415C99
callq 0x41d0
movq %rax, %rcx
imulq %r15
movq %rdx, %rax
shrq $0x3f, %rax
shrl $0x5, %edx
addl %eax, %edx
imull $0x5e, %edx, %eax
subl %eax, %ecx
addb $0x21, %cl
movb %cl, -0x190(%rbp,%r13)
incq %r13
cmpq $0xa, %r13
jne 0x13429
leaq -0x190(%rbp), %rsi
movb $0x0, 0xa(%rsi)
leaq 0x2fc3d(%rip), %rdi     # 0x430a8
callq 0x14858
movq %rax, %r13
leaq 0x2fc2e(%rip), %rsi     # 0x430a8
movq %rax, %rdi
callq 0x4060
incq 0x2fc2f(%rip)           # 0x430b8
movq -0x180(%rbp), %rdi
cmpq %r14, %rdi
je 0x134a4
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0xf988
movzbl -0x2c(%rbp), %ecx
movq %r12, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x13561
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x134ec
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %r13, %r14
addq $0x12, %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x41a0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x4630
movzwl 0x10(%r13), %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x13559
movq -0x48(%rbp), %rsi
jmp 0x13551
movq %rax, %rbx
movq -0x180(%rbp), %rdi
cmpq %r14, %rdi
je 0x13559
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: bot_connect(unsigned short, sockaddr_storage&)
unsigned short bot_connect(const unsigned short pid, sockaddr_storage &sas)
{
	// Basically we delegate to player_hello, but some extra checks:
	// We don't want to "drop bots to make room for bots":
	if(cur_players.size() >= Config::int_settings[Config::IS_MAXPLAYERS])
		return SERVER_FULL;
	// else:
	string tmp1, tmp2 = Config::new_bot_name();
	unsigned short sh = player_hello(0xFFFF, tmp1, tmp2, sas, true);
	if(sh <= HIGHEST_VALID_ID) // player was added
		cur_players.back().botpid = pid;
	return sh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x2eee7(%rip), %rax     # 0x428a0
movl (%rax), %eax
movw $0xfffc, %r14w          # imm = 0xFFFC
cmpq %rax, 0x2f709(%rip)     # 0x430d0
jae 0x13a67
movq %rsi, %r15
movl %edi, %ebx
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
callq 0x11bfd
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xf988
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
movl $0xffff, %edi           # imm = 0xFFFF
movq %r15, %rcx
movl $0x1, %r8d
callq 0x13141
movl %eax, %r14d
cmpw $-0x5, %ax
ja 0x13a3d
movzwl %bx, %eax
movq 0x2f691(%rip), %rcx     # 0x430c8
movl %eax, 0x174(%rcx)
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x13a52
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x13a67
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x13a96
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x13a96
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x13aab
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: num_bots()
short num_bots()
{
	short num = 0;
	list<Player>::iterator bit = cur_players.begin();
	while(next_bot(bit))
	{
		++bit;
		++num;
	}
	return num;
}

// Assembly:
movq 0x2f328(%rip), %rcx     # 0x430c0
leaq 0x2f321(%rip), %rdx     # 0x430c0
cmpq %rdx, %rcx
je 0x13dc3
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpl $-0x1, 0x174(%rcx)
jne 0x13dbd
movq (%rcx), %rcx
cmpq %rdx, %rcx
jne 0x13daa
jmp 0x13dc1
incl %eax
jmp 0x13db3
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/players.cpp
// Function: usage_report()
void usage_report()
{
	if(!usage_per_30min.empty())
	{
		// compute average:
		int sum = 0;
		for(vector<short>::const_iterator i = usage_per_30min.begin();
			i != usage_per_30min.end(); ++i)
			sum += *i;
		to_log("Average presence: " +
			lex_cast_fl(float(sum)/usage_per_30min.size()));
		usage_per_30min.clear();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq 0x2f2b8(%rip), %rcx     # 0x43090
movq 0x2f2b9(%rip), %rax     # 0x43098
cmpq %rax, %rcx
je 0x13edc
xorl %edx, %edx
movq %rcx, %rsi
movswl (%rsi), %edi
addl %edi, %edx
addq $0x2, %rsi
cmpq %rax, %rsi
jne 0x13ded
cvtsi2ss %edx, %xmm0
subq %rcx, %rax
sarq %rax
js 0x13e0e
cvtsi2ss %rax, %xmm1
jmp 0x13e23
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x2ba99
leaq 0x18b13(%rip), %rcx     # 0x2c94d
movl $0x12, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4440
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13e70
movq %rdx, -0x30(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x20(%rbp)
jmp 0x13e77
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x30(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x14f24
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x13eac
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13ec5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq 0x2f1c4(%rip), %rax     # 0x43090
cmpq %rax, 0x2f1c5(%rip)     # 0x43098
je 0x13edc
movq %rax, 0x2f1bc(%rip)     # 0x43098
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x13f02
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x13f02
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13f1b
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/log.cpp
// Function: to_log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void to_log(const string &s)
{
	if(canlog)
	{
		string fname = Config::get_config_dir() + logfilename;
		ofstream logfile(fname.c_str(), ios_base::app);
		if(!logfile)
		{
			cerr << "Could not open log file (" << fname << ")!" << endl;
			canlog = false;
			return;
		}
		logfile << s << endl;
	}
#ifdef DEBUG
	cerr << "LOG: " << s << endl;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
cmpb $0x0, 0x2e62a(%rip)     # 0x43568
jne 0x15091
callq 0x11983
leaq 0x2e5f8(%rip), %rdx     # 0x43548
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x146ff
movq (%r14), %rsi
leaq -0x238(%rbp), %rdi
movl $0x1, %edx
callq 0x4430
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x218(%rbp,%rax), %r15d
testb $0x5, %r15b
je 0x14fff
movq 0x2b055(%rip), %rdi     # 0x3ffe8
leaq 0x17ad7(%rip), %rsi     # 0x2ca71
movl $0x19, %edx
callq 0x4460
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x2b035(%rip), %rdi     # 0x3ffe8
callq 0x4460
movq %rax, %r14
leaq 0x17302(%rip), %rsi     # 0x2c2c4
movl $0x2, %edx
movq %rax, %rdi
callq 0x4460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movb $0x1, 0x2e56b(%rip)     # 0x43568
jmp 0x1503c
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x238(%rbp), %rdi
callq 0x4460
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movq 0x2af5d(%rip), %rax     # 0x3ffa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x230(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x238(%rbp,%rcx)
callq 0x4330
leaq -0x140(%rbp), %rdi
callq 0x4140
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1508b
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
testb $0x5, %r15b
jne 0x150e5
movq 0x2af50(%rip), %r14     # 0x3ffe8
leaq 0x179ec(%rip), %rsi     # 0x2ca8b
movl $0x5, %edx
movq %r14, %rdi
callq 0x4460
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4460
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x43d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x15107
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x45e0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15120
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/log.cpp
// Function: timed_log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void timed_log(const string &s)
{
	time_t rawtime;
	struct tm *timeinfo;
	char buffer[7]; // eg. "12:13 " (and '\0')

	time(&rawtime);
 	timeinfo = localtime(&rawtime);
	strftime(buffer, 7, "%H:%M ", timeinfo);
	to_log(string(buffer) + s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x42b0
leaq 0x1793c(%rip), %rdx     # 0x2ca91
leaq -0x27(%rbp), %r14
movl $0x7, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x4300
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x41a0
leaq (%rax,%rbp), %rdx
addq $-0x27, %rdx
leaq -0x68(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xe01c
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x4130
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x151c4
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x151cb
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x14f24
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x15200
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x15215
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x1523f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1523f
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x15254
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/log.cpp
// Function: check_date_change(int)
bool check_date_change(const int d)
{
	// This check is only true on the first test, when the day is not yet
	// initialized:
	if(cur_mday == -1)
		cur_mday = d;
	else if(cur_mday != d)
	{
		time_t rawt;
		char b[30];
		time(&rawt);
		tm *timeinfo = localtime(&rawt);
		strftime(b, 30, "Day changed to %a %d %b", timeinfo);
		to_log(string(b));
		cur_mday = d;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edi, %ebx
movl 0x2b1a5(%rip), %eax     # 0x40418
cmpl $-0x1, %eax
je 0x15302
cmpl %ebx, %eax
je 0x15308
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x42b0
leaq 0x177f9(%rip), %rdx     # 0x2ca98
leaq -0x70(%rbp), %r14
movl $0x1e, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x4300
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x41a0
leaq (%rax,%rbp), %rdx
addq $-0x70, %rdx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xe01c
movq %r15, %rdi
callq 0x14f24
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x152f8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %ebx, 0x2b11a(%rip)     # 0x40418
movb $0x1, %al
jmp 0x1530a
movl %ebx, 0x2b110(%rip)     # 0x40418
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x1532f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::make_right_size(std::vector<std::vector<Tile, std::allocator<Tile>>, std::allocator<std::vector<Tile, std::allocator<Tile>>>>&) const
void Map::make_right_size(std::vector< std::vector<Tile> > &res) const
{
	// Resize the "inner vectors" (rows) that will remain
	for(short i = min(short(res.size()), mapsize)-1; i >= 0; --i)
		res[i].resize(mapsize, EMPTY_TILE);
	// Resize the outer vector (the collection of rows):
	res.resize(mapsize, vector<Tile>(mapsize, EMPTY_TILE));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movl 0x8(%rsi), %eax
subl (%rsi), %eax
shrl $0x3, %eax
imull $0xffffaaab, %eax, %ecx # imm = 0xFFFFAAAB
movl (%rdi), %eax
cmpw %cx, %ax
cmovll %eax, %ecx
decw %cx
js 0x165e3
movq %rdi, %r14
movzwl %cx, %eax
shll $0x3, %eax
leaq (%rax,%rax,2), %r12
leaq 0x166c9(%rip), %r15     # 0x2cc8c
movq (%rbx), %rdi
addq %r12, %rdi
movswq (%r14), %rsi
movq %r15, %rdx
callq 0x1883a
addq $-0x18, %r12
cmpq $-0x18, %r12
jne 0x165c3
movzwl (%r14), %eax
movswq %ax, %r14
leaq 0x1669e(%rip), %rdx     # 0x2cc8c
leaq -0x40(%rbp), %r15
leaq -0x21(%rbp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x188be
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x18874
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x16624
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x43f0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x16649
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4740
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::add_patch(Coords const&, Tile const&)
void Map::add_patch(const Coords &c, const Tile &t)
{
	char radius = random()%3 + 2; //2..4
	short x, y, cmp;
	for(y = max(0, c.y - radius); y <= min(mapsize-1, c.y + radius); ++y)
	{
		for(x = max(0, c.x - radius); x <= min(mapsize-1, c.x + radius); ++x)
		{
			if((cmp = (c.x-x)*(c.x-x)+(c.y-y)*(c.y-y)) <= radius*radius)
				data[y][x] = t;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %r15
callq 0x41d0
movq %rax, %rcx
movabsq $0x5555555555555556, %rdx # imm = 0x5555555555555556
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
addl %edx, %eax
leal (%rax,%rax,2), %eax
subl %eax, %ecx
leal 0x2(%rcx), %eax
movswl 0x2(%r14), %r10d
movl %r10d, %edi
subl %eax, %edi
xorl %ebx, %ebx
testl %edi, %edi
cmovlel %ebx, %edi
movswl (%r15), %esi
leal -0x1(%rsi), %r8d
addl %r10d, %ecx
addl $0x2, %ecx
cmpl %r8d, %ecx
cmovll %ecx, %r8d
cmpl %edi, %r8d
jl 0x1677f
movl %eax, %ecx
imull %eax, %ecx
movzwl (%r14), %r9d
movl %edi, %r8d
movswl %r9w, %r12d
movl %r12d, %r13d
subl %eax, %r13d
testl %r13d, %r13d
cmovlel %ebx, %r13d
movswl %si, %r11d
decl %r11d
leal (%rax,%r12), %edx
cmpl %r11d, %edx
cmovgel %r11d, %edx
cmpl %r13d, %edx
jl 0x16763
movswq %r8w, %r10
movl %r13d, %r11d
subl %r13d, %r12d
imull %r12d, %r12d
movzwl 0x2(%r14), %edx
subl %edi, %edx
imull %edx, %edx
addl %r12d, %edx
movswl %dx, %edx
cmpl %ecx, %edx
jg 0x16737
movq 0x8(%r15), %rdx
leaq (%r10,%r10,2), %rsi
movswq %r11w, %r9
movq (%rdx,%rsi,8), %rdx
movq -0x30(%rbp), %rsi
movl (%rsi), %esi
movl %esi, (%rdx,%r9,4)
movzwl (%r15), %esi
movzwl (%r14), %r9d
incl %r11d
movswl %r11w, %r13d
movswl %si, %edx
decl %edx
movswl %r9w, %r12d
leal (%rax,%r12), %ebx
cmpl %edx, %ebx
cmovll %ebx, %edx
cmpl %r13d, %edx
jge 0x166fa
movzwl 0x2(%r14), %r10d
movswl %si, %r11d
decl %r11d
xorl %ebx, %ebx
incl %r8d
movswl %r8w, %edi
movswl %r10w, %edx
addl %eax, %edx
cmpl %r11d, %edx
cmovgel %r11d, %edx
cmpl %edi, %edx
jge 0x166cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::apply_house(Coords const&)
void Map::apply_house(const Coords &c)
{
	short i, j;
	Tile* tp;
	for(i = 0; i < MAX_HS; ++i)
	{
		if(c.x+i >= mapsize-1 || c.y+i <= 0)
			break;
		for(j = 0; j < MAX_HS; ++j)
		{
			if(c.y+j >= mapsize-1 || c.y+j <= 0)
				break;
			tp = mod_tile(c.x + i, c.y + j);
			switch(house[j*MAX_HS+i])
			{
			case ':': case '.':
				*tp = T_FLOOR; break;
			case '#':
				*tp = T_WALL; break;
			case 'I':
				*tp = T_ILLUSION_WALL; break;
			case '+':
				*tp = T_DOOR;
				if(random()%2) // open instead of closed
				{
					tp->symbol = '\\';
					tp->flags |= TF_WALKTHRU|TF_SEETHRU;
				}
				break;
			case '|': case '-':
				*tp = T_WINDOW;
				tp->symbol = house[j*MAX_HS+i];
				break;
			// default: do nothing
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x2ceb3(%rip), %r13     # 0x43b00
xorl %esi, %esi
movq %rdi, -0x38(%rbp)
movswl (%rbx), %eax
addl %esi, %eax
movswl (%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x16d5c
movswl 0x2(%rbx), %eax
addl %esi, %eax
jle 0x16d5c
movq %r13, -0x30(%rbp)
xorl %r15d, %r15d
movq %rsi, -0x40(%rbp)
movswl 0x2(%rbx), %eax
addq %r15, %rax
testl %eax, %eax
jle 0x16d48
movswl (%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x16d48
movzwl (%rbx), %ecx
addw %si, %cx
movl %eax, %eax
movq 0x8(%rdi), %rdx
leaq (%rax,%rax,2), %rax
movswq %cx, %r12
movq (%rdx,%rax,8), %r14
movb (%r13), %al
movzbl %al, %ecx
cmpl $0x2d, %ecx
jle 0x16cd5
cmpl $0x48, %ecx
jg 0x16ce6
cmpl $0x2e, %ecx
je 0x16ccb
cmpl $0x3a, %ecx
jne 0x16d37
movl $0x1c2e0005, (%r14,%r12,4) # imm = 0x1C2E0005
jmp 0x16d37
cmpl $0x23, %ecx
je 0x16cff
cmpl $0x2b, %ecx
je 0x16d13
cmpl $0x2d, %ecx
je 0x16cf0
jmp 0x16d37
cmpl $0x49, %ecx
je 0x16d09
cmpl $0x7c, %ecx
jne 0x16d37
movl $0x1a7c0004, (%r14,%r12,4) # imm = 0x1A7C0004
movb %al, 0x2(%r14,%r12,4)
jmp 0x16d37
movl $0x1a230000, (%r14,%r12,4) # imm = 0x1A230000
jmp 0x16d37
movl $0x1a230001, (%r14,%r12,4) # imm = 0x1A230001
jmp 0x16d37
movl $0x1b2b0000, (%r14,%r12,4) # imm = 0x1B2B0000
callq 0x41d0
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdi
testb $0x1, %al
je 0x16d37
movb $0x5c, 0x2(%r14,%r12,4)
orb $0x5, (%r14,%r12,4)
incq %r15
addq $0xe, %r13
cmpq $0xe, %r15
jne 0x16c7c
incq %rsi
movq -0x30(%rbp), %r13
incq %r13
cmpq $0xe, %rsi
jne 0x16c53
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::fix_boundary()
void Map::fix_boundary()
{
	rowit rit = data.begin();
	vector<Tile>::iterator it;
	for(it = rit->begin(); it != rit->end(); ++it)
	{
		*it = T_WALL;
		it->flags |= TF_NODIG;
	}
	rit = data.begin()+mapsize-1;
	for(it = rit->begin(); it != rit->end(); ++it)
	{
		*it = T_WALL;
		it->flags |= TF_NODIG;
	}
	for(rit = data.begin(); rit != data.end(); ++rit)
	{
		(*rit)[0] = (*rit)[mapsize-1] = T_WALL;
		(*rit)[0].flags |= TF_NODIG;
		(*rit)[mapsize-1].flags |= TF_NODIG;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x16d91
movl $0x1a231000, (%rcx)     # imm = 0x1A231000
addq $0x4, %rcx
cmpq 0x8(%rax), %rcx
jne 0x16d7d
movq 0x8(%rdi), %rax
movswq (%rdi), %rcx
leaq (%rcx,%rcx,2), %rdx
movq -0x18(%rax,%rdx,8), %rcx
cmpq -0x10(%rax,%rdx,8), %rcx
je 0x16dbd
leaq (%rax,%rdx,8), %rax
movl $0x1a231000, (%rcx)     # imm = 0x1A231000
addq $0x4, %rcx
cmpq -0x10(%rax), %rcx
jne 0x16da9
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
je 0x16dfb
movzwl (%rdi), %esi
movl $0x1a230000, %ecx       # imm = 0x1A230000
movw $0x1000, %dx            # imm = 0x1000
movswq %si, %rsi
movq (%rax), %r8
movl %ecx, -0x4(%r8,%rsi,4)
movq (%rax), %rsi
movl %ecx, (%rsi)
movq (%rax), %r8
orw %dx, (%r8)
movswq (%rdi), %rsi
orw %dx, -0x4(%r8,%rsi,4)
addq $0x18, %rax
cmpq 0x10(%rdi), %rax
jne 0x16dcf
popq %rbp
retq
nop