; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Graphics (R3Scene)

; 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.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R3Scene = type { ptr, %class.RNArray, %class.RNArray.0, %class.RNArray.1, %class.RNArray.2, %class.RNArray.3, %class.RNArray.4, %class.RNSymbolTable, %class.R3Viewer, %class.RNRgb, %class.RNRgb, ptr, ptr, 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 }
%class.RNArray.4 = type { %class.RNVArray }
%class.RNSymbolTable = type { %class.RNMap }
%class.RNMap = type { ptr }
%class.R3Viewer = type { ptr, %class.R3Camera, %class.R2Viewport }
%class.R3Camera = type { %class.R3CoordSystem, double, double, double, double, double, ptr }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Point = type { [3 x double] }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3Vector = type { [3 x double] }
%class.R2Viewport = type { i32, i32, i32, i32 }
%class.RNRgb = type { [3 x double] }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@R3identity_affine = external global %class.R3Affine, align 8
@stderr = external global ptr, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP11R3SceneNodeEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

declare void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #5

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

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIP11R3SceneNodeE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE4TailEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

declare void @_ZN11R3SceneNode17SetTransformationERK8R3Affine(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(272)) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #7

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene24ReadSupportHierarchyFileEPKcP11R3SceneNode(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1, ptr noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca [1024 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca %class.RNArray, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca [256 x i8], align 16
  %17 = alloca i32, align 4
  %18 = alloca [1024 x i8], align 16
  %19 = alloca ptr, align 8
  %20 = alloca [1024 x i8], align 16
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca [16 x double], align 16
  %26 = alloca %class.R3Affine, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %class.R4Matrix, align 8
  %30 = alloca %class.R3Affine, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %37, label %34

34:                                               ; preds = %3
  %35 = getelementptr inbounds %class.R3Scene, ptr %31, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  store ptr %36, ptr %7, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %34, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = call noalias ptr @fopen(ptr noundef %38, ptr noundef @.str.42)
  store ptr %39, ptr %8, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %45, label %41

41:                                               ; preds = %37
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.43, ptr noundef %43) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %348

45:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1024, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  call void @_ZN7RNArrayIP11R3SceneNodeEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12)
  br label %46

46:                                               ; preds = %340, %338, %45
  %47 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = invoke ptr @fgets(ptr noundef %47, i32 noundef 1023, ptr noundef %48)
          to label %50 unwind label %65

50:                                               ; preds = %46
  %51 = icmp ne ptr %49, null
  br i1 %51, label %52, label %342

52:                                               ; preds = %50
  %53 = load i32, ptr %11, align 4, !tbaa !29
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %11, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %55 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  store ptr %55, ptr %15, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %62, %52
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = load i8, ptr %57, align 1, !tbaa !30
  %59 = sext i8 %58 to i32
  %60 = call i32 @isspace(i32 noundef %59) #10
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %69

62:                                               ; preds = %56
  %63 = load ptr, ptr %15, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i32 1
  store ptr %64, ptr %15, align 8, !tbaa !5
  br label %56, !llvm.loop !31

65:                                               ; preds = %342, %46
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %13, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %14, align 4
  br label %347

69:                                               ; preds = %56
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load i8, ptr %70, align 1, !tbaa !30
  %72 = sext i8 %71 to i32
  %73 = icmp eq i32 %72, 35
  br i1 %73, label %74, label %75

74:                                               ; preds = %69
  store i32 2, ptr %9, align 4
  br label %338, !llvm.loop !33

75:                                               ; preds = %69
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = load i8, ptr %76, align 1, !tbaa !30
  %78 = sext i8 %77 to i32
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %75
  store i32 2, ptr %9, align 4
  br label %338, !llvm.loop !33

81:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 256, ptr %16) #9
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %84 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %82, ptr noundef @.str.44, ptr noundef %83) #9
  %85 = icmp ne i32 %84, 1
  br i1 %85, label %86, label %91

86:                                               ; preds = %81
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !29
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.106, i32 noundef %88, ptr noundef %89) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %337

91:                                               ; preds = %81
  %92 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %93 = call i32 @strcmp(ptr noundef %92, ptr noundef @.str.107) #10
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %158, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %18) #9
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %98 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %99 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %96, ptr noundef @.str.108, ptr noundef %97, ptr noundef %17, ptr noundef %98) #9
  %100 = icmp ne i32 %99, 3
  br i1 %100, label %101, label %106

101:                                              ; preds = %95
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = load i32, ptr %11, align 4, !tbaa !29
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.106, i32 noundef %103, ptr noundef %104) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %153

106:                                              ; preds = %95
  %107 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %108 unwind label %113

108:                                              ; preds = %106
  %109 = load i32, ptr %17, align 4, !tbaa !29
  %110 = icmp eq i32 %107, %109
  br i1 %110, label %117, label %111

111:                                              ; preds = %108
  invoke void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.109, i32 noundef 2861, ptr noundef @.str.2)
          to label %112 unwind label %113

112:                                              ; preds = %111
  br label %117

113:                                              ; preds = %111, %106
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %13, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %14, align 4
  br label %157

117:                                              ; preds = %112, %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %118 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #11
          to label %119 unwind label %139

119:                                              ; preds = %117
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %118, ptr noundef %31)
          to label %120 unwind label %143

120:                                              ; preds = %119
  store ptr %118, ptr %19, align 8, !tbaa !5
  %121 = load ptr, ptr %19, align 8, !tbaa !5
  %122 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  invoke void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432) %121, ptr noundef %122)
          to label %123 unwind label %139

123:                                              ; preds = %120
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %124, ptr noundef %125)
          to label %126 unwind label %139

126:                                              ; preds = %123
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = invoke noundef ptr @_ZN7RNArrayIP11R3SceneNodeE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %127)
          to label %129 unwind label %139

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 1024, ptr %20) #9
  %130 = getelementptr inbounds [1024 x i8], ptr %20, i64 0, i64 0
  %131 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %132 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %130, ptr noundef @.str.110, ptr noundef %131) #9
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = getelementptr inbounds [1024 x i8], ptr %20, i64 0, i64 0
  %135 = invoke noundef i32 @_ZL7ReadObjP7R3SceneP11R3SceneNodePKcP7RNArrayIP10R3MaterialE(ptr noundef %31, ptr noundef %133, ptr noundef %134, ptr noundef null)
          to label %136 unwind label %147

136:                                              ; preds = %129
  %137 = icmp ne i32 %135, 0
  br i1 %137, label %151, label %138

138:                                              ; preds = %136
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %152

139:                                              ; preds = %126, %123, %120, %117
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %13, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %14, align 4
  br label %156

143:                                              ; preds = %119
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %13, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %118, i64 noundef 432) #12
  br label %156

147:                                              ; preds = %129
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %13, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %20) #9
  br label %156

151:                                              ; preds = %136
  store i32 0, ptr %9, align 4
  br label %152

152:                                              ; preds = %151, %138
  call void @llvm.lifetime.end.p0(i64 1024, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %153

153:                                              ; preds = %152, %101
  call void @llvm.lifetime.end.p0(i64 1024, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  %154 = load i32, ptr %9, align 4
  switch i32 %154, label %337 [
    i32 0, label %155
  ]

155:                                              ; preds = %153
  br label %336

156:                                              ; preds = %147, %143, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %157

157:                                              ; preds = %156, %113
  call void @llvm.lifetime.end.p0(i64 1024, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %341

158:                                              ; preds = %91
  %159 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %160 = call i32 @strcmp(ptr noundef %159, ptr noundef @.str.111) #10
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %246, label %162

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  %164 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %165 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %163, ptr noundef @.str.112, ptr noundef %164, ptr noundef %21) #9
  %166 = icmp ne i32 %165, 2
  br i1 %166, label %167, label %172

167:                                              ; preds = %162
  %168 = load ptr, ptr @stderr, align 8, !tbaa !5
  %169 = load i32, ptr %11, align 4, !tbaa !29
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.106, i32 noundef %169, ptr noundef %170) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %242

172:                                              ; preds = %162
  %173 = load i32, ptr %21, align 4, !tbaa !29
  %174 = icmp slt i32 %173, 0
  br i1 %174, label %175, label %188

175:                                              ; preds = %172
  %176 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %177 unwind label %183

177:                                              ; preds = %175
  %178 = icmp ne i32 %176, 1
  br i1 %178, label %179, label %187

179:                                              ; preds = %177
  %180 = load ptr, ptr @stderr, align 8, !tbaa !5
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.113, ptr noundef %181) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %242

183:                                              ; preds = %188, %175
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %13, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %14, align 4
  br label %245

187:                                              ; preds = %177
  br label %241

188:                                              ; preds = %172
  %189 = load i32, ptr %21, align 4, !tbaa !29
  %190 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %191 unwind label %183

191:                                              ; preds = %188
  %192 = icmp sge i32 %189, %190
  br i1 %192, label %193, label %199

193:                                              ; preds = %191
  %194 = load ptr, ptr @stderr, align 8, !tbaa !5
  %195 = load i32, ptr %21, align 4, !tbaa !29
  %196 = load i32, ptr %11, align 4, !tbaa !29
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.114, i32 noundef %195, i32 noundef %196, ptr noundef %197) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %242

199:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %200 = invoke noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE4TailEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %201 unwind label %218

201:                                              ; preds = %199
  store ptr %200, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %202 = load i32, ptr %21, align 4, !tbaa !29
  %203 = invoke noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %202)
          to label %204 unwind label %222

