; LLVM IR from microsoft/LightAIMD :: src (md)

; 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.md_context = type { double, double, double, ptr, ptr, ptr, i64 }
%struct.cmd_line_args = type { i64, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, double, double, i64, i64 }
%struct.molecule = type { i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct.vec3d = type { double, double, double }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @md_simulate(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.md_context, ptr %16, i32 0, i32 0
  %18 = load double, ptr %17, align 8, !tbaa !9
  %19 = fmul double %18, 0x4044ABB21F172AB4
  store double %19, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.cmd_line_args, ptr %20, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  store ptr %22, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.md_context, ptr %24, i32 0, i32 1
  %26 = load double, ptr %25, align 8, !tbaa !16
  call void @maxwell_boltzmann_velocity_init(ptr noundef %23, double noundef %26)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.md_context, ptr %28, i32 0, i32 1
  %30 = load double, ptr %29, align 8, !tbaa !16
  call void @enforce_temperature(ptr noundef %27, double noundef %30)
  %31 = call i64 @ensure_dir_exists(ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 256, ptr %7, align 8, !tbaa !17
  %32 = call ptr @llvm.stacksave.p0()
  store ptr %32, ptr %8, align 8
  %33 = alloca i8, i64 256, align 16
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.cmd_line_args, ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !14
  %37 = getelementptr inbounds %struct.molecule, ptr %36, i32 0, i32 9
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.md_context, ptr %39, i32 0, i32 5
  %41 = load ptr, ptr %40, align 8, !tbaa !20
  %42 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %33, i64 noundef 256, ptr noundef @.str.1, ptr noundef %38, ptr noundef %41) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %43 = call noalias ptr @fopen(ptr noundef %33, ptr noundef @.str.2)
  store ptr %43, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.cmd_line_args, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = getelementptr inbounds %struct.molecule, ptr %46, i32 0, i32 9
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.md_context, ptr %49, i32 0, i32 5
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  %52 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %33, i64 noundef 256, ptr noundef @.str.3, ptr noundef %48, ptr noundef %51) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %53 = call noalias ptr @fopen(ptr noundef %33, ptr noundef @.str.2)
  store ptr %53, ptr %10, align 8, !tbaa !5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.cmd_line_args, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !14
  %57 = getelementptr inbounds %struct.molecule, ptr %56, i32 0, i32 9
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.md_context, ptr %59, i32 0, i32 5
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  %62 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %33, i64 noundef 256, ptr noundef @.str.4, ptr noundef %58, ptr noundef %61) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %63 = call noalias ptr @fopen(ptr noundef %33, ptr noundef @.str.2)
  store ptr %63, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %64

64:                                               ; preds = %375, %2
  %65 = load i64, ptr %12, align 8, !tbaa !17
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.cmd_line_args, ptr %66, i32 0, i32 11
  %68 = load i64, ptr %67, align 8, !tbaa !21
  %69 = icmp ult i64 %65, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %64
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %378

71:                                               ; preds = %64
  %72 = load i64, ptr %12, align 8, !tbaa !17
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.md_context, ptr %73, i32 0, i32 6
  store i64 %72, ptr %74, align 8, !tbaa !22
  %75 = load i64, ptr %12, align 8, !tbaa !17
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i64 noundef %75)
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.md_context, ptr %77, i32 0, i32 3
  %79 = load ptr, ptr %78, align 8, !tbaa !23
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  call void %79(ptr noundef %80, ptr noundef %81)
  %82 = load i64, ptr %12, align 8, !tbaa !17
  %83 = icmp ugt i64 %82, 0
  br i1 %83, label %84, label %196

84:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !17
  br label %85

85:                                               ; preds = %192, %84
  %86 = load i64, ptr %14, align 8, !tbaa !17
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.molecule, ptr %87, i32 0, i32 0
  %89 = load i64, ptr %88, align 8, !tbaa !24
  %90 = icmp ult i64 %86, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %85
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %195

92:                                               ; preds = %85
  %93 = load double, ptr %5, align 8, !tbaa !13
  %94 = fmul double 5.000000e-01, %93
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.molecule, ptr %95, i32 0, i32 6
  %97 = load ptr, ptr %96, align 8, !tbaa !25
  %98 = load i64, ptr %14, align 8, !tbaa !17
  %99 = getelementptr inbounds %struct.vec3d, ptr %97, i64 %98
  %100 = getelementptr inbounds %struct.vec3d, ptr %99, i32 0, i32 0
  %101 = load double, ptr %100, align 8, !tbaa !26
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.molecule, ptr %102, i32 0, i32 7
  %104 = load ptr, ptr %103, align 8, !tbaa !28
  %105 = load i64, ptr %14, align 8, !tbaa !17
  %106 = getelementptr inbounds %struct.vec3d, ptr %104, i64 %105
  %107 = getelementptr inbounds %struct.vec3d, ptr %106, i32 0, i32 0
  %108 = load double, ptr %107, align 8, !tbaa !26
  %109 = fadd double %101, %108
  %110 = fmul double %94, %109
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.molecule, ptr %111, i32 0, i32 3
  %113 = load ptr, ptr %112, align 8, !tbaa !29
  %114 = load i64, ptr %14, align 8, !tbaa !17
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !13
  %117 = fdiv double %110, %116
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.molecule, ptr %118, i32 0, i32 5
  %120 = load ptr, ptr %119, align 8, !tbaa !30
  %121 = load i64, ptr %14, align 8, !tbaa !17
  %122 = getelementptr inbounds %struct.vec3d, ptr %120, i64 %121
  %123 = getelementptr inbounds %struct.vec3d, ptr %122, i32 0, i32 0
  %124 = load double, ptr %123, align 8, !tbaa !26
  %125 = fadd double %124, %117
  store double %125, ptr %123, align 8, !tbaa !26
  %126 = load double, ptr %5, align 8, !tbaa !13
  %127 = fmul double 5.000000e-01, %126
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.molecule, ptr %128, i32 0, i32 6
  %130 = load ptr, ptr %129, align 8, !tbaa !25
  %131 = load i64, ptr %14, align 8, !tbaa !17
  %132 = getelementptr inbounds %struct.vec3d, ptr %130, i64 %131
  %133 = getelementptr inbounds %struct.vec3d, ptr %132, i32 0, i32 1
  %134 = load double, ptr %133, align 8, !tbaa !31
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.molecule, ptr %135, i32 0, i32 7
  %137 = load ptr, ptr %136, align 8, !tbaa !28
  %138 = load i64, ptr %14, align 8, !tbaa !17
  %139 = getelementptr inbounds %struct.vec3d, ptr %137, i64 %138
  %140 = getelementptr inbounds %struct.vec3d, ptr %139, i32 0, i32 1
  %141 = load double, ptr %140, align 8, !tbaa !31
  %142 = fadd double %134, %141
  %143 = fmul double %127, %142
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.molecule, ptr %144, i32 0, i32 3
  %146 = load ptr, ptr %145, align 8, !tbaa !29
  %147 = load i64, ptr %14, align 8, !tbaa !17
  %148 = getelementptr inbounds double, ptr %146, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !13
  %150 = fdiv double %143, %149
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.molecule, ptr %151, i32 0, i32 5
  %153 = load ptr, ptr %152, align 8, !tbaa !30
  %154 = load i64, ptr %14, align 8, !tbaa !17
  %155 = getelementptr inbounds %struct.vec3d, ptr %153, i64 %154
  %156 = getelementptr inbounds %struct.vec3d, ptr %155, i32 0, i32 1
  %157 = load double, ptr %156, align 8, !tbaa !31
  %158 = fadd double %157, %150
  store double %158, ptr %156, align 8, !tbaa !31
  %159 = load double, ptr %5, align 8, !tbaa !13
  %160 = fmul double 5.000000e-01, %159
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.molecule, ptr %161, i32 0, i32 6
  %163 = load ptr, ptr %162, align 8, !tbaa !25
  %164 = load i64, ptr %14, align 8, !tbaa !17
  %165 = getelementptr inbounds %struct.vec3d, ptr %163, i64 %164
  %166 = getelementptr inbounds %struct.vec3d, ptr %165, i32 0, i32 2
  %167 = load double, ptr %166, align 8, !tbaa !32
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.molecule, ptr %168, i32 0, i32 7
  %170 = load ptr, ptr %169, align 8, !tbaa !28
  %171 = load i64, ptr %14, align 8, !tbaa !17
  %172 = getelementptr inbounds %struct.vec3d, ptr %170, i64 %171
  %173 = getelementptr inbounds %struct.vec3d, ptr %172, i32 0, i32 2
  %174 = load double, ptr %173, align 8, !tbaa !32
  %175 = fadd double %167, %174
  %176 = fmul double %160, %175
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.molecule, ptr %177, i32 0, i32 3
  %179 = load ptr, ptr %178, align 8, !tbaa !29
  %180 = load i64, ptr %14, align 8, !tbaa !17
  %181 = getelementptr inbounds double, ptr %179, i64 %180
  %182 = load double, ptr %181, align 8, !tbaa !13
  %183 = fdiv double %176, %182
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.molecule, ptr %184, i32 0, i32 5
  %186 = load ptr, ptr %185, align 8, !tbaa !30
  %187 = load i64, ptr %14, align 8, !tbaa !17
  %188 = getelementptr inbounds %struct.vec3d, ptr %186, i64 %187
  %189 = getelementptr inbounds %struct.vec3d, ptr %188, i32 0, i32 2
  %190 = load double, ptr %189, align 8, !tbaa !32
  %191 = fadd double %190, %183
  store double %191, ptr %189, align 8, !tbaa !32
  br label %192

