main(argc, argv) int argc;
char **argv;
{
  char dev[20];
  int i, but;
  int rotval = 0, drotval = 2;
  float R = 1.6, tx = 0.0, tz = R, zeye = 5.0;
  int do_backface = 0;
  int do_fill = 0;
  short val;
  for (i = 1; i < argc; i++) {
    if (!strcmp(argv[i], "-b"))
      do_backface = 1;
    if (!strcmp(argv[i], "-f"))
      do_fill = 1;
  }
  prefsize(400L, 400L);
  vinit("mswin");
  winopen("tetra");
  qdevice('\033');
  qdevice('Q');
  unqdevice(262);
  while (qread(&val) != 261)
    ;
  doublebuffer();
  gconfig();
  polymode(0);
  if (do_fill)
    polymode(1);
  if (do_backface)
    backface(1);
  perspective(400, 1.0, 0.001, 15.0);
  lookat(0.0, 0.0, zeye, 0.0, 0.0, 0.0, 0);
  maketetra();
  do {
    for (rotval = 0; rotval < 3600; rotval += drotval) {
      color(0);
      clear();
      rotate(drotval, 'x');
      rotate(drotval, 'z');
      color(1);
      pushmatrix();
      rotate(900, 'x');
      circ(0.0, 0.0, R);
      popmatrix();
      color(4);
      move(0.0, 0.0, 0.0);
      draw(tx, 0.0, tz);
      pushmatrix();
      translate(tx, 0.0, tz);
      rotate(rotval, 'x');
      rotate(rotval, 'y');
      rotate(rotval, 'z');
      scale(0.4, 0.4, 0.4);
      callobj(1L);
      popmatrix();
      tz = R * cos((double)(rotval * 3.1415926535 / 180));
      tx = R * sin((double)(rotval * 3.1415926535 / 180));
      swapbuffers();
      if (qtest()) {
        gexit();
        exit(0);
      }
    }
  } while (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x2,-0x40(%rbp)
movss  0xce8(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  0xcc5(%rip),%xmm0
movss  %xmm0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13c4 <main+0xd4>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xcc4(%rip),%rsi
call   10e0 <strcmp@plt>
cmp    $0x0,%eax
jne    1389 <main+0x99>
movl   $0x1,-0x54(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xc9f(%rip),%rsi
call   10e0 <strcmp@plt>
cmp    $0x0,%eax
jne    13b1 <main+0xc1>
movl   $0x1,-0x58(%rbp)
jmp    13b6 <main+0xc6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1355 <main+0x65>
mov    $0x190,%esi
mov    %rsi,%rdi
mov    $0x0,%al
call   11a0 <prefsize@plt>
lea    0xc64(%rip),%rdi
mov    $0x0,%al
call   1170 <vinit@plt>
lea    0xc5c(%rip),%rdi
mov    $0x0,%al
call   1120 <winopen@plt>
mov    $0x1b,%edi
mov    $0x0,%al
call   1070 <qdevice@plt>
mov    $0x51,%edi
mov    $0x0,%al
call   1070 <qdevice@plt>
mov    $0x106,%edi
mov    $0x0,%al
call   1110 <unqdevice@plt>
lea    -0x5a(%rbp),%rdi
mov    $0x0,%al
call   11e0 <qread@plt>
cmp    $0x105,%eax
je     142e <main+0x13e>
jmp    1413 <main+0x123>
mov    $0x0,%al
call   1190 <doublebuffer@plt>
mov    $0x0,%al
call   11b0 <gconfig@plt>
xor    %edi,%edi
mov    $0x0,%al
call   10f0 <polymode@plt>
cmpl   $0x0,-0x58(%rbp)
je     145b <main+0x16b>
mov    $0x1,%edi
mov    $0x0,%al
call   10f0 <polymode@plt>
cmpl   $0x0,-0x54(%rbp)
je     1471 <main+0x181>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <backface@plt>
mov    $0x190,%edi
movsd  0xb8a(%rip),%xmm0
movsd  0xb8a(%rip),%xmm1
movsd  0xb8a(%rip),%xmm2
mov    $0x3,%al
call   10c0 <perspective@plt>
movss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
xorps  %xmm5,%xmm5
xor    %edi,%edi
movaps %xmm5,%xmm0
movaps %xmm5,%xmm1
movaps %xmm5,%xmm3
movaps %xmm5,%xmm4
mov    $0x6,%al
call   1090 <lookat@plt>
mov    $0x0,%al
call   10b0 <maketetra@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xe10,-0x3c(%rbp)
jge    16b2 <main+0x3c2>
xor    %edi,%edi
mov    $0x0,%al
call   1140 <color@plt>
mov    $0x0,%al
call   11f0 <clear@plt>
mov    -0x40(%rbp),%edi
mov    $0x78,%esi
mov    $0x0,%al
call   1130 <rotate@plt>
mov    -0x40(%rbp),%edi
mov    $0x7a,%esi
mov    $0x0,%al
call   1130 <rotate@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1140 <color@plt>
mov    $0x0,%al
call   1200 <pushmatrix@plt>
mov    $0x384,%edi
mov    $0x78,%esi
mov    $0x0,%al
call   1130 <rotate@plt>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
mov    $0x3,%al
call   10d0 <circ@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
mov    $0x4,%edi
mov    $0x0,%al
call   1140 <color@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
mov    $0x3,%al
call   1210 <move@plt>
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
xorps  %xmm1,%xmm1
mov    $0x3,%al
call   1050 <draw@plt>
mov    $0x0,%al
call   1200 <pushmatrix@plt>
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
xorps  %xmm1,%xmm1
mov    $0x3,%al
call   11d0 <translate@plt>
mov    -0x3c(%rbp),%edi
mov    $0x78,%esi
mov    $0x0,%al
call   1130 <rotate@plt>
mov    -0x3c(%rbp),%edi
mov    $0x79,%esi
mov    $0x0,%al
call   1130 <rotate@plt>
mov    -0x3c(%rbp),%edi
mov    $0x7a,%esi
mov    $0x0,%al
call   1130 <rotate@plt>
movsd  0xa60(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
mov    $0x3,%al
call   1160 <scale@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
cvtsi2sdl -0x3c(%rbp),%xmm0
movsd  0xa1d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa09(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1180 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
cvtsi2sdl -0x3c(%rbp),%xmm0
movsd  0x9d8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x9c4(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1100 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1150 <swapbuffers@plt>
mov    $0x0,%al
call   1060 <qtest@plt>
cmp    $0x0,%eax
je     169f <main+0x3af>
mov    $0x0,%al
call   1080 <gexit@plt>
xor    %edi,%edi
call   11c0 <exit@plt>
jmp    16a4 <main+0x3b4>
mov    -0x40(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    14c4 <main+0x1d4>
jmp    16b7 <main+0x3c7>
mov    $0x1,%al
test   $0x1,%al
jne    14bd <main+0x1cd>
jmp    16c6 <main+0x3d6>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
xor    %r13d,%r13d
mov    $0x0,%ebp
cmp    $0x2,%edi
jl     1368 <main+0x78>
mov    %rsi,%r14
mov    %edi,%eax
mov    %rax,(%rsp)
xor    %ebp,%ebp
mov    $0x1,%r15d
mov    $0x1,%r12d
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%r15,8),%rbx
mov    %rbx,%rdi
lea    0xd22(%rip),%rsi
call   10e0 <strcmp@plt>
test   %eax,%eax
cmove  %r12d,%r13d
mov    %rbx,%rdi
lea    0xd10(%rip),%rsi
call   10e0 <strcmp@plt>
test   %eax,%eax
cmove  %r12d,%ebp
add    $0x1,%r15
cmp    %r15,(%rsp)
jne    1330 <main+0x40>
mov    $0x190,%edi
mov    $0x190,%esi
xor    %eax,%eax
call   11a0 <prefsize@plt>
lea    0xce6(%rip),%rdi
xor    %eax,%eax
call   1170 <vinit@plt>
lea    0xcde(%rip),%rdi
xor    %eax,%eax
call   1120 <winopen@plt>
mov    $0x1b,%edi
xor    %eax,%eax
call   1070 <qdevice@plt>
mov    $0x51,%edi
xor    %eax,%eax
call   1070 <qdevice@plt>
mov    $0x106,%edi
xor    %eax,%eax
call   1110 <unqdevice@plt>
lea    0x1e(%rsp),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %eax,%eax
call   11e0 <qread@plt>
cmp    $0x105,%eax
jne    13c0 <main+0xd0>
xor    %eax,%eax
call   1190 <doublebuffer@plt>
xor    %eax,%eax
call   11b0 <gconfig@plt>
xor    %edi,%edi
xor    %eax,%eax
call   10f0 <polymode@plt>
test   %ebp,%ebp
je     13f8 <main+0x108>
mov    $0x1,%edi
xor    %eax,%eax
call   10f0 <polymode@plt>
test   %r13d,%r13d
je     1409 <main+0x119>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <backface@plt>
movsd  0xbef(%rip),%xmm0
movsd  0xbef(%rip),%xmm1
movsd  0xbef(%rip),%xmm2
mov    $0x190,%edi
mov    $0x3,%al
call   10c0 <perspective@plt>
movsd  0xbe3(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
xorps  %xmm4,%xmm4
xorps  %xmm5,%xmm5
xor    %edi,%edi
mov    $0x6,%al
call   1090 <lookat@plt>
xor    %eax,%eax
call   10b0 <maketetra@plt>
movss  0xbe4(%rip),%xmm0
movapd %xmm0,(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xfffffffe,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x2,%ebx
xor    %edi,%edi
xor    %eax,%eax
call   1140 <color@plt>
xor    %eax,%eax
call   11f0 <clear@plt>
mov    $0x2,%edi
mov    $0x78,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
mov    $0x2,%edi
mov    $0x7a,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1140 <color@plt>
xor    %eax,%eax
call   1200 <pushmatrix@plt>
mov    $0x384,%edi
mov    $0x78,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
xorpd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xb38(%rip),%xmm2
mov    $0x3,%al
call   10d0 <circ@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
mov    $0x4,%edi
xor    %eax,%eax
call   1140 <color@plt>
xorpd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
call   1210 <move@plt>
movaps (%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  %xmm2,0x20(%rsp)
shufps $0x55,%xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
mov    $0x3,%al
call   1050 <draw@plt>
xor    %eax,%eax
call   1200 <pushmatrix@plt>
xorps  %xmm1,%xmm1
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
mov    $0x3,%al
call   11d0 <translate@plt>
mov    %ebx,%edi
mov    $0x78,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
mov    %ebx,%edi
mov    $0x79,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
mov    %ebx,%edi
mov    $0x7a,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
movsd  0xa9f(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
mov    $0x3,%al
call   1160 <scale@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xa78(%rip),%xmm0
divsd  0xa78(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1180 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1100 <sin@plt>
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1150 <swapbuffers@plt>
xor    %eax,%eax
call   1060 <qtest@plt>
test   %eax,%eax
jne    161d <main+0x32d>
movapd 0x20(%rsp),%xmm0
unpcklpd (%rsp),%xmm0
mulpd  0xa4d(%rip),%xmm0
cvtpd2ps %xmm0,%xmm0
movapd %xmm0,(%rsp)
cmp    $0xe0e,%ebx
jb     1480 <main+0x190>
jmp    1470 <main+0x180>
xor    %eax,%eax
call   1080 <gexit@plt>
xor    %edi,%edi
call   11c0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-b\00"
@.str.1 = [3 x i8] c"-f\00"
@.str.2 = [6 x i8] c"mswin\00"
@.str.3 = [6 x i8] c"tetra\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca i32
%16 = alloca i32
%17 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 2, i32* %10
store float 0x3FF99999A0000000, float* %11
store float 0.000000e+00, float* %12
%18 = load float, float* %11
store float %18, float* %13
store float 5.000000e+00, float* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 1, i32* %7
br label %19
19: ; preds = %42, %2
%20 = load i32, i32* %7
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %45
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%30 = icmp ne i32 %29, 0
br i1 %30, label %32, label %31
31: ; preds = %23
store i32 1, i32* %15
br label %32
32: ; preds = %31, %23
%33 = load i8**, i8*** %5
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %33, i64 %35
%37 = load i8*, i8** %36
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%39 = icmp ne i32 %38, 0
br i1 %39, label %41, label %40
40: ; preds = %32
store i32 1, i32* %16
br label %41
41: ; preds = %40, %32
br label %42
42: ; preds = %41
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %19
45: ; preds = %19
%46 = call i32 (i64, i64, ...) bitcast (i32 (...)* @prefsize to i32 (i64, i64, ...)*)(i64 400, i64 400)
%47 = call i32 (i8*, ...) bitcast (i32 (...)* @vinit to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%48 = call i32 (i8*, ...) bitcast (i32 (...)* @winopen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%49 = call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 27)
%50 = call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 81)
%51 = call i32 (i32, ...) bitcast (i32 (...)* @unqdevice to i32 (i32, ...)*)(i32 262)
br label %52
52: ; preds = %55, %45
%53 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %17)
%54 = icmp ne i32 %53, 261
br i1 %54, label %55, label %56
55: ; preds = %52
br label %52
56: ; preds = %52
%57 = call i32 (...) @doublebuffer()
%58 = call i32 (...) @gconfig()
%59 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 0)
%60 = load i32, i32* %16
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 1)
br label %64
64: ; preds = %62, %56
%65 = load i32, i32* %15
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %64
%68 = call i32 (i32, ...) bitcast (i32 (...)* @backface to i32 (i32, ...)*)(i32 1)
br label %69
69: ; preds = %67, %64
%70 = call i32 (i32, double, double, double, ...) bitcast (i32 (...)* @perspective to i32 (i32, double, double, double, ...)*)(i32 400, double 1.000000e+00, double 1.000000e-03, double 1.500000e+01)
%71 = load float, float* %14
%72 = fpext float %71 to double
%73 = call i32 (double, double, double, double, double, double, i32, ...) bitcast (i32 (...)* @lookat to i32 (double, double, double, double, double, double, i32, ...)*)(double 0.000000e+00, double 0.000000e+00, double %72, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
%74 = call i32 (...) @maketetra()
br label %75
75: ; preds = %144, %69
store i32 0, i32* %9
br label %76
76: ; preds = %139, %75
%77 = load i32, i32* %9
%78 = icmp slt i32 %77, 3600
br i1 %78, label %79, label %143
79: ; preds = %76
%80 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 0)
%81 = call i32 (...) @clear()
%82 = load i32, i32* %10
%83 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %82, i32 120)
%84 = load i32, i32* %10
%85 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %84, i32 122)
%86 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 1)
%87 = call i32 (...) @pushmatrix()
%88 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 900, i32 120)
%89 = load float, float* %11
%90 = fpext float %89 to double
%91 = call i32 (double, double, double, ...) bitcast (i32 (...)* @circ to i32 (double, double, double, ...)*)(double 0.000000e+00, double 0.000000e+00, double %90)
%92 = call i32 (...) @popmatrix()
%93 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 4)
%94 = call i32 (double, double, double, ...) bitcast (i32 (...)* @move to i32 (double, double, double, ...)*)(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%95 = load float, float* %12
%96 = fpext float %95 to double
%97 = load float, float* %13
%98 = fpext float %97 to double
%99 = call i32 (double, double, double, ...) bitcast (i32 (...)* @draw to i32 (double, double, double, ...)*)(double %96, double 0.000000e+00, double %98)
%100 = call i32 (...) @pushmatrix()
%101 = load float, float* %12
%102 = fpext float %101 to double
%103 = load float, float* %13
%104 = fpext float %103 to double
%105 = call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %102, double 0.000000e+00, double %104)
%106 = load i32, i32* %9
%107 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %106, i32 120)
%108 = load i32, i32* %9
%109 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %108, i32 121)
%110 = load i32, i32* %9
%111 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %110, i32 122)
%112 = call i32 (double, double, double, ...) bitcast (i32 (...)* @scale to i32 (double, double, double, ...)*)(double 4.000000e-01, double 4.000000e-01, double 4.000000e-01)
%113 = call i32 (i64, ...) bitcast (i32 (...)* @callobj to i32 (i64, ...)*)(i64 1)
%114 = call i32 (...) @popmatrix()
%115 = load float, float* %11
%116 = fpext float %115 to double
%117 = load i32, i32* %9
%118 = sitofp i32 %117 to double
%119 = fmul double %118, 0x400921FB54411744
%120 = fdiv double %119, 1.800000e+02
%121 = call double @cos(double %120)
%122 = fmul double %116, %121
%123 = fptrunc double %122 to float
store float %123, float* %13
%124 = load float, float* %11
%125 = fpext float %124 to double
%126 = load i32, i32* %9
%127 = sitofp i32 %126 to double
%128 = fmul double %127, 0x400921FB54411744
%129 = fdiv double %128, 1.800000e+02
%130 = call double @sin(double %129)
%131 = fmul double %125, %130
%132 = fptrunc double %131 to float
store float %132, float* %12
%133 = call i32 (...) @swapbuffers()
%134 = call i32 (...) @qtest()
%135 = icmp ne i32 %134, 0
br i1 %135, label %136, label %138
136: ; preds = %79
%137 = call i32 (...) @gexit()
unreachable
138: ; preds = %79
br label %139
139: ; preds = %138
%140 = load i32, i32* %10
%141 = load i32, i32* %9
%142 = add nsw i32 %141, %140
store i32 %142, i32* %9
br label %76
143: ; preds = %76
br label %144
144: ; preds = %143
br i1 true, label %75, label %145
145: ; preds = %144
%146 = load i32, i32* %3
ret i32 %146
}

LLVM IR (-O2):
@.str = [3 x i8] c"-b\00"
@.str.1 = [3 x i8] c"-f\00"
@.str.2 = [6 x i8] c"mswin\00"
@.str.3 = [6 x i8] c"tetra\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %22
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 1, %6 ], [ %20, %8 ]
%10 = phi i32 [ 0, %6 ], [ %19, %8 ]
%11 = phi i32 [ 0, %6 ], [ %16, %8 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %9
%13 = load i8*, i8** %12
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i32 1, i32 %11
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
%19 = select i1 %18, i32 1, i32 %10
%20 = add nuw nsw i64 %9, 1
%21 = icmp eq i64 %20, %7
br i1 %21, label %22, label %8
22: ; preds = %8, %2
%23 = phi i32 [ 0, %2 ], [ %16, %8 ]
%24 = phi i32 [ 0, %2 ], [ %19, %8 ]
%25 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @prefsize to i32 (i64, i64, ...)*)(i64 400, i64 400)
%26 = tail call i32 (i8*, ...) bitcast (i32 (...)* @vinit to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) bitcast (i32 (...)* @winopen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%28 = tail call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 27)
%29 = tail call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 81)
%30 = tail call i32 (i32, ...) bitcast (i32 (...)* @unqdevice to i32 (i32, ...)*)(i32 262)
br label %31
31: ; preds = %31, %22
%32 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %3)
%33 = icmp eq i32 %32, 261
br i1 %33, label %34, label %31
34: ; preds = %31
%35 = call i32 (...) @doublebuffer()
%36 = call i32 (...) @gconfig()
%37 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 0)
%38 = icmp eq i32 %24, 0
br i1 %38, label %41, label %39
39: ; preds = %34
%40 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 1)
br label %41
41: ; preds = %39, %34
%42 = icmp eq i32 %23, 0
br i1 %42, label %45, label %43
43: ; preds = %41
%44 = call i32 (i32, ...) bitcast (i32 (...)* @backface to i32 (i32, ...)*)(i32 1)
br label %45
45: ; preds = %43, %41
%46 = call i32 (i32, double, double, double, ...) bitcast (i32 (...)* @perspective to i32 (i32, double, double, double, ...)*)(i32 400, double 1.000000e+00, double 1.000000e-03, double 1.500000e+01)
%47 = call i32 (double, double, double, double, double, double, i32, ...) bitcast (i32 (...)* @lookat to i32 (double, double, double, double, double, double, i32, ...)*)(double 0.000000e+00, double 0.000000e+00, double 5.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
%48 = call i32 (...) @maketetra()
br label %49
49: ; preds = %88, %45
%50 = phi <2 x float> [ <float 0x3FF99999A0000000, float 0.000000e+00>, %45 ], [ %92, %88 ]
br label %51
51: ; preds = %49, %88
%52 = phi i32 [ 0, %49 ], [ %93, %88 ]
%53 = phi <2 x float> [ %50, %49 ], [ %92, %88 ]
%54 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 0)
%55 = call i32 (...) @clear()
%56 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 2, i32 120)
%57 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 2, i32 122)
%58 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 1)
%59 = call i32 (...) @pushmatrix()
%60 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 900, i32 120)
%61 = call i32 (double, double, double, ...) bitcast (i32 (...)* @circ to i32 (double, double, double, ...)*)(double 0.000000e+00, double 0.000000e+00, double 0x3FF99999A0000000)
%62 = call i32 (...) @popmatrix()
%63 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 4)
%64 = call i32 (double, double, double, ...) bitcast (i32 (...)* @move to i32 (double, double, double, ...)*)(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%65 = extractelement <2 x float> %53, i64 1
%66 = fpext float %65 to double
%67 = extractelement <2 x float> %53, i64 0
%68 = fpext float %67 to double
%69 = call i32 (double, double, double, ...) bitcast (i32 (...)* @draw to i32 (double, double, double, ...)*)(double %66, double 0.000000e+00, double %68)
%70 = call i32 (...) @pushmatrix()
%71 = call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %66, double 0.000000e+00, double %68)
%72 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %52, i32 120)
%73 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %52, i32 121)
%74 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %52, i32 122)
%75 = call i32 (double, double, double, ...) bitcast (i32 (...)* @scale to i32 (double, double, double, ...)*)(double 4.000000e-01, double 4.000000e-01, double 4.000000e-01)
%76 = call i32 (i64, ...) bitcast (i32 (...)* @callobj to i32 (i64, ...)*)(i64 1)
%77 = call i32 (...) @popmatrix()
%78 = sitofp i32 %52 to double
%79 = fmul double %78, 0x400921FB54411744
%80 = fdiv double %79, 1.800000e+02
%81 = call double @cos(double %80)
%82 = call double @sin(double %80)
%83 = call i32 (...) @swapbuffers()
%84 = call i32 (...) @qtest()
%85 = icmp eq i32 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %51
%87 = call i32 (...) @gexit()
unreachable
88: ; preds = %51
%89 = insertelement <2 x double> poison, double %81, i64 0
%90 = insertelement <2 x double> %89, double %82, i64 1
%91 = fmul <2 x double> %90, <double 0x3FF99999A0000000, double 0x3FF99999A0000000>
%92 = fptrunc <2 x double> %91 to <2 x float>
%93 = add nuw nsw i32 %52, 2
%94 = icmp ult i32 %52, 3598
br i1 %94, label %51, label %49
}