LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: aaronpuchert[P]throttle/src/conf.cpp
// Function: CommQueue::processCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CommQueue::processCommand(const std::string &comm)
{
	std::istringstream stream(comm);

	std::string command;
	stream >> command;

	if (command == "min") {
		int temp;
		stream >> temp;
		Throt->setMinTemp(temp);
		DEBUG_PRINT("[CommQueue] Set minimum temperature to " << temp);
	}
	else if (command == "max") {
		int temp;
		stream >> temp;
		Throt->setMaxTemp(temp);
		DEBUG_PRINT("[CommQueue] Set maximum temperature to " << temp);
	}
	else if (command == "freq") {
		int freq;
		stream >> freq;
		Throt->setOverrideFreq(freq);
		DEBUG_PRINT("[CommQueue] Set frequency to " << freq);
	}
	else if (command == "reset") {
		Throt->setOverrideFreq(0);
		DEBUG_PRINT("[CommQueue] Reset mechanism");
	}
	else {
		DEBUG_PRINT("[CommQueue] Ignored unknown command: " << command);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
movl $0x8, %edx
callq 0x33f0
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x3340
movq -0x1d8(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
callq 0x3320
jmp 0x8032
leaq 0x203b(%rip), %rsi      # 0xa074
leaq -0x1b0(%rbp), %rdi
callq 0x87a0
movb %al, -0x1e1(%rbp)
jmp 0x804d
movb -0x1e1(%rbp), %al
testb $0x1, %al
jne 0x8059
jmp 0x80b9
leaq -0x190(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3180
jmp 0x806e
movq -0x1e0(%rbp), %rax
movq (%rax), %rdi
movl -0x1c0(%rbp), %esi
callq 0x4980
jmp 0x8085
jmp 0x81aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3120
jmp 0x81cb
leaq 0x1fbd(%rip), %rsi      # 0xa07d
leaq -0x1b0(%rbp), %rdi
callq 0x87a0
movb %al, -0x1e2(%rbp)
jmp 0x80d4
movb -0x1e2(%rbp), %al
testb $0x1, %al
jne 0x80e0
jmp 0x8111
leaq -0x190(%rbp), %rdi
leaq -0x1c4(%rbp), %rsi
callq 0x3180
jmp 0x80f5
movq -0x1e0(%rbp), %rax
movq (%rax), %rdi
movl -0x1c4(%rbp), %esi
callq 0x49a0
jmp 0x810c
jmp 0x81a8
leaq 0x2038(%rip), %rsi      # 0xa150
leaq -0x1b0(%rbp), %rdi
callq 0x87a0
movb %al, -0x1e3(%rbp)
jmp 0x812c
movb -0x1e3(%rbp), %al
testb $0x1, %al
jne 0x8138
jmp 0x8166
leaq -0x190(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x3180
jmp 0x814d
movq -0x1e0(%rbp), %rax
movq (%rax), %rdi
movl -0x1c8(%rbp), %esi
callq 0x87d0
jmp 0x8164
jmp 0x81a6
leaq 0x1fe8(%rip), %rsi      # 0xa155
leaq -0x1b0(%rbp), %rdi
callq 0x87a0
movb %al, -0x1e4(%rbp)
jmp 0x8181
movb -0x1e4(%rbp), %al
testb $0x1, %al
jne 0x818d
jmp 0x81a2
movq -0x1e0(%rbp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x87d0
jmp 0x81a0
jmp 0x81a4
jmp 0x81a4
jmp 0x81a6
jmp 0x81a8
jmp 0x81aa
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x190(%rbp), %rdi
callq 0x3120
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1b8(%rbp), %rdi
callq 0x3420
nopw (%rax,%rax)
// File: shancheng[P]shancheng/db/sqlite_busyhandler_test.cpp
// Function: (anonymous namespace)::Option::Print(std::ostream&)
void Print(ostream& os) {
    os << "Options: \n";
    os << "-----------------------------------------------------------------\n";
    os << "Thread count: " << threadcount << "\n";
    os << "Busy timeout: " << busytimeout << "\n";
    os << "Debug mode: " << debug << "\n";
    os << "\n";
  }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
leaq 0x1589a(%rip), %rsi     # 0x200fd
callq 0x9460
movq 0x8(%rsp), %rdi
leaq 0x15894(%rip), %rsi     # 0x20108
callq 0x9460
movq 0x8(%rsp), %rdi
leaq 0x158c6(%rip), %rsi     # 0x2014b
callq 0x9460
movq %rax, %rdi
movq (%rsp), %rax
movq (%rax), %rsi
callq 0x90e0
movq %rax, %rdi
leaq 0x15863(%rip), %rsi     # 0x20106
callq 0x9460
movq 0x8(%rsp), %rdi
leaq 0x158a6(%rip), %rsi     # 0x2015a
callq 0x9460
movq %rax, %rdi
movq (%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x90e0
movq %rax, %rdi
leaq 0x15833(%rip), %rsi     # 0x20106
callq 0x9460
movq 0x8(%rsp), %rdi
leaq 0x15885(%rip), %rsi     # 0x20169
callq 0x9460
movq %rax, %rdi
movq (%rsp), %rax
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x9860
movq %rax, %rdi
leaq 0x157ff(%rip), %rsi     # 0x20106
callq 0x9460
movq 0x8(%rsp), %rdi
leaq 0x157ee(%rip), %rsi     # 0x20106
callq 0x9460
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: shancheng[P]shancheng/db/sqlite_busyhandler_test.cpp
// Function: (anonymous namespace)::Job::operator()()
void operator()() {
    while (true) {
      int randval = random() % 500 + 500; // 0 - 1000
      usleep(randval * 1000); // 1ms - 1s
      if (ReadTenRecords()) {
        ++total_iocount;
      }
      if (AppendOneRecord()) {
        ++total_iocount;
      }
    }
  }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
callq 0x9210
movl $0x1f4, %ecx            # imm = 0x1F4
cqto
idivq %rcx
addq $0x1f4, %rdx            # imm = 0x1F4
movl %edx, %eax
movl %eax, 0xc(%rsp)
imull $0x3e8, 0xc(%rsp), %edi # imm = 0x3E8
callq 0x96d0
movq (%rsp), %rdi
callq 0xae90
testb $0x1, %al
jne 0xae5a
jmp 0xae69
movl 0x246a0(%rip), %eax     # 0x2f500
addl $0x1, %eax
movl %eax, 0x24697(%rip)     # 0x2f500
movq (%rsp), %rdi
callq 0xb180
testb $0x1, %al
jne 0xae78
jmp 0xae87
movl 0x24682(%rip), %eax     # 0x2f500
addl $0x1, %eax
movl %eax, 0x24679(%rip)     # 0x2f500
jmp 0xae22
nopl (%rax)
// File: shancheng[P]shancheng/db/sqlite_busyhandler_test.cpp
// Function: (anonymous namespace)::Job::Execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool Execute(const string& sql) {
    char* errmsg = NULL;
    while (true) {
      int status = sqlite3_exec(db_, sql.c_str(), NULL, NULL, &errmsg);
      if (status == SQLITE_OK) {
        return true;
      } else if (status == SQLITE_BUSY) {
        ++total_busycount;
        if (option.debug) {
          cerr << "Thread " << threadindex_ << ": failed to execute " << sql << " (" << errmsg << ")\n";
        }
        sqlite3_free(errmsg);
        sleep(1);
      } else {
        cerr << "Thread " << threadindex_ << ": failed to execute " << sql << " (" << errmsg << ")\n";
        sqlite3_free(errmsg);
        return false;
      }
    }
    return false;
  }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x9180
movq (%rsp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq 0x18(%rsp), %r8
movq %rcx, %rdx
callq 0x9630
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0xb325
movb $0x1, 0x37(%rsp)
jmp 0xb44a
cmpl $0x5, 0x14(%rsp)
jne 0xb3c8
movl 0x241ce(%rip), %eax     # 0x2f504
addl $0x1, %eax
movl %eax, 0x241c5(%rip)     # 0x2f504
testb $0x1, 0x2419a(%rip)     # 0x2f4e0
je 0xb3b2
movq 0x23ca1(%rip), %rdi     # 0x2eff0
leaq 0x155dd(%rip), %rsi     # 0x20933
callq 0x9460
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rsi
callq 0x90e0
movq %rax, %rdi
leaq 0x15630(%rip), %rsi     # 0x209a5
callq 0x9460
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x9410
movq %rax, %rdi
leaq 0x155e4(%rip), %rsi     # 0x20975
callq 0x9460
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x9460
movq %rax, %rdi
leaq 0x14d38(%rip), %rsi     # 0x200e5
callq 0x9460
movq 0x18(%rsp), %rdi
callq 0x95b0
movl $0x1, %edi
callq 0x9360
jmp 0xb443
movq 0x23c21(%rip), %rdi     # 0x2eff0
leaq 0x1555d(%rip), %rsi     # 0x20933
callq 0x9460
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rsi
callq 0x90e0
movq %rax, %rdi
leaq 0x155b0(%rip), %rsi     # 0x209a5
callq 0x9460
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x9410
movq %rax, %rdi
leaq 0x15564(%rip), %rsi     # 0x20975
callq 0x9460
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x9460
movq %rax, %rdi
leaq 0x14cb8(%rip), %rsi     # 0x200e5
callq 0x9460
movq 0x18(%rsp), %rdi
callq 0x95b0
movb $0x0, 0x37(%rsp)
jmp 0xb44a
jmp 0xb445
jmp 0xb2e1
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/actor.cpp
// Function: Actor::create(int, int, int, int, int, double)
Actor *Actor::create(int gridsize_x, int gridsize_y, int proc_amt, int proc_num, int total_rounds, double worker_share)
{
    World *world = new World(gridsize_x, gridsize_y, proc_amt, total_rounds, worker_share);
    if (world->is_worker(proc_num))
    {
        return new Worker(world, proc_num);
    }
    else
    {
        return new Writer(world, proc_num);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movl $0x38, %edi
callq 0x85a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movsd -0x28(%rbp), %xmm0
callq 0xfbd0
jmp 0xd9ca
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xff00
testb $0x1, %al
jne 0xd9e4
jmp 0xda4b
movl $0x48, %edi
callq 0x85a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0xdb10
jmp 0xda06
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xda93
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x38, %esi
callq 0x85c0
jmp 0xda9d
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x48, %esi
callq 0x85c0
jmp 0xda9d
movl $0x38, %edi
callq 0x85a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0xe1f0
jmp 0xda6d
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xda93
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x38, %esi
callq 0x85c0
jmp 0xda9d
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x8a40
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::store(int)
void Worker::store(int round)
{
    unsigned char *buffer_compressed = block_send_buffers[round];
    block->compress(buffer_compressed);
    int buffer_size = block->width_byte * block->height;
    int writer_num = world->get_writer_num(round);
    MPI_Isend(buffer_compressed, buffer_size, MPI_UNSIGNED_CHAR, writer_num, round, MPI_COMM_WORLD, &block_send_requests[round]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x28(%rax), %rcx
movslq -0xc(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, -0x18(%rbp)
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xe880
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
movl 0x24(%rcx), %ecx
movq 0x20(%rax), %rdx
imull 0x20(%rdx), %ecx
movl %ecx, -0x1c(%rbp)
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xff60
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %ecx
movl -0xc(%rbp), %r8d
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rdx
shlq $0x3, %rdx
addq %rdx, %rax
movq 0x9165(%rip), %rdx      # 0x16fb8
movq 0x914e(%rip), %r9       # 0x16fa8
movq %rax, (%rsp)
callq 0x8220
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::communicate(int)
void Worker::communicate(int round)
{
    for (int i = Border_direction_first; i <= Border_direction_last; i++)
    {
        Border_direction dir = (Border_direction)i;

        unsigned char *border_send_buffer = border_send_buffers[round][dir];
        MPI_Request *send_request = &border_send_requests[round][dir];
        block->wrap_border(dir, border_send_buffer);
        border_send(dir, border_send_buffer, send_request);
    }

    for (int i = Border_direction_first; i <= Border_direction_last; i++)
    {
        Border_direction dir = (Border_direction)i;

        int border_recv_buffer_size = block->get_border_size(dir);
        unsigned char border_recv_buffer[border_recv_buffer_size];

        border_recv(dir, border_recv_buffer);
        block->unwrap_border(dir, border_recv_buffer);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x7, -0x10(%rbp)
jg 0xdefe
movq -0x50(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, -0x14(%rbp)
movq 0x38(%rax), %rcx
movslq -0xc(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movq %rcx, -0x20(%rbp)
movq 0x40(%rax), %rcx
movslq -0xc(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl -0x14(%rbp), %edx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, -0x28(%rbp)
movq 0x20(%rax), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0xedc0
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xe010
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xde8e
movl $0x0, -0x2c(%rbp)
cmpl $0x7, -0x2c(%rbp)
jg 0xdf7c
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movq 0x20(%rax), %rdi
movl -0x30(%rbp), %esi
callq 0xe980
movq -0x50(%rbp), %rdi
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x40(%rbp)
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x58(%rbp)
movq %rdx, %rsp
movq %rax, -0x48(%rbp)
movl -0x30(%rbp), %esi
callq 0xe090
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rdx
movq 0x20(%rax), %rdi
movl -0x30(%rbp), %esi
callq 0xefb0
movq -0x40(%rbp), %rax
movq %rax, %rsp
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xdf05
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::border_send(Border_direction, unsigned char*, ompi_request_t**)
void Worker::border_send(Border_direction target_dir, unsigned char *buffer, MPI_Request *send_request)
{
    int element_count = block->get_border_size(target_dir);
    int target_block = block->get_neighbor_block_num(target_dir);
    int tag = target_dir;
    MPI_Isend(buffer, element_count, MPI_UNSIGNED_CHAR, target_block, tag, worker_comm, send_request);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x20(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xe980
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, -0x24(%rbp)
movq 0x20(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xe9d0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, -0x28(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movq 0x18(%rax), %r9
movq -0x20(%rbp), %rax
movq 0x8f3c(%rip), %rdx      # 0x16fb8
movq %rax, (%rsp)
callq 0x8220
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::border_recv(Border_direction, unsigned char*)
void Worker::border_recv(Border_direction source_dir, unsigned char *buffer)
{
    int element_count = block->get_border_size(source_dir);
    int source_block = block->get_neighbor_block_num(source_dir);
    int tag = opposite_direction(source_dir);
    MPI_Recv(buffer, element_count, MPI_UNSIGNED_CHAR, source_block, tag, worker_comm, MPI_STATUS_IGNORE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x20(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xe980
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq 0x20(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xe9d0
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %edi
callq 0xe170
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %ecx
movl -0x24(%rbp), %r8d
movq 0x18(%rax), %r9
movq 0x8ebf(%rip), %rdx      # 0x16fb8
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x8480
addq $0x40, %rsp
popq %rbp
retq
nop
// File: Gammelkebab[P]GameOfLife/src/actors/../world/border_direction.h
// Function: opposite_direction(Border_direction)
inline Border_direction opposite_direction(Border_direction dir)
{
    switch (dir)
    {
    case NORTH:
        return SOUTH;
    case SOUTH:
        return NORTH;
    case WEST:
        return EAST;
    case EAST:
        return WEST;
    case NORTH_WEST:
        return SOUTH_EAST;
    case NORTH_EAST:
        return SOUTH_WEST;
    case SOUTH_WEST:
        return NORTH_EAST;
    case SOUTH_EAST:
        return NORTH_WEST;
    default:
        return NORTH;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0x7, %rax
ja 0xe1e0
movq -0x10(%rbp), %rax
leaq 0x2fd9(%rip), %rcx      # 0x11168
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0xe1e7
movl $0x0, -0x4(%rbp)
jmp 0xe1e7
movl $0x2, -0x4(%rbp)
jmp 0xe1e7
movl $0x3, -0x4(%rbp)
jmp 0xe1e7
movl $0x7, -0x4(%rbp)
jmp 0xe1e7
movl $0x6, -0x4(%rbp)
jmp 0xe1e7
movl $0x5, -0x4(%rbp)
jmp 0xe1e7
movl $0x4, -0x4(%rbp)
jmp 0xe1e7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/writer.cpp
// Function: Writer::Writer(World*, int)
Writer::Writer(World *world, int proc_num) : Actor(world, proc_num)
{
    world->set_blocks();

    /* File write buffers */
    file_write_buffers = new char *[world->total_rounds];
    /* File write buffers are created at runtime,
     * since the header and block size can not yet be determined.
     */
    file_write_requests = new MPI_Request[world->total_rounds];

    file_handles = new MPI_File[world->total_rounds];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xd8d0
movq -0x20(%rbp), %rax
leaq 0x8b06(%rip), %rcx      # 0x16d28
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0xfdb0
movq -0x10(%rbp), %rax
movslq 0x28(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x8030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movslq 0x28(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x8030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movslq 0x28(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x8030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/actors/writer.cpp
// Function: Writer::open_file(int)
MPI_File *Writer::open_file(int round)
{
    char filename[100];
    sprintf(filename, "./images/frame_%03d.pbm", round);
    MPI_File *file_handle = &file_handles[round];
    MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_WRONLY | MPI_MODE_CREATE, MPI_INFO_NULL, file_handle);
    return file_handle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x70(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x2b32(%rip), %rsi      # 0x1119a
movb $0x0, %al
callq 0x80e0
movq -0x80(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rsi
movq -0x78(%rbp), %r8
movq 0x8943(%rip), %rdi      # 0x16fd8
movl $0x5, %edx
movq 0x892f(%rip), %rcx      # 0x16fd0
callq 0x8360
movq -0x78(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::randomize()
void Active_block::randomize()
{
    srand(time(NULL) * block_num);
    for (int x = 1; x <= width; x++)
    {
        for (int y = 1; y <= height; y++)
        {

            grid[y][x] = (int)rand() % 100 < 35 ? 1 : 0;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x8510
movq -0x18(%rbp), %rcx
movslq 0x8(%rcx), %rcx
imulq %rcx, %rax
movl %eax, %edi
callq 0x8580
movl $0x1, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jg 0xe873
movl $0x1, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x20(%rcx), %eax
jg 0xe866
callq 0x8150
movl $0x64, %ecx
cltd
idivl %ecx
movq -0x18(%rbp), %rax
movl %edx, %esi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x23, %esi
cmovll %edx, %ecx
movb %cl, %dl
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xe81a
jmp 0xe868
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe807
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::compress(unsigned char*)
void Active_block::compress(unsigned char *buffer)
{
    memset(buffer, 0, width_byte * height);
    for (int grid_y = 1; grid_y <= height; grid_y++)
    {
        for (int grid_x = 1; grid_x <= width; grid_x++)
        {
            /* Information about 8 cells are packed into one byte.
             * If the number of pixels in a row is not divisible by 8, 
             * the remaining bits are left empty.
             */
            if (grid[grid_y][grid_x] == 1)
            {
                int buffer_x = (grid_x - 1) / 8;
                int buffer_y = grid_y - 1;
                int k = (grid_x - 1) % 8;
                int buffer_pos = buffer_y * width_byte + buffer_x;
                buffer[buffer_pos] |= 1 << (7 - k);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl 0x24(%rcx), %eax
imull 0x20(%rcx), %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x82a0
movl $0x1, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x20(%rcx), %eax
jg 0xe974
movl $0x1, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jg 0xe964
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0xe954
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl $0x8, %esi
cltd
idivl %esi
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl $0x8, %esi
cltd
idivl %esi
movl %edx, -0x24(%rbp)
movl -0x20(%rbp), %eax
imull 0x24(%rcx), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x7, %ecx
subl -0x24(%rbp), %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0xe956
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe8cb
jmp 0xe966
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe8b4
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::get_border_size(Border_direction)
int Active_block::get_border_size(Border_direction dir)
{
    if (dir == NORTH || dir == SOUTH)
    {
        return width;
    }
    else if (dir == EAST || dir == WEST)
    {
        return height;
    }
    else
    {
        return 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xe99f
cmpl $0x1, -0x14(%rbp)
jne 0xe9ab
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xe9ca
cmpl $0x2, -0x14(%rbp)
je 0xe9b7
cmpl $0x3, -0x14(%rbp)
jne 0xe9c3
movq -0x20(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xe9ca
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::get_neighbor_block_num(Border_direction)
int Active_block::get_neighbor_block_num(Border_direction dir)
{
    switch (dir)
    {
    case NORTH:
        return north();
    case SOUTH:
        return south();
    case WEST:
        return west();
    case EAST:
        return east();
    case NORTH_WEST:
        return north_west();
    case NORTH_EAST:
        return north_east();
    case SOUTH_WEST:
        return south_west();
    case SOUTH_EAST:
        return south_east();
    default:
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xea7c
movq -0x20(%rbp), %rax
leaq 0x27b9(%rip), %rcx      # 0x111bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
callq 0xea90
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xeaf0
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xeb40
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xeba0
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xebf0
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xec70
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xece0
movl %eax, -0x4(%rbp)
jmp 0xea83
movq -0x28(%rbp), %rdi
callq 0xed50
movl %eax, -0x4(%rbp)
jmp 0xea83
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::north_west()
int Active_block::north_west()
{
    int other_x, other_y;
    if (first_col)
    {
        other_x = world->cols - 1;
    }
    else
    {
        other_x = x - 1;
    }
    if (first_row)
    {
        other_y = world->rows - 1;
    }
    else
    {
        other_y = y - 1;
    }
    return position_to_block_num(other_x, other_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x29(%rax)
je 0xec1c
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xec29
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0xec45
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xec52
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0xf440
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::north_east()
int Active_block::north_east()
{
    int other_x, other_y;
    if (last_col)
    {
        other_x = 0;
    }
    else
    {
        other_x = x + 1;
    }
    if (first_row)
    {
        other_y = world->rows - 1;
    }
    else
    {
        other_y = y - 1;
    }
    return position_to_block_num(other_x, other_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x2b(%rax)
je 0xec93
movl $0x0, -0xc(%rbp)
jmp 0xeca0
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0xecbc
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xecc9
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0xf440
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::south_west()
int Active_block::south_west()
{
    int other_x, other_y;
    if (first_col)
    {
        other_x = world->cols - 1;
    }
    else
    {
        other_x = x - 1;
    }
    if (last_row)
    {
        other_y = 0;
    }
    else
    {
        other_y = y + 1;
    }
    return position_to_block_num(other_x, other_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x29(%rax)
je 0xed0c
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xed19
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x2a(%rax)
je 0xed2c
movl $0x0, -0x10(%rbp)
jmp 0xed39
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0xf440
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::south_east()
int Active_block::south_east()
{
    int other_x, other_y;
    if (last_col)
    {
        other_x = 0;
    }
    else
    {
        other_x = x + 1;
    }
    if (last_row)
    {
        other_y = 0;
    }
    else
    {
        other_y = y + 1;
    }
    return position_to_block_num(other_x, other_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x2b(%rax)
je 0xed73
movl $0x0, -0xc(%rbp)
jmp 0xed80
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x2a(%rax)
je 0xed93
movl $0x0, -0x10(%rbp)
jmp 0xeda0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0xf440
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::wrap_border(Border_direction, unsigned char*)
void Active_block::wrap_border(Border_direction dir, unsigned char *buffer)
{
    switch (dir)
    {
    case NORTH:
        wrap_row(1, buffer);
        break;
    case SOUTH:
        wrap_row(height, buffer);
        break;
    case WEST:
        wrap_col(1, buffer);
        break;
    case EAST:
        wrap_col(width, buffer);
        break;
    case NORTH_WEST:
        wrap_corner(1, 1, buffer);
        break;
    case NORTH_EAST:
        wrap_corner(width, 1, buffer);
        break;
    case SOUTH_WEST:
        wrap_corner(1, height, buffer);
        break;
    case SOUTH_EAST:
        wrap_corner(width, height, buffer);
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xeea6
movq -0x20(%rbp), %rax
leaq 0x23e5(%rip), %rcx      # 0x111dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0xeeb0
jmp 0xeea6
movq -0x28(%rbp), %rdi
movl 0x20(%rdi), %esi
movq -0x18(%rbp), %rdx
callq 0xeeb0
jmp 0xeea6
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0xef10
jmp 0xeea6
movq -0x28(%rbp), %rdi
movl 0x1c(%rdi), %esi
movq -0x18(%rbp), %rdx
callq 0xef10
jmp 0xeea6
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movl %edx, %esi
callq 0xef70
jmp 0xeea6
movq -0x28(%rbp), %rdi
movl 0x1c(%rdi), %esi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0xef70
jmp 0xeea6
movq -0x28(%rbp), %rdi
movl 0x20(%rdi), %edx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0xef70
jmp 0xeea6
movq -0x28(%rbp), %rdi
movl 0x1c(%rdi), %esi
movl 0x20(%rdi), %edx
movq -0x18(%rbp), %rcx
callq 0xef70
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::unwrap_border(Border_direction, unsigned char*)
void Active_block::unwrap_border(Border_direction dir, unsigned char *buffer)
{
    switch (dir)
    {
    case NORTH:
        unwrap_row(0, buffer);
        break;
    case SOUTH:
        unwrap_row(height + 1, buffer);
        break;
    case WEST:
        unwrap_col(0, buffer);
        break;
    case EAST:
        unwrap_col(width + 1, buffer);
        break;
    case NORTH_WEST:
        unwrap_corner(0, 0, buffer);
        break;
    case NORTH_EAST:
        unwrap_corner(width + 1, 0, buffer);
        break;
    case SOUTH_WEST:
        unwrap_corner(0, height + 1, buffer);
        break;
    case SOUTH_EAST:
        unwrap_corner(width + 1, height + 1, buffer);
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xf09c
movq -0x20(%rbp), %rax
leaq 0x2215(%rip), %rcx      # 0x111fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0xf0b0
jmp 0xf09c
movq -0x28(%rbp), %rdi
movl 0x20(%rdi), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rdx
callq 0xf0b0
jmp 0xf09c
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0xf110
jmp 0xf09c
movq -0x28(%rbp), %rdi
movl 0x1c(%rdi), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rdx
callq 0xf110
jmp 0xf09c
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
movl %edx, %esi
callq 0xf170
jmp 0xf09c
movq -0x28(%rbp), %rdi
movl 0x1c(%rdi), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq 0xf170
jmp 0xf09c
movq -0x28(%rbp), %rdi
movl 0x20(%rdi), %edx
addl $0x1, %edx
movq -0x18(%rbp), %rcx
xorl %esi, %esi
callq 0xf170
jmp 0xf09c
movq -0x28(%rbp), %rdi
movl 0x1c(%rdi), %esi
addl $0x1, %esi
movl 0x20(%rdi), %edx
addl $0x1, %edx
movq -0x18(%rbp), %rcx
callq 0xf170
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::step()
void Active_block::step()
{
    for (int y = 1; y <= height; y++)
    {
        for (int x = 1; x <= width; x++)
        {
            int neighbours;
            neighbours = get_neighbors(x, y);
            next_grid[y][x] = is_alive(neighbours, grid[y][x]);
        }
    }

    //swap pointers
    unsigned char **swap = grid;
    grid = next_grid;
    next_grid = swap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0xc(%rbp)
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x20(%rcx), %eax
jg 0xf252
movl $0x1, -0x10(%rbp)
movq -0x28(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jg 0xf242
movq -0x28(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0xf280
movq -0x28(%rbp), %rdi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edx
callq 0xf350
movl %eax, %ecx
movq -0x28(%rbp), %rax
movb %cl, %dl
movq 0x38(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xf1de
jmp 0xf244
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf1cb
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x38(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x38(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::get_neighbors(int, int)
int Active_block::get_neighbors(int pixel_x, int pixel_y)
{
    int sum = 0;
    // Pixels in row above and below
    for (int i = 0; i < 3; ++i)
    {
        sum += grid[pixel_y - 1][pixel_x - 1 + i];
        sum += grid[pixel_y + 1][pixel_x - 1 + i];
    }
    // Pixels left and right
    sum += grid[pixel_y][pixel_x - 1];
    sum += grid[pixel_y][pixel_x + 1];
    return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jge 0xf307
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movl -0x10(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movl -0xc(%rbp), %edx
subl $0x1, %edx
addl -0x18(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, -0x14(%rbp)
movq 0x30(%rax), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf2a4
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movslq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl -0xc(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, -0x14(%rbp)
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
popq %rbp
retq
nop
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::is_alive(int, unsigned char)
int Active_block::is_alive(int neighbours, unsigned char cell)
{
    switch (neighbours)
    {
    case (2):
        return cell;
    case (3):
        return 1;
    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb %al, -0x15(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0x2, %eax
je 0xf377
jmp 0xf36d
movl -0x1c(%rbp), %eax
subl $0x3, %eax
je 0xf380
jmp 0xf389
movzbl -0x15(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf390
movl $0x1, -0x4(%rbp)
jmp 0xf390
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::print()
void Active_block::print()
{
    printf("Active_block:\n{\n");
    printf("\tPosition: \t(%d, %d)\n", x, y);
    printf("\tPixel size: \t%d x %d\n", width, height);
    printf("\tWidth Byte: \t%d\n", width_byte);
    printf("\tPixel start: \t(%d x %d)\n", starting_x, starting_y);
    printf("\tSpecial Info:\n");
    printf("\t{\n");
    printf("\t\tFirst Row: \t%c\n", first_row ? '+' : '0');
    printf("\t\tLast Row: \t%c\n", last_row ? '+' : '0');
    printf("\t\tFirst Col: \t%c\n", first_col ? '+' : '0');
    printf("\t\tLast Col: \t%c\n", last_col ? '+' : '0');
    printf("\t}\n");
    printf("}\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x1d91(%rip), %rdi      # 0x1121c
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl 0x10(%rax), %edx
leaq 0x1d8a(%rip), %rdi      # 0x1122d
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %esi
movl 0x20(%rax), %edx
leaq 0x1d88(%rip), %rdi      # 0x11243
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movl 0x24(%rax), %esi
leaq 0x1d8a(%rip), %rdi      # 0x1125a
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x18(%rax), %edx
leaq 0x1d84(%rip), %rdi      # 0x1126c
movb $0x0, %al
callq 0x8040
leaq 0x1d90(%rip), %rdi      # 0x11286
movb $0x0, %al
callq 0x8040
leaq 0x1d92(%rip), %rdi      # 0x11296
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movb 0x28(%rax), %cl
movb $0x2b, %al
movb $0x30, %dl
movb %dl, -0xa(%rbp)
testb $0x1, %cl
movb %al, -0x9(%rbp)
jne 0xf527
movb -0xa(%rbp), %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
movsbl %al, %esi
leaq 0x1d66(%rip), %rdi      # 0x1129a
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movb 0x2a(%rax), %cl
movb $0x2b, %al
movb $0x30, %dl
movb %dl, -0x1a(%rbp)
testb $0x1, %cl
movb %al, -0x19(%rbp)
jne 0xf557
movb -0x1a(%rbp), %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
movsbl %al, %esi
leaq 0x1d48(%rip), %rdi      # 0x112ac
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movb 0x29(%rax), %cl
movb $0x2b, %al
movb $0x30, %dl
movb %dl, -0x1c(%rbp)
testb $0x1, %cl
movb %al, -0x1b(%rbp)
jne 0xf587
movb -0x1c(%rbp), %al
movb %al, -0x1b(%rbp)
movb -0x1b(%rbp), %al
movsbl %al, %esi
leaq 0x1d29(%rip), %rdi      # 0x112bd
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movb 0x2b(%rax), %cl
movb $0x2b, %al
movb $0x30, %dl
movb %dl, -0x1e(%rbp)
testb $0x1, %cl
movb %al, -0x1d(%rbp)
jne 0xf5b7
movb -0x1e(%rbp), %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
movsbl %al, %esi
leaq 0x1d0b(%rip), %rdi      # 0x112cf
movb $0x0, %al
callq 0x8040
leaq 0x1d0e(%rip), %rdi      # 0x112e0
movb $0x0, %al
callq 0x8040
leaq 0x1d01(%rip), %rdi      # 0x112e1
movb $0x0, %al
callq 0x8040
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: Active_block::print_grid()
void Active_block::print_grid()
{
    // Print the current blocks adress
    printf("Active_block [%d, %d]:\n", x, y);

    // Print all the assigned pixels without the borders
    for (int y = 0; y < height + 2; y++)
    {
        if (y == width + 1)
        {
            printf("\n");
        }
        for (int x = 0; x < width + 2; x++)
        {
            if (x == width + 1)
            {
                printf("\t");
            }
            if (grid[y][x])
            {
                printf("X");
            }
            else
            {
                printf("-");
            }
            if (x == 0)
            {
                printf("\t");
            }
        }
        printf("\n");
        if (y == 0)
        {
            printf("\n");
        }
    }
    printf("\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0xc(%rax), %esi
movl 0x10(%rax), %edx
leaq 0x1cd3(%rip), %rdi      # 0x112e4
movb $0x0, %al
callq 0x8040
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
movl 0x20(%rcx), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0xf718
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
movl 0x1c(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0xf653
leaq 0x1cb7(%rip), %rdi      # 0x11303
movb $0x0, %al
callq 0x8040
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
movl 0x1c(%rcx), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0xf6e6
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
movl 0x1c(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0xf68a
leaq 0x1c79(%rip), %rdi      # 0x112fc
movb $0x0, %al
callq 0x8040
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0xf6b4
leaq 0x1c53(%rip), %rdi      # 0x112fe
movb $0x0, %al
callq 0x8040
jmp 0xf6c2
leaq 0x1c45(%rip), %rdi      # 0x11300
movb $0x0, %al
callq 0x8040
cmpl $0x0, -0x10(%rbp)
jne 0xf6d6
leaq 0x1c2d(%rip), %rdi      # 0x112fc
movb $0x0, %al
callq 0x8040
jmp 0xf6d8
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xf65a
leaq 0x1c16(%rip), %rdi      # 0x11303
movb $0x0, %al
callq 0x8040
cmpl $0x0, -0xc(%rbp)
jne 0xf708
leaq 0x1c02(%rip), %rdi      # 0x11303
movb $0x0, %al
callq 0x8040
jmp 0xf70a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf61f
leaq 0x1be3(%rip), %rdi      # 0x11302
movb $0x0, %al
callq 0x8040
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/active_block.cpp
// Function: print_unsigned_char_array(unsigned char*, int)
void print_unsigned_char_array(unsigned char *arr, int size)
{
    printf("[");
    for (int i = 0; i < size; i++)
    {
        if (i > 0)
        {
            printf(", ");
        }
        printf("%d", arr[i]);
    }
    printf("]\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x1bbf(%rip), %rdi      # 0x11305
movb $0x0, %al
callq 0x8040
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xf795
cmpl $0x0, -0x10(%rbp)
jle 0xf770
leaq 0x1b9e(%rip), %rdi      # 0x11307
movb $0x0, %al
callq 0x8040
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %esi
leaq 0x1b87(%rip), %rdi      # 0x1130a
movb $0x0, %al
callq 0x8040
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xf754
leaq 0x1b71(%rip), %rdi      # 0x1130d
movb $0x0, %al
callq 0x8040
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/../helpers/grid.h
// Function: create_grid(int, int)
inline unsigned char **create_grid(int width, int height)
{
    unsigned char **grid = new unsigned char *[height];
    for (int i = 0; i < height; ++i)
    {
        grid[i] = new unsigned char[width];
    }
    return grid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movslq -0x8(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x8030
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xf819
movslq -0x4(%rbp), %rdi
callq 0x8030
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf7ee
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Gammelkebab[P]GameOfLife/src/world/../helpers/figures.h
// Function: figures::glider(unsigned char**, int, int)
inline void glider(unsigned char **grid, int offset_X = 0, int offset_Y = 0)
{
    grid[4 + offset_Y][4 + offset_X] = 1;
    grid[4 + offset_Y][5 + offset_X] = 1;
    grid[4 + offset_Y][6 + offset_X] = 1;
    grid[3 + offset_Y][6 + offset_X] = 1;
    grid[2 + offset_Y][5 + offset_X] = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0xc(%rbp), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
popq %rbp
retq
nopw %cs:(%rax,%rax)