#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*/ GL_FLAT;
int /*<<< orphan*/ GL_LINE_SMOOTH;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ initshapes(int);
int /*<<< orphan*/ myReshape(int, int);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
void myinit(void) {
  int i;
  srandom(getpid());
  glClearColor(0.0, 0.0, 0.0, 1.0);
  glEnable(GL_LINE_SMOOTH);
  glShadeModel(GL_FLAT);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  for (i = 0; i < 7; i++)
    initshapes(i);
  myReshape(200, 200);
}


x86 assembly (clang, -O0):
<myinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,%edi
call   1040 <srandom@plt>
xorps  %xmm2,%xmm2
movsd  0xe5f(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1080 <glClearColor@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
call   1090 <glShadeModel@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
mov    0x2e10(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jge    1206 <myinit+0x86>
mov    -0x4(%rbp),%edi
call   10a0 <initshapes@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11e6 <myinit+0x66>
mov    $0xc8,%esi
mov    %esi,%edi
call   1070 <myReshape@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myinit>:
push   %rax
xor    %eax,%eax
call   1050 <getpid@plt>
mov    %eax,%edi
call   1040 <srandom@plt>
movsd  0xe69(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1080 <glClearColor@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2e26(%rip),%rax
mov    (%rax),%edi
call   1090 <glShadeModel@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
mov    0x2e17(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
xor    %edi,%edi
call   10a0 <initshapes@plt>
mov    $0x1,%edi
call   10a0 <initshapes@plt>
mov    $0x2,%edi
call   10a0 <initshapes@plt>
mov    $0x3,%edi
call   10a0 <initshapes@plt>
mov    $0x4,%edi
call   10a0 <initshapes@plt>
mov    $0x5,%edi
call   10a0 <initshapes@plt>
mov    $0x6,%edi
call   10a0 <initshapes@plt>
mov    $0xc8,%edi
mov    $0xc8,%esi
pop    %rax
jmp    1070 <myReshape@plt>

LLVM IR (-O0):
@GL_LINE_SMOOTH = global i32 0
@GL_FLAT = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
define void @myinit() {
%1 = alloca i32
%2 = call i32 (...) @getpid()
%3 = call i32 @srandom(i32 %2)
%4 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%5 = load i32, i32* @GL_LINE_SMOOTH
%6 = call i32 @glEnable(i32 %5)
%7 = load i32, i32* @GL_FLAT
%8 = call i32 @glShadeModel(i32 %7)
%9 = load i32, i32* @GL_SRC_ALPHA
%10 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%11 = call i32 @glBlendFunc(i32 %9, i32 %10)
store i32 0, i32* %1
br label %12
12: ; preds = %18, %0
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 7
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %1
%17 = call i32 @initshapes(i32 %16)
br label %18
18: ; preds = %15
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %12
21: ; preds = %12
%22 = call i32 @myReshape(i32 200, i32 200)
ret void
}

LLVM IR (-O2):
@GL_LINE_SMOOTH = global i32 0
@GL_FLAT = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
define void @myinit() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @srandom(i32 %1)
%3 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%4 = load i32, i32* @GL_LINE_SMOOTH
%5 = tail call i32 @glEnable(i32 %4)
%6 = load i32, i32* @GL_FLAT
%7 = tail call i32 @glShadeModel(i32 %6)
%8 = load i32, i32* @GL_SRC_ALPHA
%9 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%10 = tail call i32 @glBlendFunc(i32 %8, i32 %9)
%11 = tail call i32 @initshapes(i32 0)
%12 = tail call i32 @initshapes(i32 1)
%13 = tail call i32 @initshapes(i32 2)
%14 = tail call i32 @initshapes(i32 3)
%15 = tail call i32 @initshapes(i32 4)
%16 = tail call i32 @initshapes(i32 5)
%17 = tail call i32 @initshapes(i32 6)
%18 = tail call i32 @myReshape(i32 200, i32 200)
ret void
}