; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/Zalando Codesprint 2016/Problem C (C)

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [137 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #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 i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 1152921504606846976, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %206, %0
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = load i32, ptr %2, align 4, !tbaa !9
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %209

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %202, %27
  %29 = load i32, ptr %12, align 4, !tbaa !9
  %30 = load i32, ptr %10, align 4, !tbaa !9
  %31 = mul nsw i32 %29, %30
  %32 = load i32, ptr %2, align 4, !tbaa !9
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %205

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %36 = load i32, ptr %2, align 4, !tbaa !9
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = mul nsw i32 %37, %38
  %40 = sub nsw i32 %39, 1
  %41 = add nsw i32 %36, %40
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = mul nsw i32 %42, %43
  %45 = sdiv i32 %41, %44
  store i32 %45, ptr %13, align 4, !tbaa !9
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = mul nsw i32 %46, %47
  %49 = sext i32 %48 to i64
  store i64 %49, ptr %6, align 8, !tbaa !5
  %50 = load i32, ptr %4, align 4, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = mul nsw i32 %50, %51
  %53 = sext i32 %52 to i64
  store i64 %53, ptr %7, align 8, !tbaa !5
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = mul nsw i32 %54, %55
  %57 = sext i32 %56 to i64
  store i64 %57, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %58 = load i64, ptr %6, align 8, !tbaa !5
  %59 = load i64, ptr %7, align 8, !tbaa !5
  %60 = mul nsw i64 %58, %59
  %61 = load i64, ptr %7, align 8, !tbaa !5
  %62 = load i64, ptr %8, align 8, !tbaa !5
  %63 = mul nsw i64 %61, %62
  %64 = add nsw i64 %60, %63
  %65 = load i64, ptr %8, align 8, !tbaa !5
  %66 = load i64, ptr %6, align 8, !tbaa !5
  %67 = mul nsw i64 %65, %66
  %68 = add nsw i64 %64, %67
  %69 = mul nsw i64 %68, 2
  store i64 %69, ptr %14, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %71 = load i64, ptr %70, align 8, !tbaa !5
  store i64 %71, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = mul nsw i32 %72, %73
  %75 = sext i32 %74 to i64
  store i64 %75, ptr %6, align 8, !tbaa !5
  %76 = load i32, ptr %4, align 4, !tbaa !9
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = mul nsw i32 %76, %77
  %79 = sext i32 %78 to i64
  store i64 %79, ptr %7, align 8, !tbaa !5
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = mul nsw i32 %80, %81
  %83 = sext i32 %82 to i64
  store i64 %83, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %84 = load i64, ptr %6, align 8, !tbaa !5
  %85 = load i64, ptr %7, align 8, !tbaa !5
  %86 = mul nsw i64 %84, %85
  %87 = load i64, ptr %7, align 8, !tbaa !5
  %88 = load i64, ptr %8, align 8, !tbaa !5
  %89 = mul nsw i64 %87, %88
  %90 = add nsw i64 %86, %89
  %91 = load i64, ptr %8, align 8, !tbaa !5
  %92 = load i64, ptr %6, align 8, !tbaa !5
  %93 = mul nsw i64 %91, %92
  %94 = add nsw i64 %90, %93
  %95 = mul nsw i64 %94, 2
  store i64 %95, ptr %15, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %97 = load i64, ptr %96, align 8, !tbaa !5
  store i64 %97, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  %98 = load i32, ptr %3, align 4, !tbaa !9
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = mul nsw i32 %98, %99
  %101 = sext i32 %100 to i64
  store i64 %101, ptr %6, align 8, !tbaa !5
  %102 = load i32, ptr %4, align 4, !tbaa !9
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = mul nsw i32 %102, %103
  %105 = sext i32 %104 to i64
  store i64 %105, ptr %7, align 8, !tbaa !5
  %106 = load i32, ptr %5, align 4, !tbaa !9
  %107 = load i32, ptr %13, align 4, !tbaa !9
  %108 = mul nsw i32 %106, %107
  %109 = sext i32 %108 to i64
  store i64 %109, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %110 = load i64, ptr %6, align 8, !tbaa !5
  %111 = load i64, ptr %7, align 8, !tbaa !5
  %112 = mul nsw i64 %110, %111
  %113 = load i64, ptr %7, align 8, !tbaa !5
  %114 = load i64, ptr %8, align 8, !tbaa !5
  %115 = mul nsw i64 %113, %114
  %116 = add nsw i64 %112, %115
  %117 = load i64, ptr %8, align 8, !tbaa !5
  %118 = load i64, ptr %6, align 8, !tbaa !5
  %119 = mul nsw i64 %117, %118
  %120 = add nsw i64 %116, %119
  %121 = mul nsw i64 %120, 2
  store i64 %121, ptr %16, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %123 = load i64, ptr %122, align 8, !tbaa !5
  store i64 %123, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %124 = load i32, ptr %3, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = mul nsw i32 %124, %125
  %127 = sext i32 %126 to i64
  store i64 %127, ptr %6, align 8, !tbaa !5
  %128 = load i32, ptr %4, align 4, !tbaa !9
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = mul nsw i32 %128, %129
  %131 = sext i32 %130 to i64
  store i64 %131, ptr %7, align 8, !tbaa !5
  %132 = load i32, ptr %5, align 4, !tbaa !9
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = mul nsw i32 %132, %133
  %135 = sext i32 %134 to i64
  store i64 %135, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %136 = load i64, ptr %6, align 8, !tbaa !5
  %137 = load i64, ptr %7, align 8, !tbaa !5
  %138 = mul nsw i64 %136, %137
  %139 = load i64, ptr %7, align 8, !tbaa !5
  %140 = load i64, ptr %8, align 8, !tbaa !5
  %141 = mul nsw i64 %139, %140
  %142 = add nsw i64 %138, %141
  %143 = load i64, ptr %8, align 8, !tbaa !5
  %144 = load i64, ptr %6, align 8, !tbaa !5
  %145 = mul nsw i64 %143, %144
  %146 = add nsw i64 %142, %145
  %147 = mul nsw i64 %146, 2
  store i64 %147, ptr %17, align 8, !tbaa !5
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %149 = load i64, ptr %148, align 8, !tbaa !5
  store i64 %149, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %150 = load i32, ptr %3, align 4, !tbaa !9
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = mul nsw i32 %150, %151
  %153 = sext i32 %152 to i64
  store i64 %153, ptr %6, align 8, !tbaa !5
  %154 = load i32, ptr %4, align 4, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = mul nsw i32 %154, %155
  %157 = sext i32 %156 to i64
  store i64 %157, ptr %7, align 8, !tbaa !5
  %158 = load i32, ptr %5, align 4, !tbaa !9
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = mul nsw i32 %158, %159
  %161 = sext i32 %160 to i64
  store i64 %161, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %162 = load i64, ptr %6, align 8, !tbaa !5
  %163 = load i64, ptr %7, align 8, !tbaa !5
  %164 = mul nsw i64 %162, %163
  %165 = load i64, ptr %7, align 8, !tbaa !5
  %166 = load i64, ptr %8, align 8, !tbaa !5
  %167 = mul nsw i64 %165, %166
  %168 = add nsw i64 %164, %167
  %169 = load i64, ptr %8, align 8, !tbaa !5
  %170 = load i64, ptr %6, align 8, !tbaa !5
  %171 = mul nsw i64 %169, %170
  %172 = add nsw i64 %168, %171
  %173 = mul nsw i64 %172, 2
  store i64 %173, ptr %18, align 8, !tbaa !5
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %175 = load i64, ptr %174, align 8, !tbaa !5
  store i64 %175, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %176 = load i32, ptr %3, align 4, !tbaa !9
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = mul nsw i32 %176, %177
  %179 = sext i32 %178 to i64
  store i64 %179, ptr %6, align 8, !tbaa !5
  %180 = load i32, ptr %4, align 4, !tbaa !9
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = mul nsw i32 %180, %181
  %183 = sext i32 %182 to i64
  store i64 %183, ptr %7, align 8, !tbaa !5
  %184 = load i32, ptr %5, align 4, !tbaa !9
  %185 = load i32, ptr %10, align 4, !tbaa !9
  %186 = mul nsw i32 %184, %185
  %187 = sext i32 %186 to i64
  store i64 %187, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %188 = load i64, ptr %6, align 8, !tbaa !5
  %189 = load i64, ptr %7, align 8, !tbaa !5
  %190 = mul nsw i64 %188, %189
  %191 = load i64, ptr %7, align 8, !tbaa !5
  %192 = load i64, ptr %8, align 8, !tbaa !5
  %193 = mul nsw i64 %191, %192
  %194 = add nsw i64 %190, %193
  %195 = load i64, ptr %8, align 8, !tbaa !5
  %196 = load i64, ptr %6, align 8, !tbaa !5
  %197 = mul nsw i64 %195, %196
  %198 = add nsw i64 %194, %197
  %199 = mul nsw i64 %198, 2
  store i64 %199, ptr %19, align 8, !tbaa !5
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %201 = load i64, ptr %200, align 8, !tbaa !5
  store i64 %201, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %202

202:                                              ; preds = %35
  %203 = load i32, ptr %12, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %12, align 4, !tbaa !9
  br label %28, !llvm.loop !11

205:                                              ; preds = %34
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %10, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %10, align 4, !tbaa !9
  br label %22, !llvm.loop !13

209:                                              ; preds = %26
  %210 = load i64, ptr %9, align 8, !tbaa !5
  %211 = icmp ne i64 %210, 1152921504606846976
  br i1 %211, label %212, label %213

212:                                              ; preds = %209
  br label %215

213:                                              ; preds = %209
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 85, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

214:                                              ; No predecessors!
  br label %215

215:                                              ; preds = %214, %212
  %216 = load i64, ptr %9, align 8, !tbaa !5
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %216)
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %217, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %219 = load i32, ptr %1, align 4
  ret i32 %219
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

