; 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.PreBondStr = type { i32, i32, double }
%struct.HBPotentialStr = type { double, double, double, double, double, double }
%struct.ConstraintStr = type { i32, double, ptr, double, ptr }
%struct.StepPotenStr = type { double, double, double, ptr }

@datadir = external global [1024 x i8], align 16
@preBond = external global %struct.PreBondStr, align 8
@.str.78 = external hidden unnamed_addr constant [4 x i8], align 1
@neworcontinue = external global [20 x i8], align 16
@.str.84 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@atomnum = external global i32, align 4
@Methodtype = external global [20 x i8], align 16
@.str.107 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.183 = external hidden unnamed_addr constant [62 x i8], align 1
@HBPotential = external global %struct.HBPotentialStr, align 8
@potentialPairHB = external global [12 x [33 x [33 x %struct.ConstraintStr]]], align 16

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @ReadHB() #7 {
  %1 = alloca i32, align 4
  %2 = alloca [2 x i32], align 4
  %3 = alloca i32, align 4
  %4 = alloca [2 x [10 x i8]], align 16
  %5 = alloca [1024 x i8], align 16
  %6 = alloca [1024 x i8], align 16
  %7 = alloca [2 x double], align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #9
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 20, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %16 = call i32 @strncmp(ptr noundef @Methodtype, ptr noundef @.str.178, i64 noundef 1) #10
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %297

18:                                               ; preds = %0
  %19 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %20 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %19, ptr noundef @.str.182, ptr noundef @datadir) #9
  %21 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %22 = call noalias ptr @fopen(ptr noundef %21, ptr noundef @.str.94)
  store ptr %22, ptr %9, align 8, !tbaa !9
  %23 = load ptr, ptr %9, align 8, !tbaa !9
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %28

25:                                               ; preds = %18
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.183, ptr noundef @datadir)
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.107)
  call void @exit(i32 noundef 1) #11
  unreachable

28:                                               ; preds = %18
  %29 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %30 = load ptr, ptr %9, align 8, !tbaa !9
  %31 = call ptr @fgets(ptr noundef %29, i32 noundef 1024, ptr noundef %30)
  %32 = load ptr, ptr %9, align 8, !tbaa !9
  %33 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %34 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %32, ptr noundef @.str.158, ptr noundef %33, ptr noundef @HBPotential, ptr noundef getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 1))
  %35 = load ptr, ptr %9, align 8, !tbaa !9
  %36 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %37 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %35, ptr noundef @.str.158, ptr noundef %36, ptr noundef getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 4), ptr noundef getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 5))
  %38 = load ptr, ptr %9, align 8, !tbaa !9
  %39 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %40 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %38, ptr noundef @.str.158, ptr noundef %39, ptr noundef getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 2), ptr noundef getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 3))
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %41, ptr noundef @.str.84)
  br label %43

43:                                               ; preds = %274, %53, %28
  %44 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %45 = load ptr, ptr %9, align 8, !tbaa !9
  %46 = call ptr @fgets(ptr noundef %44, i32 noundef 1024, ptr noundef %45)
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %275

48:                                               ; preds = %43
  %49 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %50 = load i8, ptr %49, align 16, !tbaa !11
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %51, 35
  br i1 %52, label %53, label %56

53:                                               ; preds = %48
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %1, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %43, !llvm.loop !12

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !5
  %57 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %58 = getelementptr inbounds [2 x [10 x i8]], ptr %4, i64 0, i64 0
  %59 = getelementptr inbounds [10 x i8], ptr %58, i64 0, i64 0
  %60 = getelementptr inbounds [2 x [10 x i8]], ptr %4, i64 0, i64 1
  %61 = getelementptr inbounds [10 x i8], ptr %60, i64 0, i64 0
  %62 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %57, ptr noundef @.str.110, ptr noundef %59, ptr noundef %61, ptr noundef %10) #9
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = add nsw i32 %64, %63
  store i32 %65, ptr %11, align 4, !tbaa !5
  %66 = getelementptr inbounds [2 x [10 x i8]], ptr %4, i64 0, i64 0
  %67 = getelementptr inbounds [10 x i8], ptr %66, i64 0, i64 0
  %68 = call i32 @AtomModel(ptr noundef %67)
  %69 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  store i32 %68, ptr %69, align 4, !tbaa !5
  %70 = getelementptr inbounds [2 x [10 x i8]], ptr %4, i64 0, i64 1
  %71 = getelementptr inbounds [10 x i8], ptr %70, i64 0, i64 0
  %72 = call i32 @AtomModel(ptr noundef %71)
  %73 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  store i32 %72, ptr %73, align 4, !tbaa !5
  %74 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp sgt i32 %75, %77
  br i1 %78, label %79, label %87

79:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %80 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr %12, align 4, !tbaa !5
  %82 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  store i32 %83, ptr %84, align 4, !tbaa !5
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  store i32 %85, ptr %86, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %87

87:                                               ; preds = %79, %56
  %88 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  %92 = load i32, ptr %1, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %93
  %95 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %94, i64 0, i64 %97
  %99 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %98, i64 0, i64 %101
  %103 = getelementptr inbounds %struct.ConstraintStr, ptr %102, i32 0, i32 1
  %104 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %91, ptr noundef @.str.123, ptr noundef %103, ptr noundef %10) #9
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = add nsw i32 %106, %105
  store i32 %107, ptr %11, align 4, !tbaa !5
  %108 = load i32, ptr %1, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %109
  %111 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %110, i64 0, i64 %113
  %115 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %114, i64 0, i64 %117
  %119 = getelementptr inbounds %struct.ConstraintStr, ptr %118, i32 0, i32 1
  %120 = load double, ptr %119, align 8, !tbaa !14
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %122
  %124 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %123, i64 0, i64 %126
  %128 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %127, i64 0, i64 %130
  %132 = getelementptr inbounds %struct.ConstraintStr, ptr %131, i32 0, i32 1
  %133 = load double, ptr %132, align 8, !tbaa !14
  %134 = fmul double %133, %120
  store double %134, ptr %132, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %217, %87
  %136 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %136, i64 %138
  %140 = getelementptr inbounds [2 x double], ptr %7, i64 0, i64 0
  %141 = getelementptr inbounds [2 x double], ptr %7, i64 0, i64 1
  %142 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %139, ptr noundef @.str.181, ptr noundef %140, ptr noundef %141, ptr noundef %10) #9
  %143 = icmp ne i32 %142, -1
  br i1 %143, label %144, label %218

144:                                              ; preds = %135
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = add nsw i32 %146, %145
  store i32 %147, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %148 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 32) #12
  store ptr %148, ptr %14, align 8, !tbaa !9
  %149 = getelementptr inbounds [2 x double], ptr %7, i64 0, i64 0
  %150 = load double, ptr %149, align 16, !tbaa !17
  %151 = load ptr, ptr %14, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.StepPotenStr, ptr %151, i32 0, i32 0
  store double %150, ptr %152, align 8, !tbaa !18
  %153 = load ptr, ptr %14, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.StepPotenStr, ptr %153, i32 0, i32 0
  %155 = load double, ptr %154, align 8, !tbaa !18
  %156 = load ptr, ptr %14, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.StepPotenStr, ptr %156, i32 0, i32 0
  %158 = load double, ptr %157, align 8, !tbaa !18
  %159 = fmul double %158, %155
  store double %159, ptr %157, align 8, !tbaa !18
  %160 = load i32, ptr %1, align 4, !tbaa !5
  %161 = icmp eq i32 %160, 1
  br i1 %161, label %162, label %169

162:                                              ; preds = %144
  %163 = getelementptr inbounds [2 x double], ptr %7, i64 0, i64 1
  %164 = load double, ptr %163, align 8, !tbaa !17
  %165 = load double, ptr @HBPotential, align 8, !tbaa !20
  %166 = fmul double %164, %165
  %167 = load ptr, ptr %14, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.StepPotenStr, ptr %167, i32 0, i32 1
  store double %166, ptr %168, align 8, !tbaa !22
  br label %190

169:                                              ; preds = %144
  %170 = load i32, ptr %1, align 4, !tbaa !5
  %171 = icmp sle i32 %170, 5
  br i1 %171, label %175, label %172

172:                                              ; preds = %169
  %173 = load i32, ptr %1, align 4, !tbaa !5
  %174 = icmp eq i32 %173, 10
  br i1 %174, label %175, label %182

175:                                              ; preds = %172, %169
  %176 = getelementptr inbounds [2 x double], ptr %7, i64 0, i64 1
  %177 = load double, ptr %176, align 8, !tbaa !17
  %178 = load double, ptr getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 4), align 8, !tbaa !23
  %179 = fmul double %177, %178
  %180 = load ptr, ptr %14, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.StepPotenStr, ptr %180, i32 0, i32 1
  store double %179, ptr %181, align 8, !tbaa !22
  br label %189

182:                                              ; preds = %172
  %183 = getelementptr inbounds [2 x double], ptr %7, i64 0, i64 1
  %184 = load double, ptr %183, align 8, !tbaa !17
  %185 = load double, ptr getelementptr inbounds (%struct.HBPotentialStr, ptr @HBPotential, i32 0, i32 2), align 8, !tbaa !24
  %186 = fmul double %184, %185
  %187 = load ptr, ptr %14, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.StepPotenStr, ptr %187, i32 0, i32 1
  store double %186, ptr %188, align 8, !tbaa !22
  br label %189

189:                                              ; preds = %182, %175
  br label %190

190:                                              ; preds = %189, %162
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = icmp eq i32 %191, 1
  br i1 %192, label %193, label %210

193:                                              ; preds = %190
  %194 = load ptr, ptr %14, align 8, !tbaa !9
  %195 = load i32, ptr %1, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %196
  %198 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %197, i64 0, i64 %200
  %202 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %201, i64 0, i64 %204
  %206 = getelementptr inbounds %struct.ConstraintStr, ptr %205, i32 0, i32 2
  store ptr %194, ptr %206, align 8, !tbaa !25
  %207 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %207, ptr %8, align 8, !tbaa !9
  %208 = load i32, ptr %13, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %13, align 4, !tbaa !5
  br label %217

210:                                              ; preds = %190
  %211 = load ptr, ptr %14, align 8, !tbaa !9
  %212 = load ptr, ptr %8, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.StepPotenStr, ptr %212, i32 0, i32 3
  store ptr %211, ptr %213, align 8, !tbaa !26
  %214 = load ptr, ptr %8, align 8, !tbaa !9
  %215 = getelementptr inbounds %struct.StepPotenStr, ptr %214, i32 0, i32 3
  %216 = load ptr, ptr %215, align 8, !tbaa !26
  store ptr %216, ptr %8, align 8, !tbaa !9
  br label %217

217:                                              ; preds = %210, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %135, !llvm.loop !27

218:                                              ; preds = %135
  %219 = load i32, ptr %1, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %220
  %222 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %221, i64 0, i64 %224
  %226 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %225, i64 0, i64 %228
  %230 = getelementptr inbounds %struct.ConstraintStr, ptr %229, i32 0, i32 2
  %231 = load ptr, ptr %230, align 8, !tbaa !25
  call void @CalAccumulatedPoten(ptr noundef %231)
  %232 = load i32, ptr %1, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %233
  %235 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %234, i64 0, i64 %237
  %239 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %238, i64 0, i64 %241
  %243 = load i32, ptr %1, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %244
  %246 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %245, i64 0, i64 %248
  %250 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %249, i64 0, i64 %252
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %242, ptr align 8 %253, i64 40, i1 false), !tbaa.struct !28
  %254 = load i32, ptr %3, align 4, !tbaa !5
  %255 = icmp eq i32 %254, 0
  br i1 %255, label %256, label %273

256:                                              ; preds = %218
  %257 = load i32, ptr %1, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %258
  %260 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %259, i64 0, i64 0
  %261 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %260, i64 0, i64 0
  %262 = load i32, ptr %1, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %263
  %265 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 0
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [33 x [33 x %struct.ConstraintStr]], ptr %264, i64 0, i64 %267
  %269 = getelementptr inbounds [2 x i32], ptr %2, i64 0, i64 1
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [33 x %struct.ConstraintStr], ptr %268, i64 0, i64 %271
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %261, ptr align 8 %272, i64 40, i1 false), !tbaa.struct !28
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %273

273:                                              ; preds = %256, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %274

274:                                              ; preds = %273
  br label %43, !llvm.loop !12

275:                                              ; preds = %43
  %276 = load ptr, ptr %9, align 8, !tbaa !9
  %277 = call i32 @fclose(ptr noundef %276)
  %278 = call i32 @strcmp(ptr noundef @neworcontinue, ptr noundef @.str.78) #10
  %279 = icmp eq i32 %278, 0
  br i1 %279, label %280, label %292

280:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %288, %280
  %282 = load i32, ptr %15, align 4, !tbaa !5
  %283 = load i32, ptr @atomnum, align 4, !tbaa !5
  %284 = icmp sle i32 %282, %283
  br i1 %284, label %286, label %285

285:                                              ; preds = %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %291

286:                                              ; preds = %281
  %287 = load i32, ptr %15, align 4, !tbaa !5
  call void @HBNeighborAssign(i32 noundef %287)
  br label %288

288:                                              ; preds = %286
  %289 = load i32, ptr %15, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %15, align 4, !tbaa !5
  br label %281, !llvm.loop !29

291:                                              ; preds = %285
  br label %292

292:                                              ; preds = %291, %275
  %293 = load i32, ptr @preBond, align 8, !tbaa !30
  %294 = icmp ne i32 %293, 0
  br i1 %294, label %295, label %296

295:                                              ; preds = %292
  call void @ReadPreBonds(ptr noundef @neworcontinue)
  br label %296

296:                                              ; preds = %295, %292
  br label %297

297:                                              ; preds = %296, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 20, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #9
  ret void
}

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

declare i32 @fclose(ptr noundef) #4

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #4

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #5

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

declare i32 @AtomModel(ptr noundef) #4

