; LLVM IR from alexzheng42/sDMD :: analysis (RMSD)

; 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.FileListStr = type { i32, [128 x [64 x i8]] }
%struct.EnergyReadStr = type { double, double, double, double, double, double }
%struct.FileStr = type { i32, [256 x i8] }
%struct.SectionStr = type { i64, double, double, double, double, [20 x i8], %struct.WallStr, %struct.DynamicWallStr, %struct.ObstructionStr, %struct.TunnelStr, %struct.FlowStr }
%struct.WallStr = type { [20 x i8], [20 x i8], %struct.AtomStr }
%struct.AtomStr = type { ptr, ptr }
%struct.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.TunnelStr = type { i32, double, double, double, %struct.AtomStr }
%struct.FlowStr = type { i32, %struct.ConstVStr, %struct.ForceStr, %struct.ChargeStr }
%struct.ConstVStr = type { [4 x double] }
%struct.ForceStr = type { [4 x double], ptr, ptr }
%struct.ChargeStr = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.PESurStr = type { i32, double }

@stdout = external global ptr, align 8
@RMSDFile = external global %struct.FileListStr, align 4
@.str.2 = external hidden unnamed_addr constant [66 x i8], align 1
@nRow = external hidden global i32, align 4
@refCoor = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@path = external global [1024 x i8], align 16
@files = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [79 x i8], align 1
@fileList = external global ptr, align 8
@sectInfo = external global ptr, align 8
@curCoor = external hidden global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [88 x i8], align 1
@energy = external global %struct.EnergyReadStr, align 8
@EnSurGrid = external dso_local global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [30 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

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

declare i32 @fflush(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @InitializeVariables() #2

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

; Function Attrs: nounwind uwtable
declare hidden void @ReadRef(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

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

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

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

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

declare i32 @ReadGro(ptr noundef) #1

declare void @PrintProcess(i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden double @CalRMSD(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @FreeVar() #2

; Function Attrs: nounwind uwtable
define dso_local void @PESurfaceInfo(i32 noundef %0) #2 {
  %2 = alloca i32, align 4
  %3 = alloca [2 x i32], align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca [2 x double], align 16
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca [512 x i8], align 16
  %10 = alloca [512 x i8], align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 5.000000e-02, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 512, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 512, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %24 = load ptr, ptr @stdout, align 8, !tbaa !13
  %25 = call i32 @fflush(ptr noundef %24)
  %26 = load i32, ptr @RMSDFile, align 4, !tbaa !15
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %31

28:                                               ; preds = %1
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef @.str.2, i32 noundef 144)
  call void @exit(i32 noundef 1) #7
  unreachable

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

32:                                               ; preds = %48, %31
  %33 = load i32, ptr %16, align 4, !tbaa !5
  %34 = load i32, ptr @RMSDFile, align 4, !tbaa !15
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %51

37:                                               ; preds = %32
  %38 = load i32, ptr %16, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [128 x [64 x i8]], ptr getelementptr inbounds (%struct.FileListStr, ptr @RMSDFile, i32 0, i32 1), i64 0, i64 %39
  %41 = getelementptr inbounds [64 x i8], ptr %40, i64 0, i64 0
  %42 = load i32, ptr @nRow, align 4, !tbaa !5
  %43 = load ptr, ptr @refCoor, align 8, !tbaa !13
  %44 = load i32, ptr %16, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds ptr, ptr %43, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  call void @ReadRef(ptr noundef %41, i32 noundef 3, i32 noundef %42, ptr noundef %47)
  br label %48

48:                                               ; preds = %37
  %49 = load i32, ptr %16, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %16, align 4, !tbaa !5
  br label %32, !llvm.loop !17

51:                                               ; preds = %36
  %52 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %53 = load ptr, ptr @files, align 8, !tbaa !13
  %54 = getelementptr inbounds ptr, ptr %53, i64 15
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %struct.FileStr, ptr %55, i64 %57
  %59 = getelementptr inbounds %struct.FileStr, ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds [256 x i8], ptr %59, i64 0, i64 0
  %61 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %52, ptr noundef @.str.3, ptr noundef @path, ptr noundef %60) #6
  %62 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %63 = call noalias ptr @fopen(ptr noundef %62, ptr noundef @.str.4)
  store ptr %63, ptr %15, align 8, !tbaa !13
  %64 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %65 = load ptr, ptr @files, align 8, !tbaa !13
  %66 = getelementptr inbounds ptr, ptr %65, i64 8
  %67 = load ptr, ptr %66, align 8, !tbaa !13
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %struct.FileStr, ptr %67, i64 %69
  %71 = getelementptr inbounds %struct.FileStr, ptr %70, i32 0, i32 1
  %72 = getelementptr inbounds [256 x i8], ptr %71, i64 0, i64 0
  %73 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %64, ptr noundef @.str.3, ptr noundef @path, ptr noundef %72) #6
  %74 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %75 = call noalias ptr @fopen(ptr noundef %74, ptr noundef @.str.8)
  store ptr %75, ptr %12, align 8, !tbaa !13
  %76 = load ptr, ptr %12, align 8, !tbaa !13
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %89

78:                                               ; preds = %51
  %79 = load ptr, ptr @files, align 8, !tbaa !13
  %80 = getelementptr inbounds ptr, ptr %79, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !13
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.FileStr, ptr %81, i64 %83
  %85 = getelementptr inbounds %struct.FileStr, ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds [256 x i8], ptr %85, i64 0, i64 0
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %86, ptr noundef @path, ptr noundef @.str.2, i32 noundef 162)
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  call void @exit(i32 noundef 1) #7
  unreachable

89:                                               ; preds = %51
  %90 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %91 = load ptr, ptr @files, align 8, !tbaa !13
  %92 = getelementptr inbounds ptr, ptr %91, i64 9
  %93 = load ptr, ptr %92, align 8, !tbaa !13
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %struct.FileStr, ptr %93, i64 %95
  %97 = getelementptr inbounds %struct.FileStr, ptr %96, i32 0, i32 1
  %98 = getelementptr inbounds [256 x i8], ptr %97, i64 0, i64 0
  %99 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %90, ptr noundef @.str.3, ptr noundef @path, ptr noundef %98) #6
  %100 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %101 = call noalias ptr @fopen(ptr noundef %100, ptr noundef @.str.8)
  store ptr %101, ptr %14, align 8, !tbaa !13
  %102 = load ptr, ptr %14, align 8, !tbaa !13
  %103 = icmp eq ptr %102, null
  br i1 %103, label %104, label %115

