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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.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.AtomStr = type { ptr, ptr }
%struct.PropertyStr = type { [8 x i8], [2 x [16 x i8]], [8 x i8], i32, i32, i32, double, double, [3 x double], %struct.AtomSeqStr, ptr, ptr }
%struct.AtomSeqStr = type { i32, i32, i32 }
%struct.PepStr = type { i32, i32, i32, i32, double }

@boxDimension = external global [4 x double], align 16
@chargeAA = external global [9 x i32], align 16
@flow = external global %struct.FlowStr, align 8
@atomnum = external global i32, align 4
@numofprotein = external global i32, align 4
@atom = external global ptr, align 8
@protein = external global ptr, align 8
@.str.252 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @InitializeCharge() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %83, %0
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = load i32, ptr @atomnum, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  br label %86

19:                                               ; preds = %14
  %20 = load ptr, ptr @atom, align 8, !tbaa !9
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds %struct.AtomStr, ptr %20, i64 %22
  %24 = getelementptr inbounds %struct.AtomStr, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct.PropertyStr, ptr %25, i32 0, i32 1
  %27 = getelementptr inbounds [2 x [16 x i8]], ptr %26, i64 0, i64 0
  %28 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %29 = call i32 @strcmp(ptr noundef %28, ptr noundef @.str.252) #4
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %50, label %31

31:                                               ; preds = %19
  %32 = load ptr, ptr @atom, align 8, !tbaa !9
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds %struct.AtomStr, ptr %32, i64 %34
  %36 = getelementptr inbounds %struct.AtomStr, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = getelementptr inbounds %struct.PropertyStr, ptr %37, i32 0, i32 2
  %39 = getelementptr inbounds [8 x i8], ptr %38, i64 0, i64 0
  %40 = call i32 @ChargeAACheck(ptr noundef %39)
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %50, label %42

42:                                               ; preds = %31
  %43 = load ptr, ptr @atom, align 8, !tbaa !9
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.AtomStr, ptr %43, i64 %45
  %47 = getelementptr inbounds %struct.AtomStr, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds %struct.PropertyStr, ptr %48, i32 0, i32 6
  store double 1.000000e+00, ptr %49, align 8, !tbaa !13
  br label %82

50:                                               ; preds = %31, %19
  %51 = load ptr, ptr @atom, align 8, !tbaa !9
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds %struct.AtomStr, ptr %51, i64 %53
  %55 = getelementptr inbounds %struct.AtomStr, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct.PropertyStr, ptr %56, i32 0, i32 1
  %58 = getelementptr inbounds [2 x [16 x i8]], ptr %57, i64 0, i64 0
  %59 = getelementptr inbounds [16 x i8], ptr %58, i64 0, i64 0
  %60 = call i32 @strcmp(ptr noundef %59, ptr noundef @.str.253) #4
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %81, label %62

62:                                               ; preds = %50
  %63 = load ptr, ptr @atom, align 8, !tbaa !9
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds %struct.AtomStr, ptr %63, i64 %65
  %67 = getelementptr inbounds %struct.AtomStr, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !11
  %69 = getelementptr inbounds %struct.PropertyStr, ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds [8 x i8], ptr %69, i64 0, i64 0
  %71 = call i32 @ChargeAACheck(ptr noundef %70)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %81, label %73

73:                                               ; preds = %62
  %74 = load ptr, ptr @atom, align 8, !tbaa !9
  %75 = load i32, ptr %1, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %struct.AtomStr, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct.AtomStr, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = getelementptr inbounds %struct.PropertyStr, ptr %79, i32 0, i32 6
  store double -1.000000e+00, ptr %80, align 8, !tbaa !13
  br label %81

81:                                               ; preds = %73, %62, %50
  br label %82

82:                                               ; preds = %81, %42
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %1, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %1, align 4, !tbaa !5
  br label %14, !llvm.loop !17

86:                                               ; preds = %18
  %87 = load i32, ptr @chargeAA, align 16, !tbaa !5
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %180, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %176, %89
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = load i32, ptr @numofprotein, align 4, !tbaa !5
  %93 = icmp sle i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  br label %179

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %96 = load ptr, ptr @protein, align 8, !tbaa !9
  %97 = load i32, ptr %2, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %struct.PepStr, ptr %96, i64 %98
  %100 = getelementptr inbounds %struct.PepStr, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !19
  store i32 %101, ptr %4, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %131, %95
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = load ptr, ptr @protein, align 8, !tbaa !9
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds %struct.PepStr, ptr %104, i64 %106
  %108 = getelementptr inbounds %struct.PepStr, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !21
  %110 = icmp sle i32 %103, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %102
  store i32 8, ptr %3, align 4
  br label %134

112:                                              ; preds = %102
  %113 = load ptr, ptr @atom, align 8, !tbaa !9
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.AtomStr, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.AtomStr, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  %119 = getelementptr inbounds %struct.PropertyStr, ptr %118, i32 0, i32 4
  %120 = load i32, ptr %119, align 4, !tbaa !22
  %121 = icmp eq i32 %120, 18
  br i1 %121, label %122, label %130

122:                                              ; preds = %112
  %123 = load ptr, ptr @atom, align 8, !tbaa !9
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.AtomStr, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.AtomStr, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !11
  %129 = getelementptr inbounds %struct.PropertyStr, ptr %128, i32 0, i32 6
  store double 1.000000e+00, ptr %129, align 8, !tbaa !13
  store i32 8, ptr %3, align 4
  br label %134

130:                                              ; preds = %112
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %4, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %4, align 4, !tbaa !5
  br label %102, !llvm.loop !23

134:                                              ; preds = %122, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %135

135:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %136 = load ptr, ptr @protein, align 8, !tbaa !9
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct.PepStr, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.PepStr, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 4, !tbaa !21
  store i32 %141, ptr %5, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %171, %135
  %143 = load i32, ptr %5, align 4, !tbaa !5
  %144 = load ptr, ptr @protein, align 8, !tbaa !9
  %145 = load i32, ptr %2, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.PepStr, ptr %144, i64 %146
  %148 = getelementptr inbounds %struct.PepStr, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 8, !tbaa !19
  %150 = icmp sge i32 %143, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %142
  store i32 11, ptr %3, align 4
  br label %174

152:                                              ; preds = %142
  %153 = load ptr, ptr @atom, align 8, !tbaa !9
  %154 = load i32, ptr %5, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.AtomStr, ptr %153, i64 %155
  %157 = getelementptr inbounds %struct.AtomStr, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = getelementptr inbounds %struct.PropertyStr, ptr %158, i32 0, i32 4
  %160 = load i32, ptr %159, align 4, !tbaa !22
  %161 = icmp eq i32 %160, 26
  br i1 %161, label %162, label %170

162:                                              ; preds = %152
  %163 = load ptr, ptr @atom, align 8, !tbaa !9
  %164 = load i32, ptr %5, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds %struct.AtomStr, ptr %163, i64 %165
  %167 = getelementptr inbounds %struct.AtomStr, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !11
  %169 = getelementptr inbounds %struct.PropertyStr, ptr %168, i32 0, i32 6
  store double -1.000000e+00, ptr %169, align 8, !tbaa !13
  store i32 11, ptr %3, align 4
  br label %174

170:                                              ; preds = %152
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = add nsw i32 %172, -1
  store i32 %173, ptr %5, align 4, !tbaa !5
  br label %142, !llvm.loop !24

174:                                              ; preds = %162, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %2, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %2, align 4, !tbaa !5
  br label %90, !llvm.loop !25

179:                                              ; preds = %94
  br label %180

180:                                              ; preds = %179, %86
  %181 = load i32, ptr getelementptr inbounds ([9 x i32], ptr @chargeAA, i64 0, i64 6), align 8, !tbaa !5
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %201

183:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %184

184:                                              ; preds = %197, %183
  %185 = load i32, ptr %6, align 4, !tbaa !5
  %186 = load i32, ptr @atomnum, align 4, !tbaa !5
  %187 = icmp sle i32 %185, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %184
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %200

189:                                              ; preds = %184
  %190 = load ptr, ptr @atom, align 8, !tbaa !9
  %191 = load i32, ptr %6, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct.AtomStr, ptr %190, i64 %192
  %194 = getelementptr inbounds %struct.AtomStr, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !11
  %196 = getelementptr inbounds %struct.PropertyStr, ptr %195, i32 0, i32 6
  store double 1.000000e+00, ptr %196, align 8, !tbaa !13
  br label %197

197:                                              ; preds = %189
  %198 = load i32, ptr %6, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %6, align 4, !tbaa !5
  br label %184, !llvm.loop !26

200:                                              ; preds = %188
  br label %293

201:                                              ; preds = %180
  %202 = load i32, ptr getelementptr inbounds ([9 x i32], ptr @chargeAA, i64 0, i64 7), align 4, !tbaa !5
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %292

204:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %288, %204
  %206 = load i32, ptr %7, align 4, !tbaa !5
  %207 = load i32, ptr @numofprotein, align 4, !tbaa !5
  %208 = icmp sle i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %291

210:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store double 0.000000e+00, ptr %9, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %211 = load ptr, ptr @protein, align 8, !tbaa !9
  %212 = load i32, ptr %7, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds %struct.PepStr, ptr %211, i64 %213
  %215 = getelementptr inbounds %struct.PepStr, ptr %214, i32 0, i32 0
  %216 = load i32, ptr %215, align 8, !tbaa !19
  store i32 %216, ptr %10, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %251, %210
  %218 = load i32, ptr %10, align 4, !tbaa !5
  %219 = load ptr, ptr @protein, align 8, !tbaa !9
  %220 = load i32, ptr %7, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds %struct.PepStr, ptr %219, i64 %221
  %223 = getelementptr inbounds %struct.PepStr, ptr %222, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !21
  %225 = icmp sle i32 %218, %224
  br i1 %225, label %227, label %226

226:                                              ; preds = %217
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %254

227:                                              ; preds = %217
  %228 = load ptr, ptr @atom, align 8, !tbaa !9
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds %struct.AtomStr, ptr %228, i64 %230
  %232 = getelementptr inbounds %struct.AtomStr, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !11
  %234 = getelementptr inbounds %struct.PropertyStr, ptr %233, i32 0, i32 6
  %235 = load double, ptr %234, align 8, !tbaa !13
  %236 = fcmp une double %235, 0.000000e+00
  br i1 %236, label %237, label %250

237:                                              ; preds = %227
  %238 = load i32, ptr %8, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %8, align 4, !tbaa !5
  %240 = load ptr, ptr @atom, align 8, !tbaa !9
  %241 = load i32, ptr %10, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds %struct.AtomStr, ptr %240, i64 %242
  %244 = getelementptr inbounds %struct.AtomStr, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !11
  %246 = getelementptr inbounds %struct.PropertyStr, ptr %245, i32 0, i32 6
  %247 = load double, ptr %246, align 8, !tbaa !13
  %248 = load double, ptr %9, align 8, !tbaa !27
  %249 = fadd double %248, %247
  store double %249, ptr %9, align 8, !tbaa !27
  br label %250

250:                                              ; preds = %237, %227
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %10, align 4, !tbaa !5
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %10, align 4, !tbaa !5
  br label %217, !llvm.loop !28

254:                                              ; preds = %226
  %255 = load i32, ptr %8, align 4, !tbaa !5
  %256 = sitofp i32 %255 to double
  %257 = load double, ptr %9, align 8, !tbaa !27
  %258 = fdiv double %257, %256
  store double %258, ptr %9, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %259 = load ptr, ptr @protein, align 8, !tbaa !9
  %260 = load i32, ptr %7, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds %struct.PepStr, ptr %259, i64 %261
  %263 = getelementptr inbounds %struct.PepStr, ptr %262, i32 0, i32 0
  %264 = load i32, ptr %263, align 8, !tbaa !19
  store i32 %264, ptr %11, align 4, !tbaa !5
  br label %265

