#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 */
typedef double GLfloat;

/* Variables and functions */
int fabs(double);
void colorMap(GLfloat fin, GLfloat *fcol) {
  GLfloat dx = 0.05;
  GLfloat ga = (6.0 - 2.0 * dx) * fin + dx;
  fcol[0] = ((0) > ((3 - fabs(ga - 4) - fabs(ga - 5)) / 2)
                 ? (0)
                 : ((3 - fabs(ga - 4) - fabs(ga - 5)) / 2));
  fcol[1] = ((0) > ((4 - fabs(ga - 2) - fabs(ga - 4)) / 2)
                 ? (0)
                 : ((4 - fabs(ga - 2) - fabs(ga - 4)) / 2));
  fcol[2] = ((0) > ((3 - fabs(ga - 1) - fabs(ga - 2)) / 2)
                 ? (0)
                 : ((3 - fabs(ga - 1) - fabs(ga - 2)) / 2));
}


x86 assembly (clang, -O0):
<colorMap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xed1(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0x3,%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe77(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    11b7 <colorMap+0xa7>
xor    %eax,%eax
mov    %eax,-0x28(%rbp)
jmp    1201 <colorMap+0xf1>
movsd  -0x20(%rbp),%xmm0
movsd  0xe44(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0x3,%eax
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe1a(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xe03(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0x4,%eax
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xdc9(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    126d <colorMap+0x15d>
xor    %eax,%eax
mov    %eax,-0x34(%rbp)
jmp    12b7 <colorMap+0x1a7>
movsd  -0x20(%rbp),%xmm0
movsd  0xda6(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0x4,%eax
sub    %ecx,%eax
mov    %eax,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd6c(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xd54(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0x3,%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd2a(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1324 <colorMap+0x214>
xor    %eax,%eax
mov    %eax,-0x40(%rbp)
jmp    136e <colorMap+0x25e>
movsd  -0x20(%rbp),%xmm0
movsd  0xcf7(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0x3,%eax
sub    %ecx,%eax
mov    %eax,-0x44(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xccd(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colorMap>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r14
movapd %xmm0,%xmm1
mulsd  0xeda(%rip),%xmm1
addsd  0xeda(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xed4(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <fabs@plt>
mov    %eax,%ebx
movsd  0xec3(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
add    %ebx,%eax
add    $0xfffffffc,%eax
xorpd  %xmm0,%xmm0
test   %eax,%eax
jg     11a2 <colorMap+0x92>
movsd  0x10(%rsp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
add    %ebx,%eax
mov    $0x3,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r14)
movsd  0xe71(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
mov    %eax,%ebx
movsd  0x10(%rsp),%xmm0
call   1030 <fabs@plt>
add    %ebx,%eax
add    $0xfffffffb,%eax
test   %eax,%eax
xorpd  %xmm0,%xmm0
jg     1209 <colorMap+0xf9>
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%ebx
movsd  0x10(%rsp),%xmm0
call   1030 <fabs@plt>
add    %ebx,%eax
mov    $0x4,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%r14)
movsd  0x8(%rsp),%xmm0
addsd  0xe0b(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1030 <fabs@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
add    %ebx,%eax
add    $0xfffffffc,%eax
xorpd  %xmm0,%xmm0
test   %eax,%eax
jg     1271 <colorMap+0x161>
movsd  0x8(%rsp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
add    %ebx,%eax
mov    $0x3,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @colorMap(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double* %1, double** %4
store double 5.000000e-02, double* %5
%7 = load double, double* %5
%8 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %7, double 6.000000e+00)
%9 = load double, double* %3
%10 = load double, double* %5
%11 = call double @llvm.fmuladd.f64(double %8, double %9, double %10)
store double %11, double* %6
%12 = load double, double* %6
%13 = fsub double %12, 4.000000e+00
%14 = call i32 @fabs(double %13)
%15 = sub nsw i32 3, %14
%16 = load double, double* %6
%17 = fsub double %16, 5.000000e+00
%18 = call i32 @fabs(double %17)
%19 = sub nsw i32 %15, %18
%20 = sdiv i32 %19, 2
%21 = icmp sgt i32 0, %20
br i1 %21, label %22, label %23
22: ; preds = %2
br label %33
23: ; preds = %2
%24 = load double, double* %6
%25 = fsub double %24, 4.000000e+00
%26 = call i32 @fabs(double %25)
%27 = sub nsw i32 3, %26
%28 = load double, double* %6
%29 = fsub double %28, 5.000000e+00
%30 = call i32 @fabs(double %29)
%31 = sub nsw i32 %27, %30
%32 = sdiv i32 %31, 2
br label %33
33: ; preds = %23, %22
%34 = phi i32 [ 0, %22 ], [ %32, %23 ]
%35 = sitofp i32 %34 to double
%36 = load double*, double** %4
%37 = getelementptr inbounds double, double* %36, i64 0
store double %35, double* %37
%38 = load double, double* %6
%39 = fsub double %38, 2.000000e+00
%40 = call i32 @fabs(double %39)
%41 = sub nsw i32 4, %40
%42 = load double, double* %6
%43 = fsub double %42, 4.000000e+00
%44 = call i32 @fabs(double %43)
%45 = sub nsw i32 %41, %44
%46 = sdiv i32 %45, 2
%47 = icmp sgt i32 0, %46
br i1 %47, label %48, label %49
48: ; preds = %33
br label %59
49: ; preds = %33
%50 = load double, double* %6
%51 = fsub double %50, 2.000000e+00
%52 = call i32 @fabs(double %51)
%53 = sub nsw i32 4, %52
%54 = load double, double* %6
%55 = fsub double %54, 4.000000e+00
%56 = call i32 @fabs(double %55)
%57 = sub nsw i32 %53, %56
%58 = sdiv i32 %57, 2
br label %59
59: ; preds = %49, %48
%60 = phi i32 [ 0, %48 ], [ %58, %49 ]
%61 = sitofp i32 %60 to double
%62 = load double*, double** %4
%63 = getelementptr inbounds double, double* %62, i64 1
store double %61, double* %63
%64 = load double, double* %6
%65 = fsub double %64, 1.000000e+00
%66 = call i32 @fabs(double %65)
%67 = sub nsw i32 3, %66
%68 = load double, double* %6
%69 = fsub double %68, 2.000000e+00
%70 = call i32 @fabs(double %69)
%71 = sub nsw i32 %67, %70
%72 = sdiv i32 %71, 2
%73 = icmp sgt i32 0, %72
br i1 %73, label %74, label %75
74: ; preds = %59
br label %85
75: ; preds = %59
%76 = load double, double* %6
%77 = fsub double %76, 1.000000e+00
%78 = call i32 @fabs(double %77)
%79 = sub nsw i32 3, %78
%80 = load double, double* %6
%81 = fsub double %80, 2.000000e+00
%82 = call i32 @fabs(double %81)
%83 = sub nsw i32 %79, %82
%84 = sdiv i32 %83, 2
br label %85
85: ; preds = %75, %74
%86 = phi i32 [ 0, %74 ], [ %84, %75 ]
%87 = sitofp i32 %86 to double
%88 = load double*, double** %4
%89 = getelementptr inbounds double, double* %88, i64 2
store double %87, double* %89
ret void
}

LLVM IR (-O2):
define void @colorMap(double %0, double* nocapture writeonly %1) {
%3 = tail call double @llvm.fmuladd.f64(double %0, double 5.900000e+00, double 5.000000e-02)
%4 = fadd double %3, -4.000000e+00
%5 = tail call i32 @fabs(double %4)
%6 = fadd double %3, -5.000000e+00
%7 = tail call i32 @fabs(double %6)
%8 = add i32 %5, -4
%9 = add i32 %8, %7
%10 = icmp sgt i32 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %2
%12 = tail call i32 @fabs(double %4)
%13 = tail call i32 @fabs(double %6)
%14 = add i32 %12, %13
%15 = sub i32 3, %14
%16 = sdiv i32 %15, 2
%17 = sitofp i32 %16 to double
br label %18
18: ; preds = %2, %11
%19 = phi double [ %17, %11 ], [ 0.000000e+00, %2 ]
store double %19, double* %1
%20 = fadd double %3, -2.000000e+00
%21 = tail call i32 @fabs(double %20)
%22 = tail call i32 @fabs(double %4)
%23 = add i32 %21, -5
%24 = add i32 %23, %22
%25 = icmp sgt i32 %24, 0
br i1 %25, label %33, label %26
26: ; preds = %18
%27 = tail call i32 @fabs(double %20)
%28 = tail call i32 @fabs(double %4)
%29 = add i32 %27, %28
%30 = sub i32 4, %29
%31 = sdiv i32 %30, 2
%32 = sitofp i32 %31 to double
br label %33
33: ; preds = %18, %26
%34 = phi double [ %32, %26 ], [ 0.000000e+00, %18 ]
%35 = getelementptr inbounds double, double* %1, i64 1
store double %34, double* %35
%36 = fadd double %3, -1.000000e+00
%37 = tail call i32 @fabs(double %36)
%38 = tail call i32 @fabs(double %20)
%39 = add i32 %37, -4
%40 = add i32 %39, %38
%41 = icmp sgt i32 %40, 0
br i1 %41, label %49, label %42
42: ; preds = %33
%43 = tail call i32 @fabs(double %36)
%44 = tail call i32 @fabs(double %20)
%45 = add i32 %43, %44
%46 = sub i32 3, %45
%47 = sdiv i32 %46, 2
%48 = sitofp i32 %47 to double
br label %49
49: ; preds = %33, %42
%50 = phi double [ %48, %42 ], [ 0.000000e+00, %33 ]
%51 = getelementptr inbounds double, double* %1, i64 2
store double %50, double* %51
ret void
}