; 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.REMDStr = type { i32, i32, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%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.DynamicStr = type { [4 x i32], [4 x double], [4 x double], %struct.HBStr, %struct.HBNeighborStr, %struct.InteractionEventStr }
%struct.HBStr = type { i32, i32, i8, i32 }
%struct.HBNeighborStr = type { [5 x i32], i32, i32 }
%struct.InteractionEventStr = type { i32, i64, i64, double, double, i32, i32 }
%struct.AAStr = type { [5 x i8], i32, i32, i32, i32, double }
%struct.PepStr = type { i32, i32, i32, i32, double }

@datadir = external global [1024 x i8], align 16
@REMDInfo = external global %struct.REMDStr, align 8
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@atomnum = external global i32, align 4
@atom = external global ptr, align 8
@protein = external global ptr, align 8
@aminoacid = external global ptr, align 8
@.str.107 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [12 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 allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ReadCoordinate() #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [1024 x i8], align 16
  %4 = alloca [1024 x i8], align 16
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 1, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %10 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %11 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %10, ptr noundef @.str.130, ptr noundef @datadir, ptr noundef getelementptr inbounds (%struct.REMDStr, ptr @REMDInfo, i32 0, i32 4)) #6
  %12 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %13 = call noalias ptr @fopen(ptr noundef %12, ptr noundef @.str.94)
  store ptr %13, ptr %5, align 8, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !9
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %19

16:                                               ; preds = %0
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.148, ptr noundef @datadir)
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.107)
  call void @exit(i32 noundef 1) #7
  unreachable

19:                                               ; preds = %0
  %20 = load i32, ptr @atomnum, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = sext i32 %21 to i64
  %23 = call noalias ptr @calloc(i64 noundef %22, i64 noundef 16) #8
  store ptr %23, ptr @atom, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %76, %19
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = load i32, ptr @atomnum, align 4, !tbaa !5
  %27 = icmp sle i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %79

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %30 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 136) #8
  store ptr %30, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %31 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 176) #8
  store ptr %31, ptr %8, align 8, !tbaa !9
  %32 = load ptr, ptr %7, align 8, !tbaa !9
  %33 = load ptr, ptr @atom, align 8, !tbaa !9
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds %struct.AtomStr, ptr %33, i64 %35
  %37 = getelementptr inbounds %struct.AtomStr, ptr %36, i32 0, i32 0
  store ptr %32, ptr %37, align 8, !tbaa !11
  %38 = load ptr, ptr %8, align 8, !tbaa !9
  %39 = load ptr, ptr @atom, align 8, !tbaa !9
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %struct.AtomStr, ptr %39, i64 %41
  %43 = getelementptr inbounds %struct.AtomStr, ptr %42, i32 0, i32 1
  store ptr %38, ptr %43, align 8, !tbaa !13
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = load ptr, ptr @atom, align 8, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds %struct.AtomStr, ptr %45, i64 %47
  %49 = getelementptr inbounds %struct.AtomStr, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.PropertyStr, ptr %50, i32 0, i32 3
  store i32 %44, ptr %51, align 8, !tbaa !14
  %52 = load ptr, ptr @atom, align 8, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds %struct.AtomStr, ptr %52, i64 %54
  %56 = getelementptr inbounds %struct.AtomStr, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !13
  %58 = getelementptr inbounds %struct.DynamicStr, ptr %57, i32 0, i32 5
  %59 = getelementptr inbounds %struct.InteractionEventStr, ptr %58, i32 0, i32 1
  store i64 0, ptr %59, align 8, !tbaa !18
  %60 = load ptr, ptr @atom, align 8, !tbaa !9
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.AtomStr, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.AtomStr, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds %struct.DynamicStr, ptr %65, i32 0, i32 5
  %67 = getelementptr inbounds %struct.InteractionEventStr, ptr %66, i32 0, i32 0
  store i32 -111, ptr %67, align 8, !tbaa !24
  %68 = load ptr, ptr @atom, align 8, !tbaa !9
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %struct.AtomStr, ptr %68, i64 %70
  %72 = getelementptr inbounds %struct.AtomStr, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = getelementptr inbounds %struct.DynamicStr, ptr %73, i32 0, i32 5
  %75 = getelementptr inbounds %struct.InteractionEventStr, ptr %74, i32 0, i32 3
  store double 1.000000e+08, ptr %75, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %76

76:                                               ; preds = %29
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !5
  br label %24, !llvm.loop !26