265:                                              ; preds = %284, %254
  %266 = load i32, ptr %11, align 4, !tbaa !5
  %267 = load ptr, ptr @protein, align 8, !tbaa !9
  %268 = load i32, ptr %7, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds %struct.PepStr, ptr %267, i64 %269
  %271 = getelementptr inbounds %struct.PepStr, ptr %270, i32 0, i32 1
  %272 = load i32, ptr %271, align 4, !tbaa !21
  %273 = icmp sle i32 %266, %272
  br i1 %273, label %275, label %274

274:                                              ; preds = %265
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %287

275:                                              ; preds = %265
  %276 = load double, ptr %9, align 8, !tbaa !27
  %277 = load ptr, ptr @atom, align 8, !tbaa !9
  %278 = load i32, ptr %11, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds %struct.AtomStr, ptr %277, i64 %279
  %281 = getelementptr inbounds %struct.AtomStr, ptr %280, i32 0, i32 0
  %282 = load ptr, ptr %281, align 8, !tbaa !11
  %283 = getelementptr inbounds %struct.PropertyStr, ptr %282, i32 0, i32 6
  store double %276, ptr %283, align 8, !tbaa !13
  br label %284

284:                                              ; preds = %275
  %285 = load i32, ptr %11, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %11, align 4, !tbaa !5
  br label %265, !llvm.loop !29

287:                                              ; preds = %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %288

288:                                              ; preds = %287
  %289 = load i32, ptr %7, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %7, align 4, !tbaa !5
  br label %205, !llvm.loop !30

291:                                              ; preds = %209
  br label %292

292:                                              ; preds = %291, %201
  br label %293

293:                                              ; preds = %292, %200
  %294 = load i32, ptr @flow, align 8, !tbaa !31
  %295 = icmp eq i32 %294, 3
  br i1 %295, label %296, label %404

296:                                              ; preds = %293
  %297 = load i32, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 1), align 4, !tbaa !36
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %299, label %404

299:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %300 = load i32, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), align 8, !tbaa !37
  %301 = sdiv i32 %300, 2
  store i32 %301, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %302 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %302, ptr %13, align 4, !tbaa !5
  br label %303

303:                                              ; preds = %400, %299
  %304 = load i32, ptr %13, align 4, !tbaa !5
  %305 = load i32, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), align 8, !tbaa !37
  %306 = icmp slt i32 %304, %305
  br i1 %306, label %308, label %307

307:                                              ; preds = %303
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %403

308:                                              ; preds = %303
  %309 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %310 = load i32, ptr %13, align 4, !tbaa !5
  %311 = load i32, ptr %12, align 4, !tbaa !5
  %312 = sub nsw i32 %310, %311
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds ptr, ptr %309, i64 %313
  %315 = load ptr, ptr %314, align 8, !tbaa !9
  %316 = getelementptr inbounds double, ptr %315, i64 0
  %317 = load double, ptr %316, align 8, !tbaa !27
  %318 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %319 = load i32, ptr %13, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds ptr, ptr %318, i64 %320
  %322 = load ptr, ptr %321, align 8, !tbaa !9
  %323 = getelementptr inbounds double, ptr %322, i64 0
  store double %317, ptr %323, align 8, !tbaa !27
  %324 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %325 = load i32, ptr %13, align 4, !tbaa !5
  %326 = load i32, ptr %12, align 4, !tbaa !5
  %327 = sub nsw i32 %325, %326
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds ptr, ptr %324, i64 %328
  %330 = load ptr, ptr %329, align 8, !tbaa !9
  %331 = getelementptr inbounds double, ptr %330, i64 1
  %332 = load double, ptr %331, align 8, !tbaa !27
  %333 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %334 = load i32, ptr %13, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds ptr, ptr %333, i64 %335
  %337 = load ptr, ptr %336, align 8, !tbaa !9
  %338 = getelementptr inbounds double, ptr %337, i64 1
  store double %332, ptr %338, align 8, !tbaa !27
  %339 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %340 = load i32, ptr %13, align 4, !tbaa !5
  %341 = load i32, ptr %12, align 4, !tbaa !5
  %342 = sub nsw i32 %340, %341
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds ptr, ptr %339, i64 %343
  %345 = load ptr, ptr %344, align 8, !tbaa !9
  %346 = getelementptr inbounds double, ptr %345, i64 2
  %347 = load double, ptr %346, align 8, !tbaa !27
  %348 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %349 = load i32, ptr %13, align 4, !tbaa !5
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds ptr, ptr %348, i64 %350
  %352 = load ptr, ptr %351, align 8, !tbaa !9
  %353 = getelementptr inbounds double, ptr %352, i64 2
  store double %347, ptr %353, align 8, !tbaa !27
  %354 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %355 = load i32, ptr %13, align 4, !tbaa !5
  %356 = load i32, ptr %12, align 4, !tbaa !5
  %357 = sub nsw i32 %355, %356
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds ptr, ptr %354, i64 %358
  %360 = load ptr, ptr %359, align 8, !tbaa !9
  %361 = getelementptr inbounds double, ptr %360, i64 3
  %362 = load double, ptr %361, align 8, !tbaa !27
  %363 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %364 = load i32, ptr %13, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds ptr, ptr %363, i64 %365
  %367 = load ptr, ptr %366, align 8, !tbaa !9
  %368 = getelementptr inbounds double, ptr %367, i64 3
  store double %362, ptr %368, align 8, !tbaa !27
  %369 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 1), align 8, !tbaa !27
  %370 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 2), align 8, !tbaa !38
  %371 = load i32, ptr %13, align 4, !tbaa !5
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds ptr, ptr %370, i64 %372
  %374 = load ptr, ptr %373, align 8, !tbaa !9
  %375 = getelementptr inbounds double, ptr %374, i64 1
  %376 = load double, ptr %375, align 8, !tbaa !27
  %377 = fadd double %376, %369
  store double %377, ptr %375, align 8, !tbaa !27
  %378 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 4), align 8, !tbaa !39
  %379 = load i32, ptr %13, align 4, !tbaa !5
  %380 = load i32, ptr %12, align 4, !tbaa !5
  %381 = sub nsw i32 %379, %380
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds double, ptr %378, i64 %382
  %384 = load double, ptr %383, align 8, !tbaa !27
  %385 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 4), align 8, !tbaa !39
  %386 = load i32, ptr %13, align 4, !tbaa !5
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds double, ptr %385, i64 %387
  store double %384, ptr %388, align 8, !tbaa !27
  %389 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 5), align 8, !tbaa !40
  %390 = load i32, ptr %13, align 4, !tbaa !5
  %391 = load i32, ptr %12, align 4, !tbaa !5
  %392 = sub nsw i32 %390, %391
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds double, ptr %389, i64 %393
  %395 = load double, ptr %394, align 8, !tbaa !27
  %396 = load ptr, ptr getelementptr inbounds (%struct.ChargeStr, ptr getelementptr inbounds (%struct.FlowStr, ptr @flow, i32 0, i32 3), i32 0, i32 5), align 8, !tbaa !40
  %397 = load i32, ptr %13, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds double, ptr %396, i64 %398
  store double %395, ptr %399, align 8, !tbaa !27
  br label %400

400:                                              ; preds = %308
  %401 = load i32, ptr %13, align 4, !tbaa !5
  %402 = add nsw i32 %401, 1
  store i32 %402, ptr %13, align 4, !tbaa !5
  br label %303, !llvm.loop !41

403:                                              ; preds = %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %404

404:                                              ; preds = %403, %296, %293
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ChargeAACheck(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nounwind }
attributes #4 = { 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, !10, i64 0}
!12 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!13 = !{!14, !15, i64 64}
!14 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !15, i64 64, !15, i64 72, !7, i64 80, !16, i64 104, !10, i64 120, !10, i64 128}
!15 = !{!"double", !7, i64 0}
!16 = !{!"AtomSeqStr", !6, i64 0, !6, i64 4, !6, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 0}
!20 = !{!"PepStr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !15, i64 16}
!21 = !{!20, !6, i64 4}
!22 = !{!14, !6, i64 52}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}
!26 = distinct !{!26, !18}
!27 = !{!15, !15, i64 0}
!28 = distinct !{!28, !18}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !18}
!31 = !{!32, !6, i64 0}
!32 = !{!"FlowStr", !6, i64 0, !33, i64 8, !34, i64 40, !35, i64 88}
!33 = !{!"ConstVStr", !7, i64 0}
!34 = !{!"ForceStr", !7, i64 0, !10, i64 32, !10, i64 40}
!35 = !{!"ChargeStr", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!36 = !{!32, !6, i64 92}
!37 = !{!32, !6, i64 88}
!38 = !{!32, !10, i64 96}
!39 = !{!32, !10, i64 112}
!40 = !{!32, !10, i64 120}
!41 = distinct !{!41, !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.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.AtomStr = type { ptr, ptr }
%struct.PepStr = type { i32, i32, i32, i32, double }

@boxDimension = external local_unnamed_addr global [4 x double], align 16
@chargeAA = external local_unnamed_addr global [9 x i32], align 16
@flow = external local_unnamed_addr global %struct.FlowStr, align 8
@atomnum = external local_unnamed_addr global i32, align 4
@numofprotein = external local_unnamed_addr global i32, align 4
@atom = external local_unnamed_addr global ptr, align 8
@protein = external local_unnamed_addr global ptr, align 8
@.str.252 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @InitializeCharge() local_unnamed_addr #1 {
  %1 = load i32, ptr @atomnum, align 4, !tbaa !5
  %.not102 = icmp slt i32 %1, 1
  br i1 %.not102, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %.pre178 = load ptr, ptr @atom, align 8, !tbaa !9
  br label %.lr.ph

._crit_edge:                                      ; preds = %28, %0
  %.lcssa101 = phi i32 [ %1, %0 ], [ %30, %28 ]
  %2 = load i32, ptr @chargeAA, align 16, !tbaa !5
  %.not77 = icmp eq i32 %2, 0
  br i1 %.not77, label %.preheader96, label %.loopexit97

.preheader96:                                     ; preds = %._crit_edge
  %3 = load i32, ptr @numofprotein, align 4, !tbaa !5
  %.not78113 = icmp slt i32 %3, 1
  br i1 %.not78113, label %.loopexit97, label %.lr.ph115

.lr.ph115:                                        ; preds = %.preheader96
  %4 = load ptr, ptr @protein, align 8, !tbaa !9
  %5 = load ptr, ptr @atom, align 8
  %6 = add nuw i32 %3, 1
  %wide.trip.count = zext i32 %6 to i64
  br label %32

.lr.ph:                                           ; preds = %.lr.ph.preheader, %28
  %7 = phi ptr [ %.pre178, %.lr.ph.preheader ], [ %29, %28 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %28 ]
  %8 = getelementptr inbounds %struct.AtomStr, ptr %7, i64 %indvars.iv
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.252) #2
  %.not87 = icmp eq i32 %11, 0
  br i1 %.not87, label %12, label %._crit_edge180

12:                                               ; preds = %.lr.ph
  %13 = getelementptr inbounds i8, ptr %9, i64 40
  %14 = tail call i32 @ChargeAACheck(ptr noundef nonnull %13)
  %.not88 = icmp eq i32 %14, 0
  %.pre179 = load ptr, ptr @atom, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.AtomStr, ptr %.pre179, i64 %indvars.iv
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  br i1 %.not88, label %.sink.split, label %._crit_edge180

._crit_edge180:                                   ; preds = %12, %.lr.ph
  %17 = phi ptr [ %9, %.lr.ph ], [ %16, %12 ]
  %18 = phi ptr [ %7, %.lr.ph ], [ %.pre179, %12 ]
  %19 = getelementptr inbounds i8, ptr %17, i64 8
  %20 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) @.str.253) #2
  %.not89 = icmp eq i32 %20, 0
  br i1 %.not89, label %21, label %28

21:                                               ; preds = %._crit_edge180
  %22 = getelementptr inbounds i8, ptr %17, i64 40
  %23 = tail call i32 @ChargeAACheck(ptr noundef nonnull %22)
  %.not90 = icmp eq i32 %23, 0
  %.pre = load ptr, ptr @atom, align 8, !tbaa !9
  br i1 %.not90, label %24, label %28

24:                                               ; preds = %21
  %25 = getelementptr inbounds %struct.AtomStr, ptr %.pre, i64 %indvars.iv
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  br label %.sink.split

.sink.split:                                      ; preds = %12, %24
  %.sink190 = phi ptr [ %26, %24 ], [ %16, %12 ]
  %.sink = phi double [ -1.000000e+00, %24 ], [ 1.000000e+00, %12 ]
  %.ph = phi ptr [ %.pre, %24 ], [ %.pre179, %12 ]
  %27 = getelementptr inbounds i8, ptr %.sink190, i64 64
  store double %.sink, ptr %27, align 8, !tbaa !13
  br label %28

28:                                               ; preds = %.sink.split, %21, %._crit_edge180
  %29 = phi ptr [ %.pre, %21 ], [ %18, %._crit_edge180 ], [ %.ph, %.sink.split ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = load i32, ptr @atomnum, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %.not.not = icmp slt i64 %indvars.iv, %31
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !17

32:                                               ; preds = %.lr.ph115, %.loopexit94
  %indvars.iv151 = phi i64 [ 1, %.lr.ph115 ], [ %indvars.iv.next152, %.loopexit94 ]
  %33 = getelementptr inbounds %struct.PepStr, ptr %4, i64 %indvars.iv151
  %34 = load i32, ptr %33, align 8, !tbaa !19
  %35 = getelementptr inbounds %struct.PepStr, ptr %4, i64 %indvars.iv151, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !21
  %.not79104 = icmp sgt i32 %34, %36
  br i1 %.not79104, label %.loopexit94, label %.lr.ph107.preheader

.lr.ph107.preheader:                              ; preds = %32
  %37 = sext i32 %34 to i64
  %38 = add i32 %36, 1
  br label %.lr.ph107

39:                                               ; preds = %.lr.ph107
  %indvars.iv.next146 = add nsw i64 %indvars.iv145, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next146 to i32
  %exitcond.not = icmp eq i32 %38, %lftr.wideiv
  br i1 %exitcond.not, label %.loopexit95, label %.lr.ph107, !llvm.loop !22

.lr.ph107:                                        ; preds = %.lr.ph107.preheader, %39
  %indvars.iv145 = phi i64 [ %37, %.lr.ph107.preheader ], [ %indvars.iv.next146, %39 ]
  %40 = getelementptr inbounds %struct.AtomStr, ptr %5, i64 %indvars.iv145
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds i8, ptr %41, i64 52
  %43 = load i32, ptr %42, align 4, !tbaa !23
  %44 = icmp eq i32 %43, 18
  br i1 %44, label %45, label %39

45:                                               ; preds = %.lr.ph107
  %46 = getelementptr inbounds i8, ptr %41, i64 64
  store double 1.000000e+00, ptr %46, align 8, !tbaa !13
  br label %.loopexit95

.loopexit95:                                      ; preds = %39, %45
  br i1 %.not79104, label %.loopexit94, label %.lr.ph112.preheader

.lr.ph112.preheader:                              ; preds = %.loopexit95
  %47 = sext i32 %36 to i64
  %48 = sext i32 %34 to i64
  br label %.lr.ph112

49:                                               ; preds = %.lr.ph112
  %indvars.iv.next149 = add nsw i64 %indvars.iv148, -1
  %.not80.not = icmp sgt i64 %indvars.iv148, %48
  br i1 %.not80.not, label %.lr.ph112, label %.loopexit94, !llvm.loop !24

.lr.ph112:                                        ; preds = %.lr.ph112.preheader, %49
  %indvars.iv148 = phi i64 [ %47, %.lr.ph112.preheader ], [ %indvars.iv.next149, %49 ]
  %50 = getelementptr inbounds %struct.AtomStr, ptr %5, i64 %indvars.iv148
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds i8, ptr %51, i64 52
  %53 = load i32, ptr %52, align 4, !tbaa !23
  %54 = icmp eq i32 %53, 26
  br i1 %54, label %55, label %49

55:                                               ; preds = %.lr.ph112
  %56 = getelementptr inbounds i8, ptr %51, i64 64
  store double -1.000000e+00, ptr %56, align 8, !tbaa !13
  br label %.loopexit94

.loopexit94:                                      ; preds = %49, %32, %.loopexit95, %55
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond154.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count
  br i1 %exitcond154.not, label %.loopexit97, label %32, !llvm.loop !25

.loopexit97:                                      ; preds = %.loopexit94, %.preheader96, %._crit_edge
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @chargeAA, i64 24), align 8, !tbaa !5
  %.not81 = icmp eq i32 %57, 0
  br i1 %.not81, label %71, label %.preheader92

.preheader92:                                     ; preds = %.loopexit97
  %.not86116 = icmp slt i32 %.lcssa101, 1
  br i1 %.not86116, label %.loopexit91, label %.lr.ph118

.lr.ph118:                                        ; preds = %.preheader92
  %58 = load ptr, ptr @atom, align 8, !tbaa !9
  %59 = zext nneg i32 %.lcssa101 to i64
  %xtraiter = and i64 %59, 3
  %60 = icmp ult i32 %.lcssa101, 4
  br i1 %60, label %.loopexit91.loopexit196.unr-lcssa, label %.lr.ph118.new

.lr.ph118.new:                                    ; preds = %.lr.ph118
  %unroll_iter = and i64 %59, 2147483644
  %invariant.gep = getelementptr inbounds i8, ptr %58, i64 16
  %invariant.gep214 = getelementptr inbounds i8, ptr %58, i64 32
  %invariant.gep216 = getelementptr inbounds i8, ptr %58, i64 48
  br label %61

61:                                               ; preds = %61, %.lr.ph118.new
  %indvars.iv155 = phi i64 [ 1, %.lr.ph118.new ], [ %indvars.iv.next156.3, %61 ]
  %niter = phi i64 [ 0, %.lr.ph118.new ], [ %niter.next.3, %61 ]
  %62 = getelementptr inbounds %struct.AtomStr, ptr %58, i64 %indvars.iv155
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = getelementptr inbounds i8, ptr %63, i64 64
  store double 1.000000e+00, ptr %64, align 8, !tbaa !13
  %gep = getelementptr inbounds %struct.AtomStr, ptr %invariant.gep, i64 %indvars.iv155
  %65 = load ptr, ptr %gep, align 8, !tbaa !11
  %66 = getelementptr inbounds i8, ptr %65, i64 64
  store double 1.000000e+00, ptr %66, align 8, !tbaa !13
  %gep215 = getelementptr inbounds %struct.AtomStr, ptr %invariant.gep214, i64 %indvars.iv155
  %67 = load ptr, ptr %gep215, align 8, !tbaa !11
  %68 = getelementptr inbounds i8, ptr %67, i64 64
  store double 1.000000e+00, ptr %68, align 8, !tbaa !13
  %gep217 = getelementptr inbounds %struct.AtomStr, ptr %invariant.gep216, i64 %indvars.iv155
  %69 = load ptr, ptr %gep217, align 8, !tbaa !11
  %70 = getelementptr inbounds i8, ptr %69, i64 64
  store double 1.000000e+00, ptr %70, align 8, !tbaa !13
  %indvars.iv.next156.3 = add nuw nsw i64 %indvars.iv155, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit91.loopexit196.unr-lcssa, label %61, !llvm.loop !26

71:                                               ; preds = %.loopexit97
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @chargeAA, i64 28), align 4, !tbaa !5
  %.not82 = icmp eq i32 %72, 0
  br i1 %.not82, label %.loopexit91, label %.preheader

.preheader:                                       ; preds = %71
  %73 = load i32, ptr @numofprotein, align 4, !tbaa !5
  %.not83133 = icmp slt i32 %73, 1
  br i1 %.not83133, label %.loopexit91, label %.lr.ph135

.lr.ph135:                                        ; preds = %.preheader
  %74 = load ptr, ptr @protein, align 8, !tbaa !9
  %75 = load ptr, ptr @atom, align 8
  %76 = add nuw i32 %73, 1
  %wide.trip.count173 = zext i32 %76 to i64
  %invariant.gep218 = getelementptr i8, ptr %75, i64 16
  %invariant.gep220 = getelementptr i8, ptr %75, i64 16
  %invariant.gep222 = getelementptr i8, ptr %75, i64 32
  %invariant.gep224 = getelementptr i8, ptr %75, i64 48
  br label %77

77:                                               ; preds = %.lr.ph135, %._crit_edge132
  %indvars.iv170 = phi i64 [ 1, %.lr.ph135 ], [ %indvars.iv.next171, %._crit_edge132 ]
  %78 = getelementptr inbounds %struct.PepStr, ptr %74, i64 %indvars.iv170
  %79 = load i32, ptr %78, align 8, !tbaa !19
  %80 = getelementptr inbounds i8, ptr %78, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !21
  %.not84119 = icmp sgt i32 %79, %81
  br i1 %.not84119, label %._crit_edge132, label %.lr.ph124.preheader

.lr.ph124.preheader:                              ; preds = %77
  %82 = sext i32 %79 to i64
  %83 = add i32 %81, 1
  %84 = sub i32 %83, %79
  %85 = sub i32 %81, %79
  %xtraiter201 = and i32 %84, 1
  %86 = icmp eq i32 %81, %79
  br i1 %86, label %._crit_edge125.unr-lcssa, label %.lr.ph124.preheader.new

.lr.ph124.preheader.new:                          ; preds = %.lr.ph124.preheader
  %unroll_iter206 = and i32 %84, -2
  br label %.lr.ph124

._crit_edge125.unr-lcssa:                         ; preds = %.lr.ph124, %.lr.ph124.preheader
  %.170.lcssa.ph = phi i32 [ poison, %.lr.ph124.preheader ], [ %.170.1, %.lr.ph124 ]
  %.1.lcssa.ph = phi double [ poison, %.lr.ph124.preheader ], [ %.1.1, %.lr.ph124 ]
  %indvars.iv160.unr = phi i64 [ %82, %.lr.ph124.preheader ], [ %indvars.iv.next161.1, %.lr.ph124 ]
  %.068121.unr = phi double [ 0.000000e+00, %.lr.ph124.preheader ], [ %.1.1, %.lr.ph124 ]
  %.069120.unr = phi i32 [ 0, %.lr.ph124.preheader ], [ %.170.1, %.lr.ph124 ]
  %lcmp.mod203.not = icmp eq i32 %xtraiter201, 0
  br i1 %lcmp.mod203.not, label %._crit_edge125, label %.lr.ph124.epil

.lr.ph124.epil:                                   ; preds = %._crit_edge125.unr-lcssa
  %87 = getelementptr inbounds %struct.AtomStr, ptr %75, i64 %indvars.iv160.unr
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = getelementptr inbounds i8, ptr %88, i64 64
  %90 = load double, ptr %89, align 8, !tbaa !13
  %91 = fcmp une double %90, 0.000000e+00
  %92 = fadd double %.068121.unr, %90
  %93 = zext i1 %91 to i32
  %.170.epil = add nuw nsw i32 %.069120.unr, %93
  %.1.epil = select i1 %91, double %92, double %.068121.unr
  br label %._crit_edge125

._crit_edge125:                                   ; preds = %._crit_edge125.unr-lcssa, %.lr.ph124.epil
  %.170.lcssa = phi i32 [ %.170.lcssa.ph, %._crit_edge125.unr-lcssa ], [ %.170.epil, %.lr.ph124.epil ]
  %.1.lcssa = phi double [ %.1.lcssa.ph, %._crit_edge125.unr-lcssa ], [ %.1.epil, %.lr.ph124.epil ]
  %94 = uitofp nneg i32 %.170.lcssa to double
  %95 = fdiv double %.1.lcssa, %94
  br i1 %.not84119, label %._crit_edge132, label %.lr.ph131.preheader

.lr.ph131.preheader:                              ; preds = %._crit_edge125
  %96 = sext i32 %79 to i64
  %97 = add i32 %81, 1
  %xtraiter208 = and i32 %84, 3
  %lcmp.mod209.not = icmp eq i32 %xtraiter208, 0
  br i1 %lcmp.mod209.not, label %.lr.ph131.prol.loopexit, label %.lr.ph131.prol

.lr.ph131.prol:                                   ; preds = %.lr.ph131.preheader, %.lr.ph131.prol
  %indvars.iv165.prol = phi i64 [ %indvars.iv.next166.prol, %.lr.ph131.prol ], [ %96, %.lr.ph131.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph131.prol ], [ 0, %.lr.ph131.preheader ]
  %98 = getelementptr inbounds %struct.AtomStr, ptr %75, i64 %indvars.iv165.prol
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds i8, ptr %99, i64 64
  store double %95, ptr %100, align 8, !tbaa !13
  %indvars.iv.next166.prol = add nsw i64 %indvars.iv165.prol, 1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter208
  br i1 %prol.iter.cmp.not, label %.lr.ph131.prol.loopexit, label %.lr.ph131.prol, !llvm.loop !27

.lr.ph131.prol.loopexit:                          ; preds = %.lr.ph131.prol, %.lr.ph131.preheader
  %indvars.iv165.unr = phi i64 [ %96, %.lr.ph131.preheader ], [ %indvars.iv.next166.prol, %.lr.ph131.prol ]
  %101 = icmp ult i32 %85, 3
  br i1 %101, label %._crit_edge132, label %.lr.ph131

.lr.ph124:                                        ; preds = %.lr.ph124, %.lr.ph124.preheader.new
  %indvars.iv160 = phi i64 [ %82, %.lr.ph124.preheader.new ], [ %indvars.iv.next161.1, %.lr.ph124 ]
  %.068121 = phi double [ 0.000000e+00, %.lr.ph124.preheader.new ], [ %.1.1, %.lr.ph124 ]
  %.069120 = phi i32 [ 0, %.lr.ph124.preheader.new ], [ %.170.1, %.lr.ph124 ]
  %niter207 = phi i32 [ 0, %.lr.ph124.preheader.new ], [ %niter207.next.1, %.lr.ph124 ]
  %102 = getelementptr inbounds %struct.AtomStr, ptr %75, i64 %indvars.iv160
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds i8, ptr %103, i64 64
  %105 = load double, ptr %104, align 8, !tbaa !13
  %106 = fcmp une double %105, 0.000000e+00
  %107 = fadd double %.068121, %105
  %108 = zext i1 %106 to i32
  %.170 = add nuw nsw i32 %.069120, %108
  %.1 = select i1 %106, double %107, double %.068121
  %gep219 = getelementptr %struct.AtomStr, ptr %invariant.gep218, i64 %indvars.iv160
  %109 = load ptr, ptr %gep219, align 8, !tbaa !11
  %110 = getelementptr inbounds i8, ptr %109, i64 64
  %111 = load double, ptr %110, align 8, !tbaa !13
  %112 = fcmp une double %111, 0.000000e+00
  %113 = fadd double %.1, %111
  %114 = zext i1 %112 to i32
  %.170.1 = add nuw nsw i32 %.170, %114
  %.1.1 = select i1 %112, double %113, double %.1
  %indvars.iv.next161.1 = add nsw i64 %indvars.iv160, 2
  %niter207.next.1 = add i32 %niter207, 2
  %niter207.ncmp.1 = icmp eq i32 %niter207.next.1, %unroll_iter206
  br i1 %niter207.ncmp.1, label %._crit_edge125.unr-lcssa, label %.lr.ph124, !llvm.loop !29

._crit_edge132:                                   ; preds = %.lr.ph131.prol.loopexit, %.lr.ph131, %77, %._crit_edge125
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %exitcond174.not = icmp eq i64 %indvars.iv.next171, %wide.trip.count173
  br i1 %exitcond174.not, label %.loopexit91, label %77, !llvm.loop !30

.lr.ph131:                                        ; preds = %.lr.ph131.prol.loopexit, %.lr.ph131
  %indvars.iv165 = phi i64 [ %indvars.iv.next166.3, %.lr.ph131 ], [ %indvars.iv165.unr, %.lr.ph131.prol.loopexit ]
  %115 = getelementptr inbounds %struct.AtomStr, ptr %75, i64 %indvars.iv165
  %116 = load ptr, ptr %115, align 8, !tbaa !11
  %117 = getelementptr inbounds i8, ptr %116, i64 64
  store double %95, ptr %117, align 8, !tbaa !13
  %gep221 = getelementptr %struct.AtomStr, ptr %invariant.gep220, i64 %indvars.iv165
  %118 = load ptr, ptr %gep221, align 8, !tbaa !11
  %119 = getelementptr inbounds i8, ptr %118, i64 64
  store double %95, ptr %119, align 8, !tbaa !13
  %gep223 = getelementptr %struct.AtomStr, ptr %invariant.gep222, i64 %indvars.iv165
  %120 = load ptr, ptr %gep223, align 8, !tbaa !11
  %121 = getelementptr inbounds i8, ptr %120, i64 64
  store double %95, ptr %121, align 8, !tbaa !13
  %gep225 = getelementptr %struct.AtomStr, ptr %invariant.gep224, i64 %indvars.iv165
  %122 = load ptr, ptr %gep225, align 8, !tbaa !11
  %123 = getelementptr inbounds i8, ptr %122, i64 64
  store double %95, ptr %123, align 8, !tbaa !13
  %indvars.iv.next166.3 = add nsw i64 %indvars.iv165, 4
  %lftr.wideiv168.3 = trunc i64 %indvars.iv.next166.3 to i32
  %exitcond169.not.3 = icmp eq i32 %97, %lftr.wideiv168.3
  br i1 %exitcond169.not.3, label %._crit_edge132, label %.lr.ph131, !llvm.loop !31

.loopexit91.loopexit196.unr-lcssa:                ; preds = %61, %.lr.ph118
  %indvars.iv155.unr = phi i64 [ 1, %.lr.ph118 ], [ %indvars.iv.next156.3, %61 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit91, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit91.loopexit196.unr-lcssa, %.epil.preheader
  %indvars.iv155.epil = phi i64 [ %indvars.iv.next156.epil, %.epil.preheader ], [ %indvars.iv155.unr, %.loopexit91.loopexit196.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit91.loopexit196.unr-lcssa ]
  %124 = getelementptr inbounds %struct.AtomStr, ptr %58, i64 %indvars.iv155.epil
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  %126 = getelementptr inbounds i8, ptr %125, i64 64
  store double 1.000000e+00, ptr %126, align 8, !tbaa !13
  %indvars.iv.next156.epil = add nuw nsw i64 %indvars.iv155.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit91, label %.epil.preheader, !llvm.loop !32

.loopexit91:                                      ; preds = %.loopexit91.loopexit196.unr-lcssa, %.epil.preheader, %._crit_edge132, %.preheader92, %.preheader, %71
  %127 = load i32, ptr @flow, align 8, !tbaa !33
  %128 = icmp eq i32 %127, 3
  %129 = load i32, ptr getelementptr inbounds (i8, ptr @flow, i64 92), align 4
  %130 = icmp ne i32 %129, 0
  %or.cond = select i1 %128, i1 %130, i1 false
  br i1 %or.cond, label %131, label %.loopexit

131:                                              ; preds = %.loopexit91
  %132 = load i32, ptr getelementptr inbounds (i8, ptr @flow, i64 88), align 8, !tbaa !38
  %133 = icmp sgt i32 %132, 0
  br i1 %133, label %.lr.ph138, label %.loopexit

.lr.ph138:                                        ; preds = %131
  %134 = lshr i32 %132, 1
  %135 = load ptr, ptr getelementptr inbounds (i8, ptr @flow, i64 96), align 8, !tbaa !39
  %136 = load ptr, ptr getelementptr inbounds (i8, ptr @flow, i64 112), align 8, !tbaa !40
  %137 = load ptr, ptr getelementptr inbounds (i8, ptr @flow, i64 120), align 8, !tbaa !41
  %138 = zext nneg i32 %134 to i64
  %139 = zext nneg i32 %132 to i64
  br label %140

140:                                              ; preds = %.lr.ph138, %140
  %indvars.iv175 = phi i64 [ %138, %.lr.ph138 ], [ %indvars.iv.next176, %140 ]
  %141 = sub nuw nsw i64 %indvars.iv175, %138
  %142 = getelementptr inbounds ptr, ptr %135, i64 %141
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  %144 = load double, ptr %143, align 8, !tbaa !42
  %145 = getelementptr inbounds ptr, ptr %135, i64 %indvars.iv175
  %146 = load ptr, ptr %145, align 8, !tbaa !9
  store double %144, ptr %146, align 8, !tbaa !42
  %147 = getelementptr inbounds i8, ptr %143, i64 8
  %148 = load double, ptr %147, align 8, !tbaa !42
  %149 = getelementptr inbounds i8, ptr %146, i64 8
  store double %148, ptr %149, align 8, !tbaa !42
  %150 = getelementptr inbounds i8, ptr %143, i64 16
  %151 = load double, ptr %150, align 8, !tbaa !42
  %152 = getelementptr inbounds i8, ptr %146, i64 16
  store double %151, ptr %152, align 8, !tbaa !42
  %153 = getelementptr inbounds i8, ptr %143, i64 24
  %154 = load double, ptr %153, align 8, !tbaa !42
  %155 = getelementptr inbounds i8, ptr %146, i64 24
  store double %154, ptr %155, align 8, !tbaa !42
  %156 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 8), align 8, !tbaa !42
  %157 = fadd double %148, %156
  store double %157, ptr %149, align 8, !tbaa !42
  %158 = getelementptr inbounds double, ptr %136, i64 %141
  %159 = load double, ptr %158, align 8, !tbaa !42
  %160 = getelementptr inbounds double, ptr %136, i64 %indvars.iv175
  store double %159, ptr %160, align 8, !tbaa !42
  %161 = getelementptr inbounds double, ptr %137, i64 %141
  %162 = load double, ptr %161, align 8, !tbaa !42
  %163 = getelementptr inbounds double, ptr %137, i64 %indvars.iv175
  store double %162, ptr %163, align 8, !tbaa !42
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %164 = icmp ult i64 %indvars.iv.next176, %139
  br i1 %164, label %140, label %.loopexit, !llvm.loop !43

.loopexit:                                        ; preds = %140, %131, %.loopexit91
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @ChargeAACheck(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !10, i64 0}
!12 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!13 = !{!14, !15, i64 64}
!14 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !15, i64 64, !15, i64 72, !7, i64 80, !16, i64 104, !10, i64 120, !10, i64 128}
!15 = !{!"double", !7, i64 0}
!16 = !{!"AtomSeqStr", !6, i64 0, !6, i64 4, !6, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 0}
!20 = !{!"PepStr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !15, i64 16}
!21 = !{!20, !6, i64 4}
!22 = distinct !{!22, !18}
!23 = !{!14, !6, i64 52}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !18}
!31 = distinct !{!31, !18}
!32 = distinct !{!32, !28}
!33 = !{!34, !6, i64 0}
!34 = !{!"FlowStr", !6, i64 0, !35, i64 8, !36, i64 40, !37, i64 88}
!35 = !{!"ConstVStr", !7, i64 0}
!36 = !{!"ForceStr", !7, i64 0, !10, i64 32, !10, i64 40}
!37 = !{!"ChargeStr", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!38 = !{!34, !6, i64 88}
!39 = !{!34, !10, i64 96}
!40 = !{!34, !10, i64 112}
!41 = !{!34, !10, i64 120}
!42 = !{!15, !15, i64 0}
!43 = distinct !{!43, !18}


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