; LLVM IR from gbanegas/CryptoSith :: gf/GFieldPol.ll (ZN11galoisfield9GFieldPoldVERKS0_)

; 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.galoisfield::GFieldElement" = type <{ ptr, i32, [4 x i8] }>
%"class.galoisfield::GFieldPol" = type { ptr, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl" }
%"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

declare void @_ZN11galoisfieldmlERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPoldVERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.galoisfield::GFieldPol", align 8
  %6 = alloca %"class.galoisfield::GFieldPol", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.galoisfield::GFieldElement", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.galoisfield::GFieldElement", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.galoisfield::GFieldElement", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.galoisfield::GFieldElement", align 8
  %23 = alloca %"class.galoisfield::GFieldElement", align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %3, align 8
  %32 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = icmp eq ptr %33, %36
  br i1 %37, label %38, label %248

38:                                               ; preds = %2
  %39 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %40)
  %42 = icmp uge i32 %39, %41
  br i1 %42, label %43, label %248

43:                                               ; preds = %38
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  %46 = icmp uge i32 %45, 0
  br i1 %46, label %47, label %248

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  %48 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %31, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %51)
  %53 = sub i32 %50, %52
  %54 = add i32 %53, 1
  call void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %49, i32 noundef %54, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  %55 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %31, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %57)
  %59 = sub i32 %58, 1
  invoke void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %56, i32 noundef %59, ptr noundef null)
          to label %60 unwind label %66

60:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %61 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  store i32 %61, ptr %9, align 4, !tbaa !15
  br label %62

62:                                               ; preds = %232, %60
  %63 = load i32, ptr %9, align 4, !tbaa !15
  %64 = icmp sge i32 %63, 0
  br i1 %64, label %70, label %65

65:                                               ; preds = %62
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %236

66:                                               ; preds = %47
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  br label %247

70:                                               ; preds = %62
  %71 = load i32, ptr %9, align 4, !tbaa !15
  %72 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %74, label %190

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %75 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  store i32 %75, ptr %12, align 4, !tbaa !15
  %76 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %77 unwind label %94

77:                                               ; preds = %74
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %79)
  store i32 %80, ptr %13, align 4, !tbaa !15
  %81 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZNK11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %78, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %82 unwind label %98

82:                                               ; preds = %77
  invoke void @_ZN11galoisfielddvERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8 %11, ptr noundef nonnull align 8 dereferenceable(12) %76, ptr noundef nonnull align 8 dereferenceable(12) %81)
          to label %83 unwind label %98

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %84 = load i32, ptr %9, align 4, !tbaa !15
  store i32 %84, ptr %14, align 4, !tbaa !15
  %85 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %86 unwind label %102

86:                                               ; preds = %83
  %87 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %85, ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %88 unwind label %102

88:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %89 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  store i32 %89, ptr %15, align 4, !tbaa !15
  br label %90

90:                                               ; preds = %127, %88
  %91 = load i32, ptr %15, align 4, !tbaa !15
  %92 = icmp sgt i32 %91, 0
  br i1 %92, label %108, label %93

93:                                               ; preds = %90
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %154

94:                                               ; preds = %74
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  br label %107

98:                                               ; preds = %82, %77
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %7, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %8, align 4
  br label %106

102:                                              ; preds = %86, %83
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #5
  br label %106

106:                                              ; preds = %102, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %107

107:                                              ; preds = %106, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %235

108:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %109 = load i32, ptr %15, align 4, !tbaa !15
  %110 = sub nsw i32 %109, 1
  store i32 %110, ptr %17, align 4, !tbaa !15
  %111 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %112 unwind label %130

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %113 = load i32, ptr %9, align 4, !tbaa !15
  store i32 %113, ptr %19, align 4, !tbaa !15
  %114 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %115 unwind label %134

115:                                              ; preds = %112
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %117 = load i32, ptr %15, align 4, !tbaa !15
  store i32 %117, ptr %20, align 4, !tbaa !15
  %118 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZNK11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %116, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %119 unwind label %138

119:                                              ; preds = %115
  invoke void @_ZN11galoisfieldmlERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8 %18, ptr noundef nonnull align 8 dereferenceable(12) %114, ptr noundef nonnull align 8 dereferenceable(12) %118)
          to label %120 unwind label %138

120:                                              ; preds = %119
  invoke void @_ZN11galoisfieldplERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8 %16, ptr noundef nonnull align 8 dereferenceable(12) %111, ptr noundef nonnull align 8 dereferenceable(12) %18)
          to label %121 unwind label %142

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %122 = load i32, ptr %15, align 4, !tbaa !15
  store i32 %122, ptr %21, align 4, !tbaa !15
  %123 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %124 unwind label %146

124:                                              ; preds = %121
  %125 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %123, ptr noundef nonnull align 8 dereferenceable(12) %16)
          to label %126 unwind label %146

126:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %16) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %15, align 4, !tbaa !15
  %129 = add nsw i32 %128, -1
  store i32 %129, ptr %15, align 4, !tbaa !15
  br label %90, !llvm.loop !17

130:                                              ; preds = %108
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  br label %153

134:                                              ; preds = %112
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %7, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %8, align 4
  br label %152

138:                                              ; preds = %119, %115
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  br label %151

142:                                              ; preds = %120
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %7, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %8, align 4
  br label %150

146:                                              ; preds = %124, %121
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %7, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %16) #5
  br label %150

150:                                              ; preds = %146, %142
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %18) #5
  br label %151

151:                                              ; preds = %150, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %152

152:                                              ; preds = %151, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %153

153:                                              ; preds = %152, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %235

154:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %155 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %31, i32 0, i32 1
  %156 = load i32, ptr %9, align 4, !tbaa !15
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11galoisfield13GFieldElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %155, i64 noundef %157) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %159 = load i32, ptr %9, align 4, !tbaa !15
  store i32 %159, ptr %24, align 4, !tbaa !15
  %160 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %161 unwind label %171

161:                                              ; preds = %154
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !15
  %163 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZNK11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %162, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %164 unwind label %175

164:                                              ; preds = %161
  invoke void @_ZN11galoisfieldmlERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8 %23, ptr noundef nonnull align 8 dereferenceable(12) %160, ptr noundef nonnull align 8 dereferenceable(12) %163)
          to label %165 unwind label %175

165:                                              ; preds = %164
  invoke void @_ZN11galoisfieldplERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8 %22, ptr noundef nonnull align 8 dereferenceable(12) %158, ptr noundef nonnull align 8 dereferenceable(12) %23)
          to label %166 unwind label %179

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 0, ptr %26, align 4, !tbaa !15
  %167 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %168 unwind label %183

168:                                              ; preds = %166
  %169 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %167, ptr noundef nonnull align 8 dereferenceable(12) %22)
          to label %170 unwind label %183

170:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %22) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %231

171:                                              ; preds = %154
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %7, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %8, align 4
  br label %189

175:                                              ; preds = %164, %161
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %7, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %8, align 4
  br label %188

179:                                              ; preds = %165
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %7, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %8, align 4
  br label %187

183:                                              ; preds = %168, %166
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %7, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %22) #5
  br label %187

187:                                              ; preds = %183, %179
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %23) #5
  br label %188

188:                                              ; preds = %187, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %189

189:                                              ; preds = %188, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %235

190:                                              ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %191 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  store i32 %191, ptr %27, align 4, !tbaa !15
  br label %192

192:                                              ; preds = %206, %190
  %193 = load i32, ptr %27, align 4, !tbaa !15
  %194 = icmp sgt i32 %193, 0
  br i1 %194, label %196, label %195

195:                                              ; preds = %192
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %218

196:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %197 = load i32, ptr %27, align 4, !tbaa !15
  %198 = sub nsw i32 %197, 1
  store i32 %198, ptr %28, align 4, !tbaa !15
  %199 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %200 unwind label %209

200:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %201 = load i32, ptr %27, align 4, !tbaa !15
  store i32 %201, ptr %29, align 4, !tbaa !15
  %202 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %203 unwind label %213

203:                                              ; preds = %200
  %204 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %202, ptr noundef nonnull align 8 dereferenceable(12) %199)
          to label %205 unwind label %213

205:                                              ; preds = %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %27, align 4, !tbaa !15
  %208 = add nsw i32 %207, -1
  store i32 %208, ptr %27, align 4, !tbaa !15
  br label %192, !llvm.loop !19

209:                                              ; preds = %196
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %7, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %8, align 4
  br label %217

213:                                              ; preds = %203, %200
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %7, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %217

217:                                              ; preds = %213, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %235

218:                                              ; preds = %195
  %219 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %31, i32 0, i32 1
  %220 = load i32, ptr %9, align 4, !tbaa !15
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11galoisfield13GFieldElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %219, i64 noundef %221) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !15
  %223 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %224 unwind label %227

224:                                              ; preds = %218
  %225 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %223, ptr noundef nonnull align 8 dereferenceable(12) %222)
          to label %226 unwind label %227

226:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %231

227:                                              ; preds = %224, %218
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %7, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %235

231:                                              ; preds = %226, %170
  br label %232

232:                                              ; preds = %231
  %233 = load i32, ptr %9, align 4, !tbaa !15
  %234 = add nsw i32 %233, -1
  store i32 %234, ptr %9, align 4, !tbaa !15
  br label %62, !llvm.loop !20

235:                                              ; preds = %227, %217, %189, %153, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %246

236:                                              ; preds = %65
  invoke void @_ZN11galoisfield9GFieldPol8simplifyERS0_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %237 unwind label %242

237:                                              ; preds = %236
  %238 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %5, i32 0, i32 1
  %239 = getelementptr inbounds %"class.galoisfield::GFieldPol", ptr %31, i32 0, i32 1
  %240 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN11galoisfield13GFieldElementESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %239, ptr noundef nonnull align 8 dereferenceable(24) %238)
          to label %241 unwind label %242

241:                                              ; preds = %237
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  br label %248

242:                                              ; preds = %237, %236
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %7, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %8, align 4
  br label %246

246:                                              ; preds = %242, %235
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %247

247:                                              ; preds = %246, %66
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  br label %249

248:                                              ; preds = %241, %43, %38, %2
  ret ptr %31

249:                                              ; preds = %247
  %250 = load ptr, ptr %7, align 8
  %251 = load i32, ptr %8, align 4
  %252 = insertvalue { ptr, i32 } poison, ptr %250, 0
  %253 = insertvalue { ptr, i32 } %252, i32 %251, 1
  resume { ptr, i32 } %253
}

declare void @_ZN11galoisfielddvERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #4

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

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

declare void @_ZN11galoisfieldplERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #4

declare void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr, ptr, i32, ptr)

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


; 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.galoisfield::GFieldElement" = type <{ ptr, i32, [4 x i8] }>
%"class.galoisfield::GFieldPol" = type { ptr, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl" }
%"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<galoisfield::GFieldElement, std::allocator<galoisfield::GFieldElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) 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) #0

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

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

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

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

declare void @_ZN11galoisfieldmlERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPoldVERKS0_(ptr noundef nonnull returned align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.galoisfield::GFieldPol", align 8
  %4 = alloca %"class.galoisfield::GFieldPol", align 8
  %5 = alloca %"class.galoisfield::GFieldElement", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.galoisfield::GFieldElement", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.galoisfield::GFieldElement", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.galoisfield::GFieldElement", align 8
  %16 = alloca %"class.galoisfield::GFieldElement", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = icmp eq ptr %23, %24
  br i1 %25, label %26, label %110

26:                                               ; preds = %2
  %27 = tail call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %28 = tail call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.not = icmp ult i32 %27, %28
  br i1 %.not, label %110, label %29

29:                                               ; preds = %26
  %30 = tail call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  %31 = load ptr, ptr %0, align 8, !tbaa !5
  %32 = tail call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %33 = tail call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %34 = add i32 %32, 1
  %35 = sub i32 %34, %33
  call void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %31, i32 noundef %35, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %38 = add i32 %37, -1
  invoke void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %36, i32 noundef %38, ptr noundef null)
          to label %39 unwind label %44

39:                                               ; preds = %29
  %40 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %41 = icmp sgt i32 %40, -1
  br i1 %41, label %.lr.ph50, label %._crit_edge51

.lr.ph50:                                         ; preds = %39
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = zext nneg i32 %40 to i64
  br label %46

._crit_edge51:                                    ; preds = %99, %39
  invoke void @_ZN11galoisfield9GFieldPol8simplifyERS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %101 unwind label %106

44:                                               ; preds = %29
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %109

46:                                               ; preds = %.lr.ph50, %99
  %indvars.iv = phi i64 [ %43, %.lr.ph50 ], [ %indvars.iv.next, %99 ]
  %47 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %48 = sext i32 %47 to i64
  %.not36 = icmp sgt i64 %indvars.iv, %48
  br i1 %.not36, label %88, label %49

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %50 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  store i32 %50, ptr %6, align 4, !tbaa !14
  %51 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %52 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  store i32 %52, ptr %7, align 4, !tbaa !14
  %53 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %7)
  invoke void @_ZN11galoisfielddvERKNS_13GFieldElementES2_(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldElement") align 8 %5, ptr noundef nonnull align 8 dereferenceable(12) %51, ptr noundef nonnull align 8 dereferenceable(12) %53)
          to label %54 unwind label %63

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %55 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %55, ptr %8, align 4, !tbaa !14
  %56 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %57 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %56, ptr noundef nonnull align 8 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %58 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %70, %54
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  %60 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11galoisfield13GFieldElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %indvars.iv) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #5
  store i32 %55, ptr %17, align 4, !tbaa !14
  %61 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #5
  store i32 0, ptr %18, align 4, !tbaa !14
  %62 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %18)
  invoke void @_ZN11galoisfieldmlERKNS_13GFieldElementES2_(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldElement") align 8 %16, ptr noundef nonnull align 8 dereferenceable(12) %61, ptr noundef nonnull align 8 dereferenceable(12) %62)
          to label %79 unwind label %83

63:                                               ; preds = %49
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %108

.lr.ph:                                           ; preds = %54, %70
  %.02843 = phi i32 [ %65, %70 ], [ %58, %54 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %65 = add nsw i32 %.02843, -1
  store i32 %65, ptr %10, align 4, !tbaa !14
  %66 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store i32 %55, ptr %12, align 4, !tbaa !14
  %67 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  store i32 %.02843, ptr %13, align 4, !tbaa !14
  %68 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %13)
  invoke void @_ZN11galoisfieldmlERKNS_13GFieldElementES2_(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldElement") align 8 %11, ptr noundef nonnull align 8 dereferenceable(12) %67, ptr noundef nonnull align 8 dereferenceable(12) %68)
          to label %69 unwind label %74

69:                                               ; preds = %.lr.ph
  invoke void @_ZN11galoisfieldplERKNS_13GFieldElementES2_(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldElement") align 8 %9, ptr noundef nonnull align 8 dereferenceable(12) %66, ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %70 unwind label %76

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  store i32 %.02843, ptr %14, align 4, !tbaa !14
  %71 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %72 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %71, ptr noundef nonnull align 8 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %9) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  %73 = icmp ugt i32 %.02843, 1
  br i1 %73, label %.lr.ph, label %._crit_edge, !llvm.loop !16

74:                                               ; preds = %.lr.ph
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %69
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #5
  br label %78

78:                                               ; preds = %76, %74
  %.pn38 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %108

79:                                               ; preds = %._crit_edge
  invoke void @_ZN11galoisfieldplERKNS_13GFieldElementES2_(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldElement") align 8 %15, ptr noundef nonnull align 8 dereferenceable(12) %60, ptr noundef nonnull align 8 dereferenceable(12) %16)
          to label %80 unwind label %85

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #5
  store i32 0, ptr %19, align 4, !tbaa !14
  %81 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %82 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %81, ptr noundef nonnull align 8 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %15) #5
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %99

83:                                               ; preds = %._crit_edge
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %79
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %16) #5
  br label %87

87:                                               ; preds = %85, %83
  %.pn = phi { ptr, i32 } [ %86, %85 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %108

88:                                               ; preds = %46
  %89 = call noundef i32 @_ZNK11galoisfield9GFieldPol3degEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %.lr.ph46, label %._crit_edge47

._crit_edge47:                                    ; preds = %.lr.ph46, %88
  %91 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11galoisfield13GFieldElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %indvars.iv) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #5
  store i32 0, ptr %22, align 4, !tbaa !14
  %92 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %93 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %92, ptr noundef nonnull align 8 dereferenceable(12) %91)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  br label %99

