#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*/ colorUpdate(int);
int /*<<< orphan*/ drawleaf(int);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ gravity(double);
int /*<<< orphan*/ motionUpdate(int);
void oneFrame(void) {
  int i;
  gravity(-2.0);
  for (i = 0; i < 7; i++) {
    motionUpdate(i);
    colorUpdate(i);
    drawleaf(i);
  }
  glFlush();
}


x86 assembly (clang, -O0):
<oneFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xea0(%rip),%xmm0
call   1060 <gravity@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jge    119c <oneFrame+0x4c>
mov    -0x4(%rbp),%edi
call   1070 <motionUpdate@plt>
mov    -0x4(%rbp),%edi
call   1040 <colorUpdate@plt>
mov    -0x4(%rbp),%edi
call   1050 <drawleaf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    116c <oneFrame+0x1c>
mov    $0x0,%al
call   1030 <glFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oneFrame>:
push   %rax
movsd  0xea7(%rip),%xmm0
call   1060 <gravity@plt>
xor    %edi,%edi
call   1070 <motionUpdate@plt>
xor    %edi,%edi
call   1040 <colorUpdate@plt>
xor    %edi,%edi
call   1050 <drawleaf@plt>
mov    $0x1,%edi
call   1070 <motionUpdate@plt>
mov    $0x1,%edi
call   1040 <colorUpdate@plt>
mov    $0x1,%edi
call   1050 <drawleaf@plt>
mov    $0x2,%edi
call   1070 <motionUpdate@plt>
mov    $0x2,%edi
call   1040 <colorUpdate@plt>
mov    $0x2,%edi
call   1050 <drawleaf@plt>
mov    $0x3,%edi
call   1070 <motionUpdate@plt>
mov    $0x3,%edi
call   1040 <colorUpdate@plt>
mov    $0x3,%edi
call   1050 <drawleaf@plt>
mov    $0x4,%edi
call   1070 <motionUpdate@plt>
mov    $0x4,%edi
call   1040 <colorUpdate@plt>
mov    $0x4,%edi
call   1050 <drawleaf@plt>
mov    $0x5,%edi
call   1070 <motionUpdate@plt>
mov    $0x5,%edi
call   1040 <colorUpdate@plt>
mov    $0x5,%edi
call   1050 <drawleaf@plt>
mov    $0x6,%edi
call   1070 <motionUpdate@plt>
mov    $0x6,%edi
call   1040 <colorUpdate@plt>
mov    $0x6,%edi
call   1050 <drawleaf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glFlush@plt>

LLVM IR (-O0):
define void @oneFrame() {
%1 = alloca i32
%2 = call i32 @gravity(double -2.000000e+00)
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 7
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 @motionUpdate(i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @colorUpdate(i32 %9)
%11 = load i32, i32* %1
%12 = call i32 @drawleaf(i32 %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %3
16: ; preds = %3
%17 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
define void @oneFrame() {
%1 = tail call i32 @gravity(double -2.000000e+00)
%2 = tail call i32 @motionUpdate(i32 0)
%3 = tail call i32 @colorUpdate(i32 0)
%4 = tail call i32 @drawleaf(i32 0)
%5 = tail call i32 @motionUpdate(i32 1)
%6 = tail call i32 @colorUpdate(i32 1)
%7 = tail call i32 @drawleaf(i32 1)
%8 = tail call i32 @motionUpdate(i32 2)
%9 = tail call i32 @colorUpdate(i32 2)
%10 = tail call i32 @drawleaf(i32 2)
%11 = tail call i32 @motionUpdate(i32 3)
%12 = tail call i32 @colorUpdate(i32 3)
%13 = tail call i32 @drawleaf(i32 3)
%14 = tail call i32 @motionUpdate(i32 4)
%15 = tail call i32 @colorUpdate(i32 4)
%16 = tail call i32 @drawleaf(i32 4)
%17 = tail call i32 @motionUpdate(i32 5)
%18 = tail call i32 @colorUpdate(i32 5)
%19 = tail call i32 @drawleaf(i32 5)
%20 = tail call i32 @motionUpdate(i32 6)
%21 = tail call i32 @colorUpdate(i32 6)
%22 = tail call i32 @drawleaf(i32 6)
%23 = tail call i32 (...) @glFlush()
ret void
}