; LLVM IR from alexzheng42/sDMD :: src (Initialization)

; 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.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.REMDStr = type { i32, i32, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }
%struct.AtomStr = type { ptr, ptr }
%struct.PropertyStr = type { [8 x i8], [2 x [16 x i8]], [8 x i8], i32, i32, i32, double, double, [3 x double], %struct.AtomSeqStr, ptr, ptr }
%struct.AtomSeqStr = type { i32, i32, i32 }

@.str.2 = external hidden unnamed_addr constant [71 x i8], align 1
@boxDimension = external global [4 x double], align 16
@wallDyn = external global %struct.DynamicWallStr, align 8
@REMDInfo = external global %struct.REMDStr, align 8
@targetTemperature = external global double, align 8
@seed = external global i32, align 4
@wallExist = external global [20 x i8], align 16
@.str.88 = external hidden unnamed_addr constant [3 x i8], align 1
@obstObj = external global %struct.ObstructionStr, align 8
@CG = external global %struct.CGGovStr, align 8
@atomnum = external global i32, align 4
@numofprotein = external global i32, align 4
@totalAminoAcids = external global i32, align 4
@atom = external global ptr, align 8
@protein = external global ptr, align 8
@aminoacid = external global ptr, align 8
@connectionMap = external global ptr, align 8
@frame = external global i64, align 8
@currenttime = external global double, align 8
@cutoffr = external global double, align 8
@oldTemperature = external global double, align 8
@temperatureType = external global [20 x i8], align 16
@oldcurrenttime = external global double, align 8
@collisioneventsum = external global i64, align 8
@HBeventsum = external global i64, align 8
@bondeventsum = external global i64, align 8
@HBNeighboreventsum = external global i64, align 8
@thermostateventsum = external global i64, align 8
@pbcandcrosseventsum = external global i64, align 8
@walleventsum = external global i64, align 8
@oldtotaleventsum = external global i64, align 8
@cellnum = external global [4 x i32], align 16
@celllist = external global ptr, align 8
@cellsize = external global [4 x double], align 16
@HBnumformed = external global i32, align 4
@alphaHBformed = external global i32, align 4
@.str.97 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [65 x i8], align 1
@warningsum = external global i64, align 8
@outputrate = external global double, align 8
@.str.100 = external hidden unnamed_addr constant [65 x i8], align 1
@Methodtype = external global [20 x i8], align 16
@.str.101 = external hidden unnamed_addr constant [64 x i8], align 1
@timestep = external global double, align 8
@.str.102 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [77 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: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind
declare void @srand(i32 noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @ReadModel() #6

; Function Attrs: nounwind uwtable
declare dso_local void @CreatePotentialMatrix() #6

; Function Attrs: nounwind uwtable
declare dso_local void @ReadHB() #6

; Function Attrs: nounwind uwtable
declare dso_local void @InitializeCharge() #6

; Function Attrs: nounwind uwtable
declare dso_local void @ReadWall() #6

declare void @InitializeCG() #3

; Function Attrs: nounwind uwtable
declare dso_local void @CreateFlow() #6

; Function Attrs: nounwind uwtable
declare dso_local void @InitializeOthers() #6

; Function Attrs: nounwind uwtable
define dso_local void @ReadBreakPoint(ptr noundef %0) #6 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca [20 x i8], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 20, ptr %5) #7
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = call i64 @fread(ptr noundef @atomnum, i64 noundef 4, i64 noundef 1, ptr noundef %13)
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = call i64 @fread(ptr noundef @numofprotein, i64 noundef 4, i64 noundef 1, ptr noundef %15)
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = call i64 @fread(ptr noundef @totalAminoAcids, i64 noundef 4, i64 noundef 1, ptr noundef %17)
  %19 = load i32, ptr @atomnum, align 4, !tbaa !9
  %20 = add nsw i32 %19, 1
  %21 = sext i32 %20 to i64
  %22 = call noalias ptr @calloc(i64 noundef %21, i64 noundef 16) #8
  store ptr %22, ptr @atom, align 8, !tbaa !5
  %23 = load i32, ptr @numofprotein, align 4, !tbaa !9
  %24 = add nsw i32 %23, 1
  %25 = sext i32 %24 to i64
  %26 = call noalias ptr @calloc(i64 noundef %25, i64 noundef 24) #8
  store ptr %26, ptr @protein, align 8, !tbaa !5
  %27 = load i32, ptr @totalAminoAcids, align 4, !tbaa !9
  %28 = add nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = call noalias ptr @calloc(i64 noundef %29, i64 noundef 32) #8
  store ptr %30, ptr @aminoacid, align 8, !tbaa !5
  %31 = load i32, ptr @atomnum, align 4, !tbaa !9
  %32 = add nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = call noalias ptr @calloc(i64 noundef %33, i64 noundef 8) #8
  store ptr %34, ptr @connectionMap, align 8, !tbaa !5
  %35 = load i32, ptr @atomnum, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  %37 = load i32, ptr @atomnum, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  %39 = mul nsw i32 %36, %38
  %40 = sext i32 %39 to i64
  %41 = call noalias ptr @calloc(i64 noundef %40, i64 noundef 4) #8
  %42 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %42, i64 0
  store ptr %41, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %64, %1
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = load i32, ptr @atomnum, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  %48 = icmp slt i32 %45, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %67

50:                                               ; preds = %44
  %51 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %51, i64 0
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = load i32, ptr @atomnum, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  %57 = mul nsw i32 %54, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %53, i64 %58
  %60 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  store ptr %59, ptr %63, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %50
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %6, align 4, !tbaa !9
  br label %44, !llvm.loop !11

67:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %94, %67
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = load i32, ptr @atomnum, align 4, !tbaa !9
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %73, label %72

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

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %90, %73
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = load i32, ptr @atomnum, align 4, !tbaa !9
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %93

79:                                               ; preds = %74
  %80 = load ptr, ptr @connectionMap, align 8, !tbaa !5
  %81 = load i32, ptr %7, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = call i64 @fread(ptr noundef %87, i64 noundef 4, i64 noundef 1, ptr noundef %88)
  br label %90

90:                                               ; preds = %79
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %9, align 4, !tbaa !9
  br label %74, !llvm.loop !13

93:                                               ; preds = %78
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !9
  br label %68, !llvm.loop !14

97:                                               ; preds = %72
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = call i64 @fread(ptr noundef @frame, i64 noundef 8, i64 noundef 1, ptr noundef %98)
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = call i64 @fread(ptr noundef %3, i64 noundef 8, i64 noundef 1, ptr noundef %100)
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = call i64 @fread(ptr noundef @currenttime, i64 noundef 8, i64 noundef 1, ptr noundef %102)
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = call i64 @fread(ptr noundef @cutoffr, i64 noundef 8, i64 noundef 1, ptr noundef %104)
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = call i64 @fread(ptr noundef @oldTemperature, i64 noundef 8, i64 noundef 1, ptr noundef %106)
  %108 = call i32 @strcmp(ptr noundef @temperatureType, ptr noundef @.str.88) #9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %97
  %111 = load double, ptr @oldTemperature, align 8, !tbaa !15
  store double %111, ptr @targetTemperature, align 8, !tbaa !15
  br label %112

112:                                              ; preds = %110, %97
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = call i64 @fread(ptr noundef %4, i64 noundef 8, i64 noundef 1, ptr noundef %113)
  %115 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = call i64 @fread(ptr noundef %115, i64 noundef 1, i64 noundef 20, ptr noundef %116)
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = call i64 @fread(ptr noundef @boxDimension, i64 noundef 8, i64 noundef 4, ptr noundef %118)
  %120 = load ptr, ptr @aminoacid, align 8, !tbaa !5
  %121 = load i32, ptr @totalAminoAcids, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = call i64 @fread(ptr noundef %120, i64 noundef 32, i64 noundef %123, ptr noundef %124)
  %126 = load ptr, ptr @protein, align 8, !tbaa !5
  %127 = load i32, ptr @numofprotein, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = call i64 @fread(ptr noundef %126, i64 noundef 24, i64 noundef %129, ptr noundef %130)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %172, %112
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = load i32, ptr @atomnum, align 4, !tbaa !9
  %135 = icmp sle i32 %133, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %132
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %175

137:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %138 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 136) #8
  store ptr %138, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %139 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 176) #8
  store ptr %139, ptr %12, align 8, !tbaa !5
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = call i64 @fread(ptr noundef %140, i64 noundef 136, i64 noundef 1, ptr noundef %141)
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = call i64 @fread(ptr noundef %143, i64 noundef 176, i64 noundef 1, ptr noundef %144)
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = load ptr, ptr @atom, align 8, !tbaa !5
  %148 = load i32, ptr %10, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %struct.AtomStr, ptr %147, i64 %149
  %151 = getelementptr inbounds %struct.AtomStr, ptr %150, i32 0, i32 0
  store ptr %146, ptr %151, align 8, !tbaa !17
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = load ptr, ptr @atom, align 8, !tbaa !5
  %154 = load i32, ptr %10, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.AtomStr, ptr %153, i64 %155
  %157 = getelementptr inbounds %struct.AtomStr, ptr %156, i32 0, i32 1
  store ptr %152, ptr %157, align 8, !tbaa !19
  %158 = load ptr, ptr @atom, align 8, !tbaa !5
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %struct.AtomStr, ptr %158, i64 %160
  %162 = getelementptr inbounds %struct.AtomStr, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !17
  %164 = getelementptr inbounds %struct.PropertyStr, ptr %163, i32 0, i32 10
  store ptr null, ptr %164, align 8, !tbaa !20
  %165 = load ptr, ptr @atom, align 8, !tbaa !5
  %166 = load i32, ptr %10, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds %struct.AtomStr, ptr %165, i64 %167
  %169 = getelementptr inbounds %struct.AtomStr, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !17
  %171 = getelementptr inbounds %struct.PropertyStr, ptr %170, i32 0, i32 11
  store ptr null, ptr %171, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %172

172:                                              ; preds = %137
  %173 = load i32, ptr %10, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %10, align 4, !tbaa !9
  br label %132, !llvm.loop !24

175:                                              ; preds = %136
  call void @ReadModel()
  call void @CreatePotentialMatrix()
  call void @ReadHB()
  call void @InitializeCharge()
  call void @CreateFlow()
  call void @InitializeOthers()
  %176 = load ptr, ptr %2, align 8, !tbaa !5
  %177 = call i64 @fread(ptr noundef getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), i64 noundef 4, i64 noundef 1, ptr noundef %176)
  %178 = load ptr, ptr %2, align 8, !tbaa !5
  %179 = call i64 @fread(ptr noundef getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 2), i64 noundef 4, i64 noundef 1, ptr noundef %178)
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = call i64 @fread(ptr noundef getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 6), i64 noundef 8, i64 noundef 1, ptr noundef %180)
  %182 = load ptr, ptr %2, align 8, !tbaa !5
  %183 = call i64 @fread(ptr noundef getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 7), i64 noundef 8, i64 noundef 4, ptr noundef %182)
  %184 = call i32 @strcmp(ptr noundef @wallExist, ptr noundef @.str.88) #9
  %185 = icmp ne i32 %184, 0
  br i1 %185, label %189, label %186

186:                                              ; preds = %175
  %187 = load i32, ptr @obstObj, align 8, !tbaa !25
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %190

189:                                              ; preds = %186, %175
  call void @ReadWall()
  br label %190

190:                                              ; preds = %189, %186
  %191 = load i32, ptr getelementptr inbounds (%struct.CGGovStr, ptr @CG, i32 0, i32 1), align 8, !tbaa !27
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %190
  call void @InitializeCG()
  call void @InitializeCGPotentialMatrix()
  br label %194

194:                                              ; preds = %193, %190
  %195 = load double, ptr @currenttime, align 8, !tbaa !15
  store double %195, ptr @oldcurrenttime, align 8, !tbaa !15
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = call i64 @fread(ptr noundef @collisioneventsum, i64 noundef 8, i64 noundef 1, ptr noundef %196)
  %198 = load ptr, ptr %2, align 8, !tbaa !5
  %199 = call i64 @fread(ptr noundef @HBeventsum, i64 noundef 8, i64 noundef 1, ptr noundef %198)
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = call i64 @fread(ptr noundef @bondeventsum, i64 noundef 8, i64 noundef 1, ptr noundef %200)
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = call i64 @fread(ptr noundef @HBNeighboreventsum, i64 noundef 8, i64 noundef 1, ptr noundef %202)
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = call i64 @fread(ptr noundef @thermostateventsum, i64 noundef 8, i64 noundef 1, ptr noundef %204)
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = call i64 @fread(ptr noundef @pbcandcrosseventsum, i64 noundef 8, i64 noundef 1, ptr noundef %206)
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = call i64 @fread(ptr noundef @walleventsum, i64 noundef 8, i64 noundef 1, ptr noundef %208)
  %210 = load i64, ptr @collisioneventsum, align 8, !tbaa !29
  %211 = load i64, ptr @HBeventsum, align 8, !tbaa !29
  %212 = add nsw i64 %210, %211
  %213 = load i64, ptr @bondeventsum, align 8, !tbaa !29
  %214 = add nsw i64 %212, %213
  %215 = load i64, ptr @HBNeighboreventsum, align 8, !tbaa !29
  %216 = add nsw i64 %214, %215
  %217 = load i64, ptr @thermostateventsum, align 8, !tbaa !29
  %218 = add nsw i64 %216, %217
  %219 = load i64, ptr @pbcandcrosseventsum, align 8, !tbaa !29
  %220 = add nsw i64 %218, %219
  %221 = load i64, ptr @walleventsum, align 8, !tbaa !29
  %222 = add nsw i64 %220, %221
  store i64 %222, ptr @oldtotaleventsum, align 8, !tbaa !29
  %223 = load ptr, ptr %2, align 8, !tbaa !5
  %224 = call i64 @fread(ptr noundef @cellnum, i64 noundef 4, i64 noundef 4, ptr noundef %223)
  %225 = load i32, ptr @atomnum, align 4, !tbaa !9
  %226 = add nsw i32 %225, 1
  %227 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cellnum, i64 0, i64 1), align 4, !tbaa !9
  %228 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cellnum, i64 0, i64 2), align 8, !tbaa !9
  %229 = mul nsw i32 %227, %228
  %230 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cellnum, i64 0, i64 3), align 4, !tbaa !9
  %231 = mul nsw i32 %229, %230
  %232 = add nsw i32 %226, %231
  %233 = sext i32 %232 to i64
  %234 = call noalias ptr @calloc(i64 noundef %233, i64 noundef 4) #8
  store ptr %234, ptr @celllist, align 8, !tbaa !5
  %235 = load ptr, ptr @celllist, align 8, !tbaa !5
  %236 = load i32, ptr @atomnum, align 4, !tbaa !9
  %237 = add nsw i32 %236, 1
  %238 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cellnum, i64 0, i64 1), align 4, !tbaa !9
  %239 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cellnum, i64 0, i64 2), align 8, !tbaa !9
  %240 = mul nsw i32 %238, %239
  %241 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cellnum, i64 0, i64 3), align 4, !tbaa !9
  %242 = mul nsw i32 %240, %241
  %243 = add nsw i32 %237, %242
  %244 = sext i32 %243 to i64
  %245 = load ptr, ptr %2, align 8, !tbaa !5
  %246 = call i64 @fread(ptr noundef %235, i64 noundef 4, i64 noundef %244, ptr noundef %245)
  %247 = load ptr, ptr %2, align 8, !tbaa !5
  %248 = call i64 @fread(ptr noundef @cellsize, i64 noundef 8, i64 noundef 4, ptr noundef %247)
  %249 = load ptr, ptr %2, align 8, !tbaa !5
  %250 = call i64 @fread(ptr noundef @HBnumformed, i64 noundef 4, i64 noundef 1, ptr noundef %249)
  %251 = load ptr, ptr %2, align 8, !tbaa !5
  %252 = call i64 @fread(ptr noundef @alphaHBformed, i64 noundef 4, i64 noundef 1, ptr noundef %251)
  %253 = load ptr, ptr %2, align 8, !tbaa !5
  %254 = call i64 @fread(ptr noundef @seed, i64 noundef 4, i64 noundef 1, ptr noundef %253)
  %255 = load i32, ptr @seed, align 4, !tbaa !9
  call void @srand(i32 noundef %255) #7
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  %257 = call i64 @fread(ptr noundef @REMDInfo, i64 noundef 128, i64 noundef 1, ptr noundef %256)
  %258 = load i32, ptr @REMDInfo, align 8, !tbaa !31
  %259 = icmp ne i32 %258, 0
  br i1 %259, label %260, label %262

260:                                              ; preds = %194
  %261 = load double, ptr getelementptr inbounds (%struct.REMDTempStr, ptr getelementptr inbounds (%struct.REMDStr, ptr @REMDInfo, i32 0, i32 5), i32 0, i32 1), align 8, !tbaa !34
  store double %261, ptr @targetTemperature, align 8, !tbaa !15
  br label %262

262:                                              ; preds = %260, %194
  %263 = load double, ptr @targetTemperature, align 8, !tbaa !15
  %264 = load double, ptr @oldTemperature, align 8, !tbaa !15
  %265 = fcmp une double %263, %264
  br i1 %265, label %266, label %276

266:                                              ; preds = %262
  %267 = load i32, ptr @REMDInfo, align 8, !tbaa !31
  %268 = icmp ne i32 %267, 0
  br i1 %268, label %269, label %272

269:                                              ; preds = %266
  %270 = call i32 (ptr, ...) @printf(ptr noundef @.str.97)
  %271 = call i32 (ptr, ...) @printf(ptr noundef @.str.98, ptr noundef @.str.2, i32 noundef 481)
  call void @exit(i32 noundef 1) #10
  unreachable

272:                                              ; preds = %266
  %273 = call i32 (ptr, ...) @printf(ptr noundef @.str.99)
  %274 = load i64, ptr @warningsum, align 8, !tbaa !29
  %275 = add nsw i64 %274, 1
  store i64 %275, ptr @warningsum, align 8, !tbaa !29
  br label %276

276:                                              ; preds = %272, %262
  %277 = load double, ptr @outputrate, align 8, !tbaa !15
  %278 = load double, ptr %4, align 8, !tbaa !15
  %279 = fcmp une double %277, %278
  br i1 %279, label %280, label %284

280:                                              ; preds = %276
  %281 = call i32 (ptr, ...) @printf(ptr noundef @.str.100)
  %282 = load i64, ptr @warningsum, align 8, !tbaa !29
  %283 = add nsw i64 %282, 1
  store i64 %283, ptr @warningsum, align 8, !tbaa !29
  br label %284

284:                                              ; preds = %280, %276
  %285 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %286 = call i32 @strcmp(ptr noundef @Methodtype, ptr noundef %285) #9
  %287 = icmp ne i32 %286, 0
  br i1 %287, label %288, label %290

288:                                              ; preds = %284
  %289 = call i32 (ptr, ...) @printf(ptr noundef @.str.101)
  call void @exit(i32 noundef 1) #10
  unreachable

290:                                              ; preds = %284
  %291 = load double, ptr @timestep, align 8, !tbaa !15
  %292 = load double, ptr @currenttime, align 8, !tbaa !15
  %293 = load double, ptr @outputrate, align 8, !tbaa !15
  %294 = fadd double %292, %293
  %295 = fcmp ogt double %291, %294
  br i1 %295, label %296, label %305

296:                                              ; preds = %290
  %297 = load double, ptr @timestep, align 8, !tbaa !15
  %298 = load double, ptr %3, align 8, !tbaa !15
  %299 = fcmp olt double %297, %298
  br i1 %299, label %300, label %304

300:                                              ; preds = %296
  %301 = call i32 (ptr, ...) @printf(ptr noundef @.str.102)
  %302 = load i64, ptr @warningsum, align 8, !tbaa !29
  %303 = add nsw i64 %302, 1
  store i64 %303, ptr @warningsum, align 8, !tbaa !29
  br label %304

304:                                              ; preds = %300, %296
  br label %307

305:                                              ; preds = %290
  %306 = call i32 (ptr, ...) @printf(ptr noundef @.str.103, ptr noundef @.str.2, i32 noundef 504)
  call void @exit(i32 noundef 1) #10
  unreachable

307:                                              ; preds = %304
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 20, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void
}

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare void @InitializeCGPotentialMatrix() #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0,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 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { noreturn 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 = { 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 #6 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"AtomStr", !6, i64 0, !6, i64 8}
!19 = !{!18, !6, i64 8}
!20 = !{!21, !6, i64 120}
!21 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !16, i64 64, !16, i64 72, !7, i64 80, !22, i64 104, !6, i64 120, !6, i64 128}
!22 = !{!"AtomSeqStr", !10, i64 0, !10, i64 4, !10, i64 8}
!23 = !{!21, !6, i64 128}
!24 = distinct !{!24, !12}
!25 = !{!26, !10, i64 0}
!26 = !{!"ObstructionStr", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!28, !10, i64 32}
!28 = !{!"CGGovStr", !7, i64 0, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48}
!29 = !{!30, !30, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!32, !10, i64 0}
!32 = !{!"REMDStr", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 62, !33, i64 112}
!33 = !{!"REMDTempStr", !10, i64 0, !16, i64 8}
!34 = !{!32, !16, i64 120}


; 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.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.REMDStr = type { i32, i32, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }
%struct.AtomStr = type { ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [71 x i8], align 1
@boxDimension = external global [4 x double], align 16
@wallDyn = external global %struct.DynamicWallStr, align 8
@REMDInfo = external global %struct.REMDStr, align 8
@targetTemperature = external local_unnamed_addr global double, align 8
@seed = external global i32, align 4
@wallExist = external global [20 x i8], align 16
@.str.88 = external hidden unnamed_addr constant [3 x i8], align 1
@obstObj = external local_unnamed_addr global %struct.ObstructionStr, align 8
@CG = external local_unnamed_addr global %struct.CGGovStr, align 8
@atomnum = external global i32, align 4
@numofprotein = external global i32, align 4
@totalAminoAcids = external global i32, align 4
@atom = external local_unnamed_addr global ptr, align 8
@protein = external local_unnamed_addr global ptr, align 8
@aminoacid = external local_unnamed_addr global ptr, align 8
@connectionMap = external local_unnamed_addr global ptr, align 8
@frame = external global i64, align 8
@currenttime = external global double, align 8
@cutoffr = external global double, align 8
@oldTemperature = external global double, align 8
@temperatureType = external global [20 x i8], align 16
@oldcurrenttime = external local_unnamed_addr global double, align 8
@collisioneventsum = external global i64, align 8
@HBeventsum = external global i64, align 8
@bondeventsum = external global i64, align 8
@HBNeighboreventsum = external global i64, align 8
@thermostateventsum = external global i64, align 8
@pbcandcrosseventsum = external global i64, align 8
@walleventsum = external global i64, align 8
@oldtotaleventsum = external local_unnamed_addr global i64, align 8
@cellnum = external global [4 x i32], align 16
@celllist = external local_unnamed_addr global ptr, align 8
@cellsize = external global [4 x double], align 16
@HBnumformed = external global i32, align 4
@alphaHBformed = external global i32, align 4
@.str.97 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [65 x i8], align 1
@warningsum = external local_unnamed_addr global i64, align 8
@outputrate = external local_unnamed_addr global double, align 8
@.str.100 = external hidden unnamed_addr constant [65 x i8], align 1
@Methodtype = external global [20 x i8], align 16
@.str.101 = external hidden unnamed_addr constant [64 x i8], align 1
@timestep = external local_unnamed_addr global double, align 8
@.str.102 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [77 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local void @ReadModel() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @CreatePotentialMatrix() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @ReadHB() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @InitializeCharge() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @ReadWall() local_unnamed_addr #6

declare void @InitializeCG() local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare dso_local void @CreateFlow() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @InitializeOthers() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
define dso_local void @ReadBreakPoint(ptr nocapture noundef %0) local_unnamed_addr #6 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca [20 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #9
  %5 = tail call i64 @fread(ptr noundef nonnull @atomnum, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %6 = tail call i64 @fread(ptr noundef nonnull @numofprotein, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %7 = tail call i64 @fread(ptr noundef nonnull @totalAminoAcids, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %8 = load i32, ptr @atomnum, align 4, !tbaa !5
  %9 = add nsw i32 %8, 1
  %10 = sext i32 %9 to i64
  %11 = tail call noalias ptr @calloc(i64 noundef %10, i64 noundef 16) #10
  store ptr %11, ptr @atom, align 8, !tbaa !9
  %12 = load i32, ptr @numofprotein, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = tail call noalias ptr @calloc(i64 noundef %14, i64 noundef 24) #10
  store ptr %15, ptr @protein, align 8, !tbaa !9
  %16 = load i32, ptr @totalAminoAcids, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = tail call noalias ptr @calloc(i64 noundef %18, i64 noundef 32) #10
  store ptr %19, ptr @aminoacid, align 8, !tbaa !9
  %20 = tail call noalias ptr @calloc(i64 noundef %10, i64 noundef 8) #10
  store ptr %20, ptr @connectionMap, align 8, !tbaa !9
  %21 = mul nsw i32 %9, %9
  %22 = zext nneg i32 %21 to i64
  %23 = tail call noalias ptr @calloc(i64 noundef %22, i64 noundef 4) #10
  store ptr %23, ptr %20, align 8, !tbaa !9
  %.not68 = icmp slt i32 %8, 1
  br i1 %.not68, label %.preheader67, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %1
  %24 = zext nneg i32 %9 to i64
  %25 = add nsw i64 %24, -1
  %26 = add nsw i64 %24, -2
  %xtraiter = and i64 %25, 3
  %27 = icmp ult i64 %26, 3
  br i1 %27, label %.preheader67.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %25, -4
  br label %.lr.ph

.preheader67.loopexit.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader67, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader67.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader67.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader67.loopexit.unr-lcssa ]
  %28 = load ptr, ptr @connectionMap, align 8, !tbaa !9
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = mul nuw nsw i64 %indvars.iv.epil, %24
  %31 = getelementptr inbounds i32, ptr %29, i64 %30
  %32 = getelementptr inbounds ptr, ptr %28, i64 %indvars.iv.epil
  store ptr %31, ptr %32, align 8, !tbaa !9
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader67, label %.lr.ph.epil, !llvm.loop !11

.preheader67:                                     ; preds = %.preheader67.loopexit.unr-lcssa, %.lr.ph.epil, %1
  %.not5973 = icmp slt i32 %8, 0
  br i1 %.not5973, label %._crit_edge75, label %.preheader

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %33 = load ptr, ptr @connectionMap, align 8, !tbaa !9
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = mul nuw nsw i64 %indvars.iv, %24
  %36 = getelementptr inbounds i32, ptr %34, i64 %35
  %37 = getelementptr inbounds ptr, ptr %33, i64 %indvars.iv
  store ptr %36, ptr %37, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = load ptr, ptr @connectionMap, align 8, !tbaa !9
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = mul nuw nsw i64 %indvars.iv.next, %24
  %41 = getelementptr inbounds i32, ptr %39, i64 %40
  %42 = getelementptr inbounds ptr, ptr %38, i64 %indvars.iv.next
  store ptr %41, ptr %42, align 8, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %43 = load ptr, ptr @connectionMap, align 8, !tbaa !9
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = mul nuw nsw i64 %indvars.iv.next.1, %24
  %46 = getelementptr inbounds i32, ptr %44, i64 %45
  %47 = getelementptr inbounds ptr, ptr %43, i64 %indvars.iv.next.1
  store ptr %46, ptr %47, align 8, !tbaa !9
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %48 = load ptr, ptr @connectionMap, align 8, !tbaa !9
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = mul nuw nsw i64 %indvars.iv.next.2, %24
  %51 = getelementptr inbounds i32, ptr %49, i64 %50
  %52 = getelementptr inbounds ptr, ptr %48, i64 %indvars.iv.next.2
  store ptr %51, ptr %52, align 8, !tbaa !9
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader67.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !13

.preheader:                                       ; preds = %.preheader67, %._crit_edge
  %53 = phi i32 [ %61, %._crit_edge ], [ %8, %.preheader67 ]
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %._crit_edge ], [ 0, %.preheader67 ]
  %.not6570 = icmp slt i32 %53, 0
  br i1 %.not6570, label %.preheader.._crit_edge_crit_edge, label %.lr.ph72

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre = sext i32 %53 to i64
  br label %._crit_edge

._crit_edge75:                                    ; preds = %._crit_edge, %.preheader67
  %54 = tail call i64 @fread(ptr noundef nonnull @frame, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %55 = call i64 @fread(ptr noundef nonnull %2, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %56 = tail call i64 @fread(ptr noundef nonnull @currenttime, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %57 = tail call i64 @fread(ptr noundef nonnull @cutoffr, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %58 = tail call i64 @fread(ptr noundef nonnull @oldTemperature, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %59 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @temperatureType, ptr noundef nonnull dereferenceable(1) @.str.88) #11
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %69, label %71

._crit_edge:                                      ; preds = %.lr.ph72, %.preheader.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader.._crit_edge_crit_edge ], [ %68, %.lr.ph72 ]
  %61 = phi i32 [ %53, %.preheader.._crit_edge_crit_edge ], [ %67, %.lr.ph72 ]
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %.not59.not = icmp slt i64 %indvars.iv86, %.pre-phi
  br i1 %.not59.not, label %.preheader, label %._crit_edge75, !llvm.loop !15

.lr.ph72:                                         ; preds = %.preheader, %.lr.ph72
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph72 ], [ 0, %.preheader ]
  %62 = load ptr, ptr @connectionMap, align 8, !tbaa !9
  %63 = getelementptr inbounds ptr, ptr %62, i64 %indvars.iv86
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv83
  %66 = tail call i64 @fread(ptr noundef %65, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %67 = load i32, ptr @atomnum, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %.not65.not = icmp slt i64 %indvars.iv83, %68
  br i1 %.not65.not, label %.lr.ph72, label %._crit_edge, !llvm.loop !17

69:                                               ; preds = %._crit_edge75
  %70 = load double, ptr @oldTemperature, align 8, !tbaa !18
  store double %70, ptr @targetTemperature, align 8, !tbaa !18
  br label %71

71:                                               ; preds = %69, %._crit_edge75
  %72 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %73 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 1, i64 noundef 20, ptr noundef %0)
  %74 = tail call i64 @fread(ptr noundef nonnull @boxDimension, i64 noundef 8, i64 noundef 4, ptr noundef %0)
  %75 = load ptr, ptr @aminoacid, align 8, !tbaa !9
  %76 = load i32, ptr @totalAminoAcids, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = tail call i64 @fread(ptr noundef %75, i64 noundef 32, i64 noundef %78, ptr noundef %0)
  %80 = load ptr, ptr @protein, align 8, !tbaa !9
  %81 = load i32, ptr @numofprotein, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = tail call i64 @fread(ptr noundef %80, i64 noundef 24, i64 noundef %83, ptr noundef %0)
  %85 = load i32, ptr @atomnum, align 4, !tbaa !5
  %.not6076 = icmp slt i32 %85, 0
  br i1 %.not6076, label %._crit_edge80, label %.lr.ph79

._crit_edge80:                                    ; preds = %.lr.ph79, %71
  tail call void @ReadModel()
  tail call void @CreatePotentialMatrix()
  tail call void @ReadHB()
  tail call void @InitializeCharge()
  tail call void @CreateFlow()
  tail call void @InitializeOthers()
  %86 = tail call i64 @fread(ptr noundef nonnull getelementptr inbounds (i8, ptr @wallDyn, i64 16), i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %87 = tail call i64 @fread(ptr noundef nonnull getelementptr inbounds (i8, ptr @wallDyn, i64 20), i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %88 = tail call i64 @fread(ptr noundef nonnull getelementptr inbounds (i8, ptr @wallDyn, i64 48), i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %89 = tail call i64 @fread(ptr noundef nonnull getelementptr inbounds (i8, ptr @wallDyn, i64 56), i64 noundef 8, i64 noundef 4, ptr noundef %0)
  %90 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallExist, ptr noundef nonnull dereferenceable(1) @.str.88) #11
  %91 = icmp ne i32 %90, 0
  %92 = load i32, ptr @obstObj, align 8
  %93 = icmp ne i32 %92, 0
  %or.cond = select i1 %91, i1 true, i1 %93
  br i1 %or.cond, label %108, label %109

.lr.ph79:                                         ; preds = %71, %.lr.ph79
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.lr.ph79 ], [ 0, %71 ]
  %94 = tail call noalias dereferenceable_or_null(136) ptr @calloc(i64 noundef 1, i64 noundef 136) #10
  %95 = tail call noalias dereferenceable_or_null(176) ptr @calloc(i64 noundef 1, i64 noundef 176) #10
  %96 = tail call i64 @fread(ptr noundef %94, i64 noundef 136, i64 noundef 1, ptr noundef %0)
  %97 = tail call i64 @fread(ptr noundef %95, i64 noundef 176, i64 noundef 1, ptr noundef %0)
  %98 = load ptr, ptr @atom, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.AtomStr, ptr %98, i64 %indvars.iv89
  store ptr %94, ptr %99, align 8, !tbaa !20
  %100 = load ptr, ptr @atom, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.AtomStr, ptr %100, i64 %indvars.iv89, i32 1
  store ptr %95, ptr %101, align 8, !tbaa !22
  %102 = load ptr, ptr @atom, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.AtomStr, ptr %102, i64 %indvars.iv89
  %104 = load ptr, ptr %103, align 8, !tbaa !20
  %105 = getelementptr inbounds i8, ptr %104, i64 120
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %105, i8 0, i64 16, i1 false)
  %106 = load i32, ptr @atomnum, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %.not60.not = icmp slt i64 %indvars.iv89, %107
  br i1 %.not60.not, label %.lr.ph79, label %._crit_edge80, !llvm.loop !23

108:                                              ; preds = %._crit_edge80
  tail call void @ReadWall()
  br label %109

109:                                              ; preds = %._crit_edge80, %108
  %110 = load i32, ptr getelementptr inbounds (i8, ptr @CG, i64 32), align 8, !tbaa !24
  %.not61 = icmp eq i32 %110, 0
  br i1 %.not61, label %112, label %111

111:                                              ; preds = %109
  tail call void @InitializeCG() #9
  tail call void @InitializeCGPotentialMatrix() #9
  br label %112

112:                                              ; preds = %111, %109
  %113 = load double, ptr @currenttime, align 8, !tbaa !18
  store double %113, ptr @oldcurrenttime, align 8, !tbaa !18
  %114 = tail call i64 @fread(ptr noundef nonnull @collisioneventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %115 = tail call i64 @fread(ptr noundef nonnull @HBeventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %116 = tail call i64 @fread(ptr noundef nonnull @bondeventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %117 = tail call i64 @fread(ptr noundef nonnull @HBNeighboreventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %118 = tail call i64 @fread(ptr noundef nonnull @thermostateventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %119 = tail call i64 @fread(ptr noundef nonnull @pbcandcrosseventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %120 = tail call i64 @fread(ptr noundef nonnull @walleventsum, i64 noundef 8, i64 noundef 1, ptr noundef %0)
  %121 = load i64, ptr @collisioneventsum, align 8, !tbaa !26
  %122 = load i64, ptr @HBeventsum, align 8, !tbaa !26
  %123 = add nsw i64 %122, %121
  %124 = load i64, ptr @bondeventsum, align 8, !tbaa !26
  %125 = add nsw i64 %123, %124
  %126 = load i64, ptr @HBNeighboreventsum, align 8, !tbaa !26
  %127 = add nsw i64 %125, %126
  %128 = load i64, ptr @thermostateventsum, align 8, !tbaa !26
  %129 = add nsw i64 %127, %128
  %130 = load i64, ptr @pbcandcrosseventsum, align 8, !tbaa !26
  %131 = add nsw i64 %129, %130
  %132 = load i64, ptr @walleventsum, align 8, !tbaa !26
  %133 = add nsw i64 %131, %132
  store i64 %133, ptr @oldtotaleventsum, align 8, !tbaa !26
  %134 = tail call i64 @fread(ptr noundef nonnull @cellnum, i64 noundef 4, i64 noundef 4, ptr noundef %0)
  %135 = load i32, ptr @atomnum, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  %137 = load i32, ptr getelementptr inbounds (i8, ptr @cellnum, i64 4), align 4, !tbaa !5
  %138 = load i32, ptr getelementptr inbounds (i8, ptr @cellnum, i64 8), align 8, !tbaa !5
  %139 = mul nsw i32 %138, %137
  %140 = load i32, ptr getelementptr inbounds (i8, ptr @cellnum, i64 12), align 4, !tbaa !5
  %141 = mul nsw i32 %139, %140
  %142 = add nsw i32 %136, %141
  %143 = sext i32 %142 to i64
  %144 = tail call noalias ptr @calloc(i64 noundef %143, i64 noundef 4) #10
  store ptr %144, ptr @celllist, align 8, !tbaa !9
  %145 = tail call i64 @fread(ptr noundef %144, i64 noundef 4, i64 noundef %143, ptr noundef %0)
  %146 = tail call i64 @fread(ptr noundef nonnull @cellsize, i64 noundef 8, i64 noundef 4, ptr noundef %0)
  %147 = tail call i64 @fread(ptr noundef nonnull @HBnumformed, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %148 = tail call i64 @fread(ptr noundef nonnull @alphaHBformed, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %149 = tail call i64 @fread(ptr noundef nonnull @seed, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %150 = load i32, ptr @seed, align 4, !tbaa !5
  tail call void @srand(i32 noundef %150) #9
  %151 = tail call i64 @fread(ptr noundef nonnull @REMDInfo, i64 noundef 128, i64 noundef 1, ptr noundef %0)
  %152 = load i32, ptr @REMDInfo, align 8, !tbaa !28
  %.not62 = icmp eq i32 %152, 0
  br i1 %.not62, label %153, label %.thread

153:                                              ; preds = %112
  %154 = load double, ptr @targetTemperature, align 8, !tbaa !18
  %155 = load double, ptr @oldTemperature, align 8, !tbaa !18
  %156 = fcmp une double %154, %155
  br i1 %156, label %163, label %167

.thread:                                          ; preds = %112
  %157 = load double, ptr getelementptr inbounds (i8, ptr @REMDInfo, i64 120), align 8, !tbaa !31
  store double %157, ptr @targetTemperature, align 8, !tbaa !18
  %158 = load double, ptr @oldTemperature, align 8, !tbaa !18
  %159 = fcmp une double %157, %158
  br i1 %159, label %160, label %167

160:                                              ; preds = %.thread
  %161 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.97)
  %162 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.98, ptr noundef nonnull @.str.2, i32 noundef 481)
  tail call void @exit(i32 noundef 1) #12
  unreachable

163:                                              ; preds = %153
  %164 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.99)
  %165 = load i64, ptr @warningsum, align 8, !tbaa !26
  %166 = add nsw i64 %165, 1
  store i64 %166, ptr @warningsum, align 8, !tbaa !26
  br label %167

167:                                              ; preds = %.thread, %163, %153
  %168 = load double, ptr @outputrate, align 8, !tbaa !18
  %169 = load double, ptr %3, align 8, !tbaa !18
  %170 = fcmp une double %168, %169
  br i1 %170, label %171, label %175

171:                                              ; preds = %167
  %172 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.100)
  %173 = load i64, ptr @warningsum, align 8, !tbaa !26
  %174 = add nsw i64 %173, 1
  store i64 %174, ptr @warningsum, align 8, !tbaa !26
  br label %175

175:                                              ; preds = %171, %167
  %176 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @Methodtype, ptr noundef nonnull dereferenceable(1) %4) #11
  %.not64 = icmp eq i32 %176, 0
  br i1 %.not64, label %179, label %177

177:                                              ; preds = %175
  %178 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.101)
  tail call void @exit(i32 noundef 1) #12
  unreachable

179:                                              ; preds = %175
  %180 = load double, ptr @timestep, align 8, !tbaa !18
  %181 = load double, ptr @currenttime, align 8, !tbaa !18
  %182 = load double, ptr @outputrate, align 8, !tbaa !18
  %183 = fadd double %181, %182
  %184 = fcmp ogt double %180, %183
  br i1 %184, label %185, label %192

185:                                              ; preds = %179
  %186 = load double, ptr %2, align 8, !tbaa !18
  %187 = fcmp olt double %180, %186
  br i1 %187, label %188, label %194

188:                                              ; preds = %185
  %189 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.102)
  %190 = load i64, ptr @warningsum, align 8, !tbaa !26
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr @warningsum, align 8, !tbaa !26
  br label %194

192:                                              ; preds = %179
  %193 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.103, ptr noundef nonnull @.str.2, i32 noundef 504)
  tail call void @exit(i32 noundef 1) #12
  unreachable

194:                                              ; preds = %185, %188
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret void
}

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

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

declare void @InitializeCGPotentialMatrix() local_unnamed_addr #7

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { noreturn 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 = { 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 #6 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0,1) }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !14}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!22 = !{!21, !10, i64 8}
!23 = distinct !{!23, !14}
!24 = !{!25, !6, i64 32}
!25 = !{!"CGGovStr", !7, i64 0, !6, i64 32, !6, i64 36, !10, i64 40, !10, i64 48}
!26 = !{!27, !27, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = !{!29, !6, i64 0}
!29 = !{!"REMDStr", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 12, !7, i64 62, !30, i64 112}
!30 = !{!"REMDTempStr", !6, i64 0, !19, i64 8}
!31 = !{!29, !19, i64 120}


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