declare void @CalAccumulatedPoten(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @HBNeighborAssign(i32 noundef) #7

; Function Attrs: nounwind uwtable
declare dso_local void @ReadPreBonds(ptr noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 = { 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 #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind allocsize(0,1) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !16, i64 8}
!15 = !{!"ConstraintStr", !6, i64 0, !16, i64 8, !10, i64 16, !16, i64 24, !10, i64 32}
!16 = !{!"double", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = !{!19, !16, i64 0}
!19 = !{!"StepPotenStr", !16, i64 0, !16, i64 8, !16, i64 16, !10, i64 24}
!20 = !{!21, !16, i64 0}
!21 = !{!"HBPotentialStr", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40}
!22 = !{!19, !16, i64 8}
!23 = !{!21, !16, i64 32}
!24 = !{!21, !16, i64 16}
!25 = !{!15, !10, i64 16}
!26 = !{!19, !10, i64 24}
!27 = distinct !{!27, !13}
!28 = !{i64 0, i64 4, !5, i64 8, i64 8, !17, i64 16, i64 8, !9, i64 24, i64 8, !17, i64 32, i64 8, !9}
!29 = distinct !{!29, !13}
!30 = !{!31, !6, i64 0}
!31 = !{!"PreBondStr", !6, i64 0, !6, i64 4, !16, i64 8}


; 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.PreBondStr = type { i32, i32, double }
%struct.HBPotentialStr = type { double, double, double, double, double, double }
%struct.ConstraintStr = type { i32, double, ptr, double, ptr }

@datadir = external global [1024 x i8], align 16
@preBond = external local_unnamed_addr global %struct.PreBondStr, align 8
@.str.78 = external hidden unnamed_addr constant [4 x i8], align 1
@neworcontinue = external global [20 x i8], align 16
@.str.84 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@atomnum = external local_unnamed_addr global i32, align 4
@Methodtype = external local_unnamed_addr global [20 x i8], align 16
@.str.107 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.183 = external hidden unnamed_addr constant [62 x i8], align 1
@HBPotential = external global %struct.HBPotentialStr, align 8
@potentialPairHB = external global [12 x [33 x [33 x %struct.ConstraintStr]]], align 16

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ReadHB() local_unnamed_addr #6 {
  %1 = alloca [2 x [10 x i8]], align 16
  %2 = alloca [1024 x i8], align 16
  %3 = alloca [1024 x i8], align 16
  %4 = alloca [2 x double], align 16
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #10
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  %lhsc = load i8, ptr @Methodtype, align 16
  %rhsc = load i8, ptr @.str.178, align 1
  %6 = icmp eq i8 %lhsc, %rhsc
  br i1 %6, label %7, label %109

7:                                                ; preds = %0
  %8 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.182, ptr noundef nonnull @datadir) #10
  %9 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.94)
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %14

11:                                               ; preds = %7
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.183, ptr noundef nonnull @datadir)
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.107)
  tail call void @exit(i32 noundef 1) #11
  unreachable

14:                                               ; preds = %7
  %15 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef nonnull %9)
  %16 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %9, ptr noundef nonnull @.str.158, ptr noundef nonnull %3, ptr noundef nonnull @HBPotential, ptr noundef nonnull getelementptr inbounds (i8, ptr @HBPotential, i64 8)) #10
  %17 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %9, ptr noundef nonnull @.str.158, ptr noundef nonnull %3, ptr noundef nonnull getelementptr inbounds (i8, ptr @HBPotential, i64 32), ptr noundef nonnull getelementptr inbounds (i8, ptr @HBPotential, i64 40)) #10
  %18 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %9, ptr noundef nonnull @.str.158, ptr noundef nonnull %3, ptr noundef nonnull getelementptr inbounds (i8, ptr @HBPotential, i64 16), ptr noundef nonnull getelementptr inbounds (i8, ptr @HBPotential, i64 24)) #10
  %19 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %9, ptr noundef nonnull @.str.84) #10
  %20 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef nonnull %9)
  %.not8088 = icmp eq ptr %20, null
  br i1 %.not8088, label %.outer._crit_edge, label %.lr.ph.lr.ph

.lr.ph.lr.ph:                                     ; preds = %14
  %21 = getelementptr inbounds i8, ptr %1, i64 10
  %22 = getelementptr inbounds i8, ptr %4, i64 8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.lr.ph, %.outer
  %.062.ph91 = phi i32 [ 0, %.lr.ph.lr.ph ], [ %.06281.lcssa, %.outer ]
  %.ph89 = phi i1 [ true, %.lr.ph.lr.ph ], [ false, %.outer ]
  %23 = load i8, ptr %3, align 16, !tbaa !5
  %24 = icmp eq i8 %23, 35
  br i1 %24, label %25, label %.loopexit103

25:                                               ; preds = %.lr.ph
  %26 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef nonnull %9)
  %.not.peel = icmp eq ptr %26, null
  br i1 %.not.peel, label %.outer._crit_edge, label %.peel.next

.peel.next:                                       ; preds = %25, %29
  %.06281.in = phi i32 [ %.06281, %29 ], [ %.062.ph91, %25 ]
  %.06281 = add nsw i32 %.06281.in, 1
  %27 = load i8, ptr %3, align 16, !tbaa !5
  %28 = icmp eq i8 %27, 35
  br i1 %28, label %29, label %.loopexit103

29:                                               ; preds = %.peel.next
  %30 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef nonnull %9)
  %.not = icmp eq ptr %30, null
  br i1 %.not, label %.outer._crit_edge, label %.peel.next, !llvm.loop !8

.loopexit103:                                     ; preds = %.peel.next, %.lr.ph
  %.06281.lcssa = phi i32 [ %.062.ph91, %.lr.ph ], [ %.06281, %.peel.next ]
  %.lcssa = phi i1 [ %.ph89, %.lr.ph ], [ true, %.peel.next ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  %31 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.110, ptr noundef nonnull %1, ptr noundef nonnull %21, ptr noundef nonnull %5) #10
  %32 = load i32, ptr %5, align 4, !tbaa !11
  %33 = call i32 @AtomModel(ptr noundef nonnull %1) #10
  %34 = call i32 @AtomModel(ptr noundef nonnull %21) #10
  %spec.select = call i32 @llvm.smin.i32(i32 %33, i32 %34)
  %spec.select77 = call i32 @llvm.smax.i32(i32 %33, i32 %34)
  %35 = sext i32 %32 to i64
  %36 = getelementptr inbounds i8, ptr %3, i64 %35
  %37 = sext i32 %.06281.lcssa to i64
  %38 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %37
  %39 = sext i32 %spec.select to i64
  %40 = sext i32 %spec.select77 to i64
  %41 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %37, i64 %39, i64 %40
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  %43 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %36, ptr noundef nonnull @.str.123, ptr noundef nonnull %42, ptr noundef nonnull %5) #10
  %44 = load i32, ptr %5, align 4, !tbaa !11
  %45 = add nsw i32 %44, %32
  %46 = load double, ptr %42, align 8, !tbaa !13
  %47 = fmul double %46, %46
  store double %47, ptr %42, align 8, !tbaa !13
  %48 = sext i32 %45 to i64
  %49 = getelementptr inbounds i8, ptr %3, i64 %48
  %50 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %49, ptr noundef nonnull @.str.181, ptr noundef nonnull %4, ptr noundef nonnull %22, ptr noundef nonnull %5) #10
  %.not7682 = icmp eq i32 %50, -1
  br i1 %.not7682, label %._crit_edge87, label %.lr.ph86

.lr.ph86:                                         ; preds = %.loopexit103
  %51 = icmp eq i32 %.06281.lcssa, 1
  %52 = icmp slt i32 %.06281.lcssa, 6
  %53 = icmp eq i32 %.06281.lcssa, 10
  %or.cond = or i1 %52, %53
  %54 = getelementptr inbounds i8, ptr %41, i64 16
  %55 = load i32, ptr %5, align 4, !tbaa !11
  %56 = add nsw i32 %55, %45
  %57 = call noalias dereferenceable_or_null(32) ptr @calloc(i64 noundef 1, i64 noundef 32) #12
  %58 = load double, ptr %4, align 16, !tbaa !17
  %59 = fmul double %58, %58
  store double %59, ptr %57, align 8, !tbaa !18
  %60 = load double, ptr %22, align 8, !tbaa !17
  br i1 %51, label %67, label %.lr.ph86.split.preheader