104:                                              ; preds = %89
  %105 = load ptr, ptr @files, align 8, !tbaa !13
  %106 = getelementptr inbounds ptr, ptr %105, i64 9
  %107 = load ptr, ptr %106, align 8, !tbaa !13
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %struct.FileStr, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.FileStr, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds [256 x i8], ptr %111, i64 0, i64 0
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %112, ptr noundef @path, ptr noundef @.str.2, i32 noundef 170)
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  call void @exit(i32 noundef 1) #7
  unreachable

115:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %329, %115
  %117 = load i32, ptr %17, align 4, !tbaa !5
  %118 = load ptr, ptr @fileList, align 8, !tbaa !13
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %struct.FileListStr, ptr %118, i64 %120
  %122 = getelementptr inbounds %struct.FileListStr, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !15
  %124 = icmp slt i32 %117, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %116
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %332

126:                                              ; preds = %116
  %127 = getelementptr inbounds [512 x i8], ptr %10, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %127, i8 0, i64 512, i1 false)
  %128 = load ptr, ptr @files, align 8, !tbaa !13
  %129 = getelementptr inbounds ptr, ptr %128, i64 5
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  %131 = load i32, ptr %2, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.FileStr, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.FileStr, ptr %133, i32 0, i32 1
  %135 = getelementptr inbounds [256 x i8], ptr %134, i64 0, i64 0
  %136 = load ptr, ptr @fileList, align 8, !tbaa !13
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct.FileListStr, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.FileListStr, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %17, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [128 x [64 x i8]], ptr %140, i64 0, i64 %143
  %145 = getelementptr inbounds [64 x i8], ptr %144, i64 0, i64 0
  %146 = getelementptr inbounds [512 x i8], ptr %10, i64 0, i64 0
  call void @FindTargetFile(ptr noundef %135, ptr noundef %145, ptr noundef %146)
  %147 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %148 = getelementptr inbounds [512 x i8], ptr %10, i64 0, i64 0
  %149 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %147, ptr noundef @.str.3, ptr noundef @path, ptr noundef %148) #6
  %150 = getelementptr inbounds [512 x i8], ptr %9, i64 0, i64 0
  %151 = call noalias ptr @fopen(ptr noundef %150, ptr noundef @.str.8)
  store ptr %151, ptr %13, align 8, !tbaa !13
  %152 = load ptr, ptr %13, align 8, !tbaa !13
  %153 = icmp eq ptr %152, null
  br i1 %153, label %154, label %158

154:                                              ; preds = %126
  %155 = getelementptr inbounds [512 x i8], ptr %10, i64 0, i64 0
  %156 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %155, ptr noundef @path, ptr noundef @.str.2, i32 noundef 183)
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  call void @exit(i32 noundef 1) #7
  unreachable

158:                                              ; preds = %126
  %159 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %160 = load i32, ptr %17, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %struct.SectionStr, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct.SectionStr, ptr %162, i32 0, i32 0
  %164 = load i64, ptr %163, align 8, !tbaa !19
  %165 = sitofp i64 %164 to double
  %166 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %167 = load i32, ptr %17, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds %struct.SectionStr, ptr %166, i64 %168
  %170 = getelementptr inbounds %struct.SectionStr, ptr %169, i32 0, i32 1
  %171 = load double, ptr %170, align 8, !tbaa !30
  %172 = fadd double %165, %171
  %173 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %174 = load i32, ptr %17, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds %struct.SectionStr, ptr %173, i64 %175
  %177 = getelementptr inbounds %struct.SectionStr, ptr %176, i32 0, i32 4
  %178 = load double, ptr %177, align 8, !tbaa !31
  %179 = fdiv double %172, %178
  %180 = fadd double %179, 1.000000e+00
  %181 = fptosi double %180 to i64
  store i64 %181, ptr %5, align 8, !tbaa !9
  %182 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %183 = load i32, ptr %17, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.SectionStr, ptr %182, i64 %184
  %186 = getelementptr inbounds %struct.SectionStr, ptr %185, i32 0, i32 1
  %187 = load double, ptr %186, align 8, !tbaa !30
  %188 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %189 = load i32, ptr %17, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds %struct.SectionStr, ptr %188, i64 %190
  %192 = getelementptr inbounds %struct.SectionStr, ptr %191, i32 0, i32 4
  %193 = load double, ptr %192, align 8, !tbaa !31
  %194 = fdiv double %187, %193
  %195 = fptosi double %194 to i64
  store i64 %195, ptr %4, align 8, !tbaa !9
  br label %196

196:                                              ; preds = %323, %158
  %197 = load i64, ptr %4, align 8, !tbaa !9
  %198 = load i64, ptr %5, align 8, !tbaa !9
  %199 = icmp slt i64 %197, %198
  br i1 %199, label %200, label %326

200:                                              ; preds = %196
  %201 = load ptr, ptr %12, align 8, !tbaa !13
  %202 = call i32 @ReadGro(ptr noundef %201)
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %212, label %204

204:                                              ; preds = %200
  %205 = load ptr, ptr %13, align 8, !tbaa !13
  %206 = call i32 @ReadConnectionMap(ptr noundef %205)
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %212, label %208

208:                                              ; preds = %204
  %209 = load ptr, ptr %14, align 8, !tbaa !13
  %210 = call i32 @ReadEnergyFile(ptr noundef %209, ptr noundef @energy)
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %213

212:                                              ; preds = %208, %204, %200
  br label %326

213:                                              ; preds = %208
  %214 = load double, ptr getelementptr inbounds (%struct.EnergyReadStr, ptr @energy, i32 0, i32 3), align 8, !tbaa !32
  store double %214, ptr %7, align 8, !tbaa !11
  %215 = load i64, ptr %4, align 8, !tbaa !9
  call void @PrintProcess(i64 noundef %215)
  %216 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %217 = load i32, ptr %17, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds %struct.SectionStr, ptr %216, i64 %218
  store ptr %219, ptr %11, align 8, !tbaa !13
  %220 = load i32, ptr @nRow, align 4, !tbaa !5
  %221 = load ptr, ptr @refCoor, align 8, !tbaa !13
  %222 = getelementptr inbounds ptr, ptr %221, i64 0
  %223 = load ptr, ptr %222, align 8, !tbaa !13
  %224 = load ptr, ptr @curCoor, align 8, !tbaa !13
  %225 = call double @CalRMSD(i32 noundef 3, i32 noundef %220, ptr noundef %223, ptr noundef %224)
  %226 = fdiv double %225, 1.000000e+01
  %227 = getelementptr inbounds [2 x double], ptr %6, i64 0, i64 0
  store double %226, ptr %227, align 16, !tbaa !11
  %228 = load i32, ptr @nRow, align 4, !tbaa !5
  %229 = load ptr, ptr @refCoor, align 8, !tbaa !13
  %230 = getelementptr inbounds ptr, ptr %229, i64 1
  %231 = load ptr, ptr %230, align 8, !tbaa !13
  %232 = load ptr, ptr @curCoor, align 8, !tbaa !13
  %233 = call double @CalRMSD(i32 noundef 3, i32 noundef %228, ptr noundef %231, ptr noundef %232)
  %234 = fdiv double %233, 1.000000e+01
  %235 = getelementptr inbounds [2 x double], ptr %6, i64 0, i64 1
  store double %234, ptr %235, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %261, %213
  %237 = load i32, ptr %19, align 4, !tbaa !5
  %238 = icmp slt i32 %237, 20
  br i1 %238, label %240, label %239

239:                                              ; preds = %236
  store i32 11, ptr %18, align 4
  br label %264

240:                                              ; preds = %236
  %241 = getelementptr inbounds [2 x double], ptr %6, i64 0, i64 0
  %242 = load double, ptr %241, align 16, !tbaa !11
  %243 = load i32, ptr %19, align 4, !tbaa !5
  %244 = sitofp i32 %243 to double
  %245 = load double, ptr %8, align 8, !tbaa !11
  %246 = fmul double %244, %245
  %247 = fcmp ogt double %242, %246
  br i1 %247, label %248, label %260

248:                                              ; preds = %240
  %249 = getelementptr inbounds [2 x double], ptr %6, i64 0, i64 0
  %250 = load double, ptr %249, align 16, !tbaa !11
  %251 = load i32, ptr %19, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  %253 = sitofp i32 %252 to double
  %254 = load double, ptr %8, align 8, !tbaa !11
  %255 = fmul double %253, %254
  %256 = fcmp ole double %250, %255
  br i1 %256, label %257, label %260

257:                                              ; preds = %248
  %258 = load i32, ptr %19, align 4, !tbaa !5
  %259 = getelementptr inbounds [2 x i32], ptr %3, i64 0, i64 0
  store i32 %258, ptr %259, align 4, !tbaa !5
  store i32 11, ptr %18, align 4
  br label %264

260:                                              ; preds = %248, %240
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %19, align 4, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %19, align 4, !tbaa !5
  br label %236, !llvm.loop !34

264:                                              ; preds = %257, %239
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %265

265:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %266

266:                                              ; preds = %291, %265
  %267 = load i32, ptr %20, align 4, !tbaa !5
  %268 = icmp slt i32 %267, 20
  br i1 %268, label %270, label %269

269:                                              ; preds = %266
  store i32 14, ptr %18, align 4
  br label %294

270:                                              ; preds = %266
  %271 = getelementptr inbounds [2 x double], ptr %6, i64 0, i64 1
  %272 = load double, ptr %271, align 8, !tbaa !11
  %273 = load i32, ptr %20, align 4, !tbaa !5
  %274 = sitofp i32 %273 to double
  %275 = load double, ptr %8, align 8, !tbaa !11
  %276 = fmul double %274, %275
  %277 = fcmp ogt double %272, %276
  br i1 %277, label %278, label %290

278:                                              ; preds = %270
  %279 = getelementptr inbounds [2 x double], ptr %6, i64 0, i64 1
  %280 = load double, ptr %279, align 8, !tbaa !11
  %281 = load i32, ptr %20, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  %283 = sitofp i32 %282 to double
  %284 = load double, ptr %8, align 8, !tbaa !11
  %285 = fmul double %283, %284
  %286 = fcmp ole double %280, %285
  br i1 %286, label %287, label %290

287:                                              ; preds = %278
  %288 = load i32, ptr %20, align 4, !tbaa !5
  %289 = getelementptr inbounds [2 x i32], ptr %3, i64 0, i64 1
  store i32 %288, ptr %289, align 4, !tbaa !5
  store i32 14, ptr %18, align 4
  br label %294

290:                                              ; preds = %278, %270
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %20, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %20, align 4, !tbaa !5
  br label %266, !llvm.loop !35

294:                                              ; preds = %287, %269
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %295

295:                                              ; preds = %294
  %296 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %297 = getelementptr inbounds [2 x i32], ptr %3, i64 0, i64 0
  %298 = load i32, ptr %297, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds ptr, ptr %296, i64 %299
  %301 = load ptr, ptr %300, align 8, !tbaa !13
  %302 = getelementptr inbounds [2 x i32], ptr %3, i64 0, i64 1
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds %struct.PESurStr, ptr %301, i64 %304
  %306 = getelementptr inbounds %struct.PESurStr, ptr %305, i32 0, i32 0
  %307 = load i32, ptr %306, align 8, !tbaa !36
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %306, align 8, !tbaa !36
  %309 = load double, ptr %7, align 8, !tbaa !11
  %310 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %311 = getelementptr inbounds [2 x i32], ptr %3, i64 0, i64 0
  %312 = load i32, ptr %311, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds ptr, ptr %310, i64 %313
  %315 = load ptr, ptr %314, align 8, !tbaa !13
  %316 = getelementptr inbounds [2 x i32], ptr %3, i64 0, i64 1
  %317 = load i32, ptr %316, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds %struct.PESurStr, ptr %315, i64 %318
  %320 = getelementptr inbounds %struct.PESurStr, ptr %319, i32 0, i32 1
  %321 = load double, ptr %320, align 8, !tbaa !38
  %322 = fadd double %321, %309
  store double %322, ptr %320, align 8, !tbaa !38
  br label %323

323:                                              ; preds = %295
  %324 = load i64, ptr %4, align 8, !tbaa !9
  %325 = add nsw i64 %324, 1
  store i64 %325, ptr %4, align 8, !tbaa !9
  br label %196, !llvm.loop !39

326:                                              ; preds = %212, %196
  %327 = load ptr, ptr %13, align 8, !tbaa !13
  %328 = call i32 @fclose(ptr noundef %327)
  br label %329

329:                                              ; preds = %326
  %330 = load i32, ptr %17, align 4, !tbaa !5
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %17, align 4, !tbaa !5
  br label %116, !llvm.loop !40

332:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %333

333:                                              ; preds = %414, %332
  %334 = load i32, ptr %21, align 4, !tbaa !5
  %335 = icmp slt i32 %334, 20
  br i1 %335, label %337, label %336

336:                                              ; preds = %333
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %417

337:                                              ; preds = %333
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %338

338:                                              ; preds = %410, %337
  %339 = load i32, ptr %22, align 4, !tbaa !5
  %340 = icmp slt i32 %339, 20
  br i1 %340, label %342, label %341

341:                                              ; preds = %338
  store i32 20, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %413

342:                                              ; preds = %338
  %343 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %344 = load i32, ptr %21, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds ptr, ptr %343, i64 %345
  %347 = load ptr, ptr %346, align 8, !tbaa !13
  %348 = load i32, ptr %22, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds %struct.PESurStr, ptr %347, i64 %349
  %351 = getelementptr inbounds %struct.PESurStr, ptr %350, i32 0, i32 0
  %352 = load i32, ptr %351, align 8, !tbaa !36
  %353 = icmp ne i32 %352, 0
  br i1 %353, label %354, label %377