204:                                              ; preds = %201
  store ptr %203, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %205 = load ptr, ptr %22, align 8, !tbaa !5
  %206 = invoke noundef ptr @_ZNK11R3SceneNode6ParentEv(ptr noundef nonnull align 8 dereferenceable(432) %205)
          to label %207 unwind label %226

207:                                              ; preds = %204
  store ptr %206, ptr %24, align 8, !tbaa !5
  %208 = load ptr, ptr %23, align 8, !tbaa !5
  %209 = load ptr, ptr %24, align 8, !tbaa !5
  %210 = icmp ne ptr %208, %209
  br i1 %210, label %211, label %238

211:                                              ; preds = %207
  %212 = load ptr, ptr %24, align 8, !tbaa !5
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %230

214:                                              ; preds = %211
  %215 = load ptr, ptr %24, align 8, !tbaa !5
  %216 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN11R3SceneNode11RemoveChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %215, ptr noundef %216)
          to label %217 unwind label %226

217:                                              ; preds = %214
  br label %230

218:                                              ; preds = %199
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %13, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %14, align 4
  br label %240

222:                                              ; preds = %201
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %13, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %14, align 4
  br label %239

226:                                              ; preds = %233, %214, %204
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %13, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %239

230:                                              ; preds = %217, %211
  %231 = load ptr, ptr %23, align 8, !tbaa !5
  %232 = icmp ne ptr %231, null
  br i1 %232, label %233, label %237

233:                                              ; preds = %230
  %234 = load ptr, ptr %23, align 8, !tbaa !5
  %235 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %234, ptr noundef %235)
          to label %236 unwind label %226

236:                                              ; preds = %233
  br label %237

237:                                              ; preds = %236, %230
  br label %238

238:                                              ; preds = %237, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %241

239:                                              ; preds = %226, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %240

240:                                              ; preds = %239, %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %245

241:                                              ; preds = %238, %187
  store i32 0, ptr %9, align 4
  br label %242

242:                                              ; preds = %241, %193, %179, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  %243 = load i32, ptr %9, align 4
  switch i32 %243, label %337 [
    i32 0, label %244
  ]

244:                                              ; preds = %242
  br label %335

245:                                              ; preds = %240, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %341

246:                                              ; preds = %158
  %247 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %248 = call i32 @strcmp(ptr noundef %247, ptr noundef @.str.115) #10
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %334, label %250

250:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 128, ptr %25) #9
  %251 = load ptr, ptr %15, align 8, !tbaa !5
  %252 = getelementptr inbounds [256 x i8], ptr %16, i64 0, i64 0
  %253 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 0
  %254 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 1
  %255 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 2
  %256 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 3
  %257 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 4
  %258 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 5
  %259 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 6
  %260 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 7
  %261 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 8
  %262 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 9
  %263 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 10
  %264 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 11
  %265 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 12
  %266 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 13
  %267 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 14
  %268 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 15
  %269 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %251, ptr noundef @.str.116, ptr noundef %252, ptr noundef %253, ptr noundef %254, ptr noundef %255, ptr noundef %256, ptr noundef %257, ptr noundef %258, ptr noundef %259, ptr noundef %260, ptr noundef %261, ptr noundef %262, ptr noundef %263, ptr noundef %264, ptr noundef %265, ptr noundef %266, ptr noundef %267, ptr noundef %268) #9
  %270 = icmp ne i32 %269, 17
  br i1 %270, label %271, label %276

271:                                              ; preds = %250
  %272 = load ptr, ptr @stderr, align 8, !tbaa !5
  %273 = load i32, ptr %11, align 4, !tbaa !29
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %272, ptr noundef @.str.106, i32 noundef %273, ptr noundef %274) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %314

276:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 272, ptr %26) #9
  invoke void @_ZN8R3AffineC2ERKS_(ptr noundef nonnull align 8 dereferenceable(272) %26, ptr noundef nonnull align 8 dereferenceable(272) @R3identity_affine)
          to label %277 unwind label %294

277:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %278 = invoke noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE4TailEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %279 unwind label %298

279:                                              ; preds = %277
  store ptr %278, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %280 = load ptr, ptr %27, align 8, !tbaa !5
  %281 = invoke noundef ptr @_ZNK11R3SceneNode6ParentEv(ptr noundef nonnull align 8 dereferenceable(432) %280)
          to label %282 unwind label %302

282:                                              ; preds = %279
  store ptr %281, ptr %28, align 8, !tbaa !5
  br label %283

283:                                              ; preds = %293, %282
  %284 = load ptr, ptr %28, align 8, !tbaa !5
  %285 = icmp ne ptr %284, null
  br i1 %285, label %286, label %306

