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

; 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"

%struct.R3MeshPropertySet = type { ptr, %class.RNArray }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }

@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17R3MeshPropertySet6InsertEP14R3MeshProperty(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17R3MeshPropertySet11ReadTorontoEPKc(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [1024 x i8], align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca [1024 x i8], align 16
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %7) #10
  %33 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call ptr @strcpy(ptr noundef %33, ptr noundef %34) #10
  %36 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  %37 = call noundef ptr @strrchr(ptr noundef %36, i32 noundef 47) #11
  store ptr %37, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %43

40:                                               ; preds = %2
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i32 1
  store ptr %42, ptr %6, align 8, !tbaa !5
  br label %45

43:                                               ; preds = %2
  %44 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  store ptr %44, ptr %6, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %43, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call noundef ptr @strrchr(ptr noundef %46, i32 noundef 46) #11
  store ptr %47, ptr %8, align 8, !tbaa !5
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %52

50:                                               ; preds = %45
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  store i8 0, ptr %51, align 1, !tbaa !9
  br label %52

52:                                               ; preds = %50, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = call noalias ptr @fopen(ptr noundef %53, ptr noundef @.str.4)
  store ptr %54, ptr %9, align 8, !tbaa !5
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %61, label %57

57:                                               ; preds = %52
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.13, ptr noundef %59) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %255

61:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %62, ptr noundef @.str.14, ptr noundef %11, ptr noundef %12, ptr noundef %13)
  %64 = icmp ne i32 %63, 3
  br i1 %64, label %65, label %69

65:                                               ; preds = %61
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.15, ptr noundef %67) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %254

69:                                               ; preds = %61
  %70 = load i32, ptr %11, align 4, !tbaa !10
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %81, label %72

72:                                               ; preds = %69
  %73 = load i32, ptr %12, align 4, !tbaa !10
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %81, label %75

75:                                               ; preds = %72
  %76 = load i32, ptr %12, align 4, !tbaa !10
  %77 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !12
  %79 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %78)
  %80 = icmp ne i32 %76, %79
  br i1 %80, label %81, label %85

81:                                               ; preds = %75, %72, %69
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.16, ptr noundef %83) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %254

85:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %86 = load i32, ptr %11, align 4, !tbaa !10
  %87 = load i32, ptr %12, align 4, !tbaa !10
  %88 = mul nsw i32 %86, %87
  %89 = sext i32 %88 to i64
  %90 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %89, i64 8)
  %91 = extractvalue { i64, i1 } %90, 1
  %92 = extractvalue { i64, i1 } %90, 0
  %93 = select i1 %91, i64 -1, i64 %92
  %94 = call noalias noundef nonnull ptr @_Znam(i64 noundef %93) #12
  store ptr %94, ptr %14, align 8, !tbaa !5
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %101, label %97

97:                                               ; preds = %85
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.17, ptr noundef %99) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %253

101:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  store i32 0, ptr %15, align 4, !tbaa !10
  br label %102

102:                                              ; preds = %138, %101
  %103 = load i32, ptr %15, align 4, !tbaa !10
  %104 = load i32, ptr %12, align 4, !tbaa !10
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 2, ptr %10, align 4
  br label %141

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  store i32 0, ptr %16, align 4, !tbaa !10
  br label %108

108:                                              ; preds = %132, %107
  %109 = load i32, ptr %16, align 4, !tbaa !10
  %110 = load i32, ptr %11, align 4, !tbaa !10
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 5, ptr %10, align 4
  br label %135

113:                                              ; preds = %108
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = load i32, ptr %16, align 4, !tbaa !10
  %117 = load i32, ptr %12, align 4, !tbaa !10
  %118 = mul nsw i32 %116, %117
  %119 = load i32, ptr %15, align 4, !tbaa !10
  %120 = add nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %115, i64 %121
  %123 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %114, ptr noundef @.str.11, ptr noundef %122)
  %124 = icmp ne i32 %123, 1
  br i1 %124, label %125, label %131

125:                                              ; preds = %113
  %126 = load ptr, ptr @stderr, align 8, !tbaa !5
  %127 = load i32, ptr %16, align 4, !tbaa !10
  %128 = load i32, ptr %15, align 4, !tbaa !10
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.18, i32 noundef %127, i32 noundef %128, ptr noundef %129) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %135

131:                                              ; preds = %113
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %16, align 4, !tbaa !10
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %16, align 4, !tbaa !10
  br label %108, !llvm.loop !16

135:                                              ; preds = %125, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  %136 = load i32, ptr %10, align 4
  switch i32 %136, label %141 [
    i32 5, label %137
  ]

137:                                              ; preds = %135
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %15, align 4, !tbaa !10
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %15, align 4, !tbaa !10
  br label %102, !llvm.loop !18

141:                                              ; preds = %135, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  %142 = load i32, ptr %10, align 4
  switch i32 %142, label %253 [
    i32 2, label %143
  ]

143:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  store i32 0, ptr %17, align 4, !tbaa !10
  br label %144

144:                                              ; preds = %243, %143
  %145 = load i32, ptr %17, align 4, !tbaa !10
  %146 = load i32, ptr %11, align 4, !tbaa !10
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  br label %246

149:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 1024, ptr %18) #10
  %150 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = load i32, ptr %17, align 4, !tbaa !10
  %153 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %150, ptr noundef @.str.19, ptr noundef %151, i32 noundef %152) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %154 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1096) #12
  %155 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !12
  %157 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  invoke void @_ZN14R3MeshPropertyC1EP6R3MeshPKcPKd(ptr noundef nonnull align 8 dereferenceable(1096) %154, ptr noundef %156, ptr noundef %157, ptr noundef null)
          to label %158 unwind label %166

158:                                              ; preds = %149
  store ptr %154, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !10
  br label %159

159:                                              ; preds = %238, %158
  %160 = load i32, ptr %22, align 4, !tbaa !10
  %161 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !12
  %163 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %162)
  %164 = icmp slt i32 %160, %163
  br i1 %164, label %170, label %165

165:                                              ; preds = %159
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %241

166:                                              ; preds = %149
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %20, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %21, align 4
  call void @_ZdlPvm(ptr noundef %154, i64 noundef 1096) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  br label %257

170:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %171 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !12
  %173 = load i32, ptr %22, align 4, !tbaa !10
  %174 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %172, i32 noundef %173)
  store ptr %174, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  store double 0.000000e+00, ptr %24, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  store double 0.000000e+00, ptr %25, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  store i32 0, ptr %26, align 4, !tbaa !10
  br label %175

175:                                              ; preds = %225, %170
  %176 = load i32, ptr %26, align 4, !tbaa !10
  %177 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !12
  %179 = load ptr, ptr %23, align 8, !tbaa !5
  %180 = call noundef i32 @_ZNK6R3Mesh13VertexValenceEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %178, ptr noundef %179)
  %181 = icmp slt i32 %176, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %175
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  br label %228

183:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %184 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !12
  %186 = load ptr, ptr %23, align 8, !tbaa !5
  %187 = load i32, ptr %26, align 4, !tbaa !10
  %188 = call noundef ptr @_ZNK6R3Mesh12EdgeOnVertexEPK12R3MeshVertexi(ptr noundef nonnull align 8 dereferenceable(272) %185, ptr noundef %186, i32 noundef %187)
  store ptr %188, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %189 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !12
  %191 = load ptr, ptr %23, align 8, !tbaa !5
  %192 = load ptr, ptr %27, align 8, !tbaa !5
  %193 = call noundef ptr @_ZNK6R3Mesh12FaceOnVertexEPK12R3MeshVertexPK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %190, ptr noundef %191, ptr noundef %192, i32 noundef 0)
  store ptr %193, ptr %28, align 8, !tbaa !5
  %194 = load ptr, ptr %28, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %197, label %196

196:                                              ; preds = %183
  store i32 16, ptr %10, align 4
  br label %222

197:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %198 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !12
  %200 = load ptr, ptr %28, align 8, !tbaa !5
  %201 = call noundef i32 @_ZNK6R3Mesh6FaceIDEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %199, ptr noundef %200)
  store i32 %201, ptr %29, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %202 = load ptr, ptr %14, align 8, !tbaa !5
  %203 = load i32, ptr %17, align 4, !tbaa !10
  %204 = load i32, ptr %12, align 4, !tbaa !10
  %205 = mul nsw i32 %203, %204
  %206 = load i32, ptr %29, align 4, !tbaa !10
  %207 = add nsw i32 %205, %206
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds double, ptr %202, i64 %208
  %210 = load double, ptr %209, align 8, !tbaa !19
  store double %210, ptr %30, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %211 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %32, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8, !tbaa !12
  %213 = load ptr, ptr %28, align 8, !tbaa !5
  %214 = call noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %212, ptr noundef %213)
  store double %214, ptr %31, align 8, !tbaa !19
  %215 = load double, ptr %31, align 8, !tbaa !19
  %216 = load double, ptr %30, align 8, !tbaa !19
  %217 = load double, ptr %24, align 8, !tbaa !19
  %218 = call double @llvm.fmuladd.f64(double %215, double %216, double %217)
  store double %218, ptr %24, align 8, !tbaa !19
  %219 = load double, ptr %31, align 8, !tbaa !19
  %220 = load double, ptr %25, align 8, !tbaa !19
  %221 = fadd double %220, %219
  store double %221, ptr %25, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  store i32 0, ptr %10, align 4
  br label %222

222:                                              ; preds = %197, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  %223 = load i32, ptr %10, align 4
  switch i32 %223, label %262 [
    i32 0, label %224
    i32 16, label %225
  ]

224:                                              ; preds = %222
  br label %225

225:                                              ; preds = %224, %222
  %226 = load i32, ptr %26, align 4, !tbaa !10
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %26, align 4, !tbaa !10
  br label %175, !llvm.loop !21

228:                                              ; preds = %182
  %229 = load double, ptr %25, align 8, !tbaa !19
  %230 = fcmp ogt double %229, 0.000000e+00
  br i1 %230, label %231, label %237

231:                                              ; preds = %228
  %232 = load ptr, ptr %19, align 8, !tbaa !5
  %233 = load i32, ptr %22, align 4, !tbaa !10
  %234 = load double, ptr %24, align 8, !tbaa !19
  %235 = load double, ptr %25, align 8, !tbaa !19
  %236 = fdiv double %234, %235
  call void @_ZN14R3MeshProperty14SetVertexValueEid(ptr noundef nonnull align 8 dereferenceable(1096) %232, i32 noundef %233, double noundef %236)
  br label %237

237:                                              ; preds = %231, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %22, align 4, !tbaa !10
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %22, align 4, !tbaa !10
  br label %159, !llvm.loop !22

241:                                              ; preds = %165
  %242 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN17R3MeshPropertySet6InsertEP14R3MeshProperty(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef %242)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr %18) #10
  br label %243

243:                                              ; preds = %241
  %244 = load i32, ptr %17, align 4, !tbaa !10
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %17, align 4, !tbaa !10
  br label %144, !llvm.loop !23

246:                                              ; preds = %148
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = call i32 @fclose(ptr noundef %247)
  %249 = load ptr, ptr %14, align 8, !tbaa !5
  %250 = icmp eq ptr %249, null
  br i1 %250, label %252, label %251

251:                                              ; preds = %246
  call void @_ZdaPv(ptr noundef %249) #13
  br label %252

252:                                              ; preds = %251, %246
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %253

253:                                              ; preds = %252, %141, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %254

254:                                              ; preds = %253, %81, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %255

255:                                              ; preds = %254, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  %256 = load i32, ptr %3, align 4
  ret i32 %256

257:                                              ; preds = %166
  %258 = load ptr, ptr %20, align 8
  %259 = load i32, ptr %21, align 4
  %260 = insertvalue { ptr, i32 } poison, ptr %258, 0
  %261 = insertvalue { ptr, i32 } %260, i32 %259, 1
  resume { ptr, i32 } %261

262:                                              ; preds = %222
  unreachable
}

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

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

declare void @_ZN14R3MeshPropertyC1EP6R3MeshPKcPKd(ptr noundef nonnull align 8 dereferenceable(1096), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #4

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

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

declare void @_ZN14R3MeshProperty14SetVertexValueEid(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef, double noundef) #4

declare i32 @fclose(ptr noundef) #4

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #4

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #9 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #8

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { 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 #4 = { "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 = { 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 #6 = { 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 #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 #10 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS17R3MeshPropertySet", !6, i64 0, !14, i64 8}
!14 = !{!"_ZTS7RNArrayIP14R3MeshPropertyE", !15, i64 0}
!15 = !{!"_ZTS8RNVArray", !6, i64 0, !11, i64 8, !11, i64 12}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}


; 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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17R3MeshPropertySet6InsertEP14R3MeshProperty(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17R3MeshPropertySet11ReadTorontoEPKc(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [1024 x i8], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #11
  %8 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %1) #11
  %9 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) %3, i32 noundef 47) #12
  %.not = icmp eq ptr %9, null
  %10 = getelementptr inbounds i8, ptr %9, i64 1
  %.065 = select i1 %.not, ptr %3, ptr %10
  %11 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.065, i32 noundef 46) #12
  %.not82 = icmp eq ptr %11, null
  br i1 %.not82, label %13, label %12

12:                                               ; preds = %2
  store i8 0, ptr %11, align 1, !tbaa !5
  br label %13

13:                                               ; preds = %12, %2
  %14 = call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.4)
  %.not83 = icmp eq ptr %14, null
  br i1 %.not83, label %15, label %18

15:                                               ; preds = %13
  %16 = load ptr, ptr @stderr, align 8, !tbaa !8
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.13, ptr noundef %1) #13
  br label %110

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #11
  %19 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %14, ptr noundef nonnull @.str.14, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %.not84 = icmp eq i32 %19, 3
  br i1 %.not84, label %23, label %20

20:                                               ; preds = %18
  %21 = load ptr, ptr @stderr, align 8, !tbaa !8
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.15, ptr noundef %1) #13
  br label %109

23:                                               ; preds = %18
  %24 = load i32, ptr %4, align 4, !tbaa !10
  %25 = icmp eq i32 %24, 0
  %26 = load i32, ptr %5, align 4
  %27 = icmp eq i32 %26, 0
  %or.cond = select i1 %25, i1 true, i1 %27
  br i1 %or.cond, label %31, label %28

28:                                               ; preds = %23
  %29 = load ptr, ptr %0, align 8, !tbaa !12
  %30 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %29)
  %.not85 = icmp eq i32 %26, %30
  br i1 %.not85, label %34, label %31

31:                                               ; preds = %28, %23
  %32 = load ptr, ptr @stderr, align 8, !tbaa !8
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.16, ptr noundef %1) #13
  br label %109

34:                                               ; preds = %28
  %35 = load i32, ptr %4, align 4, !tbaa !10
  %36 = load i32, ptr %5, align 4, !tbaa !10
  %37 = mul nsw i32 %36, %35
  %38 = sext i32 %37 to i64
  %39 = icmp slt i32 %37, 0
  %40 = shl nsw i64 %38, 3
  %41 = select i1 %39, i64 -1, i64 %40
  %42 = call noalias noundef nonnull ptr @_Znam(i64 noundef %41) #14
  %.not8897 = icmp sgt i32 %36, 0
  br i1 %.not8897, label %.preheader92.lr.ph, label %.critedge91

.preheader92.lr.ph:                               ; preds = %34
  %43 = icmp sgt i32 %35, 0
  br i1 %43, label %.preheader92, label %._crit_edge109

.preheader92:                                     ; preds = %.preheader92.lr.ph, %.critedge
  %44 = phi i32 [ %55, %.critedge ], [ %36, %.preheader92.lr.ph ]
  %45 = phi i32 [ %56, %.critedge ], [ %35, %.preheader92.lr.ph ]
  %.06898 = phi i32 [ %57, %.critedge ], [ 0, %.preheader92.lr.ph ]
  %.not8795 = icmp sgt i32 %45, 0
  br i1 %.not8795, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.preheader92, %52
  %.06996 = phi i32 [ %53, %52 ], [ 0, %.preheader92 ]
  %46 = load i32, ptr %5, align 4, !tbaa !10
  %47 = mul nsw i32 %46, %.06996
  %48 = add nsw i32 %47, %.06898
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %42, i64 %49
  %51 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %14, ptr noundef nonnull @.str.11, ptr noundef nonnull %50)
  %.not86 = icmp eq i32 %51, 1
  br i1 %.not86, label %52, label %58

52:                                               ; preds = %.lr.ph
  %53 = add nuw nsw i32 %.06996, 1
  %54 = load i32, ptr %4, align 4, !tbaa !10
  %.not87 = icmp slt i32 %53, %54
  br i1 %.not87, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !16

.critedge.loopexit:                               ; preds = %52
  %.pre = load i32, ptr %5, align 4, !tbaa !10
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.preheader92
  %55 = phi i32 [ %.pre, %.critedge.loopexit ], [ %44, %.preheader92 ]
  %56 = phi i32 [ %54, %.critedge.loopexit ], [ %45, %.preheader92 ]
  %57 = add nuw nsw i32 %.06898, 1
  %.not88 = icmp slt i32 %57, %55
  br i1 %.not88, label %.preheader92, label %.critedge91, !llvm.loop !18

58:                                               ; preds = %.lr.ph
  %59 = load ptr, ptr @stderr, align 8, !tbaa !8
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.18, i32 noundef %.06996, i32 noundef %.06898, ptr noundef %1) #13
  br label %109

.critedge91:                                      ; preds = %.critedge, %34
  %61 = phi i32 [ %35, %34 ], [ %56, %.critedge ]
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.lr.ph108, label %._crit_edge109

._crit_edge109:                                   ; preds = %._crit_edge106, %.preheader92.lr.ph, %.critedge91
  %63 = call i32 @fclose(ptr noundef nonnull %14)
  call void @_ZdaPv(ptr noundef nonnull %42) #15
  br label %109

.lr.ph108:                                        ; preds = %.critedge91, %._crit_edge106
  %.075107 = phi i32 [ %70, %._crit_edge106 ], [ 0, %.critedge91 ]
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %7) #11
  %64 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef nonnull %.065, i32 noundef %.075107) #11
  %65 = call noalias noundef nonnull dereferenceable(1096) ptr @_Znwm(i64 noundef 1096) #14
  %66 = load ptr, ptr %0, align 8, !tbaa !12
  invoke void @_ZN14R3MeshPropertyC1EP6R3MeshPKcPKd(ptr noundef nonnull align 8 dereferenceable(1096) %65, ptr noundef %66, ptr noundef nonnull %7, ptr noundef null)
          to label %.preheader unwind label %73

.preheader:                                       ; preds = %.lr.ph108
  %67 = load ptr, ptr %0, align 8, !tbaa !12
  %68 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %67)
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph105, label %._crit_edge106

._crit_edge106:                                   ; preds = %._crit_edge.thread, %.preheader
  call void @_ZN17R3MeshPropertySet6InsertEP14R3MeshProperty(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull %65)
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #11
  %70 = add nuw nsw i32 %.075107, 1
  %71 = load i32, ptr %4, align 4, !tbaa !10
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %.lr.ph108, label %._crit_edge109, !llvm.loop !20

73:                                               ; preds = %.lr.ph108
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %65, i64 noundef 1096) #15
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #11
  resume { ptr, i32 } %74

.lr.ph105:                                        ; preds = %.preheader, %._crit_edge.thread
  %.076104 = phi i32 [ %105, %._crit_edge.thread ], [ 0, %.preheader ]
  %75 = load ptr, ptr %0, align 8, !tbaa !12
  %76 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %75, i32 noundef %.076104)
  %77 = load ptr, ptr %0, align 8, !tbaa !12
  %78 = call noundef i32 @_ZNK6R3Mesh13VertexValenceEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %77, ptr noundef %76)
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %.lr.ph102, label %._crit_edge.thread

._crit_edge:                                      ; preds = %98
  %80 = fcmp ogt double %.172, 0.000000e+00
  br i1 %80, label %103, label %._crit_edge.thread

.lr.ph102:                                        ; preds = %.lr.ph105, %98
  %.070101 = phi i32 [ %99, %98 ], [ 0, %.lr.ph105 ]
  %.071100 = phi double [ %.172, %98 ], [ 0.000000e+00, %.lr.ph105 ]
  %.07399 = phi double [ %.174, %98 ], [ 0.000000e+00, %.lr.ph105 ]
  %81 = load ptr, ptr %0, align 8, !tbaa !12
  %82 = call noundef ptr @_ZNK6R3Mesh12EdgeOnVertexEPK12R3MeshVertexi(ptr noundef nonnull align 8 dereferenceable(272) %81, ptr noundef %76, i32 noundef %.070101)
  %83 = load ptr, ptr %0, align 8, !tbaa !12
  %84 = call noundef ptr @_ZNK6R3Mesh12FaceOnVertexEPK12R3MeshVertexPK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %83, ptr noundef %76, ptr noundef %82, i32 noundef 0)
  %.not89 = icmp eq ptr %84, null
  br i1 %.not89, label %98, label %85

85:                                               ; preds = %.lr.ph102
  %86 = load ptr, ptr %0, align 8, !tbaa !12
  %87 = call noundef i32 @_ZNK6R3Mesh6FaceIDEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %86, ptr noundef nonnull %84)
  %88 = load i32, ptr %5, align 4, !tbaa !10
  %89 = mul nsw i32 %88, %.075107
  %90 = add nsw i32 %89, %87
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %42, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !21
  %94 = load ptr, ptr %0, align 8, !tbaa !12
  %95 = call noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %94, ptr noundef nonnull %84)
  %96 = call double @llvm.fmuladd.f64(double %95, double %93, double %.07399)
  %97 = fadd double %.071100, %95
  br label %98

98:                                               ; preds = %.lr.ph102, %85
  %.174 = phi double [ %96, %85 ], [ %.07399, %.lr.ph102 ]
  %.172 = phi double [ %97, %85 ], [ %.071100, %.lr.ph102 ]
  %99 = add nuw nsw i32 %.070101, 1
  %100 = load ptr, ptr %0, align 8, !tbaa !12
  %101 = call noundef i32 @_ZNK6R3Mesh13VertexValenceEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %100, ptr noundef %76)
  %102 = icmp slt i32 %99, %101
  br i1 %102, label %.lr.ph102, label %._crit_edge, !llvm.loop !23

103:                                              ; preds = %._crit_edge
  %104 = fdiv double %.174, %.172
  call void @_ZN14R3MeshProperty14SetVertexValueEid(ptr noundef nonnull align 8 dereferenceable(1096) %65, i32 noundef %.076104, double noundef %104)
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph105, %103, %._crit_edge
  %105 = add nuw nsw i32 %.076104, 1
  %106 = load ptr, ptr %0, align 8, !tbaa !12
  %107 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %106)
  %108 = icmp slt i32 %105, %107
  br i1 %108, label %.lr.ph105, label %._crit_edge106, !llvm.loop !24

109:                                              ; preds = %58, %._crit_edge109, %31, %20
  %.4 = phi i32 [ 0, %20 ], [ 0, %31 ], [ 1, %._crit_edge109 ], [ 0, %58 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #11
  br label %110

110:                                              ; preds = %109, %15
  %.5 = phi i32 [ %.4, %109 ], [ 0, %15 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #11
  ret i32 %.5
}

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

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

declare void @_ZN14R3MeshPropertyC1EP6R3MeshPKcPKd(ptr noundef nonnull align 8 dereferenceable(1096), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #5

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

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

declare void @_ZN14R3MeshProperty14SetVertexValueEid(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef, double noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #8

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #5

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #9 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #10

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #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 = { 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 #7 = { 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 #8 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { 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 #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { cold nounwind }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !9, i64 0}
!13 = !{!"_ZTS17R3MeshPropertySet", !9, i64 0, !14, i64 8}
!14 = !{!"_ZTS7RNArrayIP14R3MeshPropertyE", !15, i64 0}
!15 = !{!"_ZTS8RNVArray", !9, i64 0, !11, i64 8, !11, i64 12}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17, !19}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = distinct !{!20, !17}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !6, i64 0}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}


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