354:                                              ; preds = %342
  %355 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %356 = load i32, ptr %21, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds ptr, ptr %355, i64 %357
  %359 = load ptr, ptr %358, align 8, !tbaa !13
  %360 = load i32, ptr %22, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds %struct.PESurStr, ptr %359, i64 %361
  %363 = getelementptr inbounds %struct.PESurStr, ptr %362, i32 0, i32 0
  %364 = load i32, ptr %363, align 8, !tbaa !36
  %365 = sitofp i32 %364 to double
  %366 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %367 = load i32, ptr %21, align 4, !tbaa !5
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds ptr, ptr %366, i64 %368
  %370 = load ptr, ptr %369, align 8, !tbaa !13
  %371 = load i32, ptr %22, align 4, !tbaa !5
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds %struct.PESurStr, ptr %370, i64 %372
  %374 = getelementptr inbounds %struct.PESurStr, ptr %373, i32 0, i32 1
  %375 = load double, ptr %374, align 8, !tbaa !38
  %376 = fdiv double %375, %365
  store double %376, ptr %374, align 8, !tbaa !38
  br label %377

377:                                              ; preds = %354, %342
  %378 = load ptr, ptr %15, align 8, !tbaa !13
  %379 = load i32, ptr %21, align 4, !tbaa !5
  %380 = sitofp i32 %379 to double
  %381 = fadd double %380, 5.000000e-01
  %382 = load double, ptr %8, align 8, !tbaa !11
  %383 = fmul double %381, %382
  %384 = load i32, ptr %22, align 4, !tbaa !5
  %385 = sitofp i32 %384 to double
  %386 = fadd double %385, 5.000000e-01
  %387 = load double, ptr %8, align 8, !tbaa !11
  %388 = fmul double %386, %387
  %389 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %390 = load i32, ptr %21, align 4, !tbaa !5
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds ptr, ptr %389, i64 %391
  %393 = load ptr, ptr %392, align 8, !tbaa !13
  %394 = load i32, ptr %22, align 4, !tbaa !5
  %395 = sext i32 %394 to i64
  %396 = getelementptr inbounds %struct.PESurStr, ptr %393, i64 %395
  %397 = getelementptr inbounds %struct.PESurStr, ptr %396, i32 0, i32 1
  %398 = load double, ptr %397, align 8, !tbaa !38
  %399 = load ptr, ptr @EnSurGrid, align 8, !tbaa !13
  %400 = load i32, ptr %21, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds ptr, ptr %399, i64 %401
  %403 = load ptr, ptr %402, align 8, !tbaa !13
  %404 = load i32, ptr %22, align 4, !tbaa !5
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds %struct.PESurStr, ptr %403, i64 %405
  %407 = getelementptr inbounds %struct.PESurStr, ptr %406, i32 0, i32 0
  %408 = load i32, ptr %407, align 8, !tbaa !36
  %409 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %378, ptr noundef @.str.20, double noundef %383, double noundef %388, double noundef %398, i32 noundef %408) #6
  br label %410

410:                                              ; preds = %377
  %411 = load i32, ptr %22, align 4, !tbaa !5
  %412 = add nsw i32 %411, 1
  store i32 %412, ptr %22, align 4, !tbaa !5
  br label %338, !llvm.loop !41

413:                                              ; preds = %341
  br label %414

414:                                              ; preds = %413
  %415 = load i32, ptr %21, align 4, !tbaa !5
  %416 = add nsw i32 %415, 1
  store i32 %416, ptr %21, align 4, !tbaa !5
  br label %333, !llvm.loop !42

417:                                              ; preds = %336
  %418 = load ptr, ptr %12, align 8, !tbaa !13
  %419 = call i32 @fclose(ptr noundef %418)
  %420 = load ptr, ptr %14, align 8, !tbaa !13
  %421 = call i32 @fclose(ptr noundef %420)
  %422 = load ptr, ptr %15, align 8, !tbaa !13
  %423 = call i32 @fclose(ptr noundef %422)
  call void @FreeVar()
  %424 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %425 = load ptr, ptr @stdout, align 8, !tbaa !13
  %426 = call i32 @fflush(ptr noundef %425)
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  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 512, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

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

