#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 */
int /*<<< orphan*/ exp(int);
int pow(double, int /*<<< orphan*/);
double normHill_mod(double x, double n, double k) {
  return (pow(x, exp(2 * k)) / (pow(x, exp(2 * k)) + pow(k, exp(2 * k))) *
              (1 + pow(k, exp(2 * k))) +
          0 * n);
}


x86 assembly (clang, -O0):
<normHill_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xeb7(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  -0x48(%rbp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    %eax,-0x2c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe88(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  -0x40(%rbp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    %eax,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe59(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  -0x38(%rbp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    -0x30(%rbp),%ecx
mov    %eax,%edx
mov    -0x2c(%rbp),%eax
add    %edx,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe1d(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  -0x28(%rbp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    $0x1,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  -0x10(%rbp),%xmm0
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normHill_mod>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
cvttsd2si %xmm0,%ebx
mov    %ebx,%edi
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <exp@plt>
movsd  0x10(%rsp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
add    %ebp,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <exp@plt>
movsd  0x10(%rsp),%xmm0
mov    %eax,%edi
call   1040 <pow@plt>
add    $0x1,%eax
imul   %ebp,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
xorpd  %xmm0,%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define double @normHill_mod(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fmul double 2.000000e+00, %8
%10 = fptosi double %9 to i32
%11 = call i32 @exp(i32 %10)
%12 = call i32 @pow(double %7, i32 %11)
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fmul double 2.000000e+00, %14
%16 = fptosi double %15 to i32
%17 = call i32 @exp(i32 %16)
%18 = call i32 @pow(double %13, i32 %17)
%19 = load double, double* %6
%20 = load double, double* %6
%21 = fmul double 2.000000e+00, %20
%22 = fptosi double %21 to i32
%23 = call i32 @exp(i32 %22)
%24 = call i32 @pow(double %19, i32 %23)
%25 = add nsw i32 %18, %24
%26 = sdiv i32 %12, %25
%27 = load double, double* %6
%28 = load double, double* %6
%29 = fmul double 2.000000e+00, %28
%30 = fptosi double %29 to i32
%31 = call i32 @exp(i32 %30)
%32 = call i32 @pow(double %27, i32 %31)
%33 = add nsw i32 1, %32
%34 = mul nsw i32 %26, %33
%35 = sitofp i32 %34 to double
%36 = load double, double* %5
%37 = call double @llvm.fmuladd.f64(double 0.000000e+00, double %36, double %35)
ret double %37
}

LLVM IR (-O2):
define double @normHill_mod(double %0, double %1, double %2) {
%4 = fmul double %2, 2.000000e+00
%5 = fptosi double %4 to i32
%6 = tail call i32 @exp(i32 %5)
%7 = tail call i32 @pow(double %0, i32 %6)
%8 = tail call i32 @exp(i32 %5)
%9 = tail call i32 @pow(double %0, i32 %8)
%10 = tail call i32 @exp(i32 %5)
%11 = tail call i32 @pow(double %2, i32 %10)
%12 = add nsw i32 %11, %9
%13 = sdiv i32 %7, %12
%14 = tail call i32 @exp(i32 %5)
%15 = tail call i32 @pow(double %2, i32 %14)
%16 = add nsw i32 %15, 1
%17 = mul nsw i32 %16, %13
%18 = sitofp i32 %17 to double
%19 = tail call double @llvm.fmuladd.f64(double %1, double 0.000000e+00, double %18)
ret double %19
}