#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 GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ fog_renderSphere(int, double, double);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glFlush();
void fog_display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  fog_renderSphere(-2., -0.5, -1.0);
  fog_renderSphere(-1., -0.5, -2.0);
  fog_renderSphere(0., -0.5, -3.0);
  fog_renderSphere(1., -0.5, -4.0);
  fog_renderSphere(2., -0.5, -5.0);
  glFlush();
}


x86 assembly (clang, -O0):
<fog_display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0xfffffffe,%edi
movsd  0xea8(%rip),%xmm0
movsd  0xec8(%rip),%xmm1
call   1050 <fog_renderSphere@plt>
mov    $0xffffffff,%edi
movsd  0xe8e(%rip),%xmm0
movsd  0xea6(%rip),%xmm1
call   1050 <fog_renderSphere@plt>
xor    %edi,%edi
movsd  0xe77(%rip),%xmm0
movsd  0xe87(%rip),%xmm1
call   1050 <fog_renderSphere@plt>
mov    $0x1,%edi
movsd  0xe5d(%rip),%xmm0
movsd  0xe65(%rip),%xmm1
call   1050 <fog_renderSphere@plt>
mov    $0x2,%edi
movsd  0xe43(%rip),%xmm0
movsd  0xe43(%rip),%xmm1
call   1050 <fog_renderSphere@plt>
mov    $0x0,%al
call   1040 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fog_display>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
movsd  0xeb0(%rip),%xmm0
movsd  0xeb0(%rip),%xmm1
mov    $0xfffffffe,%edi
call   1050 <fog_renderSphere@plt>
movsd  0xea6(%rip),%xmm1
mov    $0xffffffff,%edi
movsd  0xe89(%rip),%xmm0
call   1050 <fog_renderSphere@plt>
movsd  0xe94(%rip),%xmm1
xor    %edi,%edi
movsd  0xe72(%rip),%xmm0
call   1050 <fog_renderSphere@plt>
movsd  0xe85(%rip),%xmm1
mov    $0x1,%edi
movsd  0xe58(%rip),%xmm0
call   1050 <fog_renderSphere@plt>
movsd  0xe73(%rip),%xmm1
mov    $0x2,%edi
movsd  0xe3e(%rip),%xmm0
call   1050 <fog_renderSphere@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @fog_display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 @fog_renderSphere(i32 -2, double -5.000000e-01, double -1.000000e+00)
%6 = call i32 @fog_renderSphere(i32 -1, double -5.000000e-01, double -2.000000e+00)
%7 = call i32 @fog_renderSphere(i32 0, double -5.000000e-01, double -3.000000e+00)
%8 = call i32 @fog_renderSphere(i32 1, double -5.000000e-01, double -4.000000e+00)
%9 = call i32 @fog_renderSphere(i32 2, double -5.000000e-01, double -5.000000e+00)
%10 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @fog_display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 @fog_renderSphere(i32 -2, double -5.000000e-01, double -1.000000e+00)
%6 = tail call i32 @fog_renderSphere(i32 -1, double -5.000000e-01, double -2.000000e+00)
%7 = tail call i32 @fog_renderSphere(i32 0, double -5.000000e-01, double -3.000000e+00)
%8 = tail call i32 @fog_renderSphere(i32 1, double -5.000000e-01, double -4.000000e+00)
%9 = tail call i32 @fog_renderSphere(i32 2, double -5.000000e-01, double -5.000000e+00)
%10 = tail call i32 (...) @glFlush()
ret void
}