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

; 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.REMDStr = type { i32, i32, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%struct.AtomListStr = type { i32, [27 x i32], [27 x i32], [27 x i32], double, ptr, ptr, ptr }
%struct.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }
%struct.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.AtomStr = type { ptr, ptr }
%struct.DynamicStr = type { [4 x i32], [4 x double], [4 x double], %struct.HBStr, %struct.HBNeighborStr, %struct.InteractionEventStr }
%struct.HBStr = type { i32, i32, i8, i32 }
%struct.HBNeighborStr = type { [5 x i32], i32, i32 }
%struct.InteractionEventStr = type { i32, i64, i64, double, double, i32, i32 }
%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 }
%struct.FileStr = type { i32, [256 x i8], ptr }

@REMDInfo = external global %struct.REMDStr, align 8
@currenttime = external global double, align 8
@atomList = external global %struct.AtomListStr, align 8
@timestep = external global double, align 8
@frame = external global i64, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@CG = external global %struct.CGGovStr, align 8
@oldcurrenttime = external global double, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@stdout = external global ptr, align 8
@wallDyn = external global %struct.DynamicWallStr, align 8
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@outputrecord = external global double, align 8
@fileList = external global ptr, align 8
@outputrate = external global double, align 8
@targetTemperature = external global double, align 8
@countReCal = external global i64, align 8
@tmpDouble = external global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @REMDRun(i32 noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [256 x i32], align 16
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %8) #6
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %17 = load double, ptr @currenttime, align 8, !tbaa !11
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = sitofp i32 %18 to double
  %20 = fdiv double %17, %19
  %21 = fptosi double %20 to i32
  %22 = add nsw i32 %21, 1
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = mul nsw i32 %22, %23
  store i32 %24, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr @atomList, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  br label %25

25:                                               ; preds = %224, %3
  %26 = load double, ptr @currenttime, align 8, !tbaa !11
  %27 = load double, ptr @timestep, align 8, !tbaa !11
  %28 = fcmp ole double %26, %27
  br i1 %28, label %29, label %225

29:                                               ; preds = %25
  %30 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  %31 = load ptr, ptr %12, align 8, !tbaa !9
  call void @AssignJob(ptr noundef %13, ptr noundef %14, ptr noundef %30, ptr noundef %31)
  %32 = load ptr, ptr %12, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.AtomListStr, ptr %32, i32 0, i32 4
  %34 = load double, ptr %33, align 8, !tbaa !13
  call void @UpdateData(double noundef %34)
  %35 = load ptr, ptr %12, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.AtomListStr, ptr %35, i32 0, i32 4
  %37 = load double, ptr %36, align 8, !tbaa !13
  call void @TimeForward(double noundef %37)
  %38 = load ptr, ptr %12, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.AtomListStr, ptr %38, i32 0, i32 4
  %40 = load double, ptr %39, align 8, !tbaa !13
  %41 = load double, ptr @currenttime, align 8, !tbaa !11
  %42 = fadd double %41, %40
  store double %42, ptr @currenttime, align 8, !tbaa !11
  %43 = load ptr, ptr %13, align 8, !tbaa !9
  %44 = load ptr, ptr %14, align 8, !tbaa !9
  %45 = load ptr, ptr %12, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.AtomListStr, ptr %45, i32 0, i32 7
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = load ptr, ptr %13, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.AtomStr, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %51 = getelementptr inbounds %struct.DynamicStr, ptr %50, i32 0, i32 3
  %52 = getelementptr inbounds %struct.HBStr, ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !18
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %47, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = load ptr, ptr %14, align 8, !tbaa !9
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %72

59:                                               ; preds = %29
  %60 = load ptr, ptr %12, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.AtomListStr, ptr %60, i32 0, i32 7
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  %63 = load ptr, ptr %14, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.AtomStr, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = getelementptr inbounds %struct.DynamicStr, ptr %65, i32 0, i32 3
  %67 = getelementptr inbounds %struct.HBStr, ptr %66, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !18
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %62, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  br label %73

72:                                               ; preds = %29
  br label %73

73:                                               ; preds = %72, %59
  %74 = phi ptr [ %71, %59 ], [ null, %72 ]
  %75 = load ptr, ptr %12, align 8, !tbaa !9
  %76 = call i32 @HazardCheck(ptr noundef %43, ptr noundef %44, ptr noundef %56, ptr noundef %74, ptr noundef %75)
  store i32 %76, ptr %7, align 4, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %215, label %79

79:                                               ; preds = %73
  %80 = load i64, ptr @frame, align 8, !tbaa !24
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr @frame, align 8, !tbaa !24
  %82 = load ptr, ptr %12, align 8, !tbaa !9
  call void @DoEvent(ptr noundef %82)
  %83 = load ptr, ptr %13, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.AtomStr, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds %struct.DynamicStr, ptr %85, i32 0, i32 5
  %87 = getelementptr inbounds %struct.InteractionEventStr, ptr %86, i32 0, i32 1
  %88 = load i64, ptr %87, align 8, !tbaa !25
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %87, align 8, !tbaa !25
  %90 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  %91 = load i32, ptr %90, align 16, !tbaa !5
  %92 = icmp eq i32 %91, 2
  br i1 %92, label %93, label %110

93:                                               ; preds = %79
  %94 = load ptr, ptr %14, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.AtomStr, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !26
  %97 = getelementptr inbounds %struct.PropertyStr, ptr %96, i32 0, i32 1
  %98 = getelementptr inbounds [2 x [16 x i8]], ptr %97, i64 0, i64 1
  %99 = getelementptr inbounds [16 x i8], ptr %98, i64 0, i64 0
  %100 = call i32 @strcmp(ptr noundef %99, ptr noundef @.str) #7
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %110

102:                                              ; preds = %93
  %103 = load ptr, ptr %14, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.AtomStr, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !16
  %106 = getelementptr inbounds %struct.DynamicStr, ptr %105, i32 0, i32 5
  %107 = getelementptr inbounds %struct.InteractionEventStr, ptr %106, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !25
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %107, align 8, !tbaa !25
  br label %110

110:                                              ; preds = %102, %93, %79
  %111 = load i32, ptr getelementptr inbounds (%struct.CGGovStr, ptr @CG, i32 0, i32 1), align 8, !tbaa !27
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %133

113:                                              ; preds = %110
  %114 = load ptr, ptr %13, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.AtomStr, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  %117 = getelementptr inbounds %struct.DynamicStr, ptr %116, i32 0, i32 5
  %118 = getelementptr inbounds %struct.InteractionEventStr, ptr %117, i32 0, i32 5
  %119 = load i32, ptr %118, align 8, !tbaa !29
  %120 = icmp eq i32 %119, 11
  br i1 %120, label %121, label %133

121:                                              ; preds = %113
  %122 = load ptr, ptr %13, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.AtomStr, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !26
  %125 = getelementptr inbounds %struct.PropertyStr, ptr %124, i32 0, i32 1
  %126 = getelementptr inbounds [2 x [16 x i8]], ptr %125, i64 0, i64 1
  %127 = getelementptr inbounds [16 x i8], ptr %126, i64 0, i64 0
  %128 = call i32 @strcmp(ptr noundef %127, ptr noundef @.str) #7
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %133

130:                                              ; preds = %121
  %131 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  %132 = load ptr, ptr %12, align 8, !tbaa !9
  call void @FixAssignRenewList(ptr noundef %131, ptr noundef %132)
  br label %133

133:                                              ; preds = %130, %121, %113, %110
  %134 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  %135 = load ptr, ptr %12, align 8, !tbaa !9
  call void @Predict(ptr noundef %134, ptr noundef %135)
  %136 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  call void @UpdateCBT(ptr noundef %136)
  %137 = load double, ptr @currenttime, align 8, !tbaa !11
  %138 = load double, ptr @oldcurrenttime, align 8, !tbaa !11
  %139 = fsub double %137, %138
  %140 = load double, ptr @timestep, align 8, !tbaa !11
  %141 = load double, ptr @oldcurrenttime, align 8, !tbaa !11
  %142 = fsub double %140, %141
  %143 = fdiv double %139, %142
  %144 = fmul double %143, 1.000000e+02
  store double %144, ptr %10, align 8, !tbaa !11
  %145 = load double, ptr %10, align 8, !tbaa !11
  %146 = load double, ptr %11, align 8, !tbaa !11
  %147 = fadd double %146, 1.000000e-02
  %148 = fcmp oge double %145, %147
  %149 = xor i1 %148, true
  %150 = xor i1 %149, true
  %151 = zext i1 %150 to i32
  %152 = sext i32 %151 to i64
  %153 = call i64 @llvm.expect.i64(i64 %152, i64 0)
  %154 = icmp ne i64 %153, 0
  br i1 %154, label %155, label %162

155:                                              ; preds = %133
  %156 = load double, ptr %10, align 8, !tbaa !11
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %156)
  %158 = load ptr, ptr @stdout, align 8, !tbaa !9
  %159 = call i32 @fflush(ptr noundef %158)
  %160 = load double, ptr %11, align 8, !tbaa !11
  %161 = fadd double %160, 1.000000e-02
  store double %161, ptr %11, align 8, !tbaa !11
  br label %162

162:                                              ; preds = %155, %133
  %163 = call i32 @strcmp(ptr noundef @wallDyn, ptr noundef @.str.2) #7
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %166

165:                                              ; preds = %162
  call void @DoWallDyn()
  br label %166

166:                                              ; preds = %165, %162
  %167 = load double, ptr @currenttime, align 8, !tbaa !11
  %168 = load double, ptr @outputrecord, align 8, !tbaa !11
  %169 = fcmp oge double %167, %168
  %170 = xor i1 %169, true
  %171 = xor i1 %170, true
  %172 = zext i1 %171 to i32
  %173 = sext i32 %172 to i64
  %174 = call i64 @llvm.expect.i64(i64 %173, i64 0)
  %175 = icmp ne i64 %174, 0
  br i1 %175, label %176, label %200

176:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %193, %176
  %178 = load i32, ptr %15, align 4, !tbaa !5
  %179 = icmp slt i32 %178, 15
  br i1 %179, label %181, label %180

180:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %196

181:                                              ; preds = %177
  %182 = load ptr, ptr @fileList, align 8, !tbaa !9
  %183 = load i32, ptr %15, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.FileStr, ptr %182, i64 %184
  %186 = getelementptr inbounds %struct.FileStr, ptr %185, i32 0, i32 0
  %187 = load i32, ptr %186, align 8, !tbaa !30
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %192

189:                                              ; preds = %181
  %190 = load i32, ptr %15, align 4, !tbaa !5
  %191 = load ptr, ptr @fileList, align 8, !tbaa !9
  call void @SaveData(i32 noundef %190, ptr noundef %191)
  br label %192

192:                                              ; preds = %189, %181
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %15, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %15, align 4, !tbaa !5
  br label %177, !llvm.loop !32

196:                                              ; preds = %180
  %197 = load double, ptr @outputrate, align 8, !tbaa !11
  %198 = load double, ptr @outputrecord, align 8, !tbaa !11
  %199 = fadd double %198, %197
  store double %199, ptr @outputrecord, align 8, !tbaa !11
  br label %200

200:                                              ; preds = %196, %166
  %201 = load double, ptr @currenttime, align 8, !tbaa !11
  %202 = load i32, ptr %9, align 4, !tbaa !5
  %203 = sitofp i32 %202 to double
  %204 = fcmp oge double %201, %203
  br i1 %204, label %205, label %214

205:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %206 = call double @CalPotenE()
  store double %206, ptr %16, align 8, !tbaa !11
  %207 = load ptr, ptr %5, align 8, !tbaa !9
  %208 = load ptr, ptr %6, align 8, !tbaa !9
  call void @ReplicaExchange(ptr noundef %16, ptr noundef getelementptr inbounds (%struct.REMDStr, ptr @REMDInfo, i32 0, i32 5), ptr noundef %207, ptr noundef %208)
  %209 = 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 %209, ptr @targetTemperature, align 8, !tbaa !11
  %210 = load ptr, ptr @fileList, align 8, !tbaa !9
  call void @SaveData(i32 noundef 14, ptr noundef %210)
  %211 = load i32, ptr %4, align 4, !tbaa !5
  %212 = load i32, ptr %9, align 4, !tbaa !5
  %213 = add nsw i32 %212, %211
  store i32 %213, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %214

214:                                              ; preds = %205, %200
  br label %224

215:                                              ; preds = %73
  %216 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  store i32 1, ptr %216, align 16, !tbaa !5
  %217 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 2
  store i32 0, ptr %217, align 8, !tbaa !5
  %218 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 3
  store i32 0, ptr %218, align 4, !tbaa !5
  %219 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  %220 = load ptr, ptr %12, align 8, !tbaa !9
  call void @Predict(ptr noundef %219, ptr noundef %220)
  %221 = getelementptr inbounds [256 x i32], ptr %8, i64 0, i64 0
  call void @UpdateCBT(ptr noundef %221)
  %222 = load i64, ptr @countReCal, align 8, !tbaa !24
  %223 = add nsw i64 %222, 1
  store i64 %223, ptr @countReCal, align 8, !tbaa !24
  br label %224

224:                                              ; preds = %215, %214
  br label %25, !llvm.loop !37

225:                                              ; preds = %25
  store double 0.000000e+00, ptr @tmpDouble, align 8, !tbaa !11
  store double 0.000000e+00, ptr getelementptr inbounds (%struct.REMDTempStr, ptr getelementptr inbounds (%struct.REMDStr, ptr @REMDInfo, i32 0, i32 5), i32 0, i32 1), align 8, !tbaa !34
  %226 = load ptr, ptr %5, align 8, !tbaa !9
  %227 = load ptr, ptr %6, align 8, !tbaa !9
  call void @ReplicaExchange(ptr noundef @tmpDouble, ptr noundef getelementptr inbounds (%struct.REMDStr, ptr @REMDInfo, i32 0, i32 5), ptr noundef %226, ptr noundef %227)
  call void @FreeVariables()
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  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 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

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

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

declare void @AssignJob(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @UpdateData(double noundef) #3

declare void @TimeForward(double noundef) #3

declare i32 @HazardCheck(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @DoEvent(ptr noundef) #3

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

declare void @FixAssignRenewList(ptr noundef, ptr noundef) #3

declare void @Predict(ptr noundef, ptr noundef) #3

declare void @UpdateCBT(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #5

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

declare i32 @fflush(ptr noundef) #3

declare void @DoWallDyn() #3

declare void @SaveData(i32 noundef, ptr noundef) #3

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

declare double @CalPotenE() #3

; Function Attrs: nounwind uwtable
declare dso_local void @ReplicaExchange(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare void @FreeVariables() #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 328}
!14 = !{!"AtomListStr", !6, i64 0, !7, i64 4, !7, i64 112, !7, i64 220, !12, i64 328, !10, i64 336, !10, i64 344, !10, i64 352}
!15 = !{!14, !10, i64 352}
!16 = !{!17, !10, i64 8}
!17 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!18 = !{!19, !6, i64 84}
!19 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !20, i64 80, !21, i64 96, !22, i64 128}
!20 = !{!"HBStr", !6, i64 0, !6, i64 4, !7, i64 8, !6, i64 12}
!21 = !{!"HBNeighborStr", !7, i64 0, !6, i64 20, !6, i64 24}
!22 = !{!"InteractionEventStr", !6, i64 0, !23, i64 8, !23, i64 16, !12, i64 24, !12, i64 32, !6, i64 40, !6, i64 44}
!23 = !{!"long", !7, i64 0}
!24 = !{!23, !23, i64 0}
!25 = !{!19, !23, i64 136}
!26 = !{!17, !10, i64 0}
!27 = !{!28, !6, i64 32}
!28 = !{!"CGGovStr", !7, i64 0, !6, i64 32, !6, i64 36, !10, i64 40, !10, i64 48}
!29 = !{!19, !6, i64 168}
!30 = !{!31, !6, i64 0}
!31 = !{!"FileStr", !6, i64 0, !7, i64 4, !10, i64 264}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !12, i64 120}
!35 = !{!"REMDStr", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 12, !7, i64 62, !36, i64 112}
!36 = !{!"REMDTempStr", !6, i64 0, !12, i64 8}
!37 = distinct !{!37, !33}


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

@REMDInfo = external global %struct.REMDStr, align 8
@currenttime = external local_unnamed_addr global double, align 8
@atomList = external global %struct.AtomListStr, align 8
@timestep = external local_unnamed_addr global double, align 8
@frame = external local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@CG = external local_unnamed_addr global %struct.CGGovStr, align 8
@oldcurrenttime = external local_unnamed_addr global double, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@wallDyn = external global %struct.DynamicWallStr, align 8
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@outputrecord = external local_unnamed_addr global double, align 8
@fileList = external local_unnamed_addr global ptr, align 8
@outputrate = external local_unnamed_addr global double, align 8
@targetTemperature = external local_unnamed_addr global double, align 8
@countReCal = external local_unnamed_addr global i64, align 8
@tmpDouble = external global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @REMDRun(i32 noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca [256 x i32], align 16
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %4, i8 0, i64 1024, i1 false)
  %8 = load double, ptr @currenttime, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %9 = load double, ptr @timestep, align 8, !tbaa !5
  %10 = fcmp ugt double %8, %9
  br i1 %10, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %11 = sitofp i32 %0 to double
  %12 = fdiv double %8, %11
  %13 = fptosi double %12 to i32
  %14 = add nsw i32 %13, 1
  %15 = mul nsw i32 %14, %0
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  %17 = getelementptr inbounds i8, ptr %4, i64 12
  br label %18

18:                                               ; preds = %.lr.ph, %175
  %.02841 = phi i32 [ %15, %.lr.ph ], [ %.1, %175 ]
  %.02940 = phi double [ 0.000000e+00, %.lr.ph ], [ %.2, %175 ]
  call void @AssignJob(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull @atomList) #6
  %19 = load double, ptr getelementptr inbounds (i8, ptr @atomList, i64 328), align 8, !tbaa !9
  call void @UpdateData(double noundef %19) #6
  %20 = load double, ptr getelementptr inbounds (i8, ptr @atomList, i64 328), align 8, !tbaa !9
  call void @TimeForward(double noundef %20) #6
  %21 = load double, ptr getelementptr inbounds (i8, ptr @atomList, i64 328), align 8, !tbaa !9
  %22 = load double, ptr @currenttime, align 8, !tbaa !5
  %23 = fadd double %21, %22
  store double %23, ptr @currenttime, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !13
  %25 = load ptr, ptr %6, align 8, !tbaa !13
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %24, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %29 = getelementptr inbounds i8, ptr %28, i64 84
  %30 = load i32, ptr %29, align 4, !tbaa !17
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds ptr, ptr %26, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %42, label %34

34:                                               ; preds = %18
  %35 = getelementptr inbounds i8, ptr %25, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %36, i64 84
  %38 = load i32, ptr %37, align 4, !tbaa !17
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds ptr, ptr %26, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  br label %42

42:                                               ; preds = %18, %34
  %43 = phi ptr [ %41, %34 ], [ null, %18 ]
  %44 = call i32 @HazardCheck(ptr noundef nonnull %24, ptr noundef %25, ptr noundef %33, ptr noundef %43, ptr noundef nonnull @atomList) #6
  %.not34 = icmp eq i32 %44, 0
  br i1 %.not34, label %45, label %172

45:                                               ; preds = %42
  %46 = load i64, ptr @frame, align 8, !tbaa !23
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr @frame, align 8, !tbaa !23
  call void @DoEvent(ptr noundef nonnull @atomList) #6
  %48 = load ptr, ptr %5, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = getelementptr inbounds i8, ptr %50, i64 136
  %52 = load i64, ptr %51, align 8, !tbaa !24
  %53 = add nsw i64 %52, 1
  store i64 %53, ptr %51, align 8, !tbaa !24
  %54 = load i32, ptr %4, align 16, !tbaa !25
  %55 = icmp eq i32 %54, 2
  br i1 %55, label %56, label %67

56:                                               ; preds = %45
  %57 = load ptr, ptr %6, align 8, !tbaa !13
  %58 = load ptr, ptr %57, align 8, !tbaa !26
  %59 = getelementptr inbounds i8, ptr %58, i64 24
  %60 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %59, ptr noundef nonnull dereferenceable(1) @.str) #7
  %.not35 = icmp eq i32 %60, 0
  br i1 %.not35, label %67, label %61

61:                                               ; preds = %56
  %62 = getelementptr inbounds i8, ptr %57, i64 8
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = getelementptr inbounds i8, ptr %63, i64 136
  %65 = load i64, ptr %64, align 8, !tbaa !24
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %64, align 8, !tbaa !24
  br label %67

67:                                               ; preds = %61, %56, %45
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @CG, i64 32), align 8, !tbaa !27
  %.not36 = icmp eq i32 %68, 0
  br i1 %.not36, label %79, label %69

69:                                               ; preds = %67
  %70 = getelementptr inbounds i8, ptr %50, i64 168
  %71 = load i32, ptr %70, align 8, !tbaa !29
  %72 = icmp eq i32 %71, 11
  br i1 %72, label %73, label %79

73:                                               ; preds = %69
  %74 = load ptr, ptr %48, align 8, !tbaa !26
  %75 = getelementptr inbounds i8, ptr %74, i64 24
  %76 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %75, ptr noundef nonnull dereferenceable(1) @.str) #7
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %73
  call void @FixAssignRenewList(ptr noundef nonnull %4, ptr noundef nonnull @atomList) #6
  br label %79

79:                                               ; preds = %78, %73, %69, %67
  call void @Predict(ptr noundef nonnull %4, ptr noundef nonnull @atomList) #6
  call void @UpdateCBT(ptr noundef nonnull %4) #6
  %80 = load double, ptr @currenttime, align 8, !tbaa !5
  %81 = load double, ptr @oldcurrenttime, align 8, !tbaa !5
  %82 = fsub double %80, %81
  %83 = load double, ptr @timestep, align 8, !tbaa !5
  %84 = fsub double %83, %81
  %85 = fdiv double %82, %84
  %86 = fmul double %85, 1.000000e+02
  %87 = fadd double %.02940, 1.000000e-02
  %88 = fcmp ult double %86, %87
  br i1 %88, label %93, label %89, !prof !30

89:                                               ; preds = %79
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %86)
  %91 = load ptr, ptr @stdout, align 8, !tbaa !13
  %92 = call i32 @fflush(ptr noundef %91)
  br label %93

93:                                               ; preds = %89, %79
  %.130 = phi double [ %87, %89 ], [ %.02940, %79 ]
  %94 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallDyn, ptr noundef nonnull dereferenceable(1) @.str.2) #7
  %.not37 = icmp eq i32 %94, 0
  br i1 %.not37, label %96, label %95

95:                                               ; preds = %93
  call void @DoWallDyn() #6
  br label %96

96:                                               ; preds = %95, %93
  %97 = load double, ptr @currenttime, align 8, !tbaa !5
  %98 = load double, ptr @outputrecord, align 8, !tbaa !5
  %99 = fcmp ult double %97, %98
  br i1 %99, label %163, label %.preheader.preheader, !prof !30

.preheader.preheader:                             ; preds = %96
  %100 = load ptr, ptr @fileList, align 8, !tbaa !13
  %101 = load i32, ptr %100, align 8, !tbaa !31
  %.not38 = icmp eq i32 %101, 0
  br i1 %.not38, label %.preheader.1, label %102

102:                                              ; preds = %.preheader.preheader
  call void @SaveData(i32 noundef 0, ptr noundef nonnull %100) #6
  %.pre = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.preheader, %102
  %103 = phi ptr [ %100, %.preheader.preheader ], [ %.pre, %102 ]
  %104 = getelementptr inbounds i8, ptr %103, i64 272
  %105 = load i32, ptr %104, align 8, !tbaa !31
  %.not38.1 = icmp eq i32 %105, 0
  br i1 %.not38.1, label %.preheader.2, label %106

106:                                              ; preds = %.preheader.1
  call void @SaveData(i32 noundef 1, ptr noundef nonnull %103) #6
  %.pre43 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.2

.preheader.2:                                     ; preds = %106, %.preheader.1
  %107 = phi ptr [ %.pre43, %106 ], [ %103, %.preheader.1 ]
  %108 = getelementptr inbounds i8, ptr %107, i64 544
  %109 = load i32, ptr %108, align 8, !tbaa !31
  %.not38.2 = icmp eq i32 %109, 0
  br i1 %.not38.2, label %.preheader.3, label %110

110:                                              ; preds = %.preheader.2
  call void @SaveData(i32 noundef 2, ptr noundef nonnull %107) #6
  %.pre44 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.3

.preheader.3:                                     ; preds = %110, %.preheader.2
  %111 = phi ptr [ %.pre44, %110 ], [ %107, %.preheader.2 ]
  %112 = getelementptr inbounds i8, ptr %111, i64 816
  %113 = load i32, ptr %112, align 8, !tbaa !31
  %.not38.3 = icmp eq i32 %113, 0
  br i1 %.not38.3, label %.preheader.4, label %114

114:                                              ; preds = %.preheader.3
  call void @SaveData(i32 noundef 3, ptr noundef nonnull %111) #6
  %.pre45 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.4

.preheader.4:                                     ; preds = %114, %.preheader.3
  %115 = phi ptr [ %.pre45, %114 ], [ %111, %.preheader.3 ]
  %116 = getelementptr inbounds i8, ptr %115, i64 1088
  %117 = load i32, ptr %116, align 8, !tbaa !31
  %.not38.4 = icmp eq i32 %117, 0
  br i1 %.not38.4, label %.preheader.5, label %118

118:                                              ; preds = %.preheader.4
  call void @SaveData(i32 noundef 4, ptr noundef nonnull %115) #6
  %.pre46 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.5

.preheader.5:                                     ; preds = %118, %.preheader.4
  %119 = phi ptr [ %.pre46, %118 ], [ %115, %.preheader.4 ]
  %120 = getelementptr inbounds i8, ptr %119, i64 1360
  %121 = load i32, ptr %120, align 8, !tbaa !31
  %.not38.5 = icmp eq i32 %121, 0
  br i1 %.not38.5, label %.preheader.6, label %122

122:                                              ; preds = %.preheader.5
  call void @SaveData(i32 noundef 5, ptr noundef nonnull %119) #6
  %.pre47 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.6

.preheader.6:                                     ; preds = %122, %.preheader.5
  %123 = phi ptr [ %.pre47, %122 ], [ %119, %.preheader.5 ]
  %124 = getelementptr inbounds i8, ptr %123, i64 1632
  %125 = load i32, ptr %124, align 8, !tbaa !31
  %.not38.6 = icmp eq i32 %125, 0
  br i1 %.not38.6, label %.preheader.7, label %126

126:                                              ; preds = %.preheader.6
  call void @SaveData(i32 noundef 6, ptr noundef nonnull %123) #6
  %.pre48 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.7

.preheader.7:                                     ; preds = %126, %.preheader.6
  %127 = phi ptr [ %.pre48, %126 ], [ %123, %.preheader.6 ]
  %128 = getelementptr inbounds i8, ptr %127, i64 1904
  %129 = load i32, ptr %128, align 8, !tbaa !31
  %.not38.7 = icmp eq i32 %129, 0
  br i1 %.not38.7, label %.preheader.8, label %130

130:                                              ; preds = %.preheader.7
  call void @SaveData(i32 noundef 7, ptr noundef nonnull %127) #6
  %.pre49 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.8

.preheader.8:                                     ; preds = %130, %.preheader.7
  %131 = phi ptr [ %.pre49, %130 ], [ %127, %.preheader.7 ]
  %132 = getelementptr inbounds i8, ptr %131, i64 2176
  %133 = load i32, ptr %132, align 8, !tbaa !31
  %.not38.8 = icmp eq i32 %133, 0
  br i1 %.not38.8, label %.preheader.9, label %134

134:                                              ; preds = %.preheader.8
  call void @SaveData(i32 noundef 8, ptr noundef nonnull %131) #6
  %.pre50 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.9

.preheader.9:                                     ; preds = %134, %.preheader.8
  %135 = phi ptr [ %.pre50, %134 ], [ %131, %.preheader.8 ]
  %136 = getelementptr inbounds i8, ptr %135, i64 2448
  %137 = load i32, ptr %136, align 8, !tbaa !31
  %.not38.9 = icmp eq i32 %137, 0
  br i1 %.not38.9, label %.preheader.10, label %138

138:                                              ; preds = %.preheader.9
  call void @SaveData(i32 noundef 9, ptr noundef nonnull %135) #6
  %.pre51 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.10

.preheader.10:                                    ; preds = %138, %.preheader.9
  %139 = phi ptr [ %.pre51, %138 ], [ %135, %.preheader.9 ]
  %140 = getelementptr inbounds i8, ptr %139, i64 2720
  %141 = load i32, ptr %140, align 8, !tbaa !31
  %.not38.10 = icmp eq i32 %141, 0
  br i1 %.not38.10, label %.preheader.11, label %142

142:                                              ; preds = %.preheader.10
  call void @SaveData(i32 noundef 10, ptr noundef nonnull %139) #6
  %.pre52 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.11

.preheader.11:                                    ; preds = %142, %.preheader.10
  %143 = phi ptr [ %.pre52, %142 ], [ %139, %.preheader.10 ]
  %144 = getelementptr inbounds i8, ptr %143, i64 2992
  %145 = load i32, ptr %144, align 8, !tbaa !31
  %.not38.11 = icmp eq i32 %145, 0
  br i1 %.not38.11, label %.preheader.12, label %146

146:                                              ; preds = %.preheader.11
  call void @SaveData(i32 noundef 11, ptr noundef nonnull %143) #6
  %.pre53 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.12

.preheader.12:                                    ; preds = %146, %.preheader.11
  %147 = phi ptr [ %.pre53, %146 ], [ %143, %.preheader.11 ]
  %148 = getelementptr inbounds i8, ptr %147, i64 3264
  %149 = load i32, ptr %148, align 8, !tbaa !31
  %.not38.12 = icmp eq i32 %149, 0
  br i1 %.not38.12, label %.preheader.13, label %150

150:                                              ; preds = %.preheader.12
  call void @SaveData(i32 noundef 12, ptr noundef nonnull %147) #6
  %.pre54 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.13

.preheader.13:                                    ; preds = %150, %.preheader.12
  %151 = phi ptr [ %.pre54, %150 ], [ %147, %.preheader.12 ]
  %152 = getelementptr inbounds i8, ptr %151, i64 3536
  %153 = load i32, ptr %152, align 8, !tbaa !31
  %.not38.13 = icmp eq i32 %153, 0
  br i1 %.not38.13, label %.preheader.14, label %154

154:                                              ; preds = %.preheader.13
  call void @SaveData(i32 noundef 13, ptr noundef nonnull %151) #6
  %.pre55 = load ptr, ptr @fileList, align 8, !tbaa !13
  br label %.preheader.14

.preheader.14:                                    ; preds = %154, %.preheader.13
  %155 = phi ptr [ %.pre55, %154 ], [ %151, %.preheader.13 ]
  %156 = getelementptr inbounds i8, ptr %155, i64 3808
  %157 = load i32, ptr %156, align 8, !tbaa !31
  %.not38.14 = icmp eq i32 %157, 0
  br i1 %.not38.14, label %159, label %158

158:                                              ; preds = %.preheader.14
  call void @SaveData(i32 noundef 14, ptr noundef nonnull %155) #6
  br label %159

159:                                              ; preds = %158, %.preheader.14
  %160 = load double, ptr @outputrate, align 8, !tbaa !5
  %161 = load double, ptr @outputrecord, align 8, !tbaa !5
  %162 = fadd double %160, %161
  store double %162, ptr @outputrecord, align 8, !tbaa !5
  %.pre56 = load double, ptr @currenttime, align 8, !tbaa !5
  br label %163

163:                                              ; preds = %159, %96
  %164 = phi double [ %.pre56, %159 ], [ %97, %96 ]
  %165 = sitofp i32 %.02841 to double
  %166 = fcmp ult double %164, %165
  br i1 %166, label %175, label %167

167:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %168 = call double @CalPotenE() #6
  store double %168, ptr %7, align 8, !tbaa !5
  call void @ReplicaExchange(ptr noundef nonnull %7, ptr noundef nonnull getelementptr inbounds (i8, ptr @REMDInfo, i64 112), ptr noundef %1, ptr noundef %2)
  %169 = load double, ptr getelementptr inbounds (i8, ptr @REMDInfo, i64 120), align 8, !tbaa !33
  store double %169, ptr @targetTemperature, align 8, !tbaa !5
  %170 = load ptr, ptr @fileList, align 8, !tbaa !13
  call void @SaveData(i32 noundef 14, ptr noundef %170) #6
  %171 = add nsw i32 %.02841, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %175

172:                                              ; preds = %42
  store i32 1, ptr %4, align 16, !tbaa !25
  store i32 0, ptr %16, align 8, !tbaa !25
  store i32 0, ptr %17, align 4, !tbaa !25
  call void @Predict(ptr noundef nonnull %4, ptr noundef nonnull @atomList) #6
  call void @UpdateCBT(ptr noundef nonnull %4) #6
  %173 = load i64, ptr @countReCal, align 8, !tbaa !23
  %174 = add nsw i64 %173, 1
  store i64 %174, ptr @countReCal, align 8, !tbaa !23
  br label %175

175:                                              ; preds = %163, %167, %172
  %.2 = phi double [ %.02940, %172 ], [ %.130, %167 ], [ %.130, %163 ]
  %.1 = phi i32 [ %.02841, %172 ], [ %171, %167 ], [ %.02841, %163 ]
  %176 = load double, ptr @currenttime, align 8, !tbaa !5
  %177 = load double, ptr @timestep, align 8, !tbaa !5
  %178 = fcmp ugt double %176, %177
  br i1 %178, label %._crit_edge, label %18, !llvm.loop !36

._crit_edge:                                      ; preds = %175, %3
  store double 0.000000e+00, ptr @tmpDouble, align 8, !tbaa !5
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @REMDInfo, i64 120), align 8, !tbaa !33
  call void @ReplicaExchange(ptr noundef nonnull @tmpDouble, ptr noundef nonnull getelementptr inbounds (i8, ptr @REMDInfo, i64 112), ptr noundef %1, ptr noundef %2)
  call void @FreeVariables() #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #6
  ret void
}

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

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

declare void @AssignJob(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @UpdateData(double noundef) local_unnamed_addr #3

declare void @TimeForward(double noundef) local_unnamed_addr #3

declare i32 @HazardCheck(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @DoEvent(ptr noundef) local_unnamed_addr #3

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

declare void @FixAssignRenewList(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @Predict(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @UpdateCBT(ptr noundef) local_unnamed_addr #3

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

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

declare void @DoWallDyn() local_unnamed_addr #3

declare void @SaveData(i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare double @CalPotenE() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @ReplicaExchange(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @FreeVariables() local_unnamed_addr #3

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 328}
!10 = !{!"AtomListStr", !11, i64 0, !7, i64 4, !7, i64 112, !7, i64 220, !6, i64 328, !12, i64 336, !12, i64 344, !12, i64 352}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!10, !12, i64 352}
!15 = !{!16, !12, i64 8}
!16 = !{!"AtomStr", !12, i64 0, !12, i64 8}
!17 = !{!18, !11, i64 84}
!18 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !19, i64 80, !20, i64 96, !21, i64 128}
!19 = !{!"HBStr", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 12}
!20 = !{!"HBNeighborStr", !7, i64 0, !11, i64 20, !11, i64 24}
!21 = !{!"InteractionEventStr", !11, i64 0, !22, i64 8, !22, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44}
!22 = !{!"long", !7, i64 0}
!23 = !{!22, !22, i64 0}
!24 = !{!18, !22, i64 136}
!25 = !{!11, !11, i64 0}
!26 = !{!16, !12, i64 0}
!27 = !{!28, !11, i64 32}
!28 = !{!"CGGovStr", !7, i64 0, !11, i64 32, !11, i64 36, !12, i64 40, !12, i64 48}
!29 = !{!18, !11, i64 168}
!30 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!31 = !{!32, !11, i64 0}
!32 = !{!"FileStr", !11, i64 0, !7, i64 4, !12, i64 264}
!33 = !{!34, !6, i64 120}
!34 = !{!"REMDStr", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 12, !7, i64 62, !35, i64 112}
!35 = !{!"REMDTempStr", !11, i64 0, !6, i64 8}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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