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

; 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.AtomStr = type { ptr, ptr }
%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 }

@.str.6 = external hidden unnamed_addr constant [71 x i8], align 1
@boxCurtDim = external global [4 x double], align 16
@atom = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@atomnum = external global i32, align 4
@.str.14 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

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

14:                                               ; preds = %1
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %145

15:                                               ; preds = %1
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %16, ptr noundef @.str.13, ptr noundef %4)
  %18 = load i32, ptr %4, align 4, !tbaa !9
  %19 = load i32, ptr @atomnum, align 4, !tbaa !9
  %20 = icmp ne i32 %18, %19
  br i1 %20, label %21, label %25

21:                                               ; preds = %15
  %22 = load i32, ptr @atomnum, align 4, !tbaa !9
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %22, i32 noundef %23, ptr noundef @.str.6, i32 noundef 117)
  call void @exit(i32 noundef 1) #6
  unreachable

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

26:                                               ; preds = %133, %25
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %136

31:                                               ; preds = %26
  %32 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call ptr @fgets(ptr noundef %32, i32 noundef 1024, ptr noundef %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  %35 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %36 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %37 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %38 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %39 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %40 = load ptr, ptr @atom, align 8, !tbaa !5
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.AtomStr, ptr %40, i64 %42
  %44 = getelementptr inbounds %struct.AtomStr, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds %struct.DynamicStr, ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds [4 x double], ptr %46, i64 0, i64 1
  %48 = load ptr, ptr @atom, align 8, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds %struct.AtomStr, ptr %48, i64 %50
  %52 = getelementptr inbounds %struct.AtomStr, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.DynamicStr, ptr %53, i32 0, i32 1
  %55 = getelementptr inbounds [4 x double], ptr %54, i64 0, i64 2
  %56 = load ptr, ptr @atom, align 8, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %struct.AtomStr, ptr %56, i64 %58
  %60 = getelementptr inbounds %struct.AtomStr, ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.DynamicStr, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds [4 x double], ptr %62, i64 0, i64 3
  %64 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %35, ptr noundef @.str.15, ptr noundef %36, ptr noundef %37, ptr noundef %38, ptr noundef %39, ptr noundef %47, ptr noundef %55, ptr noundef %63, ptr noundef %9) #5
  %65 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %65, i64 %67
  %69 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %70 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %68, ptr noundef @.str.16, ptr noundef %69) #5
  %71 = icmp ne i32 %70, -1
  br i1 %71, label %72, label %102

72:                                               ; preds = %31
  %73 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %74 = load i32, ptr %9, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %73, i64 %75
  %77 = load ptr, ptr @atom, align 8, !tbaa !5
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.AtomStr, ptr %77, i64 %79
  %81 = getelementptr inbounds %struct.AtomStr, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds %struct.DynamicStr, ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds [4 x double], ptr %83, i64 0, i64 1
  %85 = load ptr, ptr @atom, align 8, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.AtomStr, ptr %85, i64 %87
  %89 = getelementptr inbounds %struct.AtomStr, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = getelementptr inbounds %struct.DynamicStr, ptr %90, i32 0, i32 2
  %92 = getelementptr inbounds [4 x double], ptr %91, i64 0, i64 2
  %93 = load ptr, ptr @atom, align 8, !tbaa !5
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %struct.AtomStr, ptr %93, i64 %95
  %97 = getelementptr inbounds %struct.AtomStr, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = getelementptr inbounds %struct.DynamicStr, ptr %98, i32 0, i32 2
  %100 = getelementptr inbounds [4 x double], ptr %99, i64 0, i64 3
  %101 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %76, ptr noundef @.str.17, ptr noundef %84, ptr noundef %92, ptr noundef %100) #5
  br label %102

102:                                              ; preds = %72, %31
  %103 = load ptr, ptr @atom, align 8, !tbaa !5
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %struct.AtomStr, ptr %103, i64 %105
  %107 = getelementptr inbounds %struct.AtomStr, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds %struct.DynamicStr, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds [4 x double], ptr %109, i64 0, i64 1
  %111 = load double, ptr %110, align 8, !tbaa !13
  %112 = fmul double %111, 1.000000e+01
  store double %112, ptr %110, align 8, !tbaa !13
  %113 = load ptr, ptr @atom, align 8, !tbaa !5
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %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 1
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  %119 = getelementptr inbounds %struct.DynamicStr, ptr %118, i32 0, i32 1
  %120 = getelementptr inbounds [4 x double], ptr %119, i64 0, i64 2
  %121 = load double, ptr %120, align 8, !tbaa !13
  %122 = fmul double %121, 1.000000e+01
  store double %122, ptr %120, align 8, !tbaa !13
  %123 = load ptr, ptr @atom, align 8, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %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 1
  %128 = load ptr, ptr %127, align 8, !tbaa !11
  %129 = getelementptr inbounds %struct.DynamicStr, ptr %128, i32 0, i32 1
  %130 = getelementptr inbounds [4 x double], ptr %129, i64 0, i64 3
  %131 = load double, ptr %130, align 8, !tbaa !13
  %132 = fmul double %131, 1.000000e+01
  store double %132, ptr %130, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %133

133:                                              ; preds = %102
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %8, align 4, !tbaa !9
  br label %26, !llvm.loop !15

