#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*/ backface(int);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ color(int);
float cos(double);
int /*<<< orphan*/ doublebuffer();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ gconfig();
char getchar();
scalar_t__ getvaluator(int);
int /*<<< orphan*/ gexit();
int /*<<< orphan*/ lookat(double, double, int, double, double, double,
                          int /*<<< orphan*/);
int /*<<< orphan*/ makecyl();
int /*<<< orphan*/ perspective(int, double, double, double);
int /*<<< orphan*/ piston(float);
int /*<<< orphan*/ polymode(int);
int /*<<< orphan*/ popmatrix();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pushmatrix();
int /*<<< orphan*/ qdevice(int);
int qread(short *);
scalar_t__ qtest();
int /*<<< orphan*/ rotate(int, char);
int /*<<< orphan*/ swapbuffers();
int /*<<< orphan*/ unqdevice(int);
int /*<<< orphan*/ winopen(char *);
main() {
  int i, itest, dobackface, dofill, dodouble;
  char ans;
  float H;
  short idata;
  int xr, yr;
  printf("Backfacing ON or OFF (Y/N)? ");
  ans = getchar();
  (void)getchar();
  dobackface = (ans == 'y' || ans == 'Y');
  printf("Fill the polygons (Y/N)? ");
  ans = getchar();
  (void)getchar();
  dofill = (ans == 'y' || ans == 'Y');
  printf("double buffer (Y/N)? ");
  ans = getchar();
  dodouble = (ans == 'y' || ans == 'Y');
  winopen("piston");
  while (qread(&idata) != 261)
    ;
  if (dodouble)
    doublebuffer();
  gconfig();
  unqdevice(262);
  qdevice('Q');
  qdevice('\033');
  qdevice(261);
  makecyl();
  polymode(0);
  if (dofill)
    polymode(1);
  if (dobackface)
    backface(1);
  perspective(400, 1.5, 0.1, 600.0);
  lookat(0.0, -6.0, 4., 0.0, 0.0, 0.0, 0);
  xr = yr = 0;
  while (1) {
    for (i = 0; i < 360; i += 5) {
      color(0);
      clear();
      color(1);
      H = 1.0 + cos(2.0 * 3.14159265 * i / 180.0);
      yr = 500 - (int)getvaluator(2);
      xr = 500 - (int)getvaluator(1);
      yr = 500 - (int)getvaluator(2);
      xr *= 3;
      yr *= 3;
      pushmatrix();
      rotate(xr, 'x');
      rotate(yr, 'y');
      piston(H);
      popmatrix();
      if (dodouble)
        swapbuffers();
      if (qtest()) {
        itest = qread(&idata);
        if (itest == 'Q' || itest == '\033') {
          gexit();
          exit(0);
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xd92(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10b0 <getchar@plt>
mov    %al,-0x19(%rbp)
mov    $0x0,%al
call   10b0 <getchar@plt>
movsbl -0x19(%rbp),%ecx
mov    $0x1,%al
cmp    $0x79,%ecx
mov    %al,-0x2d(%rbp)
je     12db <main+0x4b>
movsbl -0x19(%rbp),%eax
cmp    $0x59,%eax
sete   %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
lea    0xd68(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10b0 <getchar@plt>
mov    %al,-0x19(%rbp)
mov    $0x0,%al
call   10b0 <getchar@plt>
movsbl -0x19(%rbp),%ecx
mov    $0x1,%al
cmp    $0x79,%ecx
mov    %al,-0x2e(%rbp)
je     1322 <main+0x92>
movsbl -0x19(%rbp),%eax
cmp    $0x59,%eax
sete   %al
mov    %al,-0x2e(%rbp)
mov    -0x2e(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
lea    0xd3b(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10b0 <getchar@plt>
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%ecx
mov    $0x1,%al
cmp    $0x79,%ecx
mov    %al,-0x2f(%rbp)
je     1362 <main+0xd2>
movsbl -0x19(%rbp),%eax
cmp    $0x59,%eax
sete   %al
mov    %al,-0x2f(%rbp)
mov    -0x2f(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
lea    0xd11(%rip),%rdi
call   1100 <winopen@plt>
lea    -0x22(%rbp),%rdi
call   1190 <qread@plt>
cmp    $0x105,%eax
je     1392 <main+0x102>
jmp    1379 <main+0xe9>
cmpl   $0x0,-0x18(%rbp)
je     13a3 <main+0x113>
mov    $0x0,%al
call   1150 <doublebuffer@plt>
mov    $0x0,%al
call   1170 <gconfig@plt>
mov    $0x106,%edi
call   10e0 <unqdevice@plt>
mov    $0x51,%edi
call   1060 <qdevice@plt>
mov    $0x1b,%edi
call   1060 <qdevice@plt>
mov    $0x105,%edi
call   1060 <qdevice@plt>
mov    $0x0,%al
call   10f0 <makecyl@plt>
xor    %edi,%edi
call   10d0 <polymode@plt>
cmpl   $0x0,-0x14(%rbp)
je     13f4 <main+0x164>
mov    $0x1,%edi
call   10d0 <polymode@plt>
cmpl   $0x0,-0x10(%rbp)
je     1408 <main+0x178>
mov    $0x1,%edi
call   1030 <backface@plt>
mov    $0x190,%edi
movsd  0xbf3(%rip),%xmm0
movsd  0xbf3(%rip),%xmm1
movsd  0xbf3(%rip),%xmm2
call   10a0 <perspective@plt>
xorps  %xmm4,%xmm4
movsd  0xbcb(%rip),%xmm1
mov    $0x4,%edi
xor    %esi,%esi
movaps %xmm4,%xmm0
movaps %xmm4,%xmm2
movaps %xmm4,%xmm3
call   1080 <lookat@plt>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x168,-0x8(%rbp)
jge    15a9 <main+0x319>
xor    %edi,%edi
call   1120 <color@plt>
mov    $0x0,%al
call   11a0 <clear@plt>
mov    $0x1,%edi
call   1120 <color@plt>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xb9f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb8b(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1140 <cos@plt>
cvtss2sd %xmm0,%xmm1
movsd  0xb6e(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
mov    $0x2,%edi
call   10c0 <getvaluator@plt>
mov    %eax,%ecx
mov    $0x1f4,%eax
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x1,%edi
call   10c0 <getvaluator@plt>
mov    %eax,%ecx
mov    $0x1f4,%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0x2,%edi
call   10c0 <getvaluator@plt>
mov    %eax,%ecx
mov    $0x1f4,%eax
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
imul   $0x3,-0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
imul   $0x3,-0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   11b0 <pushmatrix@plt>
mov    -0x28(%rbp),%edi
mov    $0x78,%esi
call   1110 <rotate@plt>
mov    -0x2c(%rbp),%edi
mov    $0x79,%esi
call   1110 <rotate@plt>
movss  -0x20(%rbp),%xmm0
call   1160 <piston@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
cmpl   $0x0,-0x18(%rbp)
je     1552 <main+0x2c2>
mov    $0x0,%al
call   1130 <swapbuffers@plt>
mov    $0x0,%al
call   1050 <qtest@plt>
cmp    $0x0,%rax
je     1596 <main+0x306>
lea    -0x22(%rbp),%rdi
call   1190 <qread@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x51,-0xc(%rbp)
je     1583 <main+0x2f3>
cmpl   $0x1b,-0xc(%rbp)
jne    1591 <main+0x301>
mov    $0x0,%al
call   1070 <gexit@plt>
xor    %edi,%edi
call   1180 <exit@plt>
jmp    1596 <main+0x306>
jmp    159b <main+0x30b>
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
jmp    145f <main+0x1cf>
jmp    1458 <main+0x1c8>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xd91(%rip),%rdi
call   1090 <printf@plt>
xor    %eax,%eax
call   10b0 <getchar@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   10b0 <getchar@plt>
and    $0xdf,%r15b
lea    0xd8d(%rip),%rdi
call   1090 <printf@plt>
xor    %eax,%eax
call   10b0 <getchar@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   10b0 <getchar@plt>
and    $0xdf,%r14b
lea    0xd86(%rip),%rdi
call   1090 <printf@plt>
xor    %eax,%eax
call   10b0 <getchar@plt>
mov    %eax,%r12d
and    $0xdf,%r12b
lea    0xd82(%rip),%rdi
call   1100 <winopen@plt>
lea    0xa(%rsp),%rbp
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1190 <qread@plt>
cmp    $0x105,%eax
jne    1310 <main+0x80>
cmp    $0x59,%r12b
jne    132c <main+0x9c>
xor    %eax,%eax
call   1150 <doublebuffer@plt>
xor    %eax,%eax
call   1170 <gconfig@plt>
mov    $0x106,%edi
call   10e0 <unqdevice@plt>
mov    $0x51,%edi
call   1060 <qdevice@plt>
mov    $0x1b,%edi
call   1060 <qdevice@plt>
mov    $0x105,%edi
call   1060 <qdevice@plt>
xor    %eax,%eax
call   10f0 <makecyl@plt>
xor    %edi,%edi
call   10d0 <polymode@plt>
cmp    $0x59,%r14b
jne    1379 <main+0xe9>
mov    $0x1,%edi
call   10d0 <polymode@plt>
cmp    $0x59,%r15b
jne    1389 <main+0xf9>
mov    $0x1,%edi
call   1030 <backface@plt>
movsd  0xc6f(%rip),%xmm0
movsd  0xc6f(%rip),%xmm1
movsd  0xc6f(%rip),%xmm2
mov    $0x190,%edi
call   10a0 <perspective@plt>
movsd  0xc65(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
xorps  %xmm4,%xmm4
mov    $0x4,%edi
xor    %esi,%esi
call   1080 <lookat@plt>
lea    0xa(%rsp),%r14
mov    $0xfffffffb,%r15d
jmp    13e9 <main+0x159>
nopl   0x0(%rax,%rax,1)
cmp    $0x163,%r15d
jae    13d0 <main+0x140>
add    $0x5,%r15d
xor    %edi,%edi
call   1120 <color@plt>
xor    %eax,%eax
call   11a0 <clear@plt>
mov    $0x1,%edi
call   1120 <color@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
mulsd  0xc0b(%rip),%xmm0
divsd  0xc0b(%rip),%xmm0
call   1140 <cos@plt>
addss  0xc06(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    $0x2,%edi
call   10c0 <getvaluator@plt>
mov    $0x1,%edi
call   10c0 <getvaluator@plt>
mov    $0x1f4,%ebx
sub    %eax,%ebx
mov    $0x2,%edi
call   10c0 <getvaluator@plt>
mov    $0x1f4,%ecx
sub    %eax,%ecx
lea    (%rbx,%rbx,2),%ebp
lea    (%rcx,%rcx,2),%ebx
xor    %eax,%eax
call   11b0 <pushmatrix@plt>
mov    %ebp,%edi
mov    $0x78,%esi
call   1110 <rotate@plt>
mov    %ebx,%edi
mov    $0x79,%esi
call   1110 <rotate@plt>
movss  0xc(%rsp),%xmm0
call   1160 <piston@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
cmp    $0x59,%r12b
jne    14a0 <main+0x210>
xor    %eax,%eax
call   1130 <swapbuffers@plt>
xor    %eax,%eax
call   1050 <qtest@plt>
test   %rax,%rax
je     13e0 <main+0x150>
mov    %r14,%rdi
call   1190 <qread@plt>
cmp    $0x51,%eax
je     14c6 <main+0x236>
cmp    $0x1b,%eax
jne    13e0 <main+0x150>
xor    %eax,%eax
call   1070 <gexit@plt>
xor    %edi,%edi
call   1180 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Backfacing ON or OFF (Y/N)? \00"
@.str.1 = [26 x i8] c"Fill the polygons (Y/N)? \00"
@.str.2 = [22 x i8] c"double buffer (Y/N)? \00"
@.str.3 = [7 x i8] c"piston\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca float
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%13 = call signext i8 (...) @getchar()
store i8 %13, i8* %7
%14 = call signext i8 (...) @getchar()
%15 = load i8, i8* %7
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 121
br i1 %17, label %22, label %18
18: ; preds = %0
%19 = load i8, i8* %7
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 89
br label %22
22: ; preds = %18, %0
%23 = phi i1 [ true, %0 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
store i32 %24, i32* %4
%25 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%26 = call signext i8 (...) @getchar()
store i8 %26, i8* %7
%27 = call signext i8 (...) @getchar()
%28 = load i8, i8* %7
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 121
br i1 %30, label %35, label %31
31: ; preds = %22
%32 = load i8, i8* %7
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 89
br label %35
35: ; preds = %31, %22
%36 = phi i1 [ true, %22 ], [ %34, %31 ]
%37 = zext i1 %36 to i32
store i32 %37, i32* %5
%38 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%39 = call signext i8 (...) @getchar()
store i8 %39, i8* %7
%40 = load i8, i8* %7
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 121
br i1 %42, label %47, label %43
43: ; preds = %35
%44 = load i8, i8* %7
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 89
br label %47
47: ; preds = %43, %35
%48 = phi i1 [ true, %35 ], [ %46, %43 ]
%49 = zext i1 %48 to i32
store i32 %49, i32* %6
%50 = call i32 @winopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %54, %47
%52 = call i32 @qread(i16* %9)
%53 = icmp ne i32 %52, 261
br i1 %53, label %54, label %55
54: ; preds = %51
br label %51
55: ; preds = %51
%56 = load i32, i32* %6
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 (...) @doublebuffer()
br label %60
60: ; preds = %58, %55
%61 = call i32 (...) @gconfig()
%62 = call i32 @unqdevice(i32 262)
%63 = call i32 @qdevice(i32 81)
%64 = call i32 @qdevice(i32 27)
%65 = call i32 @qdevice(i32 261)
%66 = call i32 (...) @makecyl()
%67 = call i32 @polymode(i32 0)
%68 = load i32, i32* %5
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %60
%71 = call i32 @polymode(i32 1)
br label %72
72: ; preds = %70, %60
%73 = load i32, i32* %4
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = call i32 @backface(i32 1)
br label %77
77: ; preds = %75, %72
%78 = call i32 @perspective(i32 400, double 1.500000e+00, double 1.000000e-01, double 6.000000e+02)
%79 = call i32 @lookat(double 0.000000e+00, double -6.000000e+00, i32 4, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
store i32 0, i32* %11
store i32 0, i32* %10
br label %80
80: ; preds = %77, %139
store i32 0, i32* %2
br label %81
81: ; preds = %136, %80
%82 = load i32, i32* %2
%83 = icmp slt i32 %82, 360
br i1 %83, label %84, label %139
84: ; preds = %81
%85 = call i32 @color(i32 0)
%86 = call i32 (...) @clear()
%87 = call i32 @color(i32 1)
%88 = load i32, i32* %2
%89 = sitofp i32 %88 to double
%90 = fmul double 0x401921FB53C8D4F1, %89
%91 = fdiv double %90, 1.800000e+02
%92 = call float @cos(double %91)
%93 = fpext float %92 to double
%94 = fadd double 1.000000e+00, %93
%95 = fptrunc double %94 to float
store float %95, float* %8
%96 = call i64 @getvaluator(i32 2)
%97 = trunc i64 %96 to i32
%98 = sub nsw i32 500, %97
store i32 %98, i32* %11
%99 = call i64 @getvaluator(i32 1)
%100 = trunc i64 %99 to i32
%101 = sub nsw i32 500, %100
store i32 %101, i32* %10
%102 = call i64 @getvaluator(i32 2)
%103 = trunc i64 %102 to i32
%104 = sub nsw i32 500, %103
store i32 %104, i32* %11
%105 = load i32, i32* %10
%106 = mul nsw i32 %105, 3
store i32 %106, i32* %10
%107 = load i32, i32* %11
%108 = mul nsw i32 %107, 3
store i32 %108, i32* %11
%109 = call i32 (...) @pushmatrix()
%110 = load i32, i32* %10
%111 = call i32 @rotate(i32 %110, i8 signext 120)
%112 = load i32, i32* %11
%113 = call i32 @rotate(i32 %112, i8 signext 121)
%114 = load float, float* %8
%115 = call i32 @piston(float %114)
%116 = call i32 (...) @popmatrix()
%117 = load i32, i32* %6
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %121
119: ; preds = %84
%120 = call i32 (...) @swapbuffers()
br label %121
121: ; preds = %119, %84
%122 = call i64 (...) @qtest()
%123 = icmp ne i64 %122, 0
br i1 %123, label %124, label %135
124: ; preds = %121
%125 = call i32 @qread(i16* %9)
store i32 %125, i32* %3
%126 = load i32, i32* %3
%127 = icmp eq i32 %126, 81
br i1 %127, label %131, label %128
128: ; preds = %124
%129 = load i32, i32* %3
%130 = icmp eq i32 %129, 27
br i1 %130, label %131, label %134
131: ; preds = %128, %124
%132 = call i32 (...) @gexit()
%133 = call i32 @exit(i32 0)
unreachable
134: ; preds = %128
br label %135
135: ; preds = %134, %121
br label %136
136: ; preds = %135
%137 = load i32, i32* %2
%138 = add nsw i32 %137, 5
store i32 %138, i32* %2
br label %81
139: ; preds = %81
br label %80
}

LLVM IR (-O2):
@.str = [29 x i8] c"Backfacing ON or OFF (Y/N)? \00"
@.str.1 = [26 x i8] c"Fill the polygons (Y/N)? \00"
@.str.2 = [22 x i8] c"double buffer (Y/N)? \00"
@.str.3 = [7 x i8] c"piston\00"
define i32 @main() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = tail call signext i8 (...) @getchar()
%5 = tail call signext i8 (...) @getchar()
%6 = and i8 %4, -33
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call signext i8 (...) @getchar()
%9 = tail call signext i8 (...) @getchar()
%10 = and i8 %8, -33
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%12 = tail call signext i8 (...) @getchar()
%13 = and i8 %12, -33
%14 = tail call i32 @winopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %15, %0
%16 = call i32 @qread(i16* %1)
%17 = icmp eq i32 %16, 261
br i1 %17, label %18, label %15
18: ; preds = %15
%19 = icmp eq i8 %6, 89
%20 = icmp eq i8 %10, 89
%21 = icmp eq i8 %13, 89
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (...) @doublebuffer()
br label %24
24: ; preds = %22, %18
%25 = call i32 (...) @gconfig()
%26 = call i32 @unqdevice(i32 262)
%27 = call i32 @qdevice(i32 81)
%28 = call i32 @qdevice(i32 27)
%29 = call i32 @qdevice(i32 261)
%30 = call i32 (...) @makecyl()
%31 = call i32 @polymode(i32 0)
br i1 %20, label %32, label %34
32: ; preds = %24
%33 = call i32 @polymode(i32 1)
br label %34
34: ; preds = %32, %24
br i1 %19, label %35, label %37
35: ; preds = %34
%36 = call i32 @backface(i32 1)
br label %37
37: ; preds = %35, %34
%38 = call i32 @perspective(i32 400, double 1.500000e+00, double 1.000000e-01, double 6.000000e+02)
%39 = call i32 @lookat(double 0.000000e+00, double -6.000000e+00, i32 4, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
br label %40
40: ; preds = %75, %37
br label %41
41: ; preds = %40, %75
%42 = phi i32 [ 0, %40 ], [ %76, %75 ]
%43 = call i32 @color(i32 0)
%44 = call i32 (...) @clear()
%45 = call i32 @color(i32 1)
%46 = sitofp i32 %42 to double
%47 = fmul double %46, 0x401921FB53C8D4F1
%48 = fdiv double %47, 1.800000e+02
%49 = call float @cos(double %48)
%50 = fadd float %49, 1.000000e+00
%51 = call i64 @getvaluator(i32 2)
%52 = call i64 @getvaluator(i32 1)
%53 = trunc i64 %52 to i32
%54 = sub nsw i32 500, %53
%55 = call i64 @getvaluator(i32 2)
%56 = trunc i64 %55 to i32
%57 = sub nsw i32 500, %56
%58 = mul nsw i32 %54, 3
%59 = mul nsw i32 %57, 3
%60 = call i32 (...) @pushmatrix()
%61 = call i32 @rotate(i32 %58, i8 signext 120)
%62 = call i32 @rotate(i32 %59, i8 signext 121)
%63 = call i32 @piston(float %50)
%64 = call i32 (...) @popmatrix()
br i1 %21, label %65, label %67
65: ; preds = %41
%66 = call i32 (...) @swapbuffers()
br label %67
67: ; preds = %65, %41
%68 = call i64 (...) @qtest()
%69 = icmp eq i64 %68, 0
br i1 %69, label %75, label %70
70: ; preds = %67
%71 = call i32 @qread(i16* %1)
switch i32 %71, label %75 [
i32 81, label %72
i32 27, label %72
]
72: ; preds = %70, %70
%73 = call i32 (...) @gexit()
%74 = call i32 @exit(i32 0)
unreachable
75: ; preds = %70, %67
%76 = add nuw nsw i32 %42, 5
%77 = icmp ult i32 %42, 355
br i1 %77, label %41, label %40
}