#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 */
double pow(int, int);
double generateLogisticMap(void) {
  static double xn = 0.7364738523;
  static double lambda = 3.8;
  double value = xn;
  value = xn * pow(10, 12);
  xn = (lambda * xn) * (1 - xn);
  lambda -= 0.0001;
  return value;
}


x86 assembly (clang, -O0):
<generateLogisticMap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0x2f08(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0x2efb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0xa,%edi
mov    $0xc,%esi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0x2ed6(%rip),%xmm0
mulsd  0x2ec6(%rip),%xmm0
movsd  0xe9e(%rip),%xmm1
subsd  0x2eb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x2eaa(%rip)
movsd  0x2eaa(%rip),%xmm0
movsd  0xe72(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2e96(%rip)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateLogisticMap>:
push   %rax
movsd  0x2f0f(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
mov    $0xc,%esi
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
movsd  0x2ef6(%rip),%xmm1
movsd  0x2ee6(%rip),%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
movsd  0xeae(%rip),%xmm4
subsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm4
movsd  %xmm4,0x2ec6(%rip)
addsd  0xe9e(%rip),%xmm1
movsd  %xmm1,0x2ebe(%rip)
pop    %rax
ret

LLVM IR (-O0):
@generateLogisticMap.xn = internal global double 0x3FE791319CBF9AB3
@generateLogisticMap.lambda = internal global double 3.800000e+00
define double @generateLogisticMap() {
%1 = alloca double
%2 = load double, double* @generateLogisticMap.xn
store double %2, double* %1
%3 = load double, double* @generateLogisticMap.xn
%4 = call double @pow(i32 10, i32 12)
%5 = fmul double %3, %4
store double %5, double* %1
%6 = load double, double* @generateLogisticMap.lambda
%7 = load double, double* @generateLogisticMap.xn
%8 = fmul double %6, %7
%9 = load double, double* @generateLogisticMap.xn
%10 = fsub double 1.000000e+00, %9
%11 = fmul double %8, %10
store double %11, double* @generateLogisticMap.xn
%12 = load double, double* @generateLogisticMap.lambda
%13 = fsub double %12, 1.000000e-04
store double %13, double* @generateLogisticMap.lambda
%14 = load double, double* %1
ret double %14
}

LLVM IR (-O2):
@generateLogisticMap.xn = internal unnamed_addr global double 0x3FE791319CBF9AB3
@generateLogisticMap.lambda = internal unnamed_addr global double 3.800000e+00
define double @generateLogisticMap() {
%1 = load double, double* @generateLogisticMap.xn
%2 = tail call double @pow(i32 10, i32 12)
%3 = fmul double %1, %2
%4 = load double, double* @generateLogisticMap.lambda
%5 = load double, double* @generateLogisticMap.xn
%6 = fmul double %4, %5
%7 = fsub double 1.000000e+00, %5
%8 = fmul double %6, %7
store double %8, double* @generateLogisticMap.xn
%9 = fadd double %4, -1.000000e-04
store double %9, double* @generateLogisticMap.lambda
ret double %3
}