// File: /workspace/github_c_makefile_star2_O2/oreparaz[P]dudect/src/dudect.h
// Function: dudect_main
dudect_state_t dudect_main(dudect_ctx_t *ctx) {
  prepare_inputs(ctx->config, ctx->input_data, ctx->classes);
  measure(ctx);

  bool first_time = ctx->percentiles[DUDECT_NUMBER_PERCENTILES - 1] == 0;

  dudect_state_t ret = DUDECT_NO_LEAKAGE_EVIDENCE_YET;
  if (first_time) {
    // throw away the first batch of measurements.
    // this helps warming things up.
    prepare_percentiles(ctx);
  } else {
    update_statistics(ctx);
    ret = report(ctx);
  }

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
callq 0x1675
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rsi
cmpq %rsi, %r14
jae 0x1311
mfence
rdtsc
shlq $0x20, %rdx
orq %rax, %rdx
movq (%rbx), %rax
movq %rdx, (%rax,%r14,8)
movq 0x20(%rbx), %rax
movq (%rax), %rdi
imulq %r14, %rdi
addq 0x10(%rbx), %rdi
callq 0x190f
incq %r14
jmp 0x12d8
xorl %ecx, %ecx
leaq -0x1(%rsi), %rdx
cmpq %rdx, %rcx
jae 0x1339
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
movq 0x8(%rdx,%rcx,8), %rdi
subq (%rdx,%rcx,8), %rdi
movq %rdi, (%rsi,%rcx,8)
incq %rcx
movq 0x8(%rax), %rsi
jmp 0x1313
movq 0x358(%rbx), %rax
cmpq $0x0, 0x318(%rax)
je 0x14a3
leaq 0x28(%rbx), %r14
pushq $0xa
popq %r15
movsd 0x1ccaa(%rip), %xmm1    # 0x1e008
decq %rsi
cmpq %rsi, %r15
jae 0x1419
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %r12
testq %r12, %r12
js 0x1409
cvtsi2sd %r12, %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rax
xorl %r13d, %r13d
movq (%rax), %rdi
movq 0x18(%rbx), %rax
movzbl (%rax,%r15), %esi
movsd (%rsp), %xmm0
callq 0x199d
movsd 0x1cc5f(%rip), %xmm1    # 0x1e008
leaq (%r14,%r13,8), %rax
movq %r13, %rcx
cmpq $0x64, %rcx
je 0x13d0
movq 0x358(%rbx), %rdx
leaq 0x1(%rcx), %r13
addq $0x8, %rax
cmpq (%rdx,%rcx,8), %r12
movq %r13, %rcx
jge 0x13b0
jmp 0x138b
movq (%r14), %rax
movsd 0x20(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1409
movq 0x18(%rbx), %rcx
movzbl (%rcx,%r15), %esi
movsd (%rsp), %xmm0
subsd (%rax,%rsi,8), %xmm0
movq 0x350(%rbx), %rdi
mulsd %xmm0, %xmm0
callq 0x199d
movsd 0x1cbff(%rip), %xmm1    # 0x1e008
incq %r15
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rsi
jmp 0x135e
xorpd %xmm2, %xmm2
xorl %ebx, %ebx
xorl %r15d, %r15d
cmpq $0x66, %rbx
je 0x146b
movq (%r14,%rbx,8), %rdi
movsd 0x20(%rdi), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1466
movsd %xmm2, (%rsp)
callq 0x1a0e
movsd 0x1cbbf(%rip), %xmm1    # 0x1e008
andpd 0x1cbff(%rip), %xmm0    # 0x1e050
movsd (%rsp), %xmm2
ucomisd %xmm2, %xmm0
maxsd %xmm2, %xmm0
cmovaq %rbx, %r15
movapd %xmm0, %xmm2
incq %rbx
jmp 0x1422
movq (%r14,%r15,8), %rbx
movq %rbx, %rdi
callq 0x1a0e
movsd 0x20(%rbx), %xmm1
addsd 0x28(%rbx), %xmm1
movapd %xmm0, (%rsp)
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
jb 0x155e
sqrtsd %xmm1, %xmm0
jmp 0x156d
movq 0x8(%rbx), %rdi
leaq 0x4da(%rip), %rcx       # 0x1988
pushq $0x8
popq %rdx
callq 0x1060
pushq $0x1
popq %r14
pushq $0x1
popq %rbp
cmpq $0x65, %r14
je 0x1626
movq 0x8(%rbx), %r15
cvtsi2sd %r14, %xmm0
mulsd 0x1cb50(%rip), %xmm0    # 0x1e028
divsd 0x1cb50(%rip), %xmm0    # 0x1e030
callq 0x1030
movsd 0x1cb4b(%rip), %xmm1    # 0x1e038
subsd %xmm0, %xmm1
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, %xmm0
punpckldq 0x1cb5a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1cb62(%rip), %xmm0    # 0x1e070
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %rdx
movq %rdx, %rsi
subsd 0x1cb12(%rip), %xmm2    # 0x1e040
cvttsd2si %xmm2, %rax
sarq $0x3f, %rsi
andq %rsi, %rax
orq %rdx, %rax
cmpq %rax, %rcx
jbe 0x1656
movq (%r15,%rax,8), %rax
movq 0x358(%rbx), %rcx
movq %rax, -0x8(%rcx,%r14,8)
incq %r14
jmp 0x14bd
movapd %xmm1, %xmm0
callq 0x10d0
movsd 0x20(%rsp), %xmm1
movsd %xmm0, 0x18(%rsp)
divsd 0x1ca95(%rip), %xmm1    # 0x1e010
leaq 0x1cc8e(%rip), %rdi     # 0x1e210
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x1070
movsd 0x20(%rsp), %xmm1
movsd 0x1ca6d(%rip), %xmm0    # 0x1e008
ucomisd %xmm1, %xmm0
jbe 0x15b8
subsd %xmm1, %xmm0
leaq 0x1cc75(%rip), %rdi     # 0x1e221
movb $0x1, %al
callq 0x1070
pushq $0x1
popq %rbp
jmp 0x1626
movapd (%rsp), %xmm0
andpd 0x1ca8b(%rip), %xmm0    # 0x1e050
movapd %xmm0, %xmm1
movapd %xmm0, (%rsp)
divsd 0x18(%rsp), %xmm1
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
movsd 0x1ca34(%rip), %xmm2    # 0x1e018
divsd %xmm3, %xmm2
leaq 0x1cc5f(%rip), %rdi     # 0x1e24e
movb $0x3, %al
callq 0x1070
movapd (%rsp), %xmm1
ucomisd 0x1ca1d(%rip), %xmm1    # 0x1e020
jbe 0x160e
leaq 0x1ccb4(%rip), %rdi     # 0x1e2c0
jmp 0x161f
ucomisd 0x1ca12(%rip), %xmm1    # 0x1e028
jbe 0x1637
leaq 0x1cc84(%rip), %rdi     # 0x1e2a3
callq 0x1050
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rbp
movsd 0x1c9e6(%rip), %xmm0    # 0x1e028
ucomisd %xmm1, %xmm0
jbe 0x1626
leaq 0x1cc2e(%rip), %rdi     # 0x1e27d
callq 0x1050
jmp 0x1626
leaq 0x1cb2a(%rip), %rdi     # 0x1e187
leaq 0x1ca56(%rip), %rsi     # 0x1e0ba
leaq 0x1cb32(%rip), %rcx     # 0x1e19d
movl $0xd3, %edx
callq 0x1080