// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/prpview/prpview.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("Property Viewer");

  // Initialize grfx (after create context because 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 lighting
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  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);
  glEnable(GL_NORMALIZE);
  glEnable(GL_LIGHTING); 

  // Initialize headlight
  static GLfloat light0_diffuse[] = { 1, 1, 1, 1 };
  static GLfloat light0_position[] = { 0.0, 0.0, 1.0, 0.0 };
  glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse);
  glLightfv(GL_LIGHT0, GL_POSITION, light0_position);
  glEnable(GL_LIGHT0);

  // Initialize backlight
  static GLfloat light1_diffuse[] = { 1, 1, 1, 1 };
  static GLfloat light1_position[] = { 0.0, 0.0, -1.0, 0.0 };
  glLightfv(GL_LIGHT1, GL_DIFFUSE, light1_diffuse);
  glLightfv(GL_LIGHT1, GL_POSITION, light1_position);
  glEnable(GL_LIGHT1);

  // Initialize color settings
  glEnable(GL_COLOR_MATERIAL);
  glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);

  // Initialize graphics modes  
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);

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

// Assembly:
pushq %rax
callq 0xd2995
movl $0x64, %edi
movl $0x64, %esi
callq 0xd2ee5
movl 0x11dd0e(%rip), %edi    # 0x1449b0
movl 0x11dd04(%rip), %esi    # 0x1449ac
callq 0xd2efb
movl $0x92, %edi
callq 0xd2f1a
leaq 0xb8556(%rip), %rdi     # 0xdf214
callq 0xd7eca
movl %eax, 0x122c77(%rip)    # 0x149940
callq 0x8b868
movl $0x809d, %edi           # imm = 0x809D
callq 0x21800
movss 0xb832c(%rip), %xmm0    # 0xdf00c
movss 0xb831c(%rip), %xmm3    # 0xdf004
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x21e00
movl $0x1700, %edi           # imm = 0x1700
callq 0x21c90
callq 0x21c20
leaq 0x11dcb7(%rip), %rsi    # 0x1449c0
movl $0xb53, %edi            # imm = 0xB53
callq 0x221e0
movl $0xb51, %edi            # imm = 0xB51
movl $0x1, %esi
callq 0x21140
movl $0xba1, %edi            # imm = 0xBA1
callq 0x21800
movl $0xb50, %edi            # imm = 0xB50
callq 0x21800
leaq 0x11dc93(%rip), %rdx    # 0x1449d0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1201, %esi           # imm = 0x1201
callq 0x22080
leaq 0x11dc8d(%rip), %rdx    # 0x1449e0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1203, %esi           # imm = 0x1203
callq 0x22080
movl $0x4000, %edi           # imm = 0x4000
callq 0x21800
leaq 0x11dc7d(%rip), %rdx    # 0x1449f0
movl $0x4001, %edi           # imm = 0x4001
movl $0x1201, %esi           # imm = 0x1201
callq 0x22080
leaq 0x11dc77(%rip), %rdx    # 0x144a00
movl $0x4001, %edi           # imm = 0x4001
movl $0x1203, %esi           # imm = 0x1203
callq 0x22080
movl $0x4001, %edi           # imm = 0x4001
callq 0x21800
movl $0xb57, %edi            # imm = 0xB57
callq 0x21800
movl $0x408, %edi            # imm = 0x408
movl $0x1602, %esi           # imm = 0x1602
callq 0x21570
movl $0xb71, %edi            # imm = 0xB71
callq 0x21800
movl $0x1d01, %edi           # imm = 0x1D01
callq 0x22000
leaq -0x1863(%rip), %rdi     # 0x25573
callq 0xd141c
leaq -0x6b9(%rip), %rdi      # 0x26729
callq 0xd1471
leaq -0x244(%rip), %rdi      # 0x26baa
callq 0xd14b3
leaq -0x489(%rip), %rdi      # 0x26971
callq 0xd14fb
leaq -0x5fe(%rip), %rdi      # 0x26808
callq 0xd1844
leaq -0x6a9(%rip), %rdi      # 0x26769
popq %rax
jmp 0xd18d4