LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_indirection_uninitialised<overload::delayed_init<helper>>(int)
void test_indirection_uninitialised(int line) {

  where(line, __func__);
  D d;
  helper::mark_call_stack();
  try {
    (*d).get();
    assert(false);
  }
  catch (std::logic_error&) {
  }
  catch (...) {
    assert(false);
  }
  helper::check_call_stack({});
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x31b0(%rip), %rsi      # 0x6bfa
callq 0x1414
movb $0x0, 0x8(%rsp)
callq 0x25d4
leaq 0x8(%rsp), %rdi
callq 0x4c84
movq %rax, %rdi
callq 0x4ce2
leaq 0x2660(%rip), %rdi      # 0x60d2
leaq 0x25ae(%rip), %rsi      # 0x6027
leaq 0x3199(%rip), %rcx      # 0x6c19
movl $0xe7, %edx
callq 0x10a0
movq %rdx, %rbx
movq %rax, %rdi
callq 0x1060
cmpl $0x2, %ebx
jne 0x3abf
callq 0x1170
xorl %edi, %edi
xorl %esi, %esi
callq 0x261a
cmpb $0x1, 0x8(%rsp)
jne 0x3ab9
leaq 0xc(%rsp), %rdi
callq 0x2744
addq $0x10, %rsp
popq %rbx
retq
callq 0x11f0
jmp 0x3ac6
movq %rax, %rbx
cmpb $0x1, 0x8(%rsp)
jne 0x3ada
leaq 0xc(%rsp), %rdi
callq 0x2744
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_indirection_initialised<overload::delayed_init<helper>>(int, std::initializer_list<helper::method>)
void test_indirection_initialised(int line, method_list ml) {
  where(line, __func__);
  D d(helper(1));
  helper::mark_call_stack();
  (*d).get();
  helper::check_call_stack(ml);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x3141(%rip), %rsi      # 0x6cdf
callq 0x1414
leaq 0x14(%rsp), %r12
movq %r12, %rdi
movl $0x1, %esi
callq 0x26f4
leaq 0x10(%rsp), %rbx
movb $0x0, -0x4(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4a24
movb $0x1, -0x4(%rbx)
movq %r12, %rdi
callq 0x2744
callq 0x25d4
leaq 0xc(%rsp), %rdi
callq 0x4c84
movq %rax, %rdi
callq 0x4ce2
movq %r15, %rdi
movq %r14, %rsi
callq 0x261a
cmpb $0x1, 0xc(%rsp)
jne 0x3c06
movq %rbx, %rdi
callq 0x2744
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
cmpb $0x1, 0xc(%rsp)
jne 0x3c24
movq %rbx, %rdi
callq 0x2744
movq %r14, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_getter<overload::delayed_init<helper>>(int, overload::delayed_init<helper> const&, bool, bool)
void test_getter(int line, const delayed_init<helper>& src, bool is_const,
  bool is_init) {
  
  where(line, __func__);
  D d(src);
  const auto p = d.get();
  assert(is_pointer_to_const(p) == is_const);
  assert(static_cast<bool>(p) == is_init);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
leaq 0x3010(%rip), %rsi      # 0x6cfc
callq 0x1414
movb $0x0, 0x8(%rsp)
movb (%r14), %r12b
cmpb $0x1, %r12b
jne 0x3d18
addq $0x4, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4a76
movb $0x1, -0x4(%r15)
testb %bpl, %bpl
jne 0x3d3e
cmpb %bl, %r12b
jne 0x3d5d
testb %r12b, %r12b
je 0x3d31
leaq 0xc(%rsp), %rdi
callq 0x2744
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2fc3(%rip), %rdi      # 0x6d08
leaq 0x22db(%rip), %rsi      # 0x6027
leaq 0x2fd8(%rip), %rcx      # 0x6d2b
movl $0x109, %edx            # imm = 0x109
callq 0x10a0
leaq 0x302c(%rip), %rdi      # 0x6d90
leaq 0x22bc(%rip), %rsi      # 0x6027
leaq 0x2fb9(%rip), %rcx      # 0x6d2b
movl $0x10a, %edx            # imm = 0x10A
callq 0x10a0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_dereference<overload::delayed_init<helper>>(int, std::initializer_list<helper::method>)
void test_dereference(int line, method_list ml) {
  where(line, __func__);
  D d(helper(1));
  helper::mark_call_stack();
  d->get();
  helper::check_call_stack(ml);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x2f65(%rip), %rsi      # 0x6ef7
callq 0x1414
leaq 0x14(%rsp), %r12
movq %r12, %rdi
movl $0x1, %esi
callq 0x26f4
leaq 0x10(%rsp), %rbx
movb $0x0, -0x4(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4a24
movb $0x1, -0x4(%rbx)
movq %r12, %rdi
callq 0x2744
callq 0x25d4
xorl %edi, %edi
cmpb $0x0, 0xc(%rsp)
cmovneq %rbx, %rdi
callq 0x4ce2
movq %r15, %rdi
movq %r14, %rsi
callq 0x261a
cmpb $0x1, 0xc(%rsp)
jne 0x3ff8
movq %rbx, %rdi
callq 0x2744
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
cmpb $0x1, 0xc(%rsp)
jne 0x4016
movq %rbx, %rdi
callq 0x2744
movq %r14, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_init_uninitialised<int>(int, std::initializer_list<helper::method>, int&&)
void test_init_uninitialised(int line, method_list ml, Args&&... args) {
  where(line, __func__);
  delayed_init<const helper> d;
  helper::mark_call_stack();
  d.init(std::forward<Args>(args)...);
  helper::check_call_stack(ml);
  assert(d);
  assert(d.get());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x2ce5(%rip), %rsi      # 0x6f08
callq 0x1414
movb $0x0, 0x8(%rsp)
callq 0x25d4
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2792
movq %r14, %rdi
movq %rbx, %rsi
callq 0x261a
cmpb $0x0, 0x8(%rsp)
je 0x4265
leaq 0xc(%rsp), %rdi
callq 0x2744
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2a8e(%rip), %rdi      # 0x6cfa
leaq 0x1db4(%rip), %rsi      # 0x6027
leaq 0x2ca6(%rip), %rcx      # 0x6f20
movl $0x131, %edx            # imm = 0x131
callq 0x10a0
movq %rax, %rbx
cmpb $0x1, 0x8(%rsp)
jne 0x4298
leaq 0xc(%rsp), %rdi
callq 0x2744
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_swap_member<overload::delayed_init<helper>, overload::delayed_init<helper>>(int, overload::delayed_init<helper>&, overload::delayed_init<helper>&, std::initializer_list<helper::method>)
void test_swap_member(int line, D1& d1, D2& d2, method_list ml) {
  where(line, __func__);
  const bool is_init1 = static_cast<bool>(d1);
  const bool is_init2 = static_cast<bool>(d2);
  helper::mark_call_stack();
  d1.swap(d2);
  helper::check_call_stack(ml);
  assert(static_cast<bool>(d2) == is_init1);
  assert(static_cast<bool>(d1) == is_init2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
leaq 0x2b98(%rip), %rsi      # 0x70ae
callq 0x1414
movb (%rbx), %r13b
movb (%r12), %bpl
callq 0x25d4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4f90
movq %r15, %rdi
movq %r14, %rsi
callq 0x261a
cmpb %r13b, (%r12)
jne 0x4557
cmpb %bpl, (%rbx)
jne 0x4576
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b61(%rip), %rdi      # 0x70bf
leaq 0x1ac2(%rip), %rsi      # 0x6027
leaq 0x2b75(%rip), %rcx      # 0x70e1
movl $0x155, %edx            # imm = 0x155
callq 0x10a0
leaq 0x2be3(%rip), %rdi      # 0x7160
leaq 0x1aa3(%rip), %rsi      # 0x6027
leaq 0x2b56(%rip), %rcx      # 0x70e1
movl $0x156, %edx            # imm = 0x156
callq 0x10a0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/delayed_init.cpp
// Function: void test_swap_non_member<overload::delayed_init<helper>, overload::delayed_init<helper>>(int, overload::delayed_init<helper>&, overload::delayed_init<helper>&, std::initializer_list<helper::method>)
void test_swap_non_member(int line, D1& d1, D2& d2, method_list ml) {
  where(line, __func__);
  const bool is_init1 = static_cast<bool>(d1);
  const bool is_init2 = static_cast<bool>(d2);
  helper::mark_call_stack();
  swap(d1, d2);
  helper::check_call_stack(ml);
  assert(static_cast<bool>(d2) == is_init1);
  assert(static_cast<bool>(d1) == is_init2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
leaq 0x2bcf(%rip), %rsi      # 0x7182
callq 0x1414
movb (%rbx), %r13b
movb (%r12), %bpl
callq 0x25d4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4f90
movq %r15, %rdi
movq %r14, %rsi
callq 0x261a
cmpb %r13b, (%r12)
jne 0x45f4
cmpb %bpl, (%rbx)
jne 0x4613
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ac4(%rip), %rdi      # 0x70bf
leaq 0x1a25(%rip), %rsi      # 0x6027
leaq 0x2b8e(%rip), %rcx      # 0x7197
movl $0x165, %edx            # imm = 0x165
callq 0x10a0
leaq 0x2b46(%rip), %rdi      # 0x7160
leaq 0x1a06(%rip), %rsi      # 0x6027
leaq 0x2b6f(%rip), %rcx      # 0x7197
movl $0x166, %edx            # imm = 0x166
callq 0x10a0
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/./delayed_init.h
// Function: void overload::delayed_init<helper>::assign<helper&>(bool, helper&)
void assign(bool src_is_init, U&& src_obj) {
    if (!is_init_)
      init_me(src_is_init, std::forward<U>(src_obj));
    else if (src_is_init)
      obj_ = std::forward<U>(src_obj);
    else
      destroy();
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x4ae3
leaq 0x4(%rbx), %rdi
testb %sil, %sil
je 0x4af9
movq %rdx, %rsi
popq %rbx
jmp 0x4b04
testb %sil, %sil
je 0x4b01
leaq 0x4(%rbx), %rdi
movq %rdx, %rsi
callq 0x4a76
movb $0x1, (%rbx)
jmp 0x4b01
callq 0x2744
movb $0x0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/cassioneri[P]delayed_init/./delayed_init.h
// Function: overload::delayed_init<helper>::swap(overload::delayed_init<helper>&)
void swap(delayed_init& src)
    noexcept(
      std::is_nothrow_copy_constructible<T>::value &&
      std::is_nothrow_move_constructible<T>::value &&
      traits::is_nothrow_swappable<T>::value
    ) {
    if (is_init_) {
      if (src.is_init_) {
        
        using std::swap;
        swap(obj_, src.obj_);
      }
      else {
        src.init_obj(std::move(obj_));
        destroy();
      }
    }
    else if (src.is_init_) {
      init_obj(std::move(src.obj_));
      src.destroy();
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %al
cmpb $0x1, (%rdi)
jne 0x4fbb
leaq 0x4(%r14), %r15
leaq 0x4(%rbx), %rsi
testb %al, %al
je 0x4fe5
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x13ac
testb %al, %al
je 0x5005
leaq 0x4(%rbx), %r15
leaq 0x4(%r14), %rdi
movq %r15, %rsi
callq 0x4a24
movb $0x1, (%r14)
cmpb $0x1, (%rbx)
jne 0x4fe0
movq %r15, %rdi
callq 0x2744
movb $0x0, (%rbx)
jmp 0x5005
movq %rsi, %rdi
movq %r15, %rsi
callq 0x4a24
movb $0x1, (%rbx)
cmpb $0x1, (%r14)
jne 0x5001
movq %r15, %rdi
callq 0x2744
movb $0x0, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/server/Server.cpp
// Function: Server::setup(int)
void Server::setup(int port)
{
    mastersocket_fd = socket(AF_INET, SOCK_STREAM, 0);
    if (mastersocket_fd < 0) {
        perror("Socket creation failed");
    }

    FD_ZERO(&masterfds);
    FD_ZERO(&tempfds);

    memset(&servaddr, 0, sizeof (servaddr)); //bzero
    servaddr.sin_family = AF_INET;
    servaddr.sin_addr.s_addr = htons(INADDR_ANY);
    servaddr.sin_port = htons(port);

    bzero(input_buffer,INPUT_BUFFER_SIZE); //zero the input buffer before use to avoid random data appearing in first receives
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2080
movl %eax, 0x10c(%rbx)
testl %eax, %eax
js 0x2716
leaq 0x8(%rbx), %rdi
movq $0x0, 0x1a0(%rbx)
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x2140
movw $0x2, 0x198(%rbx)
movl %r14d, 0x19c(%rbx)
rolw $0x8, %bp
movw %bp, 0x19a(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1a8(%rbx)
movups %xmm0, 0x1b8(%rbx)
movups %xmm0, 0x1c8(%rbx)
movups %xmm0, 0x1d8(%rbx)
movups %xmm0, 0x1e8(%rbx)
movups %xmm0, 0x1f8(%rbx)
movl %r14d, 0x208(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x18e7(%rip), %rdi      # 0x4004
callq 0x21a0
jmp 0x26a7
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/server/Server.cpp
// Function: Server::initializeSocket()
void Server::initializeSocket()
{
	#ifdef SERVER_DEBUG
	std::cout << "[SERVER] initializing socket\n";
	#endif
	int opt_value = 1;
	int ret_test = setsockopt(mastersocket_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &opt_value, sizeof (int));
	#ifdef SERVER_DEBUG
	printf("[SERVER] setsockopt() ret %d\n", ret_test);
    	#endif
	if (ret_test < 0) {
        	perror("[SERVER] [ERROR] setsockopt() failed");
		shutdown();
    	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl 0x10c(%rdi), %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2300
testl %eax, %eax
js 0x27b0
addq $0x10, %rsp
popq %rbx
retq
addq $0x10c, %rbx            # imm = 0x10C
movq %rbx, %rdi
callq 0x2340
jmp 0x27aa
nop
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/server/Server.cpp
// Function: Server::bindSocket()
void Server::bindSocket()
{
	#ifdef SERVER_DEBUG
	std::cout << "[SERVER] binding...\n";
	#endif
	int bind_ret = bind(mastersocket_fd, (struct sockaddr*) &servaddr, sizeof (servaddr));
	#ifdef SERVER_DEBUG
	printf("[SERVER] bind() ret %d\n", bind_ret);
	#endif
	if (bind_ret < 0) {
		perror("[SERVER] [ERROR] bind() failed");
	}
	FD_SET(mastersocket_fd, &masterfds); //insert the master socket file-descriptor into the master fd-set
	maxfd = mastersocket_fd; //set the current known maximum file descriptor count
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x10c(%rdi), %edi
leaq 0x198(%rbx), %rsi
movl $0x10, %edx
callq 0x2060
testl %eax, %eax
js 0x2820
movl 0x10c(%rbx), %eax
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %eax, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
sarl $0x6, %edx
movslq %edx, %rcx
orq %rsi, 0x8(%rbx,%rcx,8)
movw %ax, 0x108(%rbx)
popq %rbx
retq
leaq 0x1819(%rip), %rdi      # 0x4040
callq 0x21a0
jmp 0x27ed
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/server/Server.cpp
// Function: Server::handleNewConnection()
void Server::handleNewConnection()
{
	#ifdef SERVER_DEBUG
  	 std::cout << "[SERVER] [CONNECTION] handling new connection\n";
    	#endif
    	socklen_t addrlen = sizeof (client_addr);
    	tempsocket_fd = accept(mastersocket_fd, (struct sockaddr*) &client_addr, &addrlen);
    	
	if (tempsocket_fd < 0) {
        	perror("[SERVER] [ERROR] accept() failed");
	} else {
        	FD_SET(tempsocket_fd, &masterfds);
		//increment the maximum known file descriptor (select() needs it)
        	if (tempsocket_fd > maxfd) {
            		maxfd = tempsocket_fd;
			#ifdef SERVER_DEBUG
            		std::cout << "[SERVER] incrementing maxfd to " << maxfd << std::endl;
			#endif
        	}
        	#ifdef SERVER_DEBUG
        	printf("[SERVER] [CONNECTION] New connection on socket fd '%d'.\n",tempsocket_fd);
		#endif
    }
    newConnectionCallback(tempsocket_fd); //call the callback
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
movl 0x10c(%rdi), %edi
leaq 0x118(%rbx), %rsi
callq 0x20a0
movl %eax, 0x110(%rbx)
testl %eax, %eax
js 0x28b6
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
movl %eax, %ecx
shrl $0x6, %ecx
orq %rdx, 0x8(%rbx,%rcx,8)
movzwl 0x108(%rbx), %ecx
cmpl %ecx, %eax
jbe 0x28a7
movw %ax, 0x108(%rbx)
movzwl %ax, %edi
callq *0x240(%rbx)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x17c3(%rip), %rdi      # 0x4080
callq 0x21a0
movl 0x110(%rbx), %eax
jmp 0x28a7
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/server/Server.cpp
// Function: Server::recvInputFromExisting(int)
void Server::recvInputFromExisting(int fd)
{
    int nbytesrecv = recv(fd, input_buffer, INPUT_BUFFER_SIZE, 0);
    if (nbytesrecv <= 0)
    {
        //problem
        if (0 == nbytesrecv)
	{
        	disconnectCallback((uint16_t)fd);
		close(fd); //well then, bye bye.
        	FD_CLR(fd, &masterfds);
        	return;
        } else 
	{
        	perror("[SERVER] [ERROR] recv() failed");
        }
        close(fd); //close connection to client
        FD_CLR(fd, &masterfds); //clear the client fd from fd set
        return;
    }
    #ifdef SERVER_DEBUG
    printf("[SERVER] [RECV] Received '%s' from client!\n", input_buffer);
    #endif
    receiveCallback(fd,input_buffer);
    //memset(&input_buffer, 0, INPUT_BUFFER_SIZE); //zero buffer //bzero
    bzero(&input_buffer,INPUT_BUFFER_SIZE); //clear input buffer
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1a8(%rdi), %r15
movl $0x64, %edx
movl %esi, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x20b0
testl %eax, %eax
jle 0x2928
movzwl %r14w, %edi
movq %r15, %rsi
callq *0x248(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r15)
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
movl $0x0, 0x60(%r15)
jmp 0x295f
jne 0x2965
movzwl %r14w, %edi
callq *0x250(%rbx)
movl %r14d, %edi
callq 0x2320
movq $-0x2, %rax
movl %r14d, %ecx
rolq %cl, %rax
leal 0x3f(%r14), %ecx
testl %r14d, %r14d
cmovnsl %r14d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
andq %rax, 0x8(%rbx,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2359
jmp 0x295f
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/server/Server.cpp
// Function: Server::loop()
void Server::loop()
{
    tempfds = masterfds; //copy fd_set for select()
    #ifdef SERVER_DEBUG
    printf("[SERVER] [MISC] max fd = '%hu' \n", maxfd);
    std::cout << "[SERVER] [MISC] calling select()\n";
    #endif
    int sel = select(maxfd + 1, &tempfds, NULL, NULL, NULL); //blocks until activity
    //printf("[SERVER] [MISC] select() ret %d, processing...\n", sel);
    if (sel < 0) {
        perror("[SERVER] [ERROR] select() failed");
        shutdown();
    }

    //no problems, we're all set

    //loop the fd_set and check which socket has interactions available
    for (int i = 0; i <= maxfd; i++) {
        if (FD_ISSET(i, &tempfds)) { //if the socket has activity pending
            if (mastersocket_fd == i) {
                //new connection on master socket
                handleNewConnection();
            } else {
                //exisiting connection has new data
                recvInputFromExisting(i);
            }
        } //loop on to see if there is more
    }


}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq 0x88(%rdi), %r14
movl $0x10, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movzwl 0x108(%rbx), %edi
incl %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x21c0
testl %eax, %eax
js 0x29f5
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
incl %r15d
movl %r15d, %eax
shrl $0x6, %eax
movq (%r14,%rax,8), %rax
btq %r15, %rax
jae 0x29e3
cmpl 0x10c(%rbx), %r15d
jne 0x29d8
movq %rbx, %rdi
callq 0x2852
jmp 0x29e3
movq %rbx, %rdi
movl %r15d, %esi
callq 0x28ca
movzwl 0x108(%rbx), %eax
cmpl %eax, %r15d
jb 0x29b2
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2392
jmp 0x29ac
nop
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/controller/actions.cpp
// Function: Actions::testAction(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
void Actions::testAction(vector<string> *vals)
{
	cout << "TestAction: argument count: " << vals->size() << endl;
	uint8_t n = 0;
	for(string i : *vals)
	{
		printf("TestAction: argument no '%hu' = '%s'\n", n, i.c_str());
		++n;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x452c(%rip), %r14      # 0x6fd0
leaq 0x163e(%rip), %rsi      # 0x40e9
movl $0x1c, %edx
movq %r14, %rdi
callq 0x2220
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x5, %rsi
movq %r14, %rdi
callq 0x2150
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2160
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x2b61
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
leaq 0x8(%rsp), %rbx
leaq 0x15f2(%rip), %r14      # 0x4106
movq %r13, 0x8(%rsp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2b70
movzbl %bpl, %esi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2b55
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x20, %r15
incb %bpl
cmpq %r12, %r15
jne 0x2b14
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/main.cpp
// Function: main
int main(int argc, char **argv)
{
	//add controller actions
	attachActions();
	//set server callbacks
	server.onConnect(&Controller::handleServerConnection);
	server.onDisconnect(&Controller::handleServerDisconnect);
	server.onInput(&Controller::handleServerInput);
	server.init();
	
	//actual main loop
	while(true)
	{
		server.loop();
	}
}

// Assembly:
pushq %rbx
callq 0x34e8
leaq 0x3ca8(%rip), %rbx      # 0x7218
leaq -0x96f(%rip), %rsi      # 0x2c08
movq %rbx, %rdi
callq 0x2a22
leaq -0x922(%rip), %rsi      # 0x2c64
movq %rbx, %rdi
callq 0x2a2a
leaq -0x8d5(%rip), %rsi      # 0x2cc0
movq %rbx, %rdi
callq 0x2a1a
movq %rbx, %rdi
callq 0x2a00
movq %rbx, %rdi
callq 0x2972
jmp 0x35a5
nop
// File: /workspace/github_cpp_makefile_star2_O3/Gydo194[P]server/parser/parser.cpp
// Function: Parser::parse(char const*)
void Parser::parse(const char *buffer)
{
	string in = buffer;
	istringstream iss(in);

	string sub;
	while(iss >> sub)
	{
		values.push_back(sub);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x378a
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x22d0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x48(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2240
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x36cb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37c8
jmp 0x36a5
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x36e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x38df(%rip), %rsi      # 0x6fc8
leaq 0x48(%rsp), %rdi
callq 0x2260
leaq 0xc0(%rsp), %rdi
callq 0x20c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x371b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x3767
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3749
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x3878(%rip), %rsi      # 0x6fc8
leaq 0x48(%rsp), %rdi
callq 0x2260
leaq 0xc0(%rsp), %rdi
callq 0x20c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3782
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]cxx-invert-file-tree/inverter.cpp
// Function: main
int main(int argc, char **argv)
{
    if (argc < 2) {
        usage(std::cerr);
        std::cerr << "ERROR: folder path is not provided" << std::endl;
        return 1;
    }

    fs::path folder_path(argv[1]);
    invert_folder(folder_path);

    return 0;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
cmpl $0x1, %edi
jg 0x2f3c
movq 0x30fe(%rip), %rbx      # 0x5ff0
movq %rbx, %rdi
callq 0x279c
leaq 0x112b(%rip), %rsi      # 0x402c
movl $0x22, %edx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0x1, %eax
jmp 0x2f66
addq $0x8, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %edx
callq 0x31e6
movq %rbx, %rdi
callq 0x2bdc
leaq 0x8(%rsp), %rdi
callq 0x305e
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x305e
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/config_json_impl.hpp
// Function: AutoJson::Json::operator ProcessConfig::DiskQuota<ProcessConfig::DiskQuota>()
AutoJson::Json::operator ::ProcessConfig::DiskQuota() {
	::ProcessConfig::DiskQuota obj;
	obj.blockQuota = (*this)["blockQuota"].Get<int>();
	obj.inodeQuota = (*this)["inodeQuota"].Get<int>();
	return obj;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2a27a(%rip), %rsi     # 0x5525d
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a3fa
movl %eax, %ebp
leaq 0x2a26f(%rip), %rsi     # 0x55268
movq %rbx, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a3fa
shlq $0x20, %rax
movl %ebp, %ecx
orq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/config_json_impl.hpp
// Function: AutoJson::Json::operator ProcessConfig::Environment<ProcessConfig::Environment>()
AutoJson::Json::operator ::ProcessConfig::Environment() {
	::ProcessConfig::Environment obj;
	obj.useDefaultRules = (*this)["useDefaultRules"].Get<int>();
	obj.passEnvironment = (*this)["passEnvironment"].Get<int>();
	obj.rules = (*this)["rules"].Get<vector<string>>();
	return obj;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq $0x1, (%rdi)
leaq 0x2a109(%rip), %rsi     # 0x55273
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a3fa
movl %eax, (%rbx)
leaq 0x2a100(%rip), %rsi     # 0x55283
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a3fa
movl %eax, 0x4(%rbx)
leaq 0x2a0f6(%rip), %rsi     # 0x55293
movq %r14, %rdi
callq 0x2ae2c
movq %rsp, %rdi
movq %rax, %rsi
callq 0x47c1a
movq %rsp, %r14
movaps (%r14), %xmm0
movups %xmm0, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x18(%rbx)
xorl %eax, %eax
leaq 0x20(%rsp), %rdi
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movaps %xmm0, (%r14)
movq %rax, 0x10(%r14)
callq 0x36100
movq %r14, %rdi
callq 0x36100
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
jmp 0x2b1f6
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x36100
movq %r14, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/config_json_impl.hpp
// Function: AutoJson::Json::operator ProcessConfig::FilePermissions<ProcessConfig::FilePermissions>()
AutoJson::Json::operator ::ProcessConfig::FilePermissions() {
	::ProcessConfig::FilePermissions obj;
	obj.rules = (*this)["rules"].Get<vector<string>>();
	obj.fullPermissionsOverFolder = (*this)["fullPermissionsOverFolder"].Get<int>();
	return obj;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x1, 0x18(%rdi)
leaq 0x29f7a(%rip), %rsi     # 0x55293
movq %r14, %rdi
callq 0x2ae2c
movq %rsp, %rdi
movq %rax, %rsi
callq 0x47c1a
movq %rsp, %r15
movaps (%r15), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
leaq 0x20(%rsp), %rdi
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movaps %xmm0, (%r15)
movq %rax, 0x10(%r15)
callq 0x36100
movq %r15, %rdi
callq 0x36100
leaq 0x29f2e(%rip), %rsi     # 0x55299
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a3fa
movl %eax, 0x18(%rbx)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2b38d
movq %rax, %r14
movq %rbx, %rdi
callq 0x36100
movq %r14, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/runstats_json_impl.hpp
// Function: AutoJson::Json::Json<RunStats::TimeStat>(RunStats::TimeStat const&)
AutoJson::Json::Json(const ::RunStats::TimeStat& rhs) : type(JsonType::OBJECT), content(new std::map<std::string, Json>()) {
	(*this)["wallTimeMs"] = rhs.wallTimeMs;
	(*this)["cpuTimeMs"] = rhs.cpuTimeMs;
	(*this)["userTimeMs"] = rhs.userTimeMs;
	(*this)["systemTimeMs"] = rhs.systemTimeMs;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x4, (%rdi)
movl $0x30, %edi
callq 0x27470
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0x8(%rbx)
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x361b8
leaq 0x27e67(%rip), %rsi     # 0x55564
movq %rbx, %rdi
callq 0x2ae2c
leaq 0x8(%rsp), %rdi
movl (%rdi), %ecx
movl %ecx, (%rax)
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x8(%rdi)
movl $0x0, (%rdi)
callq 0x28a2c
movq 0x8(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x361b8
leaq 0x27e31(%rip), %rsi     # 0x5556f
movq %rbx, %rdi
callq 0x2ae2c
leaq 0x8(%rsp), %rdi
movl (%rdi), %ecx
movl %ecx, (%rax)
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x8(%rdi)
movl $0x0, (%rdi)
callq 0x28a2c
movq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x361b8
leaq 0x27dfa(%rip), %rsi     # 0x55579
movq %rbx, %rdi
callq 0x2ae2c
leaq 0x8(%rsp), %rdi
movl (%rdi), %ecx
movl %ecx, (%rax)
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x8(%rdi)
movl $0x0, (%rdi)
callq 0x28a2c
movq 0x18(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x361b8
leaq 0x27dc4(%rip), %rsi     # 0x55584
movq %rbx, %rdi
callq 0x2ae2c
leaq 0x8(%rsp), %rdi
movl (%rdi), %ecx
movl %ecx, (%rax)
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x8(%rdi)
movl $0x0, (%rdi)
callq 0x28a2c
addq $0x18, %rsp
popq %rbx
popq %r14
retq
jmp 0x2d7fa
jmp 0x2d7fa
jmp 0x2d7fa
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x28a2c
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/runstats_json_impl.hpp
// Function: AutoJson::Json::operator RunStats::TimeStat<RunStats::TimeStat>()
AutoJson::Json::operator ::RunStats::TimeStat() {
	::RunStats::TimeStat obj;
	obj.wallTimeMs = (*this)["wallTimeMs"].Get<unsigned long long>();
	obj.cpuTimeMs = (*this)["cpuTimeMs"].Get<unsigned long long>();
	obj.userTimeMs = (*this)["userTimeMs"].Get<unsigned long long>();
	obj.systemTimeMs = (*this)["systemTimeMs"].Get<unsigned long long>();
	return obj;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x27d43(%rip), %rsi     # 0x55564
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a81a
movq %rax, (%rbx)
leaq 0x27d34(%rip), %rsi     # 0x5556f
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a81a
movq %rax, 0x8(%rbx)
leaq 0x27d23(%rip), %rsi     # 0x55579
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a81a
movq %rax, 0x10(%rbx)
leaq 0x27d13(%rip), %rsi     # 0x55584
movq %r14, %rdi
callq 0x2ae2c
movq %rax, %rdi
callq 0x2a81a
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessKeeper::ProcessKeeper(ProcessConfig, int, int*)
ProcessKeeper::ProcessKeeper(ProcessConfig config, int processPid, int errorPipes[2]) : processStats() {
    this->config = config;
    this->processPid = processPid;
    this->errorPipes[0] = errorPipes[0];
    this->errorPipes[1] = errorPipes[1];
    processKeeper = this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x362e0
leaq 0x178(%rbx), %rdi
xorl %esi, %esi
callq 0x36986
leaq 0x198(%rbx), %rdi
callq 0x3688e
movups (%r15), %xmm0
movups %xmm0, (%rbx)
leaq 0x10(%rbx), %rdi
leaq 0x10(%r15), %rsi
callq 0x27260
movq 0x50(%r15), %rax
movq %rax, 0x50(%rbx)
movups 0x30(%r15), %xmm0
movups 0x40(%r15), %xmm1
movups %xmm1, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
leaq 0x58(%rbx), %rdi
leaq 0x58(%r15), %rsi
callq 0x27260
leaq 0x78(%rbx), %rdi
leaq 0x78(%r15), %rsi
callq 0x27260
movl $0x98, %esi
leaq (%rbx,%rsi), %rdi
addq %r15, %rsi
callq 0x27260
movl $0xb8, %esi
leaq (%rbx,%rsi), %rdi
addq %r15, %rsi
callq 0x27260
movq 0xd8(%r15), %rax
movq 0xdd(%r15), %rcx
movq %rcx, 0xdd(%rbx)
movq %rax, 0xd8(%rbx)
movl $0xe8, %esi
leaq (%rbx,%rsi), %rdi
addq %r15, %rsi
callq 0x27260
movq 0x108(%r15), %rax
movq %rax, 0x108(%rbx)
movl $0x110, %esi            # imm = 0x110
leaq (%rbx,%rsi), %rdi
addq %r15, %rsi
callq 0x39034
movl $0x128, %esi            # imm = 0x128
leaq (%rbx,%rsi), %rdi
addq %r15, %rsi
callq 0x393ae
movq 0x140(%r15), %rax
movq %rax, 0x140(%rbx)
movl $0x148, %esi            # imm = 0x148
leaq (%rbx,%rsi), %rdi
addq %r15, %rsi
callq 0x39034
movl 0x160(%r15), %eax
movl %eax, 0x160(%rbx)
movl %ebp, 0x168(%rbx)
movl (%r14), %eax
movl %eax, 0x16c(%rbx)
movl 0x4(%r14), %eax
movl %eax, 0x170(%rbx)
movq %rbx, 0x3dad4(%rip)     # 0x6baf0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2e04d
movq %rax, %r14
movq 0x200(%rbx), %rdi
leaq 0x210(%rbx), %rax
cmpq %rax, %rdi
je 0x2e04d
movq (%rax), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x38890
movq %r14, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessKeeper::alarmSignalHandler(int)
void ProcessKeeper::alarmSignalHandler(int UNUSED signum) {
    /// signal callback must be static method / function
    /// it calls the processKeeper pointer which is set up in
    /// initProcessKeeper function
    RunStats::ResultCode status = processKeeper->checkLimits();
    if (status != RunStats::OK) {
        processKeeper->killProcess(status);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x3da80(%rip), %rdi     # 0x6baf0
callq 0x369c6
cmpl $0x1, %eax
je 0x2e0c8
movl %eax, %ebx
movq 0x3da6d(%rip), %r14     # 0x6baf0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x270f4(%rip), %rdx     # 0x55188
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x42cf8
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x36a4a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e0c8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e0ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::ASyncStart(void*)
int ProcessInitialiser::ASyncStart(void* args) {
    ProcessInitialiser* initialiser = (ProcessInitialiser*)args;
    initialiser->setupSystem();

    Msg("Provided run command:%s\n", initialiser->config.runCommand.c_str());

    char** processArgs = Base::StringToCharSS(Base::ParseCommandLine(initialiser->config.runCommand));
    auto environment = Rules::Environment(initialiser->config.environment);
    char** env = environment.getEnvironment();

    /// child process inherits everything from parent
    /// * opened std{in,out,err}
    /// * cpu, mem, disk, network limits
    /// * cgroup id (associated with limits)
    /// * pwd, relative root
    /// all these limitations can't be enlarged, only reduced/shrinked

    char** c = processArgs;
    while (*c != nullptr) {
        Msg("Run command:\t%s\n", *c);
        c++;
    }

    execvpe(processArgs[0], processArgs, env);
    Die("execvpe(%s): %m", processArgs[0]);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
callq 0x36b94
leaq 0xe8(%r14), %rbx
movq 0xe8(%r14), %rsi
leaq 0x274c6(%rip), %rdi     # 0x55664
xorl %eax, %eax
callq 0x2ceee
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2c0d0
movq %r15, %rdi
callq 0x2c29f
movq %rax, %rbx
movq %r15, %rdi
callq 0x36100
addq $0x108, %r14            # imm = 0x108
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x36c0e
movq %r15, %rdi
callq 0x36d94
movq %rax, %r14
movq (%rbx), %r15
testq %r15, %r15
je 0x2e21a
movq %rbx, %r13
addq $0x8, %r13
leaq 0x2747d(%rip), %r12     # 0x5567d
movq %r15, %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x2ceee
movq (%r13), %rsi
addq $0x8, %r13
testq %rsi, %rsi
jne 0x2e203
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x27920
movq (%rbx), %rsi
leaq 0x2745c(%rip), %rdi     # 0x5568e
xorl %eax, %eax
callq 0x2cd4f
jmp 0x2e23d
jmp 0x2e23d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3ecce
movq %rbx, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/bin.cpp
// Function: CopyArguments(int, char**)
char** CopyArguments(int argc, char** argv) {
    char** new_argv = (char**)malloc((argc + 1) * sizeof(char*));
    new_argv[argc] = nullptr;
    for (int i = 0; i < argc; i += 1) {
        int len = strlen(argv[i]);
        char* txt = (char*)malloc(len * sizeof(char));
        for (int j = 0; j < len; j += 1) {
            txt[j] = argv[i][j];
        }
        txt[len] = '\0';
        new_argv[i] = txt;
    }

    return new_argv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movl %edi, %ebp
movslq %edi, %rbx
leaq 0x8(,%rbx,8), %rdi
callq 0x27620
movq %rax, %r14
movq $0x0, (%rax,%rbx,8)
testl %ebx, %ebx
jle 0x2e2d2
movl %ebp, %ebp
xorl %ebx, %ebx
movq (%rsp), %rax
movq (%rax,%rbx,8), %r15
movq %r15, %rdi
callq 0x271e0
movq %rax, %r12
movslq %r12d, %r13
movq %r13, %rdi
callq 0x27620
testl %r13d, %r13d
jle 0x2e2c1
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movb (%r15,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
cmpq %rcx, %r12
jne 0x2e2b2
movb $0x0, (%rax,%r13)
movq %rax, (%r14,%rbx,8)
incq %rbx
cmpq %rbp, %rbx
jne 0x2e286
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/bin.cpp
// Function: DeleteArgumentsCopy(char**)
void DeleteArgumentsCopy(char** argv) {
    char** start = argv;
    while (*argv != nullptr) {
        delete *argv;
        argv++;
    }

    delete start;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2e30d
leaq 0x8(%rbx), %r14
movl $0x1, %esi
callq 0x27480
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x2e2f7
movl $0x8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x27480
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/bin.cpp
// Function: main
int main(int argc, char** argv) {
    DieLogToFile("/eval/isolate.log");

    auto config = ParseCommandLineArguments(argc, argv);

    if (config.mode == ProcessConfig::kUnspecified) {
        Die("Please specify an isolate command (e.g. --init, --run).");
    }

    if (geteuid()) {
        Die("Must be started as root");
    }

    if (config.mode == ProcessConfig::kRun) {
        if (config.runCommand == "") {
            Die("--run mode requires a command to run");
        }
    }
    if (config.mode != ProcessConfig::kInit && config.mode != ProcessConfig::kRun &&
        config.mode != ProcessConfig::kCleanup) {
        Die("Internal error: mode mismatch");
    }

    Jailer jailer(config, argv + optind);  /// share the stack size with the isolated process.);
    jailer.Start();

    exit(0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x310, %rsp            # imm = 0x310
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2041c(%rip), %rsi     # 0x55ec2
leaq 0x20426(%rip), %rdx     # 0x55ed3
leaq 0x8(%rsp), %rdi
callq 0x42cf8
leaq 0x8(%rsp), %rdi
callq 0x2ce01
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x35ad8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x1a8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x34a8f
cmpl $0x0, (%r14)
jne 0x35afc
leaq 0x203da(%rip), %rdi     # 0x55ed4
jmp 0x35b51
callq 0x272a0
testl %eax, %eax
jne 0x35b32
movl 0x1a8(%rsp), %eax
cmpl $0x2, %eax
jne 0x35b42
leaq 0x290(%rsp), %rdi
leaq 0x1f668(%rip), %rsi     # 0x55188
callq 0x27100
testl %eax, %eax
jne 0x35b3b
leaq 0x203f4(%rip), %rdi     # 0x55f24
jmp 0x35b51
leaq 0x203d3(%rip), %rdi     # 0x55f0c
jmp 0x35b51
movl 0x1a8(%rsp), %eax
addl $-0x4, %eax
cmpl $-0x4, %eax
ja 0x35b58
leaq 0x203f8(%rip), %rdi     # 0x55f49
xorl %eax, %eax
callq 0x2cd4f
movq 0x34431(%rip), %rax     # 0x69f90
movslq (%rax), %rax
leaq (%rbx,%rax,8), %rdx
leaq 0x8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x38960
leaq 0x8(%rsp), %rdi
callq 0x38af0
xorl %edi, %edi
callq 0x27580
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x38b4c
jmp 0x35b9d
jmp 0x35b9a
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x38890
jmp 0x35bcb
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x35bcb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x35bcb
movq %rax, %rbx
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessKeeper::checkLimits()
RunStats::ResultCode checkLimits() {
        if (config.cpuTimeLimitMs && getProcTimeMs() >= config.cpuTimeLimitMs + config.extraTimeMs) {
            return RunStats::TIME_LIMIT_EXCEEDED;
        }

        if (config.wallTimeLimitMs && getWallTimeMs() >= config.wallTimeLimitMs + config.extraTimeMs) {
            return RunStats::WALL_TIME_LIMIT_EXCEEDED;
        }

        if (config.memoryLimitKB && getMemoryKB() >= config.memoryLimitKB) {
            return RunStats::MEMORY_LIMIT_EXCEEDED;
        }

        return RunStats::OK;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x30(%rdi)
je 0x36a00
leaq 0x340f0(%rip), %rdi     # 0x6aac8
callq 0x39852
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
mulq %rcx
shrq $0x12, %rdx
movq 0x40(%rbx), %rcx
addq 0x30(%rbx), %rcx
movl $0x3, %eax
cmpq %rcx, %rdx
jae 0x36a48
cmpq $0x0, 0x38(%rbx)
je 0x36a24
movq %rbx, %rdi
callq 0x397de
movq %rax, %rcx
movq 0x40(%rbx), %rdx
addq 0x38(%rbx), %rdx
movl $0x4, %eax
cmpq %rdx, %rcx
jae 0x36a48
cmpl $0x0, 0x50(%rbx)
je 0x36a43
leaq 0x34097(%rip), %rdi     # 0x6aac8
callq 0x3a6c8
movq %rax, %rcx
movl $0x5, %eax
cmpl %ecx, 0x50(%rbx)
jle 0x36a48
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessKeeper::killProcess(RunStats::ResultCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void killProcess(RunStats::ResultCode killReason, string internalMessage = "") {
        clearTimer();

        kill(-processPid, SIGKILL);
        kill(processPid, SIGKILL);

        struct rusage rus;
        int p, stat;

        do {
            p = wait4(processPid, &stat, 0, &rus);
        } while (p < 0 && errno == EINTR);

        processStats.processWasKilled = true;
        processStats.update(killReason);
        processStats.update(rus);
        processStats.exitCode = 0;
        processStats.internalMessage = internalMessage;

        updateStats();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x3a956
subl 0x168(%rbx), %r15d
movl %r15d, %edi
movl $0x9, %esi
callq 0x276a0
movl 0x168(%rbx), %edi
movl $0x9, %esi
callq 0x276a0
leaq 0xc(%rsp), %r15
leaq 0x10(%rsp), %r12
movl 0x168(%rbx), %edi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x27280
testl %eax, %eax
jns 0x36aba
callq 0x27050
cmpl $0x4, (%rax)
je 0x36a99
movb $0x1, 0x1f8(%rbx)
testl %ebp, %ebp
je 0x36acb
movl %ebp, 0x1fc(%rbx)
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x36adc
movq %rax, 0x1c0(%rbx)
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x36af0
movq %rax, 0x1c8(%rbx)
movq 0x98(%rsp), %rax
testq %rax, %rax
je 0x36b04
movq %rax, 0x1d0(%rbx)
movl $0x0, 0x1f4(%rbx)
leaq 0x200(%rbx), %rdi
movq %r14, %rsi
callq 0x27260
movq %rbx, %rdi
callq 0x3a8ca
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::setupSystem()
void setupSystem() {
        Base::die_fd = errorPipes[1];
        close(errorPipes[0]);

        cg.enter();
        setupRoot();
        setupPipes();
        setupFilePermissions();
        setupRlimits();
        setupCredentials();

        /// changes dir before executin to dir provided from flag / set dir
        if (config.execDirectory.size() && chdir(config.execDirectory.c_str())) {
            Die("chdir: %m");
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x174(%rdi), %eax
movl %eax, 0x33920(%rip)     # 0x6a4c4
movl 0x170(%rdi), %edi
callq 0x27930
leaq 0x33f12(%rip), %rdi     # 0x6aac8
callq 0x3ab52
movq %rbx, %rdi
callq 0x3b112
movq %rbx, %rdi
callq 0x3b30e
movq %rbx, %rdi
callq 0x3b422
movq %rbx, %rdi
callq 0x3b476
movq %rbx, %rdi
callq 0x3b4f8
cmpq $0x0, 0xc0(%rbx)
je 0x36bfd
movq 0xb8(%rbx), %rdi
callq 0x27700
testl %eax, %eax
jne 0x36bff
popq %rbx
retq
leaq 0x1f4af(%rip), %rdi     # 0x560b5
xorl %eax, %eax
callq 0x2cd4f
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::Environment::Environment(ProcessConfig::Environment const&)
Environment(const ProcessConfig::Environment& config)
                : allRules({}) {
            this->passEnvironment = config.passEnvironment;

            for (int itr = 0; environ[itr]; itr += 1) {
                auto rule = getRule(environ[itr]);
                allRules[rule.first] = rule.second;
            }

            addDefaultRules();

            for (const auto& rule : config.rules) {
                addRule(rule);
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x38(%rsp), %rcx
leaq 0x18(%rsp), %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3e95a
movq %r15, 0x10(%rsp)
movl 0x4(%r15), %eax
movl %eax, (%r14)
movq 0x33359(%rip), %rax     # 0x69fa8
movq (%rax), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x36d13
movl $0x8, %r12d
leaq 0x18(%rsp), %r13
leaq 0xf(%rsp), %rbp
leaq 0x38(%rsp), %r15
movq %r13, %rdi
movq %rbp, %rdx
callq 0x35bd4
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3e9dc
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x36ca8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3eaf6
movq %rax, %rdi
leaq 0x58(%rsp), %rsi
callq 0x27260
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x36cdc
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x36cf8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x332a9(%rip), %rax     # 0x69fa8
movq (%rax), %rax
movq (%rax,%r12), %rsi
addq $0x8, %r12
testq %rsi, %rsi
jne 0x36c73
movq %r14, %rdi
callq 0x3eba8
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r15
movq 0x10(%rax), %r12
cmpq %r12, %r15
je 0x36d3e
movq %r14, %rdi
movq %r15, %rsi
callq 0x3ec22
addq $0x20, %r15
jmp 0x36d28
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36d72
jmp 0x36d72
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x36d84
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x36d84
movq %rax, %r14
jmp 0x36d84
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x3eb72
movq %rbx, %rdi
callq 0x3ecce
movq %r14, %rdi
callq 0x27830