; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-04-04 (G - Surface Area of Cubes - dby)

; 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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@A = external dso_local global i64, align 8
@B = external dso_local global i64, align 8
@C = external dso_local global i64, align 8
@ret = external dso_local global i64, align 8
@n = external dso_local global i32, align 4
@x = external dso_local global [1009 x i32], align 16
@y = external dso_local global [1009 x i32], align 16
@z = external dso_local global [1009 x i32], align 16
@dt = external dso_local global [6 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZL2mx = external hidden constant [6 x i32], align 16
@_ZL2my = external hidden constant [6 x i32], align 16
@_ZL2mz = external hidden constant [6 x i32], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3chkiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @A)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) @B)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) @C)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %11 = load i64, ptr @A, align 8, !tbaa !5
  %12 = load i64, ptr @B, align 8, !tbaa !5
  %13 = mul nsw i64 %11, %12
  %14 = load i64, ptr @A, align 8, !tbaa !5
  %15 = load i64, ptr @C, align 8, !tbaa !5
  %16 = mul nsw i64 %14, %15
  %17 = add nsw i64 %13, %16
  %18 = load i64, ptr @B, align 8, !tbaa !5
  %19 = load i64, ptr @C, align 8, !tbaa !5
  %20 = mul nsw i64 %18, %19
  %21 = add nsw i64 %17, %20
  %22 = mul nsw i64 %21, 2
  store i64 %22, ptr @ret, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %110, %0
  %24 = load i32, ptr %2, align 4, !tbaa !9
  %25 = load i32, ptr @n, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %113

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1009 x i32], ptr @x, i64 0, i64 %30
  %32 = load i32, ptr %2, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1009 x i32], ptr @y, i64 0, i64 %33
  %35 = load i32, ptr %2, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1009 x i32], ptr @z, i64 0, i64 %36
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %31, ptr noundef %34, ptr noundef %37)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %47, %28
  %40 = load i32, ptr %4, align 4, !tbaa !9
  %41 = icmp slt i32 %40, 6
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %50

43:                                               ; preds = %39
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [6 x i32], ptr @dt, i64 0, i64 %45
  store i32 -1, ptr %46, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %43
  %48 = load i32, ptr %4, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %4, align 4, !tbaa !9
  br label %39, !llvm.loop !11

50:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %90, %50
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = icmp slt i32 %52, 6
  br i1 %53, label %55, label %54

54:                                               ; preds = %51
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %93

55:                                               ; preds = %51
  %56 = load i32, ptr %2, align 4, !tbaa !9
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1009 x i32], ptr @x, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [6 x i32], ptr @_ZL2mx, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = add nsw i32 %60, %64
  %66 = load i32, ptr %2, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1009 x i32], ptr @y, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = load i32, ptr %5, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [6 x i32], ptr @_ZL2my, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = add nsw i32 %69, %73
  %75 = load i32, ptr %2, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1009 x i32], ptr @z, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [6 x i32], ptr @_ZL2mz, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = add nsw i32 %78, %82
  %84 = call noundef zeroext i1 @_Z3chkiiii(i32 noundef %56, i32 noundef %65, i32 noundef %74, i32 noundef %83)
  br i1 %84, label %85, label %89

85:                                               ; preds = %55
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [6 x i32], ptr @dt, i64 0, i64 %87
  store i32 1, ptr %88, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %85, %55
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %5, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %5, align 4, !tbaa !9
  br label %51, !llvm.loop !13

93:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %106, %93
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = icmp slt i32 %95, 6
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %109

98:                                               ; preds = %94
  %99 = load i32, ptr %6, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [6 x i32], ptr @dt, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = load i64, ptr @ret, align 8, !tbaa !5
  %105 = add nsw i64 %104, %103
  store i64 %105, ptr @ret, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %98
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %6, align 4, !tbaa !9
  br label %94, !llvm.loop !14

109:                                              ; preds = %97
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %2, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %2, align 4, !tbaa !9
  br label %23, !llvm.loop !15

113:                                              ; preds = %27
  %114 = load i64, ptr @ret, align 8, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %114)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; 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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@A = external dso_local global i64, align 8
@B = external dso_local global i64, align 8
@C = external dso_local global i64, align 8
@ret = external dso_local local_unnamed_addr global i64, align 8
@n = external dso_local global i32, align 4
@x = external dso_local global [1009 x i32], align 16
@y = external dso_local global [1009 x i32], align 16
@z = external dso_local global [1009 x i32], align 16
@dt = external dso_local local_unnamed_addr global [6 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@_ZL2mx = external hidden local_unnamed_addr constant [6 x i32], align 16
@_ZL2my = external hidden local_unnamed_addr constant [6 x i32], align 16
@_ZL2mz = external hidden local_unnamed_addr constant [6 x i32], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3chkiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @A)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) @B)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) @C)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %5 = load i64, ptr @A, align 8, !tbaa !5
  %6 = load i64, ptr @B, align 8, !tbaa !5
  %7 = load i64, ptr @C, align 8, !tbaa !5
  %8 = add i64 %7, %6
  %9 = mul i64 %8, %5
  %10 = mul nsw i64 %7, %6
  %11 = add nsw i64 %9, %10
  %12 = shl nsw i64 %11, 1
  store i64 %12, ptr @ret, align 8, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !9
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %.pre = load i32, ptr @_ZL2mx, align 16, !tbaa !9
  %.pre33 = load i32, ptr @_ZL2my, align 16, !tbaa !9
  %.pre34 = load i32, ptr @_ZL2mz, align 16, !tbaa !9
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mx, i64 4), align 4
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2my, i64 4), align 4
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mz, i64 4), align 4
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mx, i64 8), align 8
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2my, i64 8), align 8
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mz, i64 8), align 8
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mx, i64 12), align 4
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2my, i64 12), align 4
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mz, i64 12), align 4
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mx, i64 16), align 16
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2my, i64 16), align 16
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mz, i64 16), align 16
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mx, i64 20), align 4
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2my, i64 20), align 4
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2mz, i64 20), align 4
  br label %.lr.ph

._crit_edge:                                      ; preds = %.preheader, %0
  %30 = phi i64 [ %12, %0 ], [ %103, %.preheader ]
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %30)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.preheader
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.preheader ]
  %33 = getelementptr inbounds [1009 x i32], ptr @x, i64 0, i64 %indvars.iv
  %34 = getelementptr inbounds [1009 x i32], ptr @y, i64 0, i64 %indvars.iv
  %35 = getelementptr inbounds [1009 x i32], ptr @z, i64 0, i64 %indvars.iv
  %36 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %33, ptr noundef nonnull %34, ptr noundef nonnull %35)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) @dt, i8 -1, i64 24, i1 false), !tbaa !9
  %37 = load i32, ptr %33, align 4, !tbaa !9
  %38 = add nsw i32 %.pre, %37
  %39 = load i32, ptr %34, align 4, !tbaa !9
  %40 = add nsw i32 %.pre33, %39
  %41 = load i32, ptr %35, align 4, !tbaa !9
  %42 = add nsw i32 %.pre34, %41
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  %44 = tail call noundef zeroext i1 @_Z3chkiiii(i32 noundef %43, i32 noundef %38, i32 noundef %40, i32 noundef %42)
  br i1 %44, label %45, label %.preheader24.1

45:                                               ; preds = %.lr.ph
  store i32 1, ptr @dt, align 16, !tbaa !9
  br label %.preheader24.1

.preheader24.1:                                   ; preds = %.lr.ph, %45
  %46 = load i32, ptr %33, align 4, !tbaa !9
  %47 = add nsw i32 %15, %46
  %48 = load i32, ptr %34, align 4, !tbaa !9
  %49 = add nsw i32 %16, %48
  %50 = load i32, ptr %35, align 4, !tbaa !9
  %51 = add nsw i32 %17, %50
  %52 = tail call noundef zeroext i1 @_Z3chkiiii(i32 noundef %43, i32 noundef %47, i32 noundef %49, i32 noundef %51)
  br i1 %52, label %53, label %.preheader24.2

53:                                               ; preds = %.preheader24.1
  store i32 1, ptr getelementptr inbounds (i8, ptr @dt, i64 4), align 4, !tbaa !9
  br label %.preheader24.2

.preheader24.2:                                   ; preds = %53, %.preheader24.1
  %54 = load i32, ptr %33, align 4, !tbaa !9
  %55 = add nsw i32 %18, %54
  %56 = load i32, ptr %34, align 4, !tbaa !9
  %57 = add nsw i32 %19, %56
  %58 = load i32, ptr %35, align 4, !tbaa !9
  %59 = add nsw i32 %20, %58
  %60 = tail call noundef zeroext i1 @_Z3chkiiii(i32 noundef %43, i32 noundef %55, i32 noundef %57, i32 noundef %59)
  br i1 %60, label %61, label %.preheader24.3

61:                                               ; preds = %.preheader24.2
  store i32 1, ptr getelementptr inbounds (i8, ptr @dt, i64 8), align 8, !tbaa !9
  br label %.preheader24.3

.preheader24.3:                                   ; preds = %61, %.preheader24.2
  %62 = load i32, ptr %33, align 4, !tbaa !9
  %63 = add nsw i32 %21, %62
  %64 = load i32, ptr %34, align 4, !tbaa !9
  %65 = add nsw i32 %22, %64
  %66 = load i32, ptr %35, align 4, !tbaa !9
  %67 = add nsw i32 %23, %66
  %68 = tail call noundef zeroext i1 @_Z3chkiiii(i32 noundef %43, i32 noundef %63, i32 noundef %65, i32 noundef %67)
  br i1 %68, label %69, label %.preheader24.4

69:                                               ; preds = %.preheader24.3
  store i32 1, ptr getelementptr inbounds (i8, ptr @dt, i64 12), align 4, !tbaa !9
  br label %.preheader24.4

.preheader24.4:                                   ; preds = %69, %.preheader24.3
  %70 = load i32, ptr %33, align 4, !tbaa !9
  %71 = add nsw i32 %24, %70
  %72 = load i32, ptr %34, align 4, !tbaa !9
  %73 = add nsw i32 %25, %72
  %74 = load i32, ptr %35, align 4, !tbaa !9
  %75 = add nsw i32 %26, %74
  %76 = tail call noundef zeroext i1 @_Z3chkiiii(i32 noundef %43, i32 noundef %71, i32 noundef %73, i32 noundef %75)
  br i1 %76, label %77, label %.preheader24.5

77:                                               ; preds = %.preheader24.4
  store i32 1, ptr getelementptr inbounds (i8, ptr @dt, i64 16), align 16, !tbaa !9
  br label %.preheader24.5

.preheader24.5:                                   ; preds = %77, %.preheader24.4
  %78 = load i32, ptr %33, align 4, !tbaa !9
  %79 = add nsw i32 %27, %78
  %80 = load i32, ptr %34, align 4, !tbaa !9
  %81 = add nsw i32 %28, %80
  %82 = load i32, ptr %35, align 4, !tbaa !9
  %83 = add nsw i32 %29, %82
  %84 = tail call noundef zeroext i1 @_Z3chkiiii(i32 noundef %43, i32 noundef %79, i32 noundef %81, i32 noundef %83)
  br i1 %84, label %85, label %.preheader24.5..preheader_crit_edge

.preheader24.5..preheader_crit_edge:              ; preds = %.preheader24.5
  %.pre35 = load i32, ptr getelementptr inbounds (i8, ptr @dt, i64 20), align 4, !tbaa !9
  br label %.preheader

85:                                               ; preds = %.preheader24.5
  store i32 1, ptr getelementptr inbounds (i8, ptr @dt, i64 20), align 4, !tbaa !9
  br label %.preheader

.preheader:                                       ; preds = %.preheader24.5..preheader_crit_edge, %85
  %86 = phi i32 [ %.pre35, %.preheader24.5..preheader_crit_edge ], [ 1, %85 ]
  %ret.promoted = load i64, ptr @ret, align 8, !tbaa !5
  %87 = load i32, ptr @dt, align 16, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = add nsw i64 %ret.promoted, %88
  %90 = load i32, ptr getelementptr inbounds (i8, ptr @dt, i64 4), align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = add nsw i64 %89, %91
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @dt, i64 8), align 8, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = add nsw i64 %92, %94
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @dt, i64 12), align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = add nsw i64 %95, %97
  %99 = load i32, ptr getelementptr inbounds (i8, ptr @dt, i64 16), align 16, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = add nsw i64 %98, %100
  %102 = sext i32 %86 to i64
  %103 = add nsw i64 %101, %102
  store i64 %103, ptr @ret, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %104 = load i32, ptr @n, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next, %105
  br i1 %106, label %.lr.ph, label %._crit_edge, !llvm.loop !11
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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