; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Codesprints 2016/Codesprint May/Problem C/C.ll (Z5solveiii)

; 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 [2 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = mul nsw i32 4, %17
  %19 = icmp sge i32 %16, %18
  br i1 %19, label %20, label %62

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %34, %20
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %37

26:                                               ; preds = %21
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = add nsw i32 %27, %28
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = add nsw i32 %29, %30
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %31)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @.str)
  br label %34

34:                                               ; preds = %26
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %7, align 4, !tbaa !5
  br label %21, !llvm.loop !9

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

38:                                               ; preds = %49, %37
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %52

43:                                               ; preds = %38
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = add nsw i32 %44, %45
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @.str)
  br label %49

49:                                               ; preds = %43
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %8, align 4, !tbaa !5
  br label %38, !llvm.loop !11

52:                                               ; preds = %42
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = mul nsw i32 2, %54
  %56 = sub nsw i32 %53, %55
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = mul nsw i32 2, %59
  %61 = add nsw i32 %58, %60
  call void @_Z5solveiii(i32 noundef %56, i32 noundef %57, i32 noundef %61)
  br label %205

62:                                               ; preds = %3
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = mul nsw i32 4, %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sub nsw i32 %64, %65
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = icmp sge i32 %66, %67
  br i1 %68, label %69, label %101

69:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %70 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %70, ptr %9, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %82, %69
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %85

76:                                               ; preds = %71
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = add nsw i32 %77, %78
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %79)
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef @.str)
  br label %82

82:                                               ; preds = %76
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %9, align 4, !tbaa !5
  br label %71, !llvm.loop !12

85:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %97, %85
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %100

91:                                               ; preds = %86
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = add nsw i32 %92, %93
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %94)
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef @.str)
  br label %97

97:                                               ; preds = %91
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %10, align 4, !tbaa !5
  br label %86, !llvm.loop !13

100:                                              ; preds = %90
  br label %204

101:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %115, %101
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %118

107:                                              ; preds = %102
  %108 = load i32, ptr %6, align 4, !tbaa !5
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = add nsw i32 %108, %109
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = add nsw i32 %110, %111
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %112)
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @.str)
  br label %115

115:                                              ; preds = %107
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %11, align 4, !tbaa !5
  br label %102, !llvm.loop !14

118:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %133, %118
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = load i32, ptr %4, align 4, !tbaa !5
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = mul nsw i32 3, %122
  %124 = sub nsw i32 %121, %123
  %125 = icmp slt i32 %120, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %136

127:                                              ; preds = %119
  %128 = load i32, ptr %6, align 4, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !5
  %130 = add nsw i32 %128, %129
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %130)
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef @.str)
  br label %133

133:                                              ; preds = %127
  %134 = load i32, ptr %12, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %12, align 4, !tbaa !5
  br label %119, !llvm.loop !15

136:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %152, %136
  %138 = load i32, ptr %13, align 4, !tbaa !5
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %155

142:                                              ; preds = %137
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = add nsw i32 %143, %144
  %146 = load i32, ptr %5, align 4, !tbaa !5
  %147 = sub nsw i32 %145, %146
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = add nsw i32 %147, %148
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef @.str)
  br label %152

152:                                              ; preds = %142
  %153 = load i32, ptr %13, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %13, align 4, !tbaa !5
  br label %137, !llvm.loop !16

155:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %177, %155
  %157 = load i32, ptr %14, align 4, !tbaa !5
  %158 = load i32, ptr %5, align 4, !tbaa !5
  %159 = mul nsw i32 4, %158
  %160 = load i32, ptr %4, align 4, !tbaa !5
  %161 = sub nsw i32 %159, %160
  %162 = icmp slt i32 %157, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %180

164:                                              ; preds = %156
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = add nsw i32 %165, %166
  %168 = load i32, ptr %5, align 4, !tbaa !5
  %169 = mul nsw i32 4, %168
  %170 = load i32, ptr %4, align 4, !tbaa !5
  %171 = sub nsw i32 %169, %170
  %172 = sub nsw i32 %167, %171
  %173 = load i32, ptr %14, align 4, !tbaa !5
  %174 = add nsw i32 %172, %173
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %174)
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef @.str)
  br label %177

177:                                              ; preds = %164
  %178 = load i32, ptr %14, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %14, align 4, !tbaa !5
  br label %156, !llvm.loop !17

180:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %200, %180
  %182 = load i32, ptr %15, align 4, !tbaa !5
  %183 = load i32, ptr %5, align 4, !tbaa !5
  %184 = load i32, ptr %5, align 4, !tbaa !5
  %185 = mul nsw i32 4, %184
  %186 = load i32, ptr %4, align 4, !tbaa !5
  %187 = sub nsw i32 %185, %186
  %188 = sub nsw i32 %183, %187
  %189 = icmp slt i32 %182, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %203

191:                                              ; preds = %181
  %192 = load i32, ptr %5, align 4, !tbaa !5
  %193 = mul nsw i32 2, %192
  %194 = load i32, ptr %6, align 4, !tbaa !5
  %195 = add nsw i32 %193, %194
  %196 = load i32, ptr %15, align 4, !tbaa !5
  %197 = add nsw i32 %195, %196
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %197)
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef @.str)
  br label %200

200:                                              ; preds = %191
  %201 = load i32, ptr %15, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %15, align 4, !tbaa !5
  br label %181, !llvm.loop !18

203:                                              ; preds = %190
  br label %204

204:                                              ; preds = %203, %100
  br label %205

205:                                              ; preds = %204, %52
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #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 = { 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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; 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 [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = shl nsw i32 %1, 2
  %.not98 = icmp sgt i32 %4, %0
  br i1 %.not98, label %tailrecurse._crit_edge, label %.preheader94.lr.ph

.preheader94.lr.ph:                               ; preds = %3
  %5 = icmp sgt i32 %1, 0
  %6 = shl nsw i32 %1, 1
  br label %.preheader94

.preheader94:                                     ; preds = %.preheader94.lr.ph, %tailrecurse
  %.tr83100 = phi i32 [ %2, %.preheader94.lr.ph ], [ %14, %tailrecurse ]
  %.tr99 = phi i32 [ %0, %.preheader94.lr.ph ], [ %13, %tailrecurse ]
  br i1 %5, label %.lr.ph, label %tailrecurse

.lr.ph:                                           ; preds = %.preheader94
  %7 = add nsw i32 %.tr83100, %1
  br label %8

.preheader93:                                     ; preds = %8
  br i1 %5, label %.lr.ph97, label %tailrecurse

8:                                                ; preds = %.lr.ph, %8
  %.07595 = phi i32 [ 0, %.lr.ph ], [ %12, %8 ]
  %9 = add nsw i32 %7, %.07595
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %9)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @.str)
  %12 = add nuw nsw i32 %.07595, 1
  %exitcond.not = icmp eq i32 %12, %1
  br i1 %exitcond.not, label %.preheader93, label %8, !llvm.loop !5

tailrecurse:                                      ; preds = %.lr.ph97, %.preheader94, %.preheader93
  %13 = sub nsw i32 %.tr99, %6
  %14 = add nsw i32 %.tr83100, %6
  %.not = icmp sgt i32 %4, %13
  br i1 %.not, label %tailrecurse._crit_edge, label %.preheader94

.lr.ph97:                                         ; preds = %.preheader93, %.lr.ph97
  %.07496 = phi i32 [ %18, %.lr.ph97 ], [ 0, %.preheader93 ]
  %15 = add nsw i32 %.07496, %.tr83100
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %15)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str)
  %18 = add nuw nsw i32 %.07496, 1
  %exitcond119.not = icmp eq i32 %18, %1
  br i1 %exitcond119.not, label %tailrecurse, label %.lr.ph97, !llvm.loop !7

tailrecurse._crit_edge:                           ; preds = %tailrecurse, %3
  %.tr.lcssa = phi i32 [ %0, %3 ], [ %13, %tailrecurse ]
  %.tr83.lcssa = phi i32 [ %2, %3 ], [ %14, %tailrecurse ]
  %19 = sub nsw i32 %4, %.tr.lcssa
  %.not81 = icmp slt i32 %19, %1
  br i1 %.not81, label %.preheader89, label %.preheader92

.preheader92:                                     ; preds = %tailrecurse._crit_edge
  %20 = icmp sgt i32 %.tr.lcssa, %1
  br i1 %20, label %.lr.ph104, label %.preheader90

.preheader89:                                     ; preds = %tailrecurse._crit_edge
  %21 = icmp sgt i32 %1, 0
  br i1 %21, label %.lr.ph108, label %.preheader88

.lr.ph108:                                        ; preds = %.preheader89
  %22 = add nsw i32 %.tr83.lcssa, %1
  br label %34

.preheader90:                                     ; preds = %.lr.ph104, %.preheader92
  %23 = icmp sgt i32 %1, 0
  br i1 %23, label %.lr.ph106, label %.loopexit

.lr.ph104:                                        ; preds = %.preheader92, %.lr.ph104
  %.073103 = phi i32 [ %27, %.lr.ph104 ], [ %1, %.preheader92 ]
  %24 = add nsw i32 %.073103, %.tr83.lcssa
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str)
  %27 = add i32 %.073103, 1
  %exitcond120.not = icmp eq i32 %27, %.tr.lcssa
  br i1 %exitcond120.not, label %.preheader90, label %.lr.ph104, !llvm.loop !8

.lr.ph106:                                        ; preds = %.preheader90, %.lr.ph106
  %.072105 = phi i32 [ %31, %.lr.ph106 ], [ 0, %.preheader90 ]
  %28 = add nsw i32 %.072105, %.tr83.lcssa
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %28)
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @.str)
  %31 = add nuw nsw i32 %.072105, 1
  %exitcond121.not = icmp eq i32 %31, %1
  br i1 %exitcond121.not, label %.loopexit, label %.lr.ph106, !llvm.loop !9

.preheader88:                                     ; preds = %34, %.preheader89
  %.neg = mul i32 %1, -3
  %32 = add i32 %.tr.lcssa, %.neg
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph110, label %.preheader87

34:                                               ; preds = %.lr.ph108, %34
  %.071107 = phi i32 [ 0, %.lr.ph108 ], [ %38, %34 ]
  %35 = add nsw i32 %22, %.071107
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %35)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str)
  %38 = add nuw nsw i32 %.071107, 1
  %exitcond122.not = icmp eq i32 %38, %1
  br i1 %exitcond122.not, label %.preheader88, label %34, !llvm.loop !10

.preheader87:                                     ; preds = %.lr.ph110, %.preheader88
  br i1 %21, label %.lr.ph112, label %.preheader86

.lr.ph112:                                        ; preds = %.preheader87
  %39 = sub i32 %.tr.lcssa, %1
  %40 = add i32 %39, %.tr83.lcssa
  br label %48

.lr.ph110:                                        ; preds = %.preheader88, %.lr.ph110
  %.070109 = phi i32 [ %44, %.lr.ph110 ], [ 0, %.preheader88 ]
  %41 = add nsw i32 %.070109, %.tr83.lcssa
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %41)
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @.str)
  %44 = add nuw nsw i32 %.070109, 1
  %exitcond123.not = icmp eq i32 %44, %32
  br i1 %exitcond123.not, label %.preheader87, label %.lr.ph110, !llvm.loop !11

.preheader86:                                     ; preds = %48, %.preheader87
  %45 = icmp sgt i32 %19, 0
  br i1 %45, label %.lr.ph114, label %.preheader

.lr.ph114:                                        ; preds = %.preheader86
  %46 = add nsw i32 %.tr83.lcssa, %1
  %47 = sub i32 %46, %19
  br label %56

48:                                               ; preds = %.lr.ph112, %48
  %.069111 = phi i32 [ 0, %.lr.ph112 ], [ %52, %48 ]
  %49 = add nsw i32 %40, %.069111
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %49)
  %51 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @.str)
  %52 = add nuw nsw i32 %.069111, 1
  %exitcond124.not = icmp eq i32 %52, %1
  br i1 %exitcond124.not, label %.preheader86, label %48, !llvm.loop !12

.preheader:                                       ; preds = %56, %.preheader86
  %53 = icmp slt i32 %19, %1
  br i1 %53, label %.lr.ph116, label %.loopexit

.lr.ph116:                                        ; preds = %.preheader
  %54 = shl nsw i32 %1, 1
  %55 = add nsw i32 %.tr83.lcssa, %54
  br label %61

56:                                               ; preds = %.lr.ph114, %56
  %.068113 = phi i32 [ 0, %.lr.ph114 ], [ %60, %56 ]
  %57 = add nsw i32 %47, %.068113
  %58 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %57)
  %59 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @.str)
  %60 = add nuw nsw i32 %.068113, 1
  %exitcond125.not = icmp eq i32 %60, %19
  br i1 %exitcond125.not, label %.preheader, label %56, !llvm.loop !13

61:                                               ; preds = %.lr.ph116, %61
  %.0115 = phi i32 [ 0, %.lr.ph116 ], [ %65, %61 ]
  %62 = add nsw i32 %55, %.0115
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %62)
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull @.str)
  %65 = add nuw nsw i32 %.0115, 1
  %exitcond126.not = icmp eq i32 %65, %32
  br i1 %exitcond126.not, label %.loopexit, label %61, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph106, %61, %.preheader90, %.preheader
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 = { "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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}


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