; LLVM IR from gbanegas/CryptoSith :: gf (GFieldDerivTest)

; 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::GField" = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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 }

@galois_field = external dso_local global %"class.galoisfield::GField", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [5 x %"class.galoisfield::GFieldElement"], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.galoisfield::GFieldPol", align 8
  %11 = alloca %"class.galoisfield::GFieldPol", align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_6GFieldE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(64) @galois_field)
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #8
  store ptr %6, ptr %7, align 8
  %16 = invoke noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 1)
          to label %17 unwind label %48

17:                                               ; preds = %2
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef @galois_field, i32 noundef %16)
          to label %18 unwind label %48

18:                                               ; preds = %17
  %19 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %6, i64 1
  store ptr %19, ptr %7, align 8
  %20 = invoke noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 1)
          to label %21 unwind label %48

21:                                               ; preds = %18
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %19, ptr noundef @galois_field, i32 noundef %20)
          to label %22 unwind label %48

22:                                               ; preds = %21
  %23 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %6, i64 2
  store ptr %23, ptr %7, align 8
  %24 = invoke noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 5)
          to label %25 unwind label %48

25:                                               ; preds = %22
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %23, ptr noundef @galois_field, i32 noundef %24)
          to label %26 unwind label %48

26:                                               ; preds = %25
  %27 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %6, i64 3
  store ptr %27, ptr %7, align 8
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef @galois_field, i32 noundef 0)
          to label %28 unwind label %48

28:                                               ; preds = %26
  %29 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %6, i64 4
  store ptr %29, ptr %7, align 8
  %30 = invoke noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 5)
          to label %31 unwind label %48

31:                                               ; preds = %28
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %29, ptr noundef @galois_field, i32 noundef %30)
          to label %32 unwind label %48

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  %33 = getelementptr inbounds [5 x %"class.galoisfield::GFieldElement"], ptr %6, i64 0, i64 0
  invoke void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @galois_field, i32 noundef 4, ptr noundef %33)
          to label %34 unwind label %59

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %36 unwind label %63

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_9GFieldPolE(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %38 unwind label %63

38:                                               ; preds = %36
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %40 unwind label %63

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %42 unwind label %63

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  invoke void @_ZN11galoisfield9GFieldPol10derivativeEv(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldPol") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %43 unwind label %67

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

45:                                               ; preds = %43
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %47 unwind label %71

47:                                               ; preds = %45
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  call void @exit(i32 noundef 0) #9
  unreachable

48:                                               ; preds = %31, %28, %26, %25, %22, %21, %18, %17, %2
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %8, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %9, align 4
  %52 = load ptr, ptr %7, align 8
  %53 = icmp eq ptr %6, %52
  br i1 %53, label %58, label %54

54:                                               ; preds = %54, %48
  %55 = phi ptr [ %52, %48 ], [ %56, %54 ]
  %56 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %55, i64 -1
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %56) #8
  %57 = icmp eq ptr %56, %6
  br i1 %57, label %58, label %54

58:                                               ; preds = %54, %48
  br label %85

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

63:                                               ; preds = %40, %38, %36, %34
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %8, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %9, align 4
  br label %76

67:                                               ; preds = %42
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %8, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %9, align 4
  br label %75

71:                                               ; preds = %45, %43
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %8, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %9, align 4
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %75

75:                                               ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  br label %76

76:                                               ; preds = %75, %63
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %77

77:                                               ; preds = %76, %59
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  %78 = getelementptr inbounds [5 x %"class.galoisfield::GFieldElement"], ptr %6, i32 0, i32 0
  %79 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %78, i64 5
  br label %80

80:                                               ; preds = %80, %77
  %81 = phi ptr [ %79, %77 ], [ %82, %80 ]
  %82 = getelementptr inbounds %"class.galoisfield::GFieldElement", ptr %81, i64 -1
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %82) #8
  %83 = icmp eq ptr %82, %78
  br i1 %83, label %84, label %80

84:                                               ; preds = %80
  br label %85

85:                                               ; preds = %84, %58
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #8
  br label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr %8, align 8
  %88 = load i32, ptr %9, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_6GFieldE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64)) #1

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #1

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

declare void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_9GFieldPolE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare void @_ZN11galoisfield9GFieldPol10derivativeEv(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldPol") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #7

attributes #0 = { mustprogress norecurse 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 = { "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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { noreturn 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; 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::GField" = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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 }

@galois_field = external dso_local global %"class.galoisfield::GField", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse noreturn uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca [5 x %"class.galoisfield::GFieldElement"], align 16
  %4 = alloca %"class.galoisfield::GFieldPol", align 8
  %5 = alloca %"class.galoisfield::GFieldPol", align 8
  %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_6GFieldE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(64) @galois_field)
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #8
  %10 = tail call noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 1)
  call void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull @galois_field, i32 noundef %10)
  %11 = getelementptr inbounds i8, ptr %3, i64 16
  %12 = call noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 1)
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull @galois_field, i32 noundef %12)
          to label %13 unwind label %36

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %3, i64 32
  %15 = call noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 5)
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %14, ptr noundef nonnull @galois_field, i32 noundef %15)
          to label %16 unwind label %36

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %3, i64 48
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %17, ptr noundef nonnull @galois_field, i32 noundef 0)
          to label %18 unwind label %36

18:                                               ; preds = %16
  %19 = getelementptr inbounds i8, ptr %3, i64 64
  %20 = call noundef i32 @_ZNK11galoisfield6GField5alphaEi(ptr noundef nonnull align 8 dereferenceable(64) @galois_field, i32 noundef 5)
  invoke void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12) %19, ptr noundef nonnull @galois_field, i32 noundef %20)
          to label %21 unwind label %36

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  invoke void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @galois_field, i32 noundef 4, ptr noundef nonnull %3)
          to label %22 unwind label %42

22:                                               ; preds = %21
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %24 unwind label %44

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_9GFieldPolE(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %26 unwind label %44

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %28 unwind label %44

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %30 unwind label %44

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  invoke void @_ZN11galoisfield9GFieldPol10derivativeEv(ptr dead_on_unwind nonnull writable sret(%"class.galoisfield::GFieldPol") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %31 unwind label %46

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_9GFieldPolE(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %33 unwind label %48

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %35 unwind label %48

35:                                               ; preds = %33
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @exit(i32 noundef 0) #9
  unreachable

36:                                               ; preds = %18, %16, %13, %2
  %.06 = phi ptr [ %19, %18 ], [ %17, %16 ], [ %14, %13 ], [ %11, %2 ]
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %38

38:                                               ; preds = %36, %38
  %39 = phi ptr [ %.06, %36 ], [ %40, %38 ]
  %40 = getelementptr inbounds i8, ptr %39, i64 -16
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %40) #8
  %41 = icmp eq ptr %40, %3
  br i1 %41, label %.loopexit, label %38

42:                                               ; preds = %21
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

44:                                               ; preds = %28, %26, %24, %22
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %51

46:                                               ; preds = %30
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %33, %31
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %51

51:                                               ; preds = %50, %44
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %45, %44 ]
  call void @_ZN11galoisfield9GFieldPolD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %51, %42
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %51 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  %52 = getelementptr inbounds i8, ptr %3, i64 64
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %52) #8
  %53 = getelementptr inbounds i8, ptr %3, i64 48
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %53) #8
  %54 = getelementptr inbounds i8, ptr %3, i64 32
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %54) #8
  %55 = getelementptr inbounds i8, ptr %3, i64 16
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %55) #8
  call void @_ZN11galoisfield13GFieldElementD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %3) #8
  br label %.loopexit

.loopexit:                                        ; preds = %38, %.loopexit.loopexit
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %.loopexit.loopexit ], [ %37, %38 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn.pn.pn.pn
}

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_6GFieldE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #1

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN11galoisfield13GFieldElementC1EPNS_6GFieldEi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #1

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

declare void @_ZN11galoisfield9GFieldPolC1EPNS_6GFieldEjPNS_13GFieldElementE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN11galoisfieldlsERSoRKNS_9GFieldPolE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare void @_ZN11galoisfield9GFieldPol10derivativeEv(ptr dead_on_unwind writable sret(%"class.galoisfield::GFieldPol") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #7

attributes #0 = { mustprogress norecurse noreturn 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 = { "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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { noreturn 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 #8 = { nounwind }
attributes #9 = { noreturn 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)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass