#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 int GLint;
typedef int /*<<< orphan*/ GLenum;
typedef double GLdouble;

/* Variables and functions */
double cos(double);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glNormal3dv(double *);
int /*<<< orphan*/ glVertex3dv(double *);
int /*<<< orphan*/ m_xformpt(double *, double *, double *, double *);
double sin(double);
void doughnut(GLdouble r, GLdouble R, GLint nsides, GLint rings, GLenum type) {
  int i, j;
  GLdouble theta, phi, theta1, phi1;
  GLdouble p0[03], p1[3], p2[3], p3[3];
  GLdouble n0[3], n1[3], n2[3], n3[3];
  for (i = 0; i < rings; i++) {
    theta = (GLdouble)i * 2.0 * 3.1415926535897 / rings;
    theta1 = (GLdouble)(i + 1) * 2.0 * 3.1415926535897 / rings;
    for (j = 0; j < nsides; j++) {
      phi = (GLdouble)j * 2.0 * 3.1415926535897 / nsides;
      phi1 = (GLdouble)(j + 1) * 2.0 * 3.1415926535897 / nsides;
      p0[0] = cos(theta) * (R + r * cos(phi));
      p0[1] = -sin(theta) * (R + r * cos(phi));
      p0[2] = r * sin(phi);
      p1[0] = cos(theta1) * (R + r * cos(phi));
      p1[1] = -sin(theta1) * (R + r * cos(phi));
      p1[2] = r * sin(phi);
      p2[0] = cos(theta1) * (R + r * cos(phi1));
      p2[1] = -sin(theta1) * (R + r * cos(phi1));
      p2[2] = r * sin(phi1);
      p3[0] = cos(theta) * (R + r * cos(phi1));
      p3[1] = -sin(theta) * (R + r * cos(phi1));
      p3[2] = r * sin(phi1);
      n0[0] = cos(theta) * (cos(phi));
      n0[1] = -sin(theta) * (cos(phi));
      n0[2] = sin(phi);
      n1[0] = cos(theta1) * (cos(phi));
      n1[1] = -sin(theta1) * (cos(phi));
      n1[2] = sin(phi);
      n2[0] = cos(theta1) * (cos(phi1));
      n2[1] = -sin(theta1) * (cos(phi1));
      n2[2] = sin(phi1);
      n3[0] = cos(theta) * (cos(phi1));
      n3[1] = -sin(theta) * (cos(phi1));
      n3[2] = sin(phi1);
      m_xformpt(p0, p0, n0, n0);
      m_xformpt(p1, p1, n1, n1);
      m_xformpt(p2, p2, n2, n2);
      m_xformpt(p3, p3, n3, n3);
      glBegin(type);
      glNormal3dv(n3);
      glVertex3dv(p3);
      glNormal3dv(n2);
      glVertex3dv(p2);
      glNormal3dv(n1);
      glVertex3dv(p1);
      glNormal3dv(n0);
      glVertex3dv(p0);
      glEnd();
    }
  }
}


x86 assembly (clang, -O0):
<doughnut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    19d2 <doughnut+0x862>
cvtsi2sdl -0x20(%rbp),%xmm0
movsd  0xe5a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe46(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe2a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe16(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    19bf <doughnut+0x84f>
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  0xdec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xdbc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xda8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x250(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x258(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x260(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x260(%rbp),%xmm1
ff
movsd  -0x258(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x250(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x238(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x240(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x248(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x248(%rbp),%xmm1
ff
movsd  -0x240(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x238(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x230(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x230(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x218(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x220(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x228(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x228(%rbp),%xmm1
ff
movsd  -0x220(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x218(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x210(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x210(%rbp),%xmm1
ff
movsd  -0x208(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x200(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1f8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x1f8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x1e0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x1e8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1f0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x1f0(%rbp),%xmm1
ff
movsd  -0x1e8(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x1e0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x1c8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x1d8(%rbp),%xmm1
ff
movsd  -0x1d0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x1c8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1c0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x1c0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x1a8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x1b0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x1b8(%rbp),%xmm1
ff
movsd  -0x1b0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x1a8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x1a0(%rbp),%xmm1
ff
movsd  -0x198(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x190(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x188(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x180(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x178(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x170(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x168(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x160(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x158(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x150(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x130(%rbp)
ff
lea    -0x60(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
call   1070 <m_xformpt@plt>
lea    -0x80(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x100(%rbp),%rcx
call   1070 <m_xformpt@plt>
lea    -0xa0(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0x120(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1070 <m_xformpt@plt>
lea    -0xc0(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
lea    -0x140(%rbp),%rdx
lea    -0x140(%rbp),%rcx
call   1070 <m_xformpt@plt>
mov    -0x1c(%rbp),%edi
call   1090 <glBegin@plt>
lea    -0x140(%rbp),%rdi
call   1030 <glNormal3dv@plt>
lea    -0xc0(%rbp),%rdi
call   1050 <glVertex3dv@plt>
lea    -0x120(%rbp),%rdi
call   1030 <glNormal3dv@plt>
lea    -0xa0(%rbp),%rdi
call   1050 <glVertex3dv@plt>
lea    -0x100(%rbp),%rdi
call   1030 <glNormal3dv@plt>
lea    -0x80(%rbp),%rdi
call   1050 <glVertex3dv@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <glNormal3dv@plt>
lea    -0x60(%rbp),%rdi
call   1050 <glVertex3dv@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1203 <doughnut+0x93>
jmp    19c4 <doughnut+0x854>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1195 <doughnut+0x25>
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doughnut>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x188,%rsp
mov    %edx,0x5c(%rsp)
mov    %edi,0x50(%rsp)
movsd  %xmm1,0x38(%rsp)
movsd  %xmm0,(%rsp)
mov    %esi,0x54(%rsp)
test   %esi,%esi
jle    17b1 <doughnut+0x641>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x54(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
mov    0x50(%rsp),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mov    %eax,%edx
neg    %edx
xorpd  %xmm0,%xmm0
movsd  0xe36(%rip),%xmm2
movsd  0xe36(%rip),%xmm3
xor    %eax,%eax
movsd  %xmm1,0x78(%rsp)
mov    %rdx,0x70(%rsp)
jmp    1204 <doughnut+0x94>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x58(%rsp),%eax
cmp    0x54(%rsp),%eax
movsd  0x68(%rsp),%xmm0
je     17b1 <doughnut+0x641>
movapd %xmm0,%xmm4
add    $0x1,%eax
mov    %eax,0x58(%rsp)
addsd  %xmm3,%xmm0
movsd  %xmm0,0x68(%rsp)
cmpl   $0x0,0x50(%rsp)
jle    11f0 <doughnut+0x80>
addsd  %xmm4,%xmm4
mulsd  %xmm2,%xmm4
movsd  0x60(%rsp),%xmm0
divsd  %xmm0,%xmm4
movsd  %xmm4,0x48(%rsp)
xorps  %xmm4,%xmm4
cvtsi2sdl 0x58(%rsp),%xmm4
addsd  %xmm4,%xmm4
mulsd  %xmm2,%xmm4
divsd  %xmm0,%xmm4
movsd  %xmm4,0x40(%rsp)
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
nopl   0x0(%rax)
mov    %rcx,0x80(%rsp)
movapd %xmm0,%xmm4
addsd  %xmm0,%xmm4
mulsd  %xmm2,%xmm4
divsd  %xmm1,%xmm4
movsd  %xmm4,0x20(%rsp)
xorps  %xmm4,%xmm4
cvtsi2sd %ecx,%xmm4
addsd  %xmm3,%xmm0
movsd  %xmm0,0x88(%rsp)
addsd  %xmm4,%xmm4
mulsd  %xmm2,%xmm4
divsd  %xmm1,%xmm4
movsd  %xmm4,0x8(%rsp)
movsd  0x48(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0xb0(%rsp)
movsd  0x48(%rsp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movaps 0xd21(%rip),%xmm0
xorps  %xmm0,%xmm1
movaps %xmm1,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0xb8(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0xc0(%rsp)
movsd  0x40(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x170(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0xc93(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x178(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x180(%rsp)
movsd  0x40(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x150(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0xc08(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x158(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x160(%rsp)
movsd  0x48(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x130(%rsp)
movsd  0x48(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0xb7d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  (%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x138(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x140(%rsp)
movsd  0x48(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x90(%rsp)
movsd  0x48(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0xafd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x98(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0xa0(%rsp)
movsd  0x40(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x110(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0xa8d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x118(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0x120(%rsp)
movsd  0x40(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0xf0(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0xa1d(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0xf8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0x100(%rsp)
movsd  0x48(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0xd0(%rsp)
movsd  0x48(%rsp),%xmm0
call   1060 <sin@plt>
xorps  0x9ad(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0xd8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0xe0(%rsp)
lea    0xb0(%rsp),%rdi
mov    %rdi,%rsi
lea    0x90(%rsp),%rcx
mov    %rcx,%rdx
call   1070 <m_xformpt@plt>
lea    0x170(%rsp),%r13
mov    %r13,%rdi
mov    %r13,%rsi
lea    0x110(%rsp),%rbx
mov    %rbx,%rdx
mov    %rbx,%rcx
call   1070 <m_xformpt@plt>
lea    0x150(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbp,%rsi
lea    0xf0(%rsp),%r15
mov    %r15,%rdx
mov    %r15,%rcx
call   1070 <m_xformpt@plt>
lea    0x130(%rsp),%r14
mov    %r14,%rdi
mov    %r14,%rsi
lea    0xd0(%rsp),%r12
mov    %r12,%rdx
mov    %r12,%rcx
call   1070 <m_xformpt@plt>
mov    0x5c(%rsp),%edi
call   1090 <glBegin@plt>
mov    %r12,%rdi
call   1030 <glNormal3dv@plt>
mov    %r14,%rdi
call   1050 <glVertex3dv@plt>
mov    %r15,%rdi
call   1030 <glNormal3dv@plt>
mov    %rbp,%rdi
call   1050 <glVertex3dv@plt>
mov    %rbx,%rdi
call   1030 <glNormal3dv@plt>
mov    %r13,%rdi
call   1050 <glVertex3dv@plt>
lea    0x90(%rsp),%rdi
call   1030 <glNormal3dv@plt>
lea    0xb0(%rsp),%rdi
call   1050 <glVertex3dv@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
movsd  0x88(%rsp),%xmm0
movsd  0x889(%rip),%xmm3
movsd  0x879(%rip),%xmm2
mov    0x70(%rsp),%rdx
movsd  0x78(%rsp),%xmm1
mov    0x80(%rsp),%rcx
lea    (%rdx,%rcx,1),%eax
add    $0x1,%eax
add    $0x1,%ecx
cmp    $0x1,%eax
jne    1260 <doughnut+0xf0>
jmp    11f0 <doughnut+0x80>
add    $0x188,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @doughnut(double %0, double %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca [3 x double]
%18 = alloca [3 x double]
%19 = alloca [3 x double]
%20 = alloca [3 x double]
%21 = alloca [3 x double]
%22 = alloca [3 x double]
%23 = alloca [3 x double]
%24 = alloca [3 x double]
store double %0, double* %6
store double %1, double* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %11
br label %25
25: ; preds = %268, %5
%26 = load i32, i32* %11
%27 = load i32, i32* %9
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %271
29: ; preds = %25
%30 = load i32, i32* %11
%31 = sitofp i32 %30 to double
%32 = fmul double %31, 2.000000e+00
%33 = fmul double %32, 0x400921FB54442C46
%34 = load i32, i32* %9
%35 = sitofp i32 %34 to double
%36 = fdiv double %33, %35
store double %36, double* %13
%37 = load i32, i32* %11
%38 = add nsw i32 %37, 1
%39 = sitofp i32 %38 to double
%40 = fmul double %39, 2.000000e+00
%41 = fmul double %40, 0x400921FB54442C46
%42 = load i32, i32* %9
%43 = sitofp i32 %42 to double
%44 = fdiv double %41, %43
store double %44, double* %15
store i32 0, i32* %12
br label %45
45: ; preds = %264, %29
%46 = load i32, i32* %12
%47 = load i32, i32* %8
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %267
49: ; preds = %45
%50 = load i32, i32* %12
%51 = sitofp i32 %50 to double
%52 = fmul double %51, 2.000000e+00
%53 = fmul double %52, 0x400921FB54442C46
%54 = load i32, i32* %8
%55 = sitofp i32 %54 to double
%56 = fdiv double %53, %55
store double %56, double* %14
%57 = load i32, i32* %12
%58 = add nsw i32 %57, 1
%59 = sitofp i32 %58 to double
%60 = fmul double %59, 2.000000e+00
%61 = fmul double %60, 0x400921FB54442C46
%62 = load i32, i32* %8
%63 = sitofp i32 %62 to double
%64 = fdiv double %61, %63
store double %64, double* %16
%65 = load double, double* %13
%66 = call double @cos(double %65)
%67 = load double, double* %7
%68 = load double, double* %6
%69 = load double, double* %14
%70 = call double @cos(double %69)
%71 = call double @llvm.fmuladd.f64(double %68, double %70, double %67)
%72 = fmul double %66, %71
%73 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 0
store double %72, double* %73
%74 = load double, double* %13
%75 = call double @sin(double %74)
%76 = fneg double %75
%77 = load double, double* %7
%78 = load double, double* %6
%79 = load double, double* %14
%80 = call double @cos(double %79)
%81 = call double @llvm.fmuladd.f64(double %78, double %80, double %77)
%82 = fmul double %76, %81
%83 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 1
store double %82, double* %83
%84 = load double, double* %6
%85 = load double, double* %14
%86 = call double @sin(double %85)
%87 = fmul double %84, %86
%88 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 2
store double %87, double* %88
%89 = load double, double* %15
%90 = call double @cos(double %89)
%91 = load double, double* %7
%92 = load double, double* %6
%93 = load double, double* %14
%94 = call double @cos(double %93)
%95 = call double @llvm.fmuladd.f64(double %92, double %94, double %91)
%96 = fmul double %90, %95
%97 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 0
store double %96, double* %97
%98 = load double, double* %15
%99 = call double @sin(double %98)
%100 = fneg double %99
%101 = load double, double* %7
%102 = load double, double* %6
%103 = load double, double* %14
%104 = call double @cos(double %103)
%105 = call double @llvm.fmuladd.f64(double %102, double %104, double %101)
%106 = fmul double %100, %105
%107 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 1
store double %106, double* %107
%108 = load double, double* %6
%109 = load double, double* %14
%110 = call double @sin(double %109)
%111 = fmul double %108, %110
%112 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 2
store double %111, double* %112
%113 = load double, double* %15
%114 = call double @cos(double %113)
%115 = load double, double* %7
%116 = load double, double* %6
%117 = load double, double* %16
%118 = call double @cos(double %117)
%119 = call double @llvm.fmuladd.f64(double %116, double %118, double %115)
%120 = fmul double %114, %119
%121 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
store double %120, double* %121
%122 = load double, double* %15
%123 = call double @sin(double %122)
%124 = fneg double %123
%125 = load double, double* %7
%126 = load double, double* %6
%127 = load double, double* %16
%128 = call double @cos(double %127)
%129 = call double @llvm.fmuladd.f64(double %126, double %128, double %125)
%130 = fmul double %124, %129
%131 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 1
store double %130, double* %131
%132 = load double, double* %6
%133 = load double, double* %16
%134 = call double @sin(double %133)
%135 = fmul double %132, %134
%136 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 2
store double %135, double* %136
%137 = load double, double* %13
%138 = call double @cos(double %137)
%139 = load double, double* %7
%140 = load double, double* %6
%141 = load double, double* %16
%142 = call double @cos(double %141)
%143 = call double @llvm.fmuladd.f64(double %140, double %142, double %139)
%144 = fmul double %138, %143
%145 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 0
store double %144, double* %145
%146 = load double, double* %13
%147 = call double @sin(double %146)
%148 = fneg double %147
%149 = load double, double* %7
%150 = load double, double* %6
%151 = load double, double* %16
%152 = call double @cos(double %151)
%153 = call double @llvm.fmuladd.f64(double %150, double %152, double %149)
%154 = fmul double %148, %153
%155 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 1
store double %154, double* %155
%156 = load double, double* %6
%157 = load double, double* %16
%158 = call double @sin(double %157)
%159 = fmul double %156, %158
%160 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 2
store double %159, double* %160
%161 = load double, double* %13
%162 = call double @cos(double %161)
%163 = load double, double* %14
%164 = call double @cos(double %163)
%165 = fmul double %162, %164
%166 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
store double %165, double* %166
%167 = load double, double* %13
%168 = call double @sin(double %167)
%169 = fneg double %168
%170 = load double, double* %14
%171 = call double @cos(double %170)
%172 = fmul double %169, %171
%173 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 1
store double %172, double* %173
%174 = load double, double* %14
%175 = call double @sin(double %174)
%176 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 2
store double %175, double* %176
%177 = load double, double* %15
%178 = call double @cos(double %177)
%179 = load double, double* %14
%180 = call double @cos(double %179)
%181 = fmul double %178, %180
%182 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
store double %181, double* %182
%183 = load double, double* %15
%184 = call double @sin(double %183)
%185 = fneg double %184
%186 = load double, double* %14
%187 = call double @cos(double %186)
%188 = fmul double %185, %187
%189 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 1
store double %188, double* %189
%190 = load double, double* %14
%191 = call double @sin(double %190)
%192 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 2
store double %191, double* %192
%193 = load double, double* %15
%194 = call double @cos(double %193)
%195 = load double, double* %16
%196 = call double @cos(double %195)
%197 = fmul double %194, %196
%198 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
store double %197, double* %198
%199 = load double, double* %15
%200 = call double @sin(double %199)
%201 = fneg double %200
%202 = load double, double* %16
%203 = call double @cos(double %202)
%204 = fmul double %201, %203
%205 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
store double %204, double* %205
%206 = load double, double* %16
%207 = call double @sin(double %206)
%208 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 2
store double %207, double* %208
%209 = load double, double* %13
%210 = call double @cos(double %209)
%211 = load double, double* %16
%212 = call double @cos(double %211)
%213 = fmul double %210, %212
%214 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
store double %213, double* %214
%215 = load double, double* %13
%216 = call double @sin(double %215)
%217 = fneg double %216
%218 = load double, double* %16
%219 = call double @cos(double %218)
%220 = fmul double %217, %219
%221 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 1
store double %220, double* %221
%222 = load double, double* %16
%223 = call double @sin(double %222)
%224 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 2
store double %223, double* %224
%225 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 0
%226 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 0
%227 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%228 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%229 = call i32 @m_xformpt(double* %225, double* %226, double* %227, double* %228)
%230 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 0
%231 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 0
%232 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%233 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%234 = call i32 @m_xformpt(double* %230, double* %231, double* %232, double* %233)
%235 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%236 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%237 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%238 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%239 = call i32 @m_xformpt(double* %235, double* %236, double* %237, double* %238)
%240 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 0
%241 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 0
%242 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
%243 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
%244 = call i32 @m_xformpt(double* %240, double* %241, double* %242, double* %243)
%245 = load i32, i32* %10
%246 = call i32 @glBegin(i32 %245)
%247 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
%248 = call i32 @glNormal3dv(double* %247)
%249 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 0
%250 = call i32 @glVertex3dv(double* %249)
%251 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%252 = call i32 @glNormal3dv(double* %251)
%253 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%254 = call i32 @glVertex3dv(double* %253)
%255 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%256 = call i32 @glNormal3dv(double* %255)
%257 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 0
%258 = call i32 @glVertex3dv(double* %257)
%259 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%260 = call i32 @glNormal3dv(double* %259)
%261 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 0
%262 = call i32 @glVertex3dv(double* %261)
%263 = call i32 (...) @glEnd()
br label %264
264: ; preds = %49
%265 = load i32, i32* %12
%266 = add nsw i32 %265, 1
store i32 %266, i32* %12
br label %45
267: ; preds = %45
br label %268
268: ; preds = %267
%269 = load i32, i32* %11
%270 = add nsw i32 %269, 1
store i32 %270, i32* %11
br label %25
271: ; preds = %25
ret void
}

LLVM IR (-O2):
define void @doughnut(double %0, double %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [3 x double]
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca [3 x double]
%11 = alloca [3 x double]
%12 = alloca [3 x double]
%13 = alloca [3 x double]
%14 = bitcast [3 x double]* %6 to i8*
%15 = bitcast [3 x double]* %7 to i8*
%16 = bitcast [3 x double]* %8 to i8*
%17 = bitcast [3 x double]* %9 to i8*
%18 = bitcast [3 x double]* %10 to i8*
%19 = bitcast [3 x double]* %11 to i8*
%20 = bitcast [3 x double]* %12 to i8*
%21 = bitcast [3 x double]* %13 to i8*
%22 = icmp sgt i32 %3, 0
br i1 %22, label %23, label %166
23: ; preds = %5
%24 = sitofp i32 %3 to double
%25 = icmp sgt i32 %2, 0
%26 = sitofp i32 %2 to double
%27 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%28 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%29 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%30 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%31 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%32 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%33 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%34 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%35 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%36 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%37 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 1
%38 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
%39 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%40 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 1
%41 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
%42 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%43 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
%44 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
%45 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%46 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 1
%47 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
%48 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%49 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 1
%50 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 2
br label %53
51: ; preds = %64, %53
%52 = icmp eq i32 %59, %3
br i1 %52, label %166, label %53
53: ; preds = %23, %51
%54 = phi i32 [ 0, %23 ], [ %59, %51 ]
%55 = sitofp i32 %54 to double
%56 = fmul double %55, 2.000000e+00
%57 = fmul double %56, 0x400921FB54442C46
%58 = fdiv double %57, %24
%59 = add nuw nsw i32 %54, 1
%60 = sitofp i32 %59 to double
%61 = fmul double %60, 2.000000e+00
%62 = fmul double %61, 0x400921FB54442C46
%63 = fdiv double %62, %24
br i1 %25, label %64, label %51
64: ; preds = %53, %64
%65 = phi i32 [ %70, %64 ], [ 0, %53 ]
%66 = sitofp i32 %65 to double
%67 = fmul double %66, 2.000000e+00
%68 = fmul double %67, 0x400921FB54442C46
%69 = fdiv double %68, %26
%70 = add nuw nsw i32 %65, 1
%71 = sitofp i32 %70 to double
%72 = fmul double %71, 2.000000e+00
%73 = fmul double %72, 0x400921FB54442C46
%74 = fdiv double %73, %26
%75 = call double @cos(double %58)
%76 = call double @cos(double %69)
%77 = call double @llvm.fmuladd.f64(double %0, double %76, double %1)
%78 = fmul double %75, %77
store double %78, double* %27
%79 = call double @sin(double %58)
%80 = fneg double %79
%81 = call double @cos(double %69)
%82 = call double @llvm.fmuladd.f64(double %0, double %81, double %1)
%83 = fmul double %82, %80
store double %83, double* %28
%84 = call double @sin(double %69)
%85 = fmul double %84, %0
store double %85, double* %29
%86 = call double @cos(double %63)
%87 = call double @cos(double %69)
%88 = call double @llvm.fmuladd.f64(double %0, double %87, double %1)
%89 = fmul double %86, %88
store double %89, double* %30
%90 = call double @sin(double %63)
%91 = fneg double %90
%92 = call double @cos(double %69)
%93 = call double @llvm.fmuladd.f64(double %0, double %92, double %1)
%94 = fmul double %93, %91
store double %94, double* %31
%95 = call double @sin(double %69)
%96 = fmul double %95, %0
store double %96, double* %32
%97 = call double @cos(double %63)
%98 = call double @cos(double %74)
%99 = call double @llvm.fmuladd.f64(double %0, double %98, double %1)
%100 = fmul double %97, %99
store double %100, double* %33
%101 = call double @sin(double %63)
%102 = fneg double %101
%103 = call double @cos(double %74)
%104 = call double @llvm.fmuladd.f64(double %0, double %103, double %1)
%105 = fmul double %104, %102
store double %105, double* %34
%106 = call double @sin(double %74)
%107 = fmul double %106, %0
store double %107, double* %35
%108 = call double @cos(double %58)
%109 = call double @cos(double %74)
%110 = call double @llvm.fmuladd.f64(double %0, double %109, double %1)
%111 = fmul double %108, %110
store double %111, double* %36
%112 = call double @sin(double %58)
%113 = fneg double %112
%114 = call double @cos(double %74)
%115 = call double @llvm.fmuladd.f64(double %0, double %114, double %1)
%116 = fmul double %115, %113
store double %116, double* %37
%117 = call double @sin(double %74)
%118 = fmul double %117, %0
store double %118, double* %38
%119 = call double @cos(double %58)
%120 = call double @cos(double %69)
%121 = fmul double %119, %120
store double %121, double* %39
%122 = call double @sin(double %58)
%123 = fneg double %122
%124 = call double @cos(double %69)
%125 = fmul double %124, %123
store double %125, double* %40
%126 = call double @sin(double %69)
store double %126, double* %41
%127 = call double @cos(double %63)
%128 = call double @cos(double %69)
%129 = fmul double %127, %128
store double %129, double* %42
%130 = call double @sin(double %63)
%131 = fneg double %130
%132 = call double @cos(double %69)
%133 = fmul double %132, %131
store double %133, double* %43
%134 = call double @sin(double %69)
store double %134, double* %44
%135 = call double @cos(double %63)
%136 = call double @cos(double %74)
%137 = fmul double %135, %136
store double %137, double* %45
%138 = call double @sin(double %63)
%139 = fneg double %138
%140 = call double @cos(double %74)
%141 = fmul double %140, %139
store double %141, double* %46
%142 = call double @sin(double %74)
store double %142, double* %47
%143 = call double @cos(double %58)
%144 = call double @cos(double %74)
%145 = fmul double %143, %144
store double %145, double* %48
%146 = call double @sin(double %58)
%147 = fneg double %146
%148 = call double @cos(double %74)
%149 = fmul double %148, %147
store double %149, double* %49
%150 = call double @sin(double %74)
store double %150, double* %50
%151 = call i32 @m_xformpt(double* %27, double* %27, double* %39, double* %39)
%152 = call i32 @m_xformpt(double* %30, double* %30, double* %42, double* %42)
%153 = call i32 @m_xformpt(double* %33, double* %33, double* %45, double* %45)
%154 = call i32 @m_xformpt(double* %36, double* %36, double* %48, double* %48)
%155 = call i32 @glBegin(i32 %4)
%156 = call i32 @glNormal3dv(double* %48)
%157 = call i32 @glVertex3dv(double* %36)
%158 = call i32 @glNormal3dv(double* %45)
%159 = call i32 @glVertex3dv(double* %33)
%160 = call i32 @glNormal3dv(double* %42)
%161 = call i32 @glVertex3dv(double* %30)
%162 = call i32 @glNormal3dv(double* %39)
%163 = call i32 @glVertex3dv(double* %27)
%164 = call i32 (...) @glEnd()
%165 = icmp eq i32 %70, %2
br i1 %165, label %51, label %64
166: ; preds = %51, %5
ret void
}