// File: /workspace/github_cpp_makefile_star2_O1/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 0xd48fb
movl $0x64, %edi
movl $0x64, %esi
callq 0xd4e48
movl 0x11fcc0(%rip), %edi    # 0x1469b0
movl 0x11fcb6(%rip), %esi    # 0x1469ac
callq 0xd4e5e
movl $0x92, %edi
callq 0xd4e7d
leaq 0xba508(%rip), %rdi     # 0xe1214
callq 0xd9e48
movl %eax, 0x124c29(%rip)    # 0x14b940
callq 0x8ca48
movl $0x809d, %edi           # imm = 0x809D
callq 0x21800
movss 0xba2de(%rip), %xmm0    # 0xe100c
movss 0xba2ce(%rip), %xmm3    # 0xe1004
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x21e10
movl $0x1700, %edi           # imm = 0x1700
callq 0x21ca0
callq 0x21c30
leaq 0x11fc69(%rip), %rsi    # 0x1469c0
movl $0xb53, %edi            # imm = 0xB53
callq 0x221f0
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 0x11fc45(%rip), %rdx    # 0x1469d0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1201, %esi           # imm = 0x1201
callq 0x22090
leaq 0x11fc3f(%rip), %rdx    # 0x1469e0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1203, %esi           # imm = 0x1203
callq 0x22090
movl $0x4000, %edi           # imm = 0x4000
callq 0x21800
leaq 0x11fc2f(%rip), %rdx    # 0x1469f0
movl $0x4001, %edi           # imm = 0x4001
movl $0x1201, %esi           # imm = 0x1201
callq 0x22090
leaq 0x11fc29(%rip), %rdx    # 0x146a00
movl $0x4001, %edi           # imm = 0x4001
movl $0x1203, %esi           # imm = 0x1203
callq 0x22090
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 0x22010
leaq -0x1871(%rip), %rdi     # 0x255b3
callq 0xd3350
leaq -0x6c8(%rip), %rdi      # 0x26768
callq 0xd33a5
leaq -0x244(%rip), %rdi      # 0x26bf8
callq 0xd33e7
leaq -0x498(%rip), %rdi      # 0x269b0
callq 0xd342f
leaq -0x60d(%rip), %rdi      # 0x26847
callq 0xd3778
leaq -0x6b8(%rip), %rdi      # 0x267a8
popq %rax
jmp 0xd3808