declare void @FindTargetFile(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @ReadConnectionMap(ptr noundef) #1

declare i32 @ReadEnergyFile(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"FileListStr", !6, i64 0, !7, i64 4}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !10, i64 0}
!20 = !{!"SectionStr", !10, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !7, i64 40, !21, i64 64, !23, i64 120, !24, i64 208, !25, i64 240, !26, i64 288}
!21 = !{!"WallStr", !7, i64 0, !7, i64 20, !22, i64 40}
!22 = !{!"AtomStr", !14, i64 0, !14, i64 8}
!23 = !{!"DynamicWallStr", !7, i64 0, !6, i64 16, !6, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !7, i64 56}
!24 = !{!"ObstructionStr", !6, i64 0, !6, i64 4, !14, i64 8, !14, i64 16, !14, i64 24}
!25 = !{!"TunnelStr", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !22, i64 32}
!26 = !{!"FlowStr", !6, i64 0, !27, i64 8, !28, i64 40, !29, i64 88}
!27 = !{!"ConstVStr", !7, i64 0}
!28 = !{!"ForceStr", !7, i64 0, !14, i64 32, !14, i64 40}
!29 = !{!"ChargeStr", !6, i64 0, !6, i64 4, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!30 = !{!20, !12, i64 8}
!31 = !{!20, !12, i64 32}
!32 = !{!33, !12, i64 24}
!33 = !{!"EnergyReadStr", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!34 = distinct !{!34, !18}
!35 = distinct !{!35, !18}
!36 = !{!37, !6, i64 0}
!37 = !{!"PESurStr", !6, i64 0, !12, i64 8}
!38 = !{!37, !12, i64 8}
!39 = distinct !{!39, !18}
!40 = distinct !{!40, !18}
!41 = distinct !{!41, !18}
!42 = distinct !{!42, !18}


; 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.FileListStr = type { i32, [128 x [64 x i8]] }
%struct.EnergyReadStr = type { double, double, double, double, double, double }
%struct.FileStr = type { i32, [256 x i8] }
%struct.SectionStr = type { i64, double, double, double, double, [20 x i8], %struct.WallStr, %struct.DynamicWallStr, %struct.ObstructionStr, %struct.TunnelStr, %struct.FlowStr }
%struct.WallStr = type { [20 x i8], [20 x i8], %struct.AtomStr }
%struct.AtomStr = type { ptr, ptr }
%struct.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.TunnelStr = type { i32, double, double, double, %struct.AtomStr }
%struct.FlowStr = type { i32, %struct.ConstVStr, %struct.ForceStr, %struct.ChargeStr }
%struct.ConstVStr = type { [4 x double] }
%struct.ForceStr = type { [4 x double], ptr, ptr }
%struct.ChargeStr = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.PESurStr = type { i32, double }

@stdout = external local_unnamed_addr global ptr, align 8
@RMSDFile = external global %struct.FileListStr, align 4
@.str.2 = external hidden unnamed_addr constant [66 x i8], align 1
@nRow = external hidden local_unnamed_addr global i32, align 4
@refCoor = external hidden local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@path = external global [1024 x i8], align 16
@files = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [79 x i8], align 1
@fileList = external local_unnamed_addr global ptr, align 8
@sectInfo = external local_unnamed_addr global ptr, align 8
@curCoor = external hidden local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [88 x i8], align 1
@energy = external global %struct.EnergyReadStr, align 8
@EnSurGrid = external dso_local local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [30 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare hidden void @InitializeVariables() local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden void @ReadRef(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; 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 i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

declare i32 @ReadGro(ptr noundef) local_unnamed_addr #4

declare void @PrintProcess(i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden double @CalRMSD(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden void @FreeVar() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @PESurfaceInfo(i32 noundef %0) local_unnamed_addr #2 {
  %2 = alloca [512 x i8], align 16
  %3 = alloca [512 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #6
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %5 = load ptr, ptr @stdout, align 8, !tbaa !5
  %6 = tail call i32 @fflush(ptr noundef %5)
  %7 = load i32, ptr @RMSDFile, align 4, !tbaa !9
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %9, label %12

9:                                                ; preds = %1
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull @.str.2, i32 noundef 144)
  tail call void @exit(i32 noundef 1) #7
  unreachable

12:                                               ; preds = %1
  tail call void @InitializeVariables()
  %13 = load i32, ptr @RMSDFile, align 4, !tbaa !9
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %12
  %15 = load ptr, ptr @files, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 120
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = sext i32 %0 to i64
  %19 = getelementptr inbounds %struct.FileStr, ptr %17, i64 %18, i32 1
  %20 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @path, ptr noundef nonnull %19) #6
  %21 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.4)
  %22 = load ptr, ptr @files, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 64
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.FileStr, ptr %24, i64 %18, i32 1
  %26 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @path, ptr noundef nonnull %25) #6
  %27 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.8)
  %28 = icmp eq ptr %27, null
  %29 = load ptr, ptr @files, align 8, !tbaa !5
  br i1 %28, label %38, label %44

.lr.ph:                                           ; preds = %12, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %12 ]
  %30 = getelementptr inbounds [128 x [64 x i8]], ptr getelementptr inbounds (i8, ptr @RMSDFile, i64 4), i64 0, i64 %indvars.iv
  %31 = load i32, ptr @nRow, align 4, !tbaa !12
  %32 = load ptr, ptr @refCoor, align 8, !tbaa !5
  %33 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  tail call void @ReadRef(ptr noundef nonnull %30, i32 noundef 3, i32 noundef %31, ptr noundef %34)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %35 = load i32, ptr @RMSDFile, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next, %36
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !13

38:                                               ; preds = %._crit_edge
  %39 = getelementptr inbounds i8, ptr %29, i64 64
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.FileStr, ptr %40, i64 %18, i32 1
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %41, ptr noundef nonnull @path, ptr noundef nonnull @.str.2, i32 noundef 162)
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  tail call void @exit(i32 noundef 1) #7
  unreachable

44:                                               ; preds = %._crit_edge
  %45 = getelementptr inbounds i8, ptr %29, i64 72
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.FileStr, ptr %46, i64 %18, i32 1
  %48 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @path, ptr noundef nonnull %47) #6
  %49 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.8)
  %50 = icmp eq ptr %49, null
  br i1 %50, label %55, label %.preheader90

.preheader90:                                     ; preds = %44
  %51 = load ptr, ptr @fileList, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.FileListStr, ptr %51, i64 %18
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph113, label %.preheader.preheader

55:                                               ; preds = %44
  %56 = load ptr, ptr @files, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 72
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.FileStr, ptr %58, i64 %18, i32 1
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %59, ptr noundef nonnull @path, ptr noundef nonnull @.str.2, i32 noundef 170)
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  tail call void @exit(i32 noundef 1) #7
  unreachable

.lr.ph113:                                        ; preds = %.preheader90, %._crit_edge99
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %._crit_edge99 ], [ 0, %.preheader90 ]
  %62 = phi ptr [ %243, %._crit_edge99 ], [ %51, %.preheader90 ]
  %.sroa.564.0111 = phi i32 [ %.sroa.564.1.lcssa, %._crit_edge99 ], [ undef, %.preheader90 ]
  %.sroa.062.0110 = phi i32 [ %.sroa.062.1.lcssa, %._crit_edge99 ], [ undef, %.preheader90 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %3, i8 0, i64 512, i1 false)
  %63 = load ptr, ptr @files, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 40
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.FileStr, ptr %65, i64 %18, i32 1
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %67 = getelementptr inbounds %struct.FileListStr, ptr %62, i64 %18, i32 1, i64 %indvars.iv.next118
  call void @FindTargetFile(ptr noundef nonnull %66, ptr noundef nonnull %67, ptr noundef nonnull %3) #6
  %68 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @path, ptr noundef nonnull %3) #6
  %69 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.8)
  %70 = icmp eq ptr %69, null
  br i1 %70, label %71, label %74

71:                                               ; preds = %.lr.ph113
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %3, ptr noundef nonnull @path, ptr noundef nonnull @.str.2, i32 noundef 183)
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  call void @exit(i32 noundef 1) #7
  unreachable

74:                                               ; preds = %.lr.ph113
  %75 = load ptr, ptr @sectInfo, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.SectionStr, ptr %75, i64 %indvars.iv117
  %77 = load i64, ptr %76, align 8, !tbaa !15
  %78 = sitofp i64 %77 to double
  %79 = getelementptr inbounds i8, ptr %76, i64 8
  %80 = load double, ptr %79, align 8, !tbaa !28
  %81 = fadd double %80, %78
  %82 = getelementptr inbounds i8, ptr %76, i64 32
  %83 = load double, ptr %82, align 8, !tbaa !29
  %84 = fdiv double %81, %83
  %85 = fadd double %84, 1.000000e+00
  %86 = fptosi double %85 to i64
  %87 = fdiv double %80, %83
  %88 = fptosi double %87 to i64
  %89 = icmp slt i64 %88, %86
  br i1 %89, label %.lr.ph98, label %._crit_edge99

.lr.ph98:                                         ; preds = %74, %229
  %.sroa.564.196 = phi i32 [ %.sroa.564.2, %229 ], [ %.sroa.564.0111, %74 ]
  %.sroa.062.195 = phi i32 [ %.sroa.062.2, %229 ], [ %.sroa.062.0110, %74 ]
  %.07994 = phi i64 [ %241, %229 ], [ %88, %74 ]
  %90 = call i32 @ReadGro(ptr noundef nonnull %27) #6
  %.not86 = icmp eq i32 %90, 0
  br i1 %.not86, label %91, label %._crit_edge99

91:                                               ; preds = %.lr.ph98
  %92 = call i32 @ReadConnectionMap(ptr noundef nonnull %69) #6
  %.not87 = icmp eq i32 %92, 0
  br i1 %.not87, label %93, label %._crit_edge99

93:                                               ; preds = %91
  %94 = call i32 @ReadEnergyFile(ptr noundef nonnull %49, ptr noundef nonnull @energy) #6
  %.not88 = icmp eq i32 %94, 0
  br i1 %.not88, label %95, label %._crit_edge99

95:                                               ; preds = %93
  %96 = load double, ptr getelementptr inbounds (i8, ptr @energy, i64 24), align 8, !tbaa !30
  call void @PrintProcess(i64 noundef %.07994) #6
  %97 = load i32, ptr @nRow, align 4, !tbaa !12
  %98 = load ptr, ptr @refCoor, align 8, !tbaa !5
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = load ptr, ptr @curCoor, align 8, !tbaa !5
  %101 = call double @CalRMSD(i32 noundef 3, i32 noundef %97, ptr noundef %99, ptr noundef %100)
  %102 = fdiv double %101, 1.000000e+01
  %103 = load i32, ptr @nRow, align 4, !tbaa !12
  %104 = load ptr, ptr @refCoor, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = load ptr, ptr @curCoor, align 8, !tbaa !5
  %108 = call double @CalRMSD(i32 noundef 3, i32 noundef %103, ptr noundef %106, ptr noundef %107)
  %109 = fdiv double %108, 1.000000e+01
  %110 = fcmp ule double %102, 0.000000e+00
  %111 = fcmp ugt double %102, 5.000000e-02
  %or.cond = or i1 %110, %111
  br i1 %or.cond, label %112, label %169

112:                                              ; preds = %95
  %113 = fcmp ule double %102, 5.000000e-02
  %114 = fcmp ugt double %102, 1.000000e-01
  %or.cond129 = or i1 %113, %114
  br i1 %or.cond129, label %115, label %169

115:                                              ; preds = %112
  %116 = fcmp ule double %102, 1.000000e-01
  %117 = fcmp ugt double %102, 0x3FC3333333333334
  %or.cond130 = or i1 %116, %117
  br i1 %or.cond130, label %118, label %169

118:                                              ; preds = %115
  %119 = fcmp ule double %102, 0x3FC3333333333334
  %120 = fcmp ugt double %102, 2.000000e-01
  %or.cond131 = or i1 %119, %120
  br i1 %or.cond131, label %121, label %169

121:                                              ; preds = %118
  %122 = fcmp ule double %102, 2.000000e-01
  %123 = fcmp ugt double %102, 2.500000e-01
  %or.cond132 = or i1 %122, %123
  br i1 %or.cond132, label %124, label %169

124:                                              ; preds = %121
  %125 = fcmp ule double %102, 2.500000e-01
  %126 = fcmp ugt double %102, 0x3FD3333333333334
  %or.cond133 = or i1 %125, %126
  br i1 %or.cond133, label %127, label %169

127:                                              ; preds = %124
  %128 = fcmp ule double %102, 0x3FD3333333333334
  %129 = fcmp ugt double %102, 0x3FD6666666666667
  %or.cond134 = or i1 %128, %129
  br i1 %or.cond134, label %130, label %169

130:                                              ; preds = %127
  %131 = fcmp ule double %102, 0x3FD6666666666667
  %132 = fcmp ugt double %102, 4.000000e-01
  %or.cond135 = or i1 %131, %132
  br i1 %or.cond135, label %133, label %169

133:                                              ; preds = %130
  %134 = fcmp ule double %102, 4.000000e-01
  %135 = fcmp ugt double %102, 4.500000e-01
  %or.cond136 = or i1 %134, %135
  br i1 %or.cond136, label %136, label %169

136:                                              ; preds = %133
  %137 = fcmp ule double %102, 4.500000e-01
  %138 = fcmp ugt double %102, 5.000000e-01
  %or.cond137 = or i1 %137, %138
  br i1 %or.cond137, label %139, label %169

139:                                              ; preds = %136
  %140 = fcmp ule double %102, 5.000000e-01
  %141 = fcmp ugt double %102, 5.500000e-01
  %or.cond138 = or i1 %140, %141
  br i1 %or.cond138, label %142, label %169

142:                                              ; preds = %139
  %143 = fcmp ule double %102, 5.500000e-01
  %144 = fcmp ugt double %102, 0x3FE3333333333334
  %or.cond139 = or i1 %143, %144
  br i1 %or.cond139, label %145, label %169

145:                                              ; preds = %142
  %146 = fcmp ule double %102, 0x3FE3333333333334
  %147 = fcmp ugt double %102, 6.500000e-01
  %or.cond140 = or i1 %146, %147
  br i1 %or.cond140, label %148, label %169

148:                                              ; preds = %145
  %149 = fcmp ule double %102, 6.500000e-01
  %150 = fcmp ugt double %102, 0x3FE6666666666667
  %or.cond141 = or i1 %149, %150
  br i1 %or.cond141, label %151, label %169

151:                                              ; preds = %148
  %152 = fcmp ule double %102, 0x3FE6666666666667
  %153 = fcmp ugt double %102, 7.500000e-01
  %or.cond142 = or i1 %152, %153
  br i1 %or.cond142, label %154, label %169

154:                                              ; preds = %151
  %155 = fcmp ule double %102, 7.500000e-01
  %156 = fcmp ugt double %102, 8.000000e-01
  %or.cond143 = or i1 %155, %156
  br i1 %or.cond143, label %157, label %169

157:                                              ; preds = %154
  %158 = fcmp ule double %102, 8.000000e-01
  %159 = fcmp ugt double %102, 0x3FEB333333333334
  %or.cond144 = or i1 %158, %159
  br i1 %or.cond144, label %160, label %169

160:                                              ; preds = %157
  %161 = fcmp ule double %102, 0x3FEB333333333334
  %162 = fcmp ugt double %102, 9.000000e-01
  %or.cond145 = or i1 %161, %162
  br i1 %or.cond145, label %163, label %169

