#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 */
float exp(double);
float normalise_score(float score, float n, float ntot, float ntotseq) {
  float ret;
  if (n == 0)
    ret = 0.0;
  else
    ret = (float)(score * exp(-10.0 * (float)(ntot - n) / ((float)(ntot))));
  return ret;
}


x86 assembly (clang, -O0):
<normalise_score>:
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_score+0x40>
jp     1150 <normalise_score+0x40>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1197 <normalise_score+0x87>
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>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalise_score>:
movaps %xmm0,%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    111e <normalise_score+0xe>
jp     111e <normalise_score+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>
mulss  0x4(%rsp),%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define float @normalise_score(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 %25
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 float @exp(double %22)
%24 = fmul float %14, %23
store float %24, float* %9
br label %25
25: ; preds = %13, %12
%26 = load float, float* %9
ret float %26
}

LLVM IR (-O2):
define float @normalise_score(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %1, 0.000000e+00
br i1 %5, label %14, 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 float @exp(double %11)
%13 = fmul float %12, %0
br label %14
14: ; preds = %4, %6
%15 = phi float [ %13, %6 ], [ 0.000000e+00, %4 ]
ret float %15
}