#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_LINES;
int /*<<< orphan*/ GL_POLYGON;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glVertex2i(int, int);
void IconArrow(int updwn, int x, int y) {
  glLineWidth(1.0);
  if (updwn > 0) {
    glColor3f(0.0, 0.8, 0.0);
    glBegin(GL_POLYGON);
    glVertex2i(x, y);
    glVertex2i(x + 12, y);
    glVertex2i(x + 6, y + 12);
    glVertex2i(x, y);
    glEnd();
    glColor3f(0.0, 1.0, 0.0);
    glBegin(GL_LINES);
    glVertex2i(x + 12, y);
    glVertex2i(x + 6, y + 12);
    glEnd();
  } else if (updwn == 0) {
    glColor3f(0.8, 0.8, 0.8);
    glBegin(GL_POLYGON);
    glVertex2i(x, y + 3);
    glVertex2i(x + 12, y + 3);
    glVertex2i(x + 12, y + 6 + 3);
    glVertex2i(x, y + 6 + 3);
    glVertex2i(x, y + 3);
    glEnd();
    glColor3f(1.0, 1.0, 1.0);
    glBegin(GL_LINES);
    glVertex2i(x, y + 9);
    glVertex2i(x + 12, y + 9);
    glEnd();
  } else {
    glColor3f(0.7, 0.0, 0.0);
    glBegin(GL_POLYGON);
    glVertex2i(x, y + 12);
    glVertex2i(x + 12, y + 12);
    glVertex2i(x + 6, y);
    glVertex2i(x, y + 12);
    glEnd();
    glColor3f(1.0, 0.0, 0.0);
    glBegin(GL_LINES);
    glVertex2i(x + 12, y + 12);
    glVertex2i(x + 6, y);
    glEnd();
  }
}


x86 assembly (clang, -O0):
<IconArrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  0xe97(%rip),%xmm0
call   1030 <glLineWidth@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1221 <IconArrow+0xd1>
xorps  %xmm2,%xmm2
movsd  0xe8d(%rip),%xmm1
movaps %xmm2,%xmm0
call   1060 <glColor3f@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0x6,%edi
mov    -0xc(%rbp),%esi
add    $0xc,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
xorps  %xmm2,%xmm2
movsd  0xe20(%rip),%xmm1
movaps %xmm2,%xmm0
call   1060 <glColor3f@plt>
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0x6,%edi
mov    -0xc(%rbp),%esi
add    $0xc,%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
jmp    13a0 <IconArrow+0x250>
cmpl   $0x0,-0x4(%rbp)
jne    12f1 <IconArrow+0x1a1>
movsd  0xddd(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glColor3f@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x3,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
add    $0x3,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
add    $0x6,%esi
add    $0x3,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x6,%esi
add    $0x3,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x3,%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
movsd  0xd53(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glColor3f@plt>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x9,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
add    $0x9,%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
jmp    139b <IconArrow+0x24b>
movsd  0xd0f(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1060 <glColor3f@plt>
mov    0x2ced(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0xc,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
add    $0xc,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0x6,%edi
mov    -0xc(%rbp),%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0xc,%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
movsd  0xca4(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1060 <glColor3f@plt>
mov    0x2c7a(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    -0x8(%rbp),%edi
add    $0xc,%edi
mov    -0xc(%rbp),%esi
add    $0xc,%esi
call   1040 <glVertex2i@plt>
mov    -0x8(%rbp),%edi
add    $0x6,%edi
mov    -0xc(%rbp),%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
jmp    13a0 <IconArrow+0x250>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IconArrow>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %esi,%r12d
mov    %edi,%ebx
movsd  0xe98(%rip),%xmm0
call   1030 <glLineWidth@plt>
test   %ebx,%ebx
jle    120a <IconArrow+0xba>
movsd  0xe93(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1060 <glColor3f@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    %r12d,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
lea    0xc(%r12),%r15d
mov    %r15d,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
lea    0x6(%r12),%ebp
lea    0xc(%r14),%ebx
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <glVertex2i@plt>
mov    %r12d,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
xor    %eax,%eax
call   1050 <glEnd@plt>
movsd  0xe23(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1060 <glColor3f@plt>
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    %r15d,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
mov    %ebp,%edi
mov    %ebx,%esi
jmp    1338 <IconArrow+0x1e8>
je     12a0 <IconArrow+0x150>
movsd  0xdf0(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1060 <glColor3f@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
lea    0xc(%r14),%ebp
mov    %r12d,%edi
mov    %ebp,%esi
call   1040 <glVertex2i@plt>
lea    0xc(%r12),%r15d
mov    %r15d,%edi
mov    %ebp,%esi
call   1040 <glVertex2i@plt>
lea    0x6(%r12),%ebx
mov    %ebx,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
mov    %r12d,%edi
mov    %ebp,%esi
call   1040 <glVertex2i@plt>
xor    %eax,%eax
call   1050 <glEnd@plt>
movsd  0xd8a(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1060 <glColor3f@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    %r15d,%edi
mov    %ebp,%esi
call   1040 <glVertex2i@plt>
mov    %ebx,%edi
jmp    1335 <IconArrow+0x1e5>
movsd  0xd68(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glColor3f@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
lea    0x3(%r14),%ebx
mov    %r12d,%edi
mov    %ebx,%esi
call   1040 <glVertex2i@plt>
lea    0xc(%r12),%ebp
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <glVertex2i@plt>
add    $0x9,%r14d
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
mov    %r12d,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
mov    %r12d,%edi
mov    %ebx,%esi
call   1040 <glVertex2i@plt>
xor    %eax,%eax
call   1050 <glEnd@plt>
movsd  0xcf1(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glColor3f@plt>
mov    0x2cc7(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
mov    %r12d,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <glVertex2i@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <glEnd@plt>

LLVM IR (-O0):
@GL_POLYGON = global i32 0
@GL_LINES = global i32 0
define void @IconArrow(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @glLineWidth(double 1.000000e+00)
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %43
10: ; preds = %3
%11 = call i32 @glColor3f(double 0.000000e+00, double 8.000000e-01, double 0.000000e+00)
%12 = load i32, i32* @GL_POLYGON
%13 = call i32 @glBegin(i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @glVertex2i(i32 %14, i32 %15)
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 12
%19 = load i32, i32* %6
%20 = call i32 @glVertex2i(i32 %18, i32 %19)
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 6
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 12
%25 = call i32 @glVertex2i(i32 %22, i32 %24)
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = call i32 @glVertex2i(i32 %26, i32 %27)
%29 = call i32 (...) @glEnd()
%30 = call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%31 = load i32, i32* @GL_LINES
%32 = call i32 @glBegin(i32 %31)
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 12
%35 = load i32, i32* %6
%36 = call i32 @glVertex2i(i32 %34, i32 %35)
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 6
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 12
%41 = call i32 @glVertex2i(i32 %38, i32 %40)
%42 = call i32 (...) @glEnd()
br label %124
43: ; preds = %3
%44 = load i32, i32* %4
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %88
46: ; preds = %43
%47 = call i32 @glColor3f(double 8.000000e-01, double 8.000000e-01, double 8.000000e-01)
%48 = load i32, i32* @GL_POLYGON
%49 = call i32 @glBegin(i32 %48)
%50 = load i32, i32* %5
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 3
%53 = call i32 @glVertex2i(i32 %50, i32 %52)
%54 = load i32, i32* %5
%55 = add nsw i32 %54, 12
%56 = load i32, i32* %6
%57 = add nsw i32 %56, 3
%58 = call i32 @glVertex2i(i32 %55, i32 %57)
%59 = load i32, i32* %5
%60 = add nsw i32 %59, 12
%61 = load i32, i32* %6
%62 = add nsw i32 %61, 6
%63 = add nsw i32 %62, 3
%64 = call i32 @glVertex2i(i32 %60, i32 %63)
%65 = load i32, i32* %5
%66 = load i32, i32* %6
%67 = add nsw i32 %66, 6
%68 = add nsw i32 %67, 3
%69 = call i32 @glVertex2i(i32 %65, i32 %68)
%70 = load i32, i32* %5
%71 = load i32, i32* %6
%72 = add nsw i32 %71, 3
%73 = call i32 @glVertex2i(i32 %70, i32 %72)
%74 = call i32 (...) @glEnd()
%75 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%76 = load i32, i32* @GL_LINES
%77 = call i32 @glBegin(i32 %76)
%78 = load i32, i32* %5
%79 = load i32, i32* %6
%80 = add nsw i32 %79, 9
%81 = call i32 @glVertex2i(i32 %78, i32 %80)
%82 = load i32, i32* %5
%83 = add nsw i32 %82, 12
%84 = load i32, i32* %6
%85 = add nsw i32 %84, 9
%86 = call i32 @glVertex2i(i32 %83, i32 %85)
%87 = call i32 (...) @glEnd()
br label %123
88: ; preds = %43
%89 = call i32 @glColor3f(double 0x3FE6666666666666, double 0.000000e+00, double 0.000000e+00)
%90 = load i32, i32* @GL_POLYGON
%91 = call i32 @glBegin(i32 %90)
%92 = load i32, i32* %5
%93 = load i32, i32* %6
%94 = add nsw i32 %93, 12
%95 = call i32 @glVertex2i(i32 %92, i32 %94)
%96 = load i32, i32* %5
%97 = add nsw i32 %96, 12
%98 = load i32, i32* %6
%99 = add nsw i32 %98, 12
%100 = call i32 @glVertex2i(i32 %97, i32 %99)
%101 = load i32, i32* %5
%102 = add nsw i32 %101, 6
%103 = load i32, i32* %6
%104 = call i32 @glVertex2i(i32 %102, i32 %103)
%105 = load i32, i32* %5
%106 = load i32, i32* %6
%107 = add nsw i32 %106, 12
%108 = call i32 @glVertex2i(i32 %105, i32 %107)
%109 = call i32 (...) @glEnd()
%110 = call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%111 = load i32, i32* @GL_LINES
%112 = call i32 @glBegin(i32 %111)
%113 = load i32, i32* %5
%114 = add nsw i32 %113, 12
%115 = load i32, i32* %6
%116 = add nsw i32 %115, 12
%117 = call i32 @glVertex2i(i32 %114, i32 %116)
%118 = load i32, i32* %5
%119 = add nsw i32 %118, 6
%120 = load i32, i32* %6
%121 = call i32 @glVertex2i(i32 %119, i32 %120)
%122 = call i32 (...) @glEnd()
br label %123
123: ; preds = %88, %46
br label %124
124: ; preds = %123, %10
ret void
}

LLVM IR (-O2):
@GL_POLYGON = global i32 0
@GL_LINES = global i32 0
define void @IconArrow(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glLineWidth(double 1.000000e+00)
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %23
6: ; preds = %3
%7 = tail call i32 @glColor3f(double 0.000000e+00, double 8.000000e-01, double 0.000000e+00)
%8 = load i32, i32* @GL_POLYGON
%9 = tail call i32 @glBegin(i32 %8)
%10 = tail call i32 @glVertex2i(i32 %1, i32 %2)
%11 = add nsw i32 %1, 12
%12 = tail call i32 @glVertex2i(i32 %11, i32 %2)
%13 = add nsw i32 %1, 6
%14 = add nsw i32 %2, 12
%15 = tail call i32 @glVertex2i(i32 %13, i32 %14)
%16 = tail call i32 @glVertex2i(i32 %1, i32 %2)
%17 = tail call i32 (...) @glEnd()
%18 = tail call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%19 = load i32, i32* @GL_LINES
%20 = tail call i32 @glBegin(i32 %19)
%21 = tail call i32 @glVertex2i(i32 %11, i32 %2)
%22 = tail call i32 @glVertex2i(i32 %13, i32 %14)
br label %60
23: ; preds = %3
%24 = icmp eq i32 %0, 0
br i1 %24, label %25, label %43
25: ; preds = %23
%26 = tail call i32 @glColor3f(double 8.000000e-01, double 8.000000e-01, double 8.000000e-01)
%27 = load i32, i32* @GL_POLYGON
%28 = tail call i32 @glBegin(i32 %27)
%29 = add nsw i32 %2, 3
%30 = tail call i32 @glVertex2i(i32 %1, i32 %29)
%31 = add nsw i32 %1, 12
%32 = tail call i32 @glVertex2i(i32 %31, i32 %29)
%33 = add nsw i32 %2, 9
%34 = tail call i32 @glVertex2i(i32 %31, i32 %33)
%35 = tail call i32 @glVertex2i(i32 %1, i32 %33)
%36 = tail call i32 @glVertex2i(i32 %1, i32 %29)
%37 = tail call i32 (...) @glEnd()
%38 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%39 = load i32, i32* @GL_LINES
%40 = tail call i32 @glBegin(i32 %39)
%41 = tail call i32 @glVertex2i(i32 %1, i32 %33)
%42 = tail call i32 @glVertex2i(i32 %31, i32 %33)
br label %60
43: ; preds = %23
%44 = tail call i32 @glColor3f(double 0x3FE6666666666666, double 0.000000e+00, double 0.000000e+00)
%45 = load i32, i32* @GL_POLYGON
%46 = tail call i32 @glBegin(i32 %45)
%47 = add nsw i32 %2, 12
%48 = tail call i32 @glVertex2i(i32 %1, i32 %47)
%49 = add nsw i32 %1, 12
%50 = tail call i32 @glVertex2i(i32 %49, i32 %47)
%51 = add nsw i32 %1, 6
%52 = tail call i32 @glVertex2i(i32 %51, i32 %2)
%53 = tail call i32 @glVertex2i(i32 %1, i32 %47)
%54 = tail call i32 (...) @glEnd()
%55 = tail call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%56 = load i32, i32* @GL_LINES
%57 = tail call i32 @glBegin(i32 %56)
%58 = tail call i32 @glVertex2i(i32 %49, i32 %47)
%59 = tail call i32 @glVertex2i(i32 %51, i32 %2)
br label %60
60: ; preds = %25, %43, %6
%61 = tail call i32 (...) @glEnd()
ret void
}