; LLVM IR from sgtlaugh/algovault :: code_library/discrete_logarithm.ll (Z12discrete_logiii)

; 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::tr1::unordered_map" = type { %"class.std::tr1::__unordered_map" }
%"class.std::tr1::__unordered_map" = type { %"class.std::tr1::_Hashtable" }
%"class.std::tr1::_Hashtable" = type { [8 x i8], ptr, i64, i64, %"struct.std::tr1::__detail::_Prime_rehash_policy" }
%"struct.std::tr1::__detail::_Prime_rehash_policy" = type { float, float, i64 }
%"struct.std::tr1::hash" = type { i8 }
%"struct.std::equal_to" = type { i8 }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4expoxii(i64 noundef, i32 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 @_Z12discrete_logiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::tr1::unordered_map", align 8
  %9 = alloca %"struct.std::tr1::hash", align 1
  %10 = alloca %"struct.std::equal_to", align 1
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @_ZNSaISt4pairIKiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt3tr113unordered_mapIiiNS_4hashIiEESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS2_RKS4_RKS8_(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 10, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %21 unwind label %39

21:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = sitofp i32 %22 to double
  %24 = fadd double %23, 5.000000e-01
  %25 = call double @sqrt(double noundef %24) #4
  %26 = fadd double %25, 1.000000e+00
  %27 = fptosi double %26 to i32
  store i32 %27, ptr %18, align 4, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %65, %21
  %29 = load i32, ptr %14, align 4, !tbaa !5
  %30 = load i32, ptr %18, align 4, !tbaa !5
  %31 = add nsw i32 %30, 3
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %33, label %72

33:                                               ; preds = %28
  %34 = load i32, ptr %17, align 4, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = icmp eq i32 %34, %35
  br i1 %36, label %37, label %43

37:                                               ; preds = %33
  %38 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %38, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %138

39:                                               ; preds = %3
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %12, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %13, align 4
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %141

43:                                               ; preds = %33
  %44 = load i32, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = load i32, ptr %17, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %46, %48
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = srem i64 %49, %51
  %53 = trunc i64 %52 to i32
  store i32 %53, ptr %20, align 4, !tbaa !5
  %54 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3tr18__detail9_Map_baseIiSt4pairIKiiESt10_Select1stIS4_ELb1ENS_10_HashtableIiS4_SaIS4_ES6_St8equal_toIiENS_4hashIiEENS0_18_Mod_range_hashingENS0_20_Default_ranged_hashENS0_20_Prime_rehash_policyELb0ELb0ELb1EEEEixERS3_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %55 unwind label %68

55:                                               ; preds = %43
  store i32 %44, ptr %54, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %56 = load i32, ptr %17, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = mul nsw i64 %57, %59
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = srem i64 %60, %62
  %64 = trunc i64 %63 to i32
  store i32 %64, ptr %17, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %55
  %66 = load i32, ptr %14, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %14, align 4, !tbaa !5
  br label %28, !llvm.loop !9

68:                                               ; preds = %43
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %12, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %140

72:                                               ; preds = %28
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = load i32, ptr %18, align 4, !tbaa !5
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = call noundef i32 @_Z4expoxii(i64 noundef %74, i32 noundef %75, i32 noundef %76)
  store i32 %77, ptr %17, align 4, !tbaa !5
  store i32 %77, ptr %15, align 4, !tbaa !5
  store i32 2, ptr %14, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %134, %72
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = load i32, ptr %18, align 4, !tbaa !5
  %81 = add nsw i32 %80, 3
  %82 = icmp slt i32 %79, %81
  br i1 %82, label %83, label %137

83:                                               ; preds = %78
  %84 = load i32, ptr %17, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = load i32, ptr %15, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = mul nsw i64 %85, %87
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = srem i64 %88, %90
  %92 = trunc i64 %91 to i32
  store i32 %92, ptr %17, align 4, !tbaa !5
  %93 = invoke noundef i64 @_ZNKSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EE5countERS2_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %94 unwind label %129

94:                                               ; preds = %83
  %95 = icmp ne i64 %93, 0
  br i1 %95, label %96, label %133

96:                                               ; preds = %94
  %97 = load i32, ptr %18, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = load i32, ptr %14, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %98, %100
  %102 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3tr18__detail9_Map_baseIiSt4pairIKiiESt10_Select1stIS4_ELb1ENS_10_HashtableIiS4_SaIS4_ES6_St8equal_toIiENS_4hashIiEENS0_18_Mod_range_hashingENS0_20_Default_ranged_hashENS0_20_Prime_rehash_policyELb0ELb0ELb1EEEEixERS3_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %103 unwind label %129

103:                                              ; preds = %96
  %104 = load i32, ptr %102, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = sub nsw i64 %101, %105
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = srem i64 %106, %108
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = add nsw i64 %109, %111
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = srem i64 %112, %114
  %116 = trunc i64 %115 to i32
  store i32 %116, ptr %16, align 4, !tbaa !5
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = call noundef i32 @_Z4expoxii(i64 noundef %118, i32 noundef %119, i32 noundef %120)
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = icmp eq i32 %121, %122
  br i1 %123, label %124, label %126

124:                                              ; preds = %103
  %125 = load i32, ptr %16, align 4, !tbaa !5
  br label %127

126:                                              ; preds = %103
  br label %127

127:                                              ; preds = %126, %124
  %128 = phi i32 [ %125, %124 ], [ -1, %126 ]
  store i32 %128, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %138

129:                                              ; preds = %96, %83
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %12, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %13, align 4
  br label %140

133:                                              ; preds = %94
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %14, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %14, align 4, !tbaa !5
  br label %78, !llvm.loop !11

137:                                              ; preds = %78
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %19, align 4
  br label %138

138:                                              ; preds = %137, %127, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %14) #4
  call void @_ZNSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  %139 = load i32, ptr %4, align 4
  ret i32 %139

140:                                              ; preds = %129, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %14) #4
  call void @_ZNSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  br label %141

141:                                              ; preds = %140, %39
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %12, align 8
  %144 = load i32, ptr %13, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3tr113unordered_mapIiiNS_4hashIiEESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS2_RKS4_RKS8_(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), 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 void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EE5countERS2_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { nounwind "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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !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::tr1::unordered_map" = type { %"class.std::tr1::__unordered_map" }
%"class.std::tr1::__unordered_map" = type { %"class.std::tr1::_Hashtable" }
%"class.std::tr1::_Hashtable" = type { [8 x i8], ptr, i64, i64, %"struct.std::tr1::__detail::_Prime_rehash_policy" }
%"struct.std::tr1::__detail::_Prime_rehash_policy" = type { float, float, i64 }
%"struct.std::tr1::hash" = type { i8 }
%"struct.std::equal_to" = type { i8 }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4expoxii(i64 noundef, i32 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 i32 @_Z12discrete_logiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::tr1::unordered_map", align 8
  %5 = alloca %"struct.std::tr1::hash", align 1
  %6 = alloca %"struct.std::equal_to", align 1
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaISt4pairIKiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt3tr113unordered_mapIiiNS_4hashIiEESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS2_RKS4_RKS8_(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef 10, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %10 unwind label %25

10:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %11 = sitofp i32 %2 to double
  %12 = fadd double %11, 5.000000e-01
  %13 = call double @sqrt(double noundef %12) #5
  %14 = fadd double %13, 1.000000e+00
  %15 = fptosi double %14 to i32
  %16 = add i32 %15, 3
  %17 = icmp sgt i32 %15, -3
  br i1 %17, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %10
  %.pre = sext i32 %0 to i64
  %18 = call noundef i32 @_Z4expoxii(i64 noundef %.pre, i32 noundef %15, i32 noundef %2)
  br label %.loopexit

.lr.ph:                                           ; preds = %10
  %19 = sext i32 %1 to i64
  %20 = sext i32 %2 to i64
  %21 = sext i32 %0 to i64
  %smax = call i32 @llvm.smax.i32(i32 %16, i32 1)
  br label %22

22:                                               ; preds = %.lr.ph, %33
  %23 = phi i32 [ 1, %.lr.ph ], [ %36, %33 ]
  %.03449 = phi i32 [ 0, %.lr.ph ], [ %37, %33 ]
  %24 = icmp eq i32 %23, %1
  br i1 %24, label %.loopexit, label %27

25:                                               ; preds = %3
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %71

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %28 = sext i32 %23 to i64
  %29 = mul nsw i64 %28, %19
  %30 = srem i64 %29, %20
  %31 = trunc nsw i64 %30 to i32
  store i32 %31, ptr %9, align 4, !tbaa !5
  %32 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3tr18__detail9_Map_baseIiSt4pairIKiiESt10_Select1stIS4_ELb1ENS_10_HashtableIiS4_SaIS4_ES6_St8equal_toIiENS_4hashIiEENS0_18_Mod_range_hashingENS0_20_Default_ranged_hashENS0_20_Prime_rehash_policyELb0ELb0ELb1EEEEixERS3_(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %33 unwind label %38

33:                                               ; preds = %27
  store i32 %.03449, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %34 = mul nsw i64 %28, %21
  %35 = srem i64 %34, %20
  %36 = trunc nsw i64 %35 to i32
  %37 = add nuw nsw i32 %.03449, 1
  %exitcond.not = icmp eq i32 %37, %smax
  br i1 %exitcond.not, label %._crit_edge, label %22, !llvm.loop !9

38:                                               ; preds = %27
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %70

._crit_edge:                                      ; preds = %33
  %40 = call noundef i32 @_Z4expoxii(i64 noundef %21, i32 noundef %15, i32 noundef %2)
  store i32 %40, ptr %8, align 4, !tbaa !5
  %41 = icmp sgt i32 %15, -1
  br i1 %41, label %.lr.ph52, label %.loopexit

.lr.ph52:                                         ; preds = %._crit_edge
  %42 = sext i32 %40 to i64
  %43 = sext i32 %2 to i64
  %smax58 = call i32 @llvm.smax.i32(i32 %16, i32 3)
  br label %44

44:                                               ; preds = %.lr.ph52, %68
  %.13550 = phi i32 [ 2, %.lr.ph52 ], [ %69, %68 ]
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = mul nsw i64 %46, %42
  %48 = srem i64 %47, %43
  %49 = trunc nsw i64 %48 to i32
  store i32 %49, ptr %8, align 4, !tbaa !5
  %50 = invoke noundef i64 @_ZNKSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EE5countERS2_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %51 unwind label %.loopexit40

51:                                               ; preds = %44
  %.not = icmp eq i64 %50, 0
  br i1 %.not, label %68, label %52

52:                                               ; preds = %51
  %53 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3tr18__detail9_Map_baseIiSt4pairIKiiESt10_Select1stIS4_ELb1ENS_10_HashtableIiS4_SaIS4_ES6_St8equal_toIiENS_4hashIiEENS0_18_Mod_range_hashingENS0_20_Default_ranged_hashENS0_20_Prime_rehash_policyELb0ELb0ELb1EEEEixERS3_(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %54 unwind label %.loopexit.split-lp

54:                                               ; preds = %52
  %55 = zext nneg i32 %15 to i64
  %56 = zext nneg i32 %.13550 to i64
  %57 = mul nuw nsw i64 %56, %55
  %58 = load i32, ptr %53, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = sub nsw i64 %57, %59
  %61 = srem i64 %60, %43
  %62 = add nsw i64 %61, %43
  %63 = srem i64 %62, %43
  %64 = trunc nsw i64 %63 to i32
  %65 = call noundef i32 @_Z4expoxii(i64 noundef %21, i32 noundef %64, i32 noundef %2)
  %66 = icmp eq i32 %65, %1
  %67 = select i1 %66, i32 %64, i32 -1
  br label %.loopexit

.loopexit40:                                      ; preds = %44
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %70

.loopexit.split-lp:                               ; preds = %52
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %70

68:                                               ; preds = %51
  %69 = add nuw nsw i32 %.13550, 1
  %exitcond59.not = icmp eq i32 %69, %smax58
  br i1 %exitcond59.not, label %.loopexit, label %44, !llvm.loop !11

.loopexit:                                        ; preds = %22, %68, %._crit_edge.thread, %._crit_edge, %54
  %.0 = phi i32 [ %67, %54 ], [ -1, %._crit_edge ], [ -1, %._crit_edge.thread ], [ -1, %68 ], [ %.03449, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZNSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  ret i32 %.0

70:                                               ; preds = %.loopexit40, %.loopexit.split-lp, %38
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %lpad.loopexit, %.loopexit40 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZNSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  br label %71

71:                                               ; preds = %70, %25
  %.pn.pn = phi { ptr, i32 } [ %.pn, %70 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3tr113unordered_mapIiiNS_4hashIiEESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS2_RKS4_RKS8_(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), 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 void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3tr110_HashtableIiSt4pairIKiiESaIS3_ESt10_Select1stIS3_ESt8equal_toIiENS_4hashIiEENS_8__detail18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyELb0ELb0ELb1EE5countERS2_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

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

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 = { mustprogress nofree nounwind willreturn memory(write) "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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}


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