; LLVM IR from Mohammed-Shoaib/Coding-Problems :: AtCoder/Solutions/abc172_e.ll (Z3neqii)

; 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::allocator" = type { i8 }
%class.anon = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7inversexi(i64 noundef, i32 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 uwtable
define dso_local noundef i32 @_Z3neqii(i32 noundef %0, i32 noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %class.anon, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1000000007, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = sext i32 %21 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %23 unwind label %34

23:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %26, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %27 unwind label %38

27:                                               ; preds = %23
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #4
  store i64 1, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %57, %27
  %30 = load i32, ptr %12, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %42, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %60

34:                                               ; preds = %2
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %8, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  br label %184

38:                                               ; preds = %23
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %8, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  br label %183

42:                                               ; preds = %29
  %43 = load i32, ptr %12, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = load i32, ptr %12, align 4, !tbaa !5
  %46 = sub nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %47) #4
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = mul nsw i64 %44, %49
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = srem i64 %50, %52
  %54 = load i32, ptr %12, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %55) #4
  store i64 %53, ptr %56, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %42
  %58 = load i32, ptr %12, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %12, align 4, !tbaa !5
  br label %29, !llvm.loop !11

60:                                               ; preds = %33
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %62) #4
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = call noundef i32 @_Z7inversexi(i64 noundef %64, i32 noundef %65)
  %67 = sext i32 %66 to i64
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %69) #4
  store i64 %67, ptr %70, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  store i32 %72, ptr %13, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %93, %60
  %74 = load i32, ptr %13, align 4, !tbaa !5
  %75 = icmp sge i32 %74, 0
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %96

77:                                               ; preds = %73
  %78 = load i32, ptr %13, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %83) #4
  %85 = load i64, ptr %84, align 8, !tbaa !9
  %86 = mul nsw i64 %80, %85
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = srem i64 %86, %88
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %91) #4
  store i64 %89, ptr %92, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %77
  %94 = load i32, ptr %13, align 4, !tbaa !5
  %95 = add nsw i32 %94, -1
  store i32 %95, ptr %13, align 4, !tbaa !5
  br label %73, !llvm.loop !13

96:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  %97 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 0
  store ptr %10, ptr %97, align 8, !tbaa !14
  %98 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 1
  store ptr %5, ptr %98, align 8, !tbaa !14
  %99 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 2
  store ptr %6, ptr %99, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 1, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = invoke noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %100, i32 noundef %101)
          to label %103 unwind label %117

103:                                              ; preds = %96
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %105) #4
  %107 = load i64, ptr %106, align 8, !tbaa !9
  %108 = mul nsw i64 %102, %107
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = srem i64 %108, %110
  store i64 %111, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %166, %103
  %113 = load i32, ptr %18, align 4, !tbaa !5
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %121, label %116

116:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %173

117:                                              ; preds = %96
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %8, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %9, align 4
  br label %182

121:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = load i32, ptr %18, align 4, !tbaa !5
  %124 = invoke noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %122, i32 noundef %123)
          to label %125 unwind label %169

125:                                              ; preds = %121
  %126 = load i32, ptr %4, align 4, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !5
  %128 = sub nsw i32 %126, %127
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = load i32, ptr %18, align 4, !tbaa !5
  %131 = sub nsw i32 %129, %130
  %132 = invoke noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %128, i32 noundef %131)
          to label %133 unwind label %169

133:                                              ; preds = %125
  %134 = mul nsw i64 %124, %132
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = srem i64 %134, %136
  %138 = trunc i64 %137 to i32
  store i32 %138, ptr %19, align 4, !tbaa !5
  %139 = load i32, ptr %19, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = load i32, ptr %3, align 4, !tbaa !5
  %142 = load i32, ptr %18, align 4, !tbaa !5
  %143 = sub nsw i32 %141, %142
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %144) #4
  %146 = load i64, ptr %145, align 8, !tbaa !9
  %147 = mul nsw i64 %140, %146
  %148 = load i32, ptr %5, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = srem i64 %147, %149
  %151 = trunc i64 %150 to i32
  store i32 %151, ptr %19, align 4, !tbaa !5
  %152 = load i32, ptr %16, align 4, !tbaa !5
  %153 = load i32, ptr %19, align 4, !tbaa !5
  %154 = mul nsw i32 %152, %153
  %155 = load i32, ptr %5, align 4, !tbaa !5
  %156 = add nsw i32 %154, %155
  %157 = load i32, ptr %5, align 4, !tbaa !5
  %158 = srem i32 %156, %157
  store i32 %158, ptr %19, align 4, !tbaa !5
  %159 = load i32, ptr %15, align 4, !tbaa !5
  %160 = load i32, ptr %19, align 4, !tbaa !5
  %161 = add nsw i32 %159, %160
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = srem i32 %161, %162
  store i32 %163, ptr %15, align 4, !tbaa !5
  %164 = load i32, ptr %16, align 4, !tbaa !5
  %165 = mul nsw i32 %164, -1
  store i32 %165, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %166

166:                                              ; preds = %133
  %167 = load i32, ptr %18, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %18, align 4, !tbaa !5
  br label %112, !llvm.loop !16

169:                                              ; preds = %125, %121
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %8, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %182

173:                                              ; preds = %116
  %174 = load i64, ptr %17, align 8, !tbaa !9
  %175 = load i32, ptr %15, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = mul nsw i64 %174, %176
  %178 = load i32, ptr %5, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = srem i64 %177, %179
  %181 = trunc i64 %180 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 %181

182:                                              ; preds = %169, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %183

183:                                              ; preds = %182, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %184

184:                                              ; preds = %183, %34
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %8, align 8
  %187 = load i32, ptr %9, align 4
  %188 = insertvalue { ptr, i32 } poison, ptr %186, 0
  %189 = insertvalue { ptr, i32 } %188, i32 %187, 1
  resume { ptr, i32 } %189
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !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::allocator" = type { i8 }
%class.anon = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7inversexi(i64 noundef, i32 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 uwtable
define dso_local noundef range(i32 -2147483647, -2147483648) i32 @_Z3neqii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %class.anon, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 1000000007, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  %9 = add i32 %1, 1
  %10 = sext i32 %9 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %10, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %11 unwind label %22

11:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %10, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %12 unwind label %24

12:                                               ; preds = %11
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #4
  store i64 1, ptr %13, align 8, !tbaa !9
  %.not49 = icmp slt i32 %1, 1
  br i1 %.not49, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %12
  %wide.trip.count = zext i32 %9 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %12
  %14 = sext i32 %1 to i64
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14) #4
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = call noundef i32 @_Z7inversexi(i64 noundef %16, i32 noundef 1000000007)
  %18 = sext i32 %17 to i64
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %14) #4
  store i64 %18, ptr %19, align 8, !tbaa !9
  %20 = icmp sgt i32 %1, 0
  br i1 %20, label %.lr.ph53.preheader, label %._crit_edge54

.lr.ph53.preheader:                               ; preds = %._crit_edge
  %21 = zext nneg i32 %1 to i64
  br label %.lr.ph53

22:                                               ; preds = %2
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br label %75

24:                                               ; preds = %11
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %75

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %26 = add nsw i64 %indvars.iv, -1
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %26) #4
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = mul nsw i64 %28, %indvars.iv
  %30 = srem i64 %29, 1000000007
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #4
  store i64 %30, ptr %31, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  store ptr %6, ptr %8, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %3, ptr %32, align 8, !tbaa !13
  %33 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %4, ptr %33, align 8, !tbaa !13
  %34 = call noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %1, i32 noundef %0)
  %35 = sext i32 %0 to i64
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %35) #4
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %.not4855 = icmp slt i32 %0, 0
  br i1 %.not4855, label %._crit_edge54.._crit_edge61_crit_edge, label %.lr.ph60.preheader

._crit_edge54.._crit_edge61_crit_edge:            ; preds = %._crit_edge54
  %.pre = sext i32 %38 to i64
  br label %._crit_edge61

.lr.ph60.preheader:                               ; preds = %._crit_edge54
  %39 = add nuw i32 %0, 1
  %wide.trip.count69 = zext i32 %39 to i64
  br label %.lr.ph60

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %.lr.ph53
  %indvars.iv63 = phi i64 [ %21, %.lr.ph53.preheader ], [ %indvars.iv.next64, %.lr.ph53 ]
  %indvars.iv.next64 = add nsw i64 %indvars.iv63, -1
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv63) #4
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = mul nsw i64 %41, %indvars.iv63
  %43 = srem i64 %42, 1000000007
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv.next64) #4
  store i64 %43, ptr %44, align 8, !tbaa !9
  %45 = icmp ugt i64 %indvars.iv63, 1
  br i1 %45, label %.lr.ph53, label %._crit_edge54, !llvm.loop !15

._crit_edge61.loopexit:                           ; preds = %.lr.ph60
  %.pre71 = sext i32 %38 to i64
  %46 = sext i32 %73 to i64
  br label %._crit_edge61

._crit_edge61:                                    ; preds = %._crit_edge54.._crit_edge61_crit_edge, %._crit_edge61.loopexit
  %.pre-phi72 = phi i64 [ %.pre, %._crit_edge54.._crit_edge61_crit_edge ], [ %.pre71, %._crit_edge61.loopexit ]
  %.pre-phi = phi i64 [ %.pre, %._crit_edge54.._crit_edge61_crit_edge ], [ %66, %._crit_edge61.loopexit ]
  %.042.lcssa = phi i64 [ 0, %._crit_edge54.._crit_edge61_crit_edge ], [ %46, %._crit_edge61.loopexit ]
  %47 = mul nsw i64 %37, %34
  %48 = srem i64 %47, %.pre-phi72
  %49 = mul nsw i64 %48, %.042.lcssa
  %50 = srem i64 %49, %.pre-phi
  %51 = trunc nsw i64 %50 to i32
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret i32 %51

.lr.ph60:                                         ; preds = %.lr.ph60.preheader, %.lr.ph60
  %indvars.iv66 = phi i64 [ 0, %.lr.ph60.preheader ], [ %indvars.iv.next67, %.lr.ph60 ]
  %.04157 = phi i32 [ 1, %.lr.ph60.preheader ], [ %74, %.lr.ph60 ]
  %.04256 = phi i32 [ 0, %.lr.ph60.preheader ], [ %73, %.lr.ph60 ]
  %indvars68 = trunc i64 %indvars.iv66 to i32
  %52 = call noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %0, i32 noundef %indvars68)
  %53 = sub nsw i64 %35, %indvars.iv66
  %54 = sub nsw i32 %0, %indvars68
  %55 = trunc i64 %indvars.iv66 to i32
  %56 = sub i32 %1, %55
  %57 = call noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %56, i32 noundef %54)
  %58 = mul nsw i64 %57, %52
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = srem i64 %58, %60
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %53) #4
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = mul nsw i64 %63, %61
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = srem i64 %64, %66
  %68 = trunc nsw i64 %67 to i32
  %69 = mul nsw i32 %.04157, %68
  %70 = add nsw i32 %69, %65
  %71 = srem i32 %70, %65
  %72 = add nsw i32 %71, %.04256
  %73 = srem i32 %72, %65
  %74 = sub nsw i32 0, %.04157
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count69
  br i1 %exitcond70.not, label %._crit_edge61.loopexit, label %.lr.ph60, !llvm.loop !16

75:                                               ; preds = %24, %22
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZZ3neqiiENK3$_0clEii"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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


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