; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Codesprints 2016/Codesprint June/Problem E/Sim/E.ll (Z8generateii)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unordered_set" = 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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>

@_Z4rowsB5cxx11 = external dso_local global [2 x %"class.std::__cxx11::basic_string"], align 16
@n = external dso_local global i32, align 4
@expo = external dso_local global [1202 x i64], align 16
@allHash = external dso_local global %"class.std::unordered_set", align 8
@allHash2 = external dso_local global [2 x [601 x %"class.std::unordered_set"]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8generateii(i32 noundef %0, i32 noundef %1) #0 {
  %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 i128, align 16
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  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) #3
  %14 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %14, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %15 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %15, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  store i128 0, ptr %8, align 16, !tbaa !9
  br label %16

16:                                               ; preds = %19, %2
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = icmp sge i32 %17, 0
  br i1 %18, label %19, label %38

19:                                               ; preds = %16
  %20 = load i128, ptr %8, align 16, !tbaa !9
  %21 = mul nsw i128 %20, 26
  %22 = srem i128 %21, 1344409044431
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [2 x %"class.std::__cxx11::basic_string"], ptr @_Z4rowsB5cxx11, i64 0, i64 %24
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %25, i64 noundef %27)
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = sext i8 %29 to i32
  %31 = sub nsw i32 %30, 97
  %32 = add nsw i32 %31, 1
  %33 = sext i32 %32 to i128
  %34 = add nsw i128 %22, %33
  %35 = srem i128 %34, 1344409044431
  store i128 %35, ptr %8, align 16, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %6, align 4, !tbaa !5
  br label %16, !llvm.loop !12

38:                                               ; preds = %16
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sub nsw i32 1, %39
  store i32 %40, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %45, %38
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %45, label %64

45:                                               ; preds = %41
  %46 = load i128, ptr %8, align 16, !tbaa !9
  %47 = mul nsw i128 %46, 26
  %48 = srem i128 %47, 1344409044431
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2 x %"class.std::__cxx11::basic_string"], ptr @_Z4rowsB5cxx11, i64 0, i64 %50
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %51, i64 noundef %53)
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = sext i8 %55 to i32
  %57 = sub nsw i32 %56, 97
  %58 = add nsw i32 %57, 1
  %59 = sext i32 %58 to i128
  %60 = add nsw i128 %48, %59
  %61 = srem i128 %60, 1344409044431
  store i128 %61, ptr %8, align 16, !tbaa !9
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %6, align 4, !tbaa !5
  br label %41, !llvm.loop !14

64:                                               ; preds = %41
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = mul nsw i32 2, %65
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  %69 = mul nsw i32 2, %68
  %70 = sub nsw i32 %66, %69
  store i32 %70, ptr %7, align 4, !tbaa !5
  %71 = load i128, ptr %8, align 16, !tbaa !9
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1202 x i64], ptr @expo, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !15
  %76 = sext i64 %75 to i128
  %77 = mul nsw i128 %71, %76
  %78 = srem i128 %77, 1344409044431
  store i128 %78, ptr %8, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = xor i32 1, %79
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2 x [601 x %"class.std::unordered_set"]], ptr @allHash2, i64 0, i64 %81
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [601 x %"class.std::unordered_set"], ptr %82, i64 0, i64 %85
  %87 = call ptr @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %86) #3
  %88 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %9, i32 0, i32 0
  %89 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %88, i32 0, i32 0
  store ptr %87, ptr %89, align 8
  br label %90

90:                                               ; preds = %117, %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = xor i32 1, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [2 x [601 x %"class.std::unordered_set"]], ptr @allHash2, i64 0, i64 %93
  %95 = load i32, ptr %4, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [601 x %"class.std::unordered_set"], ptr %94, i64 0, i64 %97
  %99 = call ptr @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %98) #3
  %100 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %10, i32 0, i32 0
  %101 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %100, i32 0, i32 0
  store ptr %99, ptr %101, align 8
  %102 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIxLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br i1 %102, label %104, label %103

103:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %121

104:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %105 = load i128, ptr %8, align 16, !tbaa !9
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIxLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  %107 = load i64, ptr %106, align 8, !tbaa !15
  %108 = sext i64 %107 to i128
  %109 = add nsw i128 %105, %108
  %110 = srem i128 %109, 1344409044431
  %111 = trunc i128 %110 to i64
  store i64 %111, ptr %11, align 8, !tbaa !15
  %112 = call { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(56) @allHash, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %113 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %114 = extractvalue { ptr, i8 } %112, 0
  store ptr %114, ptr %113, align 8
  %115 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %116 = extractvalue { ptr, i8 } %112, 1
  store i8 %116, ptr %115, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %117

117:                                              ; preds = %104
  %118 = call ptr @_ZNSt8__detail14_Node_iteratorIxLb1ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #3
  %119 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %13, i32 0, i32 0
  %120 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %119, i32 0, i32 0
  store ptr %118, ptr %120, align 8
  br label %90, !llvm.loop !17

121:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIxLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; 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
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 #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 = !{!10, !10, i64 0}
!10 = !{!"__int128", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !13}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unordered_set" = 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 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@_Z4rowsB5cxx11 = external dso_local global [2 x %"class.std::__cxx11::basic_string"], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@expo = external dso_local local_unnamed_addr global [1202 x i64], align 16
@allHash = external dso_local global %"class.std::unordered_set", align 8
@allHash2 = external dso_local global [2 x [601 x %"class.std::unordered_set"]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8generateii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca i64, align 8
  %6 = icmp sgt i32 %1, -1
  br i1 %6, label %.lr.ph, label %._crit_edge.._crit_edge35_crit_edge

.lr.ph:                                           ; preds = %2
  %7 = sext i32 %0 to i64
  %8 = getelementptr inbounds [2 x %"class.std::__cxx11::basic_string"], ptr @_Z4rowsB5cxx11, i64 0, i64 %7
  %9 = zext nneg i32 %1 to i64
  br label %10

10:                                               ; preds = %.lr.ph, %10
  %indvars.iv = phi i64 [ %9, %.lr.ph ], [ %indvars.iv.next, %10 ]
  %.02328 = phi i128 [ 0, %.lr.ph ], [ %.sext, %10 ]
  %11 = mul nsw i128 %.02328, 26
  %12 = srem i128 %11, 1344409044431
  %13 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %indvars.iv)
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = sext i8 %14 to i32
  %16 = add nsw i32 %15, -96
  %17 = sext i32 %16 to i128
  %18 = add nsw i128 %12, %17
  %.lhs.trunc = trunc nsw i128 %18 to i64
  %19 = srem i64 %.lhs.trunc, 1344409044431
  %.sext = sext i64 %19 to i128
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not = icmp eq i64 %indvars.iv, 0
  br i1 %.not, label %.lr.ph34, label %10, !llvm.loop !8

._crit_edge.._crit_edge35_crit_edge:              ; preds = %2
  %.pre = add nsw i32 %1, 1
  br label %._crit_edge35

.lr.ph34:                                         ; preds = %10
  %20 = sub nsw i32 1, %0
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [2 x %"class.std::__cxx11::basic_string"], ptr @_Z4rowsB5cxx11, i64 0, i64 %21
  %23 = add nuw i32 %1, 1
  %wide.trip.count = zext i32 %23 to i64
  br label %24

24:                                               ; preds = %.lr.ph34, %24
  %indvars.iv41 = phi i64 [ 0, %.lr.ph34 ], [ %indvars.iv.next42, %24 ]
  %.12431 = phi i128 [ %.sext, %.lr.ph34 ], [ %.sext27, %24 ]
  %25 = mul nsw i128 %.12431, 26
  %26 = srem i128 %25, 1344409044431
  %27 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %22, i64 noundef %indvars.iv41)
  %28 = load i8, ptr %27, align 1, !tbaa !5
  %29 = sext i8 %28 to i32
  %30 = add nsw i32 %29, -96
  %31 = sext i32 %30 to i128
  %32 = add nsw i128 %26, %31
  %.lhs.trunc26 = trunc nsw i128 %32 to i64
  %33 = srem i64 %.lhs.trunc26, 1344409044431
  %.sext27 = sext i64 %33 to i128
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next42, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge35, label %24, !llvm.loop !10

._crit_edge35:                                    ; preds = %24, %._crit_edge.._crit_edge35_crit_edge
  %.pre-phi = phi i32 [ %.pre, %._crit_edge.._crit_edge35_crit_edge ], [ %23, %24 ]
  %.124.lcssa = phi i128 [ 0, %._crit_edge.._crit_edge35_crit_edge ], [ %.sext27, %24 ]
  %34 = load i32, ptr @n, align 4, !tbaa !11
  %35 = sub nsw i32 %34, %.pre-phi
  %36 = shl nsw i32 %35, 1
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [1202 x i64], ptr @expo, i64 0, i64 %37
  %39 = load i64, ptr %38, align 16, !tbaa !13
  %40 = sext i64 %39 to i128
  %41 = mul nsw i128 %.124.lcssa, %40
  %42 = srem i128 %41, 1344409044431
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %43 = xor i32 %0, 1
  %44 = sext i32 %43 to i64
  %45 = sext i32 %.pre-phi to i64
  %46 = getelementptr inbounds [2 x [601 x %"class.std::unordered_set"]], ptr @allHash2, i64 0, i64 %44, i64 %45
  %47 = tail call ptr @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %46) #3
  store ptr %47, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %48 = tail call ptr @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %46) #3
  store ptr %48, ptr %4, align 8
  %49 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIxLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %49, label %.lr.ph38, label %._crit_edge39

._crit_edge39:                                    ; preds = %.lr.ph38, %._crit_edge35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret void

.lr.ph38:                                         ; preds = %._crit_edge35, %.lr.ph38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIxLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %51 = load i64, ptr %50, align 8, !tbaa !13
  %52 = sext i64 %51 to i128
  %53 = add nsw i128 %42, %52
  %54 = srem i128 %53, 1344409044431
  %55 = trunc nsw i128 %54 to i64
  store i64 %55, ptr %5, align 8, !tbaa !13
  %56 = call { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(56) @allHash, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %57 = call ptr @_ZNSt8__detail14_Node_iteratorIxLb1ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %58 = call ptr @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %46) #3
  store ptr %58, ptr %4, align 8
  %59 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIxLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %59, label %.lr.ph38, label %._crit_edge39, !llvm.loop !15
}

; 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 nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIxLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

; 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
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIxSt4hashIxESt8equal_toIxESaIxEE6insertEOx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !6, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !6, i64 0}
!15 = distinct !{!15, !9}


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