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

; 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::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: 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 noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

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

; 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
declare dso_local void @_ZN11galoisfieldrmERKNS_9GFieldPolES2_(ptr dead_on_unwind noalias writable sret(%"class.galoisfield::GFieldPol") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11galoisfield3gcdERKNS_9GFieldPolES2_(ptr dead_on_unwind noalias writable sret(%"class.galoisfield::GFieldPol") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca %"class.galoisfield::GFieldPol", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.galoisfield::GFieldPol", align 8
  %12 = alloca %"class.galoisfield::GFieldPol", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call noundef ptr @_ZNK11galoisfield9GFieldPol5fieldEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call noundef ptr @_ZNK11galoisfield9GFieldPol5fieldEv(ptr noundef nonnull align 8 dereferenceable(32) %15)
  %17 = call noundef zeroext i1 @_ZN11galoisfield6GFieldeqERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %14, ptr noundef nonnull align 8 dereferenceable(64) %16)
  br i1 %17, label %18, label %79

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  br i1 %20, label %25, label %21

21:                                               ; preds = %18
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  call void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null, i32 noundef 0, ptr noundef null)
  br label %80

25:                                               ; preds = %21, %18
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %26)
  br i1 %27, label %30, label %28

28:                                               ; preds = %25
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %29)
  br label %80

30:                                               ; preds = %25
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  br i1 %32, label %35, label %33

33:                                               ; preds = %30
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %34)
  br label %80

35:                                               ; preds = %30
  store i1 false, ptr %7, align 1
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11galoisfieldrmERKNS_9GFieldPolES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldPol") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(32) %37)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %38)
          to label %39 unwind label %51

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  invoke void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %40 unwind label %55

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %50, %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  invoke void @_ZN11galoisfieldrmERKNS_9GFieldPolES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldPol") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %42 unwind label %59

42:                                               ; preds = %41
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPolaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %44 unwind label %63

44:                                               ; preds = %42
  %45 = call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %43)
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br i1 %45, label %46, label %72

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPolaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %48 unwind label %68

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPolaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %50 unwind label %68

50:                                               ; preds = %48
  br label %41, !llvm.loop !9

51:                                               ; preds = %35
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  br label %76

55:                                               ; preds = %39
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  br label %75

59:                                               ; preds = %41
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  br label %67

63:                                               ; preds = %42
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %67

67:                                               ; preds = %63, %59
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %74

68:                                               ; preds = %48, %46
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  br label %74

72:                                               ; preds = %44
  store i1 true, ptr %7, align 1
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  %73 = load i1, ptr %7, align 1
  br i1 %73, label %78, label %77

74:                                               ; preds = %68, %67
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %75

75:                                               ; preds = %74, %55
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %76

76:                                               ; preds = %75, %51
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %81

77:                                               ; preds = %72
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %78

78:                                               ; preds = %77, %72
  br label %80

79:                                               ; preds = %3
  call void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null, i32 noundef 0, ptr noundef null)
  br label %80

80:                                               ; preds = %79, %78, %33, %28, %24
  ret void

81:                                               ; preds = %76
  %82 = load ptr, ptr %9, align 8
  %83 = load i32, ptr %10, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

declare noundef zeroext i1 @_ZN11galoisfield6GFieldeqERKS0_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #3

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

declare void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr, 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 = { 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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; 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::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 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 noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

; 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
declare dso_local void @_ZN11galoisfieldrmERKNS_9GFieldPolES2_(ptr dead_on_unwind noalias writable sret(%"class.galoisfield::GFieldPol") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11galoisfield3gcdERKNS_9GFieldPolES2_(ptr dead_on_unwind noalias writable sret(%"class.galoisfield::GFieldPol") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.galoisfield::GFieldPol", align 8
  %5 = alloca %"class.galoisfield::GFieldPol", align 8
  %6 = alloca %"class.galoisfield::GFieldPol", align 8
  %7 = tail call noundef ptr @_ZNK11galoisfield9GFieldPol5fieldEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %8 = tail call noundef ptr @_ZNK11galoisfield9GFieldPol5fieldEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %9 = tail call noundef zeroext i1 @_ZN11galoisfield6GFieldeqERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %7, ptr noundef nonnull align 8 dereferenceable(64) %8)
  br i1 %9, label %10, label %46

10:                                               ; preds = %3
  %11 = tail call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %11, label %15, label %12

12:                                               ; preds = %10
  %13 = tail call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  br i1 %13, label %15, label %14

14:                                               ; preds = %12
  tail call void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null, i32 noundef 0, ptr noundef null)
  br label %47

15:                                               ; preds = %12, %10
  %16 = tail call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %16, label %18, label %17

17:                                               ; preds = %15
  tail call void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %2)
  br label %47

18:                                               ; preds = %15
  %19 = tail call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  br i1 %19, label %21, label %20

20:                                               ; preds = %18
  tail call void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  br label %47

21:                                               ; preds = %18
  tail call void @_ZN11galoisfieldrmERKNS_9GFieldPolES2_(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldPol") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  invoke void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %22 unwind label %31

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  invoke void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %.preheader unwind label %33

.preheader:                                       ; preds = %22, %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  invoke void @_ZN11galoisfieldrmERKNS_9GFieldPolES2_(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldPol") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %23 unwind label %35

23:                                               ; preds = %.preheader
  %24 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPolaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %25 unwind label %37

25:                                               ; preds = %23
  %26 = call noundef zeroext i1 @_ZNK11galoisfield9GFieldPol5validEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br i1 %26, label %27, label %42

27:                                               ; preds = %25
  %28 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPolaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %29 unwind label %40

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11galoisfield9GFieldPolaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %.preheader unwind label %40, !llvm.loop !5

31:                                               ; preds = %21
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %45

33:                                               ; preds = %22
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %44

35:                                               ; preds = %.preheader
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %39

37:                                               ; preds = %23
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %43

40:                                               ; preds = %29, %27
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %43

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

43:                                               ; preds = %40, %39
  %.pn18 = phi { ptr, i32 } [ %41, %40 ], [ %.pn, %39 ]
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  br label %44

44:                                               ; preds = %43, %33
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %43 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %45

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

46:                                               ; preds = %3
  tail call void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null, i32 noundef 0, ptr noundef null)
  br label %47

47:                                               ; preds = %42, %46, %20, %17, %14
  ret void
}

declare noundef zeroext i1 @_ZN11galoisfield6GFieldeqERKS0_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #3

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

declare void @_ZN11galoisfield9GFieldPolC1ERKS0_(ptr, 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 = { 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 = { "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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass