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);
  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  0xcf8(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  0xcd5(%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    13b4 <main+0xd4>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xcd4(%rip),%rsi
call   10e0 <strcmp@plt>
cmp    $0x0,%eax
jne    1379 <main+0x99>
movl   $0x1,-0x54(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xcaf(%rip),%rsi
call   10e0 <strcmp@plt>
cmp    $0x0,%eax
jne    13a1 <main+0xc1>
movl   $0x1,-0x58(%rbp)
jmp    13a6 <main+0xc6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1345 <main+0x65>
mov    $0x190,%esi
mov    %rsi,%rdi
mov    $0x0,%al
call   1190 <prefsize@plt>
lea    0xc74(%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   11d0 <qread@plt>
cmp    $0x105,%eax
je     1410 <main+0x130>
jmp    13f5 <main+0x115>
mov    $0x0,%al
call   1180 <doublebuffer@plt>
mov    $0x0,%al
call   11a0 <gconfig@plt>
xor    %edi,%edi
mov    $0x0,%al
call   10f0 <polymode@plt>
cmpl   $0x0,-0x58(%rbp)
je     143d <main+0x15d>
mov    $0x1,%edi
mov    $0x0,%al
call   10f0 <polymode@plt>
cmpl   $0x0,-0x54(%rbp)
je     1453 <main+0x173>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <backface@plt>
mov    $0x190,%edi
movsd  0xba8(%rip),%xmm0
movsd  0xba8(%rip),%xmm1
movsd  0xba8(%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    1694 <main+0x3b4>
xor    %edi,%edi
mov    $0x0,%al
call   1140 <color@plt>
mov    $0x0,%al
call   11e0 <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   11f0 <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   1200 <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   11f0 <pushmatrix@plt>
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
xorps  %xmm1,%xmm1
mov    $0x3,%al
call   11c0 <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  0xa7e(%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  0xa3b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa27(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1170 <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  0x9f6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x9e2(%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     1681 <main+0x3a1>
mov    $0x0,%al
call   1080 <gexit@plt>
xor    %edi,%edi
call   11b0 <exit@plt>
jmp    1686 <main+0x3a6>
mov    -0x40(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    14a6 <main+0x1c6>
jmp    1699 <main+0x3b9>
mov    $0x1,%al
test   $0x1,%al
jne    149f <main+0x1bf>
jmp    16a8 <main+0x3c8>
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     1358 <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    0xd32(%rip),%rsi
call   10e0 <strcmp@plt>
test   %eax,%eax
cmove  %r12d,%r13d
mov    %rbx,%rdi
lea    0xd20(%rip),%rsi
call   10e0 <strcmp@plt>
test   %eax,%eax
cmove  %r12d,%ebp
add    $0x1,%r15
cmp    %r15,(%rsp)
jne    1320 <main+0x40>
mov    $0x190,%edi
mov    $0x190,%esi
xor    %eax,%eax
call   1190 <prefsize@plt>
lea    0xcf6(%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
mov    %rbx,%rdi
xor    %eax,%eax
call   11d0 <qread@plt>
cmp    $0x105,%eax
jne    13a0 <main+0xc0>
xor    %eax,%eax
call   1180 <doublebuffer@plt>
xor    %eax,%eax
call   11a0 <gconfig@plt>
xor    %edi,%edi
xor    %eax,%eax
call   10f0 <polymode@plt>
test   %ebp,%ebp
je     13d8 <main+0xf8>
mov    $0x1,%edi
xor    %eax,%eax
call   10f0 <polymode@plt>
test   %r13d,%r13d
je     13e9 <main+0x109>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <backface@plt>
movsd  0xc0f(%rip),%xmm0
movsd  0xc0f(%rip),%xmm1
movsd  0xc0f(%rip),%xmm2
mov    $0x190,%edi
mov    $0x3,%al
call   10c0 <perspective@plt>
movsd  0xc03(%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  0xc04(%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   11e0 <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   11f0 <pushmatrix@plt>
mov    $0x384,%edi
mov    $0x78,%esi
xor    %eax,%eax
call   1130 <rotate@plt>
xorpd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xb58(%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   1200 <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   11f0 <pushmatrix@plt>
xorps  %xmm1,%xmm1
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
mov    $0x3,%al
call   11c0 <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  0xabf(%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  0xa98(%rip),%xmm0
divsd  0xa98(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1170 <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    15fd <main+0x31d>
movapd 0x20(%rsp),%xmm0
unpcklpd (%rsp),%xmm0
mulpd  0xa6d(%rip),%xmm0
cvtpd2ps %xmm0,%xmm0
movapd %xmm0,(%rsp)
cmp    $0xe0e,%ebx
jb     1460 <main+0x180>
jmp    1450 <main+0x170>
xor    %eax,%eax
call   1080 <gexit@plt>
xor    %edi,%edi
call   11b0 <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"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 (...)* @winopen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%48 = call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 27)
%49 = call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 81)
%50 = call i32 (i32, ...) bitcast (i32 (...)* @unqdevice to i32 (i32, ...)*)(i32 262)
br label %51
51: ; preds = %54, %45
%52 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %17)
%53 = icmp ne i32 %52, 261
br i1 %53, label %54, label %55
54: ; preds = %51
br label %51
55: ; preds = %51
%56 = call i32 (...) @doublebuffer()
%57 = call i32 (...) @gconfig()
%58 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 0)
%59 = load i32, i32* %16
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %55
%62 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 1)
br label %63
63: ; preds = %61, %55
%64 = load i32, i32* %15
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = call i32 (i32, ...) bitcast (i32 (...)* @backface to i32 (i32, ...)*)(i32 1)
br label %68
68: ; preds = %66, %63
%69 = 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)
%70 = load float, float* %14
%71 = fpext float %70 to double
%72 = 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 %71, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
%73 = call i32 (...) @maketetra()
br label %74
74: ; preds = %143, %68
store i32 0, i32* %9
br label %75
75: ; preds = %138, %74
%76 = load i32, i32* %9
%77 = icmp slt i32 %76, 3600
br i1 %77, label %78, label %142
78: ; preds = %75
%79 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 0)
%80 = call i32 (...) @clear()
%81 = load i32, i32* %10
%82 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %81, i32 120)
%83 = load i32, i32* %10
%84 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %83, i32 122)
%85 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 1)
%86 = call i32 (...) @pushmatrix()
%87 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 900, i32 120)
%88 = load float, float* %11
%89 = fpext float %88 to double
%90 = call i32 (double, double, double, ...) bitcast (i32 (...)* @circ to i32 (double, double, double, ...)*)(double 0.000000e+00, double 0.000000e+00, double %89)
%91 = call i32 (...) @popmatrix()
%92 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 4)
%93 = 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)
%94 = load float, float* %12
%95 = fpext float %94 to double
%96 = load float, float* %13
%97 = fpext float %96 to double
%98 = call i32 (double, double, double, ...) bitcast (i32 (...)* @draw to i32 (double, double, double, ...)*)(double %95, double 0.000000e+00, double %97)
%99 = call i32 (...) @pushmatrix()
%100 = load float, float* %12
%101 = fpext float %100 to double
%102 = load float, float* %13
%103 = fpext float %102 to double
%104 = call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %101, double 0.000000e+00, double %103)
%105 = load i32, i32* %9
%106 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %105, i32 120)
%107 = load i32, i32* %9
%108 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %107, i32 121)
%109 = load i32, i32* %9
%110 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %109, i32 122)
%111 = 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)
%112 = call i32 (i64, ...) bitcast (i32 (...)* @callobj to i32 (i64, ...)*)(i64 1)
%113 = call i32 (...) @popmatrix()
%114 = load float, float* %11
%115 = fpext float %114 to double
%116 = load i32, i32* %9
%117 = sitofp i32 %116 to double
%118 = fmul double %117, 0x400921FB54411744
%119 = fdiv double %118, 1.800000e+02
%120 = call double @cos(double %119)
%121 = fmul double %115, %120
%122 = fptrunc double %121 to float
store float %122, float* %13
%123 = load float, float* %11
%124 = fpext float %123 to double
%125 = load i32, i32* %9
%126 = sitofp i32 %125 to double
%127 = fmul double %126, 0x400921FB54411744
%128 = fdiv double %127, 1.800000e+02
%129 = call double @sin(double %128)
%130 = fmul double %124, %129
%131 = fptrunc double %130 to float
store float %131, float* %12
%132 = call i32 (...) @swapbuffers()
%133 = call i32 (...) @qtest()
%134 = icmp ne i32 %133, 0
br i1 %134, label %135, label %137
135: ; preds = %78
%136 = call i32 (...) @gexit()
unreachable
137: ; preds = %78
br label %138
138: ; preds = %137
%139 = load i32, i32* %10
%140 = load i32, i32* %9
%141 = add nsw i32 %140, %139
store i32 %141, i32* %9
br label %75
142: ; preds = %75
br label %143
143: ; preds = %142
br i1 true, label %74, label %144
144: ; preds = %143
%145 = load i32, i32* %3
ret i32 %145
}

LLVM IR (-O2):
@.str = [3 x i8] c"-b\00"
@.str.1 = [3 x i8] c"-f\00"
@.str.2 = [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 (...)* @winopen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%27 = tail call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 27)
%28 = tail call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 81)
%29 = tail call i32 (i32, ...) bitcast (i32 (...)* @unqdevice to i32 (i32, ...)*)(i32 262)
br label %30
30: ; preds = %30, %22
%31 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %3)
%32 = icmp eq i32 %31, 261
br i1 %32, label %33, label %30
33: ; preds = %30
%34 = call i32 (...) @doublebuffer()
%35 = call i32 (...) @gconfig()
%36 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 0)
%37 = icmp eq i32 %24, 0
br i1 %37, label %40, label %38
38: ; preds = %33
%39 = call i32 (i32, ...) bitcast (i32 (...)* @polymode to i32 (i32, ...)*)(i32 1)
br label %40
40: ; preds = %38, %33
%41 = icmp eq i32 %23, 0
br i1 %41, label %44, label %42
42: ; preds = %40
%43 = call i32 (i32, ...) bitcast (i32 (...)* @backface to i32 (i32, ...)*)(i32 1)
br label %44
44: ; preds = %42, %40
%45 = 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)
%46 = 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)
%47 = call i32 (...) @maketetra()
br label %48
48: ; preds = %87, %44
%49 = phi <2 x float> [ <float 0x3FF99999A0000000, float 0.000000e+00>, %44 ], [ %91, %87 ]
br label %50
50: ; preds = %48, %87
%51 = phi i32 [ 0, %48 ], [ %92, %87 ]
%52 = phi <2 x float> [ %49, %48 ], [ %91, %87 ]
%53 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 0)
%54 = call i32 (...) @clear()
%55 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 2, i32 120)
%56 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 2, i32 122)
%57 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 1)
%58 = call i32 (...) @pushmatrix()
%59 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 900, i32 120)
%60 = call i32 (double, double, double, ...) bitcast (i32 (...)* @circ to i32 (double, double, double, ...)*)(double 0.000000e+00, double 0.000000e+00, double 0x3FF99999A0000000)
%61 = call i32 (...) @popmatrix()
%62 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 4)
%63 = 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)
%64 = extractelement <2 x float> %52, i64 1
%65 = fpext float %64 to double
%66 = extractelement <2 x float> %52, i64 0
%67 = fpext float %66 to double
%68 = call i32 (double, double, double, ...) bitcast (i32 (...)* @draw to i32 (double, double, double, ...)*)(double %65, double 0.000000e+00, double %67)
%69 = call i32 (...) @pushmatrix()
%70 = call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %65, double 0.000000e+00, double %67)
%71 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %51, i32 120)
%72 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %51, i32 121)
%73 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rotate to i32 (i32, i32, ...)*)(i32 %51, i32 122)
%74 = 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)
%75 = call i32 (i64, ...) bitcast (i32 (...)* @callobj to i32 (i64, ...)*)(i64 1)
%76 = call i32 (...) @popmatrix()
%77 = sitofp i32 %51 to double
%78 = fmul double %77, 0x400921FB54411744
%79 = fdiv double %78, 1.800000e+02
%80 = call double @cos(double %79)
%81 = call double @sin(double %79)
%82 = call i32 (...) @swapbuffers()
%83 = call i32 (...) @qtest()
%84 = icmp eq i32 %83, 0
br i1 %84, label %87, label %85
85: ; preds = %50
%86 = call i32 (...) @gexit()
unreachable
87: ; preds = %50
%88 = insertelement <2 x double> poison, double %80, i64 0
%89 = insertelement <2 x double> %88, double %81, i64 1
%90 = fmul <2 x double> %89, <double 0x3FF99999A0000000, double 0x3FF99999A0000000>
%91 = fptrunc <2 x double> %90 to <2 x float>
%92 = add nuw nsw i32 %51, 2
%93 = icmp ult i32 %51, 3598
br i1 %93, label %50, label %48
}