192:                                              ; preds = %92
  %193 = load i64, ptr %14, align 8, !tbaa !17
  %194 = add i64 %193, 1
  store i64 %194, ptr %14, align 8, !tbaa !17
  br label %85, !llvm.loop !33

195:                                              ; preds = %91
  br label %196

196:                                              ; preds = %195, %71
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.md_context, ptr %198, i32 0, i32 1
  %200 = load double, ptr %199, align 8, !tbaa !16
  call void @thermostat_berendsen_nvt(ptr noundef %197, double noundef %200, double noundef 1.000000e-03)
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = load i64, ptr %12, align 8, !tbaa !17
  call void @write_trajectory(ptr noundef %201, ptr noundef %202, i64 noundef %203)
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = call i32 @fflush(ptr noundef %204)
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = load i64, ptr %12, align 8, !tbaa !17
  call void @write_velocities(ptr noundef %206, ptr noundef %207, i64 noundef %208)
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = call i32 @fflush(ptr noundef %209)
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = load i64, ptr %12, align 8, !tbaa !17
  call void @write_forces(ptr noundef %211, ptr noundef %212, i64 noundef %213)
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = call i32 @fflush(ptr noundef %214)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !17
  br label %216

216:                                              ; preds = %371, %196
  %217 = load i64, ptr %15, align 8, !tbaa !17
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.molecule, ptr %218, i32 0, i32 0
  %220 = load i64, ptr %219, align 8, !tbaa !24
  %221 = icmp ult i64 %217, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %216
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %374

223:                                              ; preds = %216
  %224 = load double, ptr %5, align 8, !tbaa !13
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.molecule, ptr %225, i32 0, i32 5
  %227 = load ptr, ptr %226, align 8, !tbaa !30
  %228 = load i64, ptr %15, align 8, !tbaa !17
  %229 = getelementptr inbounds %struct.vec3d, ptr %227, i64 %228
  %230 = getelementptr inbounds %struct.vec3d, ptr %229, i32 0, i32 0
  %231 = load double, ptr %230, align 8, !tbaa !26
  %232 = load double, ptr %5, align 8, !tbaa !13
  %233 = fmul double 5.000000e-01, %232
  %234 = load double, ptr %5, align 8, !tbaa !13
  %235 = fmul double %233, %234
  %236 = load ptr, ptr %6, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.molecule, ptr %236, i32 0, i32 7
  %238 = load ptr, ptr %237, align 8, !tbaa !28
  %239 = load i64, ptr %15, align 8, !tbaa !17
  %240 = getelementptr inbounds %struct.vec3d, ptr %238, i64 %239
  %241 = getelementptr inbounds %struct.vec3d, ptr %240, i32 0, i32 0
  %242 = load double, ptr %241, align 8, !tbaa !26
  %243 = fmul double %235, %242
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.molecule, ptr %244, i32 0, i32 3
  %246 = load ptr, ptr %245, align 8, !tbaa !29
  %247 = load i64, ptr %15, align 8, !tbaa !17
  %248 = getelementptr inbounds double, ptr %246, i64 %247
  %249 = load double, ptr %248, align 8, !tbaa !13
  %250 = fdiv double %243, %249
  %251 = call double @llvm.fmuladd.f64(double %224, double %231, double %250)
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.molecule, ptr %252, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !35
  %255 = load i64, ptr %15, align 8, !tbaa !17
  %256 = getelementptr inbounds %struct.vec3d, ptr %254, i64 %255
  %257 = getelementptr inbounds %struct.vec3d, ptr %256, i32 0, i32 0
  %258 = load double, ptr %257, align 8, !tbaa !26
  %259 = fadd double %258, %251
  store double %259, ptr %257, align 8, !tbaa !26
  %260 = load double, ptr %5, align 8, !tbaa !13
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.molecule, ptr %261, i32 0, i32 5
  %263 = load ptr, ptr %262, align 8, !tbaa !30
  %264 = load i64, ptr %15, align 8, !tbaa !17
  %265 = getelementptr inbounds %struct.vec3d, ptr %263, i64 %264
  %266 = getelementptr inbounds %struct.vec3d, ptr %265, i32 0, i32 1
  %267 = load double, ptr %266, align 8, !tbaa !31
  %268 = load double, ptr %5, align 8, !tbaa !13
  %269 = fmul double 5.000000e-01, %268
  %270 = load double, ptr %5, align 8, !tbaa !13
  %271 = fmul double %269, %270
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.molecule, ptr %272, i32 0, i32 7
  %274 = load ptr, ptr %273, align 8, !tbaa !28
  %275 = load i64, ptr %15, align 8, !tbaa !17
  %276 = getelementptr inbounds %struct.vec3d, ptr %274, i64 %275
  %277 = getelementptr inbounds %struct.vec3d, ptr %276, i32 0, i32 1
  %278 = load double, ptr %277, align 8, !tbaa !31
  %279 = fmul double %271, %278
  %280 = load ptr, ptr %6, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.molecule, ptr %280, i32 0, i32 3
  %282 = load ptr, ptr %281, align 8, !tbaa !29
  %283 = load i64, ptr %15, align 8, !tbaa !17
  %284 = getelementptr inbounds double, ptr %282, i64 %283
  %285 = load double, ptr %284, align 8, !tbaa !13
  %286 = fdiv double %279, %285
  %287 = call double @llvm.fmuladd.f64(double %260, double %267, double %286)
  %288 = load ptr, ptr %6, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.molecule, ptr %288, i32 0, i32 4
  %290 = load ptr, ptr %289, align 8, !tbaa !35
  %291 = load i64, ptr %15, align 8, !tbaa !17
  %292 = getelementptr inbounds %struct.vec3d, ptr %290, i64 %291
  %293 = getelementptr inbounds %struct.vec3d, ptr %292, i32 0, i32 1
  %294 = load double, ptr %293, align 8, !tbaa !31
  %295 = fadd double %294, %287
  store double %295, ptr %293, align 8, !tbaa !31
  %296 = load double, ptr %5, align 8, !tbaa !13
  %297 = load ptr, ptr %6, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.molecule, ptr %297, i32 0, i32 5
  %299 = load ptr, ptr %298, align 8, !tbaa !30
  %300 = load i64, ptr %15, align 8, !tbaa !17
  %301 = getelementptr inbounds %struct.vec3d, ptr %299, i64 %300
  %302 = getelementptr inbounds %struct.vec3d, ptr %301, i32 0, i32 2
  %303 = load double, ptr %302, align 8, !tbaa !32
  %304 = load double, ptr %5, align 8, !tbaa !13
  %305 = fmul double 5.000000e-01, %304
  %306 = load double, ptr %5, align 8, !tbaa !13
  %307 = fmul double %305, %306
  %308 = load ptr, ptr %6, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.molecule, ptr %308, i32 0, i32 7
  %310 = load ptr, ptr %309, align 8, !tbaa !28
  %311 = load i64, ptr %15, align 8, !tbaa !17
  %312 = getelementptr inbounds %struct.vec3d, ptr %310, i64 %311
  %313 = getelementptr inbounds %struct.vec3d, ptr %312, i32 0, i32 2
  %314 = load double, ptr %313, align 8, !tbaa !32
  %315 = fmul double %307, %314
  %316 = load ptr, ptr %6, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.molecule, ptr %316, i32 0, i32 3
  %318 = load ptr, ptr %317, align 8, !tbaa !29
  %319 = load i64, ptr %15, align 8, !tbaa !17
  %320 = getelementptr inbounds double, ptr %318, i64 %319
  %321 = load double, ptr %320, align 8, !tbaa !13
  %322 = fdiv double %315, %321
  %323 = call double @llvm.fmuladd.f64(double %296, double %303, double %322)
  %324 = load ptr, ptr %6, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.molecule, ptr %324, i32 0, i32 4
  %326 = load ptr, ptr %325, align 8, !tbaa !35
  %327 = load i64, ptr %15, align 8, !tbaa !17
  %328 = getelementptr inbounds %struct.vec3d, ptr %326, i64 %327
  %329 = getelementptr inbounds %struct.vec3d, ptr %328, i32 0, i32 2
  %330 = load double, ptr %329, align 8, !tbaa !32
  %331 = fadd double %330, %323
  store double %331, ptr %329, align 8, !tbaa !32
  %332 = load ptr, ptr %6, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.molecule, ptr %332, i32 0, i32 7
  %334 = load ptr, ptr %333, align 8, !tbaa !28
  %335 = load i64, ptr %15, align 8, !tbaa !17
  %336 = getelementptr inbounds %struct.vec3d, ptr %334, i64 %335
  %337 = getelementptr inbounds %struct.vec3d, ptr %336, i32 0, i32 0
  %338 = load double, ptr %337, align 8, !tbaa !26
  %339 = load ptr, ptr %6, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.molecule, ptr %339, i32 0, i32 6
  %341 = load ptr, ptr %340, align 8, !tbaa !25
  %342 = load i64, ptr %15, align 8, !tbaa !17
  %343 = getelementptr inbounds %struct.vec3d, ptr %341, i64 %342
  %344 = getelementptr inbounds %struct.vec3d, ptr %343, i32 0, i32 0
  store double %338, ptr %344, align 8, !tbaa !26
  %345 = load ptr, ptr %6, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.molecule, ptr %345, i32 0, i32 7
  %347 = load ptr, ptr %346, align 8, !tbaa !28
  %348 = load i64, ptr %15, align 8, !tbaa !17
  %349 = getelementptr inbounds %struct.vec3d, ptr %347, i64 %348
  %350 = getelementptr inbounds %struct.vec3d, ptr %349, i32 0, i32 1
  %351 = load double, ptr %350, align 8, !tbaa !31
  %352 = load ptr, ptr %6, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.molecule, ptr %352, i32 0, i32 6
  %354 = load ptr, ptr %353, align 8, !tbaa !25
  %355 = load i64, ptr %15, align 8, !tbaa !17
  %356 = getelementptr inbounds %struct.vec3d, ptr %354, i64 %355
  %357 = getelementptr inbounds %struct.vec3d, ptr %356, i32 0, i32 1
  store double %351, ptr %357, align 8, !tbaa !31
  %358 = load ptr, ptr %6, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.molecule, ptr %358, i32 0, i32 7
  %360 = load ptr, ptr %359, align 8, !tbaa !28
  %361 = load i64, ptr %15, align 8, !tbaa !17
  %362 = getelementptr inbounds %struct.vec3d, ptr %360, i64 %361
  %363 = getelementptr inbounds %struct.vec3d, ptr %362, i32 0, i32 2
  %364 = load double, ptr %363, align 8, !tbaa !32
  %365 = load ptr, ptr %6, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.molecule, ptr %365, i32 0, i32 6
  %367 = load ptr, ptr %366, align 8, !tbaa !25
  %368 = load i64, ptr %15, align 8, !tbaa !17
  %369 = getelementptr inbounds %struct.vec3d, ptr %367, i64 %368
  %370 = getelementptr inbounds %struct.vec3d, ptr %369, i32 0, i32 2
  store double %364, ptr %370, align 8, !tbaa !32
  br label %371

371:                                              ; preds = %223
  %372 = load i64, ptr %15, align 8, !tbaa !17
  %373 = add i64 %372, 1
  store i64 %373, ptr %15, align 8, !tbaa !17
  br label %216, !llvm.loop !36

374:                                              ; preds = %222
  br label %375

375:                                              ; preds = %374
  %376 = load i64, ptr %12, align 8, !tbaa !17
  %377 = add i64 %376, 1
  store i64 %377, ptr %12, align 8, !tbaa !17
  br label %64, !llvm.loop !37

378:                                              ; preds = %70
  %379 = load ptr, ptr %9, align 8, !tbaa !5
  %380 = call i32 @fclose(ptr noundef %379)
  %381 = load ptr, ptr %10, align 8, !tbaa !5
  %382 = call i32 @fclose(ptr noundef %381)
  %383 = load ptr, ptr %11, align 8, !tbaa !5
  %384 = call i32 @fclose(ptr noundef %383)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %385 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %385)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

