; LLVM IR from ShahjalalShohag/code-library :: Math (Simplex Algorithm)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@a = external dso_local global [510 x i64], align 16
@dis = external dso_local global [510 x [510 x i64]], align 16
@g = external dso_local global [510 x %"class.std::vector"], align 16
@cost = external dso_local global [510 x %"class.std::vector"], align 16
@ok = external dso_local global [510 x [510 x i8]], align 16
@obj = external dso_local global [510 x x86_fp80], align 16
@cons = external dso_local global [510 x x86_fp80], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %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 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
  %16 = alloca x86_fp80, align 16
  %17 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %37, %0
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = load i64, ptr @n, align 8, !tbaa !5
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %40

26:                                               ; preds = %20
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %28
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = load i64, ptr %2, align 8, !tbaa !5
  %36 = add nsw i64 %35, %34
  store i64 %36, ptr %2, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %26
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %3, align 4, !tbaa !9
  br label %20, !llvm.loop !11

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

41:                                               ; preds = %63, %40
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = load i64, ptr @n, align 8, !tbaa !5
  %45 = icmp slt i64 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %66

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %51 = load i64, ptr %5, align 8, !tbaa !5
  %52 = add nsw i64 %51, -1
  store i64 %52, ptr %5, align 8, !tbaa !5
  %53 = load i64, ptr %6, align 8, !tbaa !5
  %54 = add nsw i64 %53, -1
  store i64 %54, ptr %6, align 8, !tbaa !5
  %55 = load i64, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %55
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %57 = load i64, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %57
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %59 = load i64, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds [510 x %"class.std::vector"], ptr @cost, i64 0, i64 %59
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %61 = load i64, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds [510 x %"class.std::vector"], ptr @cost, i64 0, i64 %61
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %63

63:                                               ; preds = %47
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %4, align 4, !tbaa !9
  br label %41, !llvm.loop !13

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

67:                                               ; preds = %78, %66
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = load i64, ptr @n, align 8, !tbaa !5
  %71 = icmp slt i64 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %81

73:                                               ; preds = %67
  %74 = load i32, ptr %8, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  call void @_Z3dfsxxxx(i64 noundef %75, i64 noundef -1, i64 noundef 0, i64 noundef %77)
  br label %78

78:                                               ; preds = %73
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %8, align 4, !tbaa !9
  br label %67, !llvm.loop !14

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

82:                                               ; preds = %117, %81
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = load i64, ptr @n, align 8, !tbaa !5
  %86 = icmp slt i64 %84, %85
  br i1 %86, label %88, label %87

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

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

89:                                               ; preds = %113, %88
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = load i64, ptr @n, align 8, !tbaa !5
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %95, label %94

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

95:                                               ; preds = %89
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [510 x [510 x i64]], ptr @dis, i64 0, i64 %97
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [510 x i64], ptr %98, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !5
  %103 = load i64, ptr @k, align 8, !tbaa !5
  %104 = icmp sle i64 %102, %103
  br i1 %104, label %105, label %112

105:                                              ; preds = %95
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %107
  %109 = load i32, ptr %11, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [510 x i8], ptr %108, i64 0, i64 %110
  store i8 1, ptr %111, align 1, !tbaa !15
  br label %112

112:                                              ; preds = %105, %95
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %11, align 4, !tbaa !9
  br label %89, !llvm.loop !17

116:                                              ; preds = %94
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %9, align 4, !tbaa !9
  br label %82, !llvm.loop !18

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

121:                                              ; preds = %137, %120
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = load i64, ptr @n, align 8, !tbaa !5
  %125 = icmp slt i64 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %121
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %140

127:                                              ; preds = %121
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !5
  %132 = sitofp i64 %131 to x86_fp80
  %133 = fsub x86_fp80 0xK3FFF8000000000000000, %132
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [510 x x86_fp80], ptr @obj, i64 0, i64 %135
  store x86_fp80 %133, ptr %136, align 16, !tbaa !19
  br label %137

137:                                              ; preds = %127
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !9
  br label %121, !llvm.loop !21

