#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*/ callobj(long);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ color(int);
int /*<<< orphan*/ gexit();
int /*<<< orphan*/ hcentertext(int);
int /*<<< orphan*/ hcharstr(char *);
int /*<<< orphan*/ hfont(char *);
int /*<<< orphan*/ htextang(double);
int /*<<< orphan*/ htextsize(double, double);
int /*<<< orphan*/ lookat(double, double, double, double, double, double,
                          int /*<<< orphan*/);
int /*<<< orphan*/ makesphere();
int /*<<< orphan*/ move2(double, double);
int /*<<< orphan*/ ortho2(double, double, double, double);
int /*<<< orphan*/ perspective(int, double, double, double);
int /*<<< orphan*/ popmatrix();
int /*<<< orphan*/ pushmatrix();
int /*<<< orphan*/ qdevice(int);
int qread(short *);
int /*<<< orphan*/ scale(double, double, double);
int /*<<< orphan*/ translate(double, double, double);
int /*<<< orphan*/ unqdevice(int);
int /*<<< orphan*/ winopen(char *);
main() {
  short val;
  winopen("balls");
  unqdevice(262);
  qdevice(257);
  while (qread(&val) != 261)
    ;
  perspective(900, 1.0, 0.001, 500.0);
  lookat(13.0, 13.0, 8.0, 0.0, 0.0, 0.0, 0);
  color(0);
  clear();
  makesphere();
  color(6);
  pushmatrix();
  scale(0.5, 0.5, 0.5);
  callobj(1L);
  popmatrix();
  color(7);
  pushmatrix();
  translate(0.0, -1.4 * 10.0, 1.4 * 10.0);
  scale(0.3, 0.3, 0.3);
  callobj(1L);
  popmatrix();
  color(1);
  pushmatrix();
  translate(0.0, 10.0, 0.7 * 10.0);
  scale(0.2, 0.2, 0.2);
  callobj(1L);
  popmatrix();
  color(2);
  pushmatrix();
  translate(0.0, 1.5 * 10.0, -10.0);
  scale(0.15, 0.15, 0.15);
  callobj(1L);
  popmatrix();
  color(3);
  pushmatrix();
  translate(0.0, -10.0, -10.0);
  scale(0.12, 0.12, 0.12);
  callobj(1L);
  popmatrix();
  color(4);
  pushmatrix();
  translate(0.0, -2.0 * 10.0, -10.0);
  scale(0.3, 0.3, 0.3);
  callobj(1L);
  popmatrix();
  hfont("times.rb");
  ortho2(0.0, 1.0, 0.0, 1.0);
  hcentertext(1);
  htextsize(0.08, 0.15);
  move2(0.8, 0.5);
  htextang(-90.0);
  hcharstr("I'm very ordinary!");
  qread(&val);
  gexit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe2a(%rip),%rdi
call   10e0 <winopen@plt>
mov    $0x106,%edi
call   10d0 <unqdevice@plt>
mov    $0x101,%edi
call   1050 <qdevice@plt>
lea    -0x6(%rbp),%rdi
call   1160 <qread@plt>
cmp    $0x105,%eax
je     12a8 <main+0x48>
jmp    128f <main+0x2f>
mov    $0x384,%edi
movsd  0xd73(%rip),%xmm0
movsd  0xdd3(%rip),%xmm1
movsd  0xdd3(%rip),%xmm2
call   10b0 <perspective@plt>
movsd  0xdae(%rip),%xmm1
movsd  0xdae(%rip),%xmm2
xorps  %xmm5,%xmm5
xor    %edi,%edi
movaps %xmm1,%xmm0
movaps %xmm5,%xmm3
movaps %xmm5,%xmm4
call   1070 <lookat@plt>
xor    %edi,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1170 <clear@plt>
mov    $0x0,%al
call   1140 <makesphere@plt>
mov    $0x6,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1180 <pushmatrix@plt>
movsd  0xcf5(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
mov    $0x7,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1180 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xd1d(%rip),%xmm1
movsd  0xd1d(%rip),%xmm2
call   1150 <translate@plt>
movsd  0xcc8(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
mov    $0x1,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1180 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xcc0(%rip),%xmm1
movsd  0xcc0(%rip),%xmm2
call   1150 <translate@plt>
movsd  0xca3(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
mov    $0x2,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1180 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xc63(%rip),%xmm1
movsd  0xc4b(%rip),%xmm2
call   1150 <translate@plt>
movsd  0xc1e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
mov    $0x3,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1180 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xc06(%rip),%xmm2
movaps %xmm2,%xmm1
call   1150 <translate@plt>
movsd  0xbfe(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
mov    $0x4,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1180 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xbb6(%rip),%xmm1
movsd  0xbb6(%rip),%xmm2
call   1150 <translate@plt>
movsd  0xb99(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
mov    $0x0,%al
call   1040 <popmatrix@plt>
lea    0xbec(%rip),%rdi
call   1110 <hfont@plt>
xorps  %xmm2,%xmm2
movsd  0xb5e(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1080 <ortho2@plt>
mov    $0x1,%edi
call   10c0 <hcentertext@plt>
movsd  0xb31(%rip),%xmm0
movsd  0xb31(%rip),%xmm1
call   1030 <htextsize@plt>
movsd  0xb0c(%rip),%xmm0
movsd  0xb0c(%rip),%xmm1
call   1120 <move2@plt>
movsd  0xaef(%rip),%xmm0
call   10f0 <htextang@plt>
lea    0xb92(%rip),%rdi
call   1090 <hcharstr@plt>
lea    -0x6(%rbp),%rdi
call   1160 <qread@plt>
mov    $0x0,%al
call   1060 <gexit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe34(%rip),%rdi
call   10e0 <winopen@plt>
mov    $0x106,%edi
call   10d0 <unqdevice@plt>
mov    $0x101,%edi
call   1050 <qdevice@plt>
lea    0xe(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1160 <qread@plt>
cmp    $0x105,%eax
jne    1290 <main+0x30>
movsd  0xd59(%rip),%xmm0
movsd  0xd59(%rip),%xmm1
movsd  0xd59(%rip),%xmm2
mov    $0x384,%edi
call   10b0 <perspective@plt>
movsd  0xd4f(%rip),%xmm0
movsd  0xd4f(%rip),%xmm2
xorps  %xmm3,%xmm3
xorps  %xmm4,%xmm4
xorps  %xmm5,%xmm5
movaps %xmm0,%xmm1
xor    %edi,%edi
call   1070 <lookat@plt>
xor    %edi,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1170 <clear@plt>
xor    %eax,%eax
call   1140 <makesphere@plt>
mov    $0x6,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1180 <pushmatrix@plt>
movsd  0xd16(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
mov    $0x7,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1180 <pushmatrix@plt>
movsd  0xce9(%rip),%xmm1
movsd  0xce9(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1150 <translate@plt>
movsd  0xce1(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
mov    $0x1,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1180 <pushmatrix@plt>
movsd  0xcb4(%rip),%xmm1
movsd  0xcb4(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1150 <translate@plt>
movsd  0xcac(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
mov    $0x2,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1180 <pushmatrix@plt>
movsd  0xc7f(%rip),%xmm1
movsd  0xc7f(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1150 <translate@plt>
movsd  0xc77(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
mov    $0x3,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1180 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xc37(%rip),%xmm1
movaps %xmm1,%xmm2
call   1150 <translate@plt>
movsd  0xc37(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
mov    $0x4,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1180 <pushmatrix@plt>
movsd  0xc0a(%rip),%xmm1
xorps  %xmm0,%xmm0
movsd  0xbe7(%rip),%xmm2
call   1150 <translate@plt>
movsd  0xbb2(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1130 <scale@plt>
mov    $0x1,%edi
call   10a0 <callobj@plt>
xor    %eax,%eax
call   1040 <popmatrix@plt>
lea    0xbf5(%rip),%rdi
call   1110 <hfont@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xb3c(%rip),%xmm1
movaps %xmm1,%xmm3
call   1080 <ortho2@plt>
mov    $0x1,%edi
call   10c0 <hcentertext@plt>
movsd  0xbaa(%rip),%xmm0
movsd  0xb8a(%rip),%xmm1
call   1030 <htextsize@plt>
movsd  0xb9d(%rip),%xmm0
movsd  0xb2d(%rip),%xmm1
call   1120 <move2@plt>
movsd  0xb90(%rip),%xmm0
call   10f0 <htextang@plt>
lea    0xb9b(%rip),%rdi
call   1090 <hcharstr@plt>
lea    0xe(%rsp),%rdi
call   1160 <qread@plt>
xor    %eax,%eax
call   1060 <gexit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"balls\00"
@.str.1 = [9 x i8] c"times.rb\00"
@.str.2 = [19 x i8] c"I'm very ordinary!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
%3 = call i32 @winopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @unqdevice(i32 262)
%5 = call i32 @qdevice(i32 257)
br label %6
6: ; preds = %9, %0
%7 = call i32 @qread(i16* %2)
%8 = icmp ne i32 %7, 261
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
%11 = call i32 @perspective(i32 900, double 1.000000e+00, double 1.000000e-03, double 5.000000e+02)
%12 = call i32 @lookat(double 1.300000e+01, double 1.300000e+01, double 8.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
%13 = call i32 @color(i32 0)
%14 = call i32 (...) @clear()
%15 = call i32 (...) @makesphere()
%16 = call i32 @color(i32 6)
%17 = call i32 (...) @pushmatrix()
%18 = call i32 @scale(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%19 = call i32 @callobj(i64 1)
%20 = call i32 (...) @popmatrix()
%21 = call i32 @color(i32 7)
%22 = call i32 (...) @pushmatrix()
%23 = call i32 @translate(double 0.000000e+00, double -1.400000e+01, double 1.400000e+01)
%24 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%25 = call i32 @callobj(i64 1)
%26 = call i32 (...) @popmatrix()
%27 = call i32 @color(i32 1)
%28 = call i32 (...) @pushmatrix()
%29 = call i32 @translate(double 0.000000e+00, double 1.000000e+01, double 7.000000e+00)
%30 = call i32 @scale(double 2.000000e-01, double 2.000000e-01, double 2.000000e-01)
%31 = call i32 @callobj(i64 1)
%32 = call i32 (...) @popmatrix()
%33 = call i32 @color(i32 2)
%34 = call i32 (...) @pushmatrix()
%35 = call i32 @translate(double 0.000000e+00, double 1.500000e+01, double -1.000000e+01)
%36 = call i32 @scale(double 1.500000e-01, double 1.500000e-01, double 1.500000e-01)
%37 = call i32 @callobj(i64 1)
%38 = call i32 (...) @popmatrix()
%39 = call i32 @color(i32 3)
%40 = call i32 (...) @pushmatrix()
%41 = call i32 @translate(double 0.000000e+00, double -1.000000e+01, double -1.000000e+01)
%42 = call i32 @scale(double 1.200000e-01, double 1.200000e-01, double 1.200000e-01)
%43 = call i32 @callobj(i64 1)
%44 = call i32 (...) @popmatrix()
%45 = call i32 @color(i32 4)
%46 = call i32 (...) @pushmatrix()
%47 = call i32 @translate(double 0.000000e+00, double -2.000000e+01, double -1.000000e+01)
%48 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%49 = call i32 @callobj(i64 1)
%50 = call i32 (...) @popmatrix()
%51 = call i32 @hfont(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%52 = call i32 @ortho2(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00, double 1.000000e+00)
%53 = call i32 @hcentertext(i32 1)
%54 = call i32 @htextsize(double 8.000000e-02, double 1.500000e-01)
%55 = call i32 @move2(double 8.000000e-01, double 5.000000e-01)
%56 = call i32 @htextang(double -9.000000e+01)
%57 = call i32 @hcharstr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%58 = call i32 @qread(i16* %2)
%59 = call i32 (...) @gexit()
%60 = load i32, i32* %1
ret i32 %60
}

LLVM IR (-O2):
@.str = [6 x i8] c"balls\00"
@.str.1 = [9 x i8] c"times.rb\00"
@.str.2 = [19 x i8] c"I'm very ordinary!\00"
define i32 @main() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
%3 = tail call i32 @winopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @unqdevice(i32 262)
%5 = tail call i32 @qdevice(i32 257)
br label %6
6: ; preds = %6, %0
%7 = call i32 @qread(i16* %1)
%8 = icmp eq i32 %7, 261
br i1 %8, label %9, label %6
9: ; preds = %6
%10 = call i32 @perspective(i32 900, double 1.000000e+00, double 1.000000e-03, double 5.000000e+02)
%11 = call i32 @lookat(double 1.300000e+01, double 1.300000e+01, double 8.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
%12 = call i32 @color(i32 0)
%13 = call i32 (...) @clear()
%14 = call i32 (...) @makesphere()
%15 = call i32 @color(i32 6)
%16 = call i32 (...) @pushmatrix()
%17 = call i32 @scale(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%18 = call i32 @callobj(i64 1)
%19 = call i32 (...) @popmatrix()
%20 = call i32 @color(i32 7)
%21 = call i32 (...) @pushmatrix()
%22 = call i32 @translate(double 0.000000e+00, double -1.400000e+01, double 1.400000e+01)
%23 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%24 = call i32 @callobj(i64 1)
%25 = call i32 (...) @popmatrix()
%26 = call i32 @color(i32 1)
%27 = call i32 (...) @pushmatrix()
%28 = call i32 @translate(double 0.000000e+00, double 1.000000e+01, double 7.000000e+00)
%29 = call i32 @scale(double 2.000000e-01, double 2.000000e-01, double 2.000000e-01)
%30 = call i32 @callobj(i64 1)
%31 = call i32 (...) @popmatrix()
%32 = call i32 @color(i32 2)
%33 = call i32 (...) @pushmatrix()
%34 = call i32 @translate(double 0.000000e+00, double 1.500000e+01, double -1.000000e+01)
%35 = call i32 @scale(double 1.500000e-01, double 1.500000e-01, double 1.500000e-01)
%36 = call i32 @callobj(i64 1)
%37 = call i32 (...) @popmatrix()
%38 = call i32 @color(i32 3)
%39 = call i32 (...) @pushmatrix()
%40 = call i32 @translate(double 0.000000e+00, double -1.000000e+01, double -1.000000e+01)
%41 = call i32 @scale(double 1.200000e-01, double 1.200000e-01, double 1.200000e-01)
%42 = call i32 @callobj(i64 1)
%43 = call i32 (...) @popmatrix()
%44 = call i32 @color(i32 4)
%45 = call i32 (...) @pushmatrix()
%46 = call i32 @translate(double 0.000000e+00, double -2.000000e+01, double -1.000000e+01)
%47 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%48 = call i32 @callobj(i64 1)
%49 = call i32 (...) @popmatrix()
%50 = call i32 @hfont(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%51 = call i32 @ortho2(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00, double 1.000000e+00)
%52 = call i32 @hcentertext(i32 1)
%53 = call i32 @htextsize(double 8.000000e-02, double 1.500000e-01)
%54 = call i32 @move2(double 8.000000e-01, double 5.000000e-01)
%55 = call i32 @htextang(double -9.000000e+01)
%56 = call i32 @hcharstr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%57 = call i32 @qread(i16* %1)
%58 = call i32 (...) @gexit()
ret i32 0
}