.lr.ph86.split.preheader:                         ; preds = %.lr.ph86
  %.val = load double, ptr getelementptr inbounds (i8, ptr @HBPotential, i64 32), align 8
  %.val116 = load double, ptr getelementptr inbounds (i8, ptr @HBPotential, i64 16), align 8
  %61 = select i1 %or.cond, double %.val, double %.val116
  %62 = fmul double %60, %61
  %63 = getelementptr inbounds i8, ptr %57, i64 8
  store double %62, ptr %63, align 8
  store ptr %57, ptr %54, align 8, !tbaa !20
  %64 = sext i32 %56 to i64
  %65 = getelementptr inbounds i8, ptr %3, i64 %64
  %66 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %65, ptr noundef nonnull @.str.181, ptr noundef nonnull %4, ptr noundef nonnull %22, ptr noundef nonnull %5) #10
  %.not76.peel = icmp eq i32 %66, -1
  br i1 %.not76.peel, label %._crit_edge87, label %.lr.ph86.split

67:                                               ; preds = %.lr.ph86
  %68 = load double, ptr @HBPotential, align 8, !tbaa !21
  %69 = fmul double %60, %68
  %70 = getelementptr inbounds i8, ptr %57, i64 8
  store double %69, ptr %70, align 8, !tbaa !23
  store ptr %57, ptr %54, align 8, !tbaa !20
  %71 = sext i32 %56 to i64
  %72 = getelementptr inbounds i8, ptr %3, i64 %71
  %73 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %72, ptr noundef nonnull @.str.181, ptr noundef nonnull %4, ptr noundef nonnull %22, ptr noundef nonnull %5) #10
  %.not76.us.peel = icmp eq i32 %73, -1
  br i1 %.not76.us.peel, label %._crit_edge87, label %.lr.ph86.split.us.peel.next

.lr.ph86.split.us.peel.next:                      ; preds = %67, %.lr.ph86.split.us.peel.next
  %.06484.us = phi i32 [ %75, %.lr.ph86.split.us.peel.next ], [ %56, %67 ]
  %.16683.us = phi ptr [ %76, %.lr.ph86.split.us.peel.next ], [ %57, %67 ]
  %74 = load i32, ptr %5, align 4, !tbaa !11
  %75 = add nsw i32 %74, %.06484.us
  %76 = call noalias dereferenceable_or_null(32) ptr @calloc(i64 noundef 1, i64 noundef 32) #12
  %77 = load double, ptr @HBPotential, align 8, !tbaa !21
  %78 = load <2 x double>, ptr %4, align 16, !tbaa !17
  %79 = insertelement <2 x double> %78, double %77, i64 1
  %80 = fmul <2 x double> %78, %79
  store <2 x double> %80, ptr %76, align 8, !tbaa !17
  %81 = getelementptr inbounds i8, ptr %.16683.us, i64 24
  store ptr %76, ptr %81, align 8, !tbaa !24
  %82 = sext i32 %75 to i64
  %83 = getelementptr inbounds i8, ptr %3, i64 %82
  %84 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %83, ptr noundef nonnull @.str.181, ptr noundef nonnull %4, ptr noundef nonnull %22, ptr noundef nonnull %5) #10
  %.not76.us = icmp eq i32 %84, -1
  br i1 %.not76.us, label %._crit_edge87, label %.lr.ph86.split.us.peel.next, !llvm.loop !25

.lr.ph86.split:                                   ; preds = %.lr.ph86.split.preheader, %.lr.ph86.split
  %.06484 = phi i32 [ %86, %.lr.ph86.split ], [ %56, %.lr.ph86.split.preheader ]
  %.16683 = phi ptr [ %87, %.lr.ph86.split ], [ %57, %.lr.ph86.split.preheader ]
  %85 = load i32, ptr %5, align 4, !tbaa !11
  %86 = add nsw i32 %85, %.06484
  %87 = call noalias dereferenceable_or_null(32) ptr @calloc(i64 noundef 1, i64 noundef 32) #12
  %.val117 = load double, ptr getelementptr inbounds (i8, ptr @HBPotential, i64 32), align 8
  %.val118 = load double, ptr getelementptr inbounds (i8, ptr @HBPotential, i64 16), align 8
  %88 = select i1 %or.cond, double %.val117, double %.val118
  %89 = load <2 x double>, ptr %4, align 16, !tbaa !17
  %90 = insertelement <2 x double> %89, double %88, i64 1
  %91 = fmul <2 x double> %89, %90
  store <2 x double> %91, ptr %87, align 8
  %92 = getelementptr inbounds i8, ptr %.16683, i64 24
  store ptr %87, ptr %92, align 8, !tbaa !24
  %93 = sext i32 %86 to i64
  %94 = getelementptr inbounds i8, ptr %3, i64 %93
  %95 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %94, ptr noundef nonnull @.str.181, ptr noundef nonnull %4, ptr noundef nonnull %22, ptr noundef nonnull %5) #10
  %.not76 = icmp eq i32 %95, -1
  br i1 %.not76, label %._crit_edge87, label %.lr.ph86.split, !llvm.loop !26

