; LLVM IR from intel/cryptography-primitives :: sources/ippcp/gfpec (pcpgfpec_getpoint)

; 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"

%struct._cpGFpEC = type { i32, i32, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._cpGFp = type { i32, i32, ptr }
%struct._gsModEngine = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, i32, ptr }
%struct._cpGFpECPoint = type { i32, i32, i32, ptr }
%struct._gsModMethod = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @gfec_GetPoint(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._cpGFpEC, ptr %19, i32 0, i32 2
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  store ptr %21, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._cpGFp, ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  store ptr %24, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._gsModEngine, ptr %25, i32 0, i32 3
  %27 = load i32, ptr %26, align 8, !tbaa !14
  store i32 %27, ptr %12, align 4, !tbaa !17
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._cpGFpECPoint, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !18
  %31 = and i32 %30, 2
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %48, label %33

33:                                               ; preds = %4
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %40

36:                                               ; preds = %33
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load i32, ptr %12, align 4, !tbaa !17
  %39 = call ptr @cpGFpElementPad(ptr noundef %37, i32 noundef %38, i64 noundef 0)
  br label %40

40:                                               ; preds = %36, %33
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %47

43:                                               ; preds = %40
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load i32, ptr %12, align 4, !tbaa !17
  %46 = call ptr @cpGFpElementPad(ptr noundef %44, i32 noundef %45, i64 noundef 0)
  br label %47

47:                                               ; preds = %43, %40
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %158

48:                                               ; preds = %4
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._cpGFpECPoint, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !18
  %52 = and i32 %51, 1
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %80

54:                                               ; preds = %48
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %64

57:                                               ; preds = %54
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._cpGFpECPoint, ptr %59, i32 0, i32 3
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  %62 = load i32, ptr %12, align 4, !tbaa !17
  %63 = call ptr @cpGFpElementCopy(ptr noundef %58, ptr noundef %61, i32 noundef %62)
  br label %64

64:                                               ; preds = %57, %54
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %79

67:                                               ; preds = %64
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._cpGFpECPoint, ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._cpGFpECPoint, ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 8, !tbaa !21
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i64, ptr %71, i64 %75
  %77 = load i32, ptr %12, align 4, !tbaa !17
  %78 = call ptr @cpGFpElementCopy(ptr noundef %68, ptr noundef %76, i32 noundef %77)
  br label %79

79:                                               ; preds = %67, %64
  store i32 1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %158

80:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._gsModEngine, ptr %81, i32 0, i32 6
  %83 = load ptr, ptr %82, align 8, !tbaa !22
  %84 = getelementptr inbounds %struct._gsModMethod, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !23
  store ptr %85, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._gsModEngine, ptr %86, i32 0, i32 6
  %88 = load ptr, ptr %87, align 8, !tbaa !22
  %89 = getelementptr inbounds %struct._gsModMethod, ptr %88, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !25
  store ptr %90, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = call ptr @gsModPoolAlloc(ptr noundef %91, i32 noundef 1)
  store ptr %92, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = call ptr @gsModPoolAlloc(ptr noundef %93, i32 noundef 1)
  store ptr %94, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = call ptr @gsModPoolAlloc(ptr noundef %95, i32 noundef 1)
  store ptr %96, ptr %18, align 8, !tbaa !5
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._cpGFpECPoint, ptr %98, i32 0, i32 3
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._cpGFpECPoint, ptr %101, i32 0, i32 2
  %103 = load i32, ptr %102, align 8, !tbaa !21
  %104 = mul nsw i32 %103, 2
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i64, ptr %100, i64 %105
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = call ptr @cpGFpxInv(ptr noundef %97, ptr noundef %106, ptr noundef %107)
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = call ptr %109(ptr noundef %110, ptr noundef %111, ptr noundef %112)
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %129

116:                                              ; preds = %80
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._cpGFpECPoint, ptr %119, i32 0, i32 3
  %121 = load ptr, ptr %120, align 8, !tbaa !20
  %122 = load ptr, ptr %16, align 8, !tbaa !5
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = call ptr %117(ptr noundef %118, ptr noundef %121, ptr noundef %122, ptr noundef %123)
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load ptr, ptr %18, align 8, !tbaa !5
  %127 = load i32, ptr %12, align 4, !tbaa !17
  %128 = call ptr @cpGFpElementCopy(ptr noundef %125, ptr noundef %126, i32 noundef %127)
  br label %129

129:                                              ; preds = %116, %80
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %156

132:                                              ; preds = %129
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load ptr, ptr %16, align 8, !tbaa !5
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = call ptr %133(ptr noundef %134, ptr noundef %135, ptr noundef %136, ptr noundef %137)
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._cpGFpECPoint, ptr %141, i32 0, i32 3
  %143 = load ptr, ptr %142, align 8, !tbaa !20
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct._cpGFpECPoint, ptr %144, i32 0, i32 2
  %146 = load i32, ptr %145, align 8, !tbaa !21
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i64, ptr %143, i64 %147
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = call ptr %139(ptr noundef %140, ptr noundef %148, ptr noundef %149, ptr noundef %150)
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load ptr, ptr %18, align 8, !tbaa !5
  %154 = load i32, ptr %12, align 4, !tbaa !17
  %155 = call ptr @cpGFpElementCopy(ptr noundef %152, ptr noundef %153, i32 noundef %154)
  br label %156

156:                                              ; preds = %132, %129
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %157, i32 noundef 3)
  store i32 1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %158

158:                                              ; preds = %156, %79, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %159 = load i32, ptr %5, align 4
  ret i32 %159
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @cpGFpElementPad(ptr noundef, i32 noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @cpGFpElementCopy(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @gsModPoolAlloc(ptr noundef, i32 noundef) #2

declare ptr @cpGFpxInv(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @gsModPoolFree(ptr noundef, i32 noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { "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/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_cpGFpEC", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 68, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"_cpGFp", !11, i64 0, !11, i64 4, !6, i64 8}
!14 = !{!15, !11, i64 16}
!15 = !{!"_gsModEngine", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !16, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !6, i64 104}
!16 = !{!"long long", !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 4}
!19 = !{!"_cpGFpECPoint", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 16}
!21 = !{!19, !11, i64 8}
!22 = !{!15, !6, i64 32}
!23 = !{!24, !6, i64 16}
!24 = !{!"_gsModMethod", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!25 = !{!24, !6, i64 24}


; 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"

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @gfec_GetPoint(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %3, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %2, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !16
  %13 = and i32 %12, 2
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %20

14:                                               ; preds = %4
  %.not62 = icmp eq ptr %0, null
  br i1 %.not62, label %17, label %15

15:                                               ; preds = %14
  %16 = tail call ptr @cpGFpElementPad(ptr noundef nonnull %0, i32 noundef %10, i64 noundef 0)
  br label %17

17:                                               ; preds = %15, %14
  %.not63 = icmp eq ptr %1, null
  br i1 %.not63, label %69, label %18

18:                                               ; preds = %17
  %19 = tail call ptr @cpGFpElementPad(ptr noundef nonnull %1, i32 noundef %10, i64 noundef 0)
  br label %69

20:                                               ; preds = %4
  %21 = and i32 %12, 1
  %.not64 = icmp eq i32 %21, 0
  br i1 %.not64, label %36, label %22

22:                                               ; preds = %20
  %.not67 = icmp eq ptr %0, null
  br i1 %.not67, label %27, label %23

23:                                               ; preds = %22
  %24 = getelementptr inbounds i8, ptr %2, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = tail call ptr @cpGFpElementCopy(ptr noundef nonnull %0, ptr noundef %25, i32 noundef %10)
  br label %27

27:                                               ; preds = %23, %22
  %.not68 = icmp eq ptr %1, null
  br i1 %.not68, label %69, label %28

28:                                               ; preds = %27
  %29 = getelementptr inbounds i8, ptr %2, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %31 = getelementptr inbounds i8, ptr %2, i64 8
  %32 = load i32, ptr %31, align 8, !tbaa !19
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i64, ptr %30, i64 %33
  %35 = tail call ptr @cpGFpElementCopy(ptr noundef nonnull %1, ptr noundef %34, i32 noundef %10)
  br label %69

36:                                               ; preds = %20
  %37 = getelementptr inbounds i8, ptr %8, i64 32
  %38 = load ptr, ptr %37, align 8, !tbaa !20
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = getelementptr inbounds i8, ptr %38, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !23
  %43 = tail call ptr @gsModPoolAlloc(ptr noundef nonnull %8, i32 noundef 1)
  %44 = tail call ptr @gsModPoolAlloc(ptr noundef nonnull %8, i32 noundef 1)
  %45 = tail call ptr @gsModPoolAlloc(ptr noundef nonnull %8, i32 noundef 1)
  %46 = getelementptr inbounds i8, ptr %2, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds i8, ptr %2, i64 8
  %49 = load i32, ptr %48, align 8, !tbaa !19
  %50 = shl nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i64, ptr %47, i64 %51
  %53 = tail call ptr @cpGFpxInv(ptr noundef %44, ptr noundef %52, ptr noundef nonnull %8) #3
  %54 = tail call ptr %42(ptr noundef %43, ptr noundef %44, ptr noundef nonnull %8) #3
  %.not65 = icmp eq ptr %0, null
  br i1 %.not65, label %59, label %55

55:                                               ; preds = %36
  %56 = load ptr, ptr %46, align 8, !tbaa !18
  %57 = tail call ptr %40(ptr noundef %45, ptr noundef %56, ptr noundef %43, ptr noundef nonnull %8) #3
  %58 = tail call ptr @cpGFpElementCopy(ptr noundef nonnull %0, ptr noundef %45, i32 noundef %10)
  br label %59

59:                                               ; preds = %55, %36
  %.not66 = icmp eq ptr %1, null
  br i1 %.not66, label %68, label %60

60:                                               ; preds = %59
  %61 = tail call ptr %40(ptr noundef %43, ptr noundef %44, ptr noundef %43, ptr noundef nonnull %8) #3
  %62 = load ptr, ptr %46, align 8, !tbaa !18
  %63 = load i32, ptr %48, align 8, !tbaa !19
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i64, ptr %62, i64 %64
  %66 = tail call ptr %40(ptr noundef %45, ptr noundef %65, ptr noundef %43, ptr noundef nonnull %8) #3
  %67 = tail call ptr @cpGFpElementCopy(ptr noundef nonnull %1, ptr noundef %45, i32 noundef %10)
  br label %68

68:                                               ; preds = %60, %59
  tail call void @gsModPoolFree(ptr noundef nonnull %8, i32 noundef 3)
  br label %69

69:                                               ; preds = %27, %28, %17, %18, %68
  %.0 = phi i32 [ 1, %68 ], [ 0, %18 ], [ 0, %17 ], [ 1, %28 ], [ 1, %27 ]
  ret i32 %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @cpGFpElementPad(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @cpGFpElementCopy(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @gsModPoolAlloc(ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @cpGFpxInv(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @gsModPoolFree(ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 8}
!6 = !{!"_cpGFpEC", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!13 = !{!14, !7, i64 16}
!14 = !{!"_gsModEngine", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !15, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!15 = !{!"long long", !8, i64 0}
!16 = !{!17, !7, i64 4}
!17 = !{!"_cpGFpECPoint", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!18 = !{!17, !10, i64 16}
!19 = !{!17, !7, i64 8}
!20 = !{!14, !10, i64 32}
!21 = !{!22, !10, i64 16}
!22 = !{!"_gsModMethod", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!23 = !{!22, !10, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass