LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/io/shared_object.c
// Function: so_unload_file
int so_unload_file(struct measuresuite *ms, struct function_tuple *fct) {
  // clear error
  dlerror();

  // close and check
  if (dlclose(fct->lib_handle) != 0) {
    ms->errorno = E_INTERNAL_MEASURE__AI__DLCLOSE;
    ms->additional_info = dlerror();
    return 1;
  }

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2030
movq 0x10(%r14), %rdi
callq 0x2270
testl %eax, %eax
je 0x45c1
movl $0x13, 0x88(%rbx)
callq 0x2030
movq %rax, 0x90(%rbx)
movl $0x1, %eax
jmp 0x45c3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_file.c
// Function: read_section_header_table64
int read_section_header_table64(int32_t file, Elf64_Ehdr hdr,
                                Elf64_Shdr *sh_table) {

  // seek to header
  if (lseek(file, (off_t)hdr.e_shoff, SEEK_SET) != (off_t)hdr.e_shoff) {
    return 1;
  };

  // read all headers at once
  const ssize_t combined_size = (long)hdr.e_shnum * hdr.e_shentsize;
  if (read(file, sh_table, combined_size) != combined_size) {
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movq 0x48(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x2100
movq %rax, %rcx
movl $0x1, %eax
cmpq %r14, %rcx
jne 0x461b
leaq 0x20(%rsp), %rax
movzwl 0x3c(%rax), %ecx
movzwl 0x3a(%rax), %r14d
imulq %rcx, %r14
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2150
movq %rax, %rcx
xorl %eax, %eax
cmpq %r14, %rcx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_file.c
// Function: find_section_offset
void find_section_offset(int32_t file, Elf64_Ehdr hdr, Elf64_Shdr sh_table[],
                         const char *needle, unsigned long *dest) {

  size_t len_needle = strlen(needle);

  /* Read section-header string-table */
  char *sh_str = NULL;
  read_section(file, sh_table[hdr.e_shstrndx], (void **)&sh_str);

  for (int i = 0; i < hdr.e_shnum; i++) {

    // sh_name is the index in the string_table
    Elf64_Word index = sh_table[i].sh_name;

    // get the address of the string to compare
    const char *name = &(sh_str[index]);

    if (strncmp(name, needle, len_needle) == 0) {
      *dest = i;
      break;
    }
  }
  free(sh_str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq %rdx, %rdi
callq 0x20a0
movq %rax, %r12
leaq 0x10(%rsp), %r13
movq $0x0, (%r13)
movzwl 0x8e(%rsp), %eax
shll $0x6, %eax
movq 0x18(%r15,%rax), %rsi
movq 0x20(%r15,%rax), %rdx
movl %ebp, %edi
movq %r13, %rcx
callq 0x46c6
movzwl 0x8c(%rsp), %ebp
movq (%r13), %r13
testq %rbp, %rbp
je 0x46b0
xorl %ebx, %ebx
movl (%r15), %edi
addq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2080
testl %eax, %eax
je 0x46a8
incq %rbx
addq $0x40, %r15
cmpq %rbx, %rbp
jne 0x4685
jmp 0x46b0
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
movq %r13, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_file.c
// Function: read_section
static int read_section(int32_t file, Elf64_Shdr sect_hdr, void **dest) {

  *dest = malloc(sect_hdr.sh_size);
  if (!dest) {
    fprintf(stderr, "%s:Failed to allocate %ldbytes\n", __func__,
            sect_hdr.sh_size);
    return 1;
  }

  if (lseek(file, (off_t)sect_hdr.sh_offset, SEEK_SET) !=
      (off_t)sect_hdr.sh_offset) {
    return 1;
  };
  ssize_t bytes_read = read(file, *dest, sect_hdr.sh_size);
  if (bytes_read == -1 || bytes_read == 0 || bytes_read == EOF ||
      (size_t)bytes_read != sect_hdr.sh_size) {
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
movq %rdx, %rdi
callq 0x21c0
movq %rax, (%r14)
movl %ebp, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2100
cmpq %r15, %rax
jne 0x470b
movq (%r14), %rsi
movl %ebp, %edi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2150
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_file.c
// Function: read_elf_header
int read_elf_header(int32_t file, Elf64_Ehdr *elf_header) {
  size_t size = sizeof(Elf64_Ehdr);
  char magic[] = {"\177ELF"};
  if (elf_header == NULL                                     // sanity
      || lseek(file, (off_t)0, SEEK_SET) != (off_t)0         // seek to start
      || (size_t)read(file, elf_header, size) != size        // read header
      || strncmp((char *)elf_header->e_ident, magic, 4) != 0 // check magic
      || elf_header->e_ident[EI_CLASS] != ELFCLASS64         // is elf64
  ) {
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x1, %ebx
testq %rsi, %rsi
je 0x48db
movq %rsi, %r14
movl %edi, %ebp
xorl %esi, %esi
xorl %edx, %edx
callq 0x2100
testq %rax, %rax
jne 0x48db
movl $0x40, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x2150
cmpq $0x40, %rax
jne 0x48db
leaq 0x172b(%rip), %rsi      # 0x5feb
movl $0x4, %edx
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x48db
xorl %ebx, %ebx
cmpb $0x2, 0x4(%r14)
setne %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/fisher_yates.c
// Function: shuffle_permutations
int shuffle_permutations(measuresuite_t ms) {

  // nothing to shuffle if we didn't load any functions yet / there is only one
  // function
  if (ms->num_functions <= 1) {
    return 0;
  }

  for (size_t i = ms->num_functions - 1; // start with last item
       i >= 1; // until second item (no need to shuffle first item with itself)
       i--     // every item
  ) {
    size_t num = 0;
    if (get_random_number(ms, i, &num)) {
      return 1;
    }
    // swap random with current
    size_t tmp = ms->permutation[i];
    ms->permutation[i] = ms->permutation[num];
    ms->permutation[num] = tmp;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x80(%rdi), %r15
xorl %ebx, %ebx
cmpq $0x2, %r15
jb 0x4bd2
movq %rdi, %r14
decq %r15
movq %rsp, %r12
movq $0x0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2d96
testl %eax, %eax
jne 0x4bcd
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rcx
movq (%rsp), %rdx
movq (%rax,%rdx,8), %rdx
movq %rdx, (%rax,%r15,8)
movq (%rsp), %rdx
movq %rcx, (%rax,%rdx,8)
decq %r15
jne 0x4b90
jmp 0x4bd2
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/printer.c
// Function: pretty_print_results
void pretty_print_results(uint64_t const *data_a, uint64_t const *data_b,
                          size_t total) {

  for (size_t i = 0; i < total; i++) {

    uint64_t ground_truth = data_a[i];
    uint64_t val = data_b[i];
    printf("\n\x1b[%dm@ %lu/%lu\x1b[0m:\n"
           "a:0x",
           color_grn - (val != ground_truth), i, total);

    printbin_single_number_hex(ground_truth, ground_truth);
#ifdef ENABLE_DEBUG
    printbin_single_number_bin(ground_truth, ground_truth);
#endif
    printf("\n\x1b[0mb:0x");

    printbin_single_number_hex(val, ground_truth);
#ifdef ENABLE_DEBUG
    printbin_single_number_bin(val, ground_truth);
#endif

    printf("\n");
    data_b++;
    data_a++;
  }
}

// Assembly:
testq %rdx, %rdx
je 0x4c77
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %rsi, (%rsp)
movq (%rbx,%r14), %r12
movq (%rsi,%r14), %r13
xorl %esi, %esi
cmpq %r12, %r13
sete %sil
addl $0x1f, %esi
leaq 0x1486(%rip), %rdi      # 0x60a4
movq %rbp, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x20d0
movq %r12, %rdi
movq %r12, %rsi
callq 0x4c78
leaq 0x1481(%rip), %rdi      # 0x60be
xorl %eax, %eax
callq 0x20d0
movq %r13, %rdi
movq %r12, %rsi
callq 0x4c78
movl $0xa, %edi
callq 0x2050
movq (%rsp), %rsi
incq %rbp
addq $0x10, %r14
cmpq %rbp, %r15
jne 0x4c03
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/0xADE1A1DE[P]MeasureSuite/lib/src/printer.c
// Function: printbin_single_number_hex
static void printbin_single_number_hex(uint64_t num, uint64_t compare) {

  const short bits_in_u64 = 64;
  const short bits_in_nibble = 4;
  const char nibble_mask = 0xF;

  int width = bits_in_u64 - bits_in_nibble;
  while (width >= 0) {
    unsigned long value = (num >> width) & nibble_mask;
    unsigned long truth = (compare >> width) & nibble_mask;
    int color = color_grn - (truth != value); // col 32 when its equal, grn

    printf("\x1b[%dm%lx", color, value);
    width -= bits_in_nibble;
  }
  printf("\x1b[0m");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x3c, %r15d
leaq 0x1435(%rip), %r12      # 0x60c8
movq %r14, %rdx
movl %r15d, %ecx
shrq %cl, %rdx
andl $0xf, %edx
movq %rbx, %rax
shrq %cl, %rax
andl $0xf, %eax
xorl %esi, %esi
cmpl %edx, %eax
sete %sil
addl $0x1f, %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x20d0
addq $-0x4, %r15
cmpq $-0x4, %r15
jne 0x4c93
leaq 0x1403(%rip), %rdi      # 0x60d1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x20d0
// File: /workspace/github_c_makefile_star2_O3/accre[P]Cprogramming/structures.c
// Function: printStruct
void printStruct( student oneStudent )
{
   int i;

   printf("=====================\n");
   printf("Student name: %s\n",oneStudent.name);
   printf("        age: %d\n",oneStudent.age);
   printf("        height: %6.3f\n",oneStudent.height);
   printf("        grades: ");
   for (i=0; i<10; i++) printf("%4.1f ",oneStudent.grades[i]);
   printf("\n");
   printf("=====================\n");

   // note that we're just changing the age of the local
   // copy here, so this will not affect the age of the 
   // original struct created in main()
   oneStudent.age = 45;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x20(%rsp), %r14
leaq 0xf3b(%rip), %rdi       # 0x20a8
callq 0x1040
movq (%r14), %rsi
leaq 0xed4(%rip), %rdi       # 0x2050
xorl %eax, %eax
callq 0x1050
movl 0x8(%r14), %esi
leaq 0xed4(%rip), %rdi       # 0x2062
xorl %eax, %eax
callq 0x1050
cvtss2sd 0xc(%r14), %xmm0
leaq 0xed1(%rip), %rdi       # 0x2073
movb $0x1, %al
callq 0x1050
leaq 0xeda(%rip), %rdi       # 0x208a
xorl %eax, %eax
callq 0x1050
movl $0x4, %r15d
leaq 0xed7(%rip), %rbx       # 0x209b
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r15,4), %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0x1050
incq %r15
cmpq $0xe, %r15
jne 0x11c4
movl $0xa, %edi
callq 0x1030
leaq 0xeb7(%rip), %rdi       # 0x20a8
popq %rbx
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/accre[P]Cprogramming/structures.c
// Function: main
int main()
{

   student Nikki;
   Nikki.name = "Nikki";
   Nikki.age = 19;
   Nikki.height = 64.75;
   int i;
   for (i=0; i<10 ; i++) {
      Nikki.grades[i] = 98.0; // overachiever
   }

   printStruct(Nikki);

   // It's advantageous to pass arrays and structures by reference, 
   // because it's more efficient (don't need to make a copy of all data)
   // and allows you to modify the contents of the array or struct
   modifyStruct(&Nikki);

   printStruct(Nikki);

   return 0;
}

// Assembly:
subq $0x78, %rsp
leaq 0xe86(%rip), %rax       # 0x20a2
movq %rax, 0x40(%rsp)
movabsq $0x4281800000000013, %rax # imm = 0x4281800000000013
movq %rax, 0x48(%rsp)
movdqa 0xdd8(%rip), %xmm0      # 0x2010
movl $0x5, %eax
movdqa 0xddb(%rip), %xmm1      # 0x2020
movdqa 0xde3(%rip), %xmm2      # 0x2030
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
movdqa 0xde6(%rip), %xmm4      # 0x2040
movdqa %xmm0, %xmm5
pxor %xmm1, %xmm5
movdqa %xmm2, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pcmpeqd %xmm3, %xmm5
pand %xmm6, %xmm5
movd %xmm5, %ecx
testb $0x1, %cl
je 0x1288
movl $0x42c40000, 0x3c(%rsp,%rax,4) # imm = 0x42C40000
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x129a
movl $0x42c40000, 0x40(%rsp,%rax,4) # imm = 0x42C40000
paddq %xmm4, %xmm0
addq $0x2, %rax
cmpq $0xf, %rax
jne 0x125a
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
movups 0x60(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x115c
movl $0x42900000, 0x50(%rsp) # imm = 0x42900000
movl $0x42a20000, 0x60(%rsp) # imm = 0x42A20000
movl $0x42aa0000, 0x68(%rsp) # imm = 0x42AA0000
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
movups 0x60(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x115c
xorl %eax, %eax
addq $0x78, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_destroy_buffers
static void
yapio_destroy_buffers(void)
{
    if (yapioSourceBlkMd)
        YAPIO_FREE(yapioSourceBlkMd);

    if (yapioIOBuf)
        YAPIO_FREE(yapioIOBuf);
}

// Assembly:
pushq %rbx
movq 0x5c6d(%rip), %rdi      # 0xc260
testq %rdi, %rdi
je 0x6606
callq 0x2170
cmpl $0x3, 0x5c1c(%rip)      # 0xc220
jge 0x6625
movq 0xe0e493(%rip), %rbx    # 0xe14aa0
testq %rbx, %rbx
je 0x6623
movq %rbx, %rdi
callq 0x2170
cmpl $0x3, 0x5bff(%rip)      # 0xc220
jge 0x662c
popq %rbx
retq
callq 0x2420
jmp 0x6606
movq %rbx, %rdi
callq 0x2461
jmp 0x6623
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_exit
static void
yapio_exit(int exit_rc)
{
    if (yapioMpiInit)
    {
        yapio_mpi_barrier(MPI_COMM_WORLD);

        if (yapioIOErrorCnt)
            MPI_Abort(MPI_COMM_WORLD, -EIO);

        else
            MPI_Finalize();
    }

    exit(exit_rc);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpb $0x1, 0x205c31(%rip)    # 0x20c274
jne 0x6689
leaq 0xe1047c(%rip), %r14    # 0xe16ac8
movq %r14, %rdi
callq 0x2370
movq 0x5975(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %r14, %rdi
callq 0x23b0
cmpl $0x0, 0xe114ed(%rip)    # 0xe17b5c
jne 0x6678
callq 0x22b0
jmp 0x6689
movq 0x5951(%rip), %rdi      # 0xbfd0
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0x21e0
movl %ebx, %edi
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_mmap_open
static int
yapio_mmap_open(const char *file, int flags, mode_t mode)
{
    int fd = open(file, flags, mode);
    if (fd >= YAPIO_FD_MAP_SIZE_MAX)
    {
        log_msg(YAPIO_LL_FATAL, "fd=%d exceeds map table size %u",
                fd, YAPIO_FD_MAP_SIZE_MAX);
        close(fd);
        return -ERANGE;
    }

    int prot = mode == O_RDONLY ? PROT_READ : (PROT_READ | PROT_WRITE);

    size_t len = (yapioMyTestGroup->ytg_num_blks_per_rank *
                  yapioMyTestGroup->ytg_blk_sz *
                  (yapioMyTestGroup->ytg_file_per_process ?
                   1 : yapioMyTestGroup->ytg_num_ranks));

    void *addr = mmap(NULL, len, prot, MAP_SHARED, fd, 0);
    if (addr == NULL)
    {
        const int error = errno;
        log_msg(YAPIO_LL_FATAL, "mmap() prot=%d len=%zd: %s",
                prot, len, strerror(error));
        close(fd);
        return -error;
    }

    log_msg(YAPIO_LL_DEBUG, "fd=%d addr=%p len=%zd", fd, addr, len);

    yapioFdMap[fd].yfm_fd = fd;
    yapioFdMap[fd].yfm_addr = addr;

    return fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
xorl %eax, %eax
callq 0x23d0
movl %eax, %ebx
cmpl $0x20000, %eax          # imm = 0x20000
jl 0x66c7
cmpl $0x0, 0x5b70(%rip)      # 0xc220
jns 0x67b4
movl %ebx, %edi
callq 0x2090
movl $0xffffffde, %ebx       # imm = 0xFFFFFFDE
jmp 0x6762
xorl %ecx, %ecx
testl %ebp, %ebp
setne %cl
movq 0x5b7b(%rip), %rax      # 0xc250
movq 0xb028(%rax), %r14
imulq 0xb020(%rax), %r14
leal 0x1(,%rcx,2), %ebp
movl $0x1, %ecx
cmpb $0x0, 0xb030(%rax)
jne 0x6700
movslq 0xb01c(%rax), %rcx
imulq %rcx, %r14
xorl %edi, %edi
movq %r14, %rsi
movl %ebp, %edx
movl $0x1, %ecx
movl %ebx, %r8d
xorl %r9d, %r9d
callq 0x23e0
testq %rax, %rax
je 0x6744
movq %rax, %r15
cmpl $0x3, 0x5af6(%rip)      # 0xc220
jge 0x676f
movslq %ebx, %rax
shlq $0x4, %rax
leaq 0x5b36(%rip), %rcx      # 0xc270
movl %ebx, (%rax,%rcx)
movq %r15, 0x8(%rax,%rcx)
jmp 0x6762
callq 0x2250
movl (%rax), %r15d
cmpl $0x0, 0x5acd(%rip)      # 0xc220
jns 0x67bb
movl %ebx, %edi
callq 0x2090
negl %r15d
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x586a(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x5ae8(%rip), %r8d      # 0xc268
subq $0x8, %rsp
leaq 0x1a24(%rip), %rsi      # 0x81af
leaq 0x1a59(%rip), %rdx      # 0x81eb
leaq 0x19dc(%rip), %rcx      # 0x8175
movl $0x1ad, %r9d            # imm = 0x1AD
xorl %eax, %eax
pushq %r14
pushq %r15
pushq %rbx
callq 0x2390
addq $0x20, %rsp
jmp 0x672c
movl %ebx, %edi
callq 0x24ff
movl %r15d, %edi
movl %ebp, %esi
movq %r14, %rdx
callq 0x249e
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_mmap_close
static int
yapio_mmap_close(int fd)
{
    log_msg(YAPIO_LL_DEBUG, "fd=%d addr=%p", fd, yapioFdMap[fd].yfm_addr);

    size_t len = (yapioMyTestGroup->ytg_num_blks_per_rank *
                  yapioMyTestGroup->ytg_blk_sz);

    int rc = munmap(yapioFdMap[fd].yfm_addr, len);
    if (rc)
        log_msg(YAPIO_LL_ERROR, "munmap(): %s", strerror(errno));

    rc = close(yapioFdMap[fd].yfm_fd);
    if (rc)
        log_msg(YAPIO_LL_ERROR, "close(): %s", strerror(errno));

    return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r10d
cmpl $0x2, 0x5a4a(%rip)      # 0xc220
jg 0x6846
movslq %r10d, %rbx
movq 0x5a6e(%rip), %rax      # 0xc250
movq 0xb028(%rax), %rsi
imulq 0xb020(%rax), %rsi
shlq $0x4, %rbx
leaq 0x5a74(%rip), %rax      # 0xc270
leaq (%rax,%rbx), %r14
movq 0x8(%rbx,%rax), %rdi
callq 0x22f0
testl %eax, %eax
je 0x6817
cmpl $0x0, 0x5a0b(%rip)      # 0xc220
jg 0x6838
movl (%r14), %edi
callq 0x2090
movl %eax, %ebx
testl %eax, %eax
je 0x682e
cmpl $0x0, 0x59f4(%rip)      # 0xc220
jg 0x683f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2547
jmp 0x6817
callq 0x2599
jmp 0x682e
movq 0x5793(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x5a11(%rip), %r8d      # 0xc268
movslq %r10d, %rbx
movq %rbx, %r11
shlq $0x4, %r11
leaq 0x5a08(%rip), %r14      # 0xc270
leaq 0x1982(%rip), %rsi      # 0x81f1
leaq 0x1975(%rip), %rdx      # 0x81eb
leaq 0x1991(%rip), %rcx      # 0x820e
movl $0x1b8, %r9d            # imm = 0x1B8
xorl %eax, %eax
pushq 0x8(%r11,%r14)
pushq %r10
callq 0x2390
addq $0x10, %rsp
jmp 0x67db
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_mmap_fsync
static int
yapio_mmap_fsync(int fd)
{
#if 1
    size_t len = (yapioMyTestGroup->ytg_num_blks_per_rank *
                  yapioMyTestGroup->ytg_blk_sz *
                  (yapioMyTestGroup->ytg_file_per_process ?
                   1 : yapioMyTestGroup->ytg_num_ranks));

    int rc = msync(yapioFdMap[fd].yfm_addr, len, MS_SYNC);
    if (rc)
    {
        rc = -errno;

        log_msg(YAPIO_LL_WARN, "fd=%d addr=%p rc=%d",
                fd, yapioFdMap[fd].yfm_addr, rc);
    }
#else
    int rc = fsync(fd);
#endif
    return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x59a7(%rip), %rax      # 0xc250
movq 0xb028(%rax), %rsi
imulq 0xb020(%rax), %rsi
movl %edi, %ebx
movl $0x1, %ecx
cmpb $0x0, 0xb030(%rax)
jne 0x68cf
movslq 0xb01c(%rax), %rcx
imulq %rcx, %rsi
movslq %ebx, %r15
shlq $0x4, %r15
leaq 0x598f(%rip), %r12      # 0xc270
movq 0x8(%r15,%r12), %rdi
movl $0x4, %edx
callq 0x21c0
testl %eax, %eax
je 0x6953
callq 0x2250
xorl %r14d, %r14d
subl (%rax), %r14d
cmpl $0x2, 0x591a(%rip)      # 0xc220
jl 0x6956
leaq (%r15,%r12), %r10
addq $0x8, %r10
movq 0x56c9(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x5947(%rip), %r8d      # 0xc268
subq $0x8, %rsp
leaq 0x192a(%rip), %rsi      # 0x8256
leaq 0x18ad(%rip), %rdx      # 0x81e0
leaq 0x193f(%rip), %rcx      # 0x8279
movl $0x1d7, %r9d            # imm = 0x1D7
xorl %eax, %eax
pushq %r14
pushq (%r10)
pushq %rbx
callq 0x2390
addq $0x20, %rsp
jmp 0x6956
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_mmap_pwrite
static ssize_t
yapio_mmap_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
    char *addr = yapioFdMap[fd].yfm_addr;

    log_msg(YAPIO_LL_DEBUG, "%p off=%ld cnt=%zd",
            &addr[offset], offset, count);

    memcpy(&addr[offset], (char *)buf, count);

    return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movslq %edi, %rax
shlq $0x4, %rax
leaq 0x58c2(%rip), %rcx      # 0xc270
movq 0x8(%rax,%rcx), %r12
cmpl $0x3, 0x5866(%rip)      # 0xc220
jge 0x69dc
addq %r15, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x23c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x55fd(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x587b(%rip), %r8d      # 0xc268
leaq (%r12,%r15), %r10
subq $0x8, %rsp
leaq 0x188e(%rip), %rsi      # 0x828a
leaq 0x17e8(%rip), %rdx      # 0x81eb
leaq 0x18a2(%rip), %rcx      # 0x82ac
movl $0x1ef, %r9d            # imm = 0x1EF
xorl %eax, %eax
pushq %rbx
pushq %r15
pushq %r10
callq 0x2390
addq $0x20, %rsp
jmp 0x69bc
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_test_recipe_param_to_string
static int
yapio_test_recipe_param_to_string(const char *param_str, char *dest)
{
    char recipe_param_tmp_str[YAPIO_RECIPE_PARAM_STRLEN_MAX];

    int len = yapio_test_recipe_param_gather(param_str, recipe_param_tmp_str);

    strncpy(dest, recipe_param_tmp_str, len);

    log_msg_r0(YAPIO_LL_DEBUG, "%s", dest);

    return len;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x6b69
movl %eax, %ebp
movslq %eax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2330
movq 0x57c2(%rip), %rax      # 0xc250
testq %rax, %rax
je 0x6a9b
movb 0xb032(%rax), %al
jmp 0x6aa5
cmpl $0x0, 0x57c6(%rip)      # 0xc268
sete %al
testb %al, %al
je 0x6ab2
cmpl $0x3, 0x5770(%rip)      # 0xc220
jge 0x6abd
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x25eb
jmp 0x6ab2
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_test_recipe_param_to_ull
static int
yapio_test_recipe_param_to_ull(const char *param_str, size_t *result)
{
    char recipe_param_tmp_str[YAPIO_RECIPE_PARAM_STRLEN_MAX];

    int len = yapio_test_recipe_param_gather(param_str, recipe_param_tmp_str);

    if (result)
        *result = strtoull(recipe_param_tmp_str, NULL, 10);

    log_msg_r0(YAPIO_LL_DEBUG, "%s %zu", recipe_param_tmp_str, *result);

    return len;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x6b69
movl %eax, %ebp
testq %rbx, %rbx
je 0x6af6
movq %rsp, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2340
movq %rax, (%rbx)
movq 0x5753(%rip), %rax      # 0xc250
testq %rax, %rax
je 0x6b0a
movb 0xb032(%rax), %al
jmp 0x6b14
cmpl $0x0, 0x5757(%rip)      # 0xc268
sete %al
testb %al, %al
je 0x6b21
cmpl $0x3, 0x5701(%rip)      # 0xc220
jge 0x6b2c
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x54ad(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x572b(%rip), %r8d      # 0xc268
leaq 0x1ff1(%rip), %rsi      # 0x8b35
leaq 0x16a0(%rip), %rdx      # 0x81eb
leaq 0x1ff9(%rip), %rcx      # 0x8b4b
movl $0x28a, %r9d            # imm = 0x28A
xorl %eax, %eax
pushq (%rbx)
pushq %r14
callq 0x2390
addq $0x10, %rsp
jmp 0x6b21
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_test_recipe_param_gather
static int
yapio_test_recipe_param_gather(const char *param_str, char *buf)
{
    int j;

    for (j = 0; j < YAPIO_RECIPE_PARAM_STRLEN_MAX - 1 && param_str[j] != ':';
         j++)
        buf[j] = param_str[j];

    if (param_str[j] != ':')
    {
        if (j == YAPIO_RECIPE_PARAM_STRLEN_MAX)
        {
            log_msg(YAPIO_LL_ERROR, "recipe input string is too long");
            return -E2BIG;
        }
        return -EINVAL;
    }

    buf[j] = '\0';

    return j + 1; //include ':' char
}

// Assembly:
pushq %rbx
xorl %eax, %eax
movb (%rdi,%rax), %cl
cmpb $0x3a, %cl
je 0x6b97
movb %cl, (%rsi,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x6b6c
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
cmpb $0x3a, 0x40(%rdi)
jne 0x6bc0
movl $0x40, %ebx
movl $0x40, %eax
jmp 0x6b9f
cmpb $0x3a, (%rdi,%rax)
jne 0x6ba7
movl %eax, %ebx
movb $0x0, (%rsi,%rax)
incl %ebx
jmp 0x6bc0
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
cmpq $0x41, %rax
jne 0x6bc0
movl $0xfffffff9, %ebx       # imm = 0xFFFFFFF9
cmpl $0x0, 0x5662(%rip)      # 0xc220
jg 0x6bc4
movl %ebx, %eax
popq %rbx
retq
callq 0x2628
jmp 0x6bc0
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_open_fpp_file
static int
yapio_open_fpp_file(int rank, int oflags)
{
    if (rank >= yapioNumRanks)
        return -EINVAL;

    char file_per_process_name[PATH_MAX + 1];

    int rc = yapio_make_filename(file_per_process_name, rank);
    if (rc)
        return rc;

    if (yapioFileDescFpp[rank] < 0)
    {
        yapioFileDescFpp[rank] =
            YAPIO_SYS_CALL(open)(file_per_process_name, oflags, 0644);

        if (yapioFileDescFpp[rank] < 0)
        {
            rc = -errno;
            log_msg(YAPIO_LL_ERROR, "open `%s': %s",
                    file_per_process_name, strerror(errno));
        }
        else
        {
            log_msg(YAPIO_LL_DEBUG, "%s", file_per_process_name);

            if (yapioModeCurrent == YAPIO_IO_MODE_MMAP)
            {
                size_t len = (yapioMyTestGroup->ytg_num_blks_per_rank *
                              yapioMyTestGroup->ytg_blk_sz);

                if (ftruncate(yapioFileDescFpp[rank], len))
                {
                    log_msg(YAPIO_LL_FATAL, "ftruncate(): %s",
                            strerror(errno));
                }
            }
        }
    }

    return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1010, %rsp           # imm = 0x1010
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
cmpl %edi, 0x205446(%rip)    # 0x20c270
jle 0x6e55
movl %esi, %ebp
movl %edi, %r14d
movq %rsp, %rdi
movl %r14d, %esi
callq 0x6efe
movl %eax, %ebx
testl %eax, %eax
jne 0x6e55
movq 0xe0fca7(%rip), %rax    # 0xe16af0
movslq %r14d, %r14
xorl %ebx, %ebx
cmpl $0x0, (%rax,%r14,4)
js 0x6e63
movl %ebx, %eax
addq $0x1010, %rsp           # imm = 0x1010
popq %rbx
popq %r14
popq %rbp
retq
movq 0x53ae(%rip), %rax      # 0xc218
movq %rsp, %rdi
movl %ebp, %esi
movl $0x1a4, %edx            # imm = 0x1A4
callq *(%rax)
movq 0xe0fc73(%rip), %rcx    # 0xe16af0
movl %eax, (%rcx,%r14,4)
testl %eax, %eax
js 0x6ecf
cmpl $0x3, 0x5394(%rip)      # 0xc220
jge 0x6ef4
cmpl $0x3, 0x205403(%rip)    # 0x20c298
jne 0x6e55
movq 0x53b2(%rip), %rax      # 0xc250
movq 0xb028(%rax), %rsi
imulq 0xb020(%rax), %rsi
movq 0xe0fc3c(%rip), %rax    # 0xe16af0
movl (%rax,%r14,4), %edi
callq 0x2350
testl %eax, %eax
je 0x6e55
cmpl $0x0, 0x5358(%rip)      # 0xc220
js 0x6e55
callq 0x281d
callq 0x2250
movl (%rax), %edi
movl %edi, %ebx
negl %ebx
cmpl $0x0, 0x533f(%rip)      # 0xc220
jle 0x6e55
movq %rsp, %rsi
callq 0x2870
jmp 0x6e55
movq %rsp, %rdi
callq 0x27dd
jmp 0x6e8e
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_make_filename
static int
yapio_make_filename(char *file_name, int rank)
{
    int rc = rank >= 0 ?
        snprintf(file_name, PATH_MAX, "%s%s.%d",
                 yapioTestFileNamePrefix, yapioTestFileName, rank) :
        snprintf(file_name, PATH_MAX, "%s%s",
                 yapioTestFileNamePrefix, yapioTestFileName);

    if (rc > PATH_MAX)
    {
        log_msg(YAPIO_LL_ERROR, "%s", strerror(ENAMETOOLONG));
        return -ENAMETOOLONG;
    }

    return 0;
}

// Assembly:
pushq %rbx
movq 0x5332(%rip), %rcx      # 0xc238
testl %esi, %esi
js 0x6f29
movl %esi, %r9d
leaq 0x2258(%rip), %rdx      # 0x916c
leaq 0xe0eba5(%rip), %r8     # 0xe15ac0
movl $0x1000, %esi           # imm = 0x1000
xorl %eax, %eax
callq 0x2080
jmp 0x6f43
leaq 0x20d0(%rip), %rdx      # 0x9000
leaq 0xe0eb89(%rip), %r8     # 0xe15ac0
movl $0x1000, %esi           # imm = 0x1000
xorl %eax, %eax
callq 0x2080
xorl %ebx, %ebx
cmpl $0x1001, %eax           # imm = 0x1001
jl 0x6f5a
movl $0xffffffdc, %ebx       # imm = 0xFFFFFFDC
cmpl $0x0, 0x52c8(%rip)      # 0xc220
jg 0x6f5e
movl %ebx, %eax
popq %rbx
retq
callq 0x28c1
jmp 0x6f5a
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_stats_reporting
static void *
yapio_stats_reporting(void *unused_arg)
{
    int remaining_test_contexts_to_report = 0;

    yapio_timer_t start_time;
    yapio_get_time(&start_time);

    do
    {
        pthread_mutex_lock(&yapioThreadMutex);

        remaining_test_contexts_to_report =
            yapio_stats_report_iterate(start_time);

        if (remaining_test_contexts_to_report)
            pthread_cond_wait(&yapioThreadCond, &yapioThreadMutex);

        pthread_mutex_unlock(&yapioThreadMutex);
    } while (remaining_test_contexts_to_report && !yapioHaltStonewallThread);

    log_msg(YAPIO_LL_DEBUG,
            "remaining_test_contexts_to_report=%d yapioHaltStonewallThread=%d",
            remaining_test_contexts_to_report, yapioHaltStonewallThread);

    if (remaining_test_contexts_to_report)
        yapio_stats_report_iterate(start_time);

    return unused_arg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7333
leaq 0xe0fb44(%rip), %r15    # 0xe16ac8
leaq 0xe10b8d(%rip), %r12    # 0xe17b18
movq %r15, %rdi
callq 0x2370
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x7355
movl %eax, %r14d
testl %eax, %eax
je 0x6fcd
movq %r12, %rdi
movq %r15, %rsi
callq 0x22d0
movq %r15, %rdi
callq 0x23b0
cmpb $0x1, 0xe10b85(%rip)    # 0xe17b48
jne 0x6f8b
movl $0x1, %r10d
jmp 0x6fe1
leaq 0xe0faf4(%rip), %rdi    # 0xe16ac8
callq 0x23b0
movzbl 0xe10b67(%rip), %r10d   # 0xe17b48
cmpl $0x3, 0x5238(%rip)      # 0xc220
jge 0x700d
testl %r14d, %r14d
je 0x6ffe
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x7355
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x4fcc(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x524a(%rip), %r8d      # 0xc268
leaq 0x21b8(%rip), %rsi      # 0x91dd
leaq 0x11bf(%rip), %rdx      # 0x81eb
leaq 0x21fa(%rip), %rcx      # 0x922d
movl $0xaca, %r9d            # imm = 0xACA
xorl %eax, %eax
pushq %r10
pushq %r14
callq 0x2390
addq $0x10, %rsp
jmp 0x6fea
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_test_context_alloc
static yapio_blk_md_t *
yapio_test_context_alloc(yapio_test_ctx_t *ytc,
                         enum yapio_test_ctx_mdh_in_out in_out, size_t nblks)
{
    if (in_out >= YAPIO_TEST_CTX_MDH_MAX)
    {
        errno = EINVAL;
        return NULL;
    }

    yapio_test_ctx_md_t *ytcmh = &ytc->ytc_in_out_md_ops[in_out];

    ytcmh->ytcmh_num_ops = nblks;
    ytcmh->ytcmh_ops = YAPIO_CALLOC(nblks, sizeof(yapio_blk_md_t));

    return ytcmh->ytcmh_ops;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %eax
shlq $0x4, %rax
leaq (%rdi,%rax), %r15
addq $0x68, %r15
movl %ebx, 0x8(%r15)
movl $0x10, %esi
movq %rdx, %rdi
callq 0x22e0
movq %rax, %r14
cmpl $0x3, 0x49af(%rip)      # 0xc220
jge 0x787f
movq %r14, (%r15)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x475a(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x49d8(%rip), %r8d      # 0xc268
shlq $0x4, %rbx
leaq 0x13eb(%rip), %rsi      # 0x8c86
leaq 0x949(%rip), %rdx       # 0x81eb
leaq 0x1cda(%rip), %rcx      # 0x9583
movl $0x752, %r9d            # imm = 0x752
xorl %eax, %eax
pushq %rbx
pushq %r14
callq 0x2390
addq $0x10, %rsp
jmp 0x7873
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_test_context_sequential_setup_for_rank
static void
yapio_test_context_sequential_setup_for_rank(yapio_test_ctx_t *ytc, int rank)
{
    int num_ops = 0;

    /* The local mode test case does not require the 'MDH_OUT' buffers at all.
     */
    enum yapio_test_ctx_mdh_in_out in_out = ytc->ytc_remote_locality ?
        YAPIO_TEST_CTX_MDH_OUT : YAPIO_TEST_CTX_MDH_IN;

    yapio_blk_md_t *md =
        yapio_test_ctx_to_md_array(ytc, in_out, &num_ops);

    if (!md)
        log_msg(YAPIO_LL_FATAL, "ytc_ops_md[%d] is NULL", rank);

    int skips_left = ytc->ytc_sparse_io;
    int i;
    for (i = 0; i < num_ops; i++)
    {
        size_t src_idx = ytc->ytc_backwards ? num_ops - i - 1 : i;

        bool skip_io = skip_io_or_not(num_ops - i, skips_left);

        /* update writer in case of write (which isn't skipped) */
        if (!ytc->ytc_read && !skip_io)
        {
            log_msg(YAPIO_LL_DEBUG, "update writer rank for op #%d\n", i);
            yapio_source_md_update_writer_rank(src_idx, rank);
        }

        md[i] = yapioSourceBlkMd[src_idx];

        if (skip_io)
        {
            log_msg(YAPIO_LL_DEBUG, "skip IO # %d\n", i);
            md[i].ybm_skip_io = 1;
            skips_left--;
        }

        unsigned long x = md[i].ybm_blk_number;
        log_msg(YAPIO_LL_TRACE, "writer_rank=%d md->ybm_blk_number=%zd",
                md[i].ybm_writer_rank, x);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0x14(%rsp)
movzbl (%rdi), %eax
andl $0x4, %eax
movl 0x70(%rdi,%rax,4), %ecx
movq %rcx, 0x18(%rsp)
movq %rdi, 0x20(%rsp)
movq 0x68(%rdi,%rax,4), %r15
testq %r15, %r15
jne 0x78fc
cmpl $0x0, 0x492a(%rip)      # 0xc220
jns 0x7a0f
cmpl $0x0, 0x18(%rsp)
jle 0x7a00
movq 0x20(%rsp), %rax
movl 0xa8(%rax), %ebp
movq 0x18(%rsp), %rax
movl %eax, %r14d
xorl %r13d, %r13d
movl %r14d, %edi
leal -0x1(%rdi), %r14d
movq 0x20(%rsp), %rax
testb $0x2, (%rax)
movl %r13d, %eax
cmovnel %r14d, %eax
movslq %eax, %r12
movl %ebp, %esi
callq 0x7a18
movl %eax, %ebx
testb %al, %al
jne 0x7967
movq 0x20(%rsp), %rax
movb (%rax), %al
andb $0x8, %al
jne 0x7967
cmpl $0x3, 0x48cb(%rip)      # 0xc220
jge 0x79f3
movq %r12, %rdi
movl 0x14(%rsp), %esi
callq 0x7a5b
movq 0x48f2(%rip), %rax      # 0xc260
shlq $0x4, %r12
movups (%rax,%r12), %xmm0
movups %xmm0, (%r15)
movl 0x489f(%rip), %eax      # 0xc220
testb %bl, %bl
je 0x7991
cmpl $0x3, %eax
jge 0x79b4
orb $-0x80, 0xf(%r15)
decl %ebp
cmpl $0x4, %eax
jge 0x79aa
incq %r13
addq $0x10, %r15
cmpq %r13, 0x18(%rsp)
jne 0x791d
jmp 0x7a00
movq %r15, %rdi
callq 0x2a9f
jmp 0x7996
movq 0x4625(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x48a3(%rip), %r8d      # 0xc268
movl %r13d, (%rsp)
leaq 0x1c4d(%rip), %rsi      # 0x961d
leaq 0x814(%rip), %rdx       # 0x81eb
leaq 0x1be4(%rip), %rcx      # 0x95c2
movl $0x77a, %r9d            # imm = 0x77A
xorl %eax, %eax
callq 0x2390
movl 0x482f(%rip), %eax      # 0xc220
jmp 0x798a
movl %r13d, %edi
callq 0x2a63
jmp 0x795b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x14(%rsp), %edi
callq 0x2aef
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: skip_io_or_not
static bool
skip_io_or_not(int ops_left, int skips_left)
{
    /* for random number generation */
    srand(time(NULL));

    /* skip randomly or skip all remaining IOs
     * because there's no room for choosing */
    if (skips_left &&
        (skips_left == ops_left || rand() % (ops_left / skips_left)))
        return true;
    else
        return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
xorl %edi, %edi
callq 0x2400
movl %eax, %edi
callq 0x22c0
testl %ebp, %ebp
je 0x7a52
movb $0x1, %bl
cmpl %r14d, %ebp
je 0x7a54
callq 0x2380
movl %eax, %ecx
movl %r14d, %eax
cltd
idivl %ebp
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %esi
testl %edx, %edx
jne 0x7a54
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: yapio_source_md_update_writer_rank
static void
yapio_source_md_update_writer_rank(size_t source_md_idx, int new_writer_rank)
{
    if (source_md_idx >= yapioMyTestGroup->ytg_num_blks_per_rank)
        log_msg(YAPIO_LL_FATAL, "out of bounds source_md_idx=%zu",
                source_md_idx);

    log_msg(YAPIO_LL_TRACE, "%d %zu", new_writer_rank, source_md_idx);

    yapioSourceBlkMd[source_md_idx].ybm_writer_rank = new_writer_rank;
    yapioSourceBlkMd[source_md_idx].ybm_not_hole = 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x47e7(%rip), %rax      # 0xc250
cmpq %rdi, 0xb020(%rax)
setbe %cl
movl 0x47a7(%rip), %eax      # 0xc220
testl %eax, %eax
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0x7ae5
movl %esi, %r14d
cmpl $0x4, %eax
jge 0x7aa9
movq 0x47cc(%rip), %rax      # 0xc260
shlq $0x4, %rbx
movl %r14d, (%rax,%rbx)
orb $0x40, 0xf(%rax,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x4530(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movl 0x47ae(%rip), %r8d      # 0xc268
leaq 0x1c00(%rip), %rsi      # 0x96c1
leaq 0x71d(%rip), %rdx       # 0x81e5
leaq 0x1bcf(%rip), %rcx      # 0x969e
movl $0x611, %r9d            # imm = 0x611
xorl %eax, %eax
pushq %rbx
pushq %r14
callq 0x2390
addq $0x10, %rsp
jmp 0x7a8d
movq %rbx, %rdi
callq 0x2b31
// File: /workspace/github_c_makefile_star2_O3/00pauln00[P]yapio/yapio.c
// Function: select_holes
static void
select_holes(int num_ops, int skips_left, yapio_blk_md_t *md)
{
    int i;
    for (i = 0; i < num_ops; i++)
    {
        if (skip_io_or_not(num_ops - i, skips_left))
        {
            log_msg(YAPIO_LL_DEBUG, "skip IO # %d\n", i);
            md[i].ybm_skip_io = 1;
            skips_left--;
        }
    }
}

// Assembly:
testl %edi, %edi
jle 0x7dd7
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
addq $0x8, %rbx
xorl %r15d, %r15d
movl %r14d, %edi
movl %ebp, %esi
callq 0x7a18
testb %al, %al
je 0x7db5
cmpl $0x3, 0x4473(%rip)      # 0xc220
jge 0x7dc3
orb $-0x80, 0x7(%rbx)
decl %ebp
incq %r15
addq $0x10, %rbx
decq %r14
jne 0x7d98
jmp 0x7dcd
movq %r15, %rdi
callq 0x2c0a
jmp 0x7daf
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/pair_sum/pair_sum_test.c
// Function: test_pair_sum
void test_pair_sum(void) {
	Vector numbers = vector_create(0, free);
	for (int i = 0; i < 10; i++)
		vector_insert_last(numbers, create_int(i));

	int a, b;
	TEST_ASSERT(!pair_sum(90, numbers, &a, &b));
	TEST_ASSERT( pair_sum(15, numbers, &a, &b));
	TEST_ASSERT(a + b == 15);

	vector_destroy(numbers);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x6387(%rip), %rsi      # 0x9fc0
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x4398
movq %rax, %rbx
movl $0x4, %edi
callq 0x21a0
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4469
incl %ebp
cmpl $0xa, %ebp
jne 0x3c45
leaq 0x4(%rsp), %rdx
movq %rsp, %rcx
movl $0x5a, %edi
movq %rbx, %rsi
callq 0x42a1
xorb $0x1, %al
movzbl %al, %edi
leaq 0x2694(%rip), %rsi      # 0x6318
leaq 0x275b(%rip), %rcx      # 0x63e6
leaq 0x2696(%rip), %r8       # 0x6328
movl $0x13, %edx
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3d27
leaq 0x4(%rsp), %rdx
movq %rsp, %rcx
movl $0xf, %edi
movq %rbx, %rsi
callq 0x42a1
movzbl %al, %edi
leaq 0x2653(%rip), %rsi      # 0x6318
leaq 0x271a(%rip), %rcx      # 0x63e6
leaq 0x2674(%rip), %r8       # 0x6347
movl $0x14, %edx
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3d27
movl (%rsp), %eax
addl 0x4(%rsp), %eax
xorl %edi, %edi
cmpl $0xf, %eax
sete %dil
leaq 0x261e(%rip), %rsi      # 0x6318
leaq 0x26e5(%rip), %rcx      # 0x63e6
leaq 0x265d(%rip), %r8       # 0x6365
movl $0x15, %edx
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3d27
movq %rbx, %rdi
callq 0x4585
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2e2b
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/pair_sum/pair_sum.c
// Function: pair_sum
bool pair_sum(int target, Vector numbers, int* res_a, int* res_b) {
	// Στο map θα αποθηκεύουμε τα στοιχεία του vector. Δεν κάνουμε malloc
	// οπότε δε θέλουμε και free, εμείς αποθηκεύουμε στοιχεία που έχουν δημιουργηθεί αλλού!
	Map seen = map_create((CompareFunc)compare_ints, NULL, NULL);
	bool result = false;

	int size = vector_size(numbers);
	for (int i = 0; i < size; i++) {
		int* a = vector_get_at(numbers, i);
		int b = target - *a;

		if (map_find(seen, &b) != NULL) {
			*res_a = *a;
			*res_b = b;
			result = true;
			break;
		}

		map_insert(seen, a, a);		// Για value θέλουμε μια οποιαδήποτε μη-NULL τιμή, οπότε το θέτουμε και αυτό ίσο με a
	}

	map_destroy(seen);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movl %edi, %ebp
leaq -0x27(%rip), %rdi       # 0x429c
xorl %r15d, %r15d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4680
movq %rax, %rbx
movq %r12, %rdi
callq 0x43d8
testl %eax, %eax
jle 0x4377
movl %eax, %r13d
movq %r14, 0x8(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x43dc
movq %rax, %r14
movl %ebp, %eax
subl (%r14), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x4744
movb $0x1, %r15b
testq %rax, %rax
jne 0x4362
movl $0x1, %r15d
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x4777
cmpl %r15d, %r13d
je 0x4391
movq %r12, %rdi
movl %r15d, %esi
callq 0x43dc
movq %rax, %r14
movl %ebp, %eax
subl (%r14), %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0x4744
incl %r15d
testq %rax, %rax
je 0x4319
decl %r15d
cmpl %r13d, %r15d
setl %r15b
movl (%r14), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq %rbx, %rdi
callq 0x4866
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x4377
nop
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/pair_sum/../../modules/UsingADTSet/ADTMap.c
// Function: map_create
Map map_create(CompareFunc compare, DestroyFunc destroy_key, DestroyFunc destroy_value) {
	assert(compare != NULL);	// LCOV_EXCL_LINE

	Map map = malloc(sizeof(*map));
	map->set = set_create((CompareFunc)compare_map_nodes, (DestroyFunc)destroy_map_node);
	map->compare = compare;
	map->destroy_key = destroy_key;
	map->destroy_value = destroy_value;
	return map;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x46d8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %edi
callq 0x21a0
movq %rax, %r12
leaq 0x4d(%rip), %rdi        # 0x46f7
leaq 0x59(%rip), %rsi        # 0x470a
callq 0x4904
movq %rax, (%r12)
movq %r15, 0x8(%r12)
movq %r14, 0x10(%r12)
movq %rbx, 0x18(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x275a(%rip), %rdi      # 0x6e39
leaq 0x2763(%rip), %rsi      # 0x6e49
leaq 0x277f(%rip), %rcx      # 0x6e6c
movl $0x2b, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/pair_sum/../../modules/UsingADTSet/ADTMap.c
// Function: destroy_map_node
static void destroy_map_node(MapNode node) {
	if (node->owner->destroy_key != NULL)
		node->owner->destroy_key(node->key);

	if (node->owner->destroy_value != NULL)
		node->owner->destroy_value(node->value);

	free(node);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x4724
movq (%rbx), %rdi
callq *%rcx
movq 0x10(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x4733
movq 0x8(%rbx), %rdi
callq *%rax
movq %rbx, %rdi
popq %rbx
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/pair_sum/../../modules/UsingADTSet/ADTMap.c
// Function: map_insert
void map_insert(Map map, Pointer key, Pointer value) {
	struct map_node search_node = { .key = key, .owner = map };

	MapNode node = set_find(map->set, &search_node);
	if (node != NULL) {
		if (key != node->key && map->destroy_key != NULL)
			map->destroy_key(node->key);

		if (value != node->value && map->destroy_value != NULL)
			map->destroy_value(node->value);

		node->key = key;
		node->value = value;
		return;
	}

	node = malloc(sizeof(*node));
	node->key = key;
	node->value = value;
	node->owner = map;

	set_insert(map->set, node);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %rsi
movq %r14, (%rsi)
movq $0x0, 0x8(%rsi)
movq %rdi, 0x10(%rsi)
movq (%rdi), %rdi
callq 0x4b89
testq %rax, %rax
je 0x47e0
movq %rax, %r12
movq (%rax), %rdi
cmpq %r14, %rdi
je 0x47c0
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x47c0
callq *%rax
movq 0x8(%r12), %rdi
cmpq %rbx, %rdi
je 0x47d5
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x47d5
callq *%rax
movq %r14, (%r12)
movq %rbx, 0x8(%r12)
jmp 0x4800
movl $0x18, %edi
callq 0x21a0
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq (%r15), %rdi
movq %rax, %rsi
callq 0x495e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/pair_sum/../../modules/UsingADTSet/ADTMap.c
// Function: map_remove
bool map_remove(Map map, Pointer key) {
	struct map_node search_node = { .key = key, .owner = map };

	MapNode node = set_find(map->set, &search_node);
	if (node == NULL)
		return false;

	set_remove(map->set, node);

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
movq $0x0, 0x8(%rax)
movq %rdi, 0x10(%rax)
movq (%rdi), %rdi
movq %rax, %rsi
callq 0x4b89
movq %rax, %r14
testq %rax, %rax
je 0x4846
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x4a56
testq %r14, %r14
setne %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/set_example/../../modules/UsingAVL/ADTSet.c
// Function: set_create
Set set_create(CompareFunc compare, DestroyFunc destroy_value) {
	assert(compare != NULL);	// LCOV_EXCL_LINE

	// δημιουργούμε το stuct
	Set set = malloc(sizeof(*set));
	set->root = NULL;			// κενό δέντρο
	set->size = 0;
	set->compare = compare;
	set->destroy_value = destroy_value;

	return set;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x493b
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x21a0
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x24f7(%rip), %rdi      # 0x6e39
leaq 0x2559(%rip), %rsi      # 0x6ea2
leaq 0x2572(%rip), %rcx      # 0x6ec2
movl $0x165, %edx            # imm = 0x165
callq 0x2110