#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 pow(double, double);
double TheFunction(double n) {
  return (((-3000) * pow(1.2, n)) / (pow(1.2, n) - 1) +
          175.0 * n / (pow(1.2, n) - 1) + 5000);
}


x86 assembly (clang, -O0):
<TheFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xede(%rip),%xmm0
call   1030 <pow@plt>
imul   $0xfffff448,%eax,%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xec3(%rip),%xmm0
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
sub    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeaa(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xe8b(%rip),%xmm0
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xe5d(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TheFunction>:
push   %rbx
sub    $0x20,%rsp
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0xeda(%rip),%xmm0
call   1030 <pow@plt>
imul   $0xfffff448,%eax,%ebx
movsd  0xec7(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <pow@plt>
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0xea5(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xe85(%rip),%xmm0
call   1030 <pow@plt>
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
addsd  0x18(%rsp),%xmm0
addsd  0xe6e(%rip),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @TheFunction(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @pow(double 1.200000e+00, double %3)
%5 = mul nsw i32 -3000, %4
%6 = load double, double* %2
%7 = call i32 @pow(double 1.200000e+00, double %6)
%8 = sub nsw i32 %7, 1
%9 = sdiv i32 %5, %8
%10 = sitofp i32 %9 to double
%11 = load double, double* %2
%12 = fmul double 1.750000e+02, %11
%13 = load double, double* %2
%14 = call i32 @pow(double 1.200000e+00, double %13)
%15 = sub nsw i32 %14, 1
%16 = sitofp i32 %15 to double
%17 = fdiv double %12, %16
%18 = fadd double %10, %17
%19 = fadd double %18, 5.000000e+03
ret double %19
}

LLVM IR (-O2):
define double @TheFunction(double %0) {
%2 = tail call i32 @pow(double 1.200000e+00, double %0)
%3 = mul nsw i32 %2, -3000
%4 = tail call i32 @pow(double 1.200000e+00, double %0)
%5 = add nsw i32 %4, -1
%6 = sdiv i32 %3, %5
%7 = sitofp i32 %6 to double
%8 = fmul double %0, 1.750000e+02
%9 = tail call i32 @pow(double 1.200000e+00, double %0)
%10 = add nsw i32 %9, -1
%11 = sitofp i32 %10 to double
%12 = fdiv double %8, %11
%13 = fadd double %12, %7
%14 = fadd double %13, 5.000000e+03
ret double %14
}