#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 **dlogistic_map(const double *vector, int n, int t, double **matrix,
                       void *obj) {
  if (n < 1 || t < 0)
    return NULL;
  double *p = (double *)obj;
  double a = *p;
  matrix[0][0] = a - 2 * a * vector[0];
  return matrix;
}


x86 assembly (clang, -O0):
<dlogistic_map>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     112a <dlogistic_map+0x2a>
cmpl   $0x0,-0x18(%rbp)
jge    1137 <dlogistic_map+0x37>
movq   $0x0,-0x8(%rbp)
jmp    1198 <dlogistic_map+0x98>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  0xea7(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlogistic_map>:
xor    %eax,%eax
test   %esi,%esi
jle    112d <dlogistic_map+0x2d>
test   %edx,%edx
js     112d <dlogistic_map+0x2d>
movsd  (%r8),%xmm0
movsd  0xee9(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%rdi),%xmm1
addsd  %xmm0,%xmm1
mov    (%rcx),%rax
movsd  %xmm1,(%rax)
mov    %rcx,%rax
ret

LLVM IR (-O0):
define double** @dlogistic_map(double* %0, i32 %1, i32 %2, double** %3, i8* %4) {
%6 = alloca double**
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca double**
%11 = alloca i8*
%12 = alloca double*
%13 = alloca double
store double* %0, double** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store double** %3, double*** %10
store i8* %4, i8** %11
%14 = load i32, i32* %8
%15 = icmp slt i32 %14, 1
br i1 %15, label %19, label %16
16: ; preds = %5
%17 = load i32, i32* %9
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16, %5
store double** null, double*** %6
br label %38
20: ; preds = %16
%21 = load i8*, i8** %11
%22 = bitcast i8* %21 to double*
store double* %22, double** %12
%23 = load double*, double** %12
%24 = load double, double* %23
store double %24, double* %13
%25 = load double, double* %13
%26 = load double, double* %13
%27 = fmul double 2.000000e+00, %26
%28 = load double*, double** %7
%29 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
%31 = fneg double %27
%32 = call double @llvm.fmuladd.f64(double %31, double %30, double %25)
%33 = load double**, double*** %10
%34 = getelementptr inbounds double*, double** %33, i64 0
%35 = load double*, double** %34
%36 = getelementptr inbounds double, double* %35, i64 0
store double %32, double* %36
%37 = load double**, double*** %10
store double** %37, double*** %6
br label %38
38: ; preds = %20, %19
%39 = load double**, double*** %6
ret double** %39
}

LLVM IR (-O2):
define double** @dlogistic_map(double* nocapture %0, i32 %1, i32 %2, double** %3, i8* nocapture %4) {
%6 = icmp slt i32 %1, 1
%7 = icmp slt i32 %2, 0
%8 = or i1 %6, %7
br i1 %8, label %16, label %9
9: ; preds = %5
%10 = bitcast i8* %4 to double*
%11 = load double, double* %10
%12 = load double, double* %0
%13 = fmul double %11, -2.000000e+00
%14 = tail call double @llvm.fmuladd.f64(double %13, double %12, double %11)
%15 = load double*, double** %3
store double %14, double* %15
br label %16
16: ; preds = %5, %9
%17 = phi double** [ %3, %9 ], [ null, %5 ]
ret double** %17
}