#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ exp(double);
float normalise_sudirore(float score, float n, float ntot, float ntotseq) {
  float ret;
  if (n == 0)
    ret = 0.0;
  else
    ret = score *
          (float)exp((double)(-10.0 * (float)(ntot - n) / ((float)(ntot))));
  return ret;
}


x86 assembly (clang, -O0):
<normalise_sudirore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1150 <normalise_sudirore+0x40>
jp     1150 <normalise_sudirore+0x40>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1199 <normalise_sudirore+0x89>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe90(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalise_sudirore>:
movaps %xmm0,%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    111e <normalise_sudirore+0xe>
jp     111e <normalise_sudirore+0xe>
ret
push   %rax
movss  %xmm3,0x4(%rsp)
xorps  %xmm3,%xmm3
cvtss2sd %xmm2,%xmm3
subss  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
mulsd  0xec1(%rip),%xmm0
divsd  %xmm3,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mulss  0x4(%rsp),%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define float @normalise_sudirore(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%10 = load float, float* %6
%11 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %4
store float 0.000000e+00, float* %9
br label %26
13: ; preds = %4
%14 = load float, float* %5
%15 = load float, float* %7
%16 = load float, float* %6
%17 = fsub float %15, %16
%18 = fpext float %17 to double
%19 = fmul double -1.000000e+01, %18
%20 = load float, float* %7
%21 = fpext float %20 to double
%22 = fdiv double %19, %21
%23 = call i64 @exp(double %22)
%24 = sitofp i64 %23 to float
%25 = fmul float %14, %24
store float %25, float* %9
br label %26
26: ; preds = %13, %12
%27 = load float, float* %9
ret float %27
}

LLVM IR (-O2):
define float @normalise_sudirore(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %1, 0.000000e+00
br i1 %5, label %15, label %6
6: ; preds = %4
%7 = fsub float %2, %1
%8 = fpext float %7 to double
%9 = fmul double %8, -1.000000e+01
%10 = fpext float %2 to double
%11 = fdiv double %9, %10
%12 = tail call i64 @exp(double %11)
%13 = sitofp i64 %12 to float
%14 = fmul float %13, %0
br label %15
15: ; preds = %4, %6
%16 = phi float [ %14, %6 ], [ 0.000000e+00, %4 ]
ret float %16
}