163:                                              ; preds = %160
  %164 = fcmp ule double %102, 9.000000e-01
  %165 = fcmp ugt double %102, 0x3FEE666666666667
  %or.cond146 = or i1 %164, %165
  br i1 %or.cond146, label %166, label %169

166:                                              ; preds = %163
  %167 = fcmp ule double %102, 0x3FEE666666666667
  %168 = fcmp ugt double %102, 1.000000e+00
  %or.cond147 = or i1 %167, %168
  %spec.select = select i1 %or.cond147, i32 %.sroa.062.195, i32 19
  br label %169

169:                                              ; preds = %166, %163, %160, %157, %154, %151, %148, %145, %142, %139, %136, %133, %130, %127, %124, %121, %118, %115, %112, %95
  %.sroa.062.2 = phi i32 [ 0, %95 ], [ 1, %112 ], [ 2, %115 ], [ 3, %118 ], [ 4, %121 ], [ 5, %124 ], [ 6, %127 ], [ 7, %130 ], [ 8, %133 ], [ 9, %136 ], [ 10, %139 ], [ 11, %142 ], [ 12, %145 ], [ 13, %148 ], [ 14, %151 ], [ 15, %154 ], [ 16, %157 ], [ 17, %160 ], [ 18, %163 ], [ %spec.select, %166 ]
  %170 = fcmp ule double %109, 0.000000e+00
  %171 = fcmp ugt double %109, 5.000000e-02
  %or.cond148 = or i1 %170, %171
  br i1 %or.cond148, label %172, label %229

172:                                              ; preds = %169
  %173 = fcmp ule double %109, 5.000000e-02
  %174 = fcmp ugt double %109, 1.000000e-01
  %or.cond149 = or i1 %173, %174
  br i1 %or.cond149, label %175, label %229

175:                                              ; preds = %172
  %176 = fcmp ule double %109, 1.000000e-01
  %177 = fcmp ugt double %109, 0x3FC3333333333334
  %or.cond150 = or i1 %176, %177
  br i1 %or.cond150, label %178, label %229

178:                                              ; preds = %175
  %179 = fcmp ule double %109, 0x3FC3333333333334
  %180 = fcmp ugt double %109, 2.000000e-01
  %or.cond151 = or i1 %179, %180
  br i1 %or.cond151, label %181, label %229

181:                                              ; preds = %178
  %182 = fcmp ule double %109, 2.000000e-01
  %183 = fcmp ugt double %109, 2.500000e-01
  %or.cond152 = or i1 %182, %183
  br i1 %or.cond152, label %184, label %229

184:                                              ; preds = %181
  %185 = fcmp ule double %109, 2.500000e-01
  %186 = fcmp ugt double %109, 0x3FD3333333333334
  %or.cond153 = or i1 %185, %186
  br i1 %or.cond153, label %187, label %229

187:                                              ; preds = %184
  %188 = fcmp ule double %109, 0x3FD3333333333334
  %189 = fcmp ugt double %109, 0x3FD6666666666667
  %or.cond154 = or i1 %188, %189
  br i1 %or.cond154, label %190, label %229

190:                                              ; preds = %187
  %191 = fcmp ule double %109, 0x3FD6666666666667
  %192 = fcmp ugt double %109, 4.000000e-01
  %or.cond155 = or i1 %191, %192
  br i1 %or.cond155, label %193, label %229

193:                                              ; preds = %190
  %194 = fcmp ule double %109, 4.000000e-01
  %195 = fcmp ugt double %109, 4.500000e-01
  %or.cond156 = or i1 %194, %195
  br i1 %or.cond156, label %196, label %229

196:                                              ; preds = %193
  %197 = fcmp ule double %109, 4.500000e-01
  %198 = fcmp ugt double %109, 5.000000e-01
  %or.cond157 = or i1 %197, %198
  br i1 %or.cond157, label %199, label %229

199:                                              ; preds = %196
  %200 = fcmp ule double %109, 5.000000e-01
  %201 = fcmp ugt double %109, 5.500000e-01
  %or.cond158 = or i1 %200, %201
  br i1 %or.cond158, label %202, label %229

202:                                              ; preds = %199
  %203 = fcmp ule double %109, 5.500000e-01
  %204 = fcmp ugt double %109, 0x3FE3333333333334
  %or.cond159 = or i1 %203, %204
  br i1 %or.cond159, label %205, label %229

205:                                              ; preds = %202
  %206 = fcmp ule double %109, 0x3FE3333333333334
  %207 = fcmp ugt double %109, 6.500000e-01
  %or.cond160 = or i1 %206, %207
  br i1 %or.cond160, label %208, label %229

208:                                              ; preds = %205
  %209 = fcmp ule double %109, 6.500000e-01
  %210 = fcmp ugt double %109, 0x3FE6666666666667
  %or.cond161 = or i1 %209, %210
  br i1 %or.cond161, label %211, label %229

211:                                              ; preds = %208
  %212 = fcmp ule double %109, 0x3FE6666666666667
  %213 = fcmp ugt double %109, 7.500000e-01
  %or.cond162 = or i1 %212, %213
  br i1 %or.cond162, label %214, label %229

214:                                              ; preds = %211
  %215 = fcmp ule double %109, 7.500000e-01
  %216 = fcmp ugt double %109, 8.000000e-01
  %or.cond163 = or i1 %215, %216
  br i1 %or.cond163, label %217, label %229

217:                                              ; preds = %214
  %218 = fcmp ule double %109, 8.000000e-01
  %219 = fcmp ugt double %109, 0x3FEB333333333334
  %or.cond164 = or i1 %218, %219
  br i1 %or.cond164, label %220, label %229

220:                                              ; preds = %217
  %221 = fcmp ule double %109, 0x3FEB333333333334
  %222 = fcmp ugt double %109, 9.000000e-01
  %or.cond165 = or i1 %221, %222
  br i1 %or.cond165, label %223, label %229

223:                                              ; preds = %220
  %224 = fcmp ule double %109, 9.000000e-01
  %225 = fcmp ugt double %109, 0x3FEE666666666667
  %or.cond166 = or i1 %224, %225
  br i1 %or.cond166, label %226, label %229

226:                                              ; preds = %223
  %227 = fcmp ule double %109, 0x3FEE666666666667
  %228 = fcmp ugt double %109, 1.000000e+00
  %or.cond167 = or i1 %227, %228
  %spec.select168 = select i1 %or.cond167, i32 %.sroa.564.196, i32 19
  br label %229