declare void @maxwell_boltzmann_velocity_init(ptr noundef, double noundef) #2

declare void @enforce_temperature(ptr noundef, double noundef) #2

declare i64 @ensure_dir_exists(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

declare i32 @printf(ptr noundef, ...) #2

declare void @thermostat_berendsen_nvt(ptr noundef, double noundef, double noundef) #2

declare void @write_trajectory(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @fflush(ptr noundef) #2

declare void @write_velocities(ptr noundef, ptr noundef, i64 noundef) #2

declare void @write_forces(ptr noundef, ptr noundef, i64 noundef) #2

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

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 willreturn }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"md_context", !11, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48}
!11 = !{!"double", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !6, i64 16}
!15 = !{!"cmd_line_args", !12, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !12, i64 120, !12, i64 128}
!16 = !{!10, !11, i64 8}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !6, i64 72}
!19 = !{!"molecule", !12, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !12, i64 64, !6, i64 72}
!20 = !{!10, !6, i64 40}
!21 = !{!15, !12, i64 88}
!22 = !{!10, !12, i64 48}
!23 = !{!10, !6, i64 24}
!24 = !{!19, !12, i64 0}
!25 = !{!19, !6, i64 48}
!26 = !{!27, !11, i64 0}
!27 = !{!"vec3d", !11, i64 0, !11, i64 8, !11, i64 16}
!28 = !{!19, !6, i64 56}
!29 = !{!19, !6, i64 24}
!30 = !{!19, !6, i64 40}
!31 = !{!27, !11, i64 8}
!32 = !{!27, !11, i64 16}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!19, !6, i64 32}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}


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

%struct.vec3d = type { double, double, double }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @md_simulate(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = load double, ptr %1, align 8, !tbaa !5
  %4 = fmul double %3, 0x4044ABB21F172AB4
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = load double, ptr %7, align 8, !tbaa !14
  tail call void @maxwell_boltzmann_velocity_init(ptr noundef %6, double noundef %8) #5
  %9 = load double, ptr %7, align 8, !tbaa !14
  tail call void @enforce_temperature(ptr noundef %6, double noundef %9) #5
  %10 = tail call i64 @ensure_dir_exists(ptr noundef nonnull @.str) #5
  %11 = alloca [256 x i8], align 16
  %12 = load ptr, ptr %5, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %12, i64 72
  %14 = load ptr, ptr %13, align 8, !tbaa !15
  %15 = getelementptr inbounds i8, ptr %1, i64 40
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 256, ptr noundef nonnull @.str.1, ptr noundef %14, ptr noundef %16) #5
  %18 = call noalias ptr @fopen(ptr noundef nonnull %11, ptr noundef nonnull @.str.2)
  %19 = load ptr, ptr %5, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %19, i64 72
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = load ptr, ptr %15, align 8, !tbaa !17
  %23 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 256, ptr noundef nonnull @.str.3, ptr noundef %21, ptr noundef %22) #5
  %24 = call noalias ptr @fopen(ptr noundef nonnull %11, ptr noundef nonnull @.str.2)
  %25 = load ptr, ptr %5, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %25, i64 72
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = load ptr, ptr %15, align 8, !tbaa !17
  %29 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 256, ptr noundef nonnull @.str.4, ptr noundef %27, ptr noundef %28) #5
  %30 = call noalias ptr @fopen(ptr noundef nonnull %11, ptr noundef nonnull @.str.2)
  %31 = getelementptr inbounds i8, ptr %0, i64 88
  %32 = load i64, ptr %31, align 8, !tbaa !18
  %.not126 = icmp eq i64 %32, 0
  br i1 %.not126, label %._crit_edge125, label %.lr.ph124

.lr.ph124:                                        ; preds = %2
  %33 = getelementptr inbounds i8, ptr %1, i64 48
  %34 = getelementptr inbounds i8, ptr %1, i64 24
  %35 = fmul double %4, 5.000000e-01
  %36 = getelementptr inbounds i8, ptr %6, i64 48
  %37 = getelementptr inbounds i8, ptr %6, i64 56
  %38 = getelementptr inbounds i8, ptr %6, i64 24
  %39 = getelementptr inbounds i8, ptr %6, i64 40
  %40 = fmul double %4, %35
  %41 = getelementptr inbounds i8, ptr %6, i64 32
  %broadcast.splatinsert218 = insertelement <2 x double> poison, double %35, i64 0
  %broadcast.splat219 = shufflevector <2 x double> %broadcast.splatinsert218, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert = insertelement <2 x double> poison, double %40, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert176 = insertelement <2 x double> poison, double %4, i64 0
  %broadcast.splat177 = shufflevector <2 x double> %broadcast.splatinsert176, <2 x double> poison, <2 x i32> zeroinitializer
  br label %45

._crit_edge125:                                   ; preds = %._crit_edge, %2
  %42 = tail call i32 @fclose(ptr noundef %18)
  %43 = tail call i32 @fclose(ptr noundef %24)
  %44 = tail call i32 @fclose(ptr noundef %30)
  ret void

45:                                               ; preds = %.lr.ph124, %._crit_edge
  %.0118122 = phi i64 [ 0, %.lr.ph124 ], [ %296, %._crit_edge ]
  store i64 %.0118122, ptr %33, align 8, !tbaa !19
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %.0118122)
  %47 = load ptr, ptr %34, align 8, !tbaa !20
  tail call void %47(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %.not = icmp eq i64 %.0118122, 0
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %45
  %48 = load i64, ptr %6, align 8, !tbaa !21
  %.not127 = icmp eq i64 %48, 0
  br i1 %.not127, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %49 = load ptr, ptr %36, align 8, !tbaa !22
  %50 = load ptr, ptr %37, align 8, !tbaa !23
  %51 = load ptr, ptr %38, align 8, !tbaa !24
  %52 = load ptr, ptr %39, align 8, !tbaa !25
  %min.iters.check211 = icmp eq i64 %48, 1
  br i1 %min.iters.check211, label %scalar.ph210.preheader, label %vector.scevcheck181

vector.scevcheck181:                              ; preds = %.lr.ph
  %53 = add i64 %48, -1
  %scevgep182 = getelementptr i8, ptr %52, i64 16
  %mul183 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %53, i64 24)
  %mul.result184 = extractvalue { i64, i1 } %mul183, 0
  %mul.overflow185 = extractvalue { i64, i1 } %mul183, 1
  %54 = getelementptr i8, ptr %scevgep182, i64 %mul.result184
  %55 = icmp ult ptr %54, %scevgep182
  %56 = or i1 %55, %mul.overflow185
  %scevgep186 = getelementptr i8, ptr %52, i64 8
  %mul187 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %53, i64 24)
  %mul.result188 = extractvalue { i64, i1 } %mul187, 0
  %mul.overflow189 = extractvalue { i64, i1 } %mul187, 1
  %57 = getelementptr i8, ptr %scevgep186, i64 %mul.result188
  %58 = icmp ult ptr %57, %scevgep186
  %59 = or i1 %58, %mul.overflow189
  %mul190 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %53, i64 24)
  %mul.result191 = extractvalue { i64, i1 } %mul190, 0
  %mul.overflow192 = extractvalue { i64, i1 } %mul190, 1
  %60 = getelementptr i8, ptr %52, i64 %mul.result191
  %61 = icmp ult ptr %60, %52
  %62 = or i1 %61, %mul.overflow192
  %63 = or i1 %56, %59
  %64 = or i1 %63, %62
  br i1 %64, label %scalar.ph210.preheader, label %vector.memcheck193

