#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*/ hboxfit(double, double, int);
int /*<<< orphan*/ hfont(char *);
int /*<<< orphan*/ lookat(double, double, double, double, double, double,
                          int /*<<< orphan*/);
int /*<<< orphan*/ makesphere();
int /*<<< orphan*/ perspective(int, double, double, double);
int /*<<< orphan*/ popmatrix();
int /*<<< orphan*/ pushmatrix();
int /*<<< orphan*/ qdevice(int);
int qread(short *);
int /*<<< orphan*/ rotate(int, char);
int /*<<< orphan*/ scale(double, double, double);
int /*<<< orphan*/ showroundtext(char *);
int /*<<< orphan*/ translate(double, double, double);
int /*<<< orphan*/ unqdevice(int);
int /*<<< orphan*/ winopen(char *);
main() {
  int i;
  short val;
  float r, z, a;
  winopen("world");
  qdevice(257);
  unqdevice(262);
  while (qread(&val) != 261)
    ;
  hfont("futura.m");
  perspective(800, 1.0, 0.001, 50.0);
  lookat(13.0, 13.0, 8.0, 0.0, 0.0, 0.0, 0);
  color(0);
  clear();
  makesphere();
  color(6);
  callobj(1L);
  color(7);
  pushmatrix();
  translate(0.0, -1.4 * 10.0, 1.4 * 10.0);
  scale(0.3, 0.3, 0.3);
  callobj(1L);
  popmatrix();
  hboxfit(2.0 * 3.14159265358979 * 10.0, 0.25 * 10.0, 31);
  color(2);
  showroundtext("Around the world in eighty days ");
  color(4);
  rotate(900, 'x');
  showroundtext("Around the world in eighty days ");
  color(1);
  rotate(900, 'z');
  showroundtext("Around the world in eighty days ");
  qread(&val);
  gexit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe0a(%rip),%rdi
call   10b0 <winopen@plt>
mov    $0x101,%edi
call   1040 <qdevice@plt>
mov    $0x106,%edi
call   10a0 <unqdevice@plt>
lea    -0xa(%rbp),%rdi
call   1130 <qread@plt>
cmp    $0x105,%eax
je     1278 <main+0x48>
jmp    125f <main+0x2f>
lea    0xdd7(%rip),%rdi
call   10e0 <hfont@plt>
mov    $0x320,%edi
movsd  0xda7(%rip),%xmm0
movsd  0xda7(%rip),%xmm1
movsd  0xda7(%rip),%xmm2
call   1090 <perspective@plt>
movsd  0xd7a(%rip),%xmm1
movsd  0xd7a(%rip),%xmm2
xorps  %xmm5,%xmm5
xor    %edi,%edi
movaps %xmm1,%xmm0
movaps %xmm5,%xmm3
movaps %xmm5,%xmm4
call   1060 <lookat@plt>
xor    %edi,%edi
call   10d0 <color@plt>
mov    $0x0,%al
call   1140 <clear@plt>
mov    $0x0,%al
call   1100 <makesphere@plt>
mov    $0x6,%edi
call   10d0 <color@plt>
mov    $0x1,%edi
call   1080 <callobj@plt>
mov    $0x7,%edi
call   10d0 <color@plt>
mov    $0x0,%al
call   1150 <pushmatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xd0a(%rip),%xmm1
movsd  0xd0a(%rip),%xmm2
call   1120 <translate@plt>
movsd  0xced(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   10f0 <scale@plt>
mov    $0x1,%edi
call   1080 <callobj@plt>
mov    $0x0,%al
call   1030 <popmatrix@plt>
movsd  0xcb9(%rip),%xmm0
movsd  0xcb9(%rip),%xmm1
mov    $0x1f,%edi
call   1070 <hboxfit@plt>
mov    $0x2,%edi
call   10d0 <color@plt>
lea    0xcf5(%rip),%rdi
call   1110 <showroundtext@plt>
mov    $0x4,%edi
call   10d0 <color@plt>
mov    $0x384,%edi
mov    $0x78,%esi
call   10c0 <rotate@plt>
lea    0xcd0(%rip),%rdi
call   1110 <showroundtext@plt>
mov    $0x1,%edi
call   10d0 <color@plt>
mov    $0x384,%edi
mov    $0x7a,%esi
call   10c0 <rotate@plt>
lea    0xcab(%rip),%rdi
call   1110 <showroundtext@plt>
lea    -0xa(%rbp),%rdi
call   1130 <qread@plt>
mov    $0x0,%al
call   1050 <gexit@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe14(%rip),%rdi
call   10b0 <winopen@plt>
mov    $0x101,%edi
call   1040 <qdevice@plt>
mov    $0x106,%edi
call   10a0 <unqdevice@plt>
lea    0xe(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1130 <qread@plt>
cmp    $0x105,%eax
jne    1260 <main+0x30>
lea    0xde0(%rip),%rdi
call   10e0 <hfont@plt>
movsd  0xd7d(%rip),%xmm0
movsd  0xd7d(%rip),%xmm1
movsd  0xd7d(%rip),%xmm2
mov    $0x320,%edi
call   1090 <perspective@plt>
movsd  0xd73(%rip),%xmm0
movsd  0xd73(%rip),%xmm2
xorps  %xmm3,%xmm3
xorps  %xmm4,%xmm4
xorps  %xmm5,%xmm5
movaps %xmm0,%xmm1
xor    %edi,%edi
call   1060 <lookat@plt>
xor    %edi,%edi
call   10d0 <color@plt>
xor    %eax,%eax
call   1140 <clear@plt>
xor    %eax,%eax
call   1100 <makesphere@plt>
mov    $0x6,%edi
call   10d0 <color@plt>
mov    $0x1,%edi
call   1080 <callobj@plt>
mov    $0x7,%edi
call   10d0 <color@plt>
xor    %eax,%eax
call   1150 <pushmatrix@plt>
movsd  0xd26(%rip),%xmm1
movsd  0xd26(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1120 <translate@plt>
movsd  0xd1e(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   10f0 <scale@plt>
mov    $0x1,%edi
call   1080 <callobj@plt>
xor    %eax,%eax
call   1030 <popmatrix@plt>
movsd  0xd02(%rip),%xmm0
movsd  0xd02(%rip),%xmm1
mov    $0x1f,%edi
call   1070 <hboxfit@plt>
mov    $0x2,%edi
call   10d0 <color@plt>
lea    0xcfe(%rip),%rbx
mov    %rbx,%rdi
call   1110 <showroundtext@plt>
mov    $0x4,%edi
call   10d0 <color@plt>
mov    $0x384,%edi
mov    $0x78,%esi
call   10c0 <rotate@plt>
mov    %rbx,%rdi
call   1110 <showroundtext@plt>
mov    $0x1,%edi
call   10d0 <color@plt>
mov    $0x384,%edi
mov    $0x7a,%esi
call   10c0 <rotate@plt>
mov    %rbx,%rdi
call   1110 <showroundtext@plt>
lea    0xe(%rsp),%rdi
call   1130 <qread@plt>
xor    %eax,%eax
call   1050 <gexit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"world\00"
@.str.1 = [9 x i8] c"futura.m\00"
@.str.2 = [33 x i8] c"Around the world in eighty days \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 @winopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @qdevice(i32 257)
%9 = call i32 @unqdevice(i32 262)
br label %10
10: ; preds = %13, %0
%11 = call i32 @qread(i16* %3)
%12 = icmp ne i32 %11, 261
br i1 %12, label %13, label %14
13: ; preds = %10
br label %10
14: ; preds = %10
%15 = call i32 @hfont(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @perspective(i32 800, double 1.000000e+00, double 1.000000e-03, double 5.000000e+01)
%17 = 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)
%18 = call i32 @color(i32 0)
%19 = call i32 (...) @clear()
%20 = call i32 (...) @makesphere()
%21 = call i32 @color(i32 6)
%22 = call i32 @callobj(i64 1)
%23 = call i32 @color(i32 7)
%24 = call i32 (...) @pushmatrix()
%25 = call i32 @translate(double 0.000000e+00, double -1.400000e+01, double 1.400000e+01)
%26 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%27 = call i32 @callobj(i64 1)
%28 = call i32 (...) @popmatrix()
%29 = call i32 @hboxfit(double 0x404F6A7A29553855, double 2.500000e+00, i32 31)
%30 = call i32 @color(i32 2)
%31 = call i32 @showroundtext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%32 = call i32 @color(i32 4)
%33 = call i32 @rotate(i32 900, i8 signext 120)
%34 = call i32 @showroundtext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%35 = call i32 @color(i32 1)
%36 = call i32 @rotate(i32 900, i8 signext 122)
%37 = call i32 @showroundtext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%38 = call i32 @qread(i16* %3)
%39 = call i32 (...) @gexit()
%40 = load i32, i32* %1
ret i32 %40
}

LLVM IR (-O2):
@.str = [6 x i8] c"world\00"
@.str.1 = [9 x i8] c"futura.m\00"
@.str.2 = [33 x i8] c"Around the world in eighty days \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 @qdevice(i32 257)
%5 = tail call i32 @unqdevice(i32 262)
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 @hfont(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @perspective(i32 800, double 1.000000e+00, double 1.000000e-03, double 5.000000e+01)
%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 @callobj(i64 1)
%18 = call i32 @color(i32 7)
%19 = call i32 (...) @pushmatrix()
%20 = call i32 @translate(double 0.000000e+00, double -1.400000e+01, double 1.400000e+01)
%21 = call i32 @scale(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%22 = call i32 @callobj(i64 1)
%23 = call i32 (...) @popmatrix()
%24 = call i32 @hboxfit(double 0x404F6A7A29553855, double 2.500000e+00, i32 31)
%25 = call i32 @color(i32 2)
%26 = call i32 @showroundtext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @color(i32 4)
%28 = call i32 @rotate(i32 900, i8 signext 120)
%29 = call i32 @showroundtext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 @color(i32 1)
%31 = call i32 @rotate(i32 900, i8 signext 122)
%32 = call i32 @showroundtext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%33 = call i32 @qread(i16* %1)
%34 = call i32 (...) @gexit()
ret i32 0
}