; LLVM IR from abeaumont/competitive-programming :: codechef/aug18a/inmat.ll (Z2ccv)

; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }
%"class.std::tuple.2" = type { %"struct.std::_Tuple_impl.3" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"struct.std::_Head_base.6" = type { ptr }

@n = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@r = external dso_local global [1000 x i32], align 16
@c = external dso_local global [1000 x i32], align 16
@c0 = external dso_local global [1000 x i32], align 16

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f5ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f6ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f7ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f8ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.2") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z2ccv(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4 %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::tuple", align 4
  %10 = alloca %"class.std::tuple.2", align 8
  %11 = alloca %"class.std::tuple", align 4
  %12 = alloca %"class.std::tuple.2", align 8
  %13 = alloca %"class.std::tuple", align 4
  %14 = alloca %"class.std::tuple.2", align 8
  %15 = alloca %"class.std::tuple", align 4
  %16 = alloca %"class.std::tuple.2", align 8
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %17 = load i32, ptr @c, align 16, !tbaa !5
  store i32 %17, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %181, %1
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  store i32 2, ptr %8, align 4
  br label %184

23:                                               ; preds = %18
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp ne i32 %27, %28
  br i1 %29, label %30, label %180

30:                                               ; preds = %23
  %31 = load i32, ptr @r, align 16, !tbaa !5
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %40, label %33

33:                                               ; preds = %30
  %34 = load i32, ptr @v, align 4, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1000 x i32], ptr @c0, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp slt i32 %34, %38
  br i1 %39, label %50, label %40

40:                                               ; preds = %33, %30
  %41 = load i32, ptr @r, align 16, !tbaa !5
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %174

43:                                               ; preds = %40
  %44 = load i32, ptr @v, align 4, !tbaa !5
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1000 x i32], ptr @c0, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = icmp sgt i32 %44, %48
  br i1 %49, label %50, label %174

50:                                               ; preds = %43, %33
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %84, label %53

53:                                               ; preds = %50
  %54 = load i32, ptr @r, align 16, !tbaa !5
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %84, label %56

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f5ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %9, i32 noundef %57, i32 noundef %58)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %10, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = icmp eq i32 %60, -1
  br i1 %61, label %62, label %83

62:                                               ; preds = %56
  %63 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %63, ptr %4, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %77, %62
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %68, label %75

68:                                               ; preds = %64
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp ne i32 %69, %73
  br label %75

75:                                               ; preds = %68, %64
  %76 = phi i1 [ false, %64 ], [ %74, %68 ]
  br i1 %76, label %77, label %80

77:                                               ; preds = %75
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %7, align 4, !tbaa !5
  br label %64, !llvm.loop !9

80:                                               ; preds = %75
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f7ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %81, i32 noundef %82)
  store i32 1, ptr %8, align 4
  br label %184

83:                                               ; preds = %56
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  store i32 1, ptr %8, align 4
  br label %184

84:                                               ; preds = %53, %50
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %115, label %87

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f6ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %11, i32 noundef %88, i32 noundef %89)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) %11) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = icmp eq i32 %91, -1
  br i1 %92, label %93, label %114

93:                                               ; preds = %87
  %94 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %94, ptr %4, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %108, %93
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %106

99:                                               ; preds = %95
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = icmp ne i32 %100, %104
  br label %106

106:                                              ; preds = %99, %95
  %107 = phi i1 [ false, %95 ], [ %105, %99 ]
  br i1 %107, label %108, label %111

108:                                              ; preds = %106
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %7, align 4, !tbaa !5
  br label %95, !llvm.loop !11

111:                                              ; preds = %106
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f8ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %112, i32 noundef %113)
  store i32 1, ptr %8, align 4
  br label %184

114:                                              ; preds = %87
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  store i32 1, ptr %8, align 4
  br label %184

115:                                              ; preds = %84
  %116 = load i32, ptr @r, align 16, !tbaa !5
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %146, label %118

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %119 = load i32, ptr %4, align 4, !tbaa !5
  %120 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f7ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %13, i32 noundef %119, i32 noundef %120)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %14, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(8) %13) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = icmp eq i32 %122, -1
  br i1 %123, label %124, label %145

124:                                              ; preds = %118
  %125 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %125, ptr %4, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %139, %124
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = load i32, ptr @n, align 4, !tbaa !5
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %130, label %137

130:                                              ; preds = %126
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = icmp ne i32 %131, %135
  br label %137

137:                                              ; preds = %130, %126
  %138 = phi i1 [ false, %126 ], [ %136, %130 ]
  br i1 %138, label %139, label %142

139:                                              ; preds = %137
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %7, align 4, !tbaa !5
  br label %126, !llvm.loop !12

142:                                              ; preds = %137
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f5ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %143, i32 noundef %144)
  store i32 1, ptr %8, align 4
  br label %184

145:                                              ; preds = %118
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  store i32 1, ptr %8, align 4
  br label %184

146:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %147 = load i32, ptr %4, align 4, !tbaa !5
  %148 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f8ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %15, i32 noundef %147, i32 noundef %148)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %16, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  %149 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(8) %15) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %150 = load i32, ptr %5, align 4, !tbaa !5
  %151 = icmp eq i32 %150, -1
  br i1 %151, label %152, label %173

152:                                              ; preds = %146
  %153 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %153, ptr %4, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %167, %152
  %155 = load i32, ptr %7, align 4, !tbaa !5
  %156 = load i32, ptr @n, align 4, !tbaa !5
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %158, label %165

158:                                              ; preds = %154
  %159 = load i32, ptr %3, align 4, !tbaa !5
  %160 = load i32, ptr %7, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = icmp ne i32 %159, %163
  br label %165

165:                                              ; preds = %158, %154
  %166 = phi i1 [ false, %154 ], [ %164, %158 ]
  br i1 %166, label %167, label %170

167:                                              ; preds = %165
  %168 = load i32, ptr %7, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %7, align 4, !tbaa !5
  br label %154, !llvm.loop !13

170:                                              ; preds = %165
  %171 = load i32, ptr %4, align 4, !tbaa !5
  %172 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z2f6ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %171, i32 noundef %172)
  store i32 1, ptr %8, align 4
  br label %184

173:                                              ; preds = %146
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  store i32 1, ptr %8, align 4
  br label %184

174:                                              ; preds = %43, %40
  %175 = load i32, ptr %7, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  store i32 %178, ptr %3, align 4, !tbaa !5
  %179 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %179, ptr %4, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %174, %23
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %7, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %7, align 4, !tbaa !5
  br label %18, !llvm.loop !14

184:                                              ; preds = %173, %170, %145, %142, %114, %111, %83, %80, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  %185 = load i32, ptr %8, align 4
  switch i32 %185, label %210 [
    i32 2, label %186
  ]

186:                                              ; preds = %184
  %187 = load i32, ptr %3, align 4, !tbaa !5
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %195, label %189

189:                                              ; preds = %186
  %190 = load i32, ptr @r, align 16, !tbaa !5
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %195, label %192

192:                                              ; preds = %189
  %193 = load i32, ptr %4, align 4, !tbaa !5
  %194 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z2f5ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %193, i32 noundef %194)
  store i32 1, ptr %8, align 4
  br label %210

195:                                              ; preds = %189, %186
  %196 = load i32, ptr %3, align 4, !tbaa !5
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %201, label %198

198:                                              ; preds = %195
  %199 = load i32, ptr %4, align 4, !tbaa !5
  %200 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z2f6ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %199, i32 noundef %200)
  store i32 1, ptr %8, align 4
  br label %210

201:                                              ; preds = %195
  %202 = load i32, ptr @r, align 16, !tbaa !5
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %207, label %204

204:                                              ; preds = %201
  %205 = load i32, ptr %4, align 4, !tbaa !5
  %206 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z2f7ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %205, i32 noundef %206)
  store i32 1, ptr %8, align 4
  br label %210

207:                                              ; preds = %201
  %208 = load i32, ptr %4, align 4, !tbaa !5
  %209 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z2f8ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %208, i32 noundef %209)
  store i32 1, ptr %8, align 4
  br label %210

210:                                              ; preds = %207, %204, %198, %192, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }
%"class.std::tuple.2" = type { %"struct.std::_Tuple_impl.3" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"struct.std::_Head_base.6" = type { ptr }

@n = external dso_local local_unnamed_addr global i32, align 4
@v = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global [1000 x i32], align 16
@c = external dso_local local_unnamed_addr global [1000 x i32], align 16
@c0 = external dso_local local_unnamed_addr global [1000 x i32], align 16

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f5ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f6ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f7ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2f8ii(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.2") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z2ccv(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 4 %0) local_unnamed_addr #2 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::tuple", align 4
  %5 = alloca %"class.std::tuple.2", align 8
  %6 = alloca %"class.std::tuple", align 4
  %7 = alloca %"class.std::tuple.2", align 8
  %8 = alloca %"class.std::tuple", align 4
  %9 = alloca %"class.std::tuple.2", align 8
  %10 = alloca %"class.std::tuple", align 4
  %11 = alloca %"class.std::tuple.2", align 8
  %12 = load i32, ptr @c, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %.not7498 = icmp sgt i32 %13, 0
  %.pre = load i32, ptr @r, align 16
  %.fr = freeze i32 %.pre
  br i1 %.not7498, label %.lr.ph, label %.thread79

.lr.ph:                                           ; preds = %1
  %.not68 = icmp eq i32 %.fr, 0
  %14 = load i32, ptr @v, align 4
  %wide.trip.count151 = zext nneg i32 %13 to i64
  br i1 %.not68, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.thread.us
  %indvars.iv148 = phi i64 [ %indvars.iv.next149, %.thread.us ], [ 0, %.lr.ph ]
  %.063100.us = phi i32 [ %.164.us, %.thread.us ], [ 0, %.lr.ph ]
  %.06699.us = phi i32 [ %.167.us, %.thread.us ], [ %12, %.lr.ph ]
  %15 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv148
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %.not.us = icmp eq i32 %16, %.06699.us
  br i1 %.not.us, label %.thread.us, label %17

17:                                               ; preds = %.lr.ph.split.us
  %18 = getelementptr inbounds [1000 x i32], ptr @c0, i64 0, i64 %indvars.iv148
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp slt i32 %14, %19
  %21 = trunc nuw nsw i64 %indvars.iv148 to i32
  br i1 %20, label %.split.us, label %.thread.us

.thread.us:                                       ; preds = %17, %.lr.ph.split.us
  %.167.us = phi i32 [ %.06699.us, %.lr.ph.split.us ], [ %16, %17 ]
  %.164.us = phi i32 [ %.063100.us, %.lr.ph.split.us ], [ %21, %17 ]
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %.thread79, label %.lr.ph.split.us, !llvm.loop !9

.lr.ph.split:                                     ; preds = %.lr.ph, %.thread
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread ], [ 0, %.lr.ph ]
  %.063100 = phi i32 [ %.164, %.thread ], [ 0, %.lr.ph ]
  %.06699 = phi i32 [ %.167, %.thread ], [ %12, %.lr.ph ]
  %22 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %.not = icmp eq i32 %23, %.06699
  br i1 %.not, label %.thread, label %24

24:                                               ; preds = %.lr.ph.split
  %25 = getelementptr inbounds [1000 x i32], ptr @c0, i64 0, i64 %indvars.iv
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = icmp sgt i32 %14, %26
  %28 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %27, label %.thread75, label %.thread

.thread75:                                        ; preds = %24
  %.not84 = icmp eq i32 %.06699, 0
  br i1 %.not84, label %40, label %.critedge83

.split.us:                                        ; preds = %17
  %.not85 = icmp eq i32 %.06699.us, 0
  br i1 %.not85, label %29, label %51

29:                                               ; preds = %.split.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @_Z2f5ii(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %4, i32 noundef %.063100.us, i32 noundef %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %5, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %.preheader, label %39

.preheader:                                       ; preds = %29
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, %21
  br i1 %34, label %.lr.ph123.preheader, label %.critedge

.lr.ph123.preheader:                              ; preds = %.preheader
  %wide.trip.count164 = zext i32 %33 to i64
  br label %.lr.ph123

.lr.ph123:                                        ; preds = %.lr.ph123.preheader, %37
  %indvars.iv161 = phi i64 [ %indvars.iv148, %.lr.ph123.preheader ], [ %indvars.iv.next162, %37 ]
  %35 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv161
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not70 = icmp eq i32 %36, 0
  br i1 %.not70, label %.critedge.loopexit.split.loop.exit182, label %37

37:                                               ; preds = %.lr.ph123
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164
  br i1 %exitcond165.not, label %.critedge, label %.lr.ph123, !llvm.loop !11

.critedge.loopexit.split.loop.exit182:            ; preds = %.lr.ph123
  %38 = trunc nuw nsw i64 %indvars.iv161 to i32
  br label %.critedge

.critedge:                                        ; preds = %37, %.critedge.loopexit.split.loop.exit182, %.preheader
  %.1.lcssa = phi i32 [ %21, %.preheader ], [ %38, %.critedge.loopexit.split.loop.exit182 ], [ %33, %37 ]
  call void @_Z2f7ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %21, i32 noundef %.1.lcssa)
  br label %.thread77

39:                                               ; preds = %29
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  br label %.thread77

40:                                               ; preds = %.thread75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @_Z2f6ii(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %6, i32 noundef %.063100, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %7, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(8) %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %.preheader87, label %50

.preheader87:                                     ; preds = %40
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = icmp sgt i32 %44, %28
  br i1 %45, label %.lr.ph113.preheader, label %.critedge3

.lr.ph113.preheader:                              ; preds = %.preheader87
  %wide.trip.count146 = zext i32 %44 to i64
  br label %.lr.ph113

.lr.ph113:                                        ; preds = %.lr.ph113.preheader, %48
  %indvars.iv143 = phi i64 [ %indvars.iv, %.lr.ph113.preheader ], [ %indvars.iv.next144, %48 ]
  %46 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv143
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %.not71 = icmp eq i32 %47, 0
  br i1 %.not71, label %.critedge3.loopexit.split.loop.exit178, label %48

48:                                               ; preds = %.lr.ph113
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond147.not = icmp eq i64 %indvars.iv.next144, %wide.trip.count146
  br i1 %exitcond147.not, label %.critedge3, label %.lr.ph113, !llvm.loop !12

.critedge3.loopexit.split.loop.exit178:           ; preds = %.lr.ph113
  %49 = trunc nuw nsw i64 %indvars.iv143 to i32
  br label %.critedge3

.critedge3:                                       ; preds = %48, %.critedge3.loopexit.split.loop.exit178, %.preheader87
  %.2.lcssa = phi i32 [ %28, %.preheader87 ], [ %49, %.critedge3.loopexit.split.loop.exit178 ], [ %44, %48 ]
  call void @_Z2f8ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %28, i32 noundef %.2.lcssa)
  br label %.thread77

50:                                               ; preds = %40
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  br label %.thread77

51:                                               ; preds = %.split.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @_Z2f7ii(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %8, i32 noundef %.063100.us, i32 noundef %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %9, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(8) %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = icmp eq i32 %53, -1
  br i1 %54, label %.preheader86, label %61

.preheader86:                                     ; preds = %51
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, %21
  br i1 %56, label %.lr.ph118.preheader, label %.critedge5

.lr.ph118.preheader:                              ; preds = %.preheader86
  %wide.trip.count157 = zext i32 %55 to i64
  br label %.lr.ph118

.lr.ph118:                                        ; preds = %.lr.ph118.preheader, %59
  %indvars.iv154 = phi i64 [ %indvars.iv148, %.lr.ph118.preheader ], [ %indvars.iv.next155, %59 ]
  %57 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv154
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %.not72 = icmp eq i32 %.06699.us, %58
  br i1 %.not72, label %.critedge5.loopexit.split.loop.exit180, label %59

59:                                               ; preds = %.lr.ph118
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %exitcond158.not = icmp eq i64 %indvars.iv.next155, %wide.trip.count157
  br i1 %exitcond158.not, label %.critedge5, label %.lr.ph118, !llvm.loop !13

.critedge5.loopexit.split.loop.exit180:           ; preds = %.lr.ph118
  %60 = trunc nuw nsw i64 %indvars.iv154 to i32
  br label %.critedge5

.critedge5:                                       ; preds = %59, %.critedge5.loopexit.split.loop.exit180, %.preheader86
  %.3.lcssa = phi i32 [ %21, %.preheader86 ], [ %60, %.critedge5.loopexit.split.loop.exit180 ], [ %55, %59 ]
  call void @_Z2f5ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %21, i32 noundef %.3.lcssa)
  br label %.thread77

61:                                               ; preds = %51
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  br label %.thread77

.critedge83:                                      ; preds = %.thread75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @_Z2f8ii(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 4 %10, i32 noundef %.063100, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #3
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %11, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIT_T0_EEERS1_E4typeEOS_IJS4_S5_EE(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(8) %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = icmp eq i32 %63, -1
  br i1 %64, label %.preheader88, label %71

.preheader88:                                     ; preds = %.critedge83
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp sgt i32 %65, %28
  br i1 %66, label %.lr.ph108.preheader, label %.critedge7

.lr.ph108.preheader:                              ; preds = %.preheader88
  %wide.trip.count139 = zext i32 %65 to i64
  br label %.lr.ph108

.lr.ph108:                                        ; preds = %.lr.ph108.preheader, %69
  %indvars.iv136 = phi i64 [ %indvars.iv, %.lr.ph108.preheader ], [ %indvars.iv.next137, %69 ]
  %67 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv136
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %.not73 = icmp eq i32 %.06699, %68
  br i1 %.not73, label %.critedge7.loopexit.split.loop.exit176, label %69

69:                                               ; preds = %.lr.ph108
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond140.not = icmp eq i64 %indvars.iv.next137, %wide.trip.count139
  br i1 %exitcond140.not, label %.critedge7, label %.lr.ph108, !llvm.loop !14

.critedge7.loopexit.split.loop.exit176:           ; preds = %.lr.ph108
  %70 = trunc nuw nsw i64 %indvars.iv136 to i32
  br label %.critedge7

.critedge7:                                       ; preds = %69, %.critedge7.loopexit.split.loop.exit176, %.preheader88
  %.4.lcssa = phi i32 [ %28, %.preheader88 ], [ %70, %.critedge7.loopexit.split.loop.exit176 ], [ %65, %69 ]
  call void @_Z2f6ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %28, i32 noundef %.4.lcssa)
  br label %.thread77

71:                                               ; preds = %.critedge83
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3
  br label %.thread77

.thread:                                          ; preds = %24, %.lr.ph.split
  %.167 = phi i32 [ %.06699, %.lr.ph.split ], [ %23, %24 ]
  %.164 = phi i32 [ %.063100, %.lr.ph.split ], [ %28, %24 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count151
  br i1 %exitcond.not, label %.thread79, label %.lr.ph.split, !llvm.loop !9

.thread79:                                        ; preds = %.thread, %.thread.us, %1
  %.066.lcssa = phi i32 [ %12, %1 ], [ %.167.us, %.thread.us ], [ %.167, %.thread ]
  %.063.lcssa = phi i32 [ 0, %1 ], [ %.164.us, %.thread.us ], [ %.164, %.thread ]
  %.not167 = icmp eq i32 %.fr, 0
  %72 = or i32 %.066.lcssa, %.fr
  %or.cond9.not = icmp eq i32 %72, 0
  br i1 %or.cond9.not, label %73, label %74

73:                                               ; preds = %.thread79
  tail call void @_Z2f5ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %.063.lcssa, i32 noundef %13)
  br label %.thread77

74:                                               ; preds = %.thread79
  %.not166 = icmp eq i32 %.066.lcssa, 0
  br i1 %.not166, label %75, label %76

75:                                               ; preds = %74
  tail call void @_Z2f6ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %.063.lcssa, i32 noundef %13)
  br label %.thread77

76:                                               ; preds = %74
  br i1 %.not167, label %77, label %78

77:                                               ; preds = %76
  tail call void @_Z2f7ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %.063.lcssa, i32 noundef %13)
  br label %.thread77

78:                                               ; preds = %76
  tail call void @_Z2f8ii(ptr dead_on_unwind writable sret(%"class.std::tuple") align 4 %0, i32 noundef %.063.lcssa, i32 noundef %13)
  br label %.thread77

.thread77:                                        ; preds = %.critedge, %.critedge3, %.critedge5, %.critedge7, %39, %50, %61, %71, %78, %77, %75, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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