136:                                              ; preds = %30
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %137, ptr noundef @.str.18, ptr noundef getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 1), ptr noundef getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 2), ptr noundef getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 3))
  %139 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 1), align 8, !tbaa !13
  %140 = fmul double %139, 1.000000e+01
  store double %140, ptr getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 1), align 8, !tbaa !13
  %141 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 2), align 16, !tbaa !13
  %142 = fmul double %141, 1.000000e+01
  store double %142, ptr getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 2), align 16, !tbaa !13
  %143 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 3), align 8, !tbaa !13
  %144 = fmul double %143, 1.000000e+01
  store double %144, ptr getelementptr inbounds ([4 x double], ptr @boxCurtDim, i64 0, i64 3), align 8, !tbaa !13
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %145

145:                                              ; preds = %136, %14
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %146 = load i32, ptr %2, align 4
  ret i32 %146
}

; 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, ...) #1

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"AtomStr", !6, i64 0, !6, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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.AtomStr = type { ptr, ptr }

@.str.6 = external hidden unnamed_addr constant [71 x i8], align 1
@boxCurtDim = external global [4 x double], align 16
@atom = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@atomnum = external local_unnamed_addr global i32, align 4
@.str.14 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @ReadGro(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca i32, align 4
  %3 = alloca [1024 x i8], align 16
  %4 = alloca [1024 x i8], align 16
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #5
  %6 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str.12, ptr noundef nonnull %3) #5
  %7 = icmp eq i32 %6, -1
  br i1 %7, label %54, label %8

8:                                                ; preds = %1
  %9 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str.13, ptr noundef nonnull %2) #5
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = load i32, ptr @atomnum, align 4, !tbaa !5
  %.not = icmp eq i32 %10, %11
  br i1 %.not, label %.preheader, label %12

.preheader:                                       ; preds = %8
  %.not1820 = icmp slt i32 %10, 1
  br i1 %.not1820, label %._crit_edge, label %.lr.ph

12:                                               ; preds = %8
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %11, i32 noundef %10, ptr noundef nonnull @.str.6, i32 noundef 117)
  call void @exit(i32 noundef 1) #6
  unreachable

._crit_edge:                                      ; preds = %42, %.preheader
  %14 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str.18, ptr noundef nonnull getelementptr inbounds (i8, ptr @boxCurtDim, i64 8), ptr noundef nonnull getelementptr inbounds (i8, ptr @boxCurtDim, i64 16), ptr noundef nonnull getelementptr inbounds (i8, ptr @boxCurtDim, i64 24)) #5
  %15 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @boxCurtDim, i64 8), align 8, !tbaa !9
  %16 = fmul <2 x double> %15, <double 1.000000e+01, double 1.000000e+01>
  store <2 x double> %16, ptr getelementptr inbounds (i8, ptr @boxCurtDim, i64 8), align 8, !tbaa !9
  %17 = load double, ptr getelementptr inbounds (i8, ptr @boxCurtDim, i64 24), align 8, !tbaa !9
  %18 = fmul double %17, 1.000000e+01
  store double %18, ptr getelementptr inbounds (i8, ptr @boxCurtDim, i64 24), align 8, !tbaa !9
  br label %54

.lr.ph:                                           ; preds = %.preheader, %42
  %indvars.iv = phi i64 [ %indvars.iv.next, %42 ], [ 1, %.preheader ]
  %19 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 1024, ptr noundef %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %20 = load ptr, ptr @atom, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.AtomStr, ptr %20, i64 %indvars.iv, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = getelementptr inbounds i8, ptr %22, i64 32
  %25 = getelementptr inbounds i8, ptr %22, i64 40
  %26 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %4, ptr noundef nonnull @.str.15, ptr noundef nonnull %3, ptr noundef nonnull %3, ptr noundef nonnull %3, ptr noundef nonnull %3, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %5) #5
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i8, ptr %4, i64 %28
  %30 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %29, ptr noundef nonnull @.str.16, ptr noundef nonnull %3) #5
  %.not19 = icmp eq i32 %30, -1
  br i1 %.not19, label %42, label %31

31:                                               ; preds = %.lr.ph
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i8, ptr %4, i64 %33
  %35 = load ptr, ptr @atom, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.AtomStr, ptr %35, i64 %indvars.iv, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = getelementptr inbounds i8, ptr %37, i64 56
  %39 = getelementptr inbounds i8, ptr %37, i64 64
  %40 = getelementptr inbounds i8, ptr %37, i64 72
  %41 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %34, ptr noundef nonnull @.str.17, ptr noundef nonnull %38, ptr noundef nonnull %39, ptr noundef nonnull %40) #5
  br label %42

42:                                               ; preds = %31, %.lr.ph
  %43 = load ptr, ptr @atom, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.AtomStr, ptr %43, i64 %indvars.iv, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %45, i64 24
  %47 = load <2 x double>, ptr %46, align 8, !tbaa !9
  %48 = fmul <2 x double> %47, <double 1.000000e+01, double 1.000000e+01>
  store <2 x double> %48, ptr %46, align 8, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %45, i64 40
  %50 = load double, ptr %49, align 8, !tbaa !9
  %51 = fmul double %50, 1.000000e+01
  store double %51, ptr %49, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %.not18.not = icmp slt i64 %indvars.iv, %53
  br i1 %.not18.not, label %.lr.ph, label %._crit_edge, !llvm.loop !15

54:                                               ; preds = %1, %._crit_edge
  %.015 = phi i32 [ 0, %._crit_edge ], [ -1, %1 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret i32 %.015
}

; 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 #4

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"AtomStr", !12, i64 0, !12, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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