79:                                               ; preds = %28
  %80 = getelementptr inbounds [1024 x i8], ptr %4, i64 0, i64 0
  %81 = load ptr, ptr %5, align 8, !tbaa !9
  %82 = call ptr @fgets(ptr noundef %80, i32 noundef 1024, ptr noundef %81)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %213, %79
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = load i32, ptr @atomnum, align 4, !tbaa !5
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %216

88:                                               ; preds = %83
  %89 = load ptr, ptr %5, align 8, !tbaa !9
  %90 = load ptr, ptr @atom, align 8, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %struct.AtomStr, ptr %90, i64 %92
  %94 = getelementptr inbounds %struct.AtomStr, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  %96 = getelementptr inbounds %struct.PropertyStr, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds [8 x i8], ptr %96, i64 0, i64 0
  %98 = load ptr, ptr @atom, align 8, !tbaa !9
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %struct.AtomStr, ptr %98, i64 %100
  %102 = getelementptr inbounds %struct.AtomStr, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = getelementptr inbounds %struct.DynamicStr, ptr %103, i32 0, i32 1
  %105 = getelementptr inbounds [4 x double], ptr %104, i64 0, i64 1
  %106 = load ptr, ptr @atom, align 8, !tbaa !9
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %struct.AtomStr, ptr %106, i64 %108
  %110 = getelementptr inbounds %struct.AtomStr, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = getelementptr inbounds %struct.DynamicStr, ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds [4 x double], ptr %112, i64 0, i64 2
  %114 = load ptr, ptr @atom, align 8, !tbaa !9
  %115 = load i32, ptr %9, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.AtomStr, ptr %114, i64 %116
  %118 = getelementptr inbounds %struct.AtomStr, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %120 = getelementptr inbounds %struct.DynamicStr, ptr %119, i32 0, i32 1
  %121 = getelementptr inbounds [4 x double], ptr %120, i64 0, i64 3
  %122 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %89, ptr noundef @.str.149, ptr noundef %97, ptr noundef %105, ptr noundef %113, ptr noundef %121)
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = load ptr, ptr @aminoacid, align 8, !tbaa !9
  %125 = load i32, ptr %1, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds %struct.AAStr, ptr %124, i64 %126
  %128 = getelementptr inbounds %struct.AAStr, ptr %127, i32 0, i32 3
  %129 = load i32, ptr %128, align 8, !tbaa !28
  %130 = icmp sgt i32 %123, %129
  br i1 %130, label %131, label %134

131:                                              ; preds = %88
  %132 = load i32, ptr %1, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %1, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %131, %88
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %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 !30
  %142 = icmp sgt i32 %135, %141
  br i1 %142, label %143, label %146

143:                                              ; preds = %134
  %144 = load i32, ptr %2, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %2, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %143, %134
  %147 = load i32, ptr %9, align 4, !tbaa !5
  %148 = load ptr, ptr @atom, align 8, !tbaa !9
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds %struct.AtomStr, ptr %148, i64 %150
  %152 = getelementptr inbounds %struct.AtomStr, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !11
  %154 = getelementptr inbounds %struct.PropertyStr, ptr %153, i32 0, i32 9
  %155 = getelementptr inbounds %struct.AtomSeqStr, ptr %154, i32 0, i32 0
  store i32 %147, ptr %155, align 8, !tbaa !32
  %156 = load i32, ptr %1, align 4, !tbaa !5
  %157 = load ptr, ptr @protein, align 8, !tbaa !9
  %158 = load i32, ptr %2, align 4, !tbaa !5
  %159 = sub nsw i32 %158, 1
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %struct.PepStr, ptr %157, i64 %160
  %162 = getelementptr inbounds %struct.PepStr, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 4, !tbaa !33
  %164 = sub nsw i32 %156, %163
  %165 = load ptr, ptr @atom, align 8, !tbaa !9
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds %struct.AtomStr, ptr %165, i64 %167
  %169 = getelementptr inbounds %struct.AtomStr, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !11
  %171 = getelementptr inbounds %struct.PropertyStr, ptr %170, i32 0, i32 9
  %172 = getelementptr inbounds %struct.AtomSeqStr, ptr %171, i32 0, i32 2
  store i32 %164, ptr %172, align 8, !tbaa !34
  %173 = load i32, ptr %2, align 4, !tbaa !5
  %174 = load ptr, ptr @atom, align 8, !tbaa !9
  %175 = load i32, ptr %9, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.AtomStr, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.AtomStr, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !11
  %180 = getelementptr inbounds %struct.PropertyStr, ptr %179, i32 0, i32 9
  %181 = getelementptr inbounds %struct.AtomSeqStr, ptr %180, i32 0, i32 1
  store i32 %173, ptr %181, align 4, !tbaa !35
  %182 = load ptr, ptr @atom, align 8, !tbaa !9
  %183 = load i32, ptr %9, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.AtomStr, ptr %182, i64 %184
  %186 = getelementptr inbounds %struct.AtomStr, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !11
  %188 = getelementptr inbounds %struct.PropertyStr, ptr %187, i32 0, i32 2
  %189 = getelementptr inbounds [8 x i8], ptr %188, i64 0, i64 0
  %190 = load ptr, ptr @aminoacid, align 8, !tbaa !9
  %191 = load i32, ptr %1, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct.AAStr, ptr %190, i64 %192
  %194 = getelementptr inbounds %struct.AAStr, ptr %193, i32 0, i32 0
  %195 = getelementptr inbounds [5 x i8], ptr %194, i64 0, i64 0
  %196 = call ptr @strcpy(ptr noundef %189, ptr noundef %195) #6
  %197 = load ptr, ptr @atom, align 8, !tbaa !9
  %198 = load i32, ptr %9, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds %struct.AtomStr, ptr %197, i64 %199
  %201 = getelementptr inbounds %struct.AtomStr, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !11
  %203 = getelementptr inbounds %struct.PropertyStr, ptr %202, i32 0, i32 2
  %204 = getelementptr inbounds [8 x i8], ptr %203, i64 0, i64 0
  %205 = call i32 @AAModel(ptr noundef %204)
  %206 = load ptr, ptr @atom, align 8, !tbaa !9
  %207 = load i32, ptr %9, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.AtomStr, ptr %206, i64 %208
  %210 = getelementptr inbounds %struct.AtomStr, ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %210, align 8, !tbaa !11
  %212 = getelementptr inbounds %struct.PropertyStr, ptr %211, i32 0, i32 5
  store i32 %205, ptr %212, align 8, !tbaa !36
  br label %213

213:                                              ; preds = %146
  %214 = load i32, ptr %9, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %9, align 4, !tbaa !5
  br label %83, !llvm.loop !37

216:                                              ; preds = %87
  %217 = load ptr, ptr %5, align 8, !tbaa !9
  %218 = call i32 @fclose(ptr noundef %217)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

declare i32 @fclose(ptr noundef) #2

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

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

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

declare i32 @AAModel(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!12, !10, i64 0}
!12 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !6, i64 48}
!15 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !16, i64 64, !16, i64 72, !7, i64 80, !17, i64 104, !10, i64 120, !10, i64 128}
!16 = !{!"double", !7, i64 0}
!17 = !{!"AtomSeqStr", !6, i64 0, !6, i64 4, !6, i64 8}
!18 = !{!19, !23, i64 136}
!19 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !20, i64 80, !21, i64 96, !22, i64 128}
!20 = !{!"HBStr", !6, i64 0, !6, i64 4, !7, i64 8, !6, i64 12}
!21 = !{!"HBNeighborStr", !7, i64 0, !6, i64 20, !6, i64 24}
!22 = !{!"InteractionEventStr", !6, i64 0, !23, i64 8, !23, i64 16, !16, i64 24, !16, i64 32, !6, i64 40, !6, i64 44}
!23 = !{!"long", !7, i64 0}
!24 = !{!19, !6, i64 128}
!25 = !{!19, !16, i64 152}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !6, i64 16}
!29 = !{!"AAStr", !7, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !16, i64 24}
!30 = !{!31, !6, i64 4}
!31 = !{!"PepStr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !16, i64 16}
!32 = !{!15, !6, i64 104}
!33 = !{!31, !6, i64 12}
!34 = !{!15, !6, i64 112}
!35 = !{!15, !6, i64 108}
!36 = !{!15, !6, i64 56}
!37 = distinct !{!37, !27}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.REMDStr = type { i32, i32, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%struct.AtomStr = type { ptr, ptr }
%struct.AAStr = type { [5 x i8], i32, i32, i32, i32, double }
%struct.PepStr = type { i32, i32, i32, i32, double }

@datadir = external global [1024 x i8], align 16
@REMDInfo = external global %struct.REMDStr, align 8
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@atomnum = 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
@aminoacid = external local_unnamed_addr global ptr, align 8
@.str.107 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [12 x i8], align 1

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

; Function Attrs: 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 #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ReadCoordinate() local_unnamed_addr #4 {
  %1 = alloca [1024 x i8], align 16
  %2 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #7
  %3 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.130, ptr noundef nonnull @datadir, ptr noundef nonnull getelementptr inbounds (i8, ptr @REMDInfo, i64 62)) #7
  %4 = call noalias ptr @fopen(ptr noundef nonnull %1, ptr noundef nonnull @.str.94)
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %9

6:                                                ; preds = %0
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.148, ptr noundef nonnull @datadir)
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.107)
  tail call void @exit(i32 noundef 1) #8
  unreachable

9:                                                ; preds = %0
  %10 = load i32, ptr @atomnum, align 4, !tbaa !5
  %11 = add i32 %10, 1
  %12 = sext i32 %11 to i64
  %13 = tail call noalias ptr @calloc(i64 noundef %12, i64 noundef 16) #9
  store ptr %13, ptr @atom, align 8, !tbaa !9
  %.not43 = icmp slt i32 %10, 0
  br i1 %.not43, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %9
  %wide.trip.count = zext i32 %11 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %9
  %14 = call ptr @fgets(ptr noundef nonnull %2, i32 noundef 1024, ptr noundef nonnull %4)
  %15 = load i32, ptr @atomnum, align 4, !tbaa !5
  %.not4245 = icmp slt i32 %15, 1
  br i1 %.not4245, label %._crit_edge51, label %.lr.ph50.preheader

.lr.ph50.preheader:                               ; preds = %._crit_edge
  %.pre = load ptr, ptr @atom, align 8, !tbaa !9
  br label %.lr.ph50

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %16 = phi ptr [ %13, %.lr.ph.preheader ], [ %22, %.lr.ph ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %17 = tail call noalias dereferenceable_or_null(136) ptr @calloc(i64 noundef 1, i64 noundef 136) #9
  %18 = tail call noalias dereferenceable_or_null(176) ptr @calloc(i64 noundef 1, i64 noundef 176) #9
  %19 = getelementptr inbounds %struct.AtomStr, ptr %16, i64 %indvars.iv
  store ptr %17, ptr %19, align 8, !tbaa !11
  %20 = load ptr, ptr @atom, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct.AtomStr, ptr %20, i64 %indvars.iv, i32 1
  store ptr %18, ptr %21, align 8, !tbaa !13
  %22 = load ptr, ptr @atom, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.AtomStr, ptr %22, i64 %indvars.iv
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 48
  %26 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %26, ptr %25, align 8, !tbaa !14
  %27 = getelementptr inbounds %struct.AtomStr, ptr %22, i64 %indvars.iv, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds i8, ptr %28, i64 136
  store i64 0, ptr %29, align 8, !tbaa !18
  %30 = getelementptr inbounds i8, ptr %28, i64 128
  store i32 -111, ptr %30, align 8, !tbaa !24
  %31 = getelementptr inbounds i8, ptr %28, i64 152
  store double 1.000000e+08, ptr %31, align 8, !tbaa !25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !26

._crit_edge51:                                    ; preds = %.lr.ph50, %._crit_edge
  %32 = call i32 @fclose(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %1) #7
  ret void

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %.lr.ph50
  %33 = phi ptr [ %.pre, %.lr.ph50.preheader ], [ %75, %.lr.ph50 ]
  %indvars.iv53 = phi i64 [ 1, %.lr.ph50.preheader ], [ %indvars.iv.next54, %.lr.ph50 ]
  %.03747 = phi i32 [ 1, %.lr.ph50.preheader ], [ %spec.select, %.lr.ph50 ]
  %.03846 = phi i32 [ 1, %.lr.ph50.preheader ], [ %.139, %.lr.ph50 ]
  %34 = getelementptr inbounds %struct.AtomStr, ptr %33, i64 %indvars.iv53
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %34, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  %39 = getelementptr inbounds i8, ptr %37, i64 32
  %40 = getelementptr inbounds i8, ptr %37, i64 40
  %41 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %4, ptr noundef nonnull @.str.149, ptr noundef %35, ptr noundef nonnull %38, ptr noundef nonnull %39, ptr noundef nonnull %40) #7
  %42 = load ptr, ptr @aminoacid, align 8, !tbaa !9
  %43 = zext nneg i32 %.03747 to i64
  %44 = getelementptr inbounds %struct.AAStr, ptr %42, i64 %43, i32 3
  %45 = load i32, ptr %44, align 8, !tbaa !28
  %46 = sext i32 %45 to i64
  %47 = icmp sgt i64 %indvars.iv53, %46
  %48 = zext i1 %47 to i32
  %spec.select = add nuw nsw i32 %.03747, %48
  %49 = load ptr, ptr @protein, align 8, !tbaa !9
  %50 = zext nneg i32 %.03846 to i64
  %51 = getelementptr inbounds %struct.PepStr, ptr %49, i64 %50, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !30
  %53 = sext i32 %52 to i64
  %54 = icmp sgt i64 %indvars.iv53, %53
  %55 = zext i1 %54 to i32
  %.139 = add nuw nsw i32 %.03846, %55
  %56 = load ptr, ptr @atom, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.AtomStr, ptr %56, i64 %indvars.iv53
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds i8, ptr %58, i64 104
  %60 = trunc nuw nsw i64 %indvars.iv53 to i32
  store i32 %60, ptr %59, align 8, !tbaa !32
  %61 = zext nneg i32 %.139 to i64
  %62 = getelementptr %struct.PepStr, ptr %49, i64 %61
  %63 = getelementptr i8, ptr %62, i64 -12
  %64 = load i32, ptr %63, align 4, !tbaa !33
  %65 = sub nsw i32 %spec.select, %64
  %66 = getelementptr inbounds i8, ptr %58, i64 112
  store i32 %65, ptr %66, align 8, !tbaa !34
  %67 = getelementptr inbounds i8, ptr %58, i64 108
  store i32 %.139, ptr %67, align 4, !tbaa !35
  %68 = getelementptr inbounds i8, ptr %58, i64 40
  %69 = zext nneg i32 %spec.select to i64
  %70 = getelementptr inbounds %struct.AAStr, ptr %42, i64 %69
  %71 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %68, ptr noundef nonnull dereferenceable(1) %70) #7
  %72 = load ptr, ptr %57, align 8, !tbaa !11
  %73 = getelementptr inbounds i8, ptr %72, i64 40
  %74 = call i32 @AAModel(ptr noundef nonnull %73) #7
  %75 = load ptr, ptr @atom, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.AtomStr, ptr %75, i64 %indvars.iv53
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds i8, ptr %77, i64 56
  store i32 %74, ptr %78, align 8, !tbaa !36
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %79 = load i32, ptr @atomnum, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %.not42.not = icmp slt i64 %indvars.iv53, %80
  br i1 %.not42.not, label %.lr.ph50, label %._crit_edge51, !llvm.loop !37
}

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

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

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

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

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

declare i32 @AAModel(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind 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 = !{!12, !10, i64 0}
!12 = !{!"AtomStr", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !6, i64 48}
!15 = !{!"PropertyStr", !7, i64 0, !7, i64 8, !7, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !16, i64 64, !16, i64 72, !7, i64 80, !17, i64 104, !10, i64 120, !10, i64 128}
!16 = !{!"double", !7, i64 0}
!17 = !{!"AtomSeqStr", !6, i64 0, !6, i64 4, !6, i64 8}
!18 = !{!19, !23, i64 136}
!19 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !20, i64 80, !21, i64 96, !22, i64 128}
!20 = !{!"HBStr", !6, i64 0, !6, i64 4, !7, i64 8, !6, i64 12}
!21 = !{!"HBNeighborStr", !7, i64 0, !6, i64 20, !6, i64 24}
!22 = !{!"InteractionEventStr", !6, i64 0, !23, i64 8, !23, i64 16, !16, i64 24, !16, i64 32, !6, i64 40, !6, i64 44}
!23 = !{!"long", !7, i64 0}
!24 = !{!19, !6, i64 128}
!25 = !{!19, !16, i64 152}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !6, i64 16}
!29 = !{!"AAStr", !7, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !16, i64 24}
!30 = !{!31, !6, i64 4}
!31 = !{!"PepStr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !16, i64 16}
!32 = !{!15, !6, i64 104}
!33 = !{!31, !6, i64 12}
!34 = !{!15, !6, i64 112}
!35 = !{!15, !6, i64 108}
!36 = !{!15, !6, i64 56}
!37 = distinct !{!37, !27}


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