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

; 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_SIGN_PRE_COMP = type { [4 x i64], [4 x i64] }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.sm2_fast_sign_pre_compute = external hidden unnamed_addr constant [26 x i8], align 1

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

declare i64 @sm2_z256_is_zero(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare i32 @sm2_z256_rand_range(ptr noundef, ptr noundef) #1

declare ptr @sm2_z256_order() #1

declare void @sm2_z256_point_mul_generator(ptr noundef, ptr noundef) #1

declare i32 @sm2_z256_cmp(ptr noundef, ptr noundef) #1

declare i64 @sm2_z256_sub(ptr noundef, ptr noundef, ptr noundef) #1

; 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
define dso_local i32 @sm2_fast_sign_pre_compute(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca [32 x %struct.SM2_Z256_POINT], align 16
  %5 = alloca [32 x [4 x i64]], align 16
  %6 = alloca [32 x [4 x i64]], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 3072, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %9

9:                                                ; preds = %49, %1
  %10 = load i32, ptr %7, align 4, !tbaa !9
  %11 = icmp slt i32 %10, 32
  br i1 %11, label %12, label %52

12:                                               ; preds = %9
  br label %13

13:                                               ; preds = %30, %12
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %14, i64 %16
  %18 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %17, i32 0, i32 0
  %19 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %20 = call ptr @sm2_z256_order()
  %21 = call i32 @sm2_z256_rand_range(ptr noundef %19, ptr noundef %20)
  %22 = icmp ne i32 %21, 1
  br i1 %22, label %23, label %29

23:                                               ; preds = %13
  br label %24

24:                                               ; preds = %23
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 119, ptr noundef @__FUNCTION__.sm2_fast_sign_pre_compute) #4
  br label %27

27:                                               ; preds = %24
  br label %28

28:                                               ; preds = %27
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %231

29:                                               ; preds = %13
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %31, i64 %33
  %35 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds [4 x i64], ptr %35, i64 0, i64 0
  %37 = call i64 @sm2_z256_is_zero(ptr noundef %36)
  %38 = icmp ne i64 %37, 0
  br i1 %38, label %13, label %39, !llvm.loop !11

39:                                               ; preds = %30
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %41
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %43, i64 %45
  %47 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds [4 x i64], ptr %47, i64 0, i64 0
  call void @sm2_z256_point_mul_generator(ptr noundef %42, ptr noundef %48)
  br label %49

49:                                               ; preds = %39
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %7, align 4, !tbaa !9
  br label %9, !llvm.loop !13

52:                                               ; preds = %9
  %53 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 0
  %54 = getelementptr inbounds [4 x i64], ptr %53, i64 0, i64 0
  %55 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 0
  %56 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds [4 x i64], ptr %56, i64 0, i64 0
  call void @sm2_z256_copy(ptr noundef %54, ptr noundef %57)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %76, %52
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 32
  br i1 %60, label %61, label %79

61:                                               ; preds = %58
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 %63
  %65 = getelementptr inbounds [4 x i64], ptr %64, i64 0, i64 0
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = sub nsw i32 %66, 1
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 %68
  %70 = getelementptr inbounds [4 x i64], ptr %69, i64 0, i64 0
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %72
  %74 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds [4 x i64], ptr %74, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %65, ptr noundef %70, ptr noundef %75)
  br label %76

76:                                               ; preds = %61
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !9
  br label %58, !llvm.loop !14

79:                                               ; preds = %58
  %80 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 31
  %81 = getelementptr inbounds [4 x i64], ptr %80, i64 0, i64 0
  %82 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 31
  %83 = getelementptr inbounds [4 x i64], ptr %82, i64 0, i64 0
  call void @sm2_z256_modp_mont_inv(ptr noundef %81, ptr noundef %83)
  %84 = getelementptr inbounds [32 x [4 x i64]], ptr %6, i64 0, i64 31
  %85 = getelementptr inbounds [4 x i64], ptr %84, i64 0, i64 0
  %86 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 31
  %87 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %86, i32 0, i32 2
  %88 = getelementptr inbounds [4 x i64], ptr %87, i64 0, i64 0
  call void @sm2_z256_copy(ptr noundef %85, ptr noundef %88)
  store i32 30, ptr %7, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %107, %79
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = icmp sge i32 %90, 1
  br i1 %91, label %92, label %110