140:                                              ; preds = %126
  %141 = load i64, ptr @n, align 8, !tbaa !5
  %142 = trunc i64 %141 to i32
  call void @_ZN2lp4initEiPei(i32 noundef %142, ptr noundef @obj, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %143

143:                                              ; preds = %153, %140
  %144 = load i32, ptr %13, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = load i64, ptr @n, align 8, !tbaa !5
  %147 = icmp slt i64 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %143
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %156

149:                                              ; preds = %143
  %150 = load i32, ptr %13, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %151
  store x86_fp80 0xK3FFF8000000000000000, ptr %152, align 16, !tbaa !19
  br label %153

153:                                              ; preds = %149
  %154 = load i32, ptr %13, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %13, align 4, !tbaa !9
  br label %143, !llvm.loop !22

156:                                              ; preds = %148
  %157 = load i64, ptr %2, align 8, !tbaa !5
  %158 = sitofp i64 %157 to x86_fp80
  call void @_ZN2lp14add_constraintEPeei(ptr noundef @cons, x86_fp80 noundef %158, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %159

159:                                              ; preds = %189, %156
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = load i64, ptr @n, align 8, !tbaa !5
  %163 = icmp slt i64 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %159
  store i32 23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %192

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

166:                                              ; preds = %185, %165
  %167 = load i32, ptr %15, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = load i64, ptr @n, align 8, !tbaa !5
  %170 = icmp slt i64 %168, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %166
  store i32 26, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %188

172:                                              ; preds = %166
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %174
  %176 = load i32, ptr %15, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [510 x i8], ptr %175, i64 0, i64 %177
  %179 = load i8, ptr %178, align 1, !tbaa !15, !range !23, !noundef !24
  %180 = trunc i8 %179 to i1
  %181 = uitofp i1 %180 to x86_fp80
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %183
  store x86_fp80 %181, ptr %184, align 16, !tbaa !19
  br label %185

185:                                              ; preds = %172
  %186 = load i32, ptr %15, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %15, align 4, !tbaa !9
  br label %166, !llvm.loop !25

188:                                              ; preds = %171
  call void @_ZN2lp14add_constraintEPeei(ptr noundef @cons, x86_fp80 noundef 0xK3FFF8000000000000000, i32 noundef 1)
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %14, align 4, !tbaa !9
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %14, align 4, !tbaa !9
  br label %159, !llvm.loop !26

192:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %193 = call noundef x86_fp80 @_ZN2lp5solveEv()
  store x86_fp80 %193, ptr %16, align 16, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %194 = load x86_fp80, ptr %16, align 16, !tbaa !19
  %195 = call noundef x86_fp80 @_ZSt5rounde(x86_fp80 noundef %194)
  %196 = fptosi x86_fp80 %195 to i64
  store i64 %196, ptr %17, align 8, !tbaa !5
  %197 = load i64, ptr %17, align 8, !tbaa !5
  %198 = icmp slt i64 %197, 0
  br i1 %198, label %199, label %200

199:                                              ; preds = %192
  store i64 -1, ptr %17, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %199, %192
  %201 = load i64, ptr %17, align 8, !tbaa !5
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %201)
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %202, i8 noundef signext 10)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %204 = load i32, ptr %1, align 4
  ret i32 %204
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2lp4initEiPei(i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2lp14add_constraintEPeei(ptr noundef, x86_fp80 noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZN2lp5solveEv() #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt5rounde(x86_fp80 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!20, !20, i64 0}
!20 = !{!"long double", !7, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@a = external dso_local global [510 x i64], align 16
@dis = external dso_local local_unnamed_addr global [510 x [510 x i64]], align 16
@g = external dso_local global [510 x %"class.std::vector"], align 16
@cost = external dso_local global [510 x %"class.std::vector"], align 16
@ok = external dso_local local_unnamed_addr global [510 x [510 x i8]], align 16
@obj = external dso_local global [510 x x86_fp80], align 16
@cons = external dso_local global [510 x x86_fp80], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

; 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) @k)
  %6 = load i64, ptr @n, align 8, !tbaa !5
  %7 = icmp sgt i64 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.preheader59:                                     ; preds = %.lr.ph
  %8 = sitofp i64 %13 to x86_fp80
  %9 = icmp sgt i64 %14, 1
  br i1 %9, label %.lr.ph63, label %.preheader58

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %.061 = phi i64 [ %13, %.lr.ph ], [ 0, %0 ]
  %10 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %indvars.iv
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %12 = load i64, ptr %10, align 8, !tbaa !5
  %13 = add nsw i64 %12, %.061
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i64, ptr @n, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, %indvars.iv.next
  br i1 %15, label %.lr.ph, label %.preheader59, !llvm.loop !9

.preheader58:                                     ; preds = %.lr.ph63, %.preheader59
  %16 = phi i64 [ %14, %.preheader59 ], [ %32, %.lr.ph63 ]
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph65, label %._crit_edge

.lr.ph63:                                         ; preds = %.preheader59, %.lr.ph63
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph63 ], [ 1, %.preheader59 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = add nsw i64 %21, -1
  store i64 %22, ptr %1, align 8, !tbaa !5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = add nsw i64 %23, -1
  store i64 %24, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %22
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %26
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %29 = getelementptr inbounds [510 x %"class.std::vector"], ptr @cost, i64 0, i64 %28
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %30 = load i64, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds [510 x %"class.std::vector"], ptr @cost, i64 0, i64 %30
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %32 = load i64, ptr @n, align 8, !tbaa !5
  %33 = icmp sgt i64 %32, %indvars.iv.next85
  br i1 %33, label %.lr.ph63, label %.preheader58, !llvm.loop !11

.preheader57:                                     ; preds = %.lr.ph65
  %34 = icmp sgt i64 %52, 0
  br i1 %34, label %.preheader56.lr.ph, label %._crit_edge

.preheader56.lr.ph:                               ; preds = %.preheader57
  %35 = load i64, ptr @k, align 8
  %36 = add nsw i64 %52, -1
  %xtraiter = and i64 %52, 1
  %37 = icmp eq i64 %36, 0
  %unroll_iter = and i64 %52, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader56.us

.preheader56.us:                                  ; preds = %._crit_edge.us, %.preheader56.lr.ph
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %._crit_edge.us ], [ 0, %.preheader56.lr.ph ]
  br i1 %37, label %._crit_edge.us.unr-lcssa, label %.preheader56.us.new