286:                                              ; preds = %283
  %287 = load ptr, ptr %28, align 8, !tbaa !5
  %288 = invoke noundef nonnull align 8 dereferenceable(272) ptr @_ZNK11R3SceneNode14TransformationEv(ptr noundef nonnull align 8 dereferenceable(432) %287)
          to label %289 unwind label %302

289:                                              ; preds = %286
  invoke void @_ZN8R3Affine16InverseTransformERKS_(ptr noundef nonnull align 8 dereferenceable(272) %26, ptr noundef nonnull align 8 dereferenceable(272) %288)
          to label %290 unwind label %302

290:                                              ; preds = %289
  %291 = load ptr, ptr %28, align 8, !tbaa !5
  %292 = invoke noundef ptr @_ZNK11R3SceneNode6ParentEv(ptr noundef nonnull align 8 dereferenceable(432) %291)
          to label %293 unwind label %302

293:                                              ; preds = %290
  store ptr %292, ptr %28, align 8, !tbaa !5
  br label %283, !llvm.loop !34

294:                                              ; preds = %276
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %13, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %14, align 4
  br label %333

298:                                              ; preds = %277
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %13, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %14, align 4
  br label %332

302:                                              ; preds = %290, %289, %286, %279
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %13, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %14, align 4
  br label %331

306:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 128, ptr %29) #9
  %307 = getelementptr inbounds [16 x double], ptr %25, i64 0, i64 0
  invoke void @_ZN8R4MatrixC1EPKd(ptr noundef nonnull align 8 dereferenceable(128) %29, ptr noundef %307)
          to label %308 unwind label %317

308:                                              ; preds = %306
  invoke void @_ZN8R4Matrix4FlipEv(ptr noundef nonnull align 8 dereferenceable(128) %29)
          to label %309 unwind label %317

309:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 272, ptr %30) #9
  invoke void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef nonnull align 8 dereferenceable(128) %29, i32 noundef 0)
          to label %310 unwind label %321

310:                                              ; preds = %309
  invoke void @_ZN8R3Affine9TransformERKS_(ptr noundef nonnull align 8 dereferenceable(272) %26, ptr noundef nonnull align 8 dereferenceable(272) %30)
          to label %311 unwind label %325

311:                                              ; preds = %310
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %30) #9
  call void @llvm.lifetime.end.p0(i64 272, ptr %30) #9
  %312 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZN11R3SceneNode17SetTransformationERK8R3Affine(ptr noundef nonnull align 8 dereferenceable(432) %312, ptr noundef nonnull align 8 dereferenceable(272) %26)
          to label %313 unwind label %317

313:                                              ; preds = %311
  call void @llvm.lifetime.end.p0(i64 128, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %26) #9
  call void @llvm.lifetime.end.p0(i64 272, ptr %26) #9
  store i32 0, ptr %9, align 4
  br label %314

314:                                              ; preds = %313, %271
  call void @llvm.lifetime.end.p0(i64 128, ptr %25) #9
  %315 = load i32, ptr %9, align 4
  switch i32 %315, label %337 [
    i32 0, label %316
  ]

316:                                              ; preds = %314
  br label %334

317:                                              ; preds = %311, %308, %306
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %13, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %14, align 4
  br label %330

321:                                              ; preds = %309
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %13, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %14, align 4
  br label %329

325:                                              ; preds = %310
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %13, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %14, align 4
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %30) #9
  br label %329

329:                                              ; preds = %325, %321
  call void @llvm.lifetime.end.p0(i64 272, ptr %30) #9
  br label %330

330:                                              ; preds = %329, %317
  call void @llvm.lifetime.end.p0(i64 128, ptr %29) #9
  br label %331

331:                                              ; preds = %330, %302
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %332

332:                                              ; preds = %331, %298
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %26) #9
  br label %333

333:                                              ; preds = %332, %294
  call void @llvm.lifetime.end.p0(i64 272, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %25) #9
  br label %341

334:                                              ; preds = %316, %246
  br label %335

335:                                              ; preds = %334, %244
  br label %336

336:                                              ; preds = %335, %155
  store i32 0, ptr %9, align 4
  br label %337

337:                                              ; preds = %336, %314, %242, %153, %86
  call void @llvm.lifetime.end.p0(i64 256, ptr %16) #9
  br label %338

338:                                              ; preds = %337, %80, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  %339 = load i32, ptr %9, align 4
  switch i32 %339, label %346 [
    i32 0, label %340
    i32 2, label %46
  ]

340:                                              ; preds = %338
  br label %46, !llvm.loop !33

341:                                              ; preds = %333, %245, %157
  call void @llvm.lifetime.end.p0(i64 256, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %347

342:                                              ; preds = %50
  %343 = load ptr, ptr %8, align 8, !tbaa !5
  %344 = invoke i32 @fclose(ptr noundef %343)
          to label %345 unwind label %65

345:                                              ; preds = %342
  store i32 1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %346

346:                                              ; preds = %345, %338
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %10) #9
  br label %348

347:                                              ; preds = %341, %65
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %350

348:                                              ; preds = %346, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  %349 = load i32, ptr %4, align 4
  ret i32 %349

350:                                              ; preds = %347
  %351 = load ptr, ptr %13, align 8
  %352 = load i32, ptr %14, align 4
  %353 = insertvalue { ptr, i32 } poison, ptr %351, 0
  %354 = insertvalue { ptr, i32 } %353, i32 %352, 1
  resume { ptr, i32 } %354
}

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #7

declare void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) #2

declare void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare void @_ZN8R4MatrixC1EPKd(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) unnamed_addr #2

declare void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #7

declare i32 @fclose(ptr noundef) #2

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) #5

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #7

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #0 align 2

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

declare void @_ZN11R3SceneNode11RemoveChildEPS_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8R3AffineC2ERKS_(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #8 align 2

declare void @_ZN8R3Affine16InverseTransformERKS_(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK11R3SceneNode14TransformationEv(ptr noundef nonnull align 8 dereferenceable(432)) #6 align 2

declare void @_ZN8R4Matrix4FlipEv(ptr noundef nonnull align 8 dereferenceable(128)) #2

declare void @_ZN8R3Affine9TransformERKS_(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272)) #2

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

attributes #0 = { 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 #1 = { nobuiltin allocsize(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 #2 = { "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 = { nobuiltin 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind willreturn memory(read) "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 = { 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 #7 = { 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 #8 = { inlinehint 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS7R3Scene", !6, i64 0, !11, i64 8, !14, i64 24, !15, i64 40, !16, i64 56, !17, i64 72, !18, i64 88, !19, i64 104, !21, i64 112, !28, i64 280, !28, i64 304, !6, i64 328, !6, i64 336, !6, i64 344}
!11 = !{!"_ZTS7RNArrayIP11R3SceneNodeE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !6, i64 0, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS7RNArrayIP7R3LightE", !12, i64 0}
!15 = !{!"_ZTS7RNArrayIP10R3MaterialE", !12, i64 0}
!16 = !{!"_ZTS7RNArrayIP6R3BrdfE", !12, i64 0}
!17 = !{!"_ZTS7RNArrayIP9R2TextureE", !12, i64 0}
!18 = !{!"_ZTS7RNArrayIP7R3SceneE", !12, i64 0}
!19 = !{!"_ZTS13RNSymbolTableIPKcE", !20, i64 0}
!20 = !{!"_ZTS5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcE", !6, i64 0}
!21 = !{!"_ZTS8R3Viewer", !22, i64 8, !27, i64 152}
!22 = !{!"_ZTS8R3Camera", !23, i64 0, !26, i64 96, !26, i64 104, !26, i64 112, !26, i64 120, !26, i64 128, !6, i64 136}
!23 = !{!"_ZTS13R3CoordSystem", !24, i64 0, !25, i64 24}
!24 = !{!"_ZTS7R3Point", !7, i64 0}
!25 = !{!"_ZTS7R3Triad", !7, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = !{!"_ZTS10R2Viewport", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!28 = !{!"_ZTS5RNRgb", !7, i64 0}
!29 = !{!13, !13, i64 0}
!30 = !{!7, !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}


; 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.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@R3identity_affine = external global %class.R3Affine, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP11R3SceneNodeEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

declare void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5

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

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIP11R3SceneNodeE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE4TailEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

declare void @_ZN11R3SceneNode17SetTransformationERK8R3Affine(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene24ReadSupportHierarchyFileEPKcP11R3SceneNode(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [1024 x i8], align 16
  %5 = alloca %class.RNArray, align 8
  %6 = alloca [256 x i8], align 16
  %7 = alloca i32, align 4
  %8 = alloca [1024 x i8], align 16
  %9 = alloca [1024 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca [16 x double], align 16
  %12 = alloca %class.R3Affine, align 8
  %13 = alloca %class.R4Matrix, align 8
  %14 = alloca %class.R3Affine, align 8
  %.not = icmp eq ptr %2, null
  %15 = load ptr, ptr %0, align 8
  %spec.select = select i1 %.not, ptr %15, ptr %2
  %16 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.42)
  %.not89 = icmp eq ptr %16, null
  br i1 %.not89, label %17, label %20

17:                                               ; preds = %3
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.43, ptr noundef %1) #11
  br label %161

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #12
  call void @_ZN7RNArrayIP11R3SceneNodeEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %21 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 1023, ptr noundef nonnull %16)
  %.not90127 = icmp eq ptr %21, null
  br i1 %.not90127, label %._crit_edge131, label %.lr.ph130

.lr.ph130:                                        ; preds = %20
  %22 = getelementptr inbounds i8, ptr %11, i64 8
  %23 = getelementptr inbounds i8, ptr %11, i64 16
  %24 = getelementptr inbounds i8, ptr %11, i64 24
  %25 = getelementptr inbounds i8, ptr %11, i64 32
  %26 = getelementptr inbounds i8, ptr %11, i64 40
  %27 = getelementptr inbounds i8, ptr %11, i64 48
  %28 = getelementptr inbounds i8, ptr %11, i64 56
  %29 = getelementptr inbounds i8, ptr %11, i64 64
  %30 = getelementptr inbounds i8, ptr %11, i64 72
  %31 = getelementptr inbounds i8, ptr %11, i64 80
  %32 = getelementptr inbounds i8, ptr %11, i64 88
  %33 = getelementptr inbounds i8, ptr %11, i64 96
  %34 = getelementptr inbounds i8, ptr %11, i64 104
  %35 = getelementptr inbounds i8, ptr %11, i64 112
  %36 = getelementptr inbounds i8, ptr %11, i64 120
  br label %37

37:                                               ; preds = %.lr.ph130, %.backedge
  %.061128 = phi i32 [ 0, %.lr.ph130 ], [ %44, %.backedge ]
  br label %38

38:                                               ; preds = %38, %37
  %.072 = phi ptr [ %4, %37 ], [ %42, %38 ]
  %39 = load i8, ptr %.072, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = call i32 @isspace(i32 noundef %40) #13
  %.not91 = icmp eq i32 %41, 0
  %42 = getelementptr inbounds i8, ptr %.072, i64 1
  br i1 %.not91, label %43, label %38, !llvm.loop !10

43:                                               ; preds = %38
  %44 = add nuw nsw i32 %.061128, 1
  switch i8 %39, label %45 [
    i8 35, label %.backedge
    i8 0, label %.backedge
  ], !llvm.loop !12

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) #12
  %46 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.072, ptr noundef nonnull @.str.44, ptr noundef nonnull %6) #12
  %.not92 = icmp eq i32 %46, 1
  br i1 %.not92, label %50, label %47

47:                                               ; preds = %45
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.106, i32 noundef %44, ptr noundef %1) #11
  br label %.loopexit.loopexit

50:                                               ; preds = %45
  %51 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.107) #13
  %.not93 = icmp eq i32 %51, 0
  br i1 %.not93, label %52, label %83

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #12
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %8) #12
  %53 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.072, ptr noundef nonnull @.str.108, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #12
  %.not94 = icmp eq i32 %53, 3
  br i1 %.not94, label %57, label %54

54:                                               ; preds = %52
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.106, i32 noundef %44, ptr noundef %1) #11
  br label %.thread

57:                                               ; preds = %52
  %58 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %59 = load i32, ptr %7, align 4, !tbaa !13
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %64, label %61

61:                                               ; preds = %57
  invoke void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.109, i32 noundef 2861, ptr noundef nonnull @.str.2)
          to label %64 unwind label %62

62:                                               ; preds = %61
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %82

64:                                               ; preds = %61, %57
  %65 = invoke noalias noundef nonnull dereferenceable(432) ptr @_Znwm(i64 noundef 432) #14
          to label %66 unwind label %75

66:                                               ; preds = %64
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %65, ptr noundef nonnull %0)
          to label %67 unwind label %77

67:                                               ; preds = %66
  invoke void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432) %65, ptr noundef nonnull %8)
          to label %68 unwind label %75

68:                                               ; preds = %67
  invoke void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %spec.select, ptr noundef nonnull %65)
          to label %69 unwind label %75

69:                                               ; preds = %68
  %70 = invoke noundef ptr @_ZN7RNArrayIP11R3SceneNodeE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %65)
          to label %71 unwind label %75

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %9) #12
  %72 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.110, ptr noundef nonnull %8) #12
  %73 = invoke noundef i32 @_ZL7ReadObjP7R3SceneP11R3SceneNodePKcP7RNArrayIP10R3MaterialE(ptr noundef nonnull %0, ptr noundef nonnull %65, ptr noundef nonnull %9, ptr noundef null)
          to label %74 unwind label %79

74:                                               ; preds = %71
  %.not97 = icmp eq i32 %73, 0
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #12
  br i1 %.not97, label %.thread, label %81

75:                                               ; preds = %69, %68, %67, %64
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %82

77:                                               ; preds = %66
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %65, i64 noundef 432) #15
  br label %82

79:                                               ; preds = %71
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #12
  br label %82

.thread:                                          ; preds = %74, %54
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #12
  br label %.loopexit.loopexit

81:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #12
  br label %157

82:                                               ; preds = %75, %77, %79, %62
  %.pn.pn = phi { ptr, i32 } [ %63, %62 ], [ %80, %79 ], [ %76, %75 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #12
  br label %159

83:                                               ; preds = %50
  %84 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.111) #13
  %.not98 = icmp eq i32 %84, 0
  br i1 %.not98, label %85, label %122

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #12
  %86 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.072, ptr noundef nonnull @.str.112, ptr noundef nonnull %6, ptr noundef nonnull %10) #12
  %.not99 = icmp eq i32 %86, 2
  br i1 %.not99, label %90, label %87

87:                                               ; preds = %85
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.106, i32 noundef %44, ptr noundef %1) #11
  br label %.critedge

90:                                               ; preds = %85
  %91 = load i32, ptr %10, align 4, !tbaa !13
  %92 = icmp slt i32 %91, 0
  %93 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  br i1 %92, label %94, label %98

94:                                               ; preds = %90
  %.not107 = icmp eq i32 %93, 1
  br i1 %.not107, label %121, label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef nonnull @.str.113, ptr noundef %1) #11
  br label %.critedge

98:                                               ; preds = %90
  %.not100 = icmp slt i32 %91, %93
  br i1 %.not100, label %103, label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr @stderr, align 8, !tbaa !5
  %101 = load i32, ptr %10, align 4, !tbaa !13
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.114, i32 noundef %101, i32 noundef %44, ptr noundef %1) #11
  br label %.critedge

103:                                              ; preds = %98
  %104 = invoke noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE4TailEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %105 unwind label %112

105:                                              ; preds = %103
  %106 = load i32, ptr %10, align 4, !tbaa !13
  %107 = invoke noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %106)
          to label %108 unwind label %114

108:                                              ; preds = %105
  %109 = call noundef ptr @_ZNK11R3SceneNode6ParentEv(ptr noundef nonnull align 8 dereferenceable(432) %104)
  %.not101 = icmp eq ptr %107, %109
  br i1 %.not101, label %121, label %110

110:                                              ; preds = %108
  %.not102 = icmp eq ptr %109, null
  br i1 %.not102, label %118, label %111

111:                                              ; preds = %110
  invoke void @_ZN11R3SceneNode11RemoveChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %109, ptr noundef nonnull %104)
          to label %118 unwind label %116

112:                                              ; preds = %103
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %120

114:                                              ; preds = %105
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %120

116:                                              ; preds = %119, %111
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %120

118:                                              ; preds = %111, %110
  %.not103 = icmp eq ptr %107, null
  br i1 %.not103, label %121, label %119

119:                                              ; preds = %118
  invoke void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %107, ptr noundef nonnull %104)
          to label %121 unwind label %116

120:                                              ; preds = %114, %116, %112
  %.pn104.pn = phi { ptr, i32 } [ %113, %112 ], [ %117, %116 ], [ %115, %114 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #12
  br label %159

121:                                              ; preds = %94, %118, %119, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #12
  br label %157

122:                                              ; preds = %83
  %123 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.115) #13
  %.not108 = icmp eq i32 %123, 0
  br i1 %.not108, label %124, label %157

124:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %11) #12
  %125 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.072, ptr noundef nonnull @.str.116, ptr noundef nonnull %6, ptr noundef nonnull %11, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef nonnull %34, ptr noundef nonnull %35, ptr noundef nonnull %36) #12
  %.not109 = icmp eq i32 %125, 17
  br i1 %.not109, label %128, label %.thread122

.thread122:                                       ; preds = %124
  %126 = load ptr, ptr @stderr, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef nonnull @.str.106, i32 noundef %44, ptr noundef %1) #11
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #12
  br label %.loopexit.loopexit

128:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %12) #12
  invoke void @_ZN8R3AffineC2ERKS_(ptr noundef nonnull align 8 dereferenceable(272) %12, ptr noundef nonnull align 8 dereferenceable(272) @R3identity_affine)
          to label %129 unwind label %136

129:                                              ; preds = %128
  %130 = invoke noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE4TailEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %131 unwind label %138

131:                                              ; preds = %129
  %132 = call noundef ptr @_ZNK11R3SceneNode6ParentEv(ptr noundef nonnull align 8 dereferenceable(432) %130)
  %.not110125 = icmp eq ptr %132, null
  br i1 %.not110125, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %131, %134
  %.0126 = phi ptr [ %135, %134 ], [ %132, %131 ]
  %133 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK11R3SceneNode14TransformationEv(ptr noundef nonnull align 8 dereferenceable(432) %.0126)
  invoke void @_ZN8R3Affine16InverseTransformERKS_(ptr noundef nonnull align 8 dereferenceable(272) %12, ptr noundef nonnull align 8 dereferenceable(272) %133)
          to label %134 unwind label %140

134:                                              ; preds = %.lr.ph
  %135 = call noundef ptr @_ZNK11R3SceneNode6ParentEv(ptr noundef nonnull align 8 dereferenceable(432) %.0126)
  %.not110 = icmp eq ptr %135, null
  br i1 %.not110, label %._crit_edge, label %.lr.ph, !llvm.loop !15

136:                                              ; preds = %128
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %156

138:                                              ; preds = %129
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %155

140:                                              ; preds = %.lr.ph
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %155

._crit_edge:                                      ; preds = %134, %131
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %13) #12
  invoke void @_ZN8R4MatrixC1EPKd(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull %11)
          to label %142 unwind label %147

142:                                              ; preds = %._crit_edge
  invoke void @_ZN8R4Matrix4FlipEv(ptr noundef nonnull align 8 dereferenceable(128) %13)
          to label %143 unwind label %147

143:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %14) #12
  invoke void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %14, ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef 0)
          to label %144 unwind label %149

144:                                              ; preds = %143
  invoke void @_ZN8R3Affine9TransformERKS_(ptr noundef nonnull align 8 dereferenceable(272) %12, ptr noundef nonnull align 8 dereferenceable(272) %14)
          to label %145 unwind label %151

145:                                              ; preds = %144
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %14) #12
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %14) #12
  invoke void @_ZN11R3SceneNode17SetTransformationERK8R3Affine(ptr noundef nonnull align 8 dereferenceable(432) %130, ptr noundef nonnull align 8 dereferenceable(272) %12)
          to label %146 unwind label %147

146:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #12
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %12) #12
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %12) #12
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #12
  br label %157

147:                                              ; preds = %145, %142, %._crit_edge
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %154

149:                                              ; preds = %143
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %153

151:                                              ; preds = %144
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %14) #12
  br label %153

153:                                              ; preds = %151, %149
  %.pn111 = phi { ptr, i32 } [ %152, %151 ], [ %150, %149 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %14) #12
  br label %154

154:                                              ; preds = %153, %147
  %.pn113 = phi { ptr, i32 } [ %148, %147 ], [ %.pn111, %153 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #12
  br label %155

155:                                              ; preds = %140, %154, %138
  %.pn115.pn = phi { ptr, i32 } [ %139, %138 ], [ %141, %140 ], [ %.pn113, %154 ]
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %12) #12
  br label %156

156:                                              ; preds = %155, %136
  %.pn115.pn.pn = phi { ptr, i32 } [ %.pn115.pn, %155 ], [ %137, %136 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %12) #12
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #12
  br label %159

.critedge:                                        ; preds = %99, %95, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #12
  br label %.loopexit.loopexit

157:                                              ; preds = %146, %81, %121, %122
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #12
  br label %.backedge

.backedge:                                        ; preds = %43, %43, %157
  %158 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 1023, ptr noundef nonnull %16)
  %.not90 = icmp eq ptr %158, null
  br i1 %.not90, label %._crit_edge131, label %37, !llvm.loop !12

159:                                              ; preds = %156, %120, %82
  %.pn115.pn.pn.pn = phi { ptr, i32 } [ %.pn115.pn.pn, %156 ], [ %.pn104.pn, %120 ], [ %.pn.pn, %82 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #12
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #12
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #12
  resume { ptr, i32 } %.pn115.pn.pn.pn

._crit_edge131:                                   ; preds = %.backedge, %20
  %160 = call i32 @fclose(ptr noundef nonnull %16)
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %47, %.critedge, %.thread, %.thread122
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #12
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %._crit_edge131
  %.8 = phi i32 [ 1, %._crit_edge131 ], [ 0, %.loopexit.loopexit ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #12
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #12
  br label %161

161:                                              ; preds = %.loopexit, %17
  %.9 = phi i32 [ %.8, %.loopexit ], [ 0, %17 ]
  ret i32 %.9
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #7

declare void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) local_unnamed_addr #2

declare void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #7

declare void @_ZN8R4MatrixC1EPKd(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) unnamed_addr #2

declare void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #8

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) local_unnamed_addr #9

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #0 align 2

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

declare void @_ZN11R3SceneNode11RemoveChildEPS_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8R3AffineC2ERKS_(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #10 align 2

declare void @_ZN8R3Affine16InverseTransformERKS_(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK11R3SceneNode14TransformationEv(ptr noundef nonnull align 8 dereferenceable(432)) local_unnamed_addr #6 align 2

declare void @_ZN8R4Matrix4FlipEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2

declare void @_ZN8R3Affine9TransformERKS_(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #8

attributes #0 = { 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 #1 = { nobuiltin allocsize(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 #2 = { "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 = { nobuiltin 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #7 = { 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 #8 = { 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 #9 = { mustprogress nofree nounwind willreturn memory(read) "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 #10 = { inlinehint 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 #11 = { cold nounwind }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { builtin allocsize(0) }
attributes #15 = { builtin 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !11}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass