; LLVM IR from Saikat2407/DSA_Hacktoberfest2023 :: c++/Knapsack algorithms (Fractional_Knapsack)

; 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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%class.greedy = type { i32, float, float, float, float }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %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 %class.greedy, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  store float 0.000000e+00, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store float 0.000000e+00, ptr %5, align 4, !tbaa !5
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = call ptr @llvm.stacksave.p0()
  store ptr %22, ptr %6, align 8
  %23 = alloca %class.greedy, i64 %21, align 16
  store i64 %21, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %60, %0
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = load i32, ptr %2, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %24
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds %class.greedy, ptr %23, i64 %33
  %35 = getelementptr inbounds %class.greedy, ptr %34, i32 0, i32 0
  store i32 %31, ptr %35, align 4, !tbaa !11
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %class.greedy, ptr %23, i64 %37
  %39 = getelementptr inbounds %class.greedy, ptr %38, i32 0, i32 4
  store float 0.000000e+00, ptr %39, align 4, !tbaa !13
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %40, i32 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.3)
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %class.greedy, ptr %23, i64 %46
  %48 = getelementptr inbounds %class.greedy, ptr %47, i32 0, i32 1
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %50, i32 noundef %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef @.str.3)
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %class.greedy, ptr %23, i64 %56
  %58 = getelementptr inbounds %class.greedy, ptr %57, i32 0, i32 2
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %58)
  br label %60

60:                                               ; preds = %29
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %8, align 4, !tbaa !9
  br label %24, !llvm.loop !14

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

64:                                               ; preds = %73, %63
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %2, align 4, !tbaa !9
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %76

69:                                               ; preds = %64
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %class.greedy, ptr %23, i64 %71
  call void @_ZN6greedy5ratioEv(ptr noundef nonnull align 4 dereferenceable(20) %72)
  br label %73

73:                                               ; preds = %69
  %74 = load i32, ptr %9, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %9, align 4, !tbaa !9
  br label %64, !llvm.loop !16

76:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %125, %76
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = load i32, ptr %2, align 4, !tbaa !9
  %80 = sub nsw i32 %79, 1
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %77
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %128

83:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %121, %83
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = load i32, ptr %2, align 4, !tbaa !9
  %87 = sub nsw i32 %86, 1
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = sub nsw i32 %87, %88
  %90 = icmp slt i32 %85, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %84
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %124

92:                                               ; preds = %84
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %class.greedy, ptr %23, i64 %94
  %96 = getelementptr inbounds %class.greedy, ptr %95, i32 0, i32 3
  %97 = load float, ptr %96, align 4, !tbaa !17
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %class.greedy, ptr %23, i64 %100
  %102 = getelementptr inbounds %class.greedy, ptr %101, i32 0, i32 3
  %103 = load float, ptr %102, align 4, !tbaa !17
  %104 = fcmp olt float %97, %103
  br i1 %104, label %105, label %120

105:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 20, ptr %13) #9
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %class.greedy, ptr %23, i64 %107
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %108, i64 20, i1 false), !tbaa.struct !18
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %class.greedy, ptr %23, i64 %111
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %class.greedy, ptr %23, i64 %114
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %115, ptr align 4 %112, i64 20, i1 false), !tbaa.struct !18
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %class.greedy, ptr %23, i64 %118
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %119, ptr align 4 %13, i64 20, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 20, ptr %13) #9
  br label %120

120:                                              ; preds = %105, %92
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %12, align 4, !tbaa !9
  br label %84, !llvm.loop !19

124:                                              ; preds = %91
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %10, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %10, align 4, !tbaa !9
  br label %77, !llvm.loop !20

128:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %204, %128
  %130 = load float, ptr %4, align 4, !tbaa !5
  %131 = load float, ptr %3, align 4, !tbaa !5
  %132 = fcmp olt float %130, %131
  br i1 %132, label %133, label %207

133:                                              ; preds = %129
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds %class.greedy, ptr %23, i64 %135
  %137 = getelementptr inbounds %class.greedy, ptr %136, i32 0, i32 1
  %138 = load float, ptr %137, align 4, !tbaa !21
  %139 = load float, ptr %3, align 4, !tbaa !5
  %140 = load float, ptr %4, align 4, !tbaa !5
  %141 = fsub float %139, %140
  %142 = fcmp ole float %138, %141
  br i1 %142, label %143, label %162

143:                                              ; preds = %133
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds %class.greedy, ptr %23, i64 %145
  %147 = getelementptr inbounds %class.greedy, ptr %146, i32 0, i32 4
  store float 1.000000e+00, ptr %147, align 4, !tbaa !13
  %148 = load float, ptr %4, align 4, !tbaa !5
  %149 = load i32, ptr %14, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds %class.greedy, ptr %23, i64 %150
  %152 = getelementptr inbounds %class.greedy, ptr %151, i32 0, i32 1
  %153 = load float, ptr %152, align 4, !tbaa !21
  %154 = fadd float %148, %153
  store float %154, ptr %4, align 4, !tbaa !5
  %155 = load float, ptr %5, align 4, !tbaa !5
  %156 = load i32, ptr %14, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds %class.greedy, ptr %23, i64 %157
  %159 = getelementptr inbounds %class.greedy, ptr %158, i32 0, i32 2
  %160 = load float, ptr %159, align 4, !tbaa !22
  %161 = fadd float %155, %160
  store float %161, ptr %5, align 4, !tbaa !5
  br label %204

162:                                              ; preds = %133
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %class.greedy, ptr %23, i64 %164
  %166 = getelementptr inbounds %class.greedy, ptr %165, i32 0, i32 1
  %167 = load float, ptr %166, align 4, !tbaa !21
  %168 = load float, ptr %3, align 4, !tbaa !5
  %169 = load float, ptr %4, align 4, !tbaa !5
  %170 = fsub float %168, %169
  %171 = fcmp ogt float %167, %170
  br i1 %171, label %172, label %203

172:                                              ; preds = %162
  %173 = load float, ptr %3, align 4, !tbaa !5
  %174 = load float, ptr %4, align 4, !tbaa !5
  %175 = fsub float %173, %174
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds %class.greedy, ptr %23, i64 %177
  %179 = getelementptr inbounds %class.greedy, ptr %178, i32 0, i32 1
  %180 = load float, ptr %179, align 4, !tbaa !21
  %181 = fdiv float %175, %180
  %182 = load i32, ptr %14, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds %class.greedy, ptr %23, i64 %183
  %185 = getelementptr inbounds %class.greedy, ptr %184, i32 0, i32 4
  store float %181, ptr %185, align 4, !tbaa !13
  %186 = load float, ptr %4, align 4, !tbaa !5
  %187 = load float, ptr %3, align 4, !tbaa !5
  %188 = load float, ptr %4, align 4, !tbaa !5
  %189 = fsub float %187, %188
  %190 = fadd float %186, %189
  store float %190, ptr %4, align 4, !tbaa !5
  %191 = load float, ptr %5, align 4, !tbaa !5
  %192 = load i32, ptr %14, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds %class.greedy, ptr %23, i64 %193
  %195 = getelementptr inbounds %class.greedy, ptr %194, i32 0, i32 2
  %196 = load float, ptr %195, align 4, !tbaa !22
  %197 = load i32, ptr %14, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %class.greedy, ptr %23, i64 %198
  %200 = getelementptr inbounds %class.greedy, ptr %199, i32 0, i32 4
  %201 = load float, ptr %200, align 4, !tbaa !13
  %202 = call float @llvm.fmuladd.f32(float %196, float %201, float %191)
  store float %202, ptr %5, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %172, %162
  br label %204

204:                                              ; preds = %203, %143
  %205 = load i32, ptr %14, align 4, !tbaa !9
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %14, align 4, !tbaa !9
  br label %129, !llvm.loop !23

207:                                              ; preds = %129
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %208, ptr noundef @.str.6)
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef @.str.7)
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %210, ptr noundef @.str.8)
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %211, ptr noundef @.str.9)
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %212, ptr noundef @.str.10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %214

214:                                              ; preds = %255, %207
  %215 = load i32, ptr %15, align 4, !tbaa !9
  %216 = load i32, ptr %2, align 4, !tbaa !9
  %217 = icmp slt i32 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 16, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %258

219:                                              ; preds = %214
  %220 = load i32, ptr %15, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds %class.greedy, ptr %23, i64 %221
  %223 = getelementptr inbounds %class.greedy, ptr %222, i32 0, i32 0
  %224 = load i32, ptr %223, align 4, !tbaa !11
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %224)
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @.str.11)
  %227 = load i32, ptr %15, align 4, !tbaa !9
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds %class.greedy, ptr %23, i64 %228
  %230 = getelementptr inbounds %class.greedy, ptr %229, i32 0, i32 4
  %231 = load float, ptr %230, align 4, !tbaa !13
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %226, float noundef %231)
  %233 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %232, ptr noundef @.str.12)
  %234 = load i32, ptr %15, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds %class.greedy, ptr %23, i64 %235
  %237 = getelementptr inbounds %class.greedy, ptr %236, i32 0, i32 1
  %238 = load float, ptr %237, align 4, !tbaa !21
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, float noundef %238)
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef @.str.13)
  %241 = load i32, ptr %15, align 4, !tbaa !9
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds %class.greedy, ptr %23, i64 %242
  %244 = getelementptr inbounds %class.greedy, ptr %243, i32 0, i32 2
  %245 = load float, ptr %244, align 4, !tbaa !22
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, float noundef %245)
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %246, ptr noundef @.str.13)
  %248 = load i32, ptr %15, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds %class.greedy, ptr %23, i64 %249
  %251 = getelementptr inbounds %class.greedy, ptr %250, i32 0, i32 3
  %252 = load float, ptr %251, align 4, !tbaa !17
  %253 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, float noundef %252)
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %253, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %255

255:                                              ; preds = %219
  %256 = load i32, ptr %15, align 4, !tbaa !9
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %15, align 4, !tbaa !9
  br label %214, !llvm.loop !24

258:                                              ; preds = %218
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef @.str.14)
  %261 = load float, ptr %5, align 4, !tbaa !5
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %260, float noundef %261)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  %263 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %263)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %264 = load i32, ptr %1, align 4
  ret i32 %264
}

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

; 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(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6greedy5ratioEv(ptr noundef nonnull align 4 dereferenceable(20)) #6 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) #4 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) #4 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)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS6greedy", !10, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16}
!13 = !{!12, !6, i64 16}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!12, !6, i64 12}
!18 = !{i64 0, i64 4, !9, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5, i64 16, i64 4, !5}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = !{!12, !6, i64 4}
!22 = !{!12, !6, i64 8}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}


; 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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%class.greedy = type { i32, float, float, float, float }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca float, align 4
  %3 = alloca %class.greedy, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  %4 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %6 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = zext i32 %8 to i64
  %10 = call ptr @llvm.stacksave.p0()
  %11 = alloca %class.greedy, i64 %9, align 16
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %.preheader

.preheader64:                                     ; preds = %.lr.ph
  %14 = icmp sgt i32 %28, 0
  br i1 %14, label %.lr.ph67, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = getelementptr inbounds %class.greedy, ptr %11, i64 %indvars.iv
  %16 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %16, ptr %15, align 4, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %15, i64 16
  store float 0.000000e+00, ptr %17, align 4, !tbaa !12
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %16)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str.3)
  %21 = getelementptr inbounds i8, ptr %15, i64 4
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef %16)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.3)
  %26 = getelementptr inbounds i8, ptr %15, i64 8
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %.lr.ph, label %.preheader64, !llvm.loop !13

.preheader63:                                     ; preds = %.lr.ph67
  %31 = add i32 %34, -1
  %32 = icmp sgt i32 %34, 1
  br i1 %32, label %.preheader62, label %.preheader

.lr.ph67:                                         ; preds = %.preheader64, %.lr.ph67
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph67 ], [ 0, %.preheader64 ]
  %33 = getelementptr inbounds %class.greedy, ptr %11, i64 %indvars.iv83
  call void @_ZN6greedy5ratioEv(ptr noundef nonnull align 4 dereferenceable(20) %33)
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next84, %35
  br i1 %36, label %.lr.ph67, label %.preheader63, !llvm.loop !15

.preheader62:                                     ; preds = %.preheader63, %._crit_edge
  %indvars.iv89 = phi i32 [ %indvars.iv.next90, %._crit_edge ], [ %31, %.preheader63 ]
  %.05370 = phi i32 [ %41, %._crit_edge ], [ 0, %.preheader63 ]
  %37 = sub nsw i32 %.05370, %34
  %38 = icmp slt i32 %37, -1
  br i1 %38, label %.lr.ph69.preheader, label %._crit_edge

.lr.ph69.preheader:                               ; preds = %.preheader62
  %wide.trip.count = zext i32 %indvars.iv89 to i64
  br label %.lr.ph69

.preheader:                                       ; preds = %._crit_edge, %0, %.preheader64, %.preheader63
  %39 = load float, ptr %2, align 4, !tbaa !16
  %40 = fcmp ogt float %39, 0.000000e+00
  br i1 %40, label %.lr.ph74, label %._crit_edge75

._crit_edge:                                      ; preds = %50, %.preheader62
  %41 = add nuw nsw i32 %.05370, 1
  %indvars.iv.next90 = add i32 %indvars.iv89, -1
  %exitcond91.not = icmp eq i32 %41, %31
  br i1 %exitcond91.not, label %.preheader, label %.preheader62, !llvm.loop !17

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %50
  %indvars.iv86 = phi i64 [ 0, %.lr.ph69.preheader ], [ %indvars.iv.next87, %50 ]
  %42 = getelementptr inbounds %class.greedy, ptr %11, i64 %indvars.iv86
  %43 = getelementptr inbounds i8, ptr %42, i64 12
  %44 = load float, ptr %43, align 4, !tbaa !18
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %45 = getelementptr inbounds %class.greedy, ptr %11, i64 %indvars.iv.next87
  %46 = getelementptr inbounds i8, ptr %45, i64 12
  %47 = load float, ptr %46, align 4, !tbaa !18
  %48 = fcmp olt float %44, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %.lr.ph69
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %3)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %3, ptr noundef nonnull align 4 dereferenceable(20) %42, i64 20, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %42, ptr noundef nonnull align 4 dereferenceable(20) %45, i64 20, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %45, ptr noundef nonnull align 4 dereferenceable(20) %3, i64 20, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %3)
  br label %50

50:                                               ; preds = %.lr.ph69, %49
  %exitcond.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph69, !llvm.loop !20

.lr.ph74:                                         ; preds = %.preheader, %71
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %71 ], [ 0, %.preheader ]
  %.05672 = phi float [ %.1, %71 ], [ 0.000000e+00, %.preheader ]
  %.05771 = phi float [ %.158, %71 ], [ 0.000000e+00, %.preheader ]
  %51 = getelementptr inbounds %class.greedy, ptr %11, i64 %indvars.iv92
  %52 = getelementptr inbounds i8, ptr %51, i64 4
  %53 = load float, ptr %52, align 4, !tbaa !21
  %54 = fsub float %39, %.05672
  %55 = fcmp ugt float %53, %54
  br i1 %55, label %62, label %56

56:                                               ; preds = %.lr.ph74
  %57 = getelementptr inbounds i8, ptr %51, i64 16
  store float 1.000000e+00, ptr %57, align 4, !tbaa !12
  %58 = fadd float %.05672, %53
  %59 = getelementptr inbounds i8, ptr %51, i64 8
  %60 = load float, ptr %59, align 4, !tbaa !22
  %61 = fadd float %.05771, %60
  br label %71

62:                                               ; preds = %.lr.ph74
  %63 = fcmp ogt float %53, %54
  br i1 %63, label %64, label %71

64:                                               ; preds = %62
  %65 = fdiv float %54, %53
  %66 = getelementptr inbounds i8, ptr %51, i64 16
  store float %65, ptr %66, align 4, !tbaa !12
  %67 = fadd float %.05672, %54
  %68 = getelementptr inbounds i8, ptr %51, i64 8
  %69 = load float, ptr %68, align 4, !tbaa !22
  %70 = call float @llvm.fmuladd.f32(float %69, float %65, float %.05771)
  br label %71

71:                                               ; preds = %62, %64, %56
  %.158 = phi float [ %61, %56 ], [ %70, %64 ], [ %.05771, %62 ]
  %.1 = phi float [ %58, %56 ], [ %67, %64 ], [ %.05672, %62 ]
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %72 = fcmp olt float %.1, %39
  br i1 %72, label %.lr.ph74, label %._crit_edge75, !llvm.loop !23

._crit_edge75:                                    ; preds = %71, %.preheader
  %.057.lcssa = phi float [ 0.000000e+00, %.preheader ], [ %.158, %71 ]
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @.str.6)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @.str.7)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @.str.8)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull @.str.9)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.10)
  %79 = load i32, ptr %1, align 4, !tbaa !5
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph79, label %._crit_edge80

._crit_edge80:                                    ; preds = %.lr.ph79, %._crit_edge75
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull @.str.14)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %82, float noundef %.057.lcssa)
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret i32 0

.lr.ph79:                                         ; preds = %._crit_edge75, %.lr.ph79
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph79 ], [ 0, %._crit_edge75 ]
  %84 = getelementptr inbounds %class.greedy, ptr %11, i64 %indvars.iv95
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %85)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull @.str.11)
  %88 = getelementptr inbounds i8, ptr %84, i64 16
  %89 = load float, ptr %88, align 4, !tbaa !12
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %87, float noundef %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str.12)
  %92 = getelementptr inbounds i8, ptr %84, i64 4
  %93 = load float, ptr %92, align 4, !tbaa !21
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, float noundef %93)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull @.str.13)
  %96 = getelementptr inbounds i8, ptr %84, i64 8
  %97 = load float, ptr %96, align 4, !tbaa !22
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, float noundef %97)
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @.str.13)
  %100 = getelementptr inbounds i8, ptr %84, i64 12
  %101 = load float, ptr %100, align 4, !tbaa !18
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, float noundef %101)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %104 = load i32, ptr %1, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next96, %105
  br i1 %106, label %.lr.ph79, label %._crit_edge80, !llvm.loop !24
}

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

; 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 #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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERf(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6greedy5ratioEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) local_unnamed_addr #4 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 #4 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)) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 = !{!10, !6, i64 0}
!10 = !{!"_ZTS6greedy", !6, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!11 = !{!"float", !7, i64 0}
!12 = !{!10, !11, i64 16}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !14}
!18 = !{!10, !11, i64 12}
!19 = !{i64 0, i64 4, !5, i64 4, i64 4, !16, i64 8, i64 4, !16, i64 12, i64 4, !16, i64 16, i64 4, !16}
!20 = distinct !{!20, !14}
!21 = !{!10, !11, i64 4}
!22 = !{!10, !11, i64 8}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}


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