.lr.ph46:                                         ; preds = %88, %.lr.ph46
  %.044 = phi i32 [ %94, %.lr.ph46 ], [ %89, %88 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #5
  %94 = add nsw i32 %.044, -1
  store i32 %94, ptr %20, align 4, !tbaa !14
  %95 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #5
  store i32 %.044, ptr %21, align 4, !tbaa !14
  %96 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield9GFieldPolixERKj(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %97 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN11galoisfield13GFieldElementaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %96, ptr noundef nonnull align 8 dereferenceable(12) %95)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #5
  %98 = icmp ugt i32 %.044, 1
  br i1 %98, label %.lr.ph46, label %._crit_edge47, !llvm.loop !18

99:                                               ; preds = %80, %._crit_edge47
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %100 = icmp sgt i64 %indvars.iv, 0
  br i1 %100, label %46, label %._crit_edge51, !llvm.loop !19

101:                                              ; preds = %._crit_edge51
  %102 = getelementptr inbounds i8, ptr %3, i64 8
  %103 = getelementptr inbounds i8, ptr %0, i64 8
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN11galoisfield13GFieldElementESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %103, ptr noundef nonnull align 8 dereferenceable(24) %102)
          to label %105 unwind label %106

105:                                              ; preds = %101
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %110

106:                                              ; preds = %101, %._crit_edge51
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %108

108:                                              ; preds = %63, %78, %87, %106
  %.pn38.pn.pn = phi { ptr, i32 } [ %107, %106 ], [ %.pn38, %78 ], [ %.pn, %87 ], [ %64, %63 ]
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %109

109:                                              ; preds = %108, %44
  %.pn38.pn.pn.pn = phi { ptr, i32 } [ %.pn38.pn.pn, %108 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn38.pn.pn.pn

110:                                              ; preds = %105, %26, %2
  ret ptr %0
}

declare void @_ZN11galoisfielddvERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #4

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

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

declare void @_ZN11galoisfieldplERKNS_13GFieldElementES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldElement") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #4

declare void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr, ptr, i32, ptr) local_unnamed_addr

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


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