; LLVM IR from research-group-of-Xinzheng-Lu/SCI-effects-simulation :: SRC/PostprocessSpeed_MDOF-master/PostprocessSpeed_MDOF/building.ll (ZN8Building8getDriftEv)

; 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.Building = type { i32, %"class.std::__cxx11::basic_string", i32, i32, i32, i32, double, double, double, double, double, double, [4 x double], double, double, ptr, ptr, ptr, ptr, %"class.std::vector", i32, %"struct.Building::EDP", i32, double, double, double, %"class.std::vector.3", %"class.std::vector.3" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Building::EDP" = type { %"class.std::vector.3", %"class.std::vector.3", double }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Building8getDriftEv(ptr noundef nonnull align 8 dereferenceable(352) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %10 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 5
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = sext i32 %11 to i64
  %13 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %12, i64 8)
  %14 = extractvalue { i64, i1 } %13, 1
  %15 = extractvalue { i64, i1 } %13, 0
  %16 = select i1 %14, i64 -1, i64 %15
  %17 = call noalias noundef nonnull ptr @_Znam(i64 noundef %16) #6
  store ptr %17, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 5
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %20, i64 8)
  %22 = extractvalue { i64, i1 } %21, 1
  %23 = extractvalue { i64, i1 } %21, 0
  %24 = select i1 %22, i64 -1, i64 %23
  %25 = call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #6
  store ptr %25, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !27
  br label %26

26:                                               ; preds = %37, %1
  %27 = load i32, ptr %5, align 4, !tbaa !27
  %28 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 5
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = icmp slt i32 %27, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %40

32:                                               ; preds = %26
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !27
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds double, ptr %33, i64 %35
  store double 0.000000e+00, ptr %36, align 8, !tbaa !28
  br label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %5, align 4, !tbaa !27
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %5, align 4, !tbaa !27
  br label %26, !llvm.loop !29

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !27
  br label %41

41:                                               ; preds = %259, %40
  %42 = load i32, ptr %6, align 4, !tbaa !27
  %43 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 5
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp slt i32 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %262

47:                                               ; preds = %41
  %48 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 22
  %49 = load i32, ptr %48, align 8, !tbaa !31
  %50 = sext i32 %49 to i64
  %51 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %50, i64 8)
  %52 = extractvalue { i64, i1 } %51, 1
  %53 = extractvalue { i64, i1 } %51, 0
  %54 = select i1 %52, i64 -1, i64 %53
  %55 = call noalias noundef nonnull ptr @_Znam(i64 noundef %54) #6
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !27
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  store ptr %55, ptr %59, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !27
  br label %60

60:                                               ; preds = %249, %47
  %61 = load i32, ptr %8, align 4, !tbaa !27
  %62 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 22
  %63 = load i32, ptr %62, align 8, !tbaa !31
  %64 = icmp slt i32 %61, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %60
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %252

66:                                               ; preds = %60
  %67 = load i32, ptr %6, align 4, !tbaa !27
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %92

69:                                               ; preds = %66
  %70 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 15
  %71 = load ptr, ptr %70, align 8, !tbaa !32
  %72 = load i32, ptr %6, align 4, !tbaa !27
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %71, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !27
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !28
  %80 = call noundef double @_ZSt3absd(double noundef %79)
  %81 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 6
  %82 = load double, ptr %81, align 8, !tbaa !33
  %83 = fdiv double %80, %82
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !27
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds ptr, ptr %84, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = load i32, ptr %8, align 4, !tbaa !27
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  store double %83, ptr %91, align 8, !tbaa !28
  br label %127

92:                                               ; preds = %66
  %93 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 15
  %94 = load ptr, ptr %93, align 8, !tbaa !32
  %95 = load i32, ptr %6, align 4, !tbaa !27
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds ptr, ptr %94, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !27
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds double, ptr %98, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !28
  %103 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 15
  %104 = load ptr, ptr %103, align 8, !tbaa !32
  %105 = load i32, ptr %6, align 4, !tbaa !27
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds ptr, ptr %104, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !27
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !28
  %114 = fsub double %102, %113
  %115 = call noundef double @_ZSt3absd(double noundef %114)
  %116 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 6
  %117 = load double, ptr %116, align 8, !tbaa !33
  %118 = fdiv double %115, %117
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = load i32, ptr %6, align 4, !tbaa !27
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !27
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds double, ptr %123, i64 %125
  store double %118, ptr %126, align 8, !tbaa !28
  br label %127

127:                                              ; preds = %92, %69
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = load i32, ptr %6, align 4, !tbaa !27
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %128, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !28
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = load i32, ptr %6, align 4, !tbaa !27
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds ptr, ptr %133, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = load i32, ptr %8, align 4, !tbaa !27
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds double, ptr %137, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !28
  %142 = fcmp olt double %132, %141
  br i1 %142, label %143, label %157

143:                                              ; preds = %127
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = load i32, ptr %6, align 4, !tbaa !27
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load i32, ptr %8, align 4, !tbaa !27
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !28
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = load i32, ptr %6, align 4, !tbaa !27
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %153, i64 %155
  store double %152, ptr %156, align 8, !tbaa !28
  br label %157

157:                                              ; preds = %143, %127
  %158 = load i32, ptr %6, align 4, !tbaa !27
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %183

160:                                              ; preds = %157
  %161 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 17
  %162 = load ptr, ptr %161, align 8, !tbaa !34
  %163 = load i32, ptr %6, align 4, !tbaa !27
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds ptr, ptr %162, i64 %164
  %166 = load ptr, ptr %165, align 8, !tbaa !5
  %167 = load i32, ptr %8, align 4, !tbaa !27
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds double, ptr %166, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !28
  %171 = call noundef double @_ZSt3absd(double noundef %170)
  %172 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 6
  %173 = load double, ptr %172, align 8, !tbaa !33
  %174 = fdiv double %171, %173
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = load i32, ptr %6, align 4, !tbaa !27
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds ptr, ptr %175, i64 %177
  %179 = load ptr, ptr %178, align 8, !tbaa !5
  %180 = load i32, ptr %8, align 4, !tbaa !27
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds double, ptr %179, i64 %181
  store double %174, ptr %182, align 8, !tbaa !28
  br label %218

183:                                              ; preds = %157
  %184 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 17
  %185 = load ptr, ptr %184, align 8, !tbaa !34
  %186 = load i32, ptr %6, align 4, !tbaa !27
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds ptr, ptr %185, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = load i32, ptr %8, align 4, !tbaa !27
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds double, ptr %189, i64 %191
  %193 = load double, ptr %192, align 8, !tbaa !28
  %194 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 17
  %195 = load ptr, ptr %194, align 8, !tbaa !34
  %196 = load i32, ptr %6, align 4, !tbaa !27
  %197 = sub nsw i32 %196, 1
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds ptr, ptr %195, i64 %198
  %200 = load ptr, ptr %199, align 8, !tbaa !5
  %201 = load i32, ptr %8, align 4, !tbaa !27
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds double, ptr %200, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !28
  %205 = fsub double %193, %204
  %206 = call noundef double @_ZSt3absd(double noundef %205)
  %207 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 6
  %208 = load double, ptr %207, align 8, !tbaa !33
  %209 = fdiv double %206, %208
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = load i32, ptr %6, align 4, !tbaa !27
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds ptr, ptr %210, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = load i32, ptr %8, align 4, !tbaa !27
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  store double %209, ptr %217, align 8, !tbaa !28
  br label %218

218:                                              ; preds = %183, %160
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = load i32, ptr %6, align 4, !tbaa !27
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds double, ptr %219, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !28
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = load i32, ptr %6, align 4, !tbaa !27
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds ptr, ptr %224, i64 %226
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = load i32, ptr %8, align 4, !tbaa !27
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  %232 = load double, ptr %231, align 8, !tbaa !28
  %233 = fcmp olt double %223, %232
  br i1 %233, label %234, label %248

234:                                              ; preds = %218
  %235 = load ptr, ptr %3, align 8, !tbaa !5
  %236 = load i32, ptr %6, align 4, !tbaa !27
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds ptr, ptr %235, i64 %237
  %239 = load ptr, ptr %238, align 8, !tbaa !5
  %240 = load i32, ptr %8, align 4, !tbaa !27
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds double, ptr %239, i64 %241
  %243 = load double, ptr %242, align 8, !tbaa !28
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  %245 = load i32, ptr %6, align 4, !tbaa !27
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds double, ptr %244, i64 %246
  store double %243, ptr %247, align 8, !tbaa !28
  br label %248

248:                                              ; preds = %234, %218
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %8, align 4, !tbaa !27
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %8, align 4, !tbaa !27
  br label %60, !llvm.loop !35

252:                                              ; preds = %65
  %253 = getelementptr inbounds %class.Building, ptr %9, i32 0, i32 21
  %254 = getelementptr inbounds %"struct.Building::EDP", ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = load i32, ptr %6, align 4, !tbaa !27
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds double, ptr %255, i64 %257
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %254, ptr noundef nonnull align 8 dereferenceable(8) %258)
  br label %259

259:                                              ; preds = %252
  %260 = load i32, ptr %6, align 4, !tbaa !27
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %6, align 4, !tbaa !27
  br label %41, !llvm.loop !36

262:                                              ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #4

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { 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, !11, i64 52}
!10 = !{!"_ZTS8Building", !11, i64 0, !12, i64 8, !15, i64 40, !11, i64 44, !16, i64 48, !11, i64 52, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !7, i64 104, !17, i64 136, !17, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !18, i64 184, !11, i64 208, !22, i64 216, !11, i64 272, !17, i64 280, !17, i64 288, !17, i64 296, !23, i64 304, !23, i64 328}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN8Building8StruTypeE", !7, i64 0}
!16 = !{!"_ZTSN8Building13BldgOccupancyE", !7, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSN8Building3EDPE", !23, i64 0, !23, i64 24, !17, i64 48}
!23 = !{!"_ZTSSt6vectorIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!11, !11, i64 0}
!28 = !{!17, !17, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!10, !11, i64 272}
!32 = !{!10, !6, i64 152}
!33 = !{!10, !17, i64 56}
!34 = !{!10, !6, i64 168}
!35 = distinct !{!35, !30}
!36 = distinct !{!36, !30}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Building8getDriftEv(ptr noundef nonnull align 8 dereferenceable(352) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 52
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = sext i32 %3 to i64
  %5 = icmp slt i32 %3, 0
  %6 = shl nsw i64 %4, 3
  %7 = select i1 %5, i64 -1, i64 %6
  %8 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %7) #4
  %9 = icmp sgt i32 %3, 0
  br i1 %9, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %1
  %10 = zext nneg i32 %3 to i64
  %11 = shl nuw nsw i64 %10, 3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %8, i8 0, i64 %11, i1 false), !tbaa !26
  %12 = getelementptr inbounds i8, ptr %0, i64 272
  %13 = getelementptr inbounds i8, ptr %0, i64 152
  %14 = getelementptr inbounds i8, ptr %0, i64 56
  %15 = getelementptr inbounds i8, ptr %0, i64 168
  %16 = getelementptr inbounds i8, ptr %0, i64 216
  br label %17

._crit_edge67:                                    ; preds = %._crit_edge, %1
  ret void

17:                                               ; preds = %.lr.ph66, %._crit_edge
  %indvars.iv74 = phi i64 [ 0, %.lr.ph66 ], [ %indvars.iv.next75, %._crit_edge ]
  %18 = load i32, ptr %12, align 8, !tbaa !27
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph64, label %._crit_edge

.lr.ph64:                                         ; preds = %17
  %20 = icmp eq i64 %indvars.iv74, 0
  %21 = getelementptr inbounds double, ptr %8, i64 %indvars.iv74
  br i1 %20, label %.lr.ph64.split.us, label %.lr.ph64.split

.lr.ph64.split.us:                                ; preds = %.lr.ph64, %43
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %43 ], [ 0, %.lr.ph64 ]
  %22 = load ptr, ptr %13, align 8, !tbaa !28
  %23 = load ptr, ptr %22, align 8, !tbaa !29
  %24 = getelementptr inbounds double, ptr %23, i64 %indvars.iv71
  %25 = load double, ptr %24, align 8, !tbaa !26
  %26 = tail call noundef double @_ZSt3absd(double noundef %25)
  %27 = load double, ptr %14, align 8, !tbaa !30
  %28 = fdiv double %26, %27
  %29 = load double, ptr %21, align 8, !tbaa !26
  %30 = fcmp olt double %29, %28
  br i1 %30, label %31, label %32

31:                                               ; preds = %.lr.ph64.split.us
  store double %28, ptr %21, align 8, !tbaa !26
  br label %32

32:                                               ; preds = %31, %.lr.ph64.split.us
  %33 = load ptr, ptr %15, align 8, !tbaa !31
  %34 = load ptr, ptr %33, align 8, !tbaa !29
  %35 = getelementptr inbounds double, ptr %34, i64 %indvars.iv71
  %36 = load double, ptr %35, align 8, !tbaa !26
  %37 = tail call noundef double @_ZSt3absd(double noundef %36)
  %38 = load double, ptr %14, align 8, !tbaa !30
  %39 = fdiv double %37, %38
  %40 = load double, ptr %21, align 8, !tbaa !26
  %41 = fcmp olt double %40, %39
  br i1 %41, label %42, label %43

42:                                               ; preds = %32
  store double %39, ptr %21, align 8, !tbaa !26
  br label %43

43:                                               ; preds = %42, %32
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %44 = load i32, ptr %12, align 8, !tbaa !27
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next72, %45
  br i1 %46, label %.lr.ph64.split.us, label %._crit_edge, !llvm.loop !32

._crit_edge:                                      ; preds = %84, %43, %17
  %47 = getelementptr inbounds double, ptr %8, i64 %indvars.iv74
  tail call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(8) %47)
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next75, %49
  br i1 %50, label %17, label %._crit_edge67, !llvm.loop !34

.lr.ph64.split:                                   ; preds = %.lr.ph64, %84
  %indvars.iv = phi i64 [ %indvars.iv.next, %84 ], [ 0, %.lr.ph64 ]
  %51 = load ptr, ptr %13, align 8, !tbaa !28
  %52 = getelementptr inbounds ptr, ptr %51, i64 %indvars.iv74
  %53 = load ptr, ptr %52, align 8, !tbaa !29
  %54 = getelementptr inbounds double, ptr %53, i64 %indvars.iv
  %55 = load double, ptr %54, align 8, !tbaa !26
  %56 = getelementptr i8, ptr %52, i64 -8
  %57 = load ptr, ptr %56, align 8, !tbaa !29
  %58 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  %59 = load double, ptr %58, align 8, !tbaa !26
  %60 = fsub double %55, %59
  %61 = tail call noundef double @_ZSt3absd(double noundef %60)
  %62 = load double, ptr %14, align 8, !tbaa !30
  %63 = fdiv double %61, %62
  %64 = load double, ptr %21, align 8, !tbaa !26
  %65 = fcmp olt double %64, %63
  br i1 %65, label %66, label %67

66:                                               ; preds = %.lr.ph64.split
  store double %63, ptr %21, align 8, !tbaa !26
  br label %67

67:                                               ; preds = %66, %.lr.ph64.split
  %68 = load ptr, ptr %15, align 8, !tbaa !31
  %69 = getelementptr inbounds ptr, ptr %68, i64 %indvars.iv74
  %70 = load ptr, ptr %69, align 8, !tbaa !29
  %71 = getelementptr inbounds double, ptr %70, i64 %indvars.iv
  %72 = load double, ptr %71, align 8, !tbaa !26
  %73 = getelementptr i8, ptr %69, i64 -8
  %74 = load ptr, ptr %73, align 8, !tbaa !29
  %75 = getelementptr inbounds double, ptr %74, i64 %indvars.iv
  %76 = load double, ptr %75, align 8, !tbaa !26
  %77 = fsub double %72, %76
  %78 = tail call noundef double @_ZSt3absd(double noundef %77)
  %79 = load double, ptr %14, align 8, !tbaa !30
  %80 = fdiv double %78, %79
  %81 = load double, ptr %21, align 8, !tbaa !26
  %82 = fcmp olt double %81, %80
  br i1 %82, label %83, label %84

83:                                               ; preds = %67
  store double %80, ptr %21, align 8, !tbaa !26
  br label %84

84:                                               ; preds = %67, %83
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %85 = load i32, ptr %12, align 8, !tbaa !27
  %86 = sext i32 %85 to i64
  %87 = icmp slt i64 %indvars.iv.next, %86
  br i1 %87, label %.lr.ph64.split, label %._crit_edge, !llvm.loop !32
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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, !7, i64 52}
!6 = !{!"_ZTS8Building", !7, i64 0, !10, i64 8, !14, i64 40, !7, i64 44, !15, i64 48, !7, i64 52, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !8, i64 104, !16, i64 136, !16, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !17, i64 184, !7, i64 208, !21, i64 216, !7, i64 272, !16, i64 280, !16, i64 288, !16, i64 296, !22, i64 304, !22, i64 328}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !13, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSN8Building8StruTypeE", !8, i64 0}
!15 = !{!"_ZTSN8Building13BldgOccupancyE", !8, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!21 = !{!"_ZTSN8Building3EDPE", !22, i64 0, !22, i64 24, !16, i64 48}
!22 = !{!"_ZTSSt6vectorIdSaIdEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!26 = !{!16, !16, i64 0}
!27 = !{!6, !7, i64 272}
!28 = !{!6, !12, i64 152}
!29 = !{!12, !12, i64 0}
!30 = !{!6, !16, i64 56}
!31 = !{!6, !12, i64 168}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


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