// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x1
popq %r14
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x10b0
movq %rax, 0x20(%rbx)
movq 0x8(%r15), %rbp
movq %rbp, 0x8(%rax)
movq (%r15), %r15
movq %r15, (%rax)
pushq $0x8
popq %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x10b0
movq %rax, 0x10(%rsp)
movq %rax, (%rbx)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x10b0
movq %rax, 0x8(%rsp)
movq %rax, 0x8(%rbx)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x10b0
movq %rax, (%rsp)
movq %rax, 0x18(%rbx)
imulq %rbp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x10b0
movq %rax, %rbp
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
pushq $0x30
popq %r15
pushq $-0x2
popq %r13
cmpq $0x66, %r12
je 0x17a4
movq %r14, %rdi
movq %r15, %rsi
callq 0x10b0
movq %rax, 0x28(%rbx,%r12,8)
testq %rax, %rax
je 0x17f4
movq %r13, %rcx
testq %rcx, %rcx
je 0x179f
andq $0x0, 0x10(%rax,%rcx,8)
andq $0x0, 0x20(%rax,%rcx,8)
andq $0x0, 0x30(%rax,%rcx,8)
incq %rcx
jmp 0x1783
incq %r12
jmp 0x1765
pushq $0x64
popq %rdi
pushq $0x8
popq %rsi
callq 0x10b0
movq %rax, 0x358(%rbx)
cmpq $0x0, 0x10(%rsp)
je 0x1813
cmpq $0x0, 0x8(%rsp)
je 0x1832
cmpq $0x0, (%rsp)
je 0x1851
testq %rbp, %rbp
je 0x1870
testq %rax, %rax
je 0x188f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c8fd(%rip), %rdi     # 0x1e0f8
leaq 0x1c8b8(%rip), %rsi     # 0x1e0ba
leaq 0x1c902(%rip), %rcx     # 0x1e10b
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x1080
leaq 0x1c924(%rip), %rdi     # 0x1e13e
leaq 0x1c899(%rip), %rsi     # 0x1e0ba
leaq 0x1c8e3(%rip), %rcx     # 0x1e10b
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x1080
leaq 0x1c910(%rip), %rdi     # 0x1e149
leaq 0x1c87a(%rip), %rsi     # 0x1e0ba
leaq 0x1c8c4(%rip), %rcx     # 0x1e10b
movl $0x1cd, %edx            # imm = 0x1CD
callq 0x1080
leaq 0x1c901(%rip), %rdi     # 0x1e159
leaq 0x1c85b(%rip), %rsi     # 0x1e0ba
leaq 0x1c8a5(%rip), %rcx     # 0x1e10b
movl $0x1ce, %edx            # imm = 0x1CE
callq 0x1080
leaq 0x1c8ef(%rip), %rdi     # 0x1e166
leaq 0x1c83c(%rip), %rsi     # 0x1e0ba
leaq 0x1c886(%rip), %rcx     # 0x1e10b
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x1080
leaq 0x1c8e0(%rip), %rdi     # 0x1e176
leaq 0x1c81d(%rip), %rsi     # 0x1e0ba
leaq 0x1c867(%rip), %rcx     # 0x1e10b
movl $0x1d0, %edx            # imm = 0x1D0
callq 0x1080