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

; 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._cpPrecompAP = type { i32, 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._gsModMethod = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @gfec_base_point_mul(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._cpGFpEC, ptr %26, i32 0, i32 12
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = getelementptr inbounds %struct._cpPrecompAP, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !13
  store i32 %30, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._cpGFpEC, ptr %31, i32 0, i32 12
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds %struct._cpPrecompAP, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  store ptr %35, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._cpGFpEC, ptr %36, i32 0, i32 12
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct._cpPrecompAP, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !16
  store ptr %40, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._cpGFpEC, ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  store ptr %43, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._cpGFp, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  store ptr %46, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._gsModEngine, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 8, !tbaa !20
  store i32 %49, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._gsModEngine, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = getelementptr inbounds %struct._gsModMethod, ptr %52, i32 0, i32 7
  %54 = load ptr, ptr %53, align 8, !tbaa !24
  store ptr %54, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._gsModEngine, ptr %55, i32 0, i32 10
  %57 = load ptr, ptr %56, align 8, !tbaa !26
  store ptr %57, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = sub nsw i32 %58, 1
  %60 = shl i32 1, %59
  store i32 %60, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %61 = load i32, ptr %17, align 4, !tbaa !9
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = mul nsw i32 %62, 2
  %64 = mul nsw i32 %61, %63
  store i32 %64, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = call ptr @gsModPoolAlloc(ptr noundef %65, i32 noundef 1)
  store ptr %66, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %67)
  store ptr %68, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  %71 = shl i32 1, %70
  %72 = sub nsw i32 %71, 1
  store i32 %72, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 0
  %75 = load i16, ptr %74, align 2, !tbaa !27
  %76 = zext i16 %75 to i32
  store i32 %76, ptr %25, align 4, !tbaa !9
  %77 = load i32, ptr %25, align 4, !tbaa !9
  %78 = shl i32 %77, 1
  %79 = load i32, ptr %23, align 4, !tbaa !9
  %80 = and i32 %78, %79
  store i32 %80, ptr %25, align 4, !tbaa !9
  %81 = load i32, ptr %25, align 4, !tbaa !9
  %82 = trunc i32 %81 to i8
  %83 = load i32, ptr %9, align 4, !tbaa !9
  call void @booth_recode(ptr noundef %22, ptr noundef %21, i8 noundef zeroext %82, i32 noundef %83)
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load i8, ptr %21, align 1, !tbaa !29
  %88 = zext i8 %87 to i32
  call void %84(ptr noundef %85, ptr noundef %86, i32 noundef %88)
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = load ptr, ptr %19, align 8, !tbaa !5
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i64, ptr %91, i64 %93
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = call ptr %89(ptr noundef %90, ptr noundef %94, ptr noundef %95)
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load i32, ptr %14, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i64, ptr %97, i64 %99
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = load i32, ptr %14, align 4, !tbaa !9
  %103 = load i8, ptr %22, align 1, !tbaa !29
  %104 = zext i8 %103 to i64
  %105 = call i64 @cpIsZero_ct(i64 noundef %104)
  %106 = xor i64 %105, -1
  call void @cpMaskedReplace_ct(ptr noundef %100, ptr noundef %101, i32 noundef %102, i64 noundef %106)
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load i32, ptr %14, align 4, !tbaa !9
  %109 = mul nsw i32 %108, 2
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i64, ptr %107, i64 %110
  %112 = load ptr, ptr %16, align 8, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = call ptr @cpGFpElementCopy(ptr noundef %111, ptr noundef %112, i32 noundef %113)
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = load i32, ptr %14, align 4, !tbaa !9
  %117 = call ptr @cpGFpElementSetChunk(ptr noundef %115, i32 noundef %116, i64 noundef 0)
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load i32, ptr %14, align 4, !tbaa !9
  %120 = mul nsw i32 %119, 2
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i64, ptr %118, i64 %121
  %123 = load ptr, ptr %19, align 8, !tbaa !5
  %124 = load i32, ptr %14, align 4, !tbaa !9
  %125 = load i8, ptr %21, align 1, !tbaa !29
  %126 = zext i8 %125 to i64
  %127 = call i64 @cpIsZero_ct(i64 noundef %126)
  call void @cpMaskedReplace_ct(ptr noundef %122, ptr noundef %123, i32 noundef %124, i64 noundef %127)
  %128 = load i32, ptr %9, align 4, !tbaa !9
  %129 = load i32, ptr %24, align 4, !tbaa !9
  %130 = add nsw i32 %129, %128
  store i32 %130, ptr %24, align 4, !tbaa !9
  %131 = load i32, ptr %18, align 4, !tbaa !9
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = sext i32 %131 to i64
  %134 = getelementptr inbounds i64, ptr %132, i64 %133
  store ptr %134, ptr %11, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %185, %4
  %136 = load i32, ptr %24, align 4, !tbaa !9
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = icmp sle i32 %136, %137
  br i1 %138, label %139, label %193

139:                                              ; preds = %135
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = load i32, ptr %24, align 4, !tbaa !9
  %142 = sub nsw i32 %141, 1
  %143 = sdiv i32 %142, 8
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i8, ptr %140, i64 %144
  %146 = load i16, ptr %145, align 2, !tbaa !27
  %147 = zext i16 %146 to i32
  store i32 %147, ptr %25, align 4, !tbaa !9
  %148 = load i32, ptr %25, align 4, !tbaa !9
  %149 = load i32, ptr %24, align 4, !tbaa !9
  %150 = sub nsw i32 %149, 1
  %151 = srem i32 %150, 8
  %152 = ashr i32 %148, %151
  %153 = load i32, ptr %23, align 4, !tbaa !9
  %154 = and i32 %152, %153
  store i32 %154, ptr %25, align 4, !tbaa !9
  %155 = load i32, ptr %25, align 4, !tbaa !9
  %156 = trunc i32 %155 to i8
  %157 = load i32, ptr %9, align 4, !tbaa !9
  call void @booth_recode(ptr noundef %22, ptr noundef %21, i8 noundef zeroext %156, i32 noundef %157)
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load ptr, ptr %20, align 8, !tbaa !5
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  %161 = load i8, ptr %21, align 1, !tbaa !29
  %162 = zext i8 %161 to i32
  call void %158(ptr noundef %159, ptr noundef %160, i32 noundef %162)
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  %164 = load ptr, ptr %19, align 8, !tbaa !5
  %165 = load ptr, ptr %20, align 8, !tbaa !5
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds i64, ptr %165, i64 %167
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = call ptr %163(ptr noundef %164, ptr noundef %168, ptr noundef %169)
  %171 = load ptr, ptr %20, align 8, !tbaa !5
  %172 = load i32, ptr %14, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i64, ptr %171, i64 %173
  %175 = load ptr, ptr %19, align 8, !tbaa !5
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = load i8, ptr %22, align 1, !tbaa !29
  %178 = zext i8 %177 to i64
  %179 = call i64 @cpIsZero_ct(i64 noundef %178)
  %180 = xor i64 %179, -1
  call void @cpMaskedReplace_ct(ptr noundef %174, ptr noundef %175, i32 noundef %176, i64 noundef %180)
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load ptr, ptr %20, align 8, !tbaa !5
  %184 = load ptr, ptr %8, align 8, !tbaa !5
  call void @gfec_affine_point_add(ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184)
  br label %185

185:                                              ; preds = %139
  %186 = load i32, ptr %9, align 4, !tbaa !9
  %187 = load i32, ptr %24, align 4, !tbaa !9
  %188 = add nsw i32 %187, %186
  store i32 %188, ptr %24, align 4, !tbaa !9
  %189 = load i32, ptr %18, align 4, !tbaa !9
  %190 = load ptr, ptr %11, align 8, !tbaa !5
  %191 = sext i32 %189 to i64
  %192 = getelementptr inbounds i64, ptr %190, i64 %191
  store ptr %192, ptr %11, align 8, !tbaa !5
  br label %135, !llvm.loop !30

193:                                              ; preds = %135
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %194)
  %195 = load ptr, ptr %13, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %195, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

; 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 @gsModPoolAlloc(ptr noundef, i32 noundef) #2

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @cpIsZero_ct(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 @cpGFpElementSetChunk(ptr noundef, i32 noundef, i64 noundef) #2

declare void @gfec_affine_point_add(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

; 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"_cpGFpEC", !10, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !10, 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}
!13 = !{!14, !10, i64 0}
!14 = !{!"_cpPrecompAP", !10, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !6, i64 16}
!17 = !{!12, !6, i64 8}
!18 = !{!19, !6, i64 8}
!19 = !{!"_cpGFp", !10, i64 0, !10, i64 4, !6, i64 8}
!20 = !{!21, !10, i64 16}
!21 = !{!"_gsModEngine", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !22, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !6, i64 104}
!22 = !{!"long long", !7, i64 0}
!23 = !{!21, !6, i64 32}
!24 = !{!25, !6, i64 56}
!25 = !{!"_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}
!26 = !{!21, !6, i64 64}
!27 = !{!28, !28, i64 0}
!28 = !{!"short", !7, i64 0}
!29 = !{!7, !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"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"

; Function Attrs: nounwind uwtable
define dso_local void @gfec_base_point_mul(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = getelementptr inbounds i8, ptr %3, i64 72
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %8, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %8, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %19 = load i32, ptr %18, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %17, i64 32
  %21 = load ptr, ptr %20, align 8, !tbaa !21
  %22 = getelementptr inbounds i8, ptr %21, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %17, i64 64
  %25 = load ptr, ptr %24, align 8, !tbaa !24
  %26 = add nsw i32 %9, -1
  %27 = shl nsw i32 %19, 1
  %28 = shl i32 %27, %26
  %29 = tail call ptr @gsModPoolAlloc(ptr noundef %17, i32 noundef 1)
  %30 = tail call ptr @cpEcGFpGetPool(i32 noundef 1, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  %31 = add nsw i32 %9, 1
  %notmask = shl nsw i32 -1, %31
  %32 = xor i32 %notmask, -1
  %33 = load i16, ptr %1, align 2, !tbaa !25
  %34 = zext i16 %33 to i32
  %35 = shl nuw nsw i32 %34, 1
  %36 = and i32 %35, %32
  %37 = trunc i32 %36 to i8
  call void @booth_recode(ptr noundef nonnull %6, ptr noundef nonnull %5, i8 noundef zeroext %37, i32 noundef %9)
  %38 = load i8, ptr %5, align 1, !tbaa !27
  %39 = zext i8 %38 to i32
  call void %11(ptr noundef %0, ptr noundef %13, i32 noundef %39) #4
  %40 = sext i32 %19 to i64
  %41 = getelementptr inbounds i64, ptr %0, i64 %40
  %42 = call ptr %23(ptr noundef %29, ptr noundef %41, ptr noundef %17) #4
  %43 = load i8, ptr %6, align 1, !tbaa !27
  %44 = zext i8 %43 to i64
  %45 = call i64 @cpIsZero_ct(i64 noundef %44)
  %46 = xor i64 %45, -1
  call void @cpMaskedReplace_ct(ptr noundef %41, ptr noundef %29, i32 noundef %19, i64 noundef %46)
  %47 = sext i32 %27 to i64
  %48 = getelementptr inbounds i64, ptr %0, i64 %47
  %49 = call ptr @cpGFpElementCopy(ptr noundef %48, ptr noundef %25, i32 noundef %19)
  %50 = call ptr @cpGFpElementSetChunk(ptr noundef %29, i32 noundef %19, i64 noundef 0)
  %51 = load i8, ptr %5, align 1, !tbaa !27
  %52 = zext i8 %51 to i64
  %53 = call i64 @cpIsZero_ct(i64 noundef %52)
  call void @cpMaskedReplace_ct(ptr noundef %48, ptr noundef %29, i32 noundef %19, i64 noundef %53)
  %54 = sext i32 %28 to i64
  %.not76 = icmp sgt i32 %9, %2
  br i1 %.not76, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %55 = getelementptr inbounds i64, ptr %30, i64 %40
  br label %56

56:                                               ; preds = %.lr.ph, %56
  %.078 = phi i32 [ %9, %.lr.ph ], [ %74, %56 ]
  %.pn77 = phi ptr [ %13, %.lr.ph ], [ %.075, %56 ]
  %.075 = getelementptr inbounds i64, ptr %.pn77, i64 %54
  %57 = add nsw i32 %.078, -1
  %58 = sdiv i32 %57, 8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %1, i64 %59
  %61 = load i16, ptr %60, align 2, !tbaa !25
  %62 = zext i16 %61 to i32
  %63 = and i32 %57, 7
  %64 = lshr i32 %62, %63
  %65 = and i32 %64, %32
  %66 = trunc i32 %65 to i8
  call void @booth_recode(ptr noundef nonnull %6, ptr noundef nonnull %5, i8 noundef zeroext %66, i32 noundef %9)
  %67 = load i8, ptr %5, align 1, !tbaa !27
  %68 = zext i8 %67 to i32
  call void %11(ptr noundef %30, ptr noundef %.075, i32 noundef %68) #4
  %69 = call ptr %23(ptr noundef %29, ptr noundef %55, ptr noundef %17) #4
  %70 = load i8, ptr %6, align 1, !tbaa !27
  %71 = zext i8 %70 to i64
  %72 = call i64 @cpIsZero_ct(i64 noundef %71)
  %73 = xor i64 %72, -1
  call void @cpMaskedReplace_ct(ptr noundef %55, ptr noundef %29, i32 noundef %19, i64 noundef %73)
  call void @gfec_affine_point_add(ptr noundef %0, ptr noundef %0, ptr noundef %30, ptr noundef %3) #4
  %74 = add nsw i32 %.078, %9
  %.not = icmp sgt i32 %74, %2
  br i1 %.not, label %._crit_edge, label %56, !llvm.loop !28

._crit_edge:                                      ; preds = %56, %4
  call void @cpEcGFpReleasePool(i32 noundef 1, ptr noundef %3)
  call void @gsModPoolFree(ptr noundef %17, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  ret void
}

; Function Attrs: mustprogress 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 @gsModPoolAlloc(ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @booth_recode(ptr noundef, ptr noundef, i8 noundef zeroext, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @cpIsZero_ct(i64 noundef) local_unnamed_addr #2

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

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

declare void @gfec_affine_point_add(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress 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 = { mustprogress 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, !10, i64 72}
!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, !7, i64 0}
!12 = !{!"_cpPrecompAP", !7, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 16}
!15 = !{!6, !10, i64 8}
!16 = !{!17, !10, i64 8}
!17 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!18 = !{!19, !7, i64 16}
!19 = !{!"_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, !20, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!20 = !{!"long long", !8, i64 0}
!21 = !{!19, !10, i64 32}
!22 = !{!23, !10, i64 56}
!23 = !{!"_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}
!24 = !{!19, !10, i64 64}
!25 = !{!26, !26, i64 0}
!26 = !{!"short", !8, i64 0}
!27 = !{!8, !8, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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