attributes #0 = { 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 #1 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 }
attributes #8 = { 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 = !{!"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}


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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [137 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 1152921504606846976, ptr %5, align 8, !tbaa !5
  %14 = load i32, ptr %1, align 4, !tbaa !9
  %.not72 = icmp slt i32 %14, 1
  br i1 %.not72, label %._crit_edge74.thread, label %.preheader

.preheader:                                       ; preds = %0, %._crit_edge
  %15 = phi i64 [ %17, %._crit_edge ], [ 1152921504606846976, %0 ]
  %16 = phi i32 [ %18, %._crit_edge ], [ %14, %0 ]
  %.06473 = phi i32 [ %19, %._crit_edge ], [ 1, %0 ]
  %.not6970 = icmp sgt i32 %.06473, %16
  br i1 %.not6970, label %._crit_edge, label %.lr.ph

._crit_edge74:                                    ; preds = %._crit_edge
  %.not68 = icmp eq i64 %17, 1152921504606846976
  br i1 %.not68, label %._crit_edge74.thread, label %124

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %17 = phi i64 [ %15, %.preheader ], [ %120, %.lr.ph ]
  %18 = phi i32 [ %16, %.preheader ], [ %123, %.lr.ph ]
  %19 = add nuw nsw i32 %.06473, 1
  %.not.not = icmp slt i32 %.06473, %18
  br i1 %.not.not, label %.preheader, label %._crit_edge74, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %20 = phi i32 [ %123, %.lr.ph ], [ %16, %.preheader ]
  %.071 = phi i32 [ %121, %.lr.ph ], [ 1, %.preheader ]
  %21 = mul nuw nsw i32 %.071, %.06473
  %22 = add nsw i32 %21, -1
  %23 = add nsw i32 %22, %20
  %24 = sdiv i32 %23, %21
  %25 = load i32, ptr %2, align 4, !tbaa !9
  %26 = mul nsw i32 %25, %.06473
  %27 = sext i32 %26 to i64
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = mul nsw i32 %28, %.071
  %30 = sext i32 %29 to i64
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = mul nsw i32 %31, %24
  %33 = sext i32 %32 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %34 = add nsw i64 %33, %27
  %35 = mul i64 %34, %30
  %36 = mul nsw i64 %33, %27
  %37 = add nsw i64 %35, %36
  %38 = shl nsw i64 %37, 1
  store i64 %38, ptr %6, align 8, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %40 = load i64, ptr %39, align 8, !tbaa !5
  store i64 %40, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %41 = load i32, ptr %2, align 4, !tbaa !9
  %42 = mul nsw i32 %41, %.06473
  %43 = sext i32 %42 to i64
  %44 = load i32, ptr %3, align 4, !tbaa !9
  %45 = mul nsw i32 %44, %24
  %46 = sext i32 %45 to i64
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = mul nsw i32 %47, %.071
  %49 = sext i32 %48 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %50 = add nsw i64 %49, %43
  %51 = mul i64 %50, %46
  %52 = mul nsw i64 %49, %43
  %53 = add nsw i64 %51, %52
  %54 = shl nsw i64 %53, 1
  store i64 %54, ptr %7, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %56 = load i64, ptr %55, align 8, !tbaa !5
  store i64 %56, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = mul nsw i32 %57, %.071
  %59 = sext i32 %58 to i64
  %60 = load i32, ptr %3, align 4, !tbaa !9
  %61 = mul nsw i32 %60, %.06473
  %62 = sext i32 %61 to i64
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = mul nsw i32 %63, %24
  %65 = sext i32 %64 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %66 = add nsw i64 %65, %59
  %67 = mul i64 %66, %62
  %68 = mul nsw i64 %65, %59
  %69 = add nsw i64 %67, %68
  %70 = shl nsw i64 %69, 1
  store i64 %70, ptr %8, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %72 = load i64, ptr %71, align 8, !tbaa !5
  store i64 %72, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %73 = load i32, ptr %2, align 4, !tbaa !9
  %74 = mul nsw i32 %73, %.071
  %75 = sext i32 %74 to i64
  %76 = load i32, ptr %3, align 4, !tbaa !9
  %77 = mul nsw i32 %76, %24
  %78 = sext i32 %77 to i64
  %79 = load i32, ptr %4, align 4, !tbaa !9
  %80 = mul nsw i32 %79, %.06473
  %81 = sext i32 %80 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %82 = add nsw i64 %81, %75
  %83 = mul i64 %82, %78
  %84 = mul nsw i64 %81, %75
  %85 = add nsw i64 %83, %84
  %86 = shl nsw i64 %85, 1
  store i64 %86, ptr %9, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %88 = load i64, ptr %87, align 8, !tbaa !5
  store i64 %88, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %89 = load i32, ptr %2, align 4, !tbaa !9
  %90 = mul nsw i32 %89, %24
  %91 = sext i32 %90 to i64
  %92 = load i32, ptr %3, align 4, !tbaa !9
  %93 = mul nsw i32 %92, %.06473
  %94 = sext i32 %93 to i64
  %95 = load i32, ptr %4, align 4, !tbaa !9
  %96 = mul nsw i32 %95, %.071
  %97 = sext i32 %96 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %98 = add nsw i64 %97, %91
  %99 = mul i64 %98, %94
  %100 = mul nsw i64 %97, %91
  %101 = add nsw i64 %99, %100
  %102 = shl nsw i64 %101, 1
  store i64 %102, ptr %10, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %104 = load i64, ptr %103, align 8, !tbaa !5
  store i64 %104, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %105 = load i32, ptr %2, align 4, !tbaa !9
  %106 = mul nsw i32 %105, %24
  %107 = sext i32 %106 to i64
  %108 = load i32, ptr %3, align 4, !tbaa !9
  %109 = mul nsw i32 %108, %.071
  %110 = sext i32 %109 to i64
  %111 = load i32, ptr %4, align 4, !tbaa !9
  %112 = mul nsw i32 %111, %.06473
  %113 = sext i32 %112 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %114 = add nsw i64 %113, %107
  %115 = mul i64 %114, %110
  %116 = mul nsw i64 %113, %107
  %117 = add nsw i64 %115, %116
  %118 = shl nsw i64 %117, 1
  store i64 %118, ptr %11, align 8, !tbaa !5
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %120 = load i64, ptr %119, align 8, !tbaa !5
  store i64 %120, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %121 = add nuw nsw i32 %.071, 1
  %122 = mul nuw nsw i32 %121, %.06473
  %123 = load i32, ptr %1, align 4, !tbaa !9
  %.not69 = icmp sgt i32 %122, %123
  br i1 %.not69, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge74.thread:                             ; preds = %0, %._crit_edge74
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 85, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

124:                                              ; preds = %._crit_edge74
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %17)
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; 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 #0 align 2

attributes #0 = { 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 #1 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 }
attributes #8 = { 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 = !{!"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}


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