#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*/ _putpixel(int, int);
int /*<<< orphan*/ cleardevice();
int /*<<< orphan*/ closegraph();
int getmaxx();
int getmaxy();
int /*<<< orphan*/ initgraph(int *, int *, char *);
int /*<<< orphan*/ kbhit();
int /*<<< orphan*/ mouseclick();
int /*<<< orphan*/ outtextxy(int /*<<< orphan*/, int, char *);
int rand();
int /*<<< orphan*/ setbkcolor(int /*<<< orphan*/);
int /*<<< orphan*/ setcolor(int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int gd, gm;
  long int counter = 0;
  int midx, midy, scale;
  int k, prob;
  float x, y, xx, yy;
  float a[4] = {0.0, 0.85, 0.2, -0.15}, b[4] = {0.0, 0.04, -0.26, 0.28},
        c[4] = {0.0, 0.04, 0.23, 0.26}, d[4] = {0.16, 0.85, 0.22, 0.24},
        f[4] = {0.0, 1.6, 1.6, 0.44};
  gd = 11;
  gm = 7;
  initgraph(&gd, &gm, "");
  setbkcolor(0);
  cleardevice();
  setcolor(14);
  outtextxy(0, 0, "Press a key to exit: ");
  midx = getmaxx() / 2;
  midy = getmaxy() / 2;
  scale = getmaxx() / 16;
  x = y = 0.0;
  setcolor(2);
  while (!kbhit() && !mouseclick()) {
    prob = 1 + (rand() % (100));
    if (prob == 1)
      k = 0;
    if ((prob > 1) && (prob < 87))
      k = 1;
    if ((prob > 86) && (prob < 94))
      k = 2;
    if (prob > 93)
      k = 3;
    xx = a[k] * x + b[k] * y;
    yy = c[k] * x + d[k] * y + f[k];
    x = xx;
    y = yy;
    _putpixel(midx + scale * x, 2 * midy - scale * y);
    counter++;
    if (0 == counter % 100000)
      setcolor(1 + (rand() % (15)));
    if (1000000 == counter)
      break;
  }
  setcolor(2);
  outtextxy(0, 10, "Ok, leaving in 2 seconds");
  sleep(2);
  closegraph();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0xe08(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe05(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe02(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xdff(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xdfc(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xdf9(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xdf6(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xdf0(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xdea(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xde4(%rip),%rax
mov    %rax,-0x98(%rbp)
movl   $0xb,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    0xddd(%rip),%rdx
call   1040 <initgraph@plt>
xor    %edi,%edi
call   1060 <setbkcolor@plt>
mov    $0x0,%al
call   1050 <cleardevice@plt>
mov    $0xe,%edi
call   10c0 <setcolor@plt>
xor    %esi,%esi
lea    0xda2(%rip),%rdx
mov    %esi,%edi
call   1070 <outtextxy@plt>
mov    $0x0,%al
call   10b0 <getmaxx@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1080 <getmaxy@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   10b0 <getmaxx@plt>
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    $0x2,%edi
call   10c0 <setcolor@plt>
mov    $0x0,%al
call   1090 <kbhit@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa1(%rbp)
jne    1334 <main+0x164>
mov    $0x0,%al
call   1030 <mouseclick@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
test   $0x1,%al
jne    1347 <main+0x177>
jmp    14d2 <main+0x302>
mov    $0x0,%al
call   10f0 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x34(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    136d <main+0x19d>
movl   $0x0,-0x30(%rbp)
cmpl   $0x1,-0x34(%rbp)
jle    1388 <main+0x1b8>
cmpl   $0x57,-0x34(%rbp)
jge    1388 <main+0x1b8>
movl   $0x1,-0x30(%rbp)
cmpl   $0x56,-0x34(%rbp)
jle    13a3 <main+0x1d3>
cmpl   $0x5e,-0x34(%rbp)
jge    13a3 <main+0x1d3>
movl   $0x2,-0x30(%rbp)
cmpl   $0x5d,-0x34(%rbp)
jle    13b4 <main+0x1e4>
movl   $0x3,-0x30(%rbp)
movslq -0x30(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movss  -0x38(%rbp),%xmm2
movslq -0x30(%rbp),%rax
movss  -0x70(%rbp,%rax,4),%xmm1
mulss  -0x3c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
movslq -0x30(%rbp),%rax
movss  -0x80(%rbp,%rax,4),%xmm0
movss  -0x38(%rbp),%xmm2
movslq -0x30(%rbp),%rax
movss  -0x90(%rbp,%rax,4),%xmm1
ff ff
mulss  -0x3c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movslq -0x30(%rbp),%rax
addss  -0xa0(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x44(%rbp)
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
cvtsi2ssl -0x24(%rbp),%xmm1
cvtsi2ssl -0x2c(%rbp),%xmm0
movss  -0x38(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
mov    -0x28(%rbp),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
cvtsi2ssl -0x2c(%rbp),%xmm0
movss  -0x3c(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
call   10e0 <_putpixel@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    $0x186a0,%ecx
cqto
idiv   %rcx
xor    %eax,%eax
cmp    %rdx,%rax
jne    14b9 <main+0x2e9>
mov    $0x0,%al
call   10f0 <rand@plt>
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x1,%edi
call   10c0 <setcolor@plt>
mov    $0xf4240,%eax
cmp    -0x20(%rbp),%rax
jne    14cd <main+0x2fd>
jmp    14d2 <main+0x302>
jmp    1305 <main+0x135>
mov    $0x2,%edi
call   10c0 <setcolor@plt>
xor    %edi,%edi
mov    $0xa,%esi
lea    0xb7c(%rip),%rdx
call   1070 <outtextxy@plt>
mov    $0x2,%edi
call   10d0 <sleep@plt>
mov    $0x0,%al
call   10a0 <closegraph@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movl   $0xb,0x1c(%rsp)
movl   $0x7,0x18(%rsp)
lea    0xe80(%rip),%rdx
lea    0x1c(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1040 <initgraph@plt>
xor    %edi,%edi
call   1060 <setbkcolor@plt>
xor    %eax,%eax
call   1050 <cleardevice@plt>
mov    $0xe,%edi
call   10c0 <setcolor@plt>
lea    0xe3d(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1070 <outtextxy@plt>
xor    %eax,%eax
call   10b0 <getmaxx@plt>
mov    %eax,%r14d
shr    $0x1f,%r14d
add    %eax,%r14d
sar    %r14d
xor    %eax,%eax
call   1080 <getmaxy@plt>
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
and    $0xfffffffe,%ebp
xor    %eax,%eax
call   10b0 <getmaxx@plt>
lea    0xf(%rax),%ebx
test   %eax,%eax
cmovns %eax,%ebx
sar    $0x4,%ebx
mov    $0x2,%edi
call   10c0 <setcolor@plt>
cvtsi2ss %r14d,%xmm0
movss  %xmm0,0x14(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
cvtsi2ss %ebp,%xmm1
movss  %xmm1,0x10(%rsp)
movaps 0xd70(%rip),%xmm1
movaps %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm1
movaps %xmm1,0x20(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
mov    $0xffffffffffffffff,%r12
mov    $0x1,%ebp
mov    $0xf4240,%r13d
movabs $0xa7c5ac471b47843,%r14
5a 7c 0a
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
jmp    12e2 <main+0x112>
nopl   (%rax)
add    $0xffffffffffffffff,%r12
add    $0x1,%rbp
add    $0xffffffffffffffff,%r13
je     144b <main+0x27b>
mov    %rbp,%rax
shr    $0x5,%rax
mul    %r14
mov    %rdx,%rbx
xor    %eax,%eax
call   1090 <kbhit@plt>
test   %eax,%eax
jne    144b <main+0x27b>
xor    %eax,%eax
call   1030 <mouseclick@plt>
test   %eax,%eax
jne    144b <main+0x27b>
shr    $0x7,%rbx
imul   $0x186a0,%rbx,%rbx
add    %r12,%rbx
xor    %eax,%eax
call   10f0 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
mov    %eax,%edx
sub    %ecx,%edx
mov    %edx,%esi
sub    $0x1,%esi
mov    $0x0,%edi
cmovb  %edi,%r15d
cmp    $0x55,%esi
mov    $0x1,%esi
cmovb  %esi,%r15d
neg    %ecx
add    %ecx,%eax
add    $0xffffffaa,%eax
cmp    $0x7,%eax
mov    $0x2,%eax
cmovb  %eax,%r15d
cmp    $0x5d,%edx
mov    $0x3,%eax
cmovge %eax,%r15d
movslq %r15d,%rax
lea    0xc9e(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
movss  0xc(%rsp),%xmm1
mulss  %xmm1,%xmm0
lea    0xc78(%rip),%rcx
movss  (%rcx,%rax,4),%xmm3
movss  0x8(%rsp),%xmm2
mulss  %xmm2,%xmm3
lea    0xc92(%rip),%rcx
mulss  (%rcx,%rax,4),%xmm1
lea    0xc76(%rip),%rcx
mulss  (%rcx,%rax,4),%xmm2
addss  %xmm0,%xmm3
addss  %xmm2,%xmm1
lea    0xc82(%rip),%rcx
addss  (%rcx,%rax,4),%xmm1
movaps 0x30(%rsp),%xmm0
movss  %xmm3,0x8(%rsp)
mulss  %xmm3,%xmm0
addss  0x14(%rsp),%xmm0
cvttss2si %xmm0,%edi
movaps 0x20(%rsp),%xmm0
movss  %xmm1,0xc(%rsp)
mulss  %xmm1,%xmm0
addss  0x10(%rsp),%xmm0
cvttss2si %xmm0,%esi
call   10e0 <_putpixel@plt>
test   %rbx,%rbx
jne    12d0 <main+0x100>
xor    %eax,%eax
call   10f0 <rand@plt>
cltq
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x3,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x1,%edi
call   10c0 <setcolor@plt>
jmp    12d0 <main+0x100>
mov    $0x2,%edi
call   10c0 <setcolor@plt>
lea    0xc1a(%rip),%rdx
xor    %edi,%edi
mov    $0xa,%esi
call   1070 <outtextxy@plt>
mov    $0x2,%edi
call   10d0 <sleep@plt>
xor    %eax,%eax
call   10a0 <closegraph@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.a = [4 x float] [float 0.000000e+00, float 0x3FEB333340000000, float 0x3FC99999A0000000, float 0xBFC3333340000000]
@__const.main.b = [4 x float] [float 0.000000e+00, float 0x3FA47AE140000000, float 0xBFD0A3D700000000, float 0x3FD1EB8520000000]
@__const.main.c = [4 x float] [float 0.000000e+00, float 0x3FA47AE140000000, float 0x3FCD70A3E0000000, float 0x3FD0A3D700000000]
@__const.main.d = [4 x float] [float 0x3FC47AE140000000, float 0x3FEB333340000000, float 0x3FCC28F5C0000000, float 0x3FCEB851E0000000]
@__const.main.f = [4 x float] [float 0.000000e+00, float 0x3FF99999A0000000, float 0x3FF99999A0000000, float 0x3FDC28F5C0000000]
@.str = [1 x i8] zeroinitializer
@.str.1 = [22 x i8] c"Press a key to exit: \00"
@.str.2 = [25 x i8] c"Ok, leaving in 2 seconds\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca [4 x float]
%19 = alloca [4 x float]
%20 = alloca [4 x float]
%21 = alloca [4 x float]
%22 = alloca [4 x float]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %8
%23 = bitcast [4 x float]* %18 to i8*
%24 = bitcast [4 x float]* %19 to i8*
%25 = bitcast [4 x float]* %20 to i8*
%26 = bitcast [4 x float]* %21 to i8*
%27 = bitcast [4 x float]* %22 to i8*
store i32 11, i32* %6
store i32 7, i32* %7
%28 = call i32 @initgraph(i32* %6, i32* %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%29 = call i32 @setbkcolor(i32 0)
%30 = call i32 (...) @cleardevice()
%31 = call i32 @setcolor(i32 14)
%32 = call i32 @outtextxy(i32 0, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%33 = call i32 (...) @getmaxx()
%34 = sdiv i32 %33, 2
store i32 %34, i32* %9
%35 = call i32 (...) @getmaxy()
%36 = sdiv i32 %35, 2
store i32 %36, i32* %10
%37 = call i32 (...) @getmaxx()
%38 = sdiv i32 %37, 16
store i32 %38, i32* %11
store float 0.000000e+00, float* %15
store float 0.000000e+00, float* %14
%39 = call i32 @setcolor(i32 2)
br label %40
40: ; preds = %137, %2
%41 = call i32 (...) @kbhit()
%42 = icmp ne i32 %41, 0
br i1 %42, label %47, label %43
43: ; preds = %40
%44 = call i32 (...) @mouseclick()
%45 = icmp ne i32 %44, 0
%46 = xor i1 %45, true
br label %47
47: ; preds = %43, %40
%48 = phi i1 [ false, %40 ], [ %46, %43 ]
br i1 %48, label %49, label %138
49: ; preds = %47
%50 = call i32 (...) @rand()
%51 = srem i32 %50, 100
%52 = add nsw i32 1, %51
store i32 %52, i32* %13
%53 = load i32, i32* %13
%54 = icmp eq i32 %53, 1
br i1 %54, label %55, label %56
55: ; preds = %49
store i32 0, i32* %12
br label %56
56: ; preds = %55, %49
%57 = load i32, i32* %13
%58 = icmp sgt i32 %57, 1
br i1 %58, label %59, label %63
59: ; preds = %56
%60 = load i32, i32* %13
%61 = icmp slt i32 %60, 87
br i1 %61, label %62, label %63
62: ; preds = %59
store i32 1, i32* %12
br label %63
63: ; preds = %62, %59, %56
%64 = load i32, i32* %13
%65 = icmp sgt i32 %64, 86
br i1 %65, label %66, label %70
66: ; preds = %63
%67 = load i32, i32* %13
%68 = icmp slt i32 %67, 94
br i1 %68, label %69, label %70
69: ; preds = %66
store i32 2, i32* %12
br label %70
70: ; preds = %69, %66, %63
%71 = load i32, i32* %13
%72 = icmp sgt i32 %71, 93
br i1 %72, label %73, label %74
73: ; preds = %70
store i32 3, i32* %12
br label %74
74: ; preds = %73, %70
%75 = load i32, i32* %12
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [4 x float], [4 x float]* %18, i64 0, i64 %76
%78 = load float, float* %77
%79 = load float, float* %14
%80 = load i32, i32* %12
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [4 x float], [4 x float]* %19, i64 0, i64 %81
%83 = load float, float* %82
%84 = load float, float* %15
%85 = fmul float %83, %84
%86 = call float @llvm.fmuladd.f32(float %78, float %79, float %85)
store float %86, float* %16
%87 = load i32, i32* %12
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 %88
%90 = load float, float* %89
%91 = load float, float* %14
%92 = load i32, i32* %12
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [4 x float], [4 x float]* %21, i64 0, i64 %93
%95 = load float, float* %94
%96 = load float, float* %15
%97 = fmul float %95, %96
%98 = call float @llvm.fmuladd.f32(float %90, float %91, float %97)
%99 = load i32, i32* %12
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [4 x float], [4 x float]* %22, i64 0, i64 %100
%102 = load float, float* %101
%103 = fadd float %98, %102
store float %103, float* %17
%104 = load float, float* %16
store float %104, float* %14
%105 = load float, float* %17
store float %105, float* %15
%106 = load i32, i32* %9
%107 = sitofp i32 %106 to float
%108 = load i32, i32* %11
%109 = sitofp i32 %108 to float
%110 = load float, float* %14
%111 = call float @llvm.fmuladd.f32(float %109, float %110, float %107)
%112 = fptosi float %111 to i32
%113 = load i32, i32* %10
%114 = mul nsw i32 2, %113
%115 = sitofp i32 %114 to float
%116 = load i32, i32* %11
%117 = sitofp i32 %116 to float
%118 = load float, float* %15
%119 = fneg float %117
%120 = call float @llvm.fmuladd.f32(float %119, float %118, float %115)
%121 = fptosi float %120 to i32
%122 = call i32 @_putpixel(i32 %112, i32 %121)
%123 = load i64, i64* %8
%124 = add nsw i64 %123, 1
store i64 %124, i64* %8
%125 = load i64, i64* %8
%126 = srem i64 %125, 100000
%127 = icmp eq i64 0, %126
br i1 %127, label %128, label %133
128: ; preds = %74
%129 = call i32 (...) @rand()
%130 = srem i32 %129, 15
%131 = add nsw i32 1, %130
%132 = call i32 @setcolor(i32 %131)
br label %133
133: ; preds = %128, %74
%134 = load i64, i64* %8
%135 = icmp eq i64 1000000, %134
br i1 %135, label %136, label %137
136: ; preds = %133
br label %138
137: ; preds = %133
br label %40
138: ; preds = %136, %47
%139 = call i32 @setcolor(i32 2)
%140 = call i32 @outtextxy(i32 0, i32 10, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%141 = call i32 @sleep(i32 2)
%142 = call i32 (...) @closegraph()
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [4 x float] [float 0.000000e+00, float 0x3FEB333340000000, float 0x3FC99999A0000000, float 0xBFC3333340000000]
@__const.main.b = [4 x float] [float 0.000000e+00, float 0x3FA47AE140000000, float 0xBFD0A3D700000000, float 0x3FD1EB8520000000]
@__const.main.c = [4 x float] [float 0.000000e+00, float 0x3FA47AE140000000, float 0x3FCD70A3E0000000, float 0x3FD0A3D700000000]
@__const.main.d = [4 x float] [float 0x3FC47AE140000000, float 0x3FEB333340000000, float 0x3FCC28F5C0000000, float 0x3FCEB851E0000000]
@__const.main.f = [4 x float] [float 0.000000e+00, float 0x3FF99999A0000000, float 0x3FF99999A0000000, float 0x3FDC28F5C0000000]
@.str = [1 x i8] zeroinitializer
@.str.1 = [22 x i8] c"Press a key to exit: \00"
@.str.2 = [25 x i8] c"Ok, leaving in 2 seconds\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 11, i32* %3
store i32 7, i32* %4
%7 = call i32 @initgraph(i32* %3, i32* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @setbkcolor(i32 0)
%9 = call i32 (...) @cleardevice()
%10 = call i32 @setcolor(i32 14)
%11 = call i32 @outtextxy(i32 0, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @getmaxx()
%13 = sdiv i32 %12, 2
%14 = call i32 (...) @getmaxy()
%15 = sdiv i32 %14, 2
%16 = call i32 (...) @getmaxx()
%17 = sdiv i32 %16, 16
%18 = call i32 @setcolor(i32 2)
%19 = sitofp i32 %13 to float
%20 = sitofp i32 %17 to float
%21 = shl nsw i32 %15, 1
%22 = sitofp i32 %21 to float
%23 = fneg float %20
br label %24
24: ; preds = %76, %2
%25 = phi float [ 0.000000e+00, %2 ], [ %53, %76 ]
%26 = phi float [ 0.000000e+00, %2 ], [ %62, %76 ]
%27 = phi i32 [ undef, %2 ], [ %46, %76 ]
%28 = phi i64 [ 0, %2 ], [ %68, %76 ]
%29 = call i32 (...) @kbhit()
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %78
31: ; preds = %24
%32 = call i32 (...) @mouseclick()
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %78
34: ; preds = %31
%35 = call i32 (...) @rand()
%36 = srem i32 %35, 100
%37 = icmp eq i32 %36, 0
%38 = select i1 %37, i32 0, i32 %27
%39 = add nsw i32 %36, -1
%40 = icmp ult i32 %39, 85
%41 = select i1 %40, i32 1, i32 %38
%42 = add nsw i32 %36, -86
%43 = icmp ult i32 %42, 7
%44 = select i1 %43, i32 2, i32 %41
%45 = icmp sgt i32 %36, 92
%46 = select i1 %45, i32 3, i32 %44
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [4 x float], [4 x float]* @__const.main.a, i64 0, i64 %47
%49 = load float, float* %48
%50 = getelementptr inbounds [4 x float], [4 x float]* @__const.main.b, i64 0, i64 %47
%51 = load float, float* %50
%52 = fmul float %26, %51
%53 = call float @llvm.fmuladd.f32(float %49, float %25, float %52)
%54 = getelementptr inbounds [4 x float], [4 x float]* @__const.main.c, i64 0, i64 %47
%55 = load float, float* %54
%56 = getelementptr inbounds [4 x float], [4 x float]* @__const.main.d, i64 0, i64 %47
%57 = load float, float* %56
%58 = fmul float %26, %57
%59 = call float @llvm.fmuladd.f32(float %55, float %25, float %58)
%60 = getelementptr inbounds [4 x float], [4 x float]* @__const.main.f, i64 0, i64 %47
%61 = load float, float* %60
%62 = fadd float %61, %59
%63 = call float @llvm.fmuladd.f32(float %20, float %53, float %19)
%64 = fptosi float %63 to i32
%65 = call float @llvm.fmuladd.f32(float %23, float %62, float %22)
%66 = fptosi float %65 to i32
%67 = call i32 @_putpixel(i32 %64, i32 %66)
%68 = add nuw nsw i64 %28, 1
%69 = urem i64 %68, 100000
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %76
71: ; preds = %34
%72 = call i32 (...) @rand()
%73 = srem i32 %72, 15
%74 = add nsw i32 %73, 1
%75 = call i32 @setcolor(i32 %74)
br label %76
76: ; preds = %71, %34
%77 = icmp eq i64 %68, 1000000
br i1 %77, label %78, label %24
78: ; preds = %24, %76, %31
%79 = call i32 @setcolor(i32 2)
%80 = call i32 @outtextxy(i32 0, i32 10, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%81 = call i32 @sleep(i32 2)
%82 = call i32 (...) @closegraph()
ret i32 0
}