main(argc, argv) int argc;
char **argv;
{
  short val;
  winopen("trivial");
  if (argc == 2)
    font(atoi(argv[1]));
  qdevice(257);
  unqdevice(262);
  while (qread(&val) != 261)
    ;
  color(0);
  clear();
  ortho2(-1.0, 1.0, -1.0, 1.0);
  color(2);
  move2(-1.0, 0.0);
  draw2(1.0, 0.0);
  qread(&val);
  move2(0.0, 0.0);
  draw2(0.0, 1.0);
  cmov2(0.0, 0.0);
  charstr("Hello");
  qread(&val);
  gexit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   10a0 <winopen@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1226 <main+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   10d0 <atoi@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1060 <font@plt>
mov    $0x101,%edi
mov    $0x0,%al
call   1030 <qdevice@plt>
mov    $0x106,%edi
mov    $0x0,%al
call   1090 <unqdevice@plt>
lea    -0x12(%rbp),%rdi
mov    $0x0,%al
call   10e0 <qread@plt>
cmp    $0x105,%eax
je     1259 <main+0x79>
jmp    123e <main+0x5e>
xor    %edi,%edi
mov    $0x0,%al
call   10b0 <color@plt>
mov    $0x0,%al
call   1100 <clear@plt>
movsd  0xd97(%rip),%xmm2
movsd  0xd87(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
mov    $0x4,%al
call   1050 <ortho2@plt>
mov    $0x2,%edi
mov    $0x0,%al
call   10b0 <color@plt>
movsd  0xd6e(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   10c0 <move2@plt>
movsd  0xd54(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   1070 <draw2@plt>
lea    -0x12(%rbp),%rdi
mov    $0x0,%al
call   10e0 <qread@plt>
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
mov    $0x2,%al
call   10c0 <move2@plt>
xorps  %xmm0,%xmm0
movsd  0xd27(%rip),%xmm1
mov    $0x2,%al
call   1070 <draw2@plt>
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1080 <cmov2@plt>
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   10f0 <charstr@plt>
lea    -0x12(%rbp),%rdi
mov    $0x0,%al
call   10e0 <qread@plt>
mov    $0x0,%al
call   1040 <gexit@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe21(%rip),%rdi
xor    %eax,%eax
call   10a0 <winopen@plt>
cmp    $0x2,%ebp
jne    120f <main+0x2f>
mov    0x8(%rbx),%rdi
xor    %eax,%eax
call   10d0 <atoi@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1060 <font@plt>
mov    $0x101,%edi
xor    %eax,%eax
call   1030 <qdevice@plt>
mov    $0x106,%edi
xor    %eax,%eax
call   1090 <unqdevice@plt>
lea    0x6(%rsp),%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <qread@plt>
cmp    $0x105,%eax
jne    1230 <main+0x50>
xor    %edi,%edi
xor    %eax,%eax
call   10b0 <color@plt>
xor    %eax,%eax
call   1100 <clear@plt>
movsd  0xda7(%rip),%xmm0
movsd  0xda7(%rip),%xmm1
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
mov    $0x4,%al
call   1050 <ortho2@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   10b0 <color@plt>
xorps  %xmm1,%xmm1
movsd  0xd7b(%rip),%xmm0
mov    $0x2,%al
call   10c0 <move2@plt>
xorps  %xmm1,%xmm1
movsd  0xd71(%rip),%xmm0
mov    $0x2,%al
call   1070 <draw2@plt>
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <qread@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   10c0 <move2@plt>
xorps  %xmm0,%xmm0
movsd  0xd43(%rip),%xmm1
mov    $0x2,%al
call   1070 <draw2@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   1080 <cmov2@plt>
lea    0xd38(%rip),%rdi
xor    %eax,%eax
call   10f0 <charstr@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <qread@plt>
xor    %eax,%eax
call   1040 <gexit@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"trivial\00"
@.str.1 = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @winopen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %13)
%15 = call i32 (i32, ...) bitcast (i32 (...)* @font to i32 (i32, ...)*)(i32 %14)
br label %16
16: ; preds = %10, %2
%17 = call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 257)
%18 = call i32 (i32, ...) bitcast (i32 (...)* @unqdevice to i32 (i32, ...)*)(i32 262)
br label %19
19: ; preds = %22, %16
%20 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %6)
%21 = icmp ne i32 %20, 261
br i1 %21, label %22, label %23
22: ; preds = %19
br label %19
23: ; preds = %19
%24 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 0)
%25 = call i32 (...) @clear()
%26 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @ortho2 to i32 (double, double, double, double, ...)*)(double -1.000000e+00, double 1.000000e+00, double -1.000000e+00, double 1.000000e+00)
%27 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 2)
%28 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double -1.000000e+00, double 0.000000e+00)
%29 = call i32 (double, double, ...) bitcast (i32 (...)* @draw2 to i32 (double, double, ...)*)(double 1.000000e+00, double 0.000000e+00)
%30 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %6)
%31 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double 0.000000e+00, double 0.000000e+00)
%32 = call i32 (double, double, ...) bitcast (i32 (...)* @draw2 to i32 (double, double, ...)*)(double 0.000000e+00, double 1.000000e+00)
%33 = call i32 (double, double, ...) bitcast (i32 (...)* @cmov2 to i32 (double, double, ...)*)(double 0.000000e+00, double 0.000000e+00)
%34 = call i32 (i8*, ...) bitcast (i32 (...)* @charstr to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%35 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %6)
%36 = call i32 (...) @gexit()
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@.str = [8 x i8] c"trivial\00"
@.str.1 = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @winopen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %0, 2
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %9)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @font to i32 (i32, ...)*)(i32 %10)
br label %12
12: ; preds = %7, %2
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @qdevice to i32 (i32, ...)*)(i32 257)
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @unqdevice to i32 (i32, ...)*)(i32 262)
br label %15
15: ; preds = %15, %12
%16 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %3)
%17 = icmp eq i32 %16, 261
br i1 %17, label %18, label %15
18: ; preds = %15
%19 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 0)
%20 = call i32 (...) @clear()
%21 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @ortho2 to i32 (double, double, double, double, ...)*)(double -1.000000e+00, double 1.000000e+00, double -1.000000e+00, double 1.000000e+00)
%22 = call i32 (i32, ...) bitcast (i32 (...)* @color to i32 (i32, ...)*)(i32 2)
%23 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double -1.000000e+00, double 0.000000e+00)
%24 = call i32 (double, double, ...) bitcast (i32 (...)* @draw2 to i32 (double, double, ...)*)(double 1.000000e+00, double 0.000000e+00)
%25 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %3)
%26 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double 0.000000e+00, double 0.000000e+00)
%27 = call i32 (double, double, ...) bitcast (i32 (...)* @draw2 to i32 (double, double, ...)*)(double 0.000000e+00, double 1.000000e+00)
%28 = call i32 (double, double, ...) bitcast (i32 (...)* @cmov2 to i32 (double, double, ...)*)(double 0.000000e+00, double 0.000000e+00)
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @charstr to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%30 = call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %3)
%31 = call i32 (...) @gexit()
ret i32 0
}