#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*/ glColor3f(int, int, int);
int /*<<< orphan*/ glRasterPos2d(double, double);
int /*<<< orphan*/ printstring(char *);
void text(void) {
  double x = -1.25, y = -0.33, dy = 0.13;
  glColor3f(1., 1., 0.);
  glRasterPos2d(x, y);
  y -= dy;
  printstring("Press:");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("  p: to change the print format (PostScript, PDF)");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("  s: to save the images");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("  t: to alternate between teapot and torus");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("  v: to alternate between single and multiple viewport modes");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("  b: to change the blending mode (transparency)");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("  q: to quit");
  glRasterPos2d(x, y);
  y -= dy;
  printstring("Click and move the mouse to rotate the objects");
}


x86 assembly (clang, -O0):
<text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1040 <glColor3f@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe82(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe5b(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe5f(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe49(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe46(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe55(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe57(%rip),%rdi
call   1050 <printstring@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <glRasterPos2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe36(%rip),%rdi
call   1050 <printstring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<text>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <glColor3f@plt>
movsd  0xeb6(%rip),%xmm0
movsd  0xeb6(%rip),%xmm1
call   1030 <glRasterPos2d@plt>
lea    0xeea(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xea5(%rip),%xmm1
movsd  0xe8d(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xed0(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xe8c(%rip),%xmm1
movsd  0xe6c(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xee1(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xe73(%rip),%xmm1
movsd  0xe4b(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xed8(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xe5a(%rip),%xmm1
movsd  0xe2a(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xee2(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xe41(%rip),%xmm1
movsd  0xe09(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xefe(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xe28(%rip),%xmm1
movsd  0xde8(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xf0d(%rip),%rdi
call   1050 <printstring@plt>
movsd  0xe0f(%rip),%xmm1
movsd  0xdc7(%rip),%xmm0
call   1030 <glRasterPos2d@plt>
lea    0xef9(%rip),%rdi
pop    %rax
jmp    1050 <printstring@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Press:\00"
@.str.1 = [50 x i8] c" p: to change the print format (PostScript, PDF)\00"
@.str.2 = [24 x i8] c" s: to save the images\00"
@.str.3 = [43 x i8] c" t: to alternate between teapot and torus\00"
@.str.4 = [61 x i8] c" v: to alternate between single and multiple viewport modes\00"
@.str.5 = [48 x i8] c" b: to change the blending mode (transparency)\00"
@.str.6 = [13 x i8] c" q: to quit\00"
@.str.7 = [47 x i8] c"Click and move the mouse to rotate the objects\00"
define void @text() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double -1.250000e+00, double* %1
store double -3.300000e-01, double* %2
store double 1.300000e-01, double* %3
%4 = call i32 @glColor3f(i32 1, i32 1, i32 0)
%5 = load double, double* %1
%6 = load double, double* %2
%7 = call i32 @glRasterPos2d(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %2
%10 = fsub double %9, %8
store double %10, double* %2
%11 = call i32 @printstring(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = load double, double* %1
%13 = load double, double* %2
%14 = call i32 @glRasterPos2d(double %12, double %13)
%15 = load double, double* %3
%16 = load double, double* %2
%17 = fsub double %16, %15
store double %17, double* %2
%18 = call i32 @printstring(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%19 = load double, double* %1
%20 = load double, double* %2
%21 = call i32 @glRasterPos2d(double %19, double %20)
%22 = load double, double* %3
%23 = load double, double* %2
%24 = fsub double %23, %22
store double %24, double* %2
%25 = call i32 @printstring(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%26 = load double, double* %1
%27 = load double, double* %2
%28 = call i32 @glRasterPos2d(double %26, double %27)
%29 = load double, double* %3
%30 = load double, double* %2
%31 = fsub double %30, %29
store double %31, double* %2
%32 = call i32 @printstring(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%33 = load double, double* %1
%34 = load double, double* %2
%35 = call i32 @glRasterPos2d(double %33, double %34)
%36 = load double, double* %3
%37 = load double, double* %2
%38 = fsub double %37, %36
store double %38, double* %2
%39 = call i32 @printstring(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%40 = load double, double* %1
%41 = load double, double* %2
%42 = call i32 @glRasterPos2d(double %40, double %41)
%43 = load double, double* %3
%44 = load double, double* %2
%45 = fsub double %44, %43
store double %45, double* %2
%46 = call i32 @printstring(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%47 = load double, double* %1
%48 = load double, double* %2
%49 = call i32 @glRasterPos2d(double %47, double %48)
%50 = load double, double* %3
%51 = load double, double* %2
%52 = fsub double %51, %50
store double %52, double* %2
%53 = call i32 @printstring(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%54 = load double, double* %1
%55 = load double, double* %2
%56 = call i32 @glRasterPos2d(double %54, double %55)
%57 = load double, double* %3
%58 = load double, double* %2
%59 = fsub double %58, %57
store double %59, double* %2
%60 = call i32 @printstring(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Press:\00"
@.str.1 = [50 x i8] c" p: to change the print format (PostScript, PDF)\00"
@.str.2 = [24 x i8] c" s: to save the images\00"
@.str.3 = [43 x i8] c" t: to alternate between teapot and torus\00"
@.str.4 = [61 x i8] c" v: to alternate between single and multiple viewport modes\00"
@.str.5 = [48 x i8] c" b: to change the blending mode (transparency)\00"
@.str.6 = [13 x i8] c" q: to quit\00"
@.str.7 = [47 x i8] c"Click and move the mouse to rotate the objects\00"
define void @text() {
%1 = tail call i32 @glColor3f(i32 1, i32 1, i32 0)
%2 = tail call i32 @glRasterPos2d(double -1.250000e+00, double -3.300000e-01)
%3 = tail call i32 @printstring(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @glRasterPos2d(double -1.250000e+00, double -4.600000e-01)
%5 = tail call i32 @printstring(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @glRasterPos2d(double -1.250000e+00, double 0xBFE2E147AE147AE2)
%7 = tail call i32 @printstring(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @glRasterPos2d(double -1.250000e+00, double 0xBFE70A3D70A3D70B)
%9 = tail call i32 @printstring(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @glRasterPos2d(double -1.250000e+00, double 0xBFEB333333333334)
%11 = tail call i32 @printstring(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%12 = tail call i32 @glRasterPos2d(double -1.250000e+00, double 0xBFEF5C28F5C28F5D)
%13 = tail call i32 @printstring(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @glRasterPos2d(double -1.250000e+00, double -1.110000e+00)
%15 = tail call i32 @printstring(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @glRasterPos2d(double -1.250000e+00, double 0xBFF3D70A3D70A3D8)
%17 = tail call i32 @printstring(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
ret void
}