229:                                              ; preds = %226, %223, %220, %217, %214, %211, %208, %205, %202, %199, %196, %193, %190, %187, %184, %181, %178, %175, %172, %169
  %.sroa.564.2 = phi i32 [ 0, %169 ], [ 1, %172 ], [ 2, %175 ], [ 3, %178 ], [ 4, %181 ], [ 5, %184 ], [ 6, %187 ], [ 7, %190 ], [ 8, %193 ], [ 9, %196 ], [ 10, %199 ], [ 11, %202 ], [ 12, %205 ], [ 13, %208 ], [ 14, %211 ], [ 15, %214 ], [ 16, %217 ], [ 17, %220 ], [ 18, %223 ], [ %spec.select168, %226 ]
  %230 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %231 = sext i32 %.sroa.062.2 to i64
  %232 = getelementptr inbounds ptr, ptr %230, i64 %231
  %233 = load ptr, ptr %232, align 8, !tbaa !5
  %234 = sext i32 %.sroa.564.2 to i64
  %235 = getelementptr inbounds %struct.PESurStr, ptr %233, i64 %234
  %236 = load i32, ptr %235, align 8, !tbaa !32
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %235, align 8, !tbaa !32
  %238 = getelementptr inbounds %struct.PESurStr, ptr %233, i64 %234, i32 1
  %239 = load double, ptr %238, align 8, !tbaa !34
  %240 = fadd double %96, %239
  store double %240, ptr %238, align 8, !tbaa !34
  %241 = add i64 %.07994, 1
  %exitcond.not = icmp eq i64 %241, %86
  br i1 %exitcond.not, label %._crit_edge99, label %.lr.ph98, !llvm.loop !35

._crit_edge99:                                    ; preds = %229, %93, %91, %.lr.ph98, %74
  %.sroa.062.1.lcssa = phi i32 [ %.sroa.062.0110, %74 ], [ %.sroa.062.195, %.lr.ph98 ], [ %.sroa.062.195, %91 ], [ %.sroa.062.195, %93 ], [ %.sroa.062.2, %229 ]
  %.sroa.564.1.lcssa = phi i32 [ %.sroa.564.0111, %74 ], [ %.sroa.564.196, %.lr.ph98 ], [ %.sroa.564.196, %91 ], [ %.sroa.564.196, %93 ], [ %.sroa.564.2, %229 ]
  %242 = call i32 @fclose(ptr noundef nonnull %69)
  %243 = load ptr, ptr @fileList, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.FileListStr, ptr %243, i64 %18
  %245 = load i32, ptr %244, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = icmp slt i64 %indvars.iv.next118, %246
  br i1 %247, label %.lr.ph113, label %.preheader.preheader, !llvm.loop !36

.preheader.preheader:                             ; preds = %._crit_edge99, %.preheader90
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %259
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %259 ], [ 0, %.preheader.preheader ]
  %248 = trunc nuw nsw i64 %indvars.iv124 to i32
  %249 = uitofp nneg i32 %248 to double
  %250 = fadd double %249, 5.000000e-01
  %251 = fmul double %250, 5.000000e-02
  br label %260

252:                                              ; preds = %259
  %253 = call i32 @fclose(ptr noundef nonnull %27)
  %254 = call i32 @fclose(ptr noundef nonnull %49)
  %255 = call i32 @fclose(ptr noundef %21)
  call void @FreeVar()
  %256 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %257 = load ptr, ptr @stdout, align 8, !tbaa !5
  %258 = call i32 @fflush(ptr noundef %257)
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  ret void

259:                                              ; preds = %271
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %exitcond127.not = icmp eq i64 %indvars.iv.next125, 20
  br i1 %exitcond127.not, label %252, label %.preheader, !llvm.loop !37

260:                                              ; preds = %.preheader, %271
  %indvars.iv120 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next121, %271 ]
  %261 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %262 = getelementptr inbounds ptr, ptr %261, i64 %indvars.iv124
  %263 = load ptr, ptr %262, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.PESurStr, ptr %263, i64 %indvars.iv120
  %265 = load i32, ptr %264, align 8, !tbaa !32
  %.not = icmp eq i32 %265, 0
  br i1 %.not, label %._crit_edge128, label %266

._crit_edge128:                                   ; preds = %260
  %.phi.trans.insert = getelementptr inbounds i8, ptr %264, i64 8
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !34
  br label %271

266:                                              ; preds = %260
  %267 = sitofp i32 %265 to double
  %268 = getelementptr inbounds i8, ptr %264, i64 8
  %269 = load double, ptr %268, align 8, !tbaa !34
  %270 = fdiv double %269, %267
  store double %270, ptr %268, align 8, !tbaa !34
  br label %271

271:                                              ; preds = %._crit_edge128, %266
  %272 = phi double [ %.pre, %._crit_edge128 ], [ %270, %266 ]
  %273 = trunc nuw nsw i64 %indvars.iv120 to i32
  %274 = uitofp nneg i32 %273 to double
  %275 = fadd double %274, 5.000000e-01
  %276 = fmul double %275, 5.000000e-02
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.20, double noundef %251, double noundef %276, double noundef %272, i32 noundef %265) #6
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond123.not = icmp eq i64 %indvars.iv.next121, 20
  br i1 %exitcond123.not, label %259, label %260, !llvm.loop !38
}

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

declare void @FindTargetFile(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @ReadConnectionMap(ptr noundef) local_unnamed_addr #4

declare i32 @ReadEnergyFile(ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { 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, !11, i64 0}
!10 = !{!"FileListStr", !11, i64 0, !7, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !17, i64 0}
!16 = !{!"SectionStr", !17, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !7, i64 40, !19, i64 64, !21, i64 120, !22, i64 208, !23, i64 240, !24, i64 288}
!17 = !{!"long", !7, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!"WallStr", !7, i64 0, !7, i64 20, !20, i64 40}
!20 = !{!"AtomStr", !6, i64 0, !6, i64 8}
!21 = !{!"DynamicWallStr", !7, i64 0, !11, i64 16, !11, i64 20, !18, i64 24, !18, i64 32, !18, i64 40, !18, i64 48, !7, i64 56}
!22 = !{!"ObstructionStr", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"TunnelStr", !11, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !20, i64 32}
!24 = !{!"FlowStr", !11, i64 0, !25, i64 8, !26, i64 40, !27, i64 88}
!25 = !{!"ConstVStr", !7, i64 0}
!26 = !{!"ForceStr", !7, i64 0, !6, i64 32, !6, i64 40}
!27 = !{!"ChargeStr", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!28 = !{!16, !18, i64 8}
!29 = !{!16, !18, i64 32}
!30 = !{!31, !18, i64 24}
!31 = !{!"EnergyReadStr", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40}
!32 = !{!33, !11, i64 0}
!33 = !{!"PESurStr", !11, i64 0, !18, i64 8}
!34 = !{!33, !18, i64 8}
!35 = distinct !{!35, !14}
!36 = distinct !{!36, !14}
!37 = distinct !{!37, !14}
!38 = distinct !{!38, !14}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass