#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_BLEND;
int /*<<< orphan*/ GL_BLUE_SCALE;
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_GREEN_SCALE;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_RED_SCALE;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFinish();
int /*<<< orphan*/ glPixelTransferf(int /*<<< orphan*/, double);
void Redraw(void) {
  glClearColor(1.0, 1.0, 1.0, 1.0);
  glClear(GL_COLOR_BUFFER_BIT);
  glPixelTransferf(GL_RED_SCALE, 1.0);
  glPixelTransferf(GL_GREEN_SCALE, 0.0);
  glPixelTransferf(GL_BLUE_SCALE, 0.0);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glEnable(GL_BLEND);
  glFinish();
}


x86 assembly (clang, -O0):
<Redraw>:
push   %rbp
mov    %rsp,%rbp
movsd  0xe94(%rip),%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1070 <glClearColor@plt>
mov    0x2e2f(%rip),%rax
mov    (%rax),%edi
call   1040 <glClear@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
movsd  0xe67(%rip),%xmm0
call   1080 <glPixelTransferf@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
call   1080 <glPixelTransferf@plt>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
call   1080 <glPixelTransferf@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
mov    0x2e10(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    $0x0,%al
call   1060 <glFinish@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Redraw>:
push   %rax
movsd  0xe97(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
call   1070 <glClearColor@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
call   1040 <glClear@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
movsd  0xe6a(%rip),%xmm0
call   1080 <glPixelTransferf@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
call   1080 <glPixelTransferf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
call   1080 <glPixelTransferf@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
mov    0x2e13(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glFinish@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_RED_SCALE = global i32 0
@GL_GREEN_SCALE = global i32 0
@GL_BLUE_SCALE = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_BLEND = global i32 0
define void @Redraw() {
%1 = call i32 @glClearColor(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%2 = load i32, i32* @GL_COLOR_BUFFER_BIT
%3 = call i32 @glClear(i32 %2)
%4 = load i32, i32* @GL_RED_SCALE
%5 = call i32 @glPixelTransferf(i32 %4, double 1.000000e+00)
%6 = load i32, i32* @GL_GREEN_SCALE
%7 = call i32 @glPixelTransferf(i32 %6, double 0.000000e+00)
%8 = load i32, i32* @GL_BLUE_SCALE
%9 = call i32 @glPixelTransferf(i32 %8, double 0.000000e+00)
%10 = load i32, i32* @GL_SRC_ALPHA
%11 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%12 = call i32 @glBlendFunc(i32 %10, i32 %11)
%13 = load i32, i32* @GL_BLEND
%14 = call i32 @glEnable(i32 %13)
%15 = call i32 (...) @glFinish()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_RED_SCALE = global i32 0
@GL_GREEN_SCALE = global i32 0
@GL_BLUE_SCALE = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_BLEND = global i32 0
define void @Redraw() {
%1 = tail call i32 @glClearColor(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%2 = load i32, i32* @GL_COLOR_BUFFER_BIT
%3 = tail call i32 @glClear(i32 %2)
%4 = load i32, i32* @GL_RED_SCALE
%5 = tail call i32 @glPixelTransferf(i32 %4, double 1.000000e+00)
%6 = load i32, i32* @GL_GREEN_SCALE
%7 = tail call i32 @glPixelTransferf(i32 %6, double 0.000000e+00)
%8 = load i32, i32* @GL_BLUE_SCALE
%9 = tail call i32 @glPixelTransferf(i32 %8, double 0.000000e+00)
%10 = load i32, i32* @GL_SRC_ALPHA
%11 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%12 = tail call i32 @glBlendFunc(i32 %10, i32 %11)
%13 = load i32, i32* @GL_BLEND
%14 = tail call i32 @glEnable(i32 %13)
%15 = tail call i32 (...) @glFinish()
ret void
}