LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/randomizer.c
// Function: get_random_number
int get_random_number(struct measuresuite *ms, size_t max, size_t *dest) {

  // calc mask
  size_t mask = 1;
  do {
    mask = ~(~mask << 1); // shift left 1, will w/1's
  } while (mask < max);

  do {
    if (get_random_qword(ms, dest)) {
      return 1;
    }
    *dest &= mask;
    if (*dest <= max) {
      break;
    }
    randomize(ms);
  } while (1);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x1, -0x28(%rbp)
movq -0x28(%rbp), %rax
xorq $-0x1, %rax
shlq %rax
xorq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x337c
jmp 0x339b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x32f0
cmpl $0x0, %eax
je 0x33b6
movl $0x1, -0x4(%rbp)
jmp 0x33eb
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
andq (%rax), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
ja 0x33d3
jmp 0x33e4
movq -0x10(%rbp), %rdi
callq 0x3100
movb $0x1, %al
testb $0x1, %al
jne 0x339b
jmp 0x33e4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: set_argwidth
int set_argwidth(measuresuite_t ms, unsigned int arg_width) {
  if (arg_width < 1) {
    ms->errorno = E_INVALID_INPUT__ARG_WIDTH;
    return 1;
  }
  ms->arg_width = arg_width;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jae 0x3428
movq -0x10(%rbp), %rax
movl $0x1, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x343b
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: set_argin
int set_argin(measuresuite_t ms, unsigned int arg_in) {
  if (arg_in < 1 || arg_in >= max_number_arguments) {
    ms->errorno = E_INVALID_INPUT__NUM_ARG_IN;
    return 1;
  }
  ms->num_arg_in = arg_in;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jb 0x345a
movl -0x14(%rbp), %eax
cmpq $0x6, %rax
jb 0x3471
movq -0x10(%rbp), %rax
movl $0x3, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3485
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: set_argout
int set_argout(measuresuite_t ms, unsigned int arg_out) {
  if (arg_out < 1 || arg_out > max_number_arguments) {
    ms->errorno = E_INVALID_INPUT__NUM_ARG_OUT;
    return 1;
  }
  ms->num_arg_out = arg_out;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jb 0x34aa
movl -0x14(%rbp), %eax
cmpq $0x6, %rax
jbe 0x34c1
movq -0x10(%rbp), %rax
movl $0x4, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x34d5
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: validate_num_args
int validate_num_args(measuresuite_t ms) {
  if (ms->num_arg_out + ms->num_arg_in > max_number_arguments) {
    ms->errorno = E_INVALID_INPUT__NUM_ARG_TOO_LARGE;
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x8(%rcx), %rax
cmpq $0x6, %rax
jbe 0x3515
movq -0x10(%rbp), %rax
movl $0x5, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x351c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: create_default_ms
measuresuite_t create_default_ms() {
  measuresuite_t ms = calloc(1, sizeof(struct measuresuite));
  // set some defaults to allocate some space
  // You usually want num_batches to be odd, and batch_size depends on the
  // size of the function. Longer functions require smaller batches and vice
  // versa. Both however, depend on the frequency of the CPU. You may do a
  // statistical test and see how confident those numbers are
  const int default_num_batches = 101;
  ms->num_batches = default_num_batches;
  const int default_batch_size = 20;
  ms->batch_size = default_batch_size;

  // initialize the functions-structure
  const int default_size_functions = 2; // a / b testing
  ms->size_functions = default_size_functions;
  ms->num_functions = 0; // currently, we have none loaded
  ms->functions = calloc(ms->size_functions, sizeof(struct function_tuple));

  if (ms->functions == NULL) {
    ms->errorno = E_INTERNAL_INITIALIZE__ALLOC;
    ms->additional_info = strerror(errno);
    return ms;
  }

  ms->enable_check = 0;
  ms->bounds = NULL;
  ms->chunk_size = 0;
  ms->errorno = E_SUCCESS;
  ms->random_data_fd = -1;

  // timer
  ms->timer.fdperf = -1;
  ms->timer.buf = NULL;
  ms->timer.timer_function = NULL;

  return ms;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x1, %edi
movl $0xb0, %esi
callq 0x2150
movq %rax, -0x10(%rbp)
movl $0x65, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq $0x65, 0x28(%rax)
movl $0x14, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq $0x14, 0x30(%rax)
movl $0x2, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq $0x2, 0x78(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movl $0x28, %esi
callq 0x2150
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x35ed
movq -0x10(%rbp), %rax
movl $0x17, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3662
movq -0x10(%rbp), %rax
movb 0x68(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x68(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x98(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: set_bounds
int set_bounds(measuresuite_t ms, const uint64_t *bounds) {

  if (bounds == NULL) {
    ms->errorno = E_INVALID_INPUT__BOUNDS_NULL;
    return 1;
  }
  if (ms->arg_width <= 0) {
    ms->errorno = E_INVALID_INPUT__ARG_WIDTH;
    return 1;
  }

  ms->bounds = calloc(ms->arg_width, sizeof(uint64_t));
  if (ms->bounds == NULL) {
    ms->errorno = E_INTERNAL_INITIALIZE__ALLOC;
    return 1;
  }
  memcpy(ms->bounds, bounds, ms->arg_width * sizeof(uint64_t));
  // could tests access here, but if its not an proper array, then the
  // measure-call will SIGSEGV
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x36c1
movq -0x10(%rbp), %rax
movl $0x2, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3743
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
ja 0x36e2
movq -0x10(%rbp), %rax
movl $0x1, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3743
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x8, %esi
callq 0x2150
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3720
movq -0x10(%rbp), %rax
movl $0x17, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3743
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
shlq $0x3, %rdx
callq 0x21a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: set_num_batches
int set_num_batches(measuresuite_t ms, unsigned int num_batches) {
  if (num_batches <= 0) {
    ms->errorno = E_INVALID_INPUT__NUM_BATCHES;
    return 1;
  }
  ms->num_batches = num_batches;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
ja 0x3778
movq -0x10(%rbp), %rax
movl $0x6, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x378c
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/struct_helpers.c
// Function: set_batch_size
int set_batch_size(measuresuite_t ms, unsigned int batch_size) {
  if (batch_size <= 0) {
    ms->errorno = E_INVALID_INPUT__BATCH_SIZE;
    return 1;
  }
  ms->batch_size = batch_size;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
ja 0x37c8
movq -0x10(%rbp), %rax
movl $0x7, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x37dc
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: realloc_or_fail
int realloc_or_fail(struct measuresuite *ms, void **dest, size_t new_len) {

  DEBUG("Reallocing to new length of %lu bytes\n", new_len);

  *dest = realloc(*dest, new_len);

  if (*dest == NULL) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x21c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3859
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3860
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: map_rwx
int map_rwx(struct measuresuite *ms, void **dest, size_t new_len) {
  int fd_zero = open("/dev/zero", O_RDWR);
  if (fd_zero == -1) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  *dest = mmap(NULL, new_len, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE,
               fd_zero, 0);
  // NOLINTNEXTLINE
  if (*dest == MAP_FAILED) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  if (close(fd_zero) == -1) { /*No longer needed*/
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x3f05(%rip), %rdi      # 0x7790
movl $0x2, %esi
movb $0x0, %al
callq 0x21e0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x38d4
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3983
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x7, %edx
movl $0x2, %ecx
movq %r9, %rdi
callq 0x2090
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $-0x1, %rcx
cmpq %rcx, (%rax)
jne 0x393e
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3983
movl -0x24(%rbp), %edi
callq 0x2130
cmpl $-0x1, %eax
jne 0x397c
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3983
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: realloc_rwx_or_fail
int realloc_rwx_or_fail(struct measuresuite *ms, void **dest, size_t old_len,
                        size_t new_len) {
  // not using mremap here, because it may clash with errno (and USE_GNU)
  if (munmap(*dest, old_len)) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  return map_rwx(ms, *dest, new_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x21d0
cmpl $0x0, %eax
je 0x39ee
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3a05
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x3870
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: unmap
int unmap(struct measuresuite *ms, void *dest, size_t old_len) {
  if (dest == NULL) {
    return 0;
  }
  if (munmap(dest, old_len)) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3a34
movl $0x0, -0x4(%rbp)
jmp 0x3a7e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x21d0
cmpl $0x0, %eax
je 0x3a77
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3a7e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: init_arithmetic_results
int init_arithmetic_results(measuresuite_t ms, struct function_tuple *fct) {

  /** Arithmetic Res */
  /** +---------------------------------------------------------+ */
  /** |         out1 , out2, ... , out[#numArgOut]              | */
  /** +---------------------------------------------------------+ */
  /**     ^---   out1 * arg_width */

  /** Out1  each sizeof(u64)*/
  /** +---------------------------------------------------------+ */
  /** |         out1[0] , out1[1], ... , out1[#arg_width]       | */
  /** +---------------------------------------------------------+ */

  size_t size = ms->arg_width * ms->num_arg_out * sizeof(uint64_t);
  DEBUG("init_arithmetic_results, size: %lu\n", size);

  fct->arithmetic_results = malloc(size);

  if (fct->arithmetic_results == NULL) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x10(%rcx), %rax
shlq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x21b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3b08
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3b0f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: init_cycle_results
int init_cycle_results(struct measuresuite *ms) {

  FOR_EACH_FUNCTION {

    fct->cycle_results = malloc(ms->num_batches * sizeof(uint64_t));

    if (fct->cycle_results == 0) {
      ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
      ms->additional_info = strerror(errno);
      return 1;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x70(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x80(%rdx), %rdx
subq $0x1, %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x3bca
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
shlq $0x3, %rdi
callq 0x21b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x3bb7
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3bd1
jmp 0x3bb9
movq -0x18(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x18(%rbp)
jmp 0x3b38
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/alloc_helper.c
// Function: init_json
int init_json(struct measuresuite *ms) {

  const unsigned long char_per_long = 10;
  // at max, every function poduces one long per batch
  const unsigned long char_per_batch = char_per_long * ms->size_functions;

  // every batch produces char_per_batch' chars
  const unsigned long dynamic_length = char_per_batch * ms->num_batches;

  // the static stuff...
  const int len_other_stats = 1025;
  ms->json_len = len_other_stats + dynamic_length;

  ms->json = calloc(ms->json_len, sizeof(char));
  if (ms->json == NULL) {
    ms->errorno = E_INTERNAL_MEASURE__AI__ALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0xa, -0x18(%rbp)
movq -0x10(%rbp), %rax
imulq $0xa, 0x78(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq 0x28(%rcx), %rax
movq %rax, -0x28(%rbp)
movl $0x401, -0x2c(%rbp)     # imm = 0x401
movq -0x28(%rbp), %rcx
addq $0x401, %rcx            # imm = 0x401
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movl $0x1, %esi
callq 0x2150
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3c85
movq -0x10(%rbp), %rax
movl $0x16, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3c8c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/timer.c
// Function: current_timestamp
uint64_t current_timestamp() {
  struct timeval time = {0};
  gettimeofday(&time, NULL); // get current time

  const long long millisonds_per_second = 1000LL;
  const long long microseconds_per_millisecond = 1000LL;
  uint64_t milliseconds =
      time.tv_sec * millisonds_per_second +
      time.tv_usec / microseconds_per_millisecond; // calculate milliseconds

  return milliseconds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2110
leaq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20f0
movq $0x3e8, -0x18(%rbp)     # imm = 0x3E8
movq $0x3e8, -0x20(%rbp)     # imm = 0x3E8
imulq $0x3e8, -0x10(%rbp), %rax # imm = 0x3E8
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/timer.c
// Function: init_timer
int init_timer(struct measuresuite *ms) {

  // init timer struct
  memset(&ms->timer, 0, sizeof(ms->timer));

  // try to initialize
  init_fdperf(ms);

  if (ms->timer.fdperf == -1) {
    // if that  failed, we need to resort to RDTSCP
    ms->timer.timer_function = measuresuite_time_rdtscp;
  } else {
    // otherwise we'd use pmc
    ms->timer.timer_function = measuresuite_time_pmc;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq -0x8(%rbp), %rdi
callq 0x3d80
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x98(%rax)
jne 0x3d5d
movq -0x8(%rbp), %rax
leaq 0x3ac(%rip), %rcx       # 0x4100
movq %rcx, 0xa8(%rax)
jmp 0x3d6f
movq -0x8(%rbp), %rax
leaq 0xe8(%rip), %rcx        # 0x3e50
movq %rcx, 0xa8(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/timer.c
// Function: init_fdperf
static void init_fdperf(volatile struct measuresuite *ms) {
  struct perf_event_attr attr = {
      .type = PERF_TYPE_HARDWARE,
      .config = PERF_COUNT_HW_CPU_CYCLES,
      .exclude_kernel = 1,
      .size = sizeof(struct perf_event_attr),
      .exclude_hv = 1,
  };

  ms->timer.fdperf = get_fdperf(&attr);
  DEBUG("fdperf for the PERF Event page: %d.\n", ms->timer.fdperf);

  if (ms->timer.fdperf == -1) {
    return;
  }
  ms->timer.buf = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ, MAP_SHARED,
                       ms->timer.fdperf, 0);
  // NOLINTNEXTLINE (mmap - api)
  if (ms->timer.buf == MAP_FAILED) {
    ms->timer.fdperf = -1;
    perror("mmap (for performance counter) failed");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x2110
movl $0x80, -0x84(%rbp)
movb $0x60, -0x60(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x40a0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x98(%rax)
movq -0x8(%rbp), %rax
movl 0x98(%rax), %eax
cmpl $-0x1, %eax
jne 0x3dd9
jmp 0x3e44
movl $0x1e, %edi
callq 0x2210
movq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x98(%rax), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %ecx
movq %r9, %rdi
movl %ecx, %edx
callq 0x2090
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x3e44
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x98(%rax) # imm = 0xFFFFFFFF
leaq 0x39c7(%rip), %rdi      # 0x7806
callq 0x2200
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/timer.c
// Function: end_timer
int end_timer(struct measuresuite *ms) {

  if (ms_get_timer(ms) == RDTSCP) {
    return 0;
  }

  // otherwise we used pmc
  assert(ms->timer.buf != NULL); // and  the buffer shall not be NULL

  if (munmap(ms->timer.buf, sysconf(_SC_PAGESIZE)) == 0) {
    ms->timer.buf = NULL;
    ioctl(ms->timer.fdperf, PERF_EVENT_IOC_DISABLE, 0);
    close(ms->timer.fdperf);
    return 0;
  }
  perror("munmap of timer buffer (pmc) failed.");
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2da0
cmpl $0x1, %eax
jne 0x3f46
movl $0x0, -0x4(%rbp)
jmp 0x3ff1
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x3f56
jmp 0x3f75
leaq 0x383d(%rip), %rdi      # 0x779a
leaq 0x384c(%rip), %rsi      # 0x77b0
movl $0xdf, %edx
leaq 0x384c(%rip), %rcx      # 0x77bc
callq 0x2100
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x1e, %edi
callq 0x2210
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x21d0
cmpl $0x0, %eax
jne 0x3fde
movq -0x10(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
movl 0x98(%rax), %edi
movl $0x2401, %esi           # imm = 0x2401
xorl %edx, %edx
movb $0x0, %al
callq 0x2120
movq -0x10(%rbp), %rax
movl 0x98(%rax), %edi
callq 0x2130
movl $0x0, -0x4(%rbp)
jmp 0x3ff1
leaq 0x37fc(%rip), %rdi      # 0x77e1
callq 0x2200
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/timer.c
// Function: start_timer
void start_timer(struct measuresuite *ms, uint64_t *start) {
  // we need to reset the PMC if we are using them.

  if (ms_get_timer(ms) == PMC) {
    ioctl(ms->timer.fdperf, PERF_EVENT_IOC_RESET, 0);
  }
  *start = ms->timer.timer_function(ms);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2da0
cmpl $0x0, %eax
jne 0x4036
movq -0x8(%rbp), %rax
movl 0x98(%rax), %edi
movl $0x2403, %esi           # imm = 0x2403
xorl %edx, %edx
movb $0x0, %al
callq 0x2120
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/timer.c
// Function: measuresuite_time_rdtscp
static uint64_t measuresuite_time_rdtscp() {
  // eax: low 32
  // edx: high 32
  uint64_t result = 0;
  __asm__ __volatile__("lfence;\n\t"
                       "rdtscp;\n\t"
                       "shl $0x20, %%rdx; \n\t"
                       "or %%rdx, %%rax; \n\t"
                       "mov %%rax, %[time]; \n\t"
                       "cpuid; \n\t"
                       : [time] "=&m"(result)::"rax", "rbx", "rcx", "rdx",
                         "memory");
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq $0x0, -0x10(%rbp)
lfence
rdtscp
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, -0x10(%rbp)
cpuid
movq -0x10(%rbp), %rax
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/error/description.c
// Function: get_error_string
const char *get_error_string(ERROR_NUMBER err) {
  for (size_t i = 0; i < sizeof(error_desc) / sizeof(error_desc[0]); i++) {
    if (error_desc[i].errno == err) {
      return error_desc[i].message;
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x22, -0x18(%rbp)
jae 0x418b
movq -0x18(%rbp), %rcx
leaq 0x6a6f(%rip), %rax      # 0xabc0
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x417b
movq -0x18(%rbp), %rcx
leaq 0x6a56(%rip), %rax      # 0xabc0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x4193
jmp 0x417d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x413f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/loader.c
// Function: unload
int unload(measuresuite_t ms, size_t id) {

  struct function_tuple *fct = &ms->functions[id];

  free(fct->arithmetic_results);
  fct->arithmetic_results = NULL;

  free(fct->cycle_results);
  fct->cycle_results = NULL;

  int ret = 0;
  switch (fct->type) {
  case SHARED_OBJECT:
    ret = so_unload_file(ms, fct);
    break;
  case ASM:
#if USE_ASSEMBLYLINE
    if (fct->al == NULL || asm_destroy_instance(fct->al)) {
      ms->errorno = E_LOAD__AL_FREE;
      ret = 1;
    }
    fct->al = NULL;
    __attribute__((fallthrough));
#endif
  case BIN:
  case ELF:
    unmap(ms, fct->code, fct->code_size_bytes);
    fct->code_size_bytes = 0;
  }

  ms->num_functions--;
  reset_permutaions(ms);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x10(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2040
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
subl $0x3, %eax
jb 0x46cd
jmp 0x46b1
movl -0x20(%rbp), %eax
subl $0x3, %eax
jne 0x46f2
jmp 0x46bb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x58a0
movl %eax, -0x1c(%rbp)
jmp 0x46f2
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x3a10
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rdi
callq 0x4720
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/loader.c
// Function: reset_permutaions
static int reset_permutaions(measuresuite_t ms) {

  // allocate permutation
  ms->permutation =
      realloc(ms->permutation, ms->num_functions * sizeof(size_t));

  if (ms->permutation == NULL) {
    ms->errorno = E_INTERNAL_RANDOMNESS__AI__MALLOC;
    ms->additional_info = strerror(errno);
    return 1;
  }

  for (size_t i = 0; i < ms->num_functions; i++) {
    ms->permutation[i] = i;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
shlq $0x3, %rsi
callq 0x21c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x478f
movq -0x10(%rbp), %rax
movl $0xc, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x47d1
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x47ca
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x4797
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/loader.c
// Function: load_file_so
static int load_file_so(measuresuite_t ms, enum load_type type,
                        const char *filename, const char *symbol, int *id) {
  if (*id == -1) {
    if (create_new_function(ms, type, 0)) {
      return 1;
    }
    *id = (int)ms->num_functions - 1;
  }
  struct function_tuple *new = &ms->functions[*id];
  if (so_load_file(ms, new, filename) || so_load_symbol(ms, new, symbol)) {
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x49d8
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x4a40
cmpl $0x0, %eax
je 0x49c2
movl $0x1, -0x4(%rbp)
jmp 0x4a2e
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl %eax, %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x30(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5750
cmpl $0x0, %eax
jne 0x4a1e
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x5810
cmpl $0x0, %eax
je 0x4a27
movl $0x1, -0x4(%rbp)
jmp 0x4a2e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/checker.c
// Function: check
int check(size_t len, const uint64_t *data, const uint64_t *check_data) {
  size_t total = len;
  int res = OK;
  data += len;
  check_data += len;
  // check first.
  while (len--) {
    res |= (*(--data) != *(--check_data));
  }

  // if where is a mistake, print all
  if (res == WRONG) {
    pretty_print_results(data, check_data, total);
  }
  // and return the result anyway
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
shlq $0x3, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
shlq $0x3, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4d8e
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, -0x10(%rbp)
movq -0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $-0x8, %rdx
movq %rdx, -0x18(%rbp)
cmpq -0x8(%rcx), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x4d43
cmpl $0x1, -0x24(%rbp)
jne 0x4da5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x63c0
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_memory.c
// Function: find_section_offset_mem
void find_section_offset_mem(const uint8_t *src, Elf64_Ehdr hdr,
                             Elf64_Shdr sh_table[], const char *needle,
                             unsigned long *dest) {

  size_t len_needle = strlen(needle);

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

  for (int i = 0; i < hdr.e_shnum; i++) {
    char *name = sh_str + sh_table[i].sh_name;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2080
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movzwl 0x3e(%rax), %eax
shlq $0x6, %rax
addq %rax, %rsi
leaq -0x30(%rbp), %rdx
callq 0x5320
movl $0x0, -0x34(%rbp)
movq -0x48(%rbp), %rcx
movl -0x34(%rbp), %eax
movzwl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
jge 0x530a
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2070
cmpl $0x0, %eax
jne 0x52fd
movslq -0x34(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x530a
jmp 0x52ff
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x52af
movq -0x30(%rbp), %rdi
callq 0x2040
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_memory.c
// Function: read_section_mem
static int read_section_mem(const uint8_t *src, 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;
  }

  memcpy(*dest, src + (off_t)sect_hdr->sh_offset, sect_hdr->sh_size);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x21b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x20(%rbp)
jne 0x5382
movq 0x5c9f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0x2d2d(%rip), %rsi      # 0x8098
leaq 0x2d46(%rip), %rdx      # 0x80b8
movb $0x0, %al
callq 0x2180
movl $0x1, -0x4(%rbp)
jmp 0x53a9
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
addq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
callq 0x21a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/elf_memory.c
// Function: read_elf_header_mem
int read_elf_header_mem(const uint8_t *src, Elf64_Ehdr *elf_header) {
  size_t size = sizeof(Elf64_Ehdr);
  char magic[] = {"\177ELF"};
  if (elf_header == NULL                                     // sanity
      || memcpy(elf_header, src, size) == NULL               // 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x40, -0x20(%rbp)
movl 0x2b05(%rip), %eax      # 0x8093
movl %eax, -0x25(%rbp)
movb 0x2b00(%rip), %al       # 0x8097
movb %al, -0x21(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x55e4
movq -0x18(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x21a0
movq -0x30(%rbp), %rax
cmpq $0x0, %rax
je 0x55e4
movq -0x18(%rbp), %rdi
leaq -0x25(%rbp), %rsi
movl $0x4, %edx
callq 0x2070
cmpl $0x0, %eax
jne 0x55e4
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x2, %eax
je 0x55ed
movl $0x1, -0x4(%rbp)
jmp 0x55f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/file.c
// Function: filesize
int filesize(measuresuite_t ms, const char *filename, size_t *size) {
  struct stat stats;
  DEBUG("trying to Stat file '%s'\n", filename);
  if (stat(filename, &stats)) {
    ms->errorno = E_INVALID_INPUT__FILE;
    ms->additional_info = strerror(errno);
    return 1;
  }
  *size = stats.st_size;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x2190
cmpl $0x0, %eax
je 0x565d
movq -0x10(%rbp), %rax
movl $0xb, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x566f
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/file.c
// Function: filecopy
int filecopy(measuresuite_t ms, void *dest, size_t dest_size,
             const char *filename) {
  size_t size = 0;
  if (filesize(ms, filename, &size) || size > dest_size) {
    return 1;
  }

  int file = open(filename, O_RDONLY | O_SYNC);
  if (file == -1                                      // open
      || read(file, dest, dest_size) != (ssize_t)size // read
      || close(file) == -1                            // close
  ) {
    ms->errorno = E_INVALID_INPUT__FILE;
    ms->additional_info = strerror(errno);
    return 1;
  };

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x5600
cmpl $0x0, %eax
jne 0x56c0
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x56c9
movl $0x1, -0x4(%rbp)
jmp 0x573d
movq -0x28(%rbp), %rdi
movl $0x101000, %esi         # imm = 0x101000
movb $0x0, %al
callq 0x21e0
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x5705
movl -0x34(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2140
cmpq -0x30(%rbp), %rax
jne 0x5705
movl -0x34(%rbp), %edi
callq 0x2130
cmpl $-0x1, %eax
jne 0x5736
movq -0x10(%rbp), %rax
movl $0xb, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x573d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/shared_object.c
// Function: so_load_file
int so_load_file(struct measuresuite *ms, struct function_tuple *fct,
                 const char *filename) {

  if (access(filename, F_OK | X_OK | R_OK) != 0) {
    ms->errorno = E_LOAD__SO_FILE;
    ms->additional_info = strerror(errno);
    return 1;
  }

  // clear error
  dlerror();

  // open
  fct->lib_handle = dlopen(filename, RTLD_NOW | RTLD_LOCAL);

  // check
  if (fct->lib_handle == NULL) {
    ms->errorno = E_INTERNAL_MEASURE__AI__DLOPEN;
    ms->additional_info = dlerror();
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x5, %esi
callq 0x21f0
cmpl $0x0, %eax
je 0x57a8
movq -0x10(%rbp), %rax
movl $0x1a, 0x88(%rax)
callq 0x2050
movl (%rax), %edi
callq 0x2240
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5802
callq 0x2030
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x2170
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x57fb
movq -0x10(%rbp), %rax
movl $0x15, 0x88(%rax)
callq 0x2030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5802
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/0xADE1A1DE[P]MeasureSuite/lib/src/io/shared_object.c
// Function: so_load_symbol
int so_load_symbol(struct measuresuite *ms, struct function_tuple *fct,
                   const char *symbol) {

  // sanity check  the handle
  if (fct->lib_handle == NULL) {
    return 1;
  }

  // clear error
  dlerror();

  // load
  fct->code = dlsym(fct->lib_handle, symbol);

  /// check
  if (fct->code == NULL) {
    ms->errorno = E_INTERNAL_MEASURE__AI__DLSYM;
    ms->additional_info = dlerror();
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x5838
movl $0x1, -0x4(%rbp)
jmp 0x5895
callq 0x2030
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x2220
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x588e
movq -0x10(%rbp), %rax
movl $0x14, 0x88(%rax)
callq 0x2030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5895
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x2030
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2250
cmpl $0x0, %eax
je 0x58f1
movq -0x10(%rbp), %rax
movl $0x13, 0x88(%rax)
callq 0x2030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x58f8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq 0x28(%rax), %rsi
xorl %edx, %edx
callq 0x20e0
movq -0x20(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x5948
movl $0x1, -0x4(%rbp)
jmp 0x5982
movq -0x20(%rbp), %rcx
movzwl 0x3c(%rcx), %eax
movzwl 0x3a(%rcx), %ecx
imulq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2140
cmpq -0x18(%rbp), %rax
je 0x597b
movl $0x1, -0x4(%rbp)
jmp 0x5982
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2080
movq -0x48(%rbp), %rcx
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rax
movzwl 0x3e(%rcx), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x30(%rbp), %rsi
callq 0x5a90
movl $0x0, -0x34(%rbp)
movq -0x48(%rbp), %rcx
movl -0x34(%rbp), %eax
movzwl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
jge 0x5a6f
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2070
cmpl $0x0, %eax
jne 0x5a62
movslq -0x34(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5a6f
jmp 0x5a64
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5a0e
movq -0x30(%rbp), %rdi
callq 0x2040
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)