; LLVM IR from guanzhi/GmSSL :: src (sm2_z256)

; 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.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.SM2_Z256_AFFINE_POINT = type { [4 x i64], [4 x i64] }

@SM2_Z256_MODP_MONT_ONE = external dso_local global ptr, align 8

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_copy_conditional(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @is_zero(i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_sub(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_dbl(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_mont_mul(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_mont_sqr(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @sm2_z256_point_add_affine(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [4 x i64], align 16
  %8 = alloca [4 x i64], align 16
  %9 = alloca [4 x i64], align 16
  %10 = alloca [4 x i64], align 16
  %11 = alloca [4 x i64], align 16
  %12 = alloca [4 x i64], align 16
  %13 = alloca [4 x i64], align 16
  %14 = alloca [4 x i64], align 16
  %15 = alloca [4 x i64], align 16
  %16 = alloca [4 x i64], align 16
  %17 = alloca [4 x i64], align 16
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 0
  store ptr %27, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %28, i32 0, i32 1
  %30 = getelementptr inbounds [4 x i64], ptr %29, i64 0, i64 0
  store ptr %30, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %31, i32 0, i32 2
  %33 = getelementptr inbounds [4 x i64], ptr %32, i64 0, i64 0
  store ptr %33, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.SM2_Z256_AFFINE_POINT, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds [4 x i64], ptr %35, i64 0, i64 0
  store ptr %36, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.SM2_Z256_AFFINE_POINT, ptr %37, i32 0, i32 1
  %39 = getelementptr inbounds [4 x i64], ptr %38, i64 0, i64 0
  store ptr %39, ptr %24, align 8, !tbaa !5
  %40 = load ptr, ptr %22, align 8, !tbaa !5
  %41 = getelementptr inbounds i64, ptr %40, i64 0
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = load ptr, ptr %22, align 8, !tbaa !5
  %44 = getelementptr inbounds i64, ptr %43, i64 1
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = or i64 %42, %45
  %47 = load ptr, ptr %22, align 8, !tbaa !5
  %48 = getelementptr inbounds i64, ptr %47, i64 2
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = or i64 %46, %49
  %51 = load ptr, ptr %22, align 8, !tbaa !5
  %52 = getelementptr inbounds i64, ptr %51, i64 3
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = or i64 %50, %53
  store i64 %54, ptr %18, align 8, !tbaa !9
  %55 = load ptr, ptr %23, align 8, !tbaa !5
  %56 = getelementptr inbounds i64, ptr %55, i64 0
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = load ptr, ptr %23, align 8, !tbaa !5
  %59 = getelementptr inbounds i64, ptr %58, i64 1
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = or i64 %57, %60
  %62 = load ptr, ptr %23, align 8, !tbaa !5
  %63 = getelementptr inbounds i64, ptr %62, i64 2
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = or i64 %61, %64
  %66 = load ptr, ptr %23, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %66, i64 3
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = or i64 %65, %68
  %70 = load ptr, ptr %24, align 8, !tbaa !5
  %71 = getelementptr inbounds i64, ptr %70, i64 0
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = or i64 %69, %72
  %74 = load ptr, ptr %24, align 8, !tbaa !5
  %75 = getelementptr inbounds i64, ptr %74, i64 1
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = or i64 %73, %76
  %78 = load ptr, ptr %24, align 8, !tbaa !5
  %79 = getelementptr inbounds i64, ptr %78, i64 2
  %80 = load i64, ptr %79, align 8, !tbaa !9
  %81 = or i64 %77, %80
  %82 = load ptr, ptr %24, align 8, !tbaa !5
  %83 = getelementptr inbounds i64, ptr %82, i64 3
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = or i64 %81, %84
  store i64 %85, ptr %19, align 8, !tbaa !9
  %86 = load i64, ptr %18, align 8, !tbaa !9
  %87 = call i64 @is_zero(i64 noundef %86)
  store i64 %87, ptr %18, align 8, !tbaa !9
  %88 = load i64, ptr %19, align 8, !tbaa !9
  %89 = call i64 @is_zero(i64 noundef %88)
  store i64 %89, ptr %19, align 8, !tbaa !9
  %90 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 0
  %91 = load ptr, ptr %22, align 8, !tbaa !5
  call void @sm2_z256_modp_mont_sqr(ptr noundef %90, ptr noundef %91)
  %92 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %93 = load ptr, ptr %23, align 8, !tbaa !5
  %94 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %92, ptr noundef %93, ptr noundef %94)
  %95 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  %96 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %97 = load ptr, ptr %20, align 8, !tbaa !5
  call void @sm2_z256_modp_sub(ptr noundef %95, ptr noundef %96, ptr noundef %97)
  %98 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  %99 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 0
  %100 = load ptr, ptr %22, align 8, !tbaa !5
  call void @sm2_z256_modp_mont_mul(ptr noundef %98, ptr noundef %99, ptr noundef %100)
  %101 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %102 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  %103 = load ptr, ptr %22, align 8, !tbaa !5
  call void @sm2_z256_modp_mont_mul(ptr noundef %101, ptr noundef %102, ptr noundef %103)
  %104 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  %105 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  %106 = load ptr, ptr %24, align 8, !tbaa !5
  call void @sm2_z256_modp_mont_mul(ptr noundef %104, ptr noundef %105, ptr noundef %106)
  %107 = getelementptr inbounds [4 x i64], ptr %11, i64 0, i64 0
  %108 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  %109 = load ptr, ptr %21, align 8, !tbaa !5
  call void @sm2_z256_modp_sub(ptr noundef %107, ptr noundef %108, ptr noundef %109)
  %110 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %111 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  call void @sm2_z256_modp_mont_sqr(ptr noundef %110, ptr noundef %111)
  %112 = getelementptr inbounds [4 x i64], ptr %13, i64 0, i64 0
  %113 = getelementptr inbounds [4 x i64], ptr %11, i64 0, i64 0
  call void @sm2_z256_modp_mont_sqr(ptr noundef %112, ptr noundef %113)
  %114 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %115 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %116 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %114, ptr noundef %115, ptr noundef %116)
  %117 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %118 = load ptr, ptr %20, align 8, !tbaa !5
  %119 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %117, ptr noundef %118, ptr noundef %119)
  %120 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %121 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  call void @sm2_z256_modp_dbl(ptr noundef %120, ptr noundef %121)
  %122 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  %123 = getelementptr inbounds [4 x i64], ptr %13, i64 0, i64 0
  %124 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  call void @sm2_z256_modp_sub(ptr noundef %122, ptr noundef %123, ptr noundef %124)
  %125 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  %126 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  %127 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  call void @sm2_z256_modp_sub(ptr noundef %125, ptr noundef %126, ptr noundef %127)
  %128 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  %129 = getelementptr inbounds [4 x i64], ptr %7, i64 0, i64 0
  %130 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  call void @sm2_z256_modp_sub(ptr noundef %128, ptr noundef %129, ptr noundef %130)
  %131 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  %132 = load ptr, ptr %21, align 8, !tbaa !5
  %133 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %131, ptr noundef %132, ptr noundef %133)
  %134 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  %135 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  %136 = getelementptr inbounds [4 x i64], ptr %11, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %134, ptr noundef %135, ptr noundef %136)
  %137 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %138 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 0
  %139 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  call void @sm2_z256_modp_sub(ptr noundef %137, ptr noundef %138, ptr noundef %139)
  %140 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  %141 = load ptr, ptr %23, align 8, !tbaa !5
  %142 = load i64, ptr %18, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef %140, ptr noundef %141, i64 noundef %142)
  %143 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  %144 = load ptr, ptr %20, align 8, !tbaa !5
  %145 = load i64, ptr %19, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef %143, ptr noundef %144, i64 noundef %145)
  %146 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %147 = load ptr, ptr %24, align 8, !tbaa !5
  %148 = load i64, ptr %18, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef %146, ptr noundef %147, i64 noundef %148)
  %149 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %150 = load ptr, ptr %21, align 8, !tbaa !5
  %151 = load i64, ptr %19, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef %149, ptr noundef %150, i64 noundef %151)
  %152 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %153 = load ptr, ptr @SM2_Z256_MODP_MONT_ONE, align 8, !tbaa !5
  %154 = load i64, ptr %18, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef %152, ptr noundef %153, i64 noundef %154)
  %155 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %156 = load ptr, ptr %22, align 8, !tbaa !5
  %157 = load i64, ptr %19, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef %155, ptr noundef %156, i64 noundef %157)
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds [4 x i64], ptr %159, i64 0, i64 0
  %161 = getelementptr inbounds [4 x i64], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %160, ptr align 16 %161, i64 32, i1 false)
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %162, i32 0, i32 1
  %164 = getelementptr inbounds [4 x i64], ptr %163, i64 0, i64 0
  %165 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %164, ptr align 16 %165, i64 32, i1 false)
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %166, i32 0, i32 2
  %168 = getelementptr inbounds [4 x i64], ptr %167, i64 0, i64 0
  %169 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %168, ptr align 16 %169, i64 32, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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: 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 = !{!"long", !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"

@SM2_Z256_MODP_MONT_ONE = external dso_local local_unnamed_addr global ptr, align 8

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_copy_conditional(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_dbl(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_mont_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @sm2_z256_modp_mont_sqr(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @sm2_z256_point_add_affine(ptr nocapture noundef writeonly %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca [4 x i64], align 16
  %5 = alloca [4 x i64], align 16
  %6 = alloca [4 x i64], align 16
  %7 = alloca [4 x i64], align 16
  %8 = alloca [4 x i64], align 16
  %9 = alloca [4 x i64], align 16
  %10 = alloca [4 x i64], align 16
  %11 = alloca [4 x i64], align 16
  %12 = alloca [4 x i64], align 16
  %13 = alloca [4 x i64], align 16
  %14 = alloca [4 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  %15 = getelementptr inbounds i8, ptr %1, i64 32
  %16 = getelementptr inbounds i8, ptr %1, i64 64
  %17 = getelementptr inbounds i8, ptr %2, i64 32
  %18 = load <4 x i64>, ptr %16, align 8, !tbaa !5
  %19 = tail call i64 @llvm.vector.reduce.or.v4i64(<4 x i64> %18)
  %20 = load <8 x i64>, ptr %2, align 8, !tbaa !5
  %21 = tail call i64 @llvm.vector.reduce.or.v8i64(<8 x i64> %20)
  %22 = tail call i64 @is_zero(i64 noundef %19)
  %23 = tail call i64 @is_zero(i64 noundef %21)
  call void @sm2_z256_modp_mont_sqr(ptr noundef nonnull %6, ptr noundef nonnull %16)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %4, ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @sm2_z256_modp_sub(ptr noundef nonnull %7, ptr noundef nonnull %4, ptr noundef %1)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %16)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %14, ptr noundef nonnull %7, ptr noundef nonnull %16)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %5, ptr noundef nonnull %5, ptr noundef nonnull %17)
  call void @sm2_z256_modp_sub(ptr noundef nonnull %8, ptr noundef nonnull %5, ptr noundef nonnull %15)
  call void @sm2_z256_modp_mont_sqr(ptr noundef nonnull %9, ptr noundef nonnull %7)
  call void @sm2_z256_modp_mont_sqr(ptr noundef nonnull %10, ptr noundef nonnull %8)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %11, ptr noundef nonnull %9, ptr noundef nonnull %7)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %4, ptr noundef %1, ptr noundef nonnull %9)
  call void @sm2_z256_modp_dbl(ptr noundef nonnull %9, ptr noundef nonnull %4)
  call void @sm2_z256_modp_sub(ptr noundef nonnull %12, ptr noundef nonnull %10, ptr noundef nonnull %9)
  call void @sm2_z256_modp_sub(ptr noundef nonnull %12, ptr noundef nonnull %12, ptr noundef nonnull %11)
  call void @sm2_z256_modp_sub(ptr noundef nonnull %7, ptr noundef nonnull %4, ptr noundef nonnull %12)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %5, ptr noundef nonnull %15, ptr noundef nonnull %11)
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %8)
  call void @sm2_z256_modp_sub(ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull %5)
  call void @sm2_z256_copy_conditional(ptr noundef nonnull %12, ptr noundef nonnull %2, i64 noundef %22)
  call void @sm2_z256_copy_conditional(ptr noundef nonnull %12, ptr noundef %1, i64 noundef %23)
  call void @sm2_z256_copy_conditional(ptr noundef nonnull %13, ptr noundef nonnull %17, i64 noundef %22)
  call void @sm2_z256_copy_conditional(ptr noundef nonnull %13, ptr noundef nonnull %15, i64 noundef %23)
  %24 = load ptr, ptr @SM2_Z256_MODP_MONT_ONE, align 8, !tbaa !9
  call void @sm2_z256_copy_conditional(ptr noundef nonnull %14, ptr noundef %24, i64 noundef %22)
  call void @sm2_z256_copy_conditional(ptr noundef nonnull %14, ptr noundef nonnull %16, i64 noundef %23)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 16 dereferenceable(32) %12, i64 32, i1 false)
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 16 dereferenceable(32) %13, i64 32, i1 false)
  %26 = getelementptr inbounds i8, ptr %0, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 16 dereferenceable(32) %14, i64 32, i1 false)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.or.v4i64(<4 x i64>) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.or.v8i64(<8 x i64>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass