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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsGFpECKeyExchangeSM2_Init(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = icmp eq ptr null, %15
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  store i32 -8, ptr %4, align 4
  br label %169

18:                                               ; preds = %3
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._cpGFpEC, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call i64 @IPP_UINT_PTR(ptr noundef %22)
  %24 = trunc i64 %23 to i32
  %25 = xor i32 %21, %24
  %26 = icmp eq i32 %25, 1129136461
  br i1 %26, label %28, label %27

27:                                               ; preds = %18
  store i32 -13, ptr %4, align 4
  br label %169

28:                                               ; preds = %18
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._cpGFpEC, ptr %29, i32 0, i32 3
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 -13, ptr %4, align 4
  br label %169

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._cpGFpEC, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds %struct._cpGFp, ptr %37, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  store ptr %39, ptr %8, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._gsModEngine, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !17
  %43 = icmp slt i32 1, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %34
  store i32 -14, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %168

45:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._cpGFpEC, ptr %46, i32 0, i32 13
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  store ptr %48, ptr %10, align 8, !tbaa !5
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._gsModEngine, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 8, !tbaa !17
  %52 = icmp slt i32 1, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %45
  store i32 -14, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %167

54:                                               ; preds = %45
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._cpGFpEC, ptr %55, i32 0, i32 5
  %57 = load i32, ptr %56, align 8, !tbaa !21
  %58 = icmp sge i32 %57, 256
  br i1 %58, label %60, label %59

59:                                               ; preds = %54
  store i32 -7, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %167

60:                                               ; preds = %54
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = icmp eq ptr null, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  store i32 -8, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %167

64:                                               ; preds = %60
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = icmp ne i32 15, %65
  br i1 %66, label %67, label %71

67:                                               ; preds = %64
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = icmp ne i32 16, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  store i32 -5, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %167

71:                                               ; preds = %67, %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._gsModEngine, ptr %72, i32 0, i32 3
  %74 = load i32, ptr %73, align 8, !tbaa !22
  store i32 %74, ptr %11, align 4, !tbaa !9
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = call i64 @IPP_UINT_PTR(ptr noundef %75)
  %77 = trunc i64 %76 to i32
  %78 = xor i32 1129136469, %77
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %79, i32 0, i32 0
  store i32 %78, ptr %80, align 8, !tbaa !23
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %82, i32 0, i32 1
  store i32 %81, ptr %83, align 4, !tbaa !25
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %85, i32 0, i32 2
  store ptr %84, ptr %86, align 8, !tbaa !26
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %87, i32 0, i32 3
  store ptr null, ptr %88, align 8, !tbaa !27
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %89, i32 0, i32 4
  store ptr null, ptr %90, align 8, !tbaa !28
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %91, i32 0, i32 5
  store ptr null, ptr %92, align 8, !tbaa !29
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %93, i32 0, i32 6
  store ptr null, ptr %94, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %95, ptr %12, align 8, !tbaa !5
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 80
  store ptr %97, ptr %12, align 8, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = mul nsw i32 24, %98
  %100 = add nsw i32 24, %99
  %101 = mul nsw i32 4, %100
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = sext i32 %101 to i64
  %104 = getelementptr inbounds i8, ptr %102, i64 %103
  store ptr %104, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %106, i32 0, i32 7
  store ptr %105, ptr %107, align 8, !tbaa !31
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  call void @PurgeBlock(ptr noundef %108, i32 noundef 32)
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 32
  store ptr %110, ptr %12, align 8, !tbaa !5
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %112, i32 0, i32 8
  store ptr %111, ptr %113, align 8, !tbaa !32
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  call void @PurgeBlock(ptr noundef %114, i32 noundef 32)
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %115, i64 32
  store ptr %116, ptr %12, align 8, !tbaa !5
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %118, i32 0, i32 9
  store ptr %117, ptr %119, align 8, !tbaa !33
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  call void @PurgeBlock(ptr noundef %120, i32 noundef 32)
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i64 32
  store ptr %122, ptr %12, align 8, !tbaa !5
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %124, i32 0, i32 10
  store ptr %123, ptr %125, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %126

126:                                              ; preds = %137, %71
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %130, label %140

130:                                              ; preds = %126
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %131, i32 0, i32 10
  %133 = load ptr, ptr %132, align 8, !tbaa !34
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i64, ptr %133, i64 %135
  store i64 0, ptr %136, align 8, !tbaa !35
  br label %137

137:                                              ; preds = %130
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %13, align 4, !tbaa !9
  br label %126, !llvm.loop !36

140:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %163, %140
  %142 = load i32, ptr %14, align 4, !tbaa !9
  %143 = load i32, ptr %11, align 4, !tbaa !9
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %145, label %166

145:                                              ; preds = %141
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %146, i32 0, i32 10
  %148 = load ptr, ptr %147, align 8, !tbaa !34
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %149, i32 0, i32 2
  %151 = load ptr, ptr %150, align 8, !tbaa !26
  %152 = getelementptr inbounds %struct._cpGFpEC, ptr %151, i32 0, i32 2
  %153 = load ptr, ptr %152, align 8, !tbaa !14
  %154 = getelementptr inbounds %struct._cpGFp, ptr %153, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !15
  %156 = getelementptr inbounds %struct._gsModEngine, ptr %155, i32 0, i32 3
  %157 = load i32, ptr %156, align 8, !tbaa !22
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i64, ptr %148, i64 %158
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i64, ptr %159, i64 %161
  store i64 0, ptr %162, align 8, !tbaa !35
  br label %163

163:                                              ; preds = %145
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %14, align 4, !tbaa !9
  br label %141, !llvm.loop !38

166:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %167

167:                                              ; preds = %166, %70, %63, %59, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %168

168:                                              ; preds = %167, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %169

169:                                              ; preds = %168, %33, %27, %17
  %170 = load i32, ptr %4, align 4
  ret i32 %170
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) #1

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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, !10, i64 0}
!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 = !{!12, !10, i64 16}
!14 = !{!12, !6, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"_cpGFp", !10, i64 0, !10, i64 4, !6, i64 8}
!17 = !{!18, !10, i64 8}
!18 = !{!"_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, !19, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !6, i64 104}
!19 = !{!"long long", !7, i64 0}
!20 = !{!12, !6, i64 80}
!21 = !{!12, !10, i64 24}
!22 = !{!18, !10, i64 16}
!23 = !{!24, !10, i64 0}
!24 = !{!"_GFpECKeyExchangeSM2", !10, i64 0, !10, i64 4, !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}
!25 = !{!24, !10, i64 4}
!26 = !{!24, !6, i64 8}
!27 = !{!24, !6, i64 16}
!28 = !{!24, !6, i64 24}
!29 = !{!24, !6, i64 32}
!30 = !{!24, !6, i64 40}
!31 = !{!24, !6, i64 48}
!32 = !{!24, !6, i64 56}
!33 = !{!24, !6, i64 64}
!34 = !{!24, !6, i64 72}
!35 = !{!19, !19, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


; 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 -14, 1) i32 @ippsGFpECKeyExchangeSM2_Init(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %2, null
  br i1 %4, label %.loopexit, label %5

5:                                                ; preds = %3
  %6 = load i32, ptr %2, align 8, !tbaa !5
  %7 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %2)
  %8 = trunc i64 %7 to i32
  %9 = xor i32 %6, %8
  %10 = icmp eq i32 %9, 1129136461
  br i1 %10, label %11, label %.loopexit

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %2, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !11
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %.loopexit, label %14

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %2, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %21 = icmp sgt i32 %20, 1
  br i1 %21, label %.loopexit, label %22

22:                                               ; preds = %14
  %23 = getelementptr inbounds i8, ptr %2, i64 80
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !15
  %27 = icmp sgt i32 %26, 1
  br i1 %27, label %.loopexit, label %28

28:                                               ; preds = %22
  %29 = getelementptr inbounds i8, ptr %2, i64 24
  %30 = load i32, ptr %29, align 8, !tbaa !19
  %31 = icmp sgt i32 %30, 255
  br i1 %31, label %32, label %.loopexit

32:                                               ; preds = %28
  %33 = icmp eq ptr %0, null
  br i1 %33, label %.loopexit, label %34

34:                                               ; preds = %32
  %35 = add i32 %1, -17
  %or.cond = icmp ult i32 %35, -2
  br i1 %or.cond, label %.loopexit, label %36

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %18, i64 16
  %38 = load i32, ptr %37, align 8, !tbaa !20
  %39 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %0)
  %40 = trunc i64 %39 to i32
  %41 = xor i32 %40, 1129136469
  store i32 %41, ptr %0, align 8, !tbaa !21
  %42 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %1, ptr %42, align 4, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %2, ptr %43, align 8, !tbaa !24
  %44 = getelementptr inbounds i8, ptr %0, i64 16
  %45 = getelementptr inbounds i8, ptr %0, i64 80
  %46 = mul i32 %38, 96
  %47 = add i32 %46, 96
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %45, i64 %48
  %50 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %44, i8 0, i64 32, i1 false)
  store ptr %49, ptr %50, align 8, !tbaa !25
  tail call void @PurgeBlock(ptr noundef nonnull %49, i32 noundef 32)
  %51 = getelementptr inbounds i8, ptr %49, i64 32
  %52 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %51, ptr %52, align 8, !tbaa !26
  tail call void @PurgeBlock(ptr noundef nonnull %51, i32 noundef 32)
  %53 = getelementptr inbounds i8, ptr %49, i64 64
  %54 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %53, ptr %54, align 8, !tbaa !27
  tail call void @PurgeBlock(ptr noundef nonnull %53, i32 noundef 32)
  %55 = getelementptr i8, ptr %49, i64 96
  %56 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %55, ptr %56, align 8, !tbaa !28
  %57 = icmp sgt i32 %38, 0
  br i1 %57, label %.lr.ph60, label %.loopexit

.lr.ph60:                                         ; preds = %36
  %58 = zext nneg i32 %38 to i64
  %59 = shl nuw nsw i64 %58, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %55, i8 0, i64 %59, i1 false), !tbaa !29
  %60 = load ptr, ptr %43, align 8, !tbaa !24
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !12
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load i32, ptr %65, align 8, !tbaa !20
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i64, ptr %55, i64 %67
  %69 = zext nneg i32 %38 to i64
  %70 = shl nuw nsw i64 %69, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %68, i8 0, i64 %70, i1 false), !tbaa !29
  br label %.loopexit

.loopexit:                                        ; preds = %36, %.lr.ph60, %14, %34, %32, %28, %22, %11, %5, %3
  %.2 = phi i32 [ -8, %3 ], [ -13, %5 ], [ -13, %11 ], [ -14, %14 ], [ -14, %22 ], [ -7, %28 ], [ -8, %32 ], [ -5, %34 ], [ 0, %.lr.ph60 ], [ 0, %36 ]
  ret i32 %.2
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_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 = !{!6, !7, i64 16}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !10, i64 8}
!14 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!15 = !{!16, !7, i64 8}
!16 = !{!"_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, !17, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!17 = !{!"long long", !8, i64 0}
!18 = !{!6, !10, i64 80}
!19 = !{!6, !7, i64 24}
!20 = !{!16, !7, i64 16}
!21 = !{!22, !7, i64 0}
!22 = !{!"_GFpECKeyExchangeSM2", !7, i64 0, !7, i64 4, !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}
!23 = !{!22, !7, i64 4}
!24 = !{!22, !10, i64 8}
!25 = !{!22, !10, i64 48}
!26 = !{!22, !10, i64 56}
!27 = !{!22, !10, i64 64}
!28 = !{!22, !10, i64 72}
!29 = !{!17, !17, i64 0}


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