// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/grdview/grdview.cpp
// Function: GLUTInit(int*, char**)
void GLUTInit(int *argc, char **argv)
{
  // Open window 
  glutInit(argc, argv);
  glutInitWindowPosition(100, 100);
  glutInitWindowSize(GLUTwindow_width, GLUTwindow_height);
  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_MULTISAMPLE);
  GLUTwindow = glutCreateWindow("OpenGL Viewer");

  // Initialize grfx package (calls glewInit)
  RNInitGrfx();

  // Initialize multisampling
  glEnable(GL_MULTISAMPLE);
  
  // Initialize background color 
  glClearColor(200.0/255.0, 200.0/255.0, 200.0/255.0, 1.0);

  // Initialize lights
  static GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 };
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
  glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
  static GLfloat light0_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
  glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse);
  glEnable(GL_LIGHT0);
  static GLfloat light1_diffuse[] = { 0.5, 0.5, 0.5, 1.0 };
  glLightfv(GL_LIGHT1, GL_DIFFUSE, light1_diffuse);
  glEnable(GL_LIGHT1);
  glEnable(GL_NORMALIZE);
  glEnable(GL_LIGHTING);

  // Initialize graphics modes 
  glEnable(GL_DEPTH_TEST);

  // Initialize GLUT callback functions 
  glutDisplayFunc(GLUTRedraw);
  glutReshapeFunc(GLUTResize);
  glutKeyboardFunc(GLUTKeyboard);
  glutSpecialFunc(GLUTSpecial);
  glutMouseFunc(GLUTMouse);
  glutMotionFunc(GLUTMotion);

  // Initialize font
#if (RN_OS == RN_WINDOWSNT)
  int font = glGenLists(256);
  wglUseFontBitmaps(wglGetCurrentDC(), 0, 256, font); 
  glListBase(font);
#endif
}

// Assembly:
pushq %rax
callq 0x89673
movl $0x64, %edi
movl $0x64, %esi
callq 0x89bc0
movl 0xff095(%rip), %edi     # 0x12287c
movl 0xff093(%rip), %esi     # 0x122880
callq 0x89bd6
movl $0x92, %edi
callq 0x89bf5
leaq 0xa19b6(%rip), %rdi     # 0xc51b9
callq 0x8ebc0
movl %eax, 0x103f7a(%rip)    # 0x127788
callq 0x85668
movl $0x809d, %edi           # imm = 0x809D
callq 0x1f6c0
movss 0xa17eb(%rip), %xmm0    # 0xc5010
movss 0xa17d7(%rip), %xmm3    # 0xc5004
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x1fc10
leaq 0xff051(%rip), %rsi     # 0x122890
movl $0xb53, %edi            # imm = 0xB53
callq 0x1ff30
movl $0xb51, %edi            # imm = 0xB51
movl $0x1, %esi
callq 0x1f130
leaq 0xff041(%rip), %rdx     # 0x1228a0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1201, %esi           # imm = 0x1201
callq 0x1fe20
movl $0x4000, %edi           # imm = 0x4000
callq 0x1f6c0
leaq 0xff031(%rip), %rdx     # 0x1228b0
movl $0x4001, %edi           # imm = 0x4001
movl $0x1201, %esi           # imm = 0x1201
callq 0x1fe20
movl $0x4001, %edi           # imm = 0x4001
callq 0x1f6c0
movl $0xba1, %edi            # imm = 0xBA1
callq 0x1f6c0
movl $0xb50, %edi            # imm = 0xB50
callq 0x1f6c0
movl $0xb71, %edi            # imm = 0xB71
callq 0x1f6c0
leaq -0x135e(%rip), %rdi     # 0x2255f
callq 0x880c8
leaq -0x76d(%rip), %rdi      # 0x2315c
callq 0x8811d
leaq -0x41d(%rip), %rdi      # 0x234b8
callq 0x8815f
leaq -0x5e1(%rip), %rdi      # 0x23300
callq 0x881a7
leaq -0x636(%rip), %rdi      # 0x232b7
callq 0x884f0
leaq -0x75d(%rip), %rdi      # 0x2319c
popq %rax
jmp 0x88580