.preheader56.us.new:                              ; preds = %.preheader56.us, %47
  %indvars.iv90 = phi i64 [ %indvars.iv.next91.1, %47 ], [ 0, %.preheader56.us ]
  %niter = phi i64 [ %niter.next.1, %47 ], [ 0, %.preheader56.us ]
  %38 = getelementptr inbounds [510 x [510 x i64]], ptr @dis, i64 0, i64 %indvars.iv93, i64 %indvars.iv90
  %39 = load i64, ptr %38, align 16, !tbaa !5
  %.not.us = icmp sgt i64 %39, %35
  br i1 %.not.us, label %42, label %40

40:                                               ; preds = %.preheader56.us.new
  %41 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %indvars.iv93, i64 %indvars.iv90
  store i8 1, ptr %41, align 2, !tbaa !12
  br label %42

42:                                               ; preds = %40, %.preheader56.us.new
  %indvars.iv.next91 = or disjoint i64 %indvars.iv90, 1
  %43 = getelementptr inbounds [510 x [510 x i64]], ptr @dis, i64 0, i64 %indvars.iv93, i64 %indvars.iv.next91
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %.not.us.1 = icmp sgt i64 %44, %35
  br i1 %.not.us.1, label %47, label %45

45:                                               ; preds = %42
  %46 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %indvars.iv93, i64 %indvars.iv.next91
  store i8 1, ptr %46, align 1, !tbaa !12
  br label %47

47:                                               ; preds = %45, %42
  %indvars.iv.next91.1 = add nuw nsw i64 %indvars.iv90, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader56.us.new, !llvm.loop !14

._crit_edge.us.unr-lcssa:                         ; preds = %47, %.preheader56.us
  %indvars.iv90.unr = phi i64 [ 0, %.preheader56.us ], [ %indvars.iv.next91.1, %47 ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa
  %48 = getelementptr inbounds [510 x [510 x i64]], ptr @dis, i64 0, i64 %indvars.iv93, i64 %indvars.iv90.unr
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %.not.us.epil = icmp sgt i64 %49, %35
  br i1 %.not.us.epil, label %._crit_edge.us, label %50

50:                                               ; preds = %.epil.preheader
  %51 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %indvars.iv93, i64 %indvars.iv90.unr
  store i8 1, ptr %51, align 1, !tbaa !12
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.epil.preheader, %50, %._crit_edge.us.unr-lcssa
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next94, %52
  br i1 %exitcond96.not, label %.preheader55, label %.preheader56.us, !llvm.loop !15

.lr.ph65:                                         ; preds = %.preheader58, %.lr.ph65
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.lr.ph65 ], [ 0, %.preheader58 ]
  call void @_Z3dfsxxxx(i64 noundef %indvars.iv87, i64 noundef -1, i64 noundef 0, i64 noundef %indvars.iv87)
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %52 = load i64, ptr @n, align 8, !tbaa !5
  %53 = icmp sgt i64 %52, %indvars.iv.next88
  br i1 %53, label %.lr.ph65, label %.preheader57, !llvm.loop !16

.preheader55:                                     ; preds = %._crit_edge.us
  br i1 %34, label %.lr.ph71.preheader, label %._crit_edge

.lr.ph71.preheader:                               ; preds = %.preheader55
  %xtraiter135 = and i64 %52, 1
  %54 = icmp eq i64 %36, 0
  br i1 %54, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph71.preheader.new

.lr.ph71.preheader.new:                           ; preds = %.lr.ph71.preheader
  %unroll_iter137 = and i64 %52, 9223372036854775806
  br label %.lr.ph71

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph71, %.lr.ph71.preheader
  %indvars.iv97.unr = phi i64 [ 0, %.lr.ph71.preheader ], [ %indvars.iv.next98.1, %.lr.ph71 ]
  %lcmp.mod136.not = icmp eq i64 %xtraiter135, 0
  br i1 %lcmp.mod136.not, label %._crit_edge, label %.lr.ph71.epil

.lr.ph71.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %55 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %indvars.iv97.unr
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = sitofp i64 %56 to x86_fp80
  %58 = fsub x86_fp80 0xK3FFF8000000000000000, %57
  %59 = getelementptr inbounds [510 x x86_fp80], ptr @obj, i64 0, i64 %indvars.iv97.unr
  store x86_fp80 %58, ptr %59, align 16, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph71.epil, %._crit_edge.loopexit.unr-lcssa, %.preheader57, %0, %.preheader58, %.preheader55
  %.0.lcssa113115118123 = phi x86_fp80 [ %8, %.preheader55 ], [ %8, %.preheader58 ], [ 0xK00000000000000000000, %0 ], [ %8, %.preheader57 ], [ %8, %._crit_edge.loopexit.unr-lcssa ], [ %8, %.lr.ph71.epil ]
  %.lcssa119122 = phi i64 [ %52, %.preheader55 ], [ %16, %.preheader58 ], [ %6, %0 ], [ %52, %.preheader57 ], [ %52, %._crit_edge.loopexit.unr-lcssa ], [ %52, %.lr.ph71.epil ]
  %60 = trunc i64 %.lcssa119122 to i32
  call void @_ZN2lp4initEiPei(i32 noundef %60, ptr noundef nonnull @obj, i32 noundef -1)
  %61 = load i64, ptr @n, align 8, !tbaa !5
  %62 = icmp sgt i64 %61, 0
  br i1 %62, label %.lr.ph74.preheader, label %._crit_edge75

.lr.ph74.preheader:                               ; preds = %._crit_edge
  %xtraiter139 = and i64 %61, 3
  %63 = icmp ult i64 %61, 4
  br i1 %63, label %._crit_edge75.loopexit.unr-lcssa, label %.lr.ph74.preheader.new

.lr.ph74.preheader.new:                           ; preds = %.lr.ph74.preheader
  %unroll_iter141 = and i64 %61, 9223372036854775804
  br label %.lr.ph74

.lr.ph71:                                         ; preds = %.lr.ph71, %.lr.ph71.preheader.new
  %indvars.iv97 = phi i64 [ 0, %.lr.ph71.preheader.new ], [ %indvars.iv.next98.1, %.lr.ph71 ]
  %niter138 = phi i64 [ 0, %.lr.ph71.preheader.new ], [ %niter138.next.1, %.lr.ph71 ]
  %64 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %indvars.iv97
  %65 = load i64, ptr %64, align 16, !tbaa !5
  %66 = sitofp i64 %65 to x86_fp80
  %67 = fsub x86_fp80 0xK3FFF8000000000000000, %66
  %68 = getelementptr inbounds [510 x x86_fp80], ptr @obj, i64 0, i64 %indvars.iv97
  store x86_fp80 %67, ptr %68, align 16, !tbaa !17
  %indvars.iv.next98 = or disjoint i64 %indvars.iv97, 1
  %69 = getelementptr inbounds [510 x i64], ptr @a, i64 0, i64 %indvars.iv.next98
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = sitofp i64 %70 to x86_fp80
  %72 = fsub x86_fp80 0xK3FFF8000000000000000, %71
  %73 = getelementptr inbounds [510 x x86_fp80], ptr @obj, i64 0, i64 %indvars.iv.next98
  store x86_fp80 %72, ptr %73, align 16, !tbaa !17
  %indvars.iv.next98.1 = add nuw nsw i64 %indvars.iv97, 2
  %niter138.next.1 = add i64 %niter138, 2
  %niter138.ncmp.1 = icmp eq i64 %niter138.next.1, %unroll_iter137
  br i1 %niter138.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph71, !llvm.loop !19

._crit_edge75.loopexit.unr-lcssa:                 ; preds = %.lr.ph74, %.lr.ph74.preheader
  %indvars.iv101.unr = phi i64 [ 0, %.lr.ph74.preheader ], [ %indvars.iv.next102.3, %.lr.ph74 ]
  %lcmp.mod140.not = icmp eq i64 %xtraiter139, 0
  br i1 %lcmp.mod140.not, label %._crit_edge75, label %.lr.ph74.epil

.lr.ph74.epil:                                    ; preds = %._crit_edge75.loopexit.unr-lcssa, %.lr.ph74.epil
  %indvars.iv101.epil = phi i64 [ %indvars.iv.next102.epil, %.lr.ph74.epil ], [ %indvars.iv101.unr, %._crit_edge75.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph74.epil ], [ 0, %._crit_edge75.loopexit.unr-lcssa ]
  %74 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv101.epil
  store x86_fp80 0xK3FFF8000000000000000, ptr %74, align 16, !tbaa !17
  %indvars.iv.next102.epil = add nuw nsw i64 %indvars.iv101.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter139
  br i1 %epil.iter.cmp.not, label %._crit_edge75, label %.lr.ph74.epil, !llvm.loop !20

._crit_edge75:                                    ; preds = %._crit_edge75.loopexit.unr-lcssa, %.lr.ph74.epil, %._crit_edge
  call void @_ZN2lp14add_constraintEPeei(ptr noundef nonnull @cons, x86_fp80 noundef %.0.lcssa113115118123, i32 noundef 0)
  %75 = load i64, ptr @n, align 8, !tbaa !5
  %76 = icmp sgt i64 %75, 0
  br i1 %76, label %.preheader, label %._crit_edge80

.lr.ph74:                                         ; preds = %.lr.ph74, %.lr.ph74.preheader.new
  %indvars.iv101 = phi i64 [ 0, %.lr.ph74.preheader.new ], [ %indvars.iv.next102.3, %.lr.ph74 ]
  %niter142 = phi i64 [ 0, %.lr.ph74.preheader.new ], [ %niter142.next.3, %.lr.ph74 ]
  %77 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv101
  store x86_fp80 0xK3FFF8000000000000000, ptr %77, align 16, !tbaa !17
  %indvars.iv.next102 = or disjoint i64 %indvars.iv101, 1
  %78 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv.next102
  store x86_fp80 0xK3FFF8000000000000000, ptr %78, align 16, !tbaa !17
  %indvars.iv.next102.1 = or disjoint i64 %indvars.iv101, 2
  %79 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv.next102.1
  store x86_fp80 0xK3FFF8000000000000000, ptr %79, align 16, !tbaa !17
  %indvars.iv.next102.2 = or disjoint i64 %indvars.iv101, 3
  %80 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv.next102.2
  store x86_fp80 0xK3FFF8000000000000000, ptr %80, align 16, !tbaa !17
  %indvars.iv.next102.3 = add nuw nsw i64 %indvars.iv101, 4
  %niter142.next.3 = add i64 %niter142, 4
  %niter142.ncmp.3 = icmp eq i64 %niter142.next.3, %unroll_iter141
  br i1 %niter142.ncmp.3, label %._crit_edge75.loopexit.unr-lcssa, label %.lr.ph74, !llvm.loop !22

.preheader:                                       ; preds = %._crit_edge75, %._crit_edge78
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %._crit_edge78 ], [ 0, %._crit_edge75 ]
  %81 = phi i64 [ %93, %._crit_edge78 ], [ %75, %._crit_edge75 ]
  %.not = icmp eq i64 %81, 0
  br i1 %.not, label %._crit_edge78, label %.lr.ph77.preheader

.lr.ph77.preheader:                               ; preds = %.preheader
  %xtraiter143 = and i64 %81, 1
  %82 = icmp eq i64 %81, 1
  br i1 %82, label %._crit_edge78.loopexit.unr-lcssa, label %.lr.ph77.preheader.new

.lr.ph77.preheader.new:                           ; preds = %.lr.ph77.preheader
  %unroll_iter146 = and i64 %81, -2
  br label %.lr.ph77

._crit_edge80:                                    ; preds = %._crit_edge78, %._crit_edge75
  %83 = call noundef x86_fp80 @_ZN2lp5solveEv()
  %84 = call noundef x86_fp80 @_ZSt5rounde(x86_fp80 noundef %83)
  %85 = fptosi x86_fp80 %84 to i64
  %spec.store.select = call i64 @llvm.smax.i64(i64 %85, i64 -1)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %spec.store.select)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %86, i8 noundef signext 10)
  ret i32 0

._crit_edge78.loopexit.unr-lcssa:                 ; preds = %.lr.ph77, %.lr.ph77.preheader
  %indvars.iv105.unr = phi i64 [ 0, %.lr.ph77.preheader ], [ %indvars.iv.next106.1, %.lr.ph77 ]
  %lcmp.mod145.not = icmp eq i64 %xtraiter143, 0
  br i1 %lcmp.mod145.not, label %._crit_edge78, label %.lr.ph77.epil

.lr.ph77.epil:                                    ; preds = %._crit_edge78.loopexit.unr-lcssa
  %88 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %indvars.iv109, i64 %indvars.iv105.unr
  %89 = load i8, ptr %88, align 1, !tbaa !12, !range !23, !noundef !24
  %90 = trunc nuw i8 %89 to i1
  %91 = uitofp i1 %90 to x86_fp80
  %92 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv105.unr
  store x86_fp80 %91, ptr %92, align 16, !tbaa !17
  br label %._crit_edge78

._crit_edge78:                                    ; preds = %.lr.ph77.epil, %._crit_edge78.loopexit.unr-lcssa, %.preheader
  call void @_ZN2lp14add_constraintEPeei(ptr noundef nonnull @cons, x86_fp80 noundef 0xK3FFF8000000000000000, i32 noundef 1)
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %93 = load i64, ptr @n, align 8, !tbaa !5
  %94 = icmp sgt i64 %93, %indvars.iv.next110
  br i1 %94, label %.preheader, label %._crit_edge80, !llvm.loop !25

.lr.ph77:                                         ; preds = %.lr.ph77, %.lr.ph77.preheader.new
  %indvars.iv105 = phi i64 [ 0, %.lr.ph77.preheader.new ], [ %indvars.iv.next106.1, %.lr.ph77 ]
  %niter147 = phi i64 [ 0, %.lr.ph77.preheader.new ], [ %niter147.next.1, %.lr.ph77 ]
  %95 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %indvars.iv109, i64 %indvars.iv105
  %96 = load i8, ptr %95, align 2, !tbaa !12, !range !23, !noundef !24
  %97 = trunc nuw i8 %96 to i1
  %98 = uitofp i1 %97 to x86_fp80
  %99 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv105
  store x86_fp80 %98, ptr %99, align 16, !tbaa !17
  %indvars.iv.next106 = or disjoint i64 %indvars.iv105, 1
  %100 = getelementptr inbounds [510 x [510 x i8]], ptr @ok, i64 0, i64 %indvars.iv109, i64 %indvars.iv.next106
  %101 = load i8, ptr %100, align 1, !tbaa !12, !range !23, !noundef !24
  %102 = trunc nuw i8 %101 to i1
  %103 = uitofp i1 %102 to x86_fp80
  %104 = getelementptr inbounds [510 x x86_fp80], ptr @cons, i64 0, i64 %indvars.iv.next106
  store x86_fp80 %103, ptr %104, align 16, !tbaa !17
  %indvars.iv.next106.1 = add nuw nsw i64 %indvars.iv105, 2
  %niter147.next.1 = add i64 %niter147, 2
  %niter147.ncmp.1 = icmp eq i64 %niter147.next.1, %unroll_iter146
  br i1 %niter147.ncmp.1, label %._crit_edge78.loopexit.unr-lcssa, label %.lr.ph77, !llvm.loop !26
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2lp4initEiPei(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2lp14add_constraintEPeei(ptr noundef, x86_fp80 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZN2lp5solveEv() local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt5rounde(x86_fp80 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #6

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !18, i64 0}
!18 = !{!"long double", !7, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !10}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


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