92:                                               ; preds = %89
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [32 x [4 x i64]], ptr %6, i64 0, i64 %94
  %96 = getelementptr inbounds [4 x i64], ptr %95, i64 0, i64 0
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [32 x [4 x i64]], ptr %6, i64 0, i64 %99
  %101 = getelementptr inbounds [4 x i64], ptr %100, i64 0, i64 0
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds [4 x i64], ptr %105, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %96, ptr noundef %101, ptr noundef %106)
  br label %107

107:                                              ; preds = %92
  %108 = load i32, ptr %7, align 4, !tbaa !9
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %7, align 4, !tbaa !9
  br label %89, !llvm.loop !15

110:                                              ; preds = %89
  %111 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 0
  %112 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds [4 x i64], ptr %112, i64 0, i64 0
  %114 = getelementptr inbounds [32 x [4 x i64]], ptr %6, i64 0, i64 1
  %115 = getelementptr inbounds [4 x i64], ptr %114, i64 0, i64 0
  %116 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 31
  %117 = getelementptr inbounds [4 x i64], ptr %116, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %113, ptr noundef %115, ptr noundef %117)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %149, %110
  %119 = load i32, ptr %7, align 4, !tbaa !9
  %120 = icmp sle i32 %119, 30
  br i1 %120, label %121, label %152

121:                                              ; preds = %118
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %123
  %125 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %124, i32 0, i32 2
  %126 = getelementptr inbounds [4 x i64], ptr %125, i64 0, i64 0
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [32 x [4 x i64]], ptr %6, i64 0, i64 %129
  %131 = getelementptr inbounds [4 x i64], ptr %130, i64 0, i64 0
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 %134
  %136 = getelementptr inbounds [4 x i64], ptr %135, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %126, ptr noundef %131, ptr noundef %136)
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %139, i32 0, i32 2
  %141 = getelementptr inbounds [4 x i64], ptr %140, i64 0, i64 0
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %143
  %145 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %144, i32 0, i32 2
  %146 = getelementptr inbounds [4 x i64], ptr %145, i64 0, i64 0
  %147 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 31
  %148 = getelementptr inbounds [4 x i64], ptr %147, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %141, ptr noundef %146, ptr noundef %148)
  br label %149

149:                                              ; preds = %121
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %7, align 4, !tbaa !9
  br label %118, !llvm.loop !16

152:                                              ; preds = %118
  %153 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 31
  %154 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %153, i32 0, i32 2
  %155 = getelementptr inbounds [4 x i64], ptr %154, i64 0, i64 0
  %156 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 30
  %157 = getelementptr inbounds [4 x i64], ptr %156, i64 0, i64 0
  %158 = getelementptr inbounds [32 x [4 x i64]], ptr %5, i64 0, i64 31
  %159 = getelementptr inbounds [4 x i64], ptr %158, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %155, ptr noundef %157, ptr noundef %159)
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %227, %152
  %161 = load i32, ptr %7, align 4, !tbaa !9
  %162 = icmp slt i32 %161, 32
  br i1 %162, label %163, label %230

163:                                              ; preds = %160
  %164 = load i32, ptr %7, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %165
  %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 = load i32, ptr %7, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %170
  %172 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %171, i32 0, i32 2
  %173 = getelementptr inbounds [4 x i64], ptr %172, i64 0, i64 0
  call void @sm2_z256_modp_mont_sqr(ptr noundef %168, ptr noundef %173)
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = load i32, ptr %7, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %177, i32 0, i32 1
  %179 = getelementptr inbounds [4 x i64], ptr %178, i64 0, i64 0
  %180 = load i32, ptr %7, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %181
  %183 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %182, i32 0, i32 0
  %184 = getelementptr inbounds [4 x i64], ptr %183, i64 0, i64 0
  %185 = load i32, ptr %7, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %4, i64 0, i64 %186
  %188 = getelementptr inbounds %struct.SM2_Z256_POINT, ptr %187, i32 0, i32 2
  %189 = getelementptr inbounds [4 x i64], ptr %188, i64 0, i64 0
  call void @sm2_z256_modp_mont_mul(ptr noundef %179, ptr noundef %184, ptr noundef %189)
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = load i32, ptr %7, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %190, i64 %192
  %194 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %193, i32 0, i32 1
  %195 = getelementptr inbounds [4 x i64], ptr %194, i64 0, i64 0
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = load i32, ptr %7, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %196, i64 %198
  %200 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %199, i32 0, i32 1
  %201 = getelementptr inbounds [4 x i64], ptr %200, i64 0, i64 0
  call void @sm2_z256_modp_from_mont(ptr noundef %195, ptr noundef %201)
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = load i32, ptr %7, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %202, i64 %204
  %206 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %205, i32 0, i32 1
  %207 = getelementptr inbounds [4 x i64], ptr %206, i64 0, i64 0
  %208 = call ptr @sm2_z256_order()
  %209 = call i32 @sm2_z256_cmp(ptr noundef %207, ptr noundef %208)
  %210 = icmp sge i32 %209, 0
  br i1 %210, label %211, label %226

211:                                              ; preds = %163
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = load i32, ptr %7, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %212, i64 %214
  %216 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %215, i32 0, i32 1
  %217 = getelementptr inbounds [4 x i64], ptr %216, i64 0, i64 0
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = load i32, ptr %7, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %218, i64 %220
  %222 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %221, i32 0, i32 1
  %223 = getelementptr inbounds [4 x i64], ptr %222, i64 0, i64 0
  %224 = call ptr @sm2_z256_order()
  %225 = call i64 @sm2_z256_sub(ptr noundef %217, ptr noundef %223, ptr noundef %224)
  br label %226

226:                                              ; preds = %211, %163
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %7, align 4, !tbaa !9
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %7, align 4, !tbaa !9
  br label %160, !llvm.loop !17

230:                                              ; preds = %160
  store i32 1, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %231

231:                                              ; preds = %230, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 3072, ptr %4) #4
  %232 = load i32, ptr %2, align 4
  ret i32 %232
}

declare void @sm2_z256_copy(ptr noundef, ptr noundef) #1

declare void @sm2_z256_modp_mont_mul(ptr noundef, ptr noundef, ptr noundef) #1

declare void @sm2_z256_modp_mont_inv(ptr noundef, ptr noundef) #1

declare void @sm2_z256_modp_mont_sqr(ptr noundef, ptr noundef) #1

declare void @sm2_z256_modp_from_mont(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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

%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.SM2_SIGN_PRE_COMP = type { [4 x i64], [4 x i64] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.sm2_fast_sign_pre_compute = external hidden unnamed_addr constant [26 x i8], align 1

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

declare i64 @sm2_z256_is_zero(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare i32 @sm2_z256_rand_range(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @sm2_z256_order() local_unnamed_addr #1

declare void @sm2_z256_point_mul_generator(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @sm2_z256_cmp(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @sm2_z256_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; 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
define dso_local range(i32 -1, 2) i32 @sm2_fast_sign_pre_compute(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca [32 x %struct.SM2_Z256_POINT], align 16
  %3 = alloca [32 x [4 x i64]], align 16
  %4 = alloca [32 x [4 x i64]], align 16
  call void @llvm.lifetime.start.p0(i64 3072, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #4
  br label %.preheader

.preheader:                                       ; preds = %1, %14
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %14 ]
  %5 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %0, i64 %indvars.iv
  br label %6

6:                                                ; preds = %.preheader, %12
  %7 = call ptr @sm2_z256_order() #4
  %8 = call i32 @sm2_z256_rand_range(ptr noundef %5, ptr noundef %7) #4
  %.not = icmp eq i32 %8, 1
  br i1 %.not, label %12, label %9

9:                                                ; preds = %6
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 119, ptr noundef nonnull @__FUNCTION__.sm2_fast_sign_pre_compute) #5
  br label %.loopexit

12:                                               ; preds = %6
  %13 = call i64 @sm2_z256_is_zero(ptr noundef %5) #4
  %.not45 = icmp eq i64 %13, 0
  br i1 %.not45, label %14, label %6, !llvm.loop !9

14:                                               ; preds = %12
  %15 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %2, i64 0, i64 %indvars.iv
  call void @sm2_z256_point_mul_generator(ptr noundef nonnull %15, ptr noundef %5) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 32
  br i1 %exitcond.not, label %16, label %.preheader, !llvm.loop !11

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %2, i64 64
  call void @sm2_z256_copy(ptr noundef nonnull %3, ptr noundef nonnull %17) #4
  %18 = getelementptr inbounds i8, ptr %3, i64 32
  %19 = getelementptr inbounds i8, ptr %2, i64 160
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %18, ptr noundef nonnull %3, ptr noundef nonnull %19) #4
  %20 = getelementptr inbounds i8, ptr %3, i64 64
  %21 = getelementptr inbounds i8, ptr %2, i64 256
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %20, ptr noundef nonnull %18, ptr noundef nonnull %21) #4
  %22 = getelementptr inbounds i8, ptr %3, i64 96
  %23 = getelementptr inbounds i8, ptr %2, i64 352
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %22, ptr noundef nonnull %20, ptr noundef nonnull %23) #4
  %24 = getelementptr inbounds i8, ptr %3, i64 128
  %25 = getelementptr inbounds i8, ptr %2, i64 448
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %24, ptr noundef nonnull %22, ptr noundef nonnull %25) #4
  %26 = getelementptr inbounds i8, ptr %3, i64 160
  %27 = getelementptr inbounds i8, ptr %2, i64 544
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %26, ptr noundef nonnull %24, ptr noundef nonnull %27) #4
  %28 = getelementptr inbounds i8, ptr %3, i64 192
  %29 = getelementptr inbounds i8, ptr %2, i64 640
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %28, ptr noundef nonnull %26, ptr noundef nonnull %29) #4
  %30 = getelementptr inbounds i8, ptr %3, i64 224
  %31 = getelementptr inbounds i8, ptr %2, i64 736
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %30, ptr noundef nonnull %28, ptr noundef nonnull %31) #4
  %32 = getelementptr inbounds i8, ptr %3, i64 256
  %33 = getelementptr inbounds i8, ptr %2, i64 832
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %32, ptr noundef nonnull %30, ptr noundef nonnull %33) #4
  %34 = getelementptr inbounds i8, ptr %3, i64 288
  %35 = getelementptr inbounds i8, ptr %2, i64 928
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %34, ptr noundef nonnull %32, ptr noundef nonnull %35) #4
  %36 = getelementptr inbounds i8, ptr %3, i64 320
  %37 = getelementptr inbounds i8, ptr %2, i64 1024
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %36, ptr noundef nonnull %34, ptr noundef nonnull %37) #4
  %38 = getelementptr inbounds i8, ptr %3, i64 352
  %39 = getelementptr inbounds i8, ptr %2, i64 1120
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %38, ptr noundef nonnull %36, ptr noundef nonnull %39) #4
  %40 = getelementptr inbounds i8, ptr %3, i64 384
  %41 = getelementptr inbounds i8, ptr %2, i64 1216
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %40, ptr noundef nonnull %38, ptr noundef nonnull %41) #4
  %42 = getelementptr inbounds i8, ptr %3, i64 416
  %43 = getelementptr inbounds i8, ptr %2, i64 1312
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %42, ptr noundef nonnull %40, ptr noundef nonnull %43) #4
  %44 = getelementptr inbounds i8, ptr %3, i64 448
  %45 = getelementptr inbounds i8, ptr %2, i64 1408
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %44, ptr noundef nonnull %42, ptr noundef nonnull %45) #4
  %46 = getelementptr inbounds i8, ptr %3, i64 480
  %47 = getelementptr inbounds i8, ptr %2, i64 1504
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %46, ptr noundef nonnull %44, ptr noundef nonnull %47) #4
  %48 = getelementptr inbounds i8, ptr %3, i64 512
  %49 = getelementptr inbounds i8, ptr %2, i64 1600
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %48, ptr noundef nonnull %46, ptr noundef nonnull %49) #4
  %50 = getelementptr inbounds i8, ptr %3, i64 544
  %51 = getelementptr inbounds i8, ptr %2, i64 1696
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %50, ptr noundef nonnull %48, ptr noundef nonnull %51) #4
  %52 = getelementptr inbounds i8, ptr %3, i64 576
  %53 = getelementptr inbounds i8, ptr %2, i64 1792
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %52, ptr noundef nonnull %50, ptr noundef nonnull %53) #4
  %54 = getelementptr inbounds i8, ptr %3, i64 608
  %55 = getelementptr inbounds i8, ptr %2, i64 1888
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %54, ptr noundef nonnull %52, ptr noundef nonnull %55) #4
  %56 = getelementptr inbounds i8, ptr %3, i64 640
  %57 = getelementptr inbounds i8, ptr %2, i64 1984
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %56, ptr noundef nonnull %54, ptr noundef nonnull %57) #4
  %58 = getelementptr inbounds i8, ptr %3, i64 672
  %59 = getelementptr inbounds i8, ptr %2, i64 2080
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %58, ptr noundef nonnull %56, ptr noundef nonnull %59) #4
  %60 = getelementptr inbounds i8, ptr %3, i64 704
  %61 = getelementptr inbounds i8, ptr %2, i64 2176
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %60, ptr noundef nonnull %58, ptr noundef nonnull %61) #4
  %62 = getelementptr inbounds i8, ptr %3, i64 736
  %63 = getelementptr inbounds i8, ptr %2, i64 2272
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %62, ptr noundef nonnull %60, ptr noundef nonnull %63) #4
  %64 = getelementptr inbounds i8, ptr %3, i64 768
  %65 = getelementptr inbounds i8, ptr %2, i64 2368
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %64, ptr noundef nonnull %62, ptr noundef nonnull %65) #4
  %66 = getelementptr inbounds i8, ptr %3, i64 800
  %67 = getelementptr inbounds i8, ptr %2, i64 2464
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %66, ptr noundef nonnull %64, ptr noundef nonnull %67) #4
  %68 = getelementptr inbounds i8, ptr %3, i64 832
  %69 = getelementptr inbounds i8, ptr %2, i64 2560
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %68, ptr noundef nonnull %66, ptr noundef nonnull %69) #4
  %70 = getelementptr inbounds i8, ptr %3, i64 864
  %71 = getelementptr inbounds i8, ptr %2, i64 2656
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %70, ptr noundef nonnull %68, ptr noundef nonnull %71) #4
  %72 = getelementptr inbounds i8, ptr %3, i64 896
  %73 = getelementptr inbounds i8, ptr %2, i64 2752
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %72, ptr noundef nonnull %70, ptr noundef nonnull %73) #4
  %74 = getelementptr inbounds i8, ptr %3, i64 928
  %75 = getelementptr inbounds i8, ptr %2, i64 2848
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %74, ptr noundef nonnull %72, ptr noundef nonnull %75) #4
  %76 = getelementptr inbounds i8, ptr %3, i64 960
  %77 = getelementptr inbounds i8, ptr %2, i64 2944
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %76, ptr noundef nonnull %74, ptr noundef nonnull %77) #4
  %78 = getelementptr inbounds i8, ptr %3, i64 992
  %79 = getelementptr inbounds i8, ptr %2, i64 3040
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %78, ptr noundef nonnull %76, ptr noundef nonnull %79) #4
  call void @sm2_z256_modp_mont_inv(ptr noundef nonnull %78, ptr noundef nonnull %78) #4
  %80 = getelementptr inbounds i8, ptr %4, i64 992
  call void @sm2_z256_copy(ptr noundef nonnull %80, ptr noundef nonnull %79) #4
  %81 = getelementptr inbounds i8, ptr %4, i64 960
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %81, ptr noundef nonnull %80, ptr noundef nonnull %77) #4
  %82 = getelementptr inbounds i8, ptr %4, i64 928
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %82, ptr noundef nonnull %81, ptr noundef nonnull %75) #4
  %83 = getelementptr inbounds i8, ptr %4, i64 896
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %83, ptr noundef nonnull %82, ptr noundef nonnull %73) #4
  %84 = getelementptr inbounds i8, ptr %4, i64 864
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %84, ptr noundef nonnull %83, ptr noundef nonnull %71) #4
  %85 = getelementptr inbounds i8, ptr %4, i64 832
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %85, ptr noundef nonnull %84, ptr noundef nonnull %69) #4
  %86 = getelementptr inbounds i8, ptr %4, i64 800
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %86, ptr noundef nonnull %85, ptr noundef nonnull %67) #4
  %87 = getelementptr inbounds i8, ptr %4, i64 768
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %87, ptr noundef nonnull %86, ptr noundef nonnull %65) #4
  %88 = getelementptr inbounds i8, ptr %4, i64 736
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %88, ptr noundef nonnull %87, ptr noundef nonnull %63) #4
  %89 = getelementptr inbounds i8, ptr %4, i64 704
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %89, ptr noundef nonnull %88, ptr noundef nonnull %61) #4
  %90 = getelementptr inbounds i8, ptr %4, i64 672
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %90, ptr noundef nonnull %89, ptr noundef nonnull %59) #4
  %91 = getelementptr inbounds i8, ptr %4, i64 640
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %91, ptr noundef nonnull %90, ptr noundef nonnull %57) #4
  %92 = getelementptr inbounds i8, ptr %4, i64 608
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %92, ptr noundef nonnull %91, ptr noundef nonnull %55) #4
  %93 = getelementptr inbounds i8, ptr %4, i64 576
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %93, ptr noundef nonnull %92, ptr noundef nonnull %53) #4
  %94 = getelementptr inbounds i8, ptr %4, i64 544
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %94, ptr noundef nonnull %93, ptr noundef nonnull %51) #4
  %95 = getelementptr inbounds i8, ptr %4, i64 512
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %95, ptr noundef nonnull %94, ptr noundef nonnull %49) #4
  %96 = getelementptr inbounds i8, ptr %4, i64 480
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %96, ptr noundef nonnull %95, ptr noundef nonnull %47) #4
  %97 = getelementptr inbounds i8, ptr %4, i64 448
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %97, ptr noundef nonnull %96, ptr noundef nonnull %45) #4
  %98 = getelementptr inbounds i8, ptr %4, i64 416
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %98, ptr noundef nonnull %97, ptr noundef nonnull %43) #4
  %99 = getelementptr inbounds i8, ptr %4, i64 384
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %99, ptr noundef nonnull %98, ptr noundef nonnull %41) #4
  %100 = getelementptr inbounds i8, ptr %4, i64 352
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %100, ptr noundef nonnull %99, ptr noundef nonnull %39) #4
  %101 = getelementptr inbounds i8, ptr %4, i64 320
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %101, ptr noundef nonnull %100, ptr noundef nonnull %37) #4
  %102 = getelementptr inbounds i8, ptr %4, i64 288
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %102, ptr noundef nonnull %101, ptr noundef nonnull %35) #4
  %103 = getelementptr inbounds i8, ptr %4, i64 256
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %103, ptr noundef nonnull %102, ptr noundef nonnull %33) #4
  %104 = getelementptr inbounds i8, ptr %4, i64 224
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %104, ptr noundef nonnull %103, ptr noundef nonnull %31) #4
  %105 = getelementptr inbounds i8, ptr %4, i64 192
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %105, ptr noundef nonnull %104, ptr noundef nonnull %29) #4
  %106 = getelementptr inbounds i8, ptr %4, i64 160
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %106, ptr noundef nonnull %105, ptr noundef nonnull %27) #4
  %107 = getelementptr inbounds i8, ptr %4, i64 128
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %107, ptr noundef nonnull %106, ptr noundef nonnull %25) #4
  %108 = getelementptr inbounds i8, ptr %4, i64 96
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %108, ptr noundef nonnull %107, ptr noundef nonnull %23) #4
  %109 = getelementptr inbounds i8, ptr %4, i64 64
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %109, ptr noundef nonnull %108, ptr noundef nonnull %21) #4
  %110 = getelementptr inbounds i8, ptr %4, i64 32
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %110, ptr noundef nonnull %109, ptr noundef nonnull %19) #4
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %17, ptr noundef nonnull %110, ptr noundef nonnull %78) #4
  br label %111

111:                                              ; preds = %16, %111
  %indvars.iv62 = phi i64 [ 1, %16 ], [ %indvars.iv.next63, %111 ]
  %112 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %2, i64 0, i64 %indvars.iv62, i32 2
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %113 = getelementptr inbounds [32 x [4 x i64]], ptr %4, i64 0, i64 %indvars.iv.next63
  %114 = add nsw i64 %indvars.iv62, -1
  %115 = getelementptr inbounds [32 x [4 x i64]], ptr %3, i64 0, i64 %114
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %112, ptr noundef nonnull %113, ptr noundef nonnull %115) #4
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %112, ptr noundef nonnull %112, ptr noundef nonnull %78) #4
  %exitcond65.not = icmp eq i64 %indvars.iv.next63, 31
  br i1 %exitcond65.not, label %116, label %111, !llvm.loop !12

116:                                              ; preds = %111
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %79, ptr noundef nonnull %76, ptr noundef nonnull %78) #4
  br label %117

117:                                              ; preds = %116, %127
  %indvars.iv66 = phi i64 [ 0, %116 ], [ %indvars.iv.next67, %127 ]
  %118 = getelementptr inbounds [32 x %struct.SM2_Z256_POINT], ptr %2, i64 0, i64 %indvars.iv66
  %119 = getelementptr inbounds i8, ptr %118, i64 64
  call void @sm2_z256_modp_mont_sqr(ptr noundef nonnull %119, ptr noundef nonnull %119) #4
  %120 = getelementptr inbounds %struct.SM2_SIGN_PRE_COMP, ptr %0, i64 %indvars.iv66, i32 1
  call void @sm2_z256_modp_mont_mul(ptr noundef nonnull %120, ptr noundef nonnull %118, ptr noundef nonnull %119) #4
  call void @sm2_z256_modp_from_mont(ptr noundef nonnull %120, ptr noundef nonnull %120) #4
  %121 = call ptr @sm2_z256_order() #4
  %122 = call i32 @sm2_z256_cmp(ptr noundef nonnull %120, ptr noundef %121) #4
  %123 = icmp sgt i32 %122, -1
  br i1 %123, label %124, label %127

124:                                              ; preds = %117
  %125 = call ptr @sm2_z256_order() #4
  %126 = call i64 @sm2_z256_sub(ptr noundef nonnull %120, ptr noundef nonnull %120, ptr noundef %125) #4
  br label %127

127:                                              ; preds = %117, %124
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next67, 32
  br i1 %exitcond69.not, label %.loopexit, label %117, !llvm.loop !13

.loopexit:                                        ; preds = %127, %9
  %.044 = phi i32 [ -1, %9 ], [ 1, %127 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 3072, ptr nonnull %2) #4
  ret i32 %.044
}

declare void @sm2_z256_copy(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @sm2_z256_modp_mont_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @sm2_z256_modp_mont_inv(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @sm2_z256_modp_mont_sqr(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @sm2_z256_modp_from_mont(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { cold 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass