#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 */
typedef float GLfloat;
typedef double GLdouble;
typedef int /*<<< orphan*/ GLUtriangulatorObj;

/* Variables and functions */
int /*<<< orphan*/ GLU_BEGIN;
int /*<<< orphan*/ GLU_END;
int /*<<< orphan*/ GLU_VERTEX;
int /*<<< orphan*/ GL_CCW;
int /*<<< orphan*/ GL_CW;
int /*<<< orphan*/ GL_TRIANGLE_STRIP;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFrontFace(int /*<<< orphan*/);
int /*<<< orphan*/ glNormal3f(float, float, double);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(double, double, float);
scalar_t__ glVertex2fv;
int /*<<< orphan*/ glVertex3f(float, float, float);
int /*<<< orphan*/ gluBeginPolygon(int /*<<< orphan*/ *);
int /*<<< orphan*/ gluEndPolygon(int /*<<< orphan*/ *);
int /*<<< orphan*/ *gluNewTess();
int /*<<< orphan*/ gluTessCallback(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/ (*)());
int /*<<< orphan*/ gluTessVertex(int /*<<< orphan*/ *, double *, float *);
void ExtrudePart(int n, GLfloat v[][2], float depth) {
  static GLUtriangulatorObj *tobj = NULL;
  int i;
  float z0 = 0.5 * depth;
  float z1 = -0.5 * depth;
  GLdouble vertex[3];
  if (tobj == NULL) {
    tobj = gluNewTess();
    gluTessCallback(tobj, GLU_BEGIN, (void *)glBegin);
    gluTessCallback(tobj, GLU_VERTEX, (void *)glVertex2fv);
    gluTessCallback(tobj, GLU_END, glEnd);
  }
  glPushMatrix();
  glTranslatef(0.0, 0.0, z0);
  glNormal3f(0.0, 0.0, 1.0);
  gluBeginPolygon(tobj);
  for (i = 0; i < n; i++) {
    vertex[0] = v[i][0];
    vertex[1] = v[i][1];
    vertex[2] = 0.0;
    gluTessVertex(tobj, vertex, v[i]);
  }
  gluEndPolygon(tobj);
  glPopMatrix();
  glFrontFace(GL_CW);
  glPushMatrix();
  glTranslatef(0.0, 0.0, z1);
  glNormal3f(0.0, 0.0, -1.0);
  gluBeginPolygon(tobj);
  for (i = 0; i < n; i++) {
    vertex[0] = v[i][0];
    vertex[1] = v[i][1];
    vertex[2] = z1;
    gluTessVertex(tobj, vertex, v[i]);
  }
  gluEndPolygon(tobj);
  glPopMatrix();
  glFrontFace(GL_CCW);
  glBegin(GL_TRIANGLE_STRIP);
  for (i = 0; i <= n; i++) {
    float x = v[i % n][0];
    float y = v[i % n][1];
    float dx = v[(i + 1) % n][0] - x;
    float dy = v[(i + 1) % n][1] - y;
    glVertex3f(x, y, z0);
    glVertex3f(x, y, z1);
    glNormal3f(dy, -dx, 0.0);
  }
  glEnd();
}


x86 assembly (clang, -O0):
<ExtrudePart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe23(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdfd(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
cmpq   $0x0,0x2e68(%rip)
jne    1283 <ExtrudePart+0xc3>
mov    $0x0,%al
call   1030 <gluNewTess@plt>
mov    %rax,0x2e54(%rip)
mov    0x2e4d(%rip),%rdi
mov    0x2d76(%rip),%rax
mov    (%rax),%esi
mov    0x2da5(%rip),%rdx
call   10c0 <gluTessCallback@plt>
mov    0x2e31(%rip),%rdi
mov    0x2d52(%rip),%rax
mov    (%rax),%esi
mov    0x2d79(%rip),%rax
mov    (%rax),%rdx
call   10c0 <gluTessCallback@plt>
mov    0x2e12(%rip),%rdi
mov    0x2d5b(%rip),%rax
mov    (%rax),%esi
mov    0x2d42(%rip),%rdx
call   10c0 <gluTessCallback@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
movss  -0x1c(%rbp),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   10b0 <glTranslatef@plt>
xorps  %xmm1,%xmm1
movsd  0xd6b(%rip),%xmm2
movaps %xmm1,%xmm0
call   10d0 <glNormal3f@plt>
mov    0x2dcc(%rip),%rdi
call   1050 <gluBeginPolygon@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    132e <ExtrudePart+0x16e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,8),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  0x4(%rax,%rcx,8),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x2d78(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x18(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
call   1040 <gluTessVertex@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12c0 <ExtrudePart+0x100>
mov    0x2d4b(%rip),%rdi
call   1070 <gluEndPolygon@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    0x2c50(%rip),%rax
mov    (%rax),%edi
call   10a0 <glFrontFace@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
movss  -0x20(%rbp),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   10b0 <glTranslatef@plt>
xorps  %xmm1,%xmm1
movsd  0xca7(%rip),%xmm2
movaps %xmm1,%xmm0
call   10d0 <glNormal3f@plt>
mov    0x2d00(%rip),%rdi
call   1050 <gluBeginPolygon@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1400 <ExtrudePart+0x240>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,8),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  0x4(%rax,%rcx,8),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x2ca6(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x18(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
call   1040 <gluTessVertex@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    138c <ExtrudePart+0x1cc>
mov    0x2c79(%rip),%rdi
call   1070 <gluEndPolygon@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    0x2b9e(%rip),%rax
mov    (%rax),%edi
call   10a0 <glFrontFace@plt>
mov    0x2bd0(%rip),%rax
mov    (%rax),%edi
call   10e8 <glBegin@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1529 <ExtrudePart+0x369>
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    -0x70(%rbp),%rax
movslq %edx,%rcx
movss  (%rax,%rcx,8),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    -0x68(%rbp),%rax
movslq %edx,%rcx
movss  0x4(%rax,%rcx,8),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x60(%rbp),%rax
movslq %edx,%rcx
movss  (%rax,%rcx,8),%xmm0
subss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x58(%rbp),%rax
movslq %edx,%rcx
movss  0x4(%rax,%rcx,8),%xmm0
subss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x44(%rbp),%xmm0
movss  -0x48(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
call   1060 <glVertex3f@plt>
movss  -0x44(%rbp),%xmm0
movss  -0x48(%rbp),%xmm1
movss  -0x20(%rbp),%xmm2
call   1060 <glVertex3f@plt>
movss  -0x50(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
xorps  %xmm2,%xmm2
call   10d0 <glNormal3f@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1436 <ExtrudePart+0x276>
mov    $0x0,%al
call   10e0 <glEnd@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExtrudePart>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r15
mov    %edi,%r14d
movss  0xe24(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
cmpq   $0x0,0x2e92(%rip)
jne    125d <ExtrudePart+0x9d>
xor    %eax,%eax
movss  %xmm0,0xc(%rsp)
call   1030 <gluNewTess@plt>
mov    %rax,0x2e7c(%rip)
mov    0x2da5(%rip),%rcx
mov    (%rcx),%esi
mov    0x2dd4(%rip),%rdx
mov    %rax,%rdi
call   10c0 <gluTessCallback@plt>
mov    0x2e5d(%rip),%rdi
mov    0x2d7e(%rip),%rax
mov    (%rax),%esi
mov    0x2da5(%rip),%rax
mov    (%rax),%rdx
call   10c0 <gluTessCallback@plt>
mov    0x2e3e(%rip),%rdi
mov    0x2d87(%rip),%rax
mov    (%rax),%esi
mov    0x2d6e(%rip),%rdx
call   10c0 <gluTessCallback@plt>
movss  0xc(%rsp),%xmm0
mulss  0xd9f(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movss  0x10(%rsp),%xmm2
call   10b0 <glTranslatef@plt>
movsd  0xd7d(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   10d0 <glNormal3f@plt>
mov    0x2de3(%rip),%rdi
call   1050 <gluBeginPolygon@plt>
test   %r14d,%r14d
jle    13a2 <ExtrudePart+0x1e2>
mov    %r14d,%r13d
lea    0x30(%rsp),%r12
mov    %r13,%rbp
mov    %r15,%rbx
nopl   0x0(%rax)
cvtps2pd (%rbx),%xmm0
movaps %xmm0,0x30(%rsp)
movq   $0x0,0x40(%rsp)
mov    0x2da8(%rip),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <gluTessVertex@plt>
add    $0x8,%rbx
add    $0xffffffffffffffff,%rbp
jne    12c0 <ExtrudePart+0x100>
mov    0x2d8c(%rip),%rdi
call   1070 <gluEndPolygon@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
mov    0x2c91(%rip),%rax
mov    (%rax),%edi
call   10a0 <glFrontFace@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movss  0xc(%rsp),%xmm2
call   10b0 <glTranslatef@plt>
movsd  0xce2(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   10d0 <glNormal3f@plt>
mov    0x2d40(%rip),%rdi
call   1050 <gluBeginPolygon@plt>
test   %r14d,%r14d
jle    13fa <ExtrudePart+0x23a>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x30(%rsp),%r12
mov    %r15,%rbx
cs nopw 0x0(%rax,%rax,1)
cvtps2pd (%rbx),%xmm0
movaps %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
mov    0x2cf5(%rip),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <gluTessVertex@plt>
add    $0x8,%rbx
add    $0xffffffffffffffff,%r13
jne    1370 <ExtrudePart+0x1b0>
jmp    13fa <ExtrudePart+0x23a>
mov    0x2cd7(%rip),%rdi
call   1070 <gluEndPolygon@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
mov    0x2bdc(%rip),%rax
mov    (%rax),%edi
call   10a0 <glFrontFace@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movss  0xc(%rsp),%xmm2
call   10b0 <glTranslatef@plt>
movsd  0xc2d(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   10d0 <glNormal3f@plt>
mov    0x2c8b(%rip),%rdi
call   1050 <gluBeginPolygon@plt>
mov    0x2c7f(%rip),%rdi
call   1070 <gluEndPolygon@plt>
xor    %r12d,%r12d
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
mov    0x2ba1(%rip),%rax
mov    (%rax),%edi
call   10a0 <glFrontFace@plt>
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
call   10e8 <glBegin@plt>
test   %r14d,%r14d
js     14d5 <ExtrudePart+0x315>
mov    %r14d,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
sub    $0x1,%ebx
mov    %ebp,%eax
cmovb  %r12d,%eax
movss  (%r15,%rax,8),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x4(%r15,%rax,8),%xmm1
movss  %xmm1,0x18(%rsp)
lea    0x1(%rbp),%r13d
mov    %r13d,%eax
cltd
idiv   %r14d
movss  (%r15,%rdx,8),%xmm2
movss  0x4(%r15,%rdx,8),%xmm3
subss  %xmm0,%xmm2
xorps  0xb9b(%rip),%xmm2
movaps %xmm2,0x20(%rsp)
subss  %xmm1,%xmm3
movss  %xmm3,0x1c(%rsp)
movss  0x10(%rsp),%xmm2
call   1060 <glVertex3f@plt>
movss  0x14(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
call   1060 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0x1c(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
call   10d0 <glNormal3f@plt>
cmp    %r14d,%ebp
mov    %r13d,%ebp
jne    1440 <ExtrudePart+0x280>
xor    %eax,%eax
call   10e0 <glEnd@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@ExtrudePart.tobj = internal global i32* null
@GLU_BEGIN = global i32 0
@GLU_VERTEX = global i32 0
@glVertex2fv = global i64 0
@GLU_END = global i32 0
@GL_CW = global i32 0
@GL_CCW = global i32 0
@GL_TRIANGLE_STRIP = global i32 0
define void @ExtrudePart(i32 %0, [2 x float]* %1, float %2) {
%4 = alloca i32
%5 = alloca [2 x float]*
%6 = alloca float
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca [3 x double]
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store i32 %0, i32* %4
store [2 x float]* %1, [2 x float]** %5
store float %2, float* %6
%15 = load float, float* %6
%16 = fpext float %15 to double
%17 = fmul double 5.000000e-01, %16
%18 = fptrunc double %17 to float
store float %18, float* %8
%19 = load float, float* %6
%20 = fpext float %19 to double
%21 = fmul double -5.000000e-01, %20
%22 = fptrunc double %21 to float
store float %22, float* %9
%23 = load i32*, i32** @ExtrudePart.tobj
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %39
25: ; preds = %3
%26 = call i32* (...) @gluNewTess()
store i32* %26, i32** @ExtrudePart.tobj
%27 = load i32*, i32** @ExtrudePart.tobj
%28 = load i32, i32* @GLU_BEGIN
%29 = call i32 @gluTessCallback(i32* %27, i32 %28, i32 (...)* bitcast (i32 (i32)* @glBegin to i32 (...)*))
%30 = load i32*, i32** @ExtrudePart.tobj
%31 = load i32, i32* @GLU_VERTEX
%32 = load i64, i64* @glVertex2fv
%33 = inttoptr i64 %32 to i8*
%34 = bitcast i8* %33 to i32 (...)*
%35 = call i32 @gluTessCallback(i32* %30, i32 %31, i32 (...)* %34)
%36 = load i32*, i32** @ExtrudePart.tobj
%37 = load i32, i32* @GLU_END
%38 = call i32 @gluTessCallback(i32* %36, i32 %37, i32 (...)* @glEnd)
br label %39
39: ; preds = %25, %3
%40 = call i32 (...) @glPushMatrix()
%41 = load float, float* %8
%42 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, float %41)
%43 = call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, double 1.000000e+00)
%44 = load i32*, i32** @ExtrudePart.tobj
%45 = call i32 @gluBeginPolygon(i32* %44)
store i32 0, i32* %7
br label %46
46: ; preds = %76, %39
%47 = load i32, i32* %7
%48 = load i32, i32* %4
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %79
50: ; preds = %46
%51 = load [2 x float]*, [2 x float]** %5
%52 = load i32, i32* %7
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [2 x float], [2 x float]* %51, i64 %53
%55 = getelementptr inbounds [2 x float], [2 x float]* %54, i64 0, i64 0
%56 = load float, float* %55
%57 = fpext float %56 to double
%58 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
store double %57, double* %58
%59 = load [2 x float]*, [2 x float]** %5
%60 = load i32, i32* %7
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [2 x float], [2 x float]* %59, i64 %61
%63 = getelementptr inbounds [2 x float], [2 x float]* %62, i64 0, i64 1
%64 = load float, float* %63
%65 = fpext float %64 to double
%66 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 1
store double %65, double* %66
%67 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
store double 0.000000e+00, double* %67
%68 = load i32*, i32** @ExtrudePart.tobj
%69 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%70 = load [2 x float]*, [2 x float]** %5
%71 = load i32, i32* %7
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [2 x float], [2 x float]* %70, i64 %72
%74 = getelementptr inbounds [2 x float], [2 x float]* %73, i64 0, i64 0
%75 = call i32 @gluTessVertex(i32* %68, double* %69, float* %74)
br label %76
76: ; preds = %50
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
store i32 %78, i32* %7
br label %46
79: ; preds = %46
%80 = load i32*, i32** @ExtrudePart.tobj
%81 = call i32 @gluEndPolygon(i32* %80)
%82 = call i32 (...) @glPopMatrix()
%83 = load i32, i32* @GL_CW
%84 = call i32 @glFrontFace(i32 %83)
%85 = call i32 (...) @glPushMatrix()
%86 = load float, float* %9
%87 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, float %86)
%88 = call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, double -1.000000e+00)
%89 = load i32*, i32** @ExtrudePart.tobj
%90 = call i32 @gluBeginPolygon(i32* %89)
store i32 0, i32* %7
br label %91
91: ; preds = %123, %79
%92 = load i32, i32* %7
%93 = load i32, i32* %4
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %126
95: ; preds = %91
%96 = load [2 x float]*, [2 x float]** %5
%97 = load i32, i32* %7
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [2 x float], [2 x float]* %96, i64 %98
%100 = getelementptr inbounds [2 x float], [2 x float]* %99, i64 0, i64 0
%101 = load float, float* %100
%102 = fpext float %101 to double
%103 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
store double %102, double* %103
%104 = load [2 x float]*, [2 x float]** %5
%105 = load i32, i32* %7
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [2 x float], [2 x float]* %104, i64 %106
%108 = getelementptr inbounds [2 x float], [2 x float]* %107, i64 0, i64 1
%109 = load float, float* %108
%110 = fpext float %109 to double
%111 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 1
store double %110, double* %111
%112 = load float, float* %9
%113 = fpext float %112 to double
%114 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
store double %113, double* %114
%115 = load i32*, i32** @ExtrudePart.tobj
%116 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%117 = load [2 x float]*, [2 x float]** %5
%118 = load i32, i32* %7
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [2 x float], [2 x float]* %117, i64 %119
%121 = getelementptr inbounds [2 x float], [2 x float]* %120, i64 0, i64 0
%122 = call i32 @gluTessVertex(i32* %115, double* %116, float* %121)
br label %123
123: ; preds = %95
%124 = load i32, i32* %7
%125 = add nsw i32 %124, 1
store i32 %125, i32* %7
br label %91
126: ; preds = %91
%127 = load i32*, i32** @ExtrudePart.tobj
%128 = call i32 @gluEndPolygon(i32* %127)
%129 = call i32 (...) @glPopMatrix()
%130 = load i32, i32* @GL_CCW
%131 = call i32 @glFrontFace(i32 %130)
%132 = load i32, i32* @GL_TRIANGLE_STRIP
%133 = call i32 @glBegin(i32 %132)
store i32 0, i32* %7
br label %134
134: ; preds = %189, %126
%135 = load i32, i32* %7
%136 = load i32, i32* %4
%137 = icmp sle i32 %135, %136
br i1 %137, label %138, label %192
138: ; preds = %134
%139 = load [2 x float]*, [2 x float]** %5
%140 = load i32, i32* %7
%141 = load i32, i32* %4
%142 = srem i32 %140, %141
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [2 x float], [2 x float]* %139, i64 %143
%145 = getelementptr inbounds [2 x float], [2 x float]* %144, i64 0, i64 0
%146 = load float, float* %145
store float %146, float* %11
%147 = load [2 x float]*, [2 x float]** %5
%148 = load i32, i32* %7
%149 = load i32, i32* %4
%150 = srem i32 %148, %149
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [2 x float], [2 x float]* %147, i64 %151
%153 = getelementptr inbounds [2 x float], [2 x float]* %152, i64 0, i64 1
%154 = load float, float* %153
store float %154, float* %12
%155 = load [2 x float]*, [2 x float]** %5
%156 = load i32, i32* %7
%157 = add nsw i32 %156, 1
%158 = load i32, i32* %4
%159 = srem i32 %157, %158
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [2 x float], [2 x float]* %155, i64 %160
%162 = getelementptr inbounds [2 x float], [2 x float]* %161, i64 0, i64 0
%163 = load float, float* %162
%164 = load float, float* %11
%165 = fsub float %163, %164
store float %165, float* %13
%166 = load [2 x float]*, [2 x float]** %5
%167 = load i32, i32* %7
%168 = add nsw i32 %167, 1
%169 = load i32, i32* %4
%170 = srem i32 %168, %169
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds [2 x float], [2 x float]* %166, i64 %171
%173 = getelementptr inbounds [2 x float], [2 x float]* %172, i64 0, i64 1
%174 = load float, float* %173
%175 = load float, float* %12
%176 = fsub float %174, %175
store float %176, float* %14
%177 = load float, float* %11
%178 = load float, float* %12
%179 = load float, float* %8
%180 = call i32 @glVertex3f(float %177, float %178, float %179)
%181 = load float, float* %11
%182 = load float, float* %12
%183 = load float, float* %9
%184 = call i32 @glVertex3f(float %181, float %182, float %183)
%185 = load float, float* %14
%186 = load float, float* %13
%187 = fneg float %186
%188 = call i32 @glNormal3f(float %185, float %187, double 0.000000e+00)
br label %189
189: ; preds = %138
%190 = load i32, i32* %7
%191 = add nsw i32 %190, 1
store i32 %191, i32* %7
br label %134
192: ; preds = %134
%193 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@ExtrudePart.tobj = internal unnamed_addr global i32* null
@GLU_BEGIN = global i32 0
@GLU_VERTEX = global i32 0
@glVertex2fv = global i64 0
@GLU_END = global i32 0
@GL_CW = global i32 0
@GL_CCW = global i32 0
@GL_TRIANGLE_STRIP = global i32 0
define void @ExtrudePart(i32 %0, [2 x float]* %1, float %2) {
%4 = alloca [3 x double]
%5 = fmul float %2, 5.000000e-01
%6 = fmul float %2, -5.000000e-01
%7 = bitcast [3 x double]* %4 to i8*
%8 = load i32*, i32** @ExtrudePart.tobj
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %22
10: ; preds = %3
%11 = tail call i32* (...) @gluNewTess()
store i32* %11, i32** @ExtrudePart.tobj
%12 = load i32, i32* @GLU_BEGIN
%13 = tail call i32 @gluTessCallback(i32* %11, i32 %12, i32 (...)* bitcast (i32 (i32)* @glBegin to i32 (...)*))
%14 = load i32*, i32** @ExtrudePart.tobj
%15 = load i32, i32* @GLU_VERTEX
%16 = load i64, i64* @glVertex2fv
%17 = inttoptr i64 %16 to i32 (...)*
%18 = tail call i32 @gluTessCallback(i32* %14, i32 %15, i32 (...)* %17)
%19 = load i32*, i32** @ExtrudePart.tobj
%20 = load i32, i32* @GLU_END
%21 = tail call i32 @gluTessCallback(i32* %19, i32 %20, i32 (...)* @glEnd)
br label %22
22: ; preds = %10, %3
%23 = tail call i32 (...) @glPushMatrix()
%24 = tail call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, float %5)
%25 = tail call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, double 1.000000e+00)
%26 = load i32*, i32** @ExtrudePart.tobj
%27 = tail call i32 @gluBeginPolygon(i32* %26)
%28 = icmp sgt i32 %0, 0
br i1 %28, label %29, label %71
29: ; preds = %22
%30 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%31 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%32 = zext i32 %0 to i64
%33 = bitcast [3 x double]* %4 to <2 x double>*
br label %34
34: ; preds = %29, %34
%35 = phi i64 [ 0, %29 ], [ %42, %34 ]
%36 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 %35, i64 0
%37 = bitcast float* %36 to <2 x float>*
%38 = load <2 x float>, <2 x float>* %37
%39 = fpext <2 x float> %38 to <2 x double>
store <2 x double> %39, <2 x double>* %33
store double 0.000000e+00, double* %31
%40 = load i32*, i32** @ExtrudePart.tobj
%41 = call i32 @gluTessVertex(i32* %40, double* %30, float* %36)
%42 = add nuw nsw i64 %35, 1
%43 = icmp eq i64 %42, %32
br i1 %43, label %44, label %34
44: ; preds = %34
%45 = load i32*, i32** @ExtrudePart.tobj
%46 = call i32 @gluEndPolygon(i32* %45)
%47 = call i32 (...) @glPopMatrix()
%48 = load i32, i32* @GL_CW
%49 = call i32 @glFrontFace(i32 %48)
%50 = call i32 (...) @glPushMatrix()
%51 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, float %6)
%52 = call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, double -1.000000e+00)
%53 = load i32*, i32** @ExtrudePart.tobj
%54 = call i32 @gluBeginPolygon(i32* %53)
br i1 %28, label %55, label %82
55: ; preds = %44
%56 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%57 = fpext float %6 to double
%58 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%59 = zext i32 %0 to i64
%60 = bitcast [3 x double]* %4 to <2 x double>*
br label %61
61: ; preds = %55, %61
%62 = phi i64 [ 0, %55 ], [ %69, %61 ]
%63 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 %62, i64 0
%64 = bitcast float* %63 to <2 x float>*
%65 = load <2 x float>, <2 x float>* %64
%66 = fpext <2 x float> %65 to <2 x double>
store <2 x double> %66, <2 x double>* %60
store double %57, double* %58
%67 = load i32*, i32** @ExtrudePart.tobj
%68 = call i32 @gluTessVertex(i32* %67, double* %56, float* %63)
%69 = add nuw nsw i64 %62, 1
%70 = icmp eq i64 %69, %59
br i1 %70, label %82, label %61
71: ; preds = %22
%72 = load i32*, i32** @ExtrudePart.tobj
%73 = call i32 @gluEndPolygon(i32* %72)
%74 = call i32 (...) @glPopMatrix()
%75 = load i32, i32* @GL_CW
%76 = call i32 @glFrontFace(i32 %75)
%77 = call i32 (...) @glPushMatrix()
%78 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, float %6)
%79 = call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, double -1.000000e+00)
%80 = load i32*, i32** @ExtrudePart.tobj
%81 = call i32 @gluBeginPolygon(i32* %80)
br label %82
82: ; preds = %61, %71, %44
%83 = load i32*, i32** @ExtrudePart.tobj
%84 = call i32 @gluEndPolygon(i32* %83)
%85 = call i32 (...) @glPopMatrix()
%86 = load i32, i32* @GL_CCW
%87 = call i32 @glFrontFace(i32 %86)
%88 = load i32, i32* @GL_TRIANGLE_STRIP
%89 = call i32 @glBegin(i32 %88)
%90 = icmp slt i32 %0, 0
br i1 %90, label %114, label %91
91: ; preds = %82, %91
%92 = phi i32 [ %100, %91 ], [ 0, %82 ]
%93 = icmp eq i32 %92, %0
%94 = select i1 %93, i32 0, i32 %92
%95 = zext i32 %94 to i64
%96 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 %95, i64 0
%97 = load float, float* %96
%98 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 %95, i64 1
%99 = load float, float* %98
%100 = add nuw nsw i32 %92, 1
%101 = srem i32 %100, %0
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 %102, i64 0
%104 = load float, float* %103
%105 = fsub float %104, %97
%106 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 %102, i64 1
%107 = load float, float* %106
%108 = fsub float %107, %99
%109 = call i32 @glVertex3f(float %97, float %99, float %5)
%110 = call i32 @glVertex3f(float %97, float %99, float %6)
%111 = fneg float %105
%112 = call i32 @glNormal3f(float %108, float %111, double 0.000000e+00)
%113 = icmp eq i32 %92, %0
br i1 %113, label %114, label %91
114: ; preds = %91, %82
%115 = call i32 (...) @glEnd()
ret void
}