// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdi
movl $0x8, %esi
callq 0x10a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdi
movl $0x8, %esi
callq 0x10a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x10a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
imulq (%rax), %rdi
movl $0x1, %esi
callq 0x10a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x4(%rsp)
cmpl $0x66, 0x4(%rsp)
jge 0x1a9f
movl $0x1, %edi
movl $0x30, %esi
callq 0x10a0
movq %rax, %rdx
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq %rdx, 0x28(%rax,%rcx,8)
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
cmpq $0x0, 0x28(%rax,%rcx,8)
je 0x1a5f
jmp 0x1a7e
leaq 0x27682(%rip), %rdi     # 0x290e8
leaq 0x2763d(%rip), %rsi     # 0x290aa
movl $0x1c6, %edx            # imm = 0x1C6
leaq 0x27682(%rip), %rcx     # 0x290fb
callq 0x1070
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq 0x28(%rax,%rcx,8), %rdi
callq 0x1bb0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1a23
movl $0x64, %edi
movl $0x8, %esi
callq 0x10a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x358(%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1aca
jmp 0x1ae9
leaq 0x2765d(%rip), %rdi     # 0x2912e
leaq 0x275d2(%rip), %rsi     # 0x290aa
movl $0x1cc, %edx            # imm = 0x1CC
leaq 0x27617(%rip), %rcx     # 0x290fb
callq 0x1070
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1af7
jmp 0x1b16
leaq 0x2763b(%rip), %rdi     # 0x29139
leaq 0x275a5(%rip), %rsi     # 0x290aa
movl $0x1cd, %edx            # imm = 0x1CD
leaq 0x275ea(%rip), %rcx     # 0x290fb
callq 0x1070
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1b24
jmp 0x1b43
leaq 0x2761e(%rip), %rdi     # 0x29149
leaq 0x27578(%rip), %rsi     # 0x290aa
movl $0x1ce, %edx            # imm = 0x1CE
leaq 0x275bd(%rip), %rcx     # 0x290fb
callq 0x1070
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1b51
jmp 0x1b70
leaq 0x275fe(%rip), %rdi     # 0x29156
leaq 0x2754b(%rip), %rsi     # 0x290aa
movl $0x1cf, %edx            # imm = 0x1CF
leaq 0x27590(%rip), %rcx     # 0x290fb
callq 0x1070
movq 0x10(%rsp), %rax
cmpq $0x0, 0x358(%rax)
je 0x1b81
jmp 0x1ba0
leaq 0x275de(%rip), %rdi     # 0x29166
leaq 0x2751b(%rip), %rsi     # 0x290aa
movl $0x1d0, %edx            # imm = 0x1D0
leaq 0x27560(%rip), %rcx     # 0x290fb
callq 0x1070
xorl %eax, %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)