; LLVM IR from upupming/algorithm :: kick-start/2021/RoundC/D. Binary Operator.ll (Z5solvev)

; 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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@n = external dso_local global i32, align 4
@idx = external dso_local global [110 x i32], align 16
@val = external dso_local global [110 x %"class.std::vector"], align 16
@same = external dso_local global [110 x [110 x i8]], align 16
@_Z1hB5cxx11 = external dso_local global %"class.std::unordered_map", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKSt6vectorIiSaIiEES3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8calc_expi(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  call void @llvm.memset.p0.i64(ptr align 16 @same, i8 1, i64 12100, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %69, %0
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 10
  br i1 %12, label %14, label %13

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

14:                                               ; preds = %10
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS5_St6vectorIiSaIiEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEESA_SC_SaISD_ISE_SH_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @_Z1hB5cxx11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %65, %14
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %68

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %21 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z8calc_expi(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %4, i32 noundef %21)
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %61, %20
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %64

31:                                               ; preds = %26
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %33
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %36
  %38 = call noundef zeroext i1 @_Z3cmpRKSt6vectorIiSaIiEES3_(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(24) %37)
  br i1 %38, label %47, label %39

39:                                               ; preds = %31
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %41
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %44
  %46 = call noundef zeroext i1 @_Z3cmpRKSt6vectorIiSaIiEES3_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(24) %45)
  br i1 %46, label %47, label %60

47:                                               ; preds = %39, %31
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [110 x [110 x i8]], ptr @same, i64 0, i64 %49
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [110 x i8], ptr %50, i64 0, i64 %52
  store i8 0, ptr %53, align 1, !tbaa !9
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [110 x [110 x i8]], ptr @same, i64 0, i64 %55
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [110 x i8], ptr %56, i64 0, i64 %58
  store i8 0, ptr %59, align 1, !tbaa !9
  br label %60

60:                                               ; preds = %47, %39
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %5, align 4, !tbaa !5
  br label %26, !llvm.loop !11

64:                                               ; preds = %30
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %3, align 4, !tbaa !5
  br label %15, !llvm.loop !13

68:                                               ; preds = %19
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %1, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %1, align 4, !tbaa !5
  br label %10, !llvm.loop !14

72:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %121, %72
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = load i32, ptr @n, align 4, !tbaa !5
  %76 = icmp sle i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 11, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %124

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %102, %78
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 14, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %105

84:                                               ; preds = %79
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [110 x [110 x i8]], ptr @same, i64 0, i64 %86
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [110 x i8], ptr %87, i64 0, i64 %89
  %91 = load i8, ptr %90, align 1, !tbaa !9, !range !15, !noundef !16
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %101

93:                                               ; preds = %84
  store i8 1, ptr %8, align 1, !tbaa !9
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %99
  store i32 %97, ptr %100, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %93, %84
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %9, align 4, !tbaa !5
  br label %79, !llvm.loop !17

105:                                              ; preds = %83
  %106 = load i8, ptr %8, align 1, !tbaa !9, !range !15, !noundef !16
  %107 = trunc i8 %106 to i1
  br i1 %107, label %114, label %108

108:                                              ; preds = %105
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !5
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %112
  store i32 %109, ptr %113, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %108, %105
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %118)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %121

121:                                              ; preds = %114
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %7, align 4, !tbaa !5
  br label %73, !llvm.loop !18

124:                                              ; preds = %77
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 = { "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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@n = external dso_local local_unnamed_addr global i32, align 4
@idx = external dso_local local_unnamed_addr global [110 x i32], align 16
@val = external dso_local global [110 x %"class.std::vector"], align 16
@same = external dso_local local_unnamed_addr global [110 x [110 x i8]], align 16
@_Z1hB5cxx11 = external dso_local global %"class.std::unordered_map", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKSt6vectorIiSaIiEES3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8calc_expi(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #3 {
  %1 = alloca %"class.std::vector", align 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(12100) @same, i8 1, i64 12100, i1 false)
  br label %2

.preheader38:                                     ; preds = %._crit_edge44
  %.not50 = icmp slt i32 %4, 1
  br i1 %.not50, label %._crit_edge53, label %.preheader

2:                                                ; preds = %0, %._crit_edge44
  %.03645 = phi i32 [ 0, %0 ], [ %5, %._crit_edge44 ]
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS5_St6vectorIiSaIiEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEESA_SC_SaISD_ISE_SH_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @_Z1hB5cxx11) #6
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %.not3740 = icmp slt i32 %3, 1
  br i1 %.not3740, label %._crit_edge44, label %.lr.ph43

._crit_edge44:                                    ; preds = %._crit_edge, %2
  %4 = phi i32 [ %3, %2 ], [ %10, %._crit_edge ]
  %5 = add nuw nsw i32 %.03645, 1
  %exitcond58.not = icmp eq i32 %5, 10
  br i1 %exitcond58.not, label %.preheader38, label %2, !llvm.loop !9

.lr.ph43:                                         ; preds = %2, %._crit_edge
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %._crit_edge ], [ 1, %2 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  %6 = trunc nuw nsw i64 %indvars.iv55 to i32
  call void @_Z8calc_expi(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %1, i32 noundef %6)
  %7 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %indvars.iv55
  %8 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  %9 = icmp ugt i64 %indvars.iv55, 1
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %19, %.lr.ph43
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %.not37.not = icmp slt i64 %indvars.iv55, %11
  br i1 %.not37.not, label %.lr.ph43, label %._crit_edge44, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph43, %19
  %indvars.iv = phi i64 [ %indvars.iv.next, %19 ], [ 1, %.lr.ph43 ]
  %12 = getelementptr inbounds [110 x %"class.std::vector"], ptr @val, i64 0, i64 %indvars.iv
  %13 = call noundef zeroext i1 @_Z3cmpRKSt6vectorIiSaIiEES3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %12)
  br i1 %13, label %16, label %14

14:                                               ; preds = %.lr.ph
  %15 = call noundef zeroext i1 @_Z3cmpRKSt6vectorIiSaIiEES3_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %7)
  br i1 %15, label %16, label %19

16:                                               ; preds = %14, %.lr.ph
  %17 = getelementptr inbounds [110 x [110 x i8]], ptr @same, i64 0, i64 %indvars.iv, i64 %indvars.iv55
  store i8 0, ptr %17, align 1, !tbaa !12
  %18 = getelementptr inbounds [110 x [110 x i8]], ptr @same, i64 0, i64 %indvars.iv55, i64 %indvars.iv
  store i8 0, ptr %18, align 1, !tbaa !12
  br label %19

19:                                               ; preds = %14, %16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv55
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

.preheader:                                       ; preds = %.preheader38, %32
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %32 ], [ 1, %.preheader38 ]
  %.03251 = phi i32 [ %.133, %32 ], [ 1, %.preheader38 ]
  %20 = icmp ugt i64 %indvars.iv62, 1
  br i1 %20, label %.lr.ph48, label %.critedge

.lr.ph48:                                         ; preds = %.preheader
  %21 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %indvars.iv62
  br label %.outer

.outer:                                           ; preds = %.thread, %.lr.ph48
  %indvars.iv59.ph = phi i64 [ %indvars.iv.next6066, %.thread ], [ 1, %.lr.ph48 ]
  %.03046.ph = phi i1 [ true, %.thread ], [ false, %.lr.ph48 ]
  br label %23

._crit_edge53:                                    ; preds = %32, %.preheader38
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret void

._crit_edge49:                                    ; preds = %27
  br i1 %.03046.ph, label %._crit_edge49._crit_edge, label %.critedge

._crit_edge49._crit_edge:                         ; preds = %.thread, %._crit_edge49
  %.pre = load i32, ptr %21, align 4, !tbaa !5
  br label %32

23:                                               ; preds = %.outer, %27
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %27 ], [ %indvars.iv59.ph, %.outer ]
  %24 = getelementptr inbounds [110 x [110 x i8]], ptr @same, i64 0, i64 %indvars.iv59, i64 %indvars.iv62
  %25 = load i8, ptr %24, align 1, !tbaa !12, !range !15, !noundef !16
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %.thread, label %27

27:                                               ; preds = %23
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond61.not = icmp eq i64 %indvars.iv.next60, %indvars.iv62
  br i1 %exitcond61.not, label %._crit_edge49, label %23, !llvm.loop !17

.thread:                                          ; preds = %23
  %28 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %indvars.iv59
  %29 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %29, ptr %21, align 4, !tbaa !5
  %indvars.iv.next6066 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond61.not67 = icmp eq i64 %indvars.iv.next6066, %indvars.iv62
  br i1 %exitcond61.not67, label %._crit_edge49._crit_edge, label %.outer, !llvm.loop !17

.critedge:                                        ; preds = %.preheader, %._crit_edge49
  %30 = add nsw i32 %.03251, 1
  %31 = getelementptr inbounds [110 x i32], ptr @idx, i64 0, i64 %indvars.iv62
  store i32 %.03251, ptr %31, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %._crit_edge49._crit_edge, %.critedge
  %33 = phi i32 [ %.pre, %._crit_edge49._crit_edge ], [ %.03251, %.critedge ]
  %.133 = phi i32 [ %.03251, %._crit_edge49._crit_edge ], [ %30, %.critedge ]
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %33)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %.not.not = icmp slt i64 %indvars.iv62, %37
  br i1 %.not.not, label %.preheader, label %._crit_edge53, !llvm.loop !18
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS5_St6vectorIiSaIiEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEESA_SC_SaISD_ISE_SH_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 = { "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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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 = !{!"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 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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