; LLVM IR from sympiler/nasoq :: src/common (Util)

; 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.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }

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

declare i32 @__gxx_personality_v0(...)

; 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
define dso_local noundef zeroext i1 @_ZN5nasoq14readMatrix_oldENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS6_RPiS8_RPd(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #1 personality ptr @__gxx_personality_v0 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::basic_ifstream", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 520, ptr %14) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %14)
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %14, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 8)
          to label %25 unwind label %49

25:                                               ; preds = %6
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %28 unwind label %49

28:                                               ; preds = %25
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %31 unwind label %49

31:                                               ; preds = %28
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %34 unwind label %49

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = mul nsw i32 %36, %38
  %40 = sdiv i32 %39, 2
  store i32 %40, ptr %17, align 4, !tbaa !9
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = icmp sle i32 %42, 0
  br i1 %43, label %48, label %44

44:                                               ; preds = %34
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = icmp sle i32 %46, 0
  br i1 %47, label %48, label %53

48:                                               ; preds = %44, %34
  store i1 false, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %204

49:                                               ; preds = %31, %28, %25, %6
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %15, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %16, align 4
  br label %207

53:                                               ; preds = %44
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %57, i64 4)
  %59 = extractvalue { i64, i1 } %58, 1
  %60 = extractvalue { i64, i1 } %58, 0
  %61 = select i1 %59, i64 -1, i64 %60
  %62 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %61) #8
          to label %63 unwind label %97

63:                                               ; preds = %53
  call void @llvm.memset.p0.i64(ptr align 4 %62, i8 0, i64 %61, i1 false)
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %62, ptr %64, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %67, i64 4)
  %69 = extractvalue { i64, i1 } %68, 1
  %70 = extractvalue { i64, i1 } %68, 0
  %71 = select i1 %69, i64 -1, i64 %70
  %72 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %71) #8
          to label %73 unwind label %97

73:                                               ; preds = %63
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %72, ptr %74, align 8, !tbaa !5
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %77, i64 8)
  %79 = extractvalue { i64, i1 } %78, 1
  %80 = extractvalue { i64, i1 } %78, 0
  %81 = select i1 %79, i64 -1, i64 %80
  %82 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %81) #8
          to label %83 unwind label %97

83:                                               ; preds = %73
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %82, ptr %84, align 8, !tbaa !5
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %96

88:                                               ; preds = %83
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %96

92:                                               ; preds = %88
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %101, label %96

96:                                               ; preds = %92, %88, %83
  store i1 false, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %204

97:                                               ; preds = %73, %63, %53
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %15, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %16, align 4
  br label %206

101:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = getelementptr inbounds i32, ptr %103, i64 0
  store i32 0, ptr %104, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %183, %101
  %106 = load i32, ptr %22, align 4, !tbaa !9
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp slt i32 %106, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %105
  store i32 2, ptr %18, align 4
  br label %184

111:                                              ; preds = %105
  %112 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %113 unwind label %127

113:                                              ; preds = %111
  %114 = load i32, ptr %20, align 4, !tbaa !9
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %20, align 4, !tbaa !9
  %116 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %117 unwind label %127

117:                                              ; preds = %113
  %118 = load i32, ptr %19, align 4, !tbaa !9
  %119 = add nsw i32 %118, -1
  store i32 %119, ptr %19, align 4, !tbaa !9
  %120 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %121 unwind label %127

121:                                              ; preds = %117
  %122 = load i32, ptr %19, align 4, !tbaa !9
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = icmp sgt i32 %122, %124
  br i1 %125, label %126, label %131

126:                                              ; preds = %121
  store i1 false, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %184

127:                                              ; preds = %117, %113, %111
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %15, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %206

131:                                              ; preds = %121
  %132 = load i32, ptr %19, align 4, !tbaa !9
  %133 = load i32, ptr %24, align 4, !tbaa !9
  %134 = icmp eq i32 %132, %133
  br i1 %134, label %135, label %152

135:                                              ; preds = %131
  %136 = load double, ptr %23, align 8, !tbaa !11
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = load i32, ptr %22, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds double, ptr %138, i64 %140
  store double %136, ptr %141, align 8, !tbaa !11
  %142 = load i32, ptr %20, align 4, !tbaa !9
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = load i32, ptr %22, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %144, i64 %146
  store i32 %142, ptr %147, align 4, !tbaa !9
  %148 = load i32, ptr %21, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %21, align 4, !tbaa !9
  %150 = load i32, ptr %22, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %22, align 4, !tbaa !9
  br label %183

152:                                              ; preds = %131
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = load i32, ptr %24, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %154, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = load i32, ptr %21, align 4, !tbaa !9
  %160 = add nsw i32 %158, %159
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = load ptr, ptr %161, align 8, !tbaa !5
  %163 = load i32, ptr %24, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %162, i64 %165
  store i32 %160, ptr %166, align 4, !tbaa !9
  %167 = load i32, ptr %24, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %24, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  %169 = load double, ptr %23, align 8, !tbaa !11
  %170 = load ptr, ptr %13, align 8, !tbaa !5
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %171, i64 %173
  store double %169, ptr %174, align 8, !tbaa !11
  %175 = load i32, ptr %20, align 4, !tbaa !9
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = load i32, ptr %22, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i32, ptr %177, i64 %179
  store i32 %175, ptr %180, align 4, !tbaa !9
  %181 = load i32, ptr %22, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %22, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %152, %135
  br label %105, !llvm.loop !13

184:                                              ; preds = %126, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  %185 = load i32, ptr %18, align 4
  switch i32 %185, label %203 [
    i32 2, label %186
  ]

186:                                              ; preds = %184
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = load i32, ptr %189, align 4, !tbaa !9
  %191 = sub nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %188, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !9
  %195 = load i32, ptr %21, align 4, !tbaa !9
  %196 = add nsw i32 %194, %195
  %197 = load ptr, ptr %11, align 8, !tbaa !5
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = load i32, ptr %199, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i32, ptr %198, i64 %201
  store i32 %196, ptr %202, align 4, !tbaa !9
  store i1 true, ptr %7, align 1
  store i32 1, ptr %18, align 4
  br label %203

203:                                              ; preds = %186, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %204

204:                                              ; preds = %203, %96, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %14) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %14) #7
  %205 = load i1, ptr %7, align 1
  ret i1 %205

206:                                              ; preds = %127, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %207

207:                                              ; preds = %206, %49
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %14) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %14) #7
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %15, align 8
  %210 = load i32, ptr %16, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6 align 2

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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }

!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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }

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

declare i32 @__gxx_personality_v0(...)

; 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
define dso_local noundef zeroext i1 @_ZN5nasoq14readMatrix_oldENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERiS6_RPiS8_RPd(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull align 8 dereferenceable(8) %3, ptr nocapture noundef nonnull align 8 dereferenceable(8) %4, ptr nocapture noundef nonnull align 8 dereferenceable(8) %5) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::basic_ifstream", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %7) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %7)
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %7, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 8)
          to label %11 unwind label %22

11:                                               ; preds = %6
  %12 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %13 unwind label %22

13:                                               ; preds = %11
  %14 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %15 unwind label %22

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %17 unwind label %22

17:                                               ; preds = %15
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 1
  %20 = load i32, ptr %2, align 4
  %21 = icmp slt i32 %20, 1
  %or.cond = select i1 %19, i1 true, i1 %21
  br i1 %or.cond, label %93, label %24

22:                                               ; preds = %15, %13, %11, %6
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %94

24:                                               ; preds = %17
  %25 = add nuw nsw i32 %18, 1
  %26 = zext nneg i32 %25 to i64
  %27 = shl nuw nsw i64 %26, 2
  %28 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %27) #7
          to label %29 unwind label %39

29:                                               ; preds = %24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %28, i8 0, i64 %27, i1 false)
  store ptr %28, ptr %3, align 8, !tbaa !9
  %30 = zext nneg i32 %20 to i64
  %31 = shl nuw nsw i64 %30, 2
  %32 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %31) #7
          to label %33 unwind label %39

33:                                               ; preds = %29
  store ptr %32, ptr %4, align 8, !tbaa !9
  %34 = shl nuw nsw i64 %30, 3
  %35 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %34) #7
          to label %36 unwind label %39

36:                                               ; preds = %33
  store ptr %35, ptr %5, align 8, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !9
  %.not = icmp eq ptr %37, null
  %38 = load ptr, ptr %4, align 8
  %.not59 = icmp eq ptr %38, null
  %or.cond64 = select i1 %.not, i1 true, i1 %.not59
  br i1 %or.cond64, label %93, label %41

39:                                               ; preds = %33, %29, %24
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %94

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  store i32 0, ptr %37, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %.not6270 = icmp slt i32 %42, 1
  br i1 %.not6270, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %41, %83
  %indvars.iv = phi i64 [ %indvars.iv.next, %83 ], [ 0, %41 ]
  %.073 = phi i32 [ %.1, %83 ], [ 0, %41 ]
  %.04871 = phi i32 [ %.149, %83 ], [ 0, %41 ]
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %44 unwind label %56

44:                                               ; preds = %.lr.ph
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %9, align 4, !tbaa !5
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %48 unwind label %56

48:                                               ; preds = %44
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = add nsw i32 %49, -1
  store i32 %50, ptr %8, align 4, !tbaa !5
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %52 unwind label %56

52:                                               ; preds = %48
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = icmp sgt i32 %53, %54
  br i1 %55, label %.loopexit, label %58

56:                                               ; preds = %48, %44, %.lr.ph
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %94

58:                                               ; preds = %52
  %59 = icmp eq i32 %53, %.073
  br i1 %59, label %60, label %68

60:                                               ; preds = %58
  %61 = load double, ptr %10, align 8, !tbaa !11
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = getelementptr inbounds double, ptr %62, i64 %indvars.iv
  store double %61, ptr %63, align 8, !tbaa !11
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !9
  %66 = getelementptr inbounds i32, ptr %65, i64 %indvars.iv
  store i32 %64, ptr %66, align 4, !tbaa !5
  %67 = add nsw i32 %.04871, 1
  br label %83

68:                                               ; preds = %58
  %69 = load ptr, ptr %3, align 8, !tbaa !9
  %70 = sext i32 %.073 to i64
  %71 = getelementptr inbounds i32, ptr %69, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, %.04871
  %74 = add nsw i32 %.073, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %69, i64 %75
  store i32 %73, ptr %76, align 4, !tbaa !5
  %77 = load double, ptr %10, align 8, !tbaa !11
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %78, i64 %indvars.iv
  store double %77, ptr %79, align 8, !tbaa !11
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !9
  %82 = getelementptr inbounds i32, ptr %81, i64 %indvars.iv
  store i32 %80, ptr %82, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %68, %60
  %.149 = phi i32 [ %67, %60 ], [ 1, %68 ]
  %.1 = phi i32 [ %.073, %60 ], [ %74, %68 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %.not62.not = icmp slt i64 %indvars.iv.next, %85
  br i1 %.not62.not, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !13

.critedge.loopexit:                               ; preds = %83
  %.pre = load ptr, ptr %3, align 8, !tbaa !9
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %41
  %86 = phi ptr [ %37, %41 ], [ %.pre, %.critedge.loopexit ]
  %.048.lcssa = phi i32 [ 0, %41 ], [ %.149, %.critedge.loopexit ]
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr i32, ptr %86, i64 %88
  %90 = getelementptr i8, ptr %89, i64 -4
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = add nsw i32 %91, %.048.lcssa
  store i32 %92, ptr %89, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %52, %.critedge
  %.not6267 = phi i1 [ true, %.critedge ], [ false, %52 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %93

93:                                               ; preds = %36, %17, %.loopexit
  %.2 = phi i1 [ %.not6267, %.loopexit ], [ false, %17 ], [ false, %36 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %7) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %7) #6
  ret i1 %.2

94:                                               ; preds = %39, %56, %22
  %.pn.pn = phi { ptr, i32 } [ %23, %22 ], [ %57, %56 ], [ %40, %39 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %7) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #5 align 2

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 = { "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 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 = { nounwind }
attributes #7 = { builtin allocsize(0) }

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

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


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