#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_MODELVIEW;
int /*<<< orphan*/ GL_POINTS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glPointSize(float);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(int, int, float);
int /*<<< orphan*/ glVertex2f(int, int);
void estado(int x, int y, int tX, int tY) {
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glPushMatrix();
  glColor3f(1.0, 1.0, 0.0);
  glPointSize(10.0f);
  glBegin(GL_POINTS);
  glVertex2f(x + 0.5 + tX, y + 0.5 + tY);
  glEnd();
  glTranslatef(tX, tY, 0.0f);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<estado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xe30(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1070 <glColor3f@plt>
movss  0xe25(%rip),%xmm0
call   10a0 <glPointSize@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
call   10c0 <glBegin@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xdf5(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xdd7(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
call   1090 <glVertex2f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
xorps  %xmm0,%xmm0
call   10b0 <glTranslatef@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estado>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %esi,%r14d
mov    %edi,%ebx
mov    0x2e30(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xe2b(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm1
call   1070 <glColor3f@plt>
movss  0xe28(%rip),%xmm0
call   10a0 <glPointSize@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
call   10c0 <glBegin@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  0xdfe(%rip),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %ebp,%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
cvttsd2si %xmm2,%edi
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
xorps  %xmm2,%xmm2
cvtsi2sd %r15d,%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
cvttsd2si %xmm2,%esi
call   1090 <glVertex2f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
xorpd  %xmm0,%xmm0
mov    %ebp,%edi
mov    %r15d,%esi
call   10b0 <glTranslatef@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <glPopMatrix@plt>

LLVM IR (-O0):
@GL_MODELVIEW = global i32 0
@GL_POINTS = global i32 0
define void @estado(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* @GL_MODELVIEW
%10 = call i32 @glMatrixMode(i32 %9)
%11 = call i32 (...) @glLoadIdentity()
%12 = call i32 (...) @glPushMatrix()
%13 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%14 = call i32 @glPointSize(float 1.000000e+01)
%15 = load i32, i32* @GL_POINTS
%16 = call i32 @glBegin(i32 %15)
%17 = load i32, i32* %5
%18 = sitofp i32 %17 to double
%19 = fadd double %18, 5.000000e-01
%20 = load i32, i32* %7
%21 = sitofp i32 %20 to double
%22 = fadd double %19, %21
%23 = fptosi double %22 to i32
%24 = load i32, i32* %6
%25 = sitofp i32 %24 to double
%26 = fadd double %25, 5.000000e-01
%27 = load i32, i32* %8
%28 = sitofp i32 %27 to double
%29 = fadd double %26, %28
%30 = fptosi double %29 to i32
%31 = call i32 @glVertex2f(i32 %23, i32 %30)
%32 = call i32 (...) @glEnd()
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = call i32 @glTranslatef(i32 %33, i32 %34, float 0.000000e+00)
%36 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@GL_MODELVIEW = global i32 0
@GL_POINTS = global i32 0
define void @estado(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = load i32, i32* @GL_MODELVIEW
%6 = tail call i32 @glMatrixMode(i32 %5)
%7 = tail call i32 (...) @glLoadIdentity()
%8 = tail call i32 (...) @glPushMatrix()
%9 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%10 = tail call i32 @glPointSize(float 1.000000e+01)
%11 = load i32, i32* @GL_POINTS
%12 = tail call i32 @glBegin(i32 %11)
%13 = sitofp i32 %0 to double
%14 = fadd double %13, 5.000000e-01
%15 = sitofp i32 %2 to double
%16 = fadd double %14, %15
%17 = fptosi double %16 to i32
%18 = sitofp i32 %1 to double
%19 = fadd double %18, 5.000000e-01
%20 = sitofp i32 %3 to double
%21 = fadd double %19, %20
%22 = fptosi double %21 to i32
%23 = tail call i32 @glVertex2f(i32 %17, i32 %22)
%24 = tail call i32 (...) @glEnd()
%25 = tail call i32 @glTranslatef(i32 %2, i32 %3, float 0.000000e+00)
%26 = tail call i32 (...) @glPopMatrix()
ret void
}