._crit_edge87:                                    ; preds = %.lr.ph86.split, %.lr.ph86.split.us.peel.next, %.lr.ph86.split.preheader, %67, %.loopexit103
  %96 = getelementptr inbounds i8, ptr %41, i64 16
  %97 = load ptr, ptr %96, align 8, !tbaa !20
  call void @CalAccumulatedPoten(ptr noundef %97) #10
  %98 = getelementptr inbounds [12 x [33 x [33 x %struct.ConstraintStr]]], ptr @potentialPairHB, i64 0, i64 %37, i64 %40, i64 %39
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %98, ptr noundef nonnull align 8 dereferenceable(40) %41, i64 40, i1 false), !tbaa.struct !27
  br i1 %.lcssa, label %99, label %.outer

99:                                               ; preds = %._crit_edge87
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %38, ptr noundef nonnull align 8 dereferenceable(40) %41, i64 40, i1 false), !tbaa.struct !27
  br label %.outer

.outer:                                           ; preds = %99, %._crit_edge87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  %100 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1024, ptr noundef nonnull %9)
  %.not80 = icmp eq ptr %100, null
  br i1 %.not80, label %.outer._crit_edge, label %.lr.ph, !llvm.loop !29

.outer._crit_edge:                                ; preds = %.outer, %25, %29, %14
  %101 = call i32 @fclose(ptr noundef nonnull %9)
  %102 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @neworcontinue, ptr noundef nonnull dereferenceable(1) @.str.78) #13
  %103 = icmp ne i32 %102, 0
  %104 = load i32, ptr @atomnum, align 4
  %.not7492 = icmp slt i32 %104, 1
  %or.cond95 = select i1 %103, i1 true, i1 %.not7492
  br i1 %or.cond95, label %.loopexit, label %.lr.ph94

.lr.ph94:                                         ; preds = %.outer._crit_edge, %.lr.ph94
  %.093 = phi i32 [ %105, %.lr.ph94 ], [ 1, %.outer._crit_edge ]
  call void @HBNeighborAssign(i32 noundef %.093)
  %105 = add nuw nsw i32 %.093, 1
  %106 = load i32, ptr @atomnum, align 4, !tbaa !11
  %.not74.not = icmp slt i32 %.093, %106
  br i1 %.not74.not, label %.lr.ph94, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %.lr.ph94, %.outer._crit_edge
  %107 = load i32, ptr @preBond, align 8, !tbaa !31
  %.not75 = icmp eq i32 %107, 0
  br i1 %.not75, label %109, label %108

108:                                              ; preds = %.loopexit
  call void @ReadPreBonds(ptr noundef nonnull @neworcontinue)
  br label %109

109:                                              ; preds = %.loopexit, %108, %0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %1) #10
  ret void
}

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

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

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

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

declare i32 @AtomModel(ptr noundef) local_unnamed_addr #7

declare void @CalAccumulatedPoten(ptr noundef) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare dso_local void @HBNeighborAssign(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local void @ReadPreBonds(ptr noundef) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #9

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass