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

; 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.CGGovStr = type { [2 x [16 x i8]], i32, i32 }
%struct.PepStr = type { i32, i32, i32, i32, double }
%struct.FileStr = type { i32, [256 x i8] }
%struct.FileListStr = type { i32, [128 x [64 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 }

@beginP = external hidden global i32, align 4
@numofprotein = external global i32, align 4
@endP = external hidden global i32, align 4
@atomnum = external global i32, align 4
@thisAtomNum = external hidden global i32, align 4
@offSet = external hidden global i32, align 4
@nPP = external global i32, align 4
@protein = external global ptr, align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = 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.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@fileList = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [88 x i8], align 1
@sectInfo = external global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@CG = external global %struct.CGGovStr, align 4
@.str.17 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @EnergyInfo(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca [1024 x i8], align 16
  %11 = alloca [1024 x i8], align 16
  %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
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store double 0.000000e+00, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store double 0.000000e+00, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i32 1, ptr @beginP, align 4, !tbaa !5
  %17 = load i32, ptr @numofprotein, align 4, !tbaa !5
  store i32 %17, ptr @endP, align 4, !tbaa !5
  %18 = load i32, ptr @atomnum, align 4, !tbaa !5
  store i32 %18, ptr @thisAtomNum, align 4, !tbaa !5
  store i32 0, ptr @offSet, align 4, !tbaa !5
  %19 = load i32, ptr @nPP, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %44

21:                                               ; preds = %1
  %22 = load i32, ptr @nPP, align 4, !tbaa !5
  store i32 %22, ptr @endP, align 4, !tbaa !5
  store i32 %22, ptr @beginP, align 4, !tbaa !5
  %23 = load ptr, ptr @protein, align 8, !tbaa !13
  %24 = load i32, ptr @nPP, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds %struct.PepStr, ptr %23, i64 %25
  %27 = getelementptr inbounds %struct.PepStr, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !15
  %29 = load ptr, ptr @protein, align 8, !tbaa !13
  %30 = load i32, ptr @nPP, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.PepStr, ptr %29, i64 %31
  %33 = getelementptr inbounds %struct.PepStr, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !17
  %35 = sub nsw i32 %28, %34
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr @thisAtomNum, align 4, !tbaa !5
  %37 = load ptr, ptr @protein, align 8, !tbaa !13
  %38 = load i32, ptr @nPP, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds %struct.PepStr, ptr %37, i64 %39
  %41 = getelementptr inbounds %struct.PepStr, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !17
  %43 = sub nsw i32 %42, 1
  store i32 %43, ptr @offSet, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %21, %1
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %46 = load ptr, ptr @stdout, align 8, !tbaa !13
  %47 = call i32 @fflush(ptr noundef %46)
  %48 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %49 = load ptr, ptr @files, align 8, !tbaa !13
  %50 = getelementptr inbounds ptr, ptr %49, i64 9
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds %struct.FileStr, ptr %51, i64 %53
  %55 = getelementptr inbounds %struct.FileStr, ptr %54, i32 0, i32 1
  %56 = getelementptr inbounds [256 x i8], ptr %55, i64 0, i64 0
  %57 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %48, ptr noundef @.str.1, ptr noundef @path, ptr noundef %56) #7
  %58 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %59 = call noalias ptr @fopen(ptr noundef %58, ptr noundef @.str.2)
  store ptr %59, ptr %15, align 8, !tbaa !13
  %60 = load ptr, ptr %15, align 8, !tbaa !13
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef @.str.7, ptr noundef @.str.8, ptr noundef @.str.9, ptr noundef @.str.10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %254, %44
  %63 = load i32, ptr %16, align 4, !tbaa !5
  %64 = load ptr, ptr @fileList, align 8, !tbaa !13
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct.FileListStr, ptr %64, i64 %66
  %68 = getelementptr inbounds %struct.FileListStr, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !18
  %70 = icmp slt i32 %63, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %257

72:                                               ; preds = %62
  %73 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %73, i8 0, i64 1024, i1 false)
  %74 = load ptr, ptr @files, align 8, !tbaa !13
  %75 = getelementptr inbounds ptr, ptr %74, i64 4
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %struct.FileStr, ptr %76, i64 %78
  %80 = getelementptr inbounds %struct.FileStr, ptr %79, i32 0, i32 1
  %81 = getelementptr inbounds [256 x i8], ptr %80, i64 0, i64 0
  %82 = load ptr, ptr @fileList, align 8, !tbaa !13
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %struct.FileListStr, ptr %82, i64 %84
  %86 = getelementptr inbounds %struct.FileListStr, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %16, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [128 x [64 x i8]], ptr %86, i64 0, i64 %89
  %91 = getelementptr inbounds [64 x i8], ptr %90, i64 0, i64 0
  %92 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  call void @FindTargetFile(ptr noundef %81, ptr noundef %91, ptr noundef %92)
  %93 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %94 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %95 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %93, ptr noundef @.str.1, ptr noundef @path, ptr noundef %94) #7
  %96 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %97 = call noalias ptr @fopen(ptr noundef %96, ptr noundef @.str.11)
  store ptr %97, ptr %13, align 8, !tbaa !13
  %98 = load ptr, ptr %13, align 8, !tbaa !13
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %104

100:                                              ; preds = %72
  %101 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %101, ptr noundef @path, ptr noundef @.str.13, i32 noundef 69)
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @exit(i32 noundef 1) #8
  unreachable

104:                                              ; preds = %72
  %105 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %105, i8 0, i64 1024, i1 false)
  %106 = load ptr, ptr @files, align 8, !tbaa !13
  %107 = getelementptr inbounds ptr, ptr %106, i64 5
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds %struct.FileStr, ptr %108, i64 %110
  %112 = getelementptr inbounds %struct.FileStr, ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds [256 x i8], ptr %112, i64 0, i64 0
  %114 = load ptr, ptr @fileList, align 8, !tbaa !13
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.FileListStr, ptr %114, i64 %116
  %118 = getelementptr inbounds %struct.FileListStr, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [128 x [64 x i8]], ptr %118, i64 0, i64 %121
  %123 = getelementptr inbounds [64 x i8], ptr %122, i64 0, i64 0
  %124 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  call void @FindTargetFile(ptr noundef %113, ptr noundef %123, ptr noundef %124)
  %125 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %126 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %127 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %125, ptr noundef @.str.1, ptr noundef @path, ptr noundef %126) #7
  %128 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %129 = call noalias ptr @fopen(ptr noundef %128, ptr noundef @.str.11)
  store ptr %129, ptr %14, align 8, !tbaa !13
  %130 = load ptr, ptr %14, align 8, !tbaa !13
  %131 = icmp eq ptr %130, null
  br i1 %131, label %132, label %143

132:                                              ; preds = %104
  %133 = load ptr, ptr @files, align 8, !tbaa !13
  %134 = getelementptr inbounds ptr, ptr %133, i64 5
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  %136 = load i32, ptr %2, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.FileStr, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.FileStr, ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds [256 x i8], ptr %139, i64 0, i64 0
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, ptr noundef %140, ptr noundef @path, ptr noundef @.str.13, i32 noundef 80)
  %142 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  call void @exit(i32 noundef 1) #8
  unreachable

143:                                              ; preds = %104
  %144 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %145 = load i32, ptr %16, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.SectionStr, ptr %144, i64 %146
  %148 = getelementptr inbounds %struct.SectionStr, ptr %147, i32 0, i32 1
  %149 = load double, ptr %148, align 8, !tbaa !20
  %150 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %151 = load i32, ptr %16, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.SectionStr, ptr %150, i64 %152
  %154 = getelementptr inbounds %struct.SectionStr, ptr %153, i32 0, i32 0
  %155 = load i64, ptr %154, align 8, !tbaa !31
  %156 = sitofp i64 %155 to double
  %157 = fadd double %149, %156
  %158 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %159 = load i32, ptr %16, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %struct.SectionStr, ptr %158, i64 %160
  %162 = getelementptr inbounds %struct.SectionStr, ptr %161, i32 0, i32 4
  %163 = load double, ptr %162, align 8, !tbaa !32
  %164 = fdiv double %157, %163
  %165 = fadd double %164, 1.000000e+00
  %166 = fptosi double %165 to i64
  store i64 %166, ptr %9, align 8, !tbaa !11
  %167 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %168 = load i32, ptr %16, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.SectionStr, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.SectionStr, ptr %170, i32 0, i32 1
  %172 = load double, ptr %171, align 8, !tbaa !20
  %173 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %174 = load i32, ptr %16, 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 !32
  %179 = fdiv double %172, %178
  %180 = fptosi double %179 to i64
  store i64 %180, ptr %8, align 8, !tbaa !11
  br label %181

181:                                              ; preds = %246, %143
  %182 = load i64, ptr %8, align 8, !tbaa !11
  %183 = load i64, ptr %9, align 8, !tbaa !11
  %184 = icmp slt i64 %182, %183
  br i1 %184, label %185, label %249

185:                                              ; preds = %181
  %186 = load ptr, ptr %13, align 8, !tbaa !13
  %187 = call i32 @ReadGro(ptr noundef %186)
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %193, label %189

189:                                              ; preds = %185
  %190 = load ptr, ptr %14, align 8, !tbaa !13
  %191 = call i32 @ReadConnectionMap(ptr noundef %190)
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %189, %185
  br label %249

194:                                              ; preds = %189
  %195 = load i64, ptr %8, align 8, !tbaa !11
  call void @PrintProcess(i64 noundef %195)
  %196 = load ptr, ptr @sectInfo, align 8, !tbaa !13
  %197 = load i32, ptr %16, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %struct.SectionStr, ptr %196, i64 %198
  store ptr %199, ptr %12, align 8, !tbaa !13
  %200 = call double @CalKeEnergy()
  store double %200, ptr %3, align 8, !tbaa !9
  %201 = call double @CalPoEnergy()
  store double %201, ptr %4, align 8, !tbaa !9
  %202 = load ptr, ptr %12, align 8, !tbaa !13
  %203 = getelementptr inbounds %struct.SectionStr, ptr %202, i32 0, i32 6
  %204 = getelementptr inbounds %struct.WallStr, ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds [20 x i8], ptr %204, i64 0, i64 0
  %206 = call i32 @strcmp(ptr noundef %205, ptr noundef @.str.16) #9
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %214, label %208

208:                                              ; preds = %194
  %209 = load ptr, ptr %12, align 8, !tbaa !13
  %210 = getelementptr inbounds %struct.SectionStr, ptr %209, i32 0, i32 9
  %211 = getelementptr inbounds %struct.TunnelStr, ptr %210, i32 0, i32 0
  %212 = load i32, ptr %211, align 8, !tbaa !33
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %217

214:                                              ; preds = %208, %194
  %215 = load ptr, ptr %12, align 8, !tbaa !13
  %216 = call double @CalWlEnergy(ptr noundef %215)
  store double %216, ptr %5, align 8, !tbaa !9
  br label %217

217:                                              ; preds = %214, %208
  %218 = load i32, ptr getelementptr inbounds (%struct.CGGovStr, ptr @CG, i32 0, i32 1), align 4, !tbaa !34
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %220, label %223

220:                                              ; preds = %217
  %221 = load ptr, ptr %12, align 8, !tbaa !13
  %222 = call double @CalCGSurEnergy(ptr noundef %221)
  store double %222, ptr %6, align 8, !tbaa !9
  br label %223

223:                                              ; preds = %220, %217
  %224 = load double, ptr %3, align 8, !tbaa !9
  %225 = call double @CalTemp(double noundef %224)
  store double %225, ptr %7, align 8, !tbaa !9
  %226 = load ptr, ptr %15, align 8, !tbaa !13
  %227 = load i64, ptr %8, align 8, !tbaa !11
  %228 = sitofp i64 %227 to double
  %229 = load ptr, ptr %12, align 8, !tbaa !13
  %230 = getelementptr inbounds %struct.SectionStr, ptr %229, i32 0, i32 4
  %231 = load double, ptr %230, align 8, !tbaa !32
  %232 = fmul double %228, %231
  %233 = load double, ptr %7, align 8, !tbaa !9
  %234 = load double, ptr %3, align 8, !tbaa !9
  %235 = load double, ptr %4, align 8, !tbaa !9
  %236 = load double, ptr %5, align 8, !tbaa !9
  %237 = load double, ptr %6, align 8, !tbaa !9
  %238 = load double, ptr %3, align 8, !tbaa !9
  %239 = load double, ptr %4, align 8, !tbaa !9
  %240 = fadd double %238, %239
  %241 = load double, ptr %5, align 8, !tbaa !9
  %242 = fadd double %240, %241
  %243 = load double, ptr %6, align 8, !tbaa !9
  %244 = fadd double %242, %243
  %245 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.17, double noundef %232, double noundef %233, double noundef %234, double noundef %235, double noundef %236, double noundef %237, double noundef %244) #7
  br label %246

246:                                              ; preds = %223
  %247 = load i64, ptr %8, align 8, !tbaa !11
  %248 = add nsw i64 %247, 1
  store i64 %248, ptr %8, align 8, !tbaa !11
  br label %181, !llvm.loop !36

249:                                              ; preds = %193, %181
  %250 = load ptr, ptr %13, align 8, !tbaa !13
  %251 = call i32 @fclose(ptr noundef %250)
  %252 = load ptr, ptr %14, align 8, !tbaa !13
  %253 = call i32 @fclose(ptr noundef %252)
  br label %254

254:                                              ; preds = %249
  %255 = load i32, ptr %16, align 4, !tbaa !5
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %16, align 4, !tbaa !5
  br label %62, !llvm.loop !38

257:                                              ; preds = %71
  %258 = load ptr, ptr %15, align 8, !tbaa !13
  %259 = call i32 @fclose(ptr noundef %258)
  %260 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %261 = load ptr, ptr @stdout, align 8, !tbaa !13
  %262 = call i32 @fflush(ptr noundef %261)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void
}

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

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

declare i32 @fflush(ptr noundef) #2

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

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

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

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

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

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

declare i32 @ReadGro(ptr noundef) #2

declare i32 @ReadConnectionMap(ptr noundef) #2

declare void @PrintProcess(i64 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden double @CalKeEnergy() #0

; Function Attrs: nounwind uwtable
declare hidden double @CalPoEnergy() #0

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

; Function Attrs: nounwind uwtable
declare hidden double @CalWlEnergy(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @CalCGSurEnergy(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden double @CalTemp(double noundef) #0

declare i32 @fclose(ptr noundef) #2

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

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 = { "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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !6, i64 4}
!16 = !{!"PepStr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !10, i64 16}
!17 = !{!16, !6, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"FileListStr", !6, i64 0, !7, i64 4}
!20 = !{!21, !10, i64 8}
!21 = !{!"SectionStr", !12, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !22, i64 64, !24, i64 120, !25, i64 208, !26, i64 240, !27, i64 288}
!22 = !{!"WallStr", !7, i64 0, !7, i64 20, !23, i64 40}
!23 = !{!"AtomStr", !14, i64 0, !14, i64 8}
!24 = !{!"DynamicWallStr", !7, i64 0, !6, i64 16, !6, i64 20, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56}
!25 = !{!"ObstructionStr", !6, i64 0, !6, i64 4, !14, i64 8, !14, i64 16, !14, i64 24}
!26 = !{!"TunnelStr", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !23, i64 32}
!27 = !{!"FlowStr", !6, i64 0, !28, i64 8, !29, i64 40, !30, i64 88}
!28 = !{!"ConstVStr", !7, i64 0}
!29 = !{!"ForceStr", !7, i64 0, !14, i64 32, !14, i64 40}
!30 = !{!"ChargeStr", !6, i64 0, !6, i64 4, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!31 = !{!21, !12, i64 0}
!32 = !{!21, !10, i64 32}
!33 = !{!21, !6, i64 240}
!34 = !{!35, !6, i64 32}
!35 = !{!"CGGovStr", !7, i64 0, !6, i64 32, !6, i64 36}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


; 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.CGGovStr = type { [2 x [16 x i8]], i32, i32 }
%struct.PepStr = type { i32, i32, i32, i32, double }
%struct.FileStr = type { i32, [256 x i8] }
%struct.FileListStr = type { i32, [128 x [64 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 }

@beginP = external hidden local_unnamed_addr global i32, align 4
@numofprotein = external local_unnamed_addr global i32, align 4
@endP = external hidden local_unnamed_addr global i32, align 4
@atomnum = external local_unnamed_addr global i32, align 4
@thisAtomNum = external hidden local_unnamed_addr global i32, align 4
@offSet = external hidden local_unnamed_addr global i32, align 4
@nPP = external local_unnamed_addr global i32, align 4
@protein = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = 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.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@fileList = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [88 x i8], align 1
@sectInfo = external local_unnamed_addr global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@CG = external local_unnamed_addr global %struct.CGGovStr, align 4
@.str.17 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @EnergyInfo(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca [1024 x i8], align 16
  %3 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #7
  store i32 1, ptr @beginP, align 4, !tbaa !5
  %4 = load i32, ptr @numofprotein, align 4, !tbaa !5
  store i32 %4, ptr @endP, align 4, !tbaa !5
  %5 = load i32, ptr @atomnum, align 4, !tbaa !5
  store i32 %5, ptr @thisAtomNum, align 4, !tbaa !5
  store i32 0, ptr @offSet, align 4, !tbaa !5
  %6 = load i32, ptr @nPP, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %18, label %7

7:                                                ; preds = %1
  store i32 %6, ptr @endP, align 4, !tbaa !5
  store i32 %6, ptr @beginP, align 4, !tbaa !5
  %8 = load ptr, ptr @protein, align 8, !tbaa !9
  %9 = sext i32 %6 to i64
  %10 = getelementptr inbounds %struct.PepStr, ptr %8, i64 %9
  %11 = getelementptr inbounds i8, ptr %10, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = load i32, ptr %10, align 8, !tbaa !14
  %14 = add i32 %12, 1
  %15 = sub i32 %14, %13
  store i32 %15, ptr @thisAtomNum, align 4, !tbaa !5
  %16 = load i32, ptr %10, align 8, !tbaa !14
  %17 = add nsw i32 %16, -1
  store i32 %17, ptr @offSet, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %7, %1
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %20 = load ptr, ptr @stdout, align 8, !tbaa !9
  %21 = tail call i32 @fflush(ptr noundef %20)
  %22 = load ptr, ptr @files, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %22, i64 72
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = sext i32 %0 to i64
  %26 = getelementptr inbounds %struct.FileStr, ptr %24, i64 %25, i32 1
  %27 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @path, ptr noundef nonnull %26) #7
  %28 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.2)
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10) #7
  %30 = load ptr, ptr @fileList, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct.FileListStr, ptr %30, i64 %25
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph72, label %._crit_edge73

._crit_edge73:                                    ; preds = %._crit_edge, %18
  %34 = call i32 @fclose(ptr noundef %28)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %36 = load ptr, ptr @stdout, align 8, !tbaa !9
  %37 = call i32 @fflush(ptr noundef %36)
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #7
  ret void

.lr.ph72:                                         ; preds = %18, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %18 ]
  %38 = phi ptr [ %115, %._crit_edge ], [ %30, %18 ]
  %.04569 = phi double [ %.1.lcssa, %._crit_edge ], [ 0.000000e+00, %18 ]
  %.04668 = phi double [ %.147.lcssa, %._crit_edge ], [ 0.000000e+00, %18 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %3, i8 0, i64 1024, i1 false)
  %39 = load ptr, ptr @files, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.FileStr, ptr %41, i64 %25, i32 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = getelementptr inbounds %struct.FileListStr, ptr %38, i64 %25, i32 1, i64 %indvars.iv.next
  call void @FindTargetFile(ptr noundef nonnull %42, ptr noundef nonnull %43, ptr noundef nonnull %3) #7
  %44 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @path, ptr noundef nonnull %3) #7
  %45 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.11)
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %50

47:                                               ; preds = %.lr.ph72
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef nonnull %3, ptr noundef nonnull @path, ptr noundef nonnull @.str.13, i32 noundef 69)
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  call void @exit(i32 noundef 1) #8
  unreachable

50:                                               ; preds = %.lr.ph72
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %3, i8 0, i64 1024, i1 false)
  %51 = load ptr, ptr @files, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.FileStr, ptr %53, i64 %25, i32 1
  %55 = load ptr, ptr @fileList, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.FileListStr, ptr %55, i64 %25, i32 1, i64 %indvars.iv.next
  call void @FindTargetFile(ptr noundef nonnull %54, ptr noundef nonnull %56, ptr noundef nonnull %3) #7
  %57 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @path, ptr noundef nonnull %3) #7
  %58 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.11)
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %67

60:                                               ; preds = %50
  %61 = load ptr, ptr @files, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %61, i64 40
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.FileStr, ptr %63, i64 %25, i32 1
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef nonnull %64, ptr noundef nonnull @path, ptr noundef nonnull @.str.13, i32 noundef 80)
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  call void @exit(i32 noundef 1) #8
  unreachable

67:                                               ; preds = %50
  %68 = load ptr, ptr @sectInfo, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.SectionStr, ptr %68, i64 %indvars.iv
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load double, ptr %70, align 8, !tbaa !17
  %72 = load i64, ptr %69, align 8, !tbaa !29
  %73 = sitofp i64 %72 to double
  %74 = fadd double %71, %73
  %75 = getelementptr inbounds i8, ptr %69, i64 32
  %76 = load double, ptr %75, align 8, !tbaa !30
  %77 = fdiv double %74, %76
  %78 = fadd double %77, 1.000000e+00
  %79 = fptosi double %78 to i64
  %80 = fdiv double %71, %76
  %81 = fptosi double %80 to i64
  %82 = icmp slt i64 %81, %79
  br i1 %82, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %67, %102
  %.160 = phi double [ %.2, %102 ], [ %.04569, %67 ]
  %.14759 = phi double [ %.248, %102 ], [ %.04668, %67 ]
  %.04958 = phi i64 [ %112, %102 ], [ %81, %67 ]
  %83 = call i32 @ReadGro(ptr noundef nonnull %45) #7
  %.not53 = icmp eq i32 %83, 0
  br i1 %.not53, label %84, label %._crit_edge

84:                                               ; preds = %.lr.ph
  %85 = call i32 @ReadConnectionMap(ptr noundef nonnull %58) #7
  %.not54 = icmp eq i32 %85, 0
  br i1 %.not54, label %86, label %._crit_edge

86:                                               ; preds = %84
  call void @PrintProcess(i64 noundef %.04958) #7
  %87 = load ptr, ptr @sectInfo, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.SectionStr, ptr %87, i64 %indvars.iv
  %89 = call double @CalKeEnergy()
  %90 = call double @CalPoEnergy()
  %91 = getelementptr inbounds i8, ptr %88, i64 64
  %92 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %91, ptr noundef nonnull dereferenceable(1) @.str.16) #9
  %.not55 = icmp eq i32 %92, 0
  br i1 %.not55, label %93, label %96

93:                                               ; preds = %86
  %94 = getelementptr inbounds i8, ptr %88, i64 240
  %95 = load i32, ptr %94, align 8, !tbaa !31
  %.not56 = icmp eq i32 %95, 0
  br i1 %.not56, label %98, label %96

96:                                               ; preds = %93, %86
  %97 = call double @CalWlEnergy(ptr noundef %88)
  br label %98

98:                                               ; preds = %96, %93
  %.2 = phi double [ %97, %96 ], [ %.160, %93 ]
  %99 = load i32, ptr getelementptr inbounds (i8, ptr @CG, i64 32), align 4, !tbaa !32
  %.not57 = icmp eq i32 %99, 0
  br i1 %.not57, label %102, label %100

100:                                              ; preds = %98
  %101 = call double @CalCGSurEnergy(ptr noundef %88)
  br label %102

102:                                              ; preds = %100, %98
  %.248 = phi double [ %101, %100 ], [ %.14759, %98 ]
  %103 = call double @CalTemp(double noundef %89)
  %104 = sitofp i64 %.04958 to double
  %105 = getelementptr inbounds i8, ptr %88, i64 32
  %106 = load double, ptr %105, align 8, !tbaa !30
  %107 = fmul double %106, %104
  %108 = fadd double %89, %90
  %109 = fadd double %108, %.2
  %110 = fadd double %109, %.248
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.17, double noundef %107, double noundef %103, double noundef %89, double noundef %90, double noundef %.2, double noundef %.248, double noundef %110) #7
  %112 = add i64 %.04958, 1
  %exitcond.not = icmp eq i64 %112, %79
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !34

._crit_edge:                                      ; preds = %102, %84, %.lr.ph, %67
  %.147.lcssa = phi double [ %.04668, %67 ], [ %.14759, %.lr.ph ], [ %.14759, %84 ], [ %.248, %102 ]
  %.1.lcssa = phi double [ %.04569, %67 ], [ %.160, %.lr.ph ], [ %.160, %84 ], [ %.2, %102 ]
  %113 = call i32 @fclose(ptr noundef nonnull %45)
  %114 = call i32 @fclose(ptr noundef nonnull %58)
  %115 = load ptr, ptr @fileList, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.FileListStr, ptr %115, i64 %25
  %117 = load i32, ptr %116, align 4, !tbaa !15
  %118 = sext i32 %117 to i64
  %119 = icmp slt i64 %indvars.iv.next, %118
  br i1 %119, label %.lr.ph72, label %._crit_edge73, !llvm.loop !36
}

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

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

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

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

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

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

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

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

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

declare i32 @ReadGro(ptr noundef) local_unnamed_addr #4

declare i32 @ReadConnectionMap(ptr noundef) local_unnamed_addr #4

declare void @PrintProcess(i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden double @CalKeEnergy() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden double @CalPoEnergy() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden double @CalWlEnergy(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden double @CalCGSurEnergy(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden double @CalTemp(double noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture 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) #1

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


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