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

; 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.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK17R3MeshPropertySet11NPropertiesEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17R3MeshPropertySet8ReadARFFEPKc(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) #3 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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [32768 x i8], align 16
  %11 = alloca [1024 x i8], align 16
  %12 = alloca [1024 x i8], align 16
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noalias ptr @fopen(ptr noundef %22, ptr noundef @.str.4)
  store ptr %23, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %30, label %26

26:                                               ; preds = %2
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.5, ptr noundef %28) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %171

30:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 32768, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32768, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %12) #9
  br label %31

31:                                               ; preds = %71, %30
  %32 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call ptr @fgets(ptr noundef %32, i32 noundef 32768, ptr noundef %33)
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %72

36:                                               ; preds = %31
  %37 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %38 = call noundef ptr @strstr(ptr noundef %37, ptr noundef @.str.6) #10
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %36
  br label %72

41:                                               ; preds = %36
  %42 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %43 = call noundef ptr @strstr(ptr noundef %42, ptr noundef @.str.7) #10
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %70

45:                                               ; preds = %41
  %46 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %47 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %48 = getelementptr inbounds [1024 x i8], ptr %12, i64 0, i64 0
  %49 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %46, ptr noundef @.str.8, ptr noundef %47, ptr noundef %48) #9
  %50 = icmp eq i32 %49, 2
  br i1 %50, label %51, label %69

51:                                               ; preds = %45
  %52 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %53 = call i32 @strcmp(ptr noundef %52, ptr noundef @.str.7) #10
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %68, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %56 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1096) #11
  %57 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %21, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds [1024 x i8], ptr %12, i64 0, i64 0
  invoke void @_ZN14R3MeshPropertyC1EP6R3MeshPKcPKd(ptr noundef nonnull align 8 dereferenceable(1096) %56, ptr noundef %58, ptr noundef %59, ptr noundef null)
          to label %60 unwind label %64

60:                                               ; preds = %55
  store ptr %56, ptr %13, align 8, !tbaa !5
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN17R3MeshPropertySet6InsertEP14R3MeshProperty(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef %61)
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %68

64:                                               ; preds = %55
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %14, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %56, i64 noundef 1096) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 32768, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %173

68:                                               ; preds = %60, %51
  br label %69

69:                                               ; preds = %68, %45
  br label %70

70:                                               ; preds = %69, %41
  br label %71

71:                                               ; preds = %70
  br label %31, !llvm.loop !15

72:                                               ; preds = %40, %31
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %170

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  store double 0.000000e+00, ptr %17, align 8, !tbaa !17
  br label %77

77:                                               ; preds = %165, %105, %99, %93, %87, %76
  %78 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call ptr @fgets(ptr noundef %78, i32 noundef 32768, ptr noundef %79)
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %166

82:                                               ; preds = %77
  %83 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %84 = load i8, ptr %83, align 16, !tbaa !19
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %85, 35
  br i1 %86, label %87, label %88

87:                                               ; preds = %82
  br label %77, !llvm.loop !20

88:                                               ; preds = %82
  %89 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %90 = load i8, ptr %89, align 16, !tbaa !19
  %91 = sext i8 %90 to i32
  %92 = icmp eq i32 %91, 64
  br i1 %92, label %93, label %94

93:                                               ; preds = %88
  br label %77, !llvm.loop !20

94:                                               ; preds = %88
  %95 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %96 = load i8, ptr %95, align 16, !tbaa !19
  %97 = sext i8 %96 to i32
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %94
  br label %77, !llvm.loop !20

100:                                              ; preds = %94
  %101 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %102 = load i8, ptr %101, align 16, !tbaa !19
  %103 = sext i8 %102 to i32
  %104 = icmp eq i32 %103, 10
  br i1 %104, label %105, label %106

105:                                              ; preds = %100
  br label %77, !llvm.loop !20

106:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %107 = getelementptr inbounds [32768 x i8], ptr %10, i64 0, i64 0
  %108 = call ptr @strtok(ptr noundef %107, ptr noundef @.str.9) #9
  store ptr %108, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %155, %106
  %110 = load i32, ptr %19, align 4, !tbaa !9
  %111 = load i32, ptr %8, align 4, !tbaa !9
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 6, ptr %7, align 4
  br label %158

114:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %115 = call noundef i32 @_ZNK17R3MeshPropertySet11NPropertiesEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = sub nsw i32 %115, %116
  %118 = load i32, ptr %19, align 4, !tbaa !9
  %119 = add nsw i32 %117, %118
  %120 = call noundef ptr @_ZNK17R3MeshPropertySet8PropertyEi(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef %119)
  store ptr %120, ptr %20, align 8, !tbaa !5
  %121 = load ptr, ptr %18, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  br i1 %122, label %128, label %123

123:                                              ; preds = %114
  %124 = load ptr, ptr @stderr, align 8, !tbaa !5
  %125 = load i32, ptr %19, align 4, !tbaa !9
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.10, i32 noundef %125, i32 noundef %126) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %152

128:                                              ; preds = %114
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %129, ptr noundef @.str.11, ptr noundef %17) #9
  %131 = icmp ne i32 %130, 1
  br i1 %131, label %132, label %137

132:                                              ; preds = %128
  %133 = load ptr, ptr @stderr, align 8, !tbaa !5
  %134 = load i32, ptr %19, align 4, !tbaa !9
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.10, i32 noundef %134, i32 noundef %135) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %152

137:                                              ; preds = %128
  %138 = load i32, ptr %16, align 4, !tbaa !9
  %139 = getelementptr inbounds %struct.R3MeshPropertySet, ptr %21, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  %141 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %140)
  %142 = icmp sge i32 %138, %141
  br i1 %142, label %143, label %147

143:                                              ; preds = %137
  %144 = load ptr, ptr @stderr, align 8, !tbaa !5
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.12, ptr noundef %145) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %152

147:                                              ; preds = %137
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = load i32, ptr %16, align 4, !tbaa !9
  %150 = load double, ptr %17, align 8, !tbaa !17
  call void @_ZN14R3MeshProperty14SetVertexValueEid(ptr noundef nonnull align 8 dereferenceable(1096) %148, i32 noundef %149, double noundef %150)
  %151 = call ptr @strtok(ptr noundef null, ptr noundef @.str.9) #9
  store ptr %151, ptr %18, align 8, !tbaa !5
  store i32 0, ptr %7, align 4
  br label %152

152:                                              ; preds = %147, %143, %132, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  %153 = load i32, ptr %7, align 4
  switch i32 %153, label %158 [
    i32 0, label %154
  ]

154:                                              ; preds = %152
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %19, align 4, !tbaa !9
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %19, align 4, !tbaa !9
  br label %109, !llvm.loop !21

158:                                              ; preds = %152, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  %159 = load i32, ptr %7, align 4
  switch i32 %159, label %163 [
    i32 6, label %160
  ]

160:                                              ; preds = %158
  %161 = load i32, ptr %16, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %7, align 4
  br label %163

163:                                              ; preds = %160, %158
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  %164 = load i32, ptr %7, align 4
  switch i32 %164, label %169 [
    i32 0, label %165
  ]

165:                                              ; preds = %163
  br label %77, !llvm.loop !20

166:                                              ; preds = %77
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = call i32 @fclose(ptr noundef %167)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %169

169:                                              ; preds = %166, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %170

170:                                              ; preds = %169, %75
  call void @llvm.lifetime.end.p0(i64 1024, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 32768, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %171

171:                                              ; preds = %170, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %172 = load i32, ptr %3, align 4
  ret i32 %172

173:                                              ; preds = %64
  %174 = load ptr, ptr %14, align 8
  %175 = load i32, ptr %15, align 4
  %176 = insertvalue { ptr, i32 } poison, ptr %174, 0
  %177 = insertvalue { ptr, i32 } %176, i32 %175, 1
  resume { ptr, i32 } %177
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare noundef ptr @strstr(ptr noundef, ptr noundef) #2

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

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

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) #7

; Function Attrs: nounwind
declare ptr @strtok(ptr noundef, ptr noundef) #4

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

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

declare i32 @fclose(ptr noundef) #5

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


; 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.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK17R3MeshPropertySet11NPropertiesEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; 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 nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17R3MeshPropertySet8ReadARFFEPKc(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [32768 x i8], align 16
  %4 = alloca [1024 x i8], align 16
  %5 = alloca [1024 x i8], align 16
  %6 = alloca double, align 8
  %7 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.4)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %8, label %11

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

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32768, ptr nonnull %3) #11
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #11
  %12 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not5575 = icmp eq ptr %12, null
  br i1 %.not5575, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %11, %28
  %.05276 = phi i32 [ %.153, %28 ], [ 0, %11 ]
  %13 = call noundef ptr @strstr(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.6) #12
  %.not56 = icmp eq ptr %13, null
  br i1 %.not56, label %14, label %._crit_edge

14:                                               ; preds = %.lr.ph
  %15 = call noundef ptr @strstr(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.7) #12
  %.not57 = icmp eq ptr %15, null
  br i1 %.not57, label %28, label %16

16:                                               ; preds = %14
  %17 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.8, ptr noundef nonnull %4, ptr noundef nonnull %5) #11
  %18 = icmp eq i32 %17, 2
  br i1 %18, label %19, label %28

19:                                               ; preds = %16
  %20 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.7) #12
  %.not58 = icmp eq i32 %20, 0
  br i1 %.not58, label %21, label %28

21:                                               ; preds = %19
  %22 = call noalias noundef nonnull dereferenceable(1096) ptr @_Znwm(i64 noundef 1096) #13
  %23 = load ptr, ptr %0, align 8, !tbaa !9
  invoke void @_ZN14R3MeshPropertyC1EP6R3MeshPKcPKd(ptr noundef nonnull align 8 dereferenceable(1096) %22, ptr noundef %23, ptr noundef nonnull %5, ptr noundef null)
          to label %24 unwind label %26

24:                                               ; preds = %21
  call void @_ZN17R3MeshPropertySet6InsertEP14R3MeshProperty(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull %22)
  %25 = add nsw i32 %.05276, 1
  br label %28

26:                                               ; preds = %21
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 1096) #14
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 32768, ptr nonnull %3) #11
  resume { ptr, i32 } %27

28:                                               ; preds = %14, %19, %24, %16
  %.153 = phi i32 [ %.05276, %19 ], [ %25, %24 ], [ %.05276, %16 ], [ %.05276, %14 ]
  %29 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not55 = icmp eq ptr %29, null
  br i1 %.not55, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %28, %.lr.ph
  %.052.lcssa.ph = phi i32 [ %.153, %28 ], [ %.05276, %.lr.ph ]
  %30 = freeze i32 %.052.lcssa.ph
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %._crit_edge.thread, label %32

32:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #11
  store double 0.000000e+00, ptr %6, align 8, !tbaa !16
  %33 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not597988 = icmp eq ptr %33, null
  br i1 %.not597988, label %.outer._crit_edge, label %.lr.ph80.lr.ph

.lr.ph80.lr.ph:                                   ; preds = %32
  %.not63.not82 = icmp sgt i32 %30, 0
  br i1 %.not63.not82, label %.lr.ph80.us, label %.lr.ph80

.lr.ph80.us:                                      ; preds = %.lr.ph80.lr.ph, %._crit_edge87.us
  %.047.ph89.us = phi i32 [ %52, %._crit_edge87.us ], [ 0, %.lr.ph80.lr.ph ]
  br label %34

34:                                               ; preds = %.backedge.us, %.lr.ph80.us
  %35 = load i8, ptr %3, align 16
  switch i8 %35, label %.lr.ph86.us [
    i8 64, label %.backedge.us
    i8 35, label %.backedge.us
    i8 10, label %.backedge.us
    i8 0, label %.backedge.us
  ]

.lr.ph86.us:                                      ; preds = %34
  %36 = call ptr @strtok(ptr noundef nonnull %3, ptr noundef nonnull @.str.9) #11
  br label %37

37:                                               ; preds = %.lr.ph86.us, %47
  %.04484.us = phi i32 [ 0, %.lr.ph86.us ], [ %50, %47 ]
  %.04583.us = phi ptr [ %36, %.lr.ph86.us ], [ %49, %47 ]
  %38 = call noundef i32 @_ZNK17R3MeshPropertySet11NPropertiesEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %39 = sub nsw i32 %.04484.us, %30
  %40 = add i32 %39, %38
  %41 = call noundef ptr @_ZNK17R3MeshPropertySet8PropertyEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %40)
  %.not60.us = icmp eq ptr %.04583.us, null
  br i1 %.not60.us, label %.split.us, label %42

42:                                               ; preds = %37
  %43 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.04583.us, ptr noundef nonnull @.str.11, ptr noundef nonnull %6) #11
  %.not61.us = icmp eq i32 %43, 1
  br i1 %.not61.us, label %44, label %.split92.us

44:                                               ; preds = %42
  %45 = load ptr, ptr %0, align 8, !tbaa !9
  %46 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %45)
  %.not62.us = icmp slt i32 %.047.ph89.us, %46
  br i1 %.not62.us, label %47, label %.split96.us

47:                                               ; preds = %44
  %48 = load double, ptr %6, align 8, !tbaa !16
  call void @_ZN14R3MeshProperty14SetVertexValueEid(ptr noundef nonnull align 8 dereferenceable(1096) %41, i32 noundef %.047.ph89.us, double noundef %48)
  %49 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.9) #11
  %50 = add nuw nsw i32 %.04484.us, 1
  %exitcond.not = icmp eq i32 %50, %30
  br i1 %exitcond.not, label %._crit_edge87.us, label %37, !llvm.loop !18

.backedge.us:                                     ; preds = %34, %34, %34, %34
  %51 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not59.us = icmp eq ptr %51, null
  br i1 %.not59.us, label %.outer._crit_edge, label %34

._crit_edge87.us:                                 ; preds = %47
  %52 = add nuw nsw i32 %.047.ph89.us, 1
  %53 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not5979.us = icmp eq ptr %53, null
  br i1 %.not5979.us, label %.outer._crit_edge, label %.lr.ph80.us

.lr.ph80:                                         ; preds = %.lr.ph80.lr.ph, %.lr.ph80.backedge
  %54 = load i8, ptr %3, align 16
  switch i8 %54, label %.outer [
    i8 64, label %.backedge
    i8 35, label %.backedge
    i8 10, label %.backedge
    i8 0, label %.backedge
  ]

.backedge:                                        ; preds = %.lr.ph80, %.lr.ph80, %.lr.ph80, %.lr.ph80
  %55 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not59 = icmp eq ptr %55, null
  br i1 %.not59, label %.outer._crit_edge, label %.lr.ph80.backedge

.lr.ph80.backedge:                                ; preds = %.backedge, %.outer
  br label %.lr.ph80

.outer:                                           ; preds = %.lr.ph80
  %56 = call ptr @strtok(ptr noundef nonnull %3, ptr noundef nonnull @.str.9) #11
  %57 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 32768, ptr noundef nonnull %7)
  %.not5979 = icmp eq ptr %57, null
  br i1 %.not5979, label %.outer._crit_edge, label %.lr.ph80.backedge

.split.us:                                        ; preds = %37
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.10, i32 noundef %.04484.us, i32 noundef %.047.ph89.us) #10
  br label %.thread66

.split92.us:                                      ; preds = %42
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.10, i32 noundef %.04484.us, i32 noundef %.047.ph89.us) #10
  br label %.thread66

.split96.us:                                      ; preds = %44
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.12, ptr noundef %1) #10
  br label %.thread66

.outer._crit_edge:                                ; preds = %.outer, %.backedge, %._crit_edge87.us, %.backedge.us, %32
  %64 = call i32 @fclose(ptr noundef nonnull %7)
  br label %.thread66

.thread66:                                        ; preds = %.split92.us, %.split96.us, %.split.us, %.outer._crit_edge
  %.4 = phi i32 [ 1, %.outer._crit_edge ], [ 0, %.split.us ], [ 0, %.split96.us ], [ 0, %.split92.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #11
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %11, %._crit_edge, %.thread66
  %.5 = phi i32 [ %.4, %.thread66 ], [ 1, %._crit_edge ], [ 1, %11 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 32768, ptr nonnull %3) #11
  br label %65

65:                                               ; preds = %._crit_edge.thread, %8
  %.6 = phi i32 [ %.5, %._crit_edge.thread ], [ 0, %8 ]
  ret i32 %.6
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #8

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #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 = { "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 = { 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 #8 = { mustprogress nofree nounwind willreturn "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 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 #10 = { cold nounwind }
attributes #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS17R3MeshPropertySet", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTS7RNArrayIP14R3MeshPropertyE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !6, i64 0, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !15}


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