; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Mesh.ll (ZN6R3Mesh11ReadIfsFileEPKc)

; 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.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R3MeshVertex = type { ptr, %class.RNArray.0, %class.R3Point, %class.R3Vector, %class.R2Point, %class.RNRgb, double, i32, %class.RNFlags, double, i32, ptr }
%class.RNArray.0 = type { %class.RNVArray }
%class.R3Vector = type { [3 x double] }
%class.R2Point = type { [2 x double] }
%class.RNRgb = type { [3 x double] }
%class.RNFlags = type { i64 }
%class.R3Mesh = type { ptr, %class.RNArray, %class.RNArray.0, %class.RNArray.1, ptr, ptr, ptr, [128 x i8], %class.R3Box, ptr }
%class.RNArray.1 = type { %class.RNVArray }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3MeshFace = type { ptr, [3 x ptr], [3 x ptr], %class.R3Plane, %class.R3Box, double, i32, i32, i32, i32, %class.RNFlags, double, i32, ptr }
%class.R3Plane = type { %class.R3Vector, double }

@stderr = external global ptr, align 8
@.str.70 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.136 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [49 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #1

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #5 align 2

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

declare void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #6

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

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

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

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

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

declare void @_Z6RNFailPKcz(ptr noundef, ...) #6

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

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

declare i32 @fclose(ptr noundef) #6

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

declare void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6R3Mesh11ReadIfsFileEPKc(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1024 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [3 x float], align 4
  %15 = alloca %class.R3Point, align 8
  %16 = alloca i32, align 4
  %17 = alloca %class.RNArray, align 8
  %18 = alloca i32, align 4
  %19 = alloca [3 x i32], align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noalias ptr @fopen(ptr noundef %31, ptr noundef @.str.102)
  store ptr %32, ptr %7, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %38, label %34

34:                                               ; preds = %2
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.70, ptr noundef %36) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %451

38:                                               ; preds = %2
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %41 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef %39, ptr noundef %40, i32 noundef 1024)
  %42 = icmp slt i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %38
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.134, ptr noundef %44)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %451

45:                                               ; preds = %38
  %46 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %47 = call i32 @strcmp(ptr noundef %46, ptr noundef @.str.135) #10
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.136, ptr noundef %50)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %451

51:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = call i64 @fread(ptr noundef %9, i64 noundef 4, i64 noundef 1, ptr noundef %52)
  %54 = icmp ne i64 %53, 1
  br i1 %54, label %55, label %57

55:                                               ; preds = %51
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.137, ptr noundef %56)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %450

57:                                               ; preds = %51
  %58 = load float, ptr %9, align 4, !tbaa !9
  %59 = fpext float %58 to double
  %60 = fcmp une double %59, 1.000000e+00
  br i1 %60, label %61, label %63

61:                                               ; preds = %57
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.138, ptr noundef %62)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %450

63:                                               ; preds = %57
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %66 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef %64, ptr noundef %65, i32 noundef 1024)
  %67 = icmp slt i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %63
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.139, ptr noundef %69)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %450

70:                                               ; preds = %63
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %73 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef %71, ptr noundef %72, i32 noundef 1024)
  %74 = icmp slt i32 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %70
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.140, ptr noundef %76)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %450

77:                                               ; preds = %70
  %78 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %79 = call i32 @strcmp(ptr noundef %78, ptr noundef @.str.141) #10
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %77
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.142, ptr noundef %82)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %450

83:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = call i64 @fread(ptr noundef %10, i64 noundef 4, i64 noundef 1, ptr noundef %84)
  %86 = icmp ne i64 %85, 1
  br i1 %86, label %87, label %89

87:                                               ; preds = %83
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.143, ptr noundef %88)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %448

89:                                               ; preds = %83
  %90 = load i32, ptr %10, align 4, !tbaa !11
  %91 = zext i32 %90 to i64
  %92 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %91, i64 160)
  %93 = extractvalue { i64, i1 } %92, 1
  %94 = extractvalue { i64, i1 } %92, 0
  %95 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %94, i64 8)
  %96 = extractvalue { i64, i1 } %95, 1
  %97 = or i1 %93, %96
  %98 = extractvalue { i64, i1 } %95, 0
  %99 = select i1 %97, i64 -1, i64 %98
  %100 = call noalias noundef nonnull ptr @_Znam(i64 noundef %99) #11
  store i64 %91, ptr %100, align 16
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = icmp eq i64 %91, 0
  br i1 %102, label %110, label %103

103:                                              ; preds = %89
  %104 = getelementptr inbounds %class.R3MeshVertex, ptr %101, i64 %91
  br label %105

105:                                              ; preds = %107, %103
  %106 = phi ptr [ %101, %103 ], [ %108, %107 ]
  invoke void @_ZN12R3MeshVertexC1Ev(ptr noundef nonnull align 8 dereferenceable(160) %106)
          to label %107 unwind label %119

107:                                              ; preds = %105
  %108 = getelementptr inbounds %class.R3MeshVertex, ptr %106, i64 1
  %109 = icmp eq ptr %108, %104
  br i1 %109, label %110, label %105

110:                                              ; preds = %107, %89
  %111 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 4
  store ptr %101, ptr %111, align 8, !tbaa !13
  %112 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 1
  %113 = load i32, ptr %10, align 4, !tbaa !11
  call void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16) %112, i32 noundef %113)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %114

114:                                              ; preds = %165, %110
  %115 = load i32, ptr %13, align 4, !tbaa !11
  %116 = load i32, ptr %10, align 4, !tbaa !11
  %117 = icmp ult i32 %115, %116
  br i1 %117, label %129, label %118

118:                                              ; preds = %114
  store i32 2, ptr %8, align 4
  br label %168

119:                                              ; preds = %105
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %11, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %12, align 4
  %123 = icmp eq ptr %101, %106
  br i1 %123, label %128, label %124

124:                                              ; preds = %124, %119
  %125 = phi ptr [ %106, %119 ], [ %126, %124 ]
  %126 = getelementptr inbounds %class.R3MeshVertex, ptr %125, i64 -1
  call void @_ZN12R3MeshVertexD1Ev(ptr noundef nonnull align 8 dereferenceable(160) %126) #9
  %127 = icmp eq ptr %126, %101
  br i1 %127, label %128, label %124

128:                                              ; preds = %124, %119
  call void @_ZdaPvm(ptr noundef %100, i64 noundef %99) #12
  br label %449

129:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #9
  %130 = getelementptr inbounds [3 x float], ptr %14, i64 0, i64 0
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = call i64 @fread(ptr noundef %130, i64 noundef 4, i64 noundef 3, ptr noundef %131)
  %133 = icmp ne i64 %132, 3
  br i1 %133, label %134, label %137

134:                                              ; preds = %129
  %135 = load i32, ptr %13, align 4, !tbaa !11
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.144, i32 noundef %135, ptr noundef %136)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %162

137:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #9
  %138 = getelementptr inbounds [3 x float], ptr %14, i64 0, i64 0
  %139 = load float, ptr %138, align 4, !tbaa !9
  %140 = fpext float %139 to double
  %141 = getelementptr inbounds [3 x float], ptr %14, i64 0, i64 1
  %142 = load float, ptr %141, align 4, !tbaa !9
  %143 = fpext float %142 to double
  %144 = getelementptr inbounds [3 x float], ptr %14, i64 0, i64 2
  %145 = load float, ptr %144, align 4, !tbaa !9
  %146 = fpext float %145 to double
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %15, double noundef %140, double noundef %143, double noundef %146)
  %147 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !13
  %149 = load i32, ptr %13, align 4, !tbaa !11
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds %class.R3MeshVertex, ptr %148, i64 %150
  %152 = load ptr, ptr %30, align 8, !tbaa !23
  %153 = getelementptr inbounds ptr, ptr %152, i64 4
  %154 = load ptr, ptr %153, align 8
  %155 = call noundef ptr %154(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef %151)
  %156 = icmp ne ptr %155, null
  %157 = xor i1 %156, true
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #9
  br i1 %157, label %158, label %161

158:                                              ; preds = %137
  %159 = load i32, ptr %13, align 4, !tbaa !11
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.145, i32 noundef %159, ptr noundef %160)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %162

161:                                              ; preds = %137
  store i32 0, ptr %8, align 4
  br label %162

162:                                              ; preds = %161, %158, %134
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #9
  %163 = load i32, ptr %8, align 4
  switch i32 %163, label %168 [
    i32 0, label %164
  ]

164:                                              ; preds = %162
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %13, align 4, !tbaa !11
  %167 = add i32 %166, 1
  store i32 %167, ptr %13, align 4, !tbaa !11
  br label %114, !llvm.loop !25

168:                                              ; preds = %162, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  %169 = load i32, ptr %8, align 4
  switch i32 %169, label %448 [
    i32 2, label %170
  ]

170:                                              ; preds = %168
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %173 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef %171, ptr noundef %172, i32 noundef 1024)
  %174 = icmp slt i32 %173, 0
  br i1 %174, label %175, label %177

175:                                              ; preds = %170
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.140, ptr noundef %176)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %448

177:                                              ; preds = %170
  %178 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %179 = call i32 @strcmp(ptr noundef %178, ptr noundef @.str.146) #10
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %183

181:                                              ; preds = %177
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.147, ptr noundef %182)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %448

183:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = call i64 @fread(ptr noundef %16, i64 noundef 4, i64 noundef 1, ptr noundef %184)
  %186 = icmp ne i64 %185, 1
  br i1 %186, label %187, label %189

187:                                              ; preds = %183
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.148, ptr noundef %188)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %446

189:                                              ; preds = %183
  %190 = load i32, ptr %16, align 4, !tbaa !11
  %191 = zext i32 %190 to i64
  %192 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %191, i64 200)
  %193 = extractvalue { i64, i1 } %192, 1
  %194 = extractvalue { i64, i1 } %192, 0
  %195 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %194, i64 8)
  %196 = extractvalue { i64, i1 } %195, 1
  %197 = or i1 %193, %196
  %198 = extractvalue { i64, i1 } %195, 0
  %199 = select i1 %197, i64 -1, i64 %198
  %200 = call noalias noundef nonnull ptr @_Znam(i64 noundef %199) #11
  store i64 %191, ptr %200, align 16
  %201 = getelementptr inbounds i8, ptr %200, i64 8
  %202 = icmp eq i64 %191, 0
  br i1 %202, label %210, label %203

203:                                              ; preds = %189
  %204 = getelementptr inbounds %class.R3MeshFace, ptr %201, i64 %191
  br label %205

205:                                              ; preds = %207, %203
  %206 = phi ptr [ %201, %203 ], [ %208, %207 ]
  invoke void @_ZN10R3MeshFaceC1Ev(ptr noundef nonnull align 8 dereferenceable(200) %206)
          to label %207 unwind label %219

207:                                              ; preds = %205
  %208 = getelementptr inbounds %class.R3MeshFace, ptr %206, i64 1
  %209 = icmp eq ptr %208, %204
  br i1 %209, label %210, label %205

210:                                              ; preds = %207, %189
  %211 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 6
  store ptr %201, ptr %211, align 8, !tbaa !27
  %212 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 3
  %213 = load i32, ptr %16, align 4, !tbaa !11
  call void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16) %212, i32 noundef %213)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  call void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %214

214:                                              ; preds = %316, %210
  %215 = load i32, ptr %18, align 4, !tbaa !11
  %216 = load i32, ptr %16, align 4, !tbaa !11
  %217 = icmp ult i32 %215, %216
  br i1 %217, label %229, label %218

218:                                              ; preds = %214
  store i32 5, ptr %8, align 4
  br label %322

219:                                              ; preds = %205
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %11, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %12, align 4
  %223 = icmp eq ptr %201, %206
  br i1 %223, label %228, label %224

224:                                              ; preds = %224, %219
  %225 = phi ptr [ %206, %219 ], [ %226, %224 ]
  %226 = getelementptr inbounds %class.R3MeshFace, ptr %225, i64 -1
  call void @_ZN10R3MeshFaceD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %226) #9
  %227 = icmp eq ptr %226, %201
  br i1 %227, label %228, label %224

228:                                              ; preds = %224, %219
  call void @_ZdaPvm(ptr noundef %200, i64 noundef %199) #12
  br label %447

229:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #9
  %230 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  %232 = invoke i64 @fread(ptr noundef %230, i64 noundef 4, i64 noundef 3, ptr noundef %231)
          to label %233 unwind label %239

233:                                              ; preds = %229
  %234 = icmp ne i64 %232, 3
  br i1 %234, label %235, label %243

235:                                              ; preds = %233
  %236 = load i32, ptr %18, align 4, !tbaa !11
  %237 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void (ptr, ...) @_Z6RNFailPKcz(ptr noundef @.str.149, i32 noundef %236, ptr noundef %237)
          to label %238 unwind label %239

238:                                              ; preds = %235
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %313

239:                                              ; preds = %235, %229
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %11, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %12, align 4
  br label %321

243:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %244 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 1
  %245 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %246 = load i32, ptr %245, align 4, !tbaa !11
  %247 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP12R3MeshVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %244, i32 noundef %246)
          to label %248 unwind label %274

248:                                              ; preds = %243
  %249 = load ptr, ptr %247, align 8, !tbaa !5
  store ptr %249, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %250 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 1
  %251 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  %252 = load i32, ptr %251, align 4, !tbaa !11
  %253 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP12R3MeshVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %250, i32 noundef %252)
          to label %254 unwind label %278

254:                                              ; preds = %248
  %255 = load ptr, ptr %253, align 8, !tbaa !5
  store ptr %255, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %256 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 1
  %257 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 2
  %258 = load i32, ptr %257, align 4, !tbaa !11
  %259 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP12R3MeshVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %256, i32 noundef %258)
          to label %260 unwind label %282

260:                                              ; preds = %254
  %261 = load ptr, ptr %259, align 8, !tbaa !5
  store ptr %261, ptr %22, align 8, !tbaa !5
  %262 = load ptr, ptr %20, align 8, !tbaa !5
  %263 = load ptr, ptr %21, align 8, !tbaa !5
  %264 = icmp eq ptr %262, %263
  br i1 %264, label %273, label %265

265:                                              ; preds = %260
  %266 = load ptr, ptr %21, align 8, !tbaa !5
  %267 = load ptr, ptr %22, align 8, !tbaa !5
  %268 = icmp eq ptr %266, %267
  br i1 %268, label %273, label %269

269:                                              ; preds = %265
  %270 = load ptr, ptr %20, align 8, !tbaa !5
  %271 = load ptr, ptr %22, align 8, !tbaa !5
  %272 = icmp eq ptr %270, %271
  br i1 %272, label %273, label %286

273:                                              ; preds = %269, %265, %260
  store i32 7, ptr %8, align 4
  br label %312

274:                                              ; preds = %243
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %11, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %12, align 4
  br label %320

278:                                              ; preds = %248
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %11, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %12, align 4
  br label %319

282:                                              ; preds = %307, %304, %301, %286, %254
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %11, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %319

286:                                              ; preds = %269
  %287 = load ptr, ptr %20, align 8, !tbaa !5
  %288 = load ptr, ptr %21, align 8, !tbaa !5
  %289 = load ptr, ptr %22, align 8, !tbaa !5
  %290 = getelementptr inbounds %class.R3Mesh, ptr %30, i32 0, i32 6
  %291 = load ptr, ptr %290, align 8, !tbaa !27
  %292 = load i32, ptr %18, align 4, !tbaa !11
  %293 = zext i32 %292 to i64
  %294 = getelementptr inbounds %class.R3MeshFace, ptr %291, i64 %293
  %295 = load ptr, ptr %30, align 8, !tbaa !23
  %296 = getelementptr inbounds ptr, ptr %295, i64 9
  %297 = load ptr, ptr %296, align 8
  %298 = invoke noundef ptr %297(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %287, ptr noundef %288, ptr noundef %289, ptr noundef %294)
          to label %299 unwind label %282

299:                                              ; preds = %286
  %300 = icmp ne ptr %298, null
  br i1 %300, label %311, label %301

301:                                              ; preds = %299
  %302 = load ptr, ptr %20, align 8, !tbaa !5
  %303 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef %302)
          to label %304 unwind label %282

304:                                              ; preds = %301
  %305 = load ptr, ptr %21, align 8, !tbaa !5
  %306 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef %305)
          to label %307 unwind label %282

307:                                              ; preds = %304
  %308 = load ptr, ptr %22, align 8, !tbaa !5
  %309 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef %308)
          to label %310 unwind label %282

310:                                              ; preds = %307
  br label %311

311:                                              ; preds = %310, %299
  store i32 0, ptr %8, align 4
  br label %312

312:                                              ; preds = %311, %273
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %313

313:                                              ; preds = %312, %238
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #9
  %314 = load i32, ptr %8, align 4
  switch i32 %314, label %322 [
    i32 0, label %315
    i32 7, label %316
  ]

315:                                              ; preds = %313
  br label %316

316:                                              ; preds = %315, %313
  %317 = load i32, ptr %18, align 4, !tbaa !11
  %318 = add i32 %317, 1
  store i32 %318, ptr %18, align 4, !tbaa !11
  br label %214, !llvm.loop !28

319:                                              ; preds = %282, %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %320

320:                                              ; preds = %319, %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %321

321:                                              ; preds = %320, %239
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %445

322:                                              ; preds = %313, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  %323 = load i32, ptr %8, align 4
  switch i32 %323, label %444 [
    i32 5, label %324
  ]

324:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %325

325:                                              ; preds = %429, %324
  %326 = load i32, ptr %23, align 4, !tbaa !11
  %327 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %328 unwind label %332

328:                                              ; preds = %325
  %329 = sub nsw i32 %327, 3
  %330 = icmp sle i32 %326, %329
  br i1 %330, label %336, label %331

331:                                              ; preds = %328
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %436

332:                                              ; preds = %325
  %333 = landingpad { ptr, i32 }
          cleanup
  %334 = extractvalue { ptr, i32 } %333, 0
  store ptr %334, ptr %11, align 8
  %335 = extractvalue { ptr, i32 } %333, 1
  store i32 %335, ptr %12, align 4
  br label %435

336:                                              ; preds = %328
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %337 = load i32, ptr %23, align 4, !tbaa !11
  %338 = add nsw i32 %337, 0
  %339 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %338)
          to label %340 unwind label %401

340:                                              ; preds = %336
  store ptr %339, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %341 = load i32, ptr %23, align 4, !tbaa !11
  %342 = add nsw i32 %341, 1
  %343 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %342)
          to label %344 unwind label %405

344:                                              ; preds = %340
  store ptr %343, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %345 = load i32, ptr %23, align 4, !tbaa !11
  %346 = add nsw i32 %345, 2
  %347 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %346)
          to label %348 unwind label %409

348:                                              ; preds = %344
  store ptr %347, ptr %26, align 8, !tbaa !5
  %349 = load ptr, ptr %24, align 8, !tbaa !5
  %350 = load ptr, ptr %25, align 8, !tbaa !5
  %351 = load ptr, ptr %26, align 8, !tbaa !5
  %352 = load ptr, ptr %30, align 8, !tbaa !23
  %353 = getelementptr inbounds ptr, ptr %352, i64 9
  %354 = load ptr, ptr %353, align 8
  %355 = invoke noundef ptr %354(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %349, ptr noundef %350, ptr noundef %351, ptr noundef null)
          to label %356 unwind label %409

356:                                              ; preds = %348
  %357 = icmp ne ptr %355, null
  br i1 %357, label %428, label %358

358:                                              ; preds = %356
  %359 = load ptr, ptr %24, align 8, !tbaa !5
  %360 = load ptr, ptr %26, align 8, !tbaa !5
  %361 = load ptr, ptr %25, align 8, !tbaa !5
  %362 = load ptr, ptr %30, align 8, !tbaa !23
  %363 = getelementptr inbounds ptr, ptr %362, i64 9
  %364 = load ptr, ptr %363, align 8
  %365 = invoke noundef ptr %364(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %359, ptr noundef %360, ptr noundef %361, ptr noundef null)
          to label %366 unwind label %409

366:                                              ; preds = %358
  %367 = icmp ne ptr %365, null
  br i1 %367, label %427, label %368

368:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %369 = load ptr, ptr %24, align 8, !tbaa !5
  %370 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %369)
          to label %371 unwind label %413

371:                                              ; preds = %368
  %372 = load ptr, ptr %30, align 8, !tbaa !23
  %373 = getelementptr inbounds ptr, ptr %372, i64 4
  %374 = load ptr, ptr %373, align 8
  %375 = invoke noundef ptr %374(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef nonnull align 8 dereferenceable(24) %370, ptr noundef null)
          to label %376 unwind label %413

376:                                              ; preds = %371
  store ptr %375, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %377 = load ptr, ptr %25, align 8, !tbaa !5
  %378 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %377)
          to label %379 unwind label %417

379:                                              ; preds = %376
  %380 = load ptr, ptr %30, align 8, !tbaa !23
  %381 = getelementptr inbounds ptr, ptr %380, i64 4
  %382 = load ptr, ptr %381, align 8
  %383 = invoke noundef ptr %382(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef nonnull align 8 dereferenceable(24) %378, ptr noundef null)
          to label %384 unwind label %417

384:                                              ; preds = %379
  store ptr %383, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %385 = load ptr, ptr %26, align 8, !tbaa !5
  %386 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %385)
          to label %387 unwind label %421

387:                                              ; preds = %384
  %388 = load ptr, ptr %30, align 8, !tbaa !23
  %389 = getelementptr inbounds ptr, ptr %388, i64 4
  %390 = load ptr, ptr %389, align 8
  %391 = invoke noundef ptr %390(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef nonnull align 8 dereferenceable(24) %386, ptr noundef null)
          to label %392 unwind label %421

392:                                              ; preds = %387
  store ptr %391, ptr %29, align 8, !tbaa !5
  %393 = load ptr, ptr %27, align 8, !tbaa !5
  %394 = load ptr, ptr %28, align 8, !tbaa !5
  %395 = load ptr, ptr %29, align 8, !tbaa !5
  %396 = load ptr, ptr %30, align 8, !tbaa !23
  %397 = getelementptr inbounds ptr, ptr %396, i64 9
  %398 = load ptr, ptr %397, align 8
  %399 = invoke noundef ptr %398(ptr noundef nonnull align 8 dereferenceable(272) %30, ptr noundef %393, ptr noundef %394, ptr noundef %395, ptr noundef null)
          to label %400 unwind label %421

400:                                              ; preds = %392
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %427

401:                                              ; preds = %336
  %402 = landingpad { ptr, i32 }
          cleanup
  %403 = extractvalue { ptr, i32 } %402, 0
  store ptr %403, ptr %11, align 8
  %404 = extractvalue { ptr, i32 } %402, 1
  store i32 %404, ptr %12, align 4
  br label %434

405:                                              ; preds = %340
  %406 = landingpad { ptr, i32 }
          cleanup
  %407 = extractvalue { ptr, i32 } %406, 0
  store ptr %407, ptr %11, align 8
  %408 = extractvalue { ptr, i32 } %406, 1
  store i32 %408, ptr %12, align 4
  br label %433

409:                                              ; preds = %358, %348, %344
  %410 = landingpad { ptr, i32 }
          cleanup
  %411 = extractvalue { ptr, i32 } %410, 0
  store ptr %411, ptr %11, align 8
  %412 = extractvalue { ptr, i32 } %410, 1
  store i32 %412, ptr %12, align 4
  br label %432

413:                                              ; preds = %371, %368
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %11, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %12, align 4
  br label %426

417:                                              ; preds = %379, %376
  %418 = landingpad { ptr, i32 }
          cleanup
  %419 = extractvalue { ptr, i32 } %418, 0
  store ptr %419, ptr %11, align 8
  %420 = extractvalue { ptr, i32 } %418, 1
  store i32 %420, ptr %12, align 4
  br label %425

421:                                              ; preds = %392, %387, %384
  %422 = landingpad { ptr, i32 }
          cleanup
  %423 = extractvalue { ptr, i32 } %422, 0
  store ptr %423, ptr %11, align 8
  %424 = extractvalue { ptr, i32 } %422, 1
  store i32 %424, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %425

425:                                              ; preds = %421, %417
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %426

426:                                              ; preds = %425, %413
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %432

427:                                              ; preds = %400, %366
  br label %428

428:                                              ; preds = %427, %356
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %429

429:                                              ; preds = %428
  %430 = load i32, ptr %23, align 4, !tbaa !11
  %431 = add nsw i32 %430, 3
  store i32 %431, ptr %23, align 4, !tbaa !11
  br label %325, !llvm.loop !29

432:                                              ; preds = %426, %409
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %433

433:                                              ; preds = %432, %405
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %434

434:                                              ; preds = %433, %401
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %435

435:                                              ; preds = %434, %332
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %445

436:                                              ; preds = %331
  %437 = load ptr, ptr %7, align 8, !tbaa !5
  %438 = invoke i32 @fclose(ptr noundef %437)
          to label %439 unwind label %440

439:                                              ; preds = %436
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %444

440:                                              ; preds = %436
  %441 = landingpad { ptr, i32 }
          cleanup
  %442 = extractvalue { ptr, i32 } %441, 0
  store ptr %442, ptr %11, align 8
  %443 = extractvalue { ptr, i32 } %441, 1
  store i32 %443, ptr %12, align 4
  br label %445

444:                                              ; preds = %439, %322
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  br label %446

445:                                              ; preds = %440, %435, %321
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  br label %447

446:                                              ; preds = %444, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %448

447:                                              ; preds = %445, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %449

448:                                              ; preds = %446, %181, %175, %168, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %450

449:                                              ; preds = %447, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #9
  br label %453

450:                                              ; preds = %448, %81, %75, %68, %61, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %451

451:                                              ; preds = %450, %49, %43, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #9
  %452 = load i32, ptr %3, align 4
  ret i32 %452

453:                                              ; preds = %449
  %454 = load ptr, ptr %11, align 8
  %455 = load i32, ptr %12, align 4
  %456 = insertvalue { ptr, i32 } poison, ptr %454, 0
  %457 = insertvalue { ptr, i32 } %456, i32 %455, 1
  resume { ptr, i32 } %457
}

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #6

declare void @_ZN12R3MeshVertexC1Ev(ptr)

declare void @_ZN12R3MeshVertexD1Ev(ptr)

declare void @_ZN10R3MeshFaceC1Ev(ptr)

declare void @_ZN10R3MeshFaceD1Ev(ptr)

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { 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 #6 = { "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 = { 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 #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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 56}
!14 = !{!"_ZTS6R3Mesh", !15, i64 8, !17, i64 24, !18, i64 40, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !19, i64 208, !6, i64 264}
!15 = !{!"_ZTS7RNArrayIP12R3MeshVertexE", !16, i64 0}
!16 = !{!"_ZTS8RNVArray", !6, i64 0, !12, i64 8, !12, i64 12}
!17 = !{!"_ZTS7RNArrayIP10R3MeshEdgeE", !16, i64 0}
!18 = !{!"_ZTS7RNArrayIP10R3MeshFaceE", !16, i64 0}
!19 = !{!"_ZTS5R3Box", !20, i64 0, !22, i64 8, !22, i64 32}
!20 = !{!"_ZTS7R3Solid", !21, i64 0}
!21 = !{!"_ZTS7R3Shape"}
!22 = !{!"_ZTS7R3Point", !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!14, !6, i64 72}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


; 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.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R3MeshVertex = type { ptr, %class.RNArray.0, %class.R3Point, %class.R3Vector, %class.R2Point, %class.RNRgb, double, i32, %class.RNFlags, double, i32, ptr }
%class.RNArray.0 = type { %class.RNVArray }
%class.R3Vector = type { [3 x double] }
%class.R2Point = type { [2 x double] }
%class.RNRgb = type { [3 x double] }
%class.RNFlags = type { i64 }
%class.R3MeshFace = type { ptr, [3 x ptr], [3 x ptr], %class.R3Plane, %class.R3Box, double, i32, i32, i32, i32, %class.RNFlags, double, i32, ptr }
%class.R3Plane = type { %class.R3Vector, double }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.70 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.136 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [49 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(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 @_Znam(i64 noundef) local_unnamed_addr #1

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

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

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

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

declare void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #5

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

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

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

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

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

declare void @_Z6RNFailPKcz(ptr noundef, ...) local_unnamed_addr #5

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

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

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

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

declare void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6R3Mesh11ReadIfsFileEPKc(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [1024 x i8], align 16
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca [3 x float], align 4
  %7 = alloca %class.R3Point, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.RNArray, align 8
  %10 = alloca [3 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #9
  %11 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.102)
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %12, label %15

12:                                               ; preds = %2
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.70, ptr noundef %1) #10
  br label %223

15:                                               ; preds = %2
  %16 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef nonnull %11, ptr noundef nonnull %3, i32 noundef 1024)
  %17 = icmp slt i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.134, ptr noundef %1)
  br label %223

19:                                               ; preds = %15
  %20 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.135) #11
  %.not113 = icmp eq i32 %20, 0
  br i1 %.not113, label %22, label %21

21:                                               ; preds = %19
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.136, ptr noundef %1)
  br label %223

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %23 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %11)
  %.not114 = icmp eq i64 %23, 1
  br i1 %.not114, label %25, label %24

24:                                               ; preds = %22
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.137, ptr noundef %1)
  br label %222

25:                                               ; preds = %22
  %26 = load float, ptr %4, align 4, !tbaa !9
  %27 = fcmp une float %26, 1.000000e+00
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.138, ptr noundef %1)
  br label %222

29:                                               ; preds = %25
  %30 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef nonnull %11, ptr noundef nonnull %3, i32 noundef 1024)
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.139, ptr noundef %1)
  br label %222

33:                                               ; preds = %29
  %34 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef nonnull %11, ptr noundef nonnull %3, i32 noundef 1024)
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.140, ptr noundef %1)
  br label %222

37:                                               ; preds = %33
  %38 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.141) #11
  %.not115 = icmp eq i32 %38, 0
  br i1 %.not115, label %40, label %39

39:                                               ; preds = %37
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.142, ptr noundef %1)
  br label %222

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %41 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %11)
  %.not116 = icmp eq i64 %41, 1
  br i1 %.not116, label %43, label %42

42:                                               ; preds = %40
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.143, ptr noundef %1)
  br label %220

43:                                               ; preds = %40
  %44 = load i32, ptr %5, align 4, !tbaa !11
  %45 = zext i32 %44 to i64
  %46 = mul nuw nsw i64 %45, 160
  %47 = or disjoint i64 %46, 8
  %48 = call noalias noundef nonnull ptr @_Znam(i64 noundef %47) #12
  store i64 %45, ptr %48, align 16
  %.ptr118 = getelementptr inbounds i8, ptr %48, i64 8
  %49 = icmp eq i32 %44, 0
  br i1 %49, label %.loopexit165.thread, label %52

.loopexit165.thread:                              ; preds = %43
  %50 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %.ptr118, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16) %51, i32 noundef %44)
  br label %.critedge157

52:                                               ; preds = %43
  %53 = getelementptr inbounds %class.R3MeshVertex, ptr %.ptr118, i64 %45
  br label %54

54:                                               ; preds = %55, %52
  %.idx = phi i64 [ 8, %52 ], [ %.add, %55 ]
  %.ptr.ptr = getelementptr inbounds i8, ptr %48, i64 %.idx
  invoke void @_ZN12R3MeshVertexC1Ev(ptr noundef nonnull align 8 dereferenceable(160) %.ptr.ptr)
          to label %55 unwind label %61

55:                                               ; preds = %54
  %.add = add nuw nsw i64 %.idx, 160
  %.ptr117 = getelementptr inbounds i8, ptr %48, i64 %.add
  %56 = icmp eq ptr %.ptr117, %53
  br i1 %56, label %.loopexit165, label %54

.loopexit165:                                     ; preds = %55
  %57 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %.ptr118, ptr %57, align 8, !tbaa !13
  %58 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16) %58, i32 noundef %44)
  br i1 %49, label %.critedge157, label %.lr.ph

.lr.ph:                                           ; preds = %.loopexit165
  %59 = getelementptr inbounds i8, ptr %6, i64 4
  %60 = getelementptr inbounds i8, ptr %6, i64 8
  br label %65

61:                                               ; preds = %54
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = icmp eq i64 %.idx, 8
  br i1 %63, label %.loopexit164, label %.preheader163

.preheader163:                                    ; preds = %61, %.preheader163
  %.idx119 = phi i64 [ %.add120, %.preheader163 ], [ %.idx, %61 ]
  %.add120 = add nsw i64 %.idx119, -160
  %.ptr122 = getelementptr inbounds i8, ptr %48, i64 %.add120
  call void @_ZN12R3MeshVertexD1Ev(ptr noundef nonnull align 8 dereferenceable(160) %.ptr122) #9
  %64 = icmp eq i64 %.add120, 8
  br i1 %64, label %.loopexit164, label %.preheader163

.loopexit164:                                     ; preds = %.preheader163, %61
  call void @_ZdaPvm(ptr noundef nonnull %48, i64 noundef %47) #13
  br label %221

65:                                               ; preds = %.lr.ph, %80
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %80 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #9
  %66 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 4, i64 noundef 3, ptr noundef nonnull %11)
  %.not123 = icmp eq i64 %66, 3
  br i1 %.not123, label %67, label %.critedge

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  %68 = load float, ptr %6, align 4, !tbaa !9
  %69 = fpext float %68 to double
  %70 = load float, ptr %59, align 4, !tbaa !9
  %71 = fpext float %70 to double
  %72 = load float, ptr %60, align 4, !tbaa !9
  %73 = fpext float %72 to double
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %7, double noundef %69, double noundef %71, double noundef %73)
  %74 = load ptr, ptr %57, align 8, !tbaa !13
  %75 = getelementptr inbounds %class.R3MeshVertex, ptr %74, i64 %indvars.iv
  %76 = load ptr, ptr %0, align 8, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %76, i64 32
  %78 = load ptr, ptr %77, align 8
  %79 = call noundef ptr %78(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %75)
  %.not124 = icmp eq ptr %79, null
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br i1 %.not124, label %.critedge, label %80

80:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %45
  br i1 %exitcond.not, label %.critedge157, label %65, !llvm.loop !25

.critedge:                                        ; preds = %67, %65
  %.str.145.sink = phi ptr [ @.str.144, %65 ], [ @.str.145, %67 ]
  %81 = trunc nuw i64 %indvars.iv to i32
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull %.str.145.sink, i32 noundef %81, ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #9
  br label %220

.critedge157:                                     ; preds = %80, %.loopexit165.thread, %.loopexit165
  %82 = phi ptr [ %51, %.loopexit165.thread ], [ %58, %.loopexit165 ], [ %58, %80 ]
  %83 = call noundef i32 @_ZL13ReadIfsStringP8_IO_FILEPci(ptr noundef nonnull %11, ptr noundef nonnull %3, i32 noundef 1024)
  %84 = icmp slt i32 %83, 0
  br i1 %84, label %85, label %86

85:                                               ; preds = %.critedge157
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.140, ptr noundef %1)
  br label %220

86:                                               ; preds = %.critedge157
  %87 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.146) #11
  %.not126 = icmp eq i32 %87, 0
  br i1 %.not126, label %89, label %88

88:                                               ; preds = %86
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.147, ptr noundef %1)
  br label %220

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  %90 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %11)
  %.not127 = icmp eq i64 %90, 1
  br i1 %.not127, label %92, label %91

91:                                               ; preds = %89
  call void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.148, ptr noundef %1)
  br label %218

92:                                               ; preds = %89
  %93 = load i32, ptr %8, align 4, !tbaa !11
  %94 = zext i32 %93 to i64
  %95 = mul nuw nsw i64 %94, 200
  %96 = add nuw nsw i64 %95, 8
  %97 = call noalias noundef nonnull ptr @_Znam(i64 noundef %96) #12
  store i64 %94, ptr %97, align 16
  %.ptr131 = getelementptr inbounds i8, ptr %97, i64 8
  %98 = icmp eq i32 %93, 0
  br i1 %98, label %.loopexit162, label %99

99:                                               ; preds = %92
  %100 = getelementptr inbounds %class.R3MeshFace, ptr %.ptr131, i64 %94
  br label %101

101:                                              ; preds = %102, %99
  %.idx128 = phi i64 [ 8, %99 ], [ %.add129, %102 ]
  %.ptr.ptr136 = getelementptr inbounds i8, ptr %97, i64 %.idx128
  invoke void @_ZN10R3MeshFaceC1Ev(ptr noundef nonnull align 8 dereferenceable(200) %.ptr.ptr136)
          to label %102 unwind label %109

102:                                              ; preds = %101
  %.add129 = add nuw nsw i64 %.idx128, 200
  %.ptr130 = getelementptr inbounds i8, ptr %97, i64 %.add129
  %103 = icmp eq ptr %.ptr130, %100
  br i1 %103, label %.loopexit162, label %101

.loopexit162:                                     ; preds = %102, %92
  %104 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %.ptr131, ptr %104, align 8, !tbaa !27
  %105 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZN8RNVArray6ResizeEi(ptr noundef nonnull align 8 dereferenceable(16) %105, i32 noundef %93)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  call void @_ZN7RNArrayIP12R3MeshVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  br i1 %98, label %.critedge160.preheader, label %.lr.ph178

.lr.ph178:                                        ; preds = %.loopexit162
  %106 = getelementptr inbounds i8, ptr %10, i64 4
  %107 = getelementptr inbounds i8, ptr %10, i64 8
  br label %113

.critedge160.preheader:                           ; preds = %155, %.loopexit162
  %108 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %.not144179 = icmp slt i32 %108, 3
  br i1 %.not144179, label %.critedge160._crit_edge, label %.lr.ph181

109:                                              ; preds = %101
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = icmp eq i64 %.idx128, 8
  br i1 %111, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %109, %.preheader
  %.idx132 = phi i64 [ %.add133, %.preheader ], [ %.idx128, %109 ]
  %.add133 = add nsw i64 %.idx132, -200
  %.ptr135 = getelementptr inbounds i8, ptr %97, i64 %.add133
  call void @_ZN10R3MeshFaceD1Ev(ptr noundef nonnull align 8 dereferenceable(200) %.ptr135) #9
  %112 = icmp eq i64 %.add133, 8
  br i1 %112, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %109
  call void @_ZdaPvm(ptr noundef nonnull %97, i64 noundef %96) #13
  br label %219

113:                                              ; preds = %.lr.ph178, %155
  %indvars.iv191 = phi i64 [ 0, %.lr.ph178 ], [ %indvars.iv.next192, %155 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #9
  %114 = call i64 @fread(ptr noundef nonnull %10, i64 noundef 4, i64 noundef 3, ptr noundef nonnull %11)
  %.not137 = icmp eq i64 %114, 3
  br i1 %.not137, label %119, label %115

115:                                              ; preds = %113
  %116 = trunc nuw i64 %indvars.iv191 to i32
  invoke void (ptr, ...) @_Z6RNFailPKcz(ptr noundef nonnull @.str.149, i32 noundef %116, ptr noundef %1)
          to label %157 unwind label %117

117:                                              ; preds = %115
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %156

119:                                              ; preds = %113
  %120 = load i32, ptr %10, align 4, !tbaa !11
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP12R3MeshVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %82, i32 noundef %120)
          to label %122 unwind label %135

122:                                              ; preds = %119
  %123 = load ptr, ptr %121, align 8, !tbaa !5
  %124 = load i32, ptr %106, align 4, !tbaa !11
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP12R3MeshVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %82, i32 noundef %124)
          to label %126 unwind label %137

126:                                              ; preds = %122
  %127 = load ptr, ptr %125, align 8, !tbaa !5
  %128 = load i32, ptr %107, align 4, !tbaa !11
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP12R3MeshVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %82, i32 noundef %128)
          to label %130 unwind label %139

130:                                              ; preds = %126
  %131 = load ptr, ptr %129, align 8, !tbaa !5
  %132 = icmp eq ptr %123, %127
  %133 = icmp eq ptr %127, %131
  %or.cond = select i1 %132, i1 true, i1 %133
  %134 = icmp eq ptr %123, %131
  %or.cond158 = select i1 %or.cond, i1 true, i1 %134
  br i1 %or.cond158, label %155, label %141

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

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

139:                                              ; preds = %153, %151, %149, %141, %126
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %156

141:                                              ; preds = %130
  %142 = load ptr, ptr %104, align 8, !tbaa !27
  %143 = getelementptr inbounds %class.R3MeshFace, ptr %142, i64 %indvars.iv191
  %144 = load ptr, ptr %0, align 8, !tbaa !23
  %145 = getelementptr inbounds i8, ptr %144, i64 72
  %146 = load ptr, ptr %145, align 8
  %147 = invoke noundef ptr %146(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %123, ptr noundef %127, ptr noundef %131, ptr noundef %143)
          to label %148 unwind label %139

148:                                              ; preds = %141
  %.not138 = icmp eq ptr %147, null
  br i1 %.not138, label %149, label %155

149:                                              ; preds = %148
  %150 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %123)
          to label %151 unwind label %139

151:                                              ; preds = %149
  %152 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %127)
          to label %153 unwind label %139

153:                                              ; preds = %151
  %154 = invoke noundef ptr @_ZN7RNArrayIP12R3MeshVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %131)
          to label %155 unwind label %139

155:                                              ; preds = %130, %153, %148
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #9
  %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1
  %exitcond195.not = icmp eq i64 %indvars.iv.next192, %94
  br i1 %exitcond195.not, label %.critedge160.preheader, label %113, !llvm.loop !28

156:                                              ; preds = %135, %139, %137, %117
  %.pn141 = phi { ptr, i32 } [ %118, %117 ], [ %136, %135 ], [ %140, %139 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #9
  br label %217

157:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #9
  br label %216

.critedge160._crit_edge:                          ; preds = %.critedge160, %.critedge160.preheader
  %158 = call i32 @fclose(ptr noundef nonnull %11)
  br label %216

.lr.ph181:                                        ; preds = %.critedge160.preheader, %.critedge160
  %.0102180 = phi i32 [ %213, %.critedge160 ], [ 0, %.critedge160.preheader ]
  %159 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %.0102180)
          to label %160 unwind label %201

160:                                              ; preds = %.lr.ph181
  %161 = add nuw nsw i32 %.0102180, 1
  %162 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %161)
          to label %163 unwind label %203

163:                                              ; preds = %160
  %164 = add nuw nsw i32 %.0102180, 2
  %165 = invoke noundef ptr @_ZNK7RNArrayIP12R3MeshVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %164)
          to label %166 unwind label %205

166:                                              ; preds = %163
  %167 = load ptr, ptr %0, align 8, !tbaa !23
  %168 = getelementptr inbounds i8, ptr %167, i64 72
  %169 = load ptr, ptr %168, align 8
  %170 = invoke noundef ptr %169(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %159, ptr noundef %162, ptr noundef %165, ptr noundef null)
          to label %171 unwind label %205

171:                                              ; preds = %166
  %.not145 = icmp eq ptr %170, null
  br i1 %.not145, label %172, label %.critedge160

172:                                              ; preds = %171
  %173 = load ptr, ptr %0, align 8, !tbaa !23
  %174 = getelementptr inbounds i8, ptr %173, i64 72
  %175 = load ptr, ptr %174, align 8
  %176 = invoke noundef ptr %175(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %159, ptr noundef %165, ptr noundef %162, ptr noundef null)
          to label %177 unwind label %205

177:                                              ; preds = %172
  %.not146 = icmp eq ptr %176, null
  br i1 %.not146, label %178, label %.critedge160

178:                                              ; preds = %177
  %179 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %159)
  %180 = load ptr, ptr %0, align 8, !tbaa !23
  %181 = getelementptr inbounds i8, ptr %180, i64 32
  %182 = load ptr, ptr %181, align 8
  %183 = invoke noundef ptr %182(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(24) %179, ptr noundef null)
          to label %184 unwind label %207

184:                                              ; preds = %178
  %185 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %162)
  %186 = load ptr, ptr %0, align 8, !tbaa !23
  %187 = getelementptr inbounds i8, ptr %186, i64 32
  %188 = load ptr, ptr %187, align 8
  %189 = invoke noundef ptr %188(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(24) %185, ptr noundef null)
          to label %190 unwind label %209

190:                                              ; preds = %184
  %191 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %165)
  %192 = load ptr, ptr %0, align 8, !tbaa !23
  %193 = getelementptr inbounds i8, ptr %192, i64 32
  %194 = load ptr, ptr %193, align 8
  %195 = invoke noundef ptr %194(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef null)
          to label %196 unwind label %211

196:                                              ; preds = %190
  %197 = load ptr, ptr %0, align 8, !tbaa !23
  %198 = getelementptr inbounds i8, ptr %197, i64 72
  %199 = load ptr, ptr %198, align 8
  %200 = invoke noundef ptr %199(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %183, ptr noundef %189, ptr noundef %195, ptr noundef null)
          to label %.critedge160 unwind label %211

201:                                              ; preds = %.lr.ph181
  %202 = landingpad { ptr, i32 }
          cleanup
  br label %217

203:                                              ; preds = %160
  %204 = landingpad { ptr, i32 }
          cleanup
  br label %217

205:                                              ; preds = %172, %166, %163
  %206 = landingpad { ptr, i32 }
          cleanup
  br label %217

207:                                              ; preds = %178
  %208 = landingpad { ptr, i32 }
          cleanup
  br label %217

209:                                              ; preds = %184
  %210 = landingpad { ptr, i32 }
          cleanup
  br label %217

211:                                              ; preds = %196, %190
  %212 = landingpad { ptr, i32 }
          cleanup
  br label %217

.critedge160:                                     ; preds = %196, %177, %171
  %213 = add nuw nsw i32 %.0102180, 3
  %214 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %215 = add nsw i32 %214, -3
  %.not144 = icmp sgt i32 %213, %215
  br i1 %.not144, label %.critedge160._crit_edge, label %.lr.ph181, !llvm.loop !29

216:                                              ; preds = %157, %.critedge160._crit_edge
  %.6 = phi i32 [ 1, %.critedge160._crit_edge ], [ 0, %157 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br label %218

217:                                              ; preds = %201, %205, %209, %211, %207, %203, %156
  %.pn147.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn141, %156 ], [ %202, %201 ], [ %204, %203 ], [ %206, %205 ], [ %208, %207 ], [ %212, %211 ], [ %210, %209 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br label %219

218:                                              ; preds = %216, %91
  %.7 = phi i32 [ 0, %91 ], [ %.6, %216 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  br label %220

219:                                              ; preds = %217, %.loopexit
  %.pn147.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn147.pn.pn.pn.pn.pn, %217 ], [ %110, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  br label %221

220:                                              ; preds = %.critedge, %218, %88, %85, %42
  %.8 = phi i32 [ 0, %42 ], [ 0, %85 ], [ 0, %88 ], [ %.7, %218 ], [ 0, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  br label %222

221:                                              ; preds = %219, %.loopexit164
  %.pn147.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn147.pn.pn.pn.pn.pn.pn, %219 ], [ %62, %.loopexit164 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn147.pn.pn.pn.pn.pn.pn.pn

222:                                              ; preds = %220, %39, %36, %32, %28, %24
  %.9 = phi i32 [ 0, %24 ], [ 0, %28 ], [ 0, %32 ], [ 0, %36 ], [ 0, %39 ], [ %.8, %220 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br label %223

223:                                              ; preds = %222, %21, %18, %12
  %.10 = phi i32 [ 0, %18 ], [ 0, %21 ], [ %.9, %222 ], [ 0, %12 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #9
  ret i32 %.10
}

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

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6

declare void @_ZN12R3MeshVertexC1Ev(ptr) local_unnamed_addr

declare void @_ZN12R3MeshVertexD1Ev(ptr) local_unnamed_addr

declare void @_ZN10R3MeshFaceC1Ev(ptr) local_unnamed_addr

declare void @_ZN10R3MeshFaceD1Ev(ptr) local_unnamed_addr

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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #7 = { 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 #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 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 56}
!14 = !{!"_ZTS6R3Mesh", !15, i64 8, !17, i64 24, !18, i64 40, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !19, i64 208, !6, i64 264}
!15 = !{!"_ZTS7RNArrayIP12R3MeshVertexE", !16, i64 0}
!16 = !{!"_ZTS8RNVArray", !6, i64 0, !12, i64 8, !12, i64 12}
!17 = !{!"_ZTS7RNArrayIP10R3MeshEdgeE", !16, i64 0}
!18 = !{!"_ZTS7RNArrayIP10R3MeshFaceE", !16, i64 0}
!19 = !{!"_ZTS5R3Box", !20, i64 0, !22, i64 8, !22, i64 32}
!20 = !{!"_ZTS7R3Solid", !21, i64 0}
!21 = !{!"_ZTS7R3Shape"}
!22 = !{!"_ZTS7R3Point", !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!14, !6, i64 72}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


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