LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2PixelDatabase.cpp
// Function: gaps::R2PixelDatabase::WriteEntries(_IO_FILE*, int)
int R2PixelDatabase::
WriteEntries(FILE *fp, int swap_endian)
{
  // Seek to entries seek
  RNFileSeek(fp, entries_seek, RN_FILE_SEEK_SET);

  // Write entries
  int dummy = 0;
  char buffer[128] = { '\0' };
  std::map<std::string, R2PixelDatabaseEntry, RNMapComparator<std::string> >::iterator it;
  for (it = map.m->begin(); it != map.m->end(); ++it) {
    R2PixelDatabaseEntry entry = it->second;
    strncpy(buffer, entry.key, 128);
    if (!RNWriteChar(fp, buffer, 128, swap_endian)) return 0;
    if (!RNWriteUnsignedInt(fp, &entry.format, 1, swap_endian)) return 0;
    if (!RNWriteUnsignedInt(fp, &entry.size, 1, swap_endian)) return 0;
    if (!RNWriteUnsignedLongLong(fp, &entry.seek, 1, swap_endian)) return 0;
    if (!RNWriteDouble(fp, &entry.offset, 1, swap_endian)) return 0;
    if (!RNWriteDouble(fp, &entry.scale, 1, swap_endian)) return 0;
    if (!RNWriteDouble(fp, &entry.exponent, 1, swap_endian)) return 0;
    for (int j = 0; j < 12; j++) RNWriteInt(fp, &dummy, 1, swap_endian);
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x38(%rdi), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xad14e
movl $0x0, 0x4(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq 0x40(%r15), %rax
movq 0x18(%rax), %r12
addq $0x8, %rax
cmpq %rax, %r12
je 0x9d8c1
leaq 0x4(%rsp), %rbp
leaq 0x40(%r12), %r13
movl $0xa8, %edx
leaq 0x90(%rsp), %rdi
movq %r13, %rsi
callq 0x133f0
movl $0x80, %edx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x13280
movq %r14, %rdi
movq %r15, %rsi
movl $0x80, %edx
movl %ebx, %ecx
callq 0xad5c4
testl %eax, %eax
je 0x9d8c8
movq %r14, %rdi
leaq 0x110(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xad80e
testl %eax, %eax
je 0x9d8c8
movq %r14, %rdi
leaq 0x114(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xad80e
testl %eax, %eax
je 0x9d8c8
movq %r14, %rdi
leaq 0x118(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xada8a
testl %eax, %eax
je 0x9d8c8
movq %r14, %rdi
leaq 0x120(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xad946
testl %eax, %eax
je 0x9d8c8
movq %r14, %rdi
leaq 0x128(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xad946
testl %eax, %eax
je 0x9d8c8
movq %r14, %rdi
leaq 0x130(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xad946
testl %eax, %eax
je 0x9d8c8
movl $0xc, %r13d
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0xad772
decl %r13d
jne 0x9d889
movq %r12, %rdi
callq 0x13370
movq %rax, %r12
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rax
addq $0x8, %rax
cmpq %rax, %r12
jne 0x9d78c
movl $0x1, %eax
jmp 0x9d8ca
xorl %eax, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNFileSize(char const*)
unsigned long long
RNFileSize(const char *filename)
{
#if 1
    // Return size of file in bytes
    FILE *fp = fopen(filename, "r");
    if (!fp) return 0;
    RNFileSeek(fp, 0, RN_FILE_SEEK_END);
    unsigned long long file_size = RNFileTell(fp);
    fclose(fp);
    return file_size;
#else
    // Requires "unistd.h"
    struct stat stat_buf;
    int rc = fstat(filename, &stat_buf);
    if (rc == 0) return 0;
    else return stat_buf.st_size;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3c773(%rip), %rsi     # 0xe9883
callq 0x135d0
testq %rax, %rax
je 0xad144
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x132e0
movq %rbx, %rdi
callq 0x13630
movq %rax, %r14
movq %rbx, %rdi
callq 0x134d0
movq %r14, %rax
jmp 0xad146
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadShort(_IO_FILE*, short*, int, int)
int 
RNReadShort(FILE *fp, short *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(short), count, fp) != (size_t) count) {
    RNFail("Unable to read short from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap2(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x2, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad238
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad248
movl %r14d, %eax
xorl %ecx, %ecx
rolw $0x8, (%rbx,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0xad229
jmp 0xad248
leaq 0x3a630(%rip), %rdi     # 0xe786f
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadUnsignedShort(_IO_FILE*, unsigned short*, int, int)
int 
RNReadUnsignedShort(FILE *fp, unsigned short *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(unsigned short), count, fp) != (size_t) count) {
    RNFail("Unable to read unsigned short from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap2(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x2, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad2bd
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad2cd
movl %r14d, %eax
xorl %ecx, %ecx
rolw $0x8, (%rbx,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0xad2ae
jmp 0xad2cd
leaq 0x3a5cb(%rip), %rdi     # 0xe788f
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadInt(_IO_FILE*, int*, int, int)
int 
RNReadInt(FILE *fp, int *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(int), count, fp) != (size_t) count) {
    RNFail("Unable to read integer from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap4(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x4, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad32f
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad33f
movl %r14d, %eax
xorl %ecx, %ecx
movl (%rbx,%rcx,4), %edx
bswapl %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0xad31d
jmp 0xad33f
leaq 0x3a582(%rip), %rdi     # 0xe78b8
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadUnsignedInt(_IO_FILE*, unsigned int*, int, int)
int 
RNReadUnsignedInt(FILE *fp, unsigned int *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(unsigned int), count, fp) != (size_t) count) {
    RNFail("Unable to read unsigned integer from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap4(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x4, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad3ba
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad3ca
movl %r14d, %eax
xorl %ecx, %ecx
movl (%rbx,%rcx,4), %edx
bswapl %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0xad3a8
jmp 0xad3ca
leaq 0x3a519(%rip), %rdi     # 0xe78da
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadFloat(_IO_FILE*, float*, int, int)
int
RNReadFloat(FILE *fp, float *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(float), count, fp) != (size_t) count) {
    RNFail("Unable to read float from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap4(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x4, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad42c
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad43c
movl %r14d, %eax
xorl %ecx, %ecx
movl (%rbx,%rcx,4), %edx
bswapl %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0xad41a
jmp 0xad43c
leaq 0x3a4d2(%rip), %rdi     # 0xe7905
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadDouble(_IO_FILE*, double*, int, int)
int
RNReadDouble(FILE *fp, double *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(double), count, fp) != (size_t) count) {
    RNFail("Unable to read double from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap8(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x8, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad4a1
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad4b1
movl %r14d, %eax
xorl %ecx, %ecx
movq (%rbx,%rcx,8), %rdx
bswapq %rdx
movq %rdx, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xad48c
jmp 0xad4b1
leaq 0x3a47d(%rip), %rdi     # 0xe7925
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadLongLong(_IO_FILE*, long long*, int, int)
int
RNReadLongLong(FILE *fp, long long *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(long long), count, fp) != (size_t) count) {
    RNFail("Unable to read long long from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap8(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x8, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad532
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad542
movl %r14d, %eax
xorl %ecx, %ecx
movq (%rbx,%rcx,8), %rdx
bswapq %rdx
movq %rdx, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xad51d
jmp 0xad542
leaq 0x3a40d(%rip), %rdi     # 0xe7946
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNReadUnsignedLongLong(_IO_FILE*, unsigned long long*, int, int)
int
RNReadUnsignedLongLong(FILE *fp, unsigned long long *ptr, int count, int swap_endian)
{
  // Read the values
  if (fread(ptr, sizeof(unsigned long long), count, fp) != (size_t) count) {
    RNFail("Unable to read unsigned long long from file\n");
    return 0;
  }

  // Swap endian
  if (swap_endian) RNSwap8(ptr, count);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rcx
movslq %edx, %r15
movl $0x8, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13790
cmpq %r15, %rax
jne 0xad5a7
testl %ebp, %ebp
sete %al
testl %r14d, %r14d
setle %cl
movl $0x1, %ebp
orb %al, %cl
jne 0xad5b7
movl %r14d, %eax
xorl %ecx, %ecx
movq (%rbx,%rcx,8), %rdx
bswapq %rdx
movq %rdx, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xad592
jmp 0xad5b7
leaq 0x3a3bc(%rip), %rdi     # 0xe796a
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteShort(_IO_FILE*, short const*, int, int)
int
RNWriteShort(FILE *fp, const short *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap2((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(short), count, fp) != (size_t) count) {
    RNFail("Unable to write short to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap2((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xad67d
xorl %eax, %eax
rolw $0x8, (%rbx,%rax,2)
incq %rax
cmpq %rax, %r13
jne 0xad670
movslq %ebp, %r12
movl $0x2, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xad6ac
leaq 0x3a33d(%rip), %rdi     # 0xe79df
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xad6ca
xorl %eax, %eax
rolw $0x8, (%rbx,%rax,2)
incq %rax
cmpq %rax, %r13
jne 0xad6bd
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteUnsignedShort(_IO_FILE*, unsigned short const*, int, int)
int
RNWriteUnsignedShort(FILE *fp, const unsigned short *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap2((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(unsigned short), count, fp) != (size_t) count) {
    RNFail("Unable to write unsigned short to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap2((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xad713
xorl %eax, %eax
rolw $0x8, (%rbx,%rax,2)
incq %rax
cmpq %rax, %r13
jne 0xad706
movslq %ebp, %r12
movl $0x2, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xad742
leaq 0x3a2c6(%rip), %rdi     # 0xe79fe
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xad760
xorl %eax, %eax
rolw $0x8, (%rbx,%rax,2)
incq %rax
cmpq %rax, %r13
jne 0xad753
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteInt(_IO_FILE*, int const*, int, int)
int
RNWriteInt(FILE *fp, const int *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap4((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(int), count, fp) != (size_t) count) {
    RNFail("Unable to write integer to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap4((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xad7ac
xorl %eax, %eax
movl (%rbx,%rax,4), %edx
bswapl %edx
movl %edx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xad79c
movslq %ebp, %r12
movl $0x4, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xad7db
leaq 0x3a1c6(%rip), %rdi     # 0xe7997
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xad7fc
xorl %eax, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xad7ec
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteUnsignedInt(_IO_FILE*, unsigned int const*, int, int)
int
RNWriteUnsignedInt(FILE *fp, const unsigned int *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap4((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(unsigned int), count, fp) != (size_t) count) {
    RNFail("Unable to write unsigned integer to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap4((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xad848
xorl %eax, %eax
movl (%rbx,%rax,4), %edx
bswapl %edx
movl %edx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xad838
movslq %ebp, %r12
movl $0x4, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xad877
leaq 0x3a1b9(%rip), %rdi     # 0xe7a26
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xad898
xorl %eax, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xad888
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteFloat(_IO_FILE*, float const*, int, int)
int
RNWriteFloat(FILE *fp, const float *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap4((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(float), count, fp) != (size_t) count) {
    RNFail("Unable to write float to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap4((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xad8e4
xorl %eax, %eax
movl (%rbx,%rax,4), %edx
bswapl %edx
movl %edx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xad8d4
movslq %ebp, %r12
movl $0x4, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xad913
leaq 0x3a147(%rip), %rdi     # 0xe7a50
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xad934
xorl %eax, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xad924
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteDouble(_IO_FILE*, double const*, int, int)
int
RNWriteDouble(FILE *fp, const double *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap8((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(double), count, fp) != (size_t) count) {
    RNFail("Unable to write double to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap8((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xad983
xorl %eax, %eax
movq (%rbx,%rax,8), %rdx
bswapq %rdx
movq %rdx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xad970
movslq %ebp, %r12
movl $0x8, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xad9b2
leaq 0x3a0c7(%rip), %rdi     # 0xe7a6f
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xad9d6
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xad9c3
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteLongLong(_IO_FILE*, long long const*, int, int)
int
RNWriteLongLong(FILE *fp, const long long *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap8((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(long long), count, fp) != (size_t) count) {
    RNFail("Unable to write long long to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap8((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xada25
xorl %eax, %eax
movq (%rbx,%rax,8), %rdx
bswapq %rdx
movq %rdx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xada12
movslq %ebp, %r12
movl $0x8, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xada54
leaq 0x3a045(%rip), %rdi     # 0xe7a8f
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xada78
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xada65
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNFile.cpp
// Function: gaps::RNWriteUnsignedLongLong(_IO_FILE*, unsigned long long const*, int, int)
int
RNWriteUnsignedLongLong(FILE *fp, const unsigned long long *ptr, int count, int swap_endian)
{
  // Swap endian
  if (swap_endian) RNSwap8((void *) ptr, count);

  // Write the values
  int status = 1;
  if (fwrite(ptr, sizeof(unsigned long long), count, fp) != (size_t) count) {
    RNFail("Unable to write unsigned long long to file\n");
    status = 0;
  }

  // Swap endian back
  if (swap_endian) RNSwap8((void *) ptr, count);

  // Return status
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rcx
testl %r14d, %r14d
sete %al
testl %edx, %edx
setle %dl
orb %al, %dl
movl %ebp, %r13d
jne 0xadac7
xorl %eax, %eax
movq (%rbx,%rax,8), %rdx
bswapq %rdx
movq %rdx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xadab4
movslq %ebp, %r12
movl $0x8, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x139a0
movl $0x1, %r15d
cmpq %r12, %rax
je 0xadaf6
leaq 0x39fc6(%rip), %rdi     # 0xe7ab2
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xaddb2
testl %r14d, %r14d
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0xadb1a
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0xadb07
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/main.cpp
// Function: main
int main(int argc, char *args[])
{
    App app;

    if(!app.init())
    {
        printf("Error initializing... bye!\n");
        return 666;
    }

    app.run();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
callq 0x2074
movq %rbx, %rdi
callq 0x134a
testb %al, %al
je 0x12ca
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x13ea
jmp 0x12db
leaq 0x1d33(%rip), %rdi      # 0x3004
callq 0x1160
movl $0x29a, %ebx            # imm = 0x29A
leaq -0x78(%rbp), %rdi
callq 0x1304
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x1304
movq %rbx, %rdi
callq 0x1180
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/App.cpp
// Function: App::~App()
App::~App()
{
    if(gRenderer != NULL)
    {
        SDL_DestroyRenderer(gRenderer);
        gRenderer = NULL;
    }

    if(gWindow != NULL)
    {
        SDL_DestroyWindow(gWindow);
        gWindow = NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x3de9(%rip), %rdi      # 0x50f8
testq %rdi, %rdi
je 0x1324
callq 0x10d0
movq $0x0, 0x3dd4(%rip) # 0x50f8
movq 0x3dc5(%rip), %rdi      # 0x50f0
testq %rdi, %rdi
je 0x1340
callq 0x1030
movq $0x0, 0x3db0(%rip) # 0x50f0
popq %rbp
retq
movq %rax, %rdi
callq 0x1467
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/App.cpp
// Function: App::init()
bool App::init()
{
    if(SDL_Init(SDL_INIT_VIDEO) < 0)
    {
        printf("Couldn't start SDL! SDL error: %s\n", SDL_GetError());
        return false;
    }

    gWindow = SDL_CreateWindow("Tic Tac Toe", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
    if(gWindow == NULL)
    {
        printf("Couldn't create Window! SDL error: %s\n", SDL_GetError());
        return false;
    }

    gRenderer = SDL_CreateRenderer(gWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if(gRenderer == NULL)
    {
        printf("Couldn't create Renderer! SDL error: %s\n", SDL_GetError());
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x20, %edi
callq 0x1110
testl %eax, %eax
js 0x13bc
leaq 0x1cdc(%rip), %rdi      # 0x3042
movl $0x1fff0000, %esi       # imm = 0x1FFF0000
movl $0x1fff0000, %edx       # imm = 0x1FFF0000
movl $0x258, %ecx            # imm = 0x258
movl $0x258, %r8d            # imm = 0x258
movl $0x4, %r9d
callq 0x1060
movq %rax, 0x3d63(%rip)      # 0x50f0
testq %rax, %rax
je 0x13c5
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x6, %edx
callq 0x1040
movq %rax, 0x3d4d(%rip)      # 0x50f8
movb $0x1, %r14b
testq %rax, %rax
jne 0x13e1
leaq 0x1cbb(%rip), %rbx      # 0x3075
jmp 0x13cc
leaq 0x1c5c(%rip), %rbx      # 0x301f
jmp 0x13cc
leaq 0x1c82(%rip), %rbx      # 0x304e
callq 0x1100
xorl %r14d, %r14d
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/App.cpp
// Function: App::run()
void App::run()
{
    bool quit = false;
    while(!quit)
    {
        // handle exit events
        while(SDL_PollEvent(&event))
        {
            if(event.type == SDL_QUIT)
                quit = true;
        }

        // update and render the game
        game.update(&event);
        game.render();
        game.checkWin();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
xorl %r15d, %r15d
movl $0x1, %r12d
movq %r14, %rdi
callq 0x10e0
testl %eax, %eax
je 0x1422
cmpl $0x100, (%r14)          # imm = 0x100
movzbl %r15b, %r15d
cmovel %r12d, %r15d
jmp 0x1405
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20de
movq %rbx, %rdi
callq 0x21b2
movq %rbx, %rdi
callq 0x220a
testb $0x1, %r15b
je 0x1405
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Board.cpp
// Function: Board::renderBoard() const
void Board::renderBoard() const
{
    // vertical lines
    SDL_RenderDrawLine(App::getRenderer(),
        App::SCREEN_WIDTH/3, 0,
        App::SCREEN_WIDTH/3, App::SCREEN_HEIGHT);

    SDL_RenderDrawLine(App::getRenderer(),
        App::SCREEN_WIDTH/3*2, 0,
        App::SCREEN_WIDTH/3*2, App::SCREEN_HEIGHT);

    // horizontal lines
    SDL_RenderDrawLine(App::getRenderer(),
        0, App::SCREEN_HEIGHT/3,
        App::SCREEN_WIDTH, App::SCREEN_HEIGHT/3);

    SDL_RenderDrawLine(App::getRenderer(),
        0, App::SCREEN_HEIGHT/3*2,
        App::SCREEN_WIDTH, App::SCREEN_HEIGHT/3*2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x145a
movq %rax, %rdi
movl $0xc8, %esi
xorl %edx, %edx
movl $0xc8, %ecx
movl $0x258, %r8d            # imm = 0x258
callq 0x10b0
callq 0x145a
movq %rax, %rdi
movl $0x190, %esi            # imm = 0x190
xorl %edx, %edx
movl $0x190, %ecx            # imm = 0x190
movl $0x258, %r8d            # imm = 0x258
callq 0x10b0
callq 0x145a
movq %rax, %rdi
xorl %esi, %esi
movl $0xc8, %edx
movl $0x258, %ecx            # imm = 0x258
movl $0xc8, %r8d
callq 0x10b0
callq 0x145a
movq %rax, %rdi
xorl %esi, %esi
movl $0x190, %edx            # imm = 0x190
movl $0x258, %ecx            # imm = 0x258
movl $0x190, %r8d            # imm = 0x190
popq %rbp
jmp 0x10b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Board.cpp
// Function: Board::renderPieces() const
void Board::renderPieces() const
{
    for(int i=0; i<3; i++)
        for(int j=0; j<3; j++)
        {
            switch(m[i][j])
            {
                case PIECE_X:
                    Util::drawCross(i, j); break;
                case PIECE_O:
                    Util::drawCircle(i, j); break;
                default:
                    break;
            }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movl (%rbx,%r15,4), %eax
cmpl $0x2, %eax
je 0x158e
cmpl $0x1, %eax
jne 0x1599
movl %r14d, %edi
movl %r15d, %esi
callq 0x223c
jmp 0x1599
movl %r14d, %edi
movl %r15d, %esi
callq 0x229e
incq %r15
cmpq $0x3, %r15
jne 0x1573
incq %r14
addq $0xc, %rbx
cmpq $0x3, %r14
jne 0x1570
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Board.cpp
// Function: Board::checkRows() const
bool Board::checkRows() const
{
    if(m[0][0] == m[0][1] && m[0][1] == m[0][2] && !isFieldEmpty(0,2))
        return true;
    else if(m[1][0] == m[1][1] && m[1][1] == m[1][2] && !isFieldEmpty(1,2))
        return true;
    else if(m[2][0] == m[2][1] && m[2][1] == m[2][2] && !isFieldEmpty(2,2))
        return true;

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rdi), %ecx
movb $0x1, %al
cmpl %ecx, (%rdi)
jne 0x1628
movl 0x8(%rdi), %edx
cmpl %edx, %ecx
jne 0x1628
testl %edx, %edx
jne 0x1657
movl 0x10(%rdi), %ecx
cmpl %ecx, 0xc(%rdi)
jne 0x163b
movl 0x14(%rdi), %edx
cmpl %edx, %ecx
jne 0x163b
testl %edx, %edx
jne 0x1657
movl 0x1c(%rdi), %eax
cmpl %eax, 0x18(%rdi)
sete %cl
movl 0x20(%rdi), %edx
cmpl %edx, %eax
sete %sil
testl %edx, %edx
setne %al
andb %sil, %al
andb %cl, %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Board.cpp
// Function: Board::checkColumns() const
bool Board::checkColumns() const
{
    if(m[0][0] == m[1][0] && m[1][0] == m[2][0] && !isFieldEmpty(2,0))
        return true;
    else if(m[0][1] == m[1][1] && m[1][1] == m[2][1] && !isFieldEmpty(2,1))
        return true;
    else if(m[0][2] == m[1][2] && m[1][2] == m[2][2] && !isFieldEmpty(2,2))
        return true;

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xc(%rdi), %ecx
movb $0x1, %al
cmpl %ecx, (%rdi)
jne 0x1672
movl 0x18(%rdi), %edx
cmpl %edx, %ecx
jne 0x1672
testl %edx, %edx
jne 0x16a1
movl 0x10(%rdi), %ecx
cmpl %ecx, 0x4(%rdi)
jne 0x1685
movl 0x1c(%rdi), %edx
cmpl %edx, %ecx
jne 0x1685
testl %edx, %edx
jne 0x16a1
movl 0x14(%rdi), %eax
cmpl %eax, 0x8(%rdi)
sete %cl
movl 0x20(%rdi), %edx
cmpl %edx, %eax
sete %sil
testl %edx, %edx
setne %al
andb %sil, %al
andb %cl, %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Board.cpp
// Function: Board::checkDiagonals() const
bool Board::checkDiagonals() const
{
    if(m[0][0] == m[1][1] && m[1][1] == m[2][2] && !isFieldEmpty(2,2))
        return true;
    else if(m[0][2] == m[1][1] && m[1][1] == m[2][0] && !isFieldEmpty(2,0))
        return true;

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rdi), %ecx
cmpl %ecx, (%rdi)
jne 0x16bc
movl 0x20(%rdi), %edx
cmpl %edx, %ecx
jne 0x16bc
movb $0x1, %al
testl %edx, %edx
jne 0x16d3
cmpl %ecx, 0x8(%rdi)
movl 0x18(%rdi), %eax
sete %dl
cmpl %eax, %ecx
sete %cl
testl %eax, %eax
setne %al
andb %cl, %al
andb %dl, %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Game.cpp
// Function: Game::restartGame()
void Game::restartGame()
{
    bot.restart();
    board.restart();

    // randomly choose first player
    // 0=pc, 1=human
    humanTurn = (rand()&1) ? true : false;

    // corrects the game state
    state = STATE_RUNNING;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x4, %rdi
callq 0x17e2
leaq 0x8(%rbx), %rdi
callq 0x1490
callq 0x1090
andb $0x1, %al
movb %al, 0x30(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Game.cpp
// Function: Game::update(SDL_Event*)
void Game::update(SDL_Event *event)
{
    // have we reach the current game's end?
    if(state == STATE_STOPPED)
        restartGame();
    else
    {
        bool successfulPlay = false; // to handle change of player turn

        // process human or pc turn
        if(!humanTurn)
        {
            bot.play(board);
            successfulPlay = true;
        }
        else
        {
            // did the human play?
            if(event->type == SDL_MOUSEBUTTONDOWN)
            {
                // get mouse coordinates and normalize to row/col
                int x, y;
                SDL_GetMouseState(&x, &y);
                int row = y/(App::SCREEN_HEIGHT/3);
                int col = x/(App::SCREEN_WIDTH/3);

                // try to validate the move
                if(board.isFieldEmpty(row,col))
                {
                    board.place(row,col);
                    successfulPlay = true;
                }
            }
        }

        // change turns
        if(successfulPlay)
        {
            humanTurn = !humanTurn;
            SDL_Delay(100); // delay between turns
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x1, (%rdi)
jne 0x2109
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20ac
cmpb $0x0, 0x30(%rbx)
je 0x2189
cmpl $0x401, (%rsi)          # imm = 0x401
jne 0x21a4
leaq -0x28(%rbp), %r15
leaq -0x24(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1170
movslq (%r14), %rax
imulq $0x51eb851f, %rax, %r14 # imm = 0x51EB851F
movq %r14, %rax
shrq $0x3f, %rax
sarq $0x26, %r14
addl %eax, %r14d
movslq (%r15), %rax
imulq $0x51eb851f, %rax, %r15 # imm = 0x51EB851F
movq %r15, %rax
shrq $0x3f, %rax
sarq $0x26, %r15
addl %eax, %r15d
leaq 0x8(%rbx), %r12
movq %r12, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x1726
testb %al, %al
je 0x21a4
movq %r12, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl $0x1, %ecx
callq 0x16e4
jmp 0x2196
leaq 0x4(%rbx), %rdi
leaq 0x8(%rbx), %rsi
callq 0x1814
xorb $0x1, 0x30(%rbx)
movl $0x64, %edi
callq 0x10f0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Game.cpp
// Function: Game::render() const
void Game::render() const
{
    // bg
    SDL_SetRenderDrawColor(App::getRenderer(), 0xFF, 0xFF, 0xFF, 0xFF);
    SDL_RenderClear(App::getRenderer());

    // game objects
    board.render();

    // render
    SDL_RenderPresent(App::getRenderer());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x145a
movq %rax, %rdi
movl $0xff, %esi
movl $0xff, %edx
movl $0xff, %ecx
movl $0xff, %r8d
callq 0x1150
callq 0x145a
movq %rax, %rdi
callq 0x1130
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x14a8
callq 0x145a
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1070
nop
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Util.cpp
// Function: Util::drawCross(int, int)
void Util::drawCross(int row, int col)
{
    int fieldW = App::SCREEN_WIDTH/3;
    int fieldH = App::SCREEN_HEIGHT/3;

    // top left to bottom right
    SDL_RenderDrawLine(App::getRenderer(),
        col*fieldW, row*fieldH,
        col*fieldW+fieldW, row*fieldH+fieldH);

    // top right to bottom left
    SDL_RenderDrawLine(App::getRenderer(),
        col*fieldW, row*fieldH+fieldH,
        col*fieldW+fieldW, row*fieldH);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
callq 0x145a
imull $0xc8, %ebx, %ebx
imull $0xc8, %r14d, %r14d
movl $0xc8, %r15d
leal (%rbx,%r15), %r12d
addl %r14d, %r15d
movq %rax, %rdi
movl %ebx, %esi
movl %r14d, %edx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x10b0
callq 0x145a
movq %rax, %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r14d, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
// File: /workspace/github_cpp_makefile_star2_O1/t3nma[P]sdl2-TicTacToe/src/Util.cpp
// Function: Util::drawCircle(int, int)
void Util::drawCircle(int row, int col)
{
    int fieldW = App::SCREEN_WIDTH/3;
    int fieldH = App::SCREEN_HEIGHT/3;

    // calculate circle center
    int centerX = col*fieldW+(fieldW/2);
    int centerY = row*fieldH+(fieldH/2);

    int r = fieldW/2;

    double step = 2*M_PI/30;
    int endX = centerX + r;
    int endY = centerY;

    // draw circle.. Multiple straight lines between consecutive
    // points of the desired circle
    for(double angle=0; angle<2*M_PI; angle+=step)
    {
        int startX = endX;
        int startY = endY;
        endX = r * cos(angle) + centerX;
        endY = r * sin(angle) + centerY;
        SDL_RenderDrawLine(App::getRenderer(), startX, startY, endX, endY);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
imull $0xc8, %esi, %ebx
leal 0x64(%rbx), %eax
imull $0xc8, %edi, %r14d
addl $0x64, %r14d
addl $0xc8, %ebx
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, -0x30(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x1190
movsd 0xda8(%rip), %xmm1      # 0x30a0
mulsd %xmm1, %xmm0
addsd -0x38(%rbp), %xmm0
cvttsd2si %xmm0, %r15d
movsd -0x28(%rbp), %xmm0
callq 0x1080
mulsd 0xd88(%rip), %xmm0      # 0x30a0
addsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %r12d
callq 0x145a
movq %rax, %rdi
movl %ebx, %esi
movl %r14d, %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x10b0
movsd -0x28(%rbp), %xmm0
addsd 0xd61(%rip), %xmm0      # 0x30a8
movsd 0xd61(%rip), %xmm1      # 0x30b0
ucomisd %xmm0, %xmm1
movl %r15d, %ebx
movl %r12d, %r14d
ja 0x22e1
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/luizaes[P]post-machine-simulator/post_machine_sim.cpp
// Function: ReadInputLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void ReadInputLine(string& line) {
	getline(cin, line);

	/* Fix so that the program can run for both Windows and Linux file formats */
	if(!line.empty() && *line.rbegin() == '\r') {
    	line.erase( line.length()-1, 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x465f(%rip), %r14      # 0x6fe0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2270
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x29ca
movq (%rbx), %rax
cmpb $0xd, -0x1(%rax,%rsi)
jne 0x29ca
decq %rsi
movl $0x1, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2070
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/luizaes[P]post-machine-simulator/post_machine_sim.cpp
// Function: PostMachineSimulator::Run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool PostMachineSimulator::Run(string& input) {
	int start_index;

	for(int i = 0; input[i] != '\0'; i++) {
		work_queue.push(input[i]);
	}

	for(int i = 0; i < flow_diagram.size(); i++) {
		if(flow_diagram[i].name.compare(start_state) == 0) {
			start_index = i;
			break;
		}
	}

	/* Process the input word through the working queue and flow diagram */
	return TraverseDiagram(start_index);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movb (%rsi), %al
testb %al, %al
je 0x376a
leaq 0x18(%rbx), %r15
movl $0x1, %r12d
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdx
decq %rdx
cmpq %rdx, %rcx
je 0x3751
movb %al, (%rcx)
incq 0x48(%rbx)
jmp 0x3759
movq %r15, %rdi
callq 0x392e
movq (%r14), %rsi
movb (%rsi,%r12), %al
addq %r12, %rsi
incq %r12
testb %al, %al
jne 0x3739
movq (%rbx), %rdi
cmpq %rdi, 0x8(%rbx)
je 0x37b6
leaq 0x68(%rbx), %r15
xorl %r12d, %r12d
movabsq $0x6db6db6db6db6db7, %r13 # imm = 0x6DB6DB6DB6DB6DB7
xorl %r14d, %r14d
addq %r12, %rdi
movq %r15, %rsi
callq 0x2040
testl %eax, %eax
je 0x37b9
incq %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r13, %rax
addq $0x38, %r12
cmpq %r14, %rax
ja 0x3787
jmp 0x37b9
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x29d0
testl %eax, %eax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/superblocks[P]superblocks/set-gdc.cpp
// Function: Superblocks::init()
void Superblocks::init() {

  coin = "GDC"; 
	coin_name = "Grandcoin";

	hash_length = 64;

	// normal (step 0)
	reward[0] = 1000;

	// superblocks

	seed_type[1] = SEED_WITH_PREVIOUS_BLOCK_HASH;
	cutout_start[1] = 3;
	cutout_length[1] = 7;
	rnd_range_low[1] = 1;
	rnd_range_high[1] = 19199;
	luck_type[1] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[1] = 10000;
	luck_y[1] = 10011;
		secondary_rand[1] = 1;
		secondary_rand_type[1] = SECONDARY_REWARD_PLUS_RAND_MINUS_X;
		secondary_rand_low[1] = 1;
		secondary_rand_high[1] = 5000;
		secondary_rand_x[1] = 0;
	reward[1] = 5000;


	seed_type[2] = SEED_WITH_PREVIOUS_BLOCK_HASH;
	cutout_start[2] = 6;
	cutout_length[2] = 7;
	rnd_range_low[2] = 1;
	rnd_range_high[2] = 134399;
	luck_type[2] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[2] = 60000;
	luck_y[2] = 60011;
		secondary_rand[2] = 1;
		secondary_rand_type[2] = SECONDARY_REWARD_PLUS_RAND_MINUS_X;
		secondary_rand_low[2] = 1;
		secondary_rand_high[2] = 50000;
		secondary_rand_x[2] = 0;
	reward[2] = 50000;


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
movq 0x20(%rbx), %rdx
leaq 0x1350(%rip), %rcx      # 0x3e80
movl $0x3, %r8d
xorl %esi, %esi
callq 0x1120
leaq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rdx
leaq 0x1338(%rip), %rcx      # 0x3e84
movl $0x9, %r8d
xorl %esi, %esi
callq 0x1120
movl $0x40, 0x58(%rbx)
movl $0x3e8, 0x110(%rbx)     # imm = 0x3E8
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, 0x60(%rbx)
movabsq $0x600000003, %rax      # imm = 0x600000003
movq %rax, 0x6c(%rbx)
movabsq $0x700000007, %rax      # imm = 0x700000007
movq %rax, 0x78(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x84(%rbx)
movabsq $0x20cff00004aff, %rcx  # imm = 0x20CFF00004AFF
movq %rcx, 0x90(%rbx)
movabsq $0x300000003, %rcx      # imm = 0x300000003
movq %rcx, 0xf0(%rbx)
movabsq $0xea6000002710, %rcx   # imm = 0xEA6000002710
movq %rcx, 0xfc(%rbx)
movabsq $0xea6b0000271b, %rcx   # imm = 0xEA6B0000271B
movq %rcx, 0x108(%rbx)
movq %rax, 0x9c(%rbx)
movq %rax, 0xa8(%rbx)
movq %rax, 0xb4(%rbx)
movabsq $0xc35000001388, %rax   # imm = 0xC35000001388
movq %rax, 0xc0(%rbx)
movq $0x0, 0xcc(%rbx)
movq %rax, 0x114(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Quinny[P]IteratedPrisoners/./ipd/common.h
// Function: ipd::score(ipd::decision, ipd::decision)
int score(decision d1, decision d2) {
    if (d1 == decision::cooperate && d2 == decision::cooperate)
        return 3;
    if (d1 == decision::cooperate && d2 == decision::defect)
        return 0;
    if (d1 == decision::defect && d2 == decision::cooperate)
        return 5;
    if (d1 == decision::defect && d2 == decision::defect)
        return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
orl %edi, %eax
je 0x5703
movl %esi, %ecx
xorl $0x1, %ecx
xorl %eax, %eax
movl %edi, %edx
orl %ecx, %edx
je 0x5708
xorl $0x1, %edi
movl $0x5, %eax
orl %edi, %esi
je 0x5708
xorl %eax, %eax
orl %ecx, %edi
sete %al
jmp 0x5708
movl $0x3, %eax
popq %rbp
retq