vector.memcheck193:                               ; preds = %vector.scevcheck181
  %65 = mul i64 %48, 24
  %scevgep194 = getelementptr i8, ptr %52, i64 %65
  %scevgep195 = getelementptr i8, ptr %49, i64 %65
  %scevgep196 = getelementptr i8, ptr %50, i64 %65
  %66 = shl i64 %48, 3
  %scevgep197 = getelementptr i8, ptr %51, i64 %66
  %bound0198 = icmp ult ptr %52, %scevgep195
  %bound1199 = icmp ult ptr %49, %scevgep194
  %found.conflict200 = and i1 %bound0198, %bound1199
  %bound0201 = icmp ult ptr %52, %scevgep196
  %bound1202 = icmp ult ptr %50, %scevgep194
  %found.conflict203 = and i1 %bound0201, %bound1202
  %conflict.rdx204 = or i1 %found.conflict200, %found.conflict203
  %bound0205 = icmp ult ptr %52, %scevgep197
  %bound1206 = icmp ult ptr %51, %scevgep194
  %found.conflict207 = and i1 %bound0205, %bound1206
  %conflict.rdx208 = or i1 %conflict.rdx204, %found.conflict207
  br i1 %conflict.rdx208, label %scalar.ph210.preheader, label %vector.ph212

vector.ph212:                                     ; preds = %vector.memcheck193
  %n.vec214 = and i64 %48, -2
  br label %vector.body216

vector.body216:                                   ; preds = %vector.body216, %vector.ph212
  %index217 = phi i64 [ 0, %vector.ph212 ], [ %index.next224, %vector.body216 ]
  %67 = or disjoint i64 %index217, 1
  %68 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %index217
  %69 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %67
  %70 = load double, ptr %68, align 8, !tbaa !26, !alias.scope !28
  %71 = load double, ptr %69, align 8, !tbaa !26, !alias.scope !28
  %72 = insertelement <2 x double> poison, double %70, i64 0
  %73 = insertelement <2 x double> %72, double %71, i64 1
  %74 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %index217
  %75 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %67
  %76 = load double, ptr %74, align 8, !tbaa !26, !alias.scope !31
  %77 = load double, ptr %75, align 8, !tbaa !26, !alias.scope !31
  %78 = insertelement <2 x double> poison, double %76, i64 0
  %79 = insertelement <2 x double> %78, double %77, i64 1
  %80 = fadd <2 x double> %73, %79
  %81 = fmul <2 x double> %broadcast.splat219, %80
  %82 = getelementptr inbounds double, ptr %51, i64 %index217
  %wide.load220 = load <2 x double>, ptr %82, align 8, !tbaa !33, !alias.scope !34
  %83 = fdiv <2 x double> %81, %wide.load220
  %84 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %index217
  %85 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %67
  %86 = load double, ptr %84, align 8, !tbaa !26, !alias.scope !36, !noalias !38
  %87 = load double, ptr %85, align 8, !tbaa !26, !alias.scope !36, !noalias !38
  %88 = insertelement <2 x double> poison, double %86, i64 0
  %89 = insertelement <2 x double> %88, double %87, i64 1
  %90 = fadd <2 x double> %83, %89
  %91 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %index217, i32 1
  %92 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %67, i32 1
  %93 = load double, ptr %91, align 8, !tbaa !39, !alias.scope !28
  %94 = load double, ptr %92, align 8, !tbaa !39, !alias.scope !28
  %95 = insertelement <2 x double> poison, double %93, i64 0
  %96 = insertelement <2 x double> %95, double %94, i64 1
  %97 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %index217, i32 1
  %98 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %67, i32 1
  %99 = load double, ptr %97, align 8, !tbaa !39, !alias.scope !31
  %100 = load double, ptr %98, align 8, !tbaa !39, !alias.scope !31
  %101 = insertelement <2 x double> poison, double %99, i64 0
  %102 = insertelement <2 x double> %101, double %100, i64 1
  %103 = fadd <2 x double> %96, %102
  %104 = fmul <2 x double> %broadcast.splat219, %103
  %wide.load221 = load <2 x double>, ptr %82, align 8, !tbaa !33, !alias.scope !34
  %105 = fdiv <2 x double> %104, %wide.load221
  %106 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %index217, i32 1
  %107 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %67, i32 1
  %108 = load double, ptr %106, align 8, !tbaa !39, !alias.scope !36, !noalias !38
  %109 = load double, ptr %107, align 8, !tbaa !39, !alias.scope !36, !noalias !38
  %110 = insertelement <2 x double> poison, double %108, i64 0
  %111 = insertelement <2 x double> %110, double %109, i64 1
  %112 = fadd <2 x double> %111, %105
  %113 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %index217, i32 2
  %114 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %67, i32 2
  %115 = load double, ptr %113, align 8, !tbaa !40, !alias.scope !28
  %116 = load double, ptr %114, align 8, !tbaa !40, !alias.scope !28
  %117 = insertelement <2 x double> poison, double %115, i64 0
  %118 = insertelement <2 x double> %117, double %116, i64 1
  %119 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %index217, i32 2
  %120 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %67, i32 2
  %121 = load double, ptr %119, align 8, !tbaa !40, !alias.scope !31
  %122 = load double, ptr %120, align 8, !tbaa !40, !alias.scope !31
  %123 = insertelement <2 x double> poison, double %121, i64 0
  %124 = insertelement <2 x double> %123, double %122, i64 1
  %125 = fadd <2 x double> %118, %124
  %126 = fmul <2 x double> %broadcast.splat219, %125
  %wide.load222 = load <2 x double>, ptr %82, align 8, !tbaa !33, !alias.scope !34
  %127 = fdiv <2 x double> %126, %wide.load222
  %128 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %index217, i32 2
  %129 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %67, i32 2
  %130 = load double, ptr %128, align 8, !tbaa !40, !alias.scope !36, !noalias !38
  %131 = load double, ptr %129, align 8, !tbaa !40, !alias.scope !36, !noalias !38
  %132 = insertelement <2 x double> poison, double %130, i64 0
  %133 = insertelement <2 x double> %132, double %131, i64 1
  %134 = fadd <2 x double> %133, %127
  %135 = getelementptr inbounds i8, ptr %128, i64 -16
  %136 = shufflevector <2 x double> %90, <2 x double> %112, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %137 = shufflevector <2 x double> %134, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %interleaved.vec223 = shufflevector <4 x double> %136, <4 x double> %137, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
  store <6 x double> %interleaved.vec223, ptr %135, align 8, !tbaa !33
  %index.next224 = add nuw i64 %index217, 2
  %138 = icmp eq i64 %index.next224, %n.vec214
  br i1 %138, label %middle.block209, label %vector.body216, !llvm.loop !41

middle.block209:                                  ; preds = %vector.body216
  %cmp.n225 = icmp eq i64 %48, %n.vec214
  br i1 %cmp.n225, label %.loopexit, label %scalar.ph210.preheader

scalar.ph210.preheader:                           ; preds = %middle.block209, %vector.memcheck193, %vector.scevcheck181, %.lr.ph
  %.0117119.ph = phi i64 [ 0, %vector.memcheck193 ], [ 0, %vector.scevcheck181 ], [ 0, %.lr.ph ], [ %n.vec214, %middle.block209 ]
  br label %scalar.ph210

scalar.ph210:                                     ; preds = %scalar.ph210.preheader, %scalar.ph210
  %.0117119 = phi i64 [ %173, %scalar.ph210 ], [ %.0117119.ph, %scalar.ph210.preheader ]
  %139 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %.0117119
  %140 = load double, ptr %139, align 8, !tbaa !26
  %141 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %.0117119
  %142 = load double, ptr %141, align 8, !tbaa !26
  %143 = fadd double %140, %142
  %144 = fmul double %35, %143
  %145 = getelementptr inbounds double, ptr %51, i64 %.0117119
  %146 = load double, ptr %145, align 8, !tbaa !33
  %147 = fdiv double %144, %146
  %148 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %.0117119
  %149 = load double, ptr %148, align 8, !tbaa !26
  %150 = fadd double %147, %149
  store double %150, ptr %148, align 8, !tbaa !26
  %151 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %.0117119, i32 1
  %152 = load double, ptr %151, align 8, !tbaa !39
  %153 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %.0117119, i32 1
  %154 = load double, ptr %153, align 8, !tbaa !39
  %155 = fadd double %152, %154
  %156 = fmul double %35, %155
  %157 = load double, ptr %145, align 8, !tbaa !33
  %158 = fdiv double %156, %157
  %159 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %.0117119, i32 1
  %160 = load double, ptr %159, align 8, !tbaa !39
  %161 = fadd double %160, %158
  store double %161, ptr %159, align 8, !tbaa !39
  %162 = getelementptr inbounds %struct.vec3d, ptr %49, i64 %.0117119, i32 2
  %163 = load double, ptr %162, align 8, !tbaa !40
  %164 = getelementptr inbounds %struct.vec3d, ptr %50, i64 %.0117119, i32 2
  %165 = load double, ptr %164, align 8, !tbaa !40
  %166 = fadd double %163, %165
  %167 = fmul double %35, %166
  %168 = load double, ptr %145, align 8, !tbaa !33
  %169 = fdiv double %167, %168
  %170 = getelementptr inbounds %struct.vec3d, ptr %52, i64 %.0117119, i32 2
  %171 = load double, ptr %170, align 8, !tbaa !40
  %172 = fadd double %171, %169
  store double %172, ptr %170, align 8, !tbaa !40
  %173 = add nuw i64 %.0117119, 1
  %exitcond.not = icmp eq i64 %173, %48
  br i1 %exitcond.not, label %.loopexit, label %scalar.ph210, !llvm.loop !45

.loopexit:                                        ; preds = %scalar.ph210, %middle.block209, %.preheader, %45
  %174 = load double, ptr %7, align 8, !tbaa !14
  tail call void @thermostat_berendsen_nvt(ptr noundef %6, double noundef %174, double noundef 1.000000e-03) #5
  tail call void @write_trajectory(ptr noundef %18, ptr noundef %6, i64 noundef %.0118122) #5
  %175 = tail call i32 @fflush(ptr noundef %18)
  tail call void @write_velocities(ptr noundef %30, ptr noundef %6, i64 noundef %.0118122) #5
  %176 = tail call i32 @fflush(ptr noundef %30)
  tail call void @write_forces(ptr noundef %24, ptr noundef %6, i64 noundef %.0118122) #5
  %177 = tail call i32 @fflush(ptr noundef %24)
  %178 = load i64, ptr %6, align 8, !tbaa !21
  %.not128 = icmp eq i64 %178, 0
  br i1 %.not128, label %._crit_edge, label %.lr.ph121

.lr.ph121:                                        ; preds = %.loopexit
  %179 = load ptr, ptr %39, align 8, !tbaa !25
  %180 = load ptr, ptr %37, align 8, !tbaa !23
  %181 = load ptr, ptr %38, align 8, !tbaa !24
  %182 = load ptr, ptr %41, align 8, !tbaa !46
  %183 = load ptr, ptr %36, align 8, !tbaa !22
  %min.iters.check = icmp ult i64 %178, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.lr.ph121
  %.0120.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %vector.scevcheck ], [ 0, %.lr.ph121 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.scevcheck:                                 ; preds = %.lr.ph121
  %184 = add i64 %178, -1
  %scevgep = getelementptr i8, ptr %183, i64 8
  %mul = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %184, i64 24)
  %mul.result = extractvalue { i64, i1 } %mul, 0
  %mul.overflow = extractvalue { i64, i1 } %mul, 1
  %185 = getelementptr i8, ptr %scevgep, i64 %mul.result
  %186 = icmp ult ptr %185, %scevgep
  %187 = or i1 %186, %mul.overflow
  %scevgep130 = getelementptr i8, ptr %183, i64 16
  %mul131 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %184, i64 24)
  %mul.result132 = extractvalue { i64, i1 } %mul131, 0
  %mul.overflow133 = extractvalue { i64, i1 } %mul131, 1
  %188 = getelementptr i8, ptr %scevgep130, i64 %mul.result132
  %189 = icmp ult ptr %188, %scevgep130
  %190 = or i1 %189, %mul.overflow133
  %mul134 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %184, i64 24)
  %mul.result135 = extractvalue { i64, i1 } %mul134, 0
  %mul.overflow136 = extractvalue { i64, i1 } %mul134, 1
  %191 = getelementptr i8, ptr %183, i64 %mul.result135
  %192 = icmp ult ptr %191, %183
  %193 = or i1 %192, %mul.overflow136
  %scevgep137 = getelementptr i8, ptr %182, i64 16
  %mul138 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %184, i64 24)
  %mul.result139 = extractvalue { i64, i1 } %mul138, 0
  %mul.overflow140 = extractvalue { i64, i1 } %mul138, 1
  %194 = getelementptr i8, ptr %scevgep137, i64 %mul.result139
  %195 = icmp ult ptr %194, %scevgep137
  %196 = or i1 %195, %mul.overflow140
  %scevgep141 = getelementptr i8, ptr %182, i64 8
  %mul142 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %184, i64 24)
  %mul.result143 = extractvalue { i64, i1 } %mul142, 0
  %mul.overflow144 = extractvalue { i64, i1 } %mul142, 1
  %197 = getelementptr i8, ptr %scevgep141, i64 %mul.result143
  %198 = icmp ult ptr %197, %scevgep141
  %199 = or i1 %198, %mul.overflow144
  %mul145 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %184, i64 24)
  %mul.result146 = extractvalue { i64, i1 } %mul145, 0
  %mul.overflow147 = extractvalue { i64, i1 } %mul145, 1
  %200 = getelementptr i8, ptr %182, i64 %mul.result146
  %201 = icmp ult ptr %200, %182
  %202 = or i1 %201, %mul.overflow147
  %203 = or i1 %187, %190
  %204 = or i1 %203, %193
  %205 = or i1 %204, %196
  %206 = or i1 %205, %199
  %207 = or i1 %206, %202
  br i1 %207, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %208 = mul i64 %178, 24
  %scevgep148 = getelementptr i8, ptr %182, i64 %208
  %scevgep149 = getelementptr i8, ptr %183, i64 %208
  %scevgep150 = getelementptr i8, ptr %179, i64 %208
  %scevgep151 = getelementptr i8, ptr %180, i64 %208
  %209 = shl i64 %178, 3
  %scevgep152 = getelementptr i8, ptr %181, i64 %209
  %bound0 = icmp ult ptr %182, %scevgep149
  %bound1 = icmp ult ptr %183, %scevgep148
  %found.conflict = and i1 %bound0, %bound1
  %bound0153 = icmp ult ptr %182, %scevgep150
  %bound1154 = icmp ult ptr %179, %scevgep148
  %found.conflict155 = and i1 %bound0153, %bound1154
  %conflict.rdx = or i1 %found.conflict, %found.conflict155
  %bound0156 = icmp ult ptr %182, %scevgep151
  %bound1157 = icmp ult ptr %180, %scevgep148
  %found.conflict158 = and i1 %bound0156, %bound1157
  %conflict.rdx159 = or i1 %conflict.rdx, %found.conflict158
  %bound0160 = icmp ult ptr %182, %scevgep152
  %bound1161 = icmp ult ptr %181, %scevgep148
  %found.conflict162 = and i1 %bound0160, %bound1161
  %conflict.rdx163 = or i1 %conflict.rdx159, %found.conflict162
  %bound0164 = icmp ult ptr %183, %scevgep150
  %bound1165 = icmp ult ptr %179, %scevgep149
  %found.conflict166 = and i1 %bound0164, %bound1165
  %conflict.rdx167 = or i1 %conflict.rdx163, %found.conflict166
  %bound0168 = icmp ult ptr %183, %scevgep151
  %bound1169 = icmp ult ptr %180, %scevgep149
  %found.conflict170 = and i1 %bound0168, %bound1169
  %conflict.rdx171 = or i1 %conflict.rdx167, %found.conflict170
  %bound0172 = icmp ult ptr %183, %scevgep152
  %bound1173 = icmp ult ptr %181, %scevgep149
  %found.conflict174 = and i1 %bound0172, %bound1173
  %conflict.rdx175 = or i1 %conflict.rdx171, %found.conflict174
  br i1 %conflict.rdx175, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %178, -2
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %210 = or disjoint i64 %index, 1
  %211 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %index
  %212 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %210
  %213 = load double, ptr %211, align 8, !tbaa !26, !alias.scope !47
  %214 = load double, ptr %212, align 8, !tbaa !26, !alias.scope !47
  %215 = insertelement <2 x double> poison, double %213, i64 0
  %216 = insertelement <2 x double> %215, double %214, i64 1
  %217 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %index
  %218 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %210
  %219 = load double, ptr %217, align 8, !tbaa !26, !alias.scope !50
  %220 = load double, ptr %218, align 8, !tbaa !26, !alias.scope !50
  %221 = insertelement <2 x double> poison, double %219, i64 0
  %222 = insertelement <2 x double> %221, double %220, i64 1
  %223 = fmul <2 x double> %broadcast.splat, %222
  %224 = getelementptr inbounds double, ptr %181, i64 %index
  %wide.load = load <2 x double>, ptr %224, align 8, !tbaa !33, !alias.scope !52
  %225 = fdiv <2 x double> %223, %wide.load
  %226 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat177, <2 x double> %216, <2 x double> %225)
  %227 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %index
  %228 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %210
  %229 = load double, ptr %227, align 8, !tbaa !26, !alias.scope !54, !noalias !56
  %230 = load double, ptr %228, align 8, !tbaa !26, !alias.scope !54, !noalias !56
  %231 = insertelement <2 x double> poison, double %229, i64 0
  %232 = insertelement <2 x double> %231, double %230, i64 1
  %233 = fadd <2 x double> %232, %226
  %234 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %index, i32 1
  %235 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %210, i32 1
  %236 = load double, ptr %234, align 8, !tbaa !39, !alias.scope !47
  %237 = load double, ptr %235, align 8, !tbaa !39, !alias.scope !47
  %238 = insertelement <2 x double> poison, double %236, i64 0
  %239 = insertelement <2 x double> %238, double %237, i64 1
  %240 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %index, i32 1
  %241 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %210, i32 1
  %242 = load double, ptr %240, align 8, !tbaa !39, !alias.scope !50
  %243 = load double, ptr %241, align 8, !tbaa !39, !alias.scope !50
  %244 = insertelement <2 x double> poison, double %242, i64 0
  %245 = insertelement <2 x double> %244, double %243, i64 1
  %246 = fmul <2 x double> %broadcast.splat, %245
  %wide.load178 = load <2 x double>, ptr %224, align 8, !tbaa !33, !alias.scope !52
  %247 = fdiv <2 x double> %246, %wide.load178
  %248 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat177, <2 x double> %239, <2 x double> %247)
  %249 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %index, i32 1
  %250 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %210, i32 1
  %251 = load double, ptr %249, align 8, !tbaa !39, !alias.scope !54, !noalias !56
  %252 = load double, ptr %250, align 8, !tbaa !39, !alias.scope !54, !noalias !56
  %253 = insertelement <2 x double> poison, double %251, i64 0
  %254 = insertelement <2 x double> %253, double %252, i64 1
  %255 = fadd <2 x double> %254, %248
  %256 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %index, i32 2
  %257 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %210, i32 2
  %258 = load double, ptr %256, align 8, !tbaa !40, !alias.scope !47
  %259 = load double, ptr %257, align 8, !tbaa !40, !alias.scope !47
  %260 = insertelement <2 x double> poison, double %258, i64 0
  %261 = insertelement <2 x double> %260, double %259, i64 1
  %262 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %index, i32 2
  %263 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %210, i32 2
  %264 = load double, ptr %262, align 8, !tbaa !40, !alias.scope !50
  %265 = load double, ptr %263, align 8, !tbaa !40, !alias.scope !50
  %266 = insertelement <2 x double> poison, double %264, i64 0
  %267 = insertelement <2 x double> %266, double %265, i64 1
  %268 = fmul <2 x double> %broadcast.splat, %267
  %wide.load179 = load <2 x double>, ptr %224, align 8, !tbaa !33, !alias.scope !52
  %269 = fdiv <2 x double> %268, %wide.load179
  %270 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat177, <2 x double> %261, <2 x double> %269)
  %271 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %index, i32 2
  %272 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %210, i32 2
  %273 = load double, ptr %271, align 8, !tbaa !40, !alias.scope !54, !noalias !56
  %274 = load double, ptr %272, align 8, !tbaa !40, !alias.scope !54, !noalias !56
  %275 = insertelement <2 x double> poison, double %273, i64 0
  %276 = insertelement <2 x double> %275, double %274, i64 1
  %277 = fadd <2 x double> %276, %270
  %278 = getelementptr inbounds i8, ptr %271, i64 -16
  %279 = shufflevector <2 x double> %233, <2 x double> %255, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %280 = shufflevector <2 x double> %277, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %interleaved.vec = shufflevector <4 x double> %279, <4 x double> %280, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
  store <6 x double> %interleaved.vec, ptr %278, align 8, !tbaa !33
  %281 = load double, ptr %217, align 8, !tbaa !26, !alias.scope !50
  %282 = load double, ptr %218, align 8, !tbaa !26, !alias.scope !50
  %283 = insertelement <2 x double> poison, double %281, i64 0
  %284 = insertelement <2 x double> %283, double %282, i64 1
  %285 = load double, ptr %240, align 8, !tbaa !39, !alias.scope !50
  %286 = load double, ptr %241, align 8, !tbaa !39, !alias.scope !50
  %287 = insertelement <2 x double> poison, double %285, i64 0
  %288 = insertelement <2 x double> %287, double %286, i64 1
  %289 = load double, ptr %262, align 8, !tbaa !40, !alias.scope !50
  %290 = load double, ptr %263, align 8, !tbaa !40, !alias.scope !50
  %291 = insertelement <4 x double> poison, double %289, i64 0
  %292 = insertelement <4 x double> %291, double %290, i64 1
  %293 = getelementptr inbounds %struct.vec3d, ptr %183, i64 %index
  %294 = shufflevector <2 x double> %284, <2 x double> %288, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %interleaved.vec180 = shufflevector <4 x double> %294, <4 x double> %292, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
  store <6 x double> %interleaved.vec180, ptr %293, align 8, !tbaa !33
  %index.next = add nuw i64 %index, 2
  %295 = icmp eq i64 %index.next, %n.vec
  br i1 %295, label %middle.block, label %vector.body, !llvm.loop !58

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %178, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %.loopexit
  %296 = add nuw i64 %.0118122, 1
  %297 = load i64, ptr %31, align 8, !tbaa !18
  %298 = icmp ult i64 %296, %297
  br i1 %298, label %45, label %._crit_edge125, !llvm.loop !59

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.0120 = phi i64 [ %337, %scalar.ph ], [ %.0120.ph, %scalar.ph.preheader ]
  %299 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %.0120
  %300 = load double, ptr %299, align 8, !tbaa !26
  %301 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %.0120
  %302 = load double, ptr %301, align 8, !tbaa !26
  %303 = fmul double %40, %302
  %304 = getelementptr inbounds double, ptr %181, i64 %.0120
  %305 = load double, ptr %304, align 8, !tbaa !33
  %306 = fdiv double %303, %305
  %307 = tail call double @llvm.fmuladd.f64(double %4, double %300, double %306)
  %308 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %.0120
  %309 = load double, ptr %308, align 8, !tbaa !26
  %310 = fadd double %309, %307
  store double %310, ptr %308, align 8, !tbaa !26
  %311 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %.0120, i32 1
  %312 = load double, ptr %311, align 8, !tbaa !39
  %313 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %.0120, i32 1
  %314 = load double, ptr %313, align 8, !tbaa !39
  %315 = fmul double %40, %314
  %316 = load double, ptr %304, align 8, !tbaa !33
  %317 = fdiv double %315, %316
  %318 = tail call double @llvm.fmuladd.f64(double %4, double %312, double %317)
  %319 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %.0120, i32 1
  %320 = load double, ptr %319, align 8, !tbaa !39
  %321 = fadd double %320, %318
  store double %321, ptr %319, align 8, !tbaa !39
  %322 = getelementptr inbounds %struct.vec3d, ptr %179, i64 %.0120, i32 2
  %323 = load double, ptr %322, align 8, !tbaa !40
  %324 = getelementptr inbounds %struct.vec3d, ptr %180, i64 %.0120, i32 2
  %325 = load double, ptr %324, align 8, !tbaa !40
  %326 = fmul double %40, %325
  %327 = load double, ptr %304, align 8, !tbaa !33
  %328 = fdiv double %326, %327
  %329 = tail call double @llvm.fmuladd.f64(double %4, double %323, double %328)
  %330 = getelementptr inbounds %struct.vec3d, ptr %182, i64 %.0120, i32 2
  %331 = load double, ptr %330, align 8, !tbaa !40
  %332 = fadd double %331, %329
  store double %332, ptr %330, align 8, !tbaa !40
  %333 = getelementptr inbounds %struct.vec3d, ptr %183, i64 %.0120
  %334 = load <2 x double>, ptr %301, align 8, !tbaa !33
  store <2 x double> %334, ptr %333, align 8, !tbaa !33
  %335 = load double, ptr %324, align 8, !tbaa !40
  %336 = getelementptr inbounds %struct.vec3d, ptr %183, i64 %.0120, i32 2
  store double %335, ptr %336, align 8, !tbaa !40
  %337 = add nuw i64 %.0120, 1
  %exitcond129.not = icmp eq i64 %337, %178
  br i1 %exitcond129.not, label %._crit_edge, label %scalar.ph, !llvm.loop !60
}

declare void @maxwell_boltzmann_velocity_init(ptr noundef, double noundef) local_unnamed_addr #1

declare void @enforce_temperature(ptr noundef, double noundef) local_unnamed_addr #1

declare i64 @ensure_dir_exists(ptr noundef) local_unnamed_addr #1

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

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

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

declare void @thermostat_berendsen_nvt(ptr noundef, double noundef, double noundef) local_unnamed_addr #1

declare void @write_trajectory(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

declare void @write_velocities(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @write_forces(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"md_context", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !10, i64 16}
!13 = !{!"cmd_line_args", !11, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !11, i64 128}
!14 = !{!6, !7, i64 8}
!15 = !{!16, !10, i64 72}
!16 = !{!"molecule", !11, i64 0, !11, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !11, i64 64, !10, i64 72}
!17 = !{!6, !10, i64 40}
!18 = !{!13, !11, i64 88}
!19 = !{!6, !11, i64 48}
!20 = !{!6, !10, i64 24}
!21 = !{!16, !11, i64 0}
!22 = !{!16, !10, i64 48}
!23 = !{!16, !10, i64 56}
!24 = !{!16, !10, i64 24}
!25 = !{!16, !10, i64 40}
!26 = !{!27, !7, i64 0}
!27 = !{!"vec3d", !7, i64 0, !7, i64 8, !7, i64 16}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32}
!32 = distinct !{!32, !30}
!33 = !{!7, !7, i64 0}
!34 = !{!35}
!35 = distinct !{!35, !30}
!36 = !{!37}
!37 = distinct !{!37, !30}
!38 = !{!29, !32, !35}
!39 = !{!27, !7, i64 8}
!40 = !{!27, !7, i64 16}
!41 = distinct !{!41, !42, !43, !44}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!"llvm.loop.isvectorized", i32 1}
!44 = !{!"llvm.loop.unroll.runtime.disable"}
!45 = distinct !{!45, !42, !43}
!46 = !{!16, !10, i64 32}
!47 = !{!48}
!48 = distinct !{!48, !49}
!49 = distinct !{!49, !"LVerDomain"}
!50 = !{!51}
!51 = distinct !{!51, !49}
!52 = !{!53}
!53 = distinct !{!53, !49}
!54 = !{!55}
!55 = distinct !{!55, !49}
!56 = !{!57, !48, !51, !53}
!57 = distinct !{!57, !49}
!58 = distinct !{!58, !42, !43, !44}
!59 = distinct !{!59, !42}
!60 = distinct !{!60, !42, !43}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass