; LLVM IR from niessner/Matterport :: code/gaps/apps/mpview/mpview.ll (Z9GLUTMouseiiii)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Point = type { [3 x double] }
%class.RNTime = type { %struct.timeval }
%struct.timeval = type { i64, i64 }
%class.R3Vector = type { [3 x double] }
%struct.MPPanorama = type { ptr, i32, ptr, i32, ptr, %class.RNArray.5, %class.R3Point }
%class.RNArray.5 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%struct.MPImage = type { ptr, i32, ptr, i32, ptr, i32, i32, %class.RGBDImage, %class.R4Matrix, %class.R3Matrix, i32, i32, %class.R3Point }
%class.RGBDImage = type { ptr, ptr, i32, %class.RNArray, i32, i32, %class.R3Affine, %class.R3Matrix, %class.R3Box, i32, ptr, ptr, ptr, i32, i32 }
%class.RNArray = type { %class.RNVArray }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.RNFlags = type { i64 }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.R3Matrix = type { [3 x [3 x double]] }
%struct.MPSegment = type <{ ptr, i32, [4 x i8], ptr, i32, [4 x i8], ptr, %class.RNArray.12, double, %class.R3Point, %class.R3Box, i32, [4 x i8] }>
%class.RNArray.12 = type { %class.RNVArray }
%struct.MPObject = type { ptr, i32, ptr, i32, ptr, i32, %class.RNArray.4, %class.R3Point, %class.R3OrientedBox }
%class.RNArray.4 = type { %class.RNVArray }
%class.R3OrientedBox = type { %class.R3Solid, %class.R3CoordSystem, [3 x double] }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Triad = type { [3 x %class.R3Vector] }
%struct.MPRegion = type { ptr, i32, ptr, i32, %class.RNArray.0, %class.RNArray.1, %class.RNArray.2, %class.RNArray.3, %class.R3Point, double, %class.R3Box, ptr }
%class.RNArray.0 = type { %class.RNVArray }
%class.RNArray.1 = type { %class.RNVArray }
%class.RNArray.2 = type { %class.RNVArray }
%class.RNArray.3 = type { %class.RNVArray }
%struct.MPHouse = type { %class.RNArray.5, %class.RNArray.0, %class.RNArray.6, %class.RNArray.4, %class.RNArray.2, %class.RNArray.7, %class.RNArray.1, %class.RNArray.8, %class.RNArray.3, %class.RNArray.9, %class.RGBDConfiguration, ptr, ptr, %class.R3Box, ptr, ptr }
%class.RNArray.6 = type { %class.RNVArray }
%class.RNArray.7 = type { %class.RNVArray }
%class.RNArray.8 = type { %class.RNVArray }
%class.RNArray.9 = type { %class.RNVArray }
%class.RGBDConfiguration = type { ptr, %class.RNArray.10, %class.RNArray.11, ptr, ptr, ptr, ptr, %class.R3Box }
%class.RNArray.10 = type { %class.RNVArray }
%class.RNArray.11 = type { %class.RNVArray }

@_ZL6center = external hidden global %class.R3Point, align 8
@_ZL10snap_image = external hidden global ptr, align 8
@_ZL6viewer = external hidden global ptr, align 8
@_ZL15selected_region = external hidden global ptr, align 8
@_ZL15selected_object = external hidden global ptr, align 8
@_ZL5house = external hidden global ptr, align 8
@_ZL17GLUTwindow_height = external hidden global i32, align 4
@_ZL9GLUTmouse = external hidden global [2 x i32], align 4
@_ZL14GLUTmouse_drag = external hidden global i32, align 4
@_ZL13GLUTmodifiers = external hidden global i32, align 4
@_ZL10GLUTbutton = external hidden global [3 x i32], align 4
@_ZZ9GLUTMouseiiiiE12double_click = external hidden global i32, align 4
@_ZZ9GLUTMouseiiiiE18last_mouse_up_time = external hidden global %class.RNTime, align 8
@_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time = external hidden global i64, align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

declare void @glutPostRedisplay() #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9GLUTMouseiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %class.R3Point, align 8
  %19 = alloca %class.R3Vector, align 8
  %20 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !5
  %21 = load i32, ptr @_ZL17GLUTwindow_height, align 4, !tbaa !5
  %22 = load i32, ptr %8, align 4, !tbaa !5
  %23 = sub nsw i32 %21, %22
  store i32 %23, ptr %8, align 4, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %4
  store i32 0, ptr @_ZL14GLUTmouse_drag, align 4, !tbaa !5
  store ptr null, ptr @_ZL10snap_image, align 8, !tbaa !9
  br label %149

27:                                               ; preds = %4
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = icmp eq i32 %28, 3
  br i1 %29, label %30, label %32

30:                                               ; preds = %27
  %31 = load ptr, ptr @_ZL6viewer, align 8, !tbaa !9
  call void @_ZN8R3Viewer10ScaleWorldERK7R3Pointd(ptr noundef nonnull align 8 dereferenceable(168) %31, ptr noundef nonnull align 8 dereferenceable(24) @_ZL6center, double noundef 9.000000e-01)
  br label %38

32:                                               ; preds = %27
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = icmp eq i32 %33, 4
  br i1 %34, label %35, label %37

35:                                               ; preds = %32
  %36 = load ptr, ptr @_ZL6viewer, align 8, !tbaa !9
  call void @_ZN8R3Viewer10ScaleWorldERK7R3Pointd(ptr noundef nonnull align 8 dereferenceable(168) %36, ptr noundef nonnull align 8 dereferenceable(24) @_ZL6center, double noundef 1.100000e+00)
  br label %37

37:                                               ; preds = %35, %32
  br label %38

38:                                               ; preds = %37, %30
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %148

41:                                               ; preds = %38
  %42 = load atomic i8, ptr @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time acquire, align 8
  %43 = icmp eq i8 %42, 0
  br i1 %43, label %44, label %49, !prof !11

44:                                               ; preds = %41
  %45 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time) #3
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %44
  invoke void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ9GLUTMouseiiiiE18last_mouse_up_time)
          to label %48 unwind label %76

48:                                               ; preds = %47
  call void @__cxa_guard_release(ptr @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time) #3
  br label %49

49:                                               ; preds = %48, %44, %41
  %50 = load i32, ptr @_ZZ9GLUTMouseiiiiE12double_click, align 4, !tbaa !5
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %55, label %52

52:                                               ; preds = %49
  %53 = call noundef double @_ZNK6RNTime7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ9GLUTMouseiiiiE18last_mouse_up_time)
  %54 = fcmp olt double %53, 4.000000e-01
  br label %55

55:                                               ; preds = %52, %49
  %56 = phi i1 [ false, %49 ], [ %54, %52 ]
  %57 = zext i1 %56 to i32
  store i32 %57, ptr @_ZZ9GLUTMouseiiiiE12double_click, align 4, !tbaa !5
  call void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ9GLUTMouseiiiiE18last_mouse_up_time)
  %58 = load i32, ptr @_ZL14GLUTmouse_drag, align 4, !tbaa !5
  %59 = icmp slt i32 %58, 100
  br i1 %59, label %60, label %147

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store ptr null, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store ptr null, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #3
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %18)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #3
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = call noundef i32 @_ZL4PickiiPP10MPPanoramaPP7MPImagePP9MPSegmentPP8MPObjectPP8MPRegionPP11R3SceneNodePP14R3SceneElementPP7R3ShapePP10R3MeshFaceP7R3PointP8R3VectorPd(i32 noundef %61, i32 noundef %62, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef null, ptr noundef null, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef null)
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %142

65:                                               ; preds = %60
  %66 = load i32, ptr @_ZZ9GLUTMouseiiiiE12double_click, align 4, !tbaa !5
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %141

68:                                               ; preds = %65
  %69 = load ptr, ptr %11, align 8, !tbaa !9
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %80

71:                                               ; preds = %68
  %72 = load ptr, ptr %11, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.MPPanorama, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 8, !tbaa !12
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %74)
  br label %135

76:                                               ; preds = %47
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time) #3
  br label %170

80:                                               ; preds = %68
  %81 = load ptr, ptr %12, align 8, !tbaa !9
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %88

83:                                               ; preds = %80
  %84 = load ptr, ptr %12, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.MPImage, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !17
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %86)
  br label %134

88:                                               ; preds = %80
  %89 = load ptr, ptr %13, align 8, !tbaa !9
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %96

91:                                               ; preds = %88
  %92 = load ptr, ptr %13, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.MPSegment, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 8, !tbaa !30
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %94)
  br label %133

96:                                               ; preds = %88
  %97 = load ptr, ptr %14, align 8, !tbaa !9
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %104

99:                                               ; preds = %96
  %100 = load ptr, ptr %14, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.MPObject, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 8, !tbaa !34
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %102)
  br label %132

104:                                              ; preds = %96
  %105 = load ptr, ptr %15, align 8, !tbaa !9
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %112

107:                                              ; preds = %104
  %108 = load ptr, ptr %15, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.MPRegion, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !40
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %110)
  br label %131

112:                                              ; preds = %104
  %113 = load ptr, ptr %16, align 8, !tbaa !9
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %119

115:                                              ; preds = %112
  %116 = load ptr, ptr %16, align 8, !tbaa !9
  %117 = call noundef i32 @_ZNK11R3SceneNode10SceneIndexEv(ptr noundef nonnull align 8 dereferenceable(432) %116)
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %117)
  br label %130

119:                                              ; preds = %112
  %120 = load ptr, ptr %17, align 8, !tbaa !9
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %129

122:                                              ; preds = %119
  %123 = load ptr, ptr @_ZL5house, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.MPHouse, ptr %123, i32 0, i32 12
  %125 = load ptr, ptr %124, align 8, !tbaa !46
  %126 = load ptr, ptr %17, align 8, !tbaa !9
  %127 = call noundef i32 @_ZNK6R3Mesh6FaceIDEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %125, ptr noundef %126)
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, i32 noundef %127)
  br label %129

129:                                              ; preds = %122, %119
  br label %130

130:                                              ; preds = %129, %115
  br label %131

131:                                              ; preds = %130, %107
  br label %132

132:                                              ; preds = %131, %99
  br label %133

133:                                              ; preds = %132, %91
  br label %134

134:                                              ; preds = %133, %83
  br label %135

135:                                              ; preds = %134, %71
  %136 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %137 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %138 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, double noundef %136, double noundef %137, double noundef %138)
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  br label %141

141:                                              ; preds = %135, %65
  br label %142

142:                                              ; preds = %141, %60
  %143 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %143, ptr @_ZL15selected_region, align 8, !tbaa !9
  %144 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %144, ptr @_ZL15selected_object, align 8, !tbaa !9
  %145 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZL11SelectImageP7MPImage(ptr noundef %145)
  %146 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) @_ZL6center, ptr noundef nonnull align 8 dereferenceable(24) %18)
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %147

147:                                              ; preds = %142, %55
  br label %148

148:                                              ; preds = %147, %38
  br label %149

149:                                              ; preds = %148, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %150 = load i32, ptr %5, align 4, !tbaa !5
  %151 = icmp eq i32 %150, 0
  br i1 %151, label %152, label %153

152:                                              ; preds = %149
  br label %158

153:                                              ; preds = %149
  %154 = load i32, ptr %5, align 4, !tbaa !5
  %155 = icmp eq i32 %154, 1
  %156 = zext i1 %155 to i64
  %157 = select i1 %155, i32 1, i32 2
  br label %158

158:                                              ; preds = %153, %152
  %159 = phi i32 [ 0, %152 ], [ %157, %153 ]
  store i32 %159, ptr %20, align 4, !tbaa !5
  %160 = load i32, ptr %6, align 4, !tbaa !5
  %161 = icmp eq i32 %160, 0
  %162 = zext i1 %161 to i64
  %163 = select i1 %161, i32 1, i32 0
  %164 = load i32, ptr %20, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [3 x i32], ptr @_ZL10GLUTbutton, i64 0, i64 %165
  store i32 %163, ptr %166, align 4, !tbaa !5
  %167 = call i32 @glutGetModifiers()
  store i32 %167, ptr @_ZL13GLUTmodifiers, align 4, !tbaa !5
  %168 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %168, ptr @_ZL9GLUTmouse, align 4, !tbaa !5
  %169 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %169, ptr getelementptr inbounds ([2 x i32], ptr @_ZL9GLUTmouse, i64 0, i64 1), align 4, !tbaa !5
  call void @glutPostRedisplay()
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  ret void

170:                                              ; preds = %76
  %171 = load ptr, ptr %9, align 8
  %172 = load i32, ptr %10, align 4
  %173 = insertvalue { ptr, i32 } poison, ptr %171, 0
  %174 = insertvalue { ptr, i32 } %173, i32 %172, 1
  resume { ptr, i32 } %174
}

declare void @_ZN8R3Viewer10ScaleWorldERK7R3Pointd(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(24), double noundef) #1

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #3

declare void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

declare noundef double @_ZNK6RNTime7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

declare void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

declare void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL4PickiiPP10MPPanoramaPP7MPImagePP9MPSegmentPP8MPObjectPP8MPRegionPP11R3SceneNodePP14R3SceneElementPP7R3ShapePP10R3MeshFaceP7R3PointP8R3VectorPd(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11R3SceneNode10SceneIndexEv(ptr noundef nonnull align 8 dereferenceable(432)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6FaceIDEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11SelectImageP7MPImage(ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

declare i32 @glutGetModifiers() #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"branch_weights", i32 1, i32 1048575}
!12 = !{!13, !6, i64 8}
!13 = !{!"_ZTS10MPPanorama", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !14, i64 40, !16, i64 56}
!14 = !{!"_ZTS7RNArrayIP7MPImageE", !15, i64 0}
!15 = !{!"_ZTS8RNVArray", !10, i64 0, !6, i64 8, !6, i64 12}
!16 = !{!"_ZTS7R3Point", !7, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"_ZTS7MPImage", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 44, !19, i64 48, !23, i64 536, !26, i64 664, !6, i64 736, !6, i64 740, !16, i64 744}
!19 = !{!"_ZTS9RGBDImage", !10, i64 8, !6, i64 16, !20, i64 24, !6, i64 40, !6, i64 44, !21, i64 48, !26, i64 320, !27, i64 392, !6, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !6, i64 480, !6, i64 484}
!20 = !{!"_ZTS7RNArrayIP6R2GridE", !15, i64 0}
!21 = !{!"_ZTS8R3Affine", !22, i64 0, !23, i64 8, !23, i64 136, !24, i64 264}
!22 = !{!"_ZTS16R3Transformation"}
!23 = !{!"_ZTS8R4Matrix", !7, i64 0}
!24 = !{!"_ZTS7RNFlags", !25, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTS8R3Matrix", !7, i64 0}
!27 = !{!"_ZTS5R3Box", !28, i64 0, !16, i64 8, !16, i64 32}
!28 = !{!"_ZTS7R3Solid", !29, i64 0}
!29 = !{!"_ZTS7R3Shape"}
!30 = !{!31, !6, i64 8}
!31 = !{!"_ZTS9MPSegment", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !32, i64 40, !33, i64 56, !16, i64 64, !27, i64 88, !6, i64 144}
!32 = !{!"_ZTS7RNArrayIP10R3MeshFaceE", !15, i64 0}
!33 = !{!"double", !7, i64 0}
!34 = !{!35, !6, i64 8}
!35 = !{!"_ZTS8MPObject", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !36, i64 48, !16, i64 64, !37, i64 88}
!36 = !{!"_ZTS7RNArrayIP9MPSegmentE", !15, i64 0}
!37 = !{!"_ZTS13R3OrientedBox", !28, i64 0, !38, i64 8, !7, i64 104}
!38 = !{!"_ZTS13R3CoordSystem", !16, i64 0, !39, i64 24}
!39 = !{!"_ZTS7R3Triad", !7, i64 0}
!40 = !{!41, !6, i64 8}
!41 = !{!"_ZTS8MPRegion", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !42, i64 32, !43, i64 48, !44, i64 64, !45, i64 80, !16, i64 96, !33, i64 120, !27, i64 128, !10, i64 184}
!42 = !{!"_ZTS7RNArrayIP10MPPanoramaE", !15, i64 0}
!43 = !{!"_ZTS7RNArrayIP9MPSurfaceE", !15, i64 0}
!44 = !{!"_ZTS7RNArrayIP8MPObjectE", !15, i64 0}
!45 = !{!"_ZTS7RNArrayIP8MPPortalE", !15, i64 0}
!46 = !{!47, !10, i64 296}
!47 = !{!"_ZTS7MPHouse", !14, i64 0, !42, i64 16, !48, i64 32, !36, i64 48, !44, i64 64, !49, i64 80, !43, i64 96, !50, i64 112, !45, i64 128, !51, i64 144, !52, i64 160, !10, i64 288, !10, i64 296, !27, i64 304, !10, i64 360, !10, i64 368}
!48 = !{!"_ZTS7RNArrayIP10MPCategoryE", !15, i64 0}
!49 = !{!"_ZTS7RNArrayIP8MPVertexE", !15, i64 0}
!50 = !{!"_ZTS7RNArrayIP8MPRegionE", !15, i64 0}
!51 = !{!"_ZTS7RNArrayIP7MPLevelE", !15, i64 0}
!52 = !{!"_ZTS17RGBDConfiguration", !53, i64 8, !54, i64 24, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !27, i64 72}
!53 = !{!"_ZTS7RNArrayIP9RGBDImageE", !15, i64 0}
!54 = !{!"_ZTS7RNArrayIP11RGBDSurfaceE", !15, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Point = type { [3 x double] }
%class.RNTime = type { %struct.timeval }
%struct.timeval = type { i64, i64 }
%class.R3Vector = type { [3 x double] }

@_ZL6center = external hidden global %class.R3Point, align 8
@_ZL10snap_image = external hidden local_unnamed_addr global ptr, align 8
@_ZL6viewer = external hidden local_unnamed_addr global ptr, align 8
@_ZL15selected_region = external hidden local_unnamed_addr global ptr, align 8
@_ZL15selected_object = external hidden local_unnamed_addr global ptr, align 8
@_ZL5house = external hidden local_unnamed_addr global ptr, align 8
@_ZL17GLUTwindow_height = external hidden local_unnamed_addr global i32, align 4
@_ZL9GLUTmouse = external hidden local_unnamed_addr global [2 x i32], align 4
@_ZL14GLUTmouse_drag = external hidden local_unnamed_addr global i32, align 4
@_ZL13GLUTmodifiers = external hidden local_unnamed_addr global i32, align 4
@_ZL10GLUTbutton = external hidden local_unnamed_addr global [3 x i32], align 4
@_ZZ9GLUTMouseiiiiE12double_click = external hidden local_unnamed_addr global i32, align 4
@_ZZ9GLUTMouseiiiiE18last_mouse_up_time = external hidden global %class.RNTime, align 8
@_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time = external hidden global i64, align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

declare void @glutPostRedisplay() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9GLUTMouseiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca %class.R3Vector, align 8
  %14 = load i32, ptr @_ZL17GLUTwindow_height, align 4, !tbaa !5
  %15 = sub nsw i32 %14, %3
  %16 = icmp eq i32 %1, 0
  br i1 %16, label %97, label %17

17:                                               ; preds = %4
  switch i32 %0, label %100 [
    i32 3, label %.sink.split
    i32 4, label %18
    i32 0, label %19
  ]

18:                                               ; preds = %17
  br label %.sink.split

19:                                               ; preds = %17
  %20 = load atomic i8, ptr @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time acquire, align 8
  %21 = icmp eq i8 %20, 0
  br i1 %21, label %22, label %26, !prof !9

22:                                               ; preds = %19
  %23 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time) #6
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %26, label %24

24:                                               ; preds = %22
  invoke void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ9GLUTMouseiiiiE18last_mouse_up_time)
          to label %25 unwind label %47

25:                                               ; preds = %24
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time) #6
  br label %26

26:                                               ; preds = %25, %22, %19
  %27 = load i32, ptr @_ZZ9GLUTMouseiiiiE12double_click, align 4, !tbaa !5
  %.not22 = icmp eq i32 %27, 0
  br i1 %.not22, label %28, label %32

28:                                               ; preds = %26
  %29 = tail call noundef double @_ZNK6RNTime7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ9GLUTMouseiiiiE18last_mouse_up_time)
  %30 = fcmp olt double %29, 4.000000e-01
  %31 = zext i1 %30 to i32
  br label %32

32:                                               ; preds = %28, %26
  %33 = phi i32 [ 0, %26 ], [ %31, %28 ]
  store i32 %33, ptr @_ZZ9GLUTMouseiiiiE12double_click, align 4, !tbaa !5
  tail call void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16) @_ZZ9GLUTMouseiiiiE18last_mouse_up_time)
  %34 = load i32, ptr @_ZL14GLUTmouse_drag, align 4, !tbaa !5
  %35 = icmp slt i32 %34, 100
  br i1 %35, label %36, label %.thread

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr null, ptr %5, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store ptr null, ptr %6, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store ptr null, ptr %7, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr null, ptr %8, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store ptr null, ptr %9, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  store ptr null, ptr %10, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  store ptr null, ptr %11, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %37 = call noundef i32 @_ZL4PickiiPP10MPPanoramaPP7MPImagePP9MPSegmentPP8MPObjectPP8MPRegionPP11R3SceneNodePP14R3SceneElementPP7R3ShapePP10R3MeshFaceP7R3PointP8R3VectorPd(i32 noundef %2, i32 noundef %15, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef null, ptr noundef null, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef null)
  %38 = icmp ne i32 %37, 0
  %39 = load i32, ptr @_ZZ9GLUTMouseiiiiE12double_click, align 4
  %40 = icmp ne i32 %39, 0
  %or.cond = select i1 %38, i1 %40, i1 false
  br i1 %or.cond, label %41, label %92

41:                                               ; preds = %36
  %42 = load ptr, ptr %5, align 8, !tbaa !10
  %.not23 = icmp eq ptr %42, null
  br i1 %.not23, label %49, label %43

43:                                               ; preds = %41
  %44 = getelementptr inbounds i8, ptr %42, i64 8
  %45 = load i32, ptr %44, align 8, !tbaa !12
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %45)
  br label %86

47:                                               ; preds = %24
  %48 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZ9GLUTMouseiiiiE18last_mouse_up_time) #6
  resume { ptr, i32 } %48

49:                                               ; preds = %41
  %50 = load ptr, ptr %6, align 8, !tbaa !10
  %.not24 = icmp eq ptr %50, null
  br i1 %.not24, label %55, label %51

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %50, i64 8
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %53)
  br label %86

55:                                               ; preds = %49
  %56 = load ptr, ptr %7, align 8, !tbaa !10
  %.not25 = icmp eq ptr %56, null
  br i1 %.not25, label %61, label %57

57:                                               ; preds = %55
  %58 = getelementptr inbounds i8, ptr %56, i64 8
  %59 = load i32, ptr %58, align 8, !tbaa !30
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %59)
  br label %86

61:                                               ; preds = %55
  %62 = load ptr, ptr %8, align 8, !tbaa !10
  %.not26 = icmp eq ptr %62, null
  br i1 %.not26, label %67, label %63

63:                                               ; preds = %61
  %64 = getelementptr inbounds i8, ptr %62, i64 8
  %65 = load i32, ptr %64, align 8, !tbaa !34
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %65)
  br label %86

67:                                               ; preds = %61
  %68 = load ptr, ptr %9, align 8, !tbaa !10
  %.not27 = icmp eq ptr %68, null
  br i1 %.not27, label %73, label %69

69:                                               ; preds = %67
  %70 = getelementptr inbounds i8, ptr %68, i64 8
  %71 = load i32, ptr %70, align 8, !tbaa !40
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %71)
  br label %86

73:                                               ; preds = %67
  %74 = load ptr, ptr %10, align 8, !tbaa !10
  %.not28 = icmp eq ptr %74, null
  br i1 %.not28, label %78, label %75

75:                                               ; preds = %73
  %76 = call noundef i32 @_ZNK11R3SceneNode10SceneIndexEv(ptr noundef nonnull align 8 dereferenceable(432) %74)
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef %76)
  br label %86

78:                                               ; preds = %73
  %79 = load ptr, ptr %11, align 8, !tbaa !10
  %.not29 = icmp eq ptr %79, null
  br i1 %.not29, label %86, label %80

80:                                               ; preds = %78
  %81 = load ptr, ptr @_ZL5house, align 8, !tbaa !10
  %82 = getelementptr inbounds i8, ptr %81, i64 296
  %83 = load ptr, ptr %82, align 8, !tbaa !46
  %84 = call noundef i32 @_ZNK6R3Mesh6FaceIDEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %83, ptr noundef nonnull %79)
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %84)
  br label %86

86:                                               ; preds = %51, %63, %75, %80, %78, %69, %57, %43
  %87 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %88 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %89 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, double noundef %87, double noundef %88, double noundef %89)
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  br label %92

92:                                               ; preds = %86, %36
  %93 = load ptr, ptr %9, align 8, !tbaa !10
  store ptr %93, ptr @_ZL15selected_region, align 8, !tbaa !10
  %94 = load ptr, ptr %8, align 8, !tbaa !10
  store ptr %94, ptr @_ZL15selected_object, align 8, !tbaa !10
  %95 = load ptr, ptr %6, align 8, !tbaa !10
  call void @_ZL11SelectImageP7MPImage(ptr noundef %95)
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) @_ZL6center, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %.thread

97:                                               ; preds = %4
  store i32 0, ptr @_ZL14GLUTmouse_drag, align 4, !tbaa !5
  store ptr null, ptr @_ZL10snap_image, align 8, !tbaa !10
  %98 = icmp eq i32 %0, 0
  br i1 %98, label %.thread, label %100

.sink.split:                                      ; preds = %17, %18
  %.sink30 = phi double [ 1.100000e+00, %18 ], [ 9.000000e-01, %17 ]
  %99 = load ptr, ptr @_ZL6viewer, align 8, !tbaa !10
  tail call void @_ZN8R3Viewer10ScaleWorldERK7R3Pointd(ptr noundef nonnull align 8 dereferenceable(168) %99, ptr noundef nonnull align 8 dereferenceable(24) @_ZL6center, double noundef %.sink30)
  br label %100

100:                                              ; preds = %.sink.split, %17, %97
  %101 = icmp eq i32 %0, 1
  %102 = select i1 %101, i64 1, i64 2
  br label %.thread

.thread:                                          ; preds = %32, %92, %97, %100
  %103 = phi i64 [ %102, %100 ], [ 0, %97 ], [ 0, %92 ], [ 0, %32 ]
  %104 = zext i1 %16 to i32
  %105 = getelementptr inbounds [3 x i32], ptr @_ZL10GLUTbutton, i64 0, i64 %103
  store i32 %104, ptr %105, align 4, !tbaa !5
  %106 = call i32 @glutGetModifiers()
  store i32 %106, ptr @_ZL13GLUTmodifiers, align 4, !tbaa !5
  store i32 %2, ptr @_ZL9GLUTmouse, align 4, !tbaa !5
  store i32 %15, ptr getelementptr inbounds (i8, ptr @_ZL9GLUTmouse, i64 4), align 4, !tbaa !5
  call void @glutPostRedisplay()
  ret void
}

declare void @_ZN8R3Viewer10ScaleWorldERK7R3Pointd(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

declare void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

declare noundef double @_ZNK6RNTime7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

declare void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

declare void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL4PickiiPP10MPPanoramaPP7MPImagePP9MPSegmentPP8MPObjectPP8MPRegionPP11R3SceneNodePP14R3SceneElementPP7R3ShapePP10R3MeshFaceP7R3PointP8R3VectorPd(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11R3SceneNode10SceneIndexEv(ptr noundef nonnull align 8 dereferenceable(432)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6FaceIDEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11SelectImageP7MPImage(ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare i32 @glutGetModifiers() local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"_ZTS10MPPanorama", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !14, i64 40, !16, i64 56}
!14 = !{!"_ZTS7RNArrayIP7MPImageE", !15, i64 0}
!15 = !{!"_ZTS8RNVArray", !11, i64 0, !6, i64 8, !6, i64 12}
!16 = !{!"_ZTS7R3Point", !7, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"_ZTS7MPImage", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !6, i64 44, !19, i64 48, !23, i64 536, !26, i64 664, !6, i64 736, !6, i64 740, !16, i64 744}
!19 = !{!"_ZTS9RGBDImage", !11, i64 8, !6, i64 16, !20, i64 24, !6, i64 40, !6, i64 44, !21, i64 48, !26, i64 320, !27, i64 392, !6, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !6, i64 480, !6, i64 484}
!20 = !{!"_ZTS7RNArrayIP6R2GridE", !15, i64 0}
!21 = !{!"_ZTS8R3Affine", !22, i64 0, !23, i64 8, !23, i64 136, !24, i64 264}
!22 = !{!"_ZTS16R3Transformation"}
!23 = !{!"_ZTS8R4Matrix", !7, i64 0}
!24 = !{!"_ZTS7RNFlags", !25, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTS8R3Matrix", !7, i64 0}
!27 = !{!"_ZTS5R3Box", !28, i64 0, !16, i64 8, !16, i64 32}
!28 = !{!"_ZTS7R3Solid", !29, i64 0}
!29 = !{!"_ZTS7R3Shape"}
!30 = !{!31, !6, i64 8}
!31 = !{!"_ZTS9MPSegment", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !32, i64 40, !33, i64 56, !16, i64 64, !27, i64 88, !6, i64 144}
!32 = !{!"_ZTS7RNArrayIP10R3MeshFaceE", !15, i64 0}
!33 = !{!"double", !7, i64 0}
!34 = !{!35, !6, i64 8}
!35 = !{!"_ZTS8MPObject", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !36, i64 48, !16, i64 64, !37, i64 88}
!36 = !{!"_ZTS7RNArrayIP9MPSegmentE", !15, i64 0}
!37 = !{!"_ZTS13R3OrientedBox", !28, i64 0, !38, i64 8, !7, i64 104}
!38 = !{!"_ZTS13R3CoordSystem", !16, i64 0, !39, i64 24}
!39 = !{!"_ZTS7R3Triad", !7, i64 0}
!40 = !{!41, !6, i64 8}
!41 = !{!"_ZTS8MPRegion", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !42, i64 32, !43, i64 48, !44, i64 64, !45, i64 80, !16, i64 96, !33, i64 120, !27, i64 128, !11, i64 184}
!42 = !{!"_ZTS7RNArrayIP10MPPanoramaE", !15, i64 0}
!43 = !{!"_ZTS7RNArrayIP9MPSurfaceE", !15, i64 0}
!44 = !{!"_ZTS7RNArrayIP8MPObjectE", !15, i64 0}
!45 = !{!"_ZTS7RNArrayIP8MPPortalE", !15, i64 0}
!46 = !{!47, !11, i64 296}
!47 = !{!"_ZTS7MPHouse", !14, i64 0, !42, i64 16, !48, i64 32, !36, i64 48, !44, i64 64, !49, i64 80, !43, i64 96, !50, i64 112, !45, i64 128, !51, i64 144, !52, i64 160, !11, i64 288, !11, i64 296, !27, i64 304, !11, i64 360, !11, i64 368}
!48 = !{!"_ZTS7RNArrayIP10MPCategoryE", !15, i64 0}
!49 = !{!"_ZTS7RNArrayIP8MPVertexE", !15, i64 0}
!50 = !{!"_ZTS7RNArrayIP8MPRegionE", !15, i64 0}
!51 = !{!"_ZTS7RNArrayIP7MPLevelE", !15, i64 0}
!52 = !{!"_ZTS17RGBDConfiguration", !53, i64 8, !54, i64 24, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !27, i64 72}
!53 = !{!"_ZTS7RNArrayIP9RGBDImageE", !15, i64 0}
!54 = !{!"_ZTS7RNArrayIP11RGBDSurfaceE", !15, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass