#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*/ vinit(char *);
int /*<<< orphan*/ winopen(char *);
main() {
  short val;
  vinit("mswin");
  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    0xe1a(%rip),%rdi
call   1140 <vinit@plt>
lea    0xe14(%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   1170 <qread@plt>
cmp    $0x105,%eax
je     12c4 <main+0x54>
jmp    12ab <main+0x3b>
mov    $0x384,%edi
movsd  0xd57(%rip),%xmm0
movsd  0xdb7(%rip),%xmm1
movsd  0xdb7(%rip),%xmm2
call   10b0 <perspective@plt>
movsd  0xd92(%rip),%xmm1
movsd  0xd92(%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   1180 <clear@plt>
mov    $0x0,%al
call   1150 <makesphere@plt>
mov    $0x6,%edi
call   1100 <color@plt>
mov    $0x0,%al
call   1190 <pushmatrix@plt>
movsd  0xcd9(%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   1190 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xd01(%rip),%xmm1
movsd  0xd01(%rip),%xmm2
call   1160 <translate@plt>
movsd  0xcac(%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   1190 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xca4(%rip),%xmm1
movsd  0xca4(%rip),%xmm2
call   1160 <translate@plt>
movsd  0xc87(%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   1190 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xc47(%rip),%xmm1
movsd  0xc2f(%rip),%xmm2
call   1160 <translate@plt>
movsd  0xc02(%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   1190 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xbea(%rip),%xmm2
movaps %xmm2,%xmm1
call   1160 <translate@plt>
movsd  0xbe2(%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   1190 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xb9a(%rip),%xmm1
movsd  0xb9a(%rip),%xmm2
call   1160 <translate@plt>
movsd  0xb7d(%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    0xbd6(%rip),%rdi
call   1110 <hfont@plt>
xorps  %xmm2,%xmm2
movsd  0xb42(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1080 <ortho2@plt>
mov    $0x1,%edi
call   10c0 <hcentertext@plt>
movsd  0xb15(%rip),%xmm0
movsd  0xb15(%rip),%xmm1
call   1030 <htextsize@plt>
movsd  0xaf0(%rip),%xmm0
movsd  0xaf0(%rip),%xmm1
call   1120 <move2@plt>
movsd  0xad3(%rip),%xmm0
call   10f0 <htextang@plt>
lea    0xb7c(%rip),%rdi
call   1090 <hcharstr@plt>
lea    -0x6(%rbp),%rdi
call   1170 <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    0xe24(%rip),%rdi
call   1140 <vinit@plt>
lea    0xe1e(%rip),%rdi
call   10e0 <winopen@plt>
mov    $0x106,%edi
call   10d0 <unqdevice@plt>
mov    $0x101,%edi
call   1050 <qdevice@plt>
lea    0xe(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1170 <qread@plt>
cmp    $0x105,%eax
jne    12b0 <main+0x40>
movsd  0xd39(%rip),%xmm0
movsd  0xd39(%rip),%xmm1
movsd  0xd39(%rip),%xmm2
mov    $0x384,%edi
call   10b0 <perspective@plt>
movsd  0xd2f(%rip),%xmm0
movsd  0xd2f(%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   1180 <clear@plt>
xor    %eax,%eax
call   1150 <makesphere@plt>
mov    $0x6,%edi
call   1100 <color@plt>
xor    %eax,%eax
call   1190 <pushmatrix@plt>
movsd  0xcf6(%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   1190 <pushmatrix@plt>
movsd  0xcc9(%rip),%xmm1
movsd  0xcc9(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1160 <translate@plt>
movsd  0xcc1(%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   1190 <pushmatrix@plt>
movsd  0xc94(%rip),%xmm1
movsd  0xc94(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1160 <translate@plt>
movsd  0xc8c(%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   1190 <pushmatrix@plt>
movsd  0xc5f(%rip),%xmm1
movsd  0xc5f(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1160 <translate@plt>
movsd  0xc57(%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   1190 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xc17(%rip),%xmm1
movaps %xmm1,%xmm2
call   1160 <translate@plt>
movsd  0xc17(%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   1190 <pushmatrix@plt>
movsd  0xbea(%rip),%xmm1
xorps  %xmm0,%xmm0
movsd  0xbc7(%rip),%xmm2
call   1160 <translate@plt>
movsd  0xb92(%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    0xbdb(%rip),%rdi
call   1110 <hfont@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xb1c(%rip),%xmm1
movaps %xmm1,%xmm3
call   1080 <ortho2@plt>
mov    $0x1,%edi
call   10c0 <hcentertext@plt>
movsd  0xb8a(%rip),%xmm0
movsd  0xb6a(%rip),%xmm1
call   1030 <htextsize@plt>
movsd  0xb7d(%rip),%xmm0
movsd  0xb0d(%rip),%xmm1
call   1120 <move2@plt>
movsd  0xb70(%rip),%xmm0
call   10f0 <htextang@plt>
lea    0xb81(%rip),%rdi
call   1090 <hcharstr@plt>
lea    0xe(%rsp),%rdi
call   1170 <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"mswin\00"
@.str.1 = [6 x i8] c"balls\00"
@.str.2 = [9 x i8] c"times.rb\00"
@.str.3 = [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 @vinit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @winopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @unqdevice(i32 262)
%6 = call i32 @qdevice(i32 257)
br label %7
7: ; preds = %10, %0
%8 = call i32 @qread(i16* %2)
%9 = icmp ne i32 %8, 261
br i1 %9, label %10, label %11
10: ; preds = %7
br label %7
11: ; preds = %7
%12 = call i32 @perspective(i32 900, double 1.000000e+00, double 1.000000e-03, double 5.000000e+02)
%13 = 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)
%14 = call i32 @color(i32 0)
%15 = call i32 (...) @clear()
%16 = call i32 (...) @makesphere()
%17 = call i32 @color(i32 6)
%18 = call i32 (...) @pushmatrix()
%19 = call i32 @scale(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%20 = call i32 @callobj(i64 1)
%21 = call i32 (...) @popmatrix()
%22 = call i32 @color(i32 7)
%23 = call i32 (...) @pushmatrix()
%24 = call i32 @translate(double 0.000000e+00, double -1.400000e+01, double 1.400000e+01)
%25 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%26 = call i32 @callobj(i64 1)
%27 = call i32 (...) @popmatrix()
%28 = call i32 @color(i32 1)
%29 = call i32 (...) @pushmatrix()
%30 = call i32 @translate(double 0.000000e+00, double 1.000000e+01, double 7.000000e+00)
%31 = call i32 @scale(double 2.000000e-01, double 2.000000e-01, double 2.000000e-01)
%32 = call i32 @callobj(i64 1)
%33 = call i32 (...) @popmatrix()
%34 = call i32 @color(i32 2)
%35 = call i32 (...) @pushmatrix()
%36 = call i32 @translate(double 0.000000e+00, double 1.500000e+01, double -1.000000e+01)
%37 = call i32 @scale(double 1.500000e-01, double 1.500000e-01, double 1.500000e-01)
%38 = call i32 @callobj(i64 1)
%39 = call i32 (...) @popmatrix()
%40 = call i32 @color(i32 3)
%41 = call i32 (...) @pushmatrix()
%42 = call i32 @translate(double 0.000000e+00, double -1.000000e+01, double -1.000000e+01)
%43 = call i32 @scale(double 1.200000e-01, double 1.200000e-01, double 1.200000e-01)
%44 = call i32 @callobj(i64 1)
%45 = call i32 (...) @popmatrix()
%46 = call i32 @color(i32 4)
%47 = call i32 (...) @pushmatrix()
%48 = call i32 @translate(double 0.000000e+00, double -2.000000e+01, double -1.000000e+01)
%49 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%50 = call i32 @callobj(i64 1)
%51 = call i32 (...) @popmatrix()
%52 = call i32 @hfont(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%53 = call i32 @ortho2(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00, double 1.000000e+00)
%54 = call i32 @hcentertext(i32 1)
%55 = call i32 @htextsize(double 8.000000e-02, double 1.500000e-01)
%56 = call i32 @move2(double 8.000000e-01, double 5.000000e-01)
%57 = call i32 @htextang(double -9.000000e+01)
%58 = call i32 @hcharstr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%59 = call i32 @qread(i16* %2)
%60 = call i32 (...) @gexit()
%61 = load i32, i32* %1
ret i32 %61
}

LLVM IR (-O2):
@.str = [6 x i8] c"mswin\00"
@.str.1 = [6 x i8] c"balls\00"
@.str.2 = [9 x i8] c"times.rb\00"
@.str.3 = [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 @vinit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @winopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @unqdevice(i32 262)
%6 = tail call i32 @qdevice(i32 257)
br label %7
7: ; preds = %7, %0
%8 = call i32 @qread(i16* %1)
%9 = icmp eq i32 %8, 261
br i1 %9, label %10, label %7
10: ; preds = %7
%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.2, 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.3, i64 0, i64 0))
%58 = call i32 @qread(i16* %1)
%59 = call i32 (...) @gexit()
ret i32 0
}