// File: /workspace/github_c_makefile_star2_O3/oreparaz[P]dudect/src/dudect.h
// Function: dudect_init
int dudect_init(dudect_ctx_t *ctx, dudect_config_t *conf)
{
  ctx->config = (dudect_config_t*) calloc(1, sizeof(*conf));
  ctx->config->number_measurements = conf->number_measurements;
  ctx->config->chunk_size = conf->chunk_size;
  ctx->ticks = (int64_t*) calloc(ctx->config->number_measurements, sizeof(int64_t));
  ctx->exec_times = (int64_t*) calloc(ctx->config->number_measurements, sizeof(int64_t));
  ctx->classes = (uint8_t*) calloc(ctx->config->number_measurements, sizeof(uint8_t));
  ctx->input_data = (uint8_t*) calloc(ctx->config->number_measurements * ctx->config->chunk_size, sizeof(uint8_t));

  for (int i = 0; i < DUDECT_TESTS; i++) {
    ctx->ttest_ctxs[i] = (ttest_ctx_t *)calloc(1, sizeof(ttest_ctx_t));
    assert(ctx->ttest_ctxs[i]);
    t_init(ctx->ttest_ctxs[i]);
  }

  ctx->percentiles = (int64_t*) calloc(DUDECT_NUMBER_PERCENTILES, sizeof(int64_t));

  assert(ctx->ticks);
  assert(ctx->exec_times);
  assert(ctx->classes);
  assert(ctx->input_data);
  assert(ctx->percentiles);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x10b0
movq %rax, 0x20(%rbx)
movq 0x8(%r14), %rbp
movq %rbp, 0x8(%rax)
movq (%r14), %r13
movq %r13, (%rax)
movl $0x8, %esi
movq %rbp, %rdi
callq 0x10b0
movq %rax, %r14
movq %rax, (%rbx)
movl $0x8, %esi
movq %rbp, %rdi
callq 0x10b0
movq %rax, %r15
movq %rax, 0x8(%rbx)
movl $0x1, %esi
movq %rbp, %rdi
callq 0x10b0
movq %rax, %r12
movq %rax, 0x18(%rbx)
imulq %rbp, %r13
movl $0x1, %esi
movq %r13, %rdi
callq 0x10b0
movq %rax, %r13
movq %rax, 0x10(%rbx)
movl $0x5, %ebp
movl $0x1, %edi
movl $0x30, %esi
callq 0x10b0
movq %rax, (%rbx,%rbp,8)
testq %rax, %rax
je 0x1964
incq %rbp
cmpq $0x6b, %rbp
jne 0x18f7
movl $0x64, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, 0x358(%rbx)
testq %r14, %r14
je 0x1983
testq %r15, %r15
je 0x19a2
testq %r12, %r12
je 0x19c1
testq %r13, %r13
je 0x19e0
testq %rax, %rax
je 0x19ff
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c79d(%rip), %rdi     # 0x1e108
leaq 0x1c758(%rip), %rsi     # 0x1e0ca
leaq 0x1c7a2(%rip), %rcx     # 0x1e11b
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x1080
leaq 0x1c7c4(%rip), %rdi     # 0x1e14e
leaq 0x1c739(%rip), %rsi     # 0x1e0ca
leaq 0x1c783(%rip), %rcx     # 0x1e11b
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x1080
leaq 0x1c7b0(%rip), %rdi     # 0x1e159
leaq 0x1c71a(%rip), %rsi     # 0x1e0ca
leaq 0x1c764(%rip), %rcx     # 0x1e11b
movl $0x1cd, %edx            # imm = 0x1CD
callq 0x1080
leaq 0x1c7a1(%rip), %rdi     # 0x1e169
leaq 0x1c6fb(%rip), %rsi     # 0x1e0ca
leaq 0x1c745(%rip), %rcx     # 0x1e11b
movl $0x1ce, %edx            # imm = 0x1CE
callq 0x1080
leaq 0x1c78f(%rip), %rdi     # 0x1e176
leaq 0x1c6dc(%rip), %rsi     # 0x1e0ca
leaq 0x1c726(%rip), %rcx     # 0x1e11b
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x1080
leaq 0x1c780(%rip), %rdi     # 0x1e186
leaq 0x1c6bd(%rip), %rsi     # 0x1e0ca
leaq 0x1c707(%rip), %rcx     # 0x1e11b
movl $0x1d0, %edx            # imm = 0x1D0
callq 0x1080