; LLVM IR from specinfo-ua/UAPKI :: library/uapkic/src (ec)

; 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.EcCtx_st = type { ptr, ptr, ptr, ptr, i8, i8 }
%struct.EcParamsCtx_st = type { i32, ptr, ptr, ptr, ptr, i8, i64, ptr, ptr, i32, ptr }
%struct.EcPrecomp_st = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.EcPrecompComb_st = type { ptr, i32 }
%struct.EcPrecompWin_st = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [19 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

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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @ec_free(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @ec_set_verify_precomp(ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @ec_copy_params_with_alloc(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %1
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %15, label %13

13:                                               ; preds = %10
  store i32 2, ptr %4, align 4, !tbaa !9
  %14 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 545, i32 noundef %14, ptr noundef null)
  br label %331

15:                                               ; preds = %10
  br label %16

16:                                               ; preds = %15
  br label %17

17:                                               ; preds = %16
  br label %18

18:                                               ; preds = %17
  %19 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 40) #6
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = icmp eq ptr null, %19
  br i1 %20, label %21, label %23

21:                                               ; preds = %18
  store i32 1, ptr %4, align 4, !tbaa !9
  %22 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 547, i32 noundef %22, ptr noundef null)
  br label %331

23:                                               ; preds = %18
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  br label %26

26:                                               ; preds = %25
  %27 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 88) #6
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.EcCtx_st, ptr %28, i32 0, i32 0
  store ptr %27, ptr %29, align 8, !tbaa !11
  %30 = icmp eq ptr null, %27
  br i1 %30, label %31, label %33

31:                                               ; preds = %26
  store i32 1, ptr %4, align 4, !tbaa !9
  %32 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 548, i32 noundef %32, ptr noundef null)
  br label %331

33:                                               ; preds = %26
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.EcCtx_st, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !14
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.EcCtx_st, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %43, i32 0, i32 0
  store i32 %40, ptr %44, align 8, !tbaa !14
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.EcCtx_st, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %47, i32 0, i32 9
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.EcCtx_st, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %52, i32 0, i32 9
  store i32 %49, ptr %53, align 8, !tbaa !17
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.EcCtx_st, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %56, i32 0, i32 5
  %58 = load i8, ptr %57, align 8, !tbaa !18, !range !19, !noundef !20
  %59 = trunc i8 %58 to i1
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.EcCtx_st, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %62, i32 0, i32 5
  %64 = zext i1 %59 to i8
  store i8 %64, ptr %63, align 8, !tbaa !18
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.EcCtx_st, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %67, i32 0, i32 6
  %69 = load i64, ptr %68, align 8, !tbaa !21
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.EcCtx_st, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %72, i32 0, i32 6
  store i64 %69, ptr %73, align 8, !tbaa !21
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.EcCtx_st, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !14
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %208

80:                                               ; preds = %35
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.EcCtx_st, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %84, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !22
  %87 = call ptr @ec2m_copy_with_alloc(ptr noundef %86)
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.EcCtx_st, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %90, i32 0, i32 4
  store ptr %87, ptr %91, align 8, !tbaa !22
  %92 = icmp eq ptr null, %87
  br i1 %92, label %93, label %95

93:                                               ; preds = %81
  store i32 2, ptr %4, align 4, !tbaa !9
  %94 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 556, i32 noundef %94)
  br label %331

95:                                               ; preds = %81
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.EcCtx_st, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %100, i32 0, i32 8
  %102 = load ptr, ptr %101, align 8, !tbaa !23
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %152

104:                                              ; preds = %97
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EcCtx_st, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %108, i32 0, i32 6
  %110 = load i64, ptr %109, align 8, !tbaa !21
  %111 = mul i64 %110, 8
  %112 = call noalias ptr @malloc(i64 noundef %111) #7
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.EcCtx_st, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %115, i32 0, i32 8
  store ptr %112, ptr %116, align 8, !tbaa !23
  %117 = icmp eq ptr null, %112
  br i1 %117, label %118, label %120

118:                                              ; preds = %105
  store i32 1, ptr %4, align 4, !tbaa !9
  %119 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 559, i32 noundef %119, ptr noundef null)
  br label %331

120:                                              ; preds = %105
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  store i64 0, ptr %5, align 8, !tbaa !24
  br label %123

123:                                              ; preds = %148, %122
  %124 = load i64, ptr %5, align 8, !tbaa !24
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.EcCtx_st, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %127, i32 0, i32 6
  %129 = load i64, ptr %128, align 8, !tbaa !21
  %130 = icmp ult i64 %124, %129
  br i1 %130, label %131, label %151

131:                                              ; preds = %123
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.EcCtx_st, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %134, i32 0, i32 8
  %136 = load ptr, ptr %135, align 8, !tbaa !23
  %137 = load i64, ptr %5, align 8, !tbaa !24
  %138 = getelementptr inbounds ptr, ptr %136, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = call ptr @wa_copy_with_alloc(ptr noundef %139)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.EcCtx_st, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %143, i32 0, i32 8
  %145 = load ptr, ptr %144, align 8, !tbaa !23
  %146 = load i64, ptr %5, align 8, !tbaa !24
  %147 = getelementptr inbounds ptr, ptr %145, i64 %146
  store ptr %140, ptr %147, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %131
  %149 = load i64, ptr %5, align 8, !tbaa !24
  %150 = add i64 %149, 1
  store i64 %150, ptr %5, align 8, !tbaa !24
  br label %123, !llvm.loop !25

151:                                              ; preds = %123
  br label %152

152:                                              ; preds = %151, %97
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.EcCtx_st, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !11
  %156 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %155, i32 0, i32 7
  %157 = load ptr, ptr %156, align 8, !tbaa !27
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %207

159:                                              ; preds = %152
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.EcCtx_st, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !11
  %164 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %163, i32 0, i32 6
  %165 = load i64, ptr %164, align 8, !tbaa !21
  %166 = mul i64 %165, 8
  %167 = call noalias ptr @malloc(i64 noundef %166) #7
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.EcCtx_st, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !11
  %171 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %170, i32 0, i32 7
  store ptr %167, ptr %171, align 8, !tbaa !27
  %172 = icmp eq ptr null, %167
  br i1 %172, label %173, label %175

173:                                              ; preds = %160
  store i32 1, ptr %4, align 4, !tbaa !9
  %174 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 566, i32 noundef %174, ptr noundef null)
  br label %331

175:                                              ; preds = %160
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  store i64 0, ptr %5, align 8, !tbaa !24
  br label %178

178:                                              ; preds = %203, %177
  %179 = load i64, ptr %5, align 8, !tbaa !24
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.EcCtx_st, ptr %180, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !11
  %183 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %182, i32 0, i32 6
  %184 = load i64, ptr %183, align 8, !tbaa !21
  %185 = icmp ult i64 %179, %184
  br i1 %185, label %186, label %206

186:                                              ; preds = %178
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.EcCtx_st, ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !11
  %190 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %189, i32 0, i32 7
  %191 = load ptr, ptr %190, align 8, !tbaa !27
  %192 = load i64, ptr %5, align 8, !tbaa !24
  %193 = getelementptr inbounds ptr, ptr %191, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = call ptr @wa_copy_with_alloc(ptr noundef %194)
  %196 = load ptr, ptr %6, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.EcCtx_st, ptr %196, i32 0, i32 0
  %198 = load ptr, ptr %197, align 8, !tbaa !11
  %199 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %198, i32 0, i32 7
  %200 = load ptr, ptr %199, align 8, !tbaa !27
  %201 = load i64, ptr %5, align 8, !tbaa !24
  %202 = getelementptr inbounds ptr, ptr %200, i64 %201
  store ptr %195, ptr %202, align 8, !tbaa !5
  br label %203

203:                                              ; preds = %186
  %204 = load i64, ptr %5, align 8, !tbaa !24
  %205 = add i64 %204, 1
  store i64 %205, ptr %5, align 8, !tbaa !24
  br label %178, !llvm.loop !28

206:                                              ; preds = %178
  br label %207

207:                                              ; preds = %206, %152
  br label %226

208:                                              ; preds = %35
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.EcCtx_st, ptr %210, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8, !tbaa !11
  %213 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %212, i32 0, i32 3
  %214 = load ptr, ptr %213, align 8, !tbaa !29
  %215 = call ptr @ecp_copy_with_alloc(ptr noundef %214)
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.EcCtx_st, ptr %216, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8, !tbaa !11
  %219 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %218, i32 0, i32 3
  store ptr %215, ptr %219, align 8, !tbaa !29
  %220 = icmp eq ptr null, %215
  br i1 %220, label %221, label %223

221:                                              ; preds = %209
  store i32 2, ptr %4, align 4, !tbaa !9
  %222 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 573, i32 noundef %222)
  br label %331

223:                                              ; preds = %209
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225, %207
  br label %227

227:                                              ; preds = %226
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.EcCtx_st, ptr %228, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !11
  %231 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %230, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !30
  %233 = call ptr @ec_point_copy_with_alloc(ptr noundef %232)
  %234 = load ptr, ptr %6, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.EcCtx_st, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !11
  %237 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %236, i32 0, i32 1
  store ptr %233, ptr %237, align 8, !tbaa !30
  %238 = icmp eq ptr null, %233
  br i1 %238, label %239, label %241

239:                                              ; preds = %227
  store i32 2, ptr %4, align 4, !tbaa !9
  %240 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 575, i32 noundef %240)
  br label %331

241:                                              ; preds = %227
  br label %242

242:                                              ; preds = %241
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.EcCtx_st, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !11
  %248 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %247, i32 0, i32 2
  %249 = load ptr, ptr %248, align 8, !tbaa !31
  %250 = call ptr @wa_copy_with_alloc(ptr noundef %249)
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.EcCtx_st, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8, !tbaa !11
  %254 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %253, i32 0, i32 2
  store ptr %250, ptr %254, align 8, !tbaa !31
  %255 = icmp eq ptr null, %250
  br i1 %255, label %256, label %258

256:                                              ; preds = %244
  store i32 2, ptr %4, align 4, !tbaa !9
  %257 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 576, i32 noundef %257)
  br label %331

258:                                              ; preds = %244
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259
  %261 = load ptr, ptr %3, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.EcCtx_st, ptr %261, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !11
  %264 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %263, i32 0, i32 10
  %265 = load ptr, ptr %264, align 8, !tbaa !32
  %266 = icmp ne ptr %265, null
  br i1 %266, label %267, label %285

267:                                              ; preds = %260
  br label %268

268:                                              ; preds = %267
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.EcCtx_st, ptr %269, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8, !tbaa !11
  %272 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %271, i32 0, i32 10
  %273 = load ptr, ptr %272, align 8, !tbaa !32
  %274 = call ptr @ec_copy_precomp_with_alloc(ptr noundef %273)
  %275 = load ptr, ptr %6, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.EcCtx_st, ptr %275, i32 0, i32 0
  %277 = load ptr, ptr %276, align 8, !tbaa !11
  %278 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %277, i32 0, i32 10
  store ptr %274, ptr %278, align 8, !tbaa !32
  %279 = icmp eq ptr null, %274
  br i1 %279, label %280, label %282

280:                                              ; preds = %268
  store i32 2, ptr %4, align 4, !tbaa !9
  %281 = load i32, ptr %4, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 578, i32 noundef %281)
  br label %331

282:                                              ; preds = %268
  br label %283

283:                                              ; preds = %282
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284, %260
  %286 = load ptr, ptr %3, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.EcCtx_st, ptr %286, i32 0, i32 3
  %288 = load ptr, ptr %287, align 8, !tbaa !33
  %289 = icmp ne ptr %288, null
  br i1 %289, label %290, label %329

290:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.EcCtx_st, ptr %291, i32 0, i32 3
  %293 = load ptr, ptr %292, align 8, !tbaa !33
  %294 = getelementptr inbounds %struct.EcPrecomp_st, ptr %293, i32 0, i32 0
  %295 = load i32, ptr %294, align 8, !tbaa !34
  %296 = icmp eq i32 %295, 1
  br i1 %296, label %297, label %305

297:                                              ; preds = %290
  %298 = load ptr, ptr %3, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.EcCtx_st, ptr %298, i32 0, i32 3
  %300 = load ptr, ptr %299, align 8, !tbaa !33
  %301 = getelementptr inbounds %struct.EcPrecomp_st, ptr %300, i32 0, i32 1
  %302 = load ptr, ptr %301, align 8, !tbaa !36
  %303 = getelementptr inbounds %struct.EcPrecompComb_st, ptr %302, i32 0, i32 1
  %304 = load i32, ptr %303, align 8, !tbaa !37
  br label %306

305:                                              ; preds = %290
  br label %306

306:                                              ; preds = %305, %297
  %307 = phi i32 [ %304, %297 ], [ 0, %305 ]
  store i32 %307, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %308 = load ptr, ptr %3, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.EcCtx_st, ptr %308, i32 0, i32 3
  %310 = load ptr, ptr %309, align 8, !tbaa !33
  %311 = getelementptr inbounds %struct.EcPrecomp_st, ptr %310, i32 0, i32 0
  %312 = load i32, ptr %311, align 8, !tbaa !34
  %313 = icmp eq i32 %312, 0
  br i1 %313, label %314, label %322

314:                                              ; preds = %306
  %315 = load ptr, ptr %3, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.EcCtx_st, ptr %315, i32 0, i32 3
  %317 = load ptr, ptr %316, align 8, !tbaa !33
  %318 = getelementptr inbounds %struct.EcPrecomp_st, ptr %317, i32 0, i32 1
  %319 = load ptr, ptr %318, align 8, !tbaa !36
  %320 = getelementptr inbounds %struct.EcPrecompWin_st, ptr %319, i32 0, i32 2
  %321 = load i32, ptr %320, align 4, !tbaa !39
  br label %323

322:                                              ; preds = %306
  br label %323

323:                                              ; preds = %322, %314
  %324 = phi i32 [ %321, %314 ], [ 0, %322 ]
  store i32 %324, ptr %8, align 4, !tbaa !9
  %325 = load ptr, ptr %6, align 8, !tbaa !5
  %326 = load i32, ptr %7, align 4, !tbaa !9
  %327 = load i32, ptr %8, align 4, !tbaa !9
  %328 = call i32 @ec_set_verify_precomp(ptr noundef %325, i32 noundef %326, i32 noundef %327)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %329

329:                                              ; preds = %323, %285
  %330 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %330, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %333

331:                                              ; preds = %280, %256, %239, %221, %173, %118, %93, %31, %21, %13
  %332 = load ptr, ptr %6, align 8, !tbaa !5
  call void @ec_free(ptr noundef %332)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %333

333:                                              ; preds = %331, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %334 = load ptr, ptr %2, align 8
  ret ptr %334
}

declare ptr @ec2m_copy_with_alloc(ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

declare ptr @wa_copy_with_alloc(ptr noundef) #1

declare ptr @ecp_copy_with_alloc(ptr noundef) #1

declare ptr @ec_point_copy_with_alloc(ptr noundef) #1

declare ptr @ec_copy_precomp_with_alloc(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 allocsize(0,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 #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 allocsize(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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind allocsize(0) }

!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 0}
!12 = !{!"EcCtx_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 33}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"EcParamsCtx_st", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !16, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !6, i64 80}
!16 = !{!"long", !7, i64 0}
!17 = !{!15, !10, i64 72}
!18 = !{!15, !13, i64 40}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!15, !16, i64 48}
!22 = !{!15, !6, i64 32}
!23 = !{!15, !6, i64 64}
!24 = !{!16, !16, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!15, !6, i64 56}
!28 = distinct !{!28, !26}
!29 = !{!15, !6, i64 24}
!30 = !{!15, !6, i64 8}
!31 = !{!15, !6, i64 16}
!32 = !{!15, !6, i64 80}
!33 = !{!12, !6, i64 24}
!34 = !{!35, !10, i64 0}
!35 = !{!"EcPrecomp_st", !10, i64 0, !7, i64 8}
!36 = !{!7, !7, i64 0}
!37 = !{!38, !10, i64 8}
!38 = !{!"EcPrecompComb_st", !6, i64 0, !10, i64 8}
!39 = !{!40, !10, i64 12}
!40 = !{!"EcPrecompWin_st", !6, i64 0, !10, i64 8, !10, i64 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"

@.str = external hidden unnamed_addr constant [19 x i8], align 1

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @ec_free(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @ec_set_verify_precomp(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @ec_copy_params_with_alloc(ptr noundef readonly %0) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %2, label %3

2:                                                ; preds = %1
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 545, i32 noundef 2, ptr noundef null) #4
  br label %139

3:                                                ; preds = %1
  %4 = tail call noalias dereferenceable_or_null(40) ptr @calloc(i64 noundef 1, i64 noundef 40) #5
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %3
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 547, i32 noundef 1, ptr noundef null) #4
  br label %139

7:                                                ; preds = %3
  %8 = tail call noalias dereferenceable_or_null(88) ptr @calloc(i64 noundef 1, i64 noundef 88) #5
  store ptr %8, ptr %4, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %7
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 548, i32 noundef 1, ptr noundef null) #4
  br label %139

11:                                               ; preds = %7
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = load i32, ptr %12, align 8, !tbaa !11
  store i32 %13, ptr %8, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %12, i64 72
  %15 = load i32, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %8, i64 72
  store i32 %15, ptr %16, align 8, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %12, i64 40
  %18 = load i8, ptr %17, align 8, !tbaa !16, !range !17, !noundef !18
  %19 = getelementptr inbounds i8, ptr %8, i64 40
  store i8 %18, ptr %19, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %12, i64 48
  %21 = load i64, ptr %20, align 8, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %8, i64 48
  store i64 %21, ptr %22, align 8, !tbaa !19
  %23 = icmp eq i32 %13, 1
  br i1 %23, label %24, label %86

24:                                               ; preds = %11
  %25 = getelementptr inbounds i8, ptr %12, i64 32
  %26 = load ptr, ptr %25, align 8, !tbaa !20
  %27 = tail call ptr @ec2m_copy_with_alloc(ptr noundef %26) #4
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 32
  store ptr %27, ptr %29, align 8, !tbaa !20
  %30 = icmp eq ptr %27, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %24
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 556, i32 noundef 2) #4
  br label %139

32:                                               ; preds = %24
  %33 = load ptr, ptr %0, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 64
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %.not70 = icmp eq ptr %35, null
  br i1 %.not70, label %.loopexit75, label %36

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %33, i64 48
  %38 = load i64, ptr %37, align 8, !tbaa !19
  %39 = shl i64 %38, 3
  %40 = tail call noalias ptr @malloc(i64 noundef %39) #6
  %41 = getelementptr inbounds i8, ptr %28, i64 64
  store ptr %40, ptr %41, align 8, !tbaa !21
  %42 = icmp eq ptr %40, null
  br i1 %42, label %43, label %.preheader74

.preheader74:                                     ; preds = %36
  %.not79 = icmp eq i64 %38, 0
  br i1 %.not79, label %.loopexit75, label %.lr.ph

43:                                               ; preds = %36
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 559, i32 noundef 1, ptr noundef null) #4
  br label %139

.lr.ph:                                           ; preds = %.preheader74, %.lr.ph
  %44 = phi ptr [ %55, %.lr.ph ], [ %33, %.preheader74 ]
  %.06376 = phi i64 [ %54, %.lr.ph ], [ 0, %.preheader74 ]
  %45 = getelementptr inbounds i8, ptr %44, i64 64
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = getelementptr inbounds ptr, ptr %46, i64 %.06376
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  %49 = tail call ptr @wa_copy_with_alloc(ptr noundef %48) #4
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 64
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = getelementptr inbounds ptr, ptr %52, i64 %.06376
  store ptr %49, ptr %53, align 8, !tbaa !22
  %54 = add nuw i64 %.06376, 1
  %55 = load ptr, ptr %0, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 48
  %57 = load i64, ptr %56, align 8, !tbaa !19
  %58 = icmp ult i64 %54, %57
  br i1 %58, label %.lr.ph, label %.loopexit75, !llvm.loop !23

.loopexit75:                                      ; preds = %.lr.ph, %.preheader74, %32
  %59 = phi ptr [ %33, %.preheader74 ], [ %33, %32 ], [ %55, %.lr.ph ]
  %60 = getelementptr inbounds i8, ptr %59, i64 56
  %61 = load ptr, ptr %60, align 8, !tbaa !25
  %.not71 = icmp eq ptr %61, null
  br i1 %.not71, label %.loopexit, label %62

62:                                               ; preds = %.loopexit75
  %63 = getelementptr inbounds i8, ptr %59, i64 48
  %64 = load i64, ptr %63, align 8, !tbaa !19
  %65 = shl i64 %64, 3
  %66 = tail call noalias ptr @malloc(i64 noundef %65) #6
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 56
  store ptr %66, ptr %68, align 8, !tbaa !25
  %69 = icmp eq ptr %66, null
  br i1 %69, label %70, label %.preheader

.preheader:                                       ; preds = %62
  %.not80 = icmp eq i64 %64, 0
  br i1 %.not80, label %.loopexit, label %.lr.ph78

70:                                               ; preds = %62
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 566, i32 noundef 1, ptr noundef null) #4
  br label %139

.lr.ph78:                                         ; preds = %.preheader, %.lr.ph78
  %71 = phi ptr [ %82, %.lr.ph78 ], [ %59, %.preheader ]
  %.177 = phi i64 [ %81, %.lr.ph78 ], [ 0, %.preheader ]
  %72 = getelementptr inbounds i8, ptr %71, i64 56
  %73 = load ptr, ptr %72, align 8, !tbaa !25
  %74 = getelementptr inbounds ptr, ptr %73, i64 %.177
  %75 = load ptr, ptr %74, align 8, !tbaa !22
  %76 = tail call ptr @wa_copy_with_alloc(ptr noundef %75) #4
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 56
  %79 = load ptr, ptr %78, align 8, !tbaa !25
  %80 = getelementptr inbounds ptr, ptr %79, i64 %.177
  store ptr %76, ptr %80, align 8, !tbaa !22
  %81 = add nuw i64 %.177, 1
  %82 = load ptr, ptr %0, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 48
  %84 = load i64, ptr %83, align 8, !tbaa !19
  %85 = icmp ult i64 %81, %84
  br i1 %85, label %.lr.ph78, label %.loopexit, !llvm.loop !26

86:                                               ; preds = %11
  %87 = getelementptr inbounds i8, ptr %12, i64 24
  %88 = load ptr, ptr %87, align 8, !tbaa !27
  %89 = tail call ptr @ecp_copy_with_alloc(ptr noundef %88) #4
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 24
  store ptr %89, ptr %91, align 8, !tbaa !27
  %92 = icmp eq ptr %89, null
  br i1 %92, label %93, label %..loopexit_crit_edge

..loopexit_crit_edge:                             ; preds = %86
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  br label %.loopexit

93:                                               ; preds = %86
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 573, i32 noundef 2) #4
  br label %139

.loopexit:                                        ; preds = %.lr.ph78, %..loopexit_crit_edge, %.preheader, %.loopexit75
  %94 = phi ptr [ %.pre, %..loopexit_crit_edge ], [ %59, %.preheader ], [ %59, %.loopexit75 ], [ %82, %.lr.ph78 ]
  %95 = getelementptr inbounds i8, ptr %94, i64 8
  %96 = load ptr, ptr %95, align 8, !tbaa !28
  %97 = tail call ptr @ec_point_copy_with_alloc(ptr noundef %96) #4
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  store ptr %97, ptr %99, align 8, !tbaa !28
  %100 = icmp eq ptr %97, null
  br i1 %100, label %101, label %102

101:                                              ; preds = %.loopexit
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 575, i32 noundef 2) #4
  br label %139

102:                                              ; preds = %.loopexit
  %103 = load ptr, ptr %0, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 16
  %105 = load ptr, ptr %104, align 8, !tbaa !29
  %106 = tail call ptr @wa_copy_with_alloc(ptr noundef %105) #4
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 16
  store ptr %106, ptr %108, align 8, !tbaa !29
  %109 = icmp eq ptr %106, null
  br i1 %109, label %110, label %111

110:                                              ; preds = %102
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 576, i32 noundef 2) #4
  br label %139

111:                                              ; preds = %102
  %112 = load ptr, ptr %0, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 80
  %114 = load ptr, ptr %113, align 8, !tbaa !30
  %.not72 = icmp eq ptr %114, null
  br i1 %.not72, label %121, label %115

115:                                              ; preds = %111
  %116 = tail call ptr @ec_copy_precomp_with_alloc(ptr noundef nonnull %114) #4
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 80
  store ptr %116, ptr %118, align 8, !tbaa !30
  %119 = icmp eq ptr %116, null
  br i1 %119, label %120, label %121

120:                                              ; preds = %115
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 578, i32 noundef 2) #4
  br label %139

121:                                              ; preds = %115, %111
  %122 = getelementptr inbounds i8, ptr %0, i64 24
  %123 = load ptr, ptr %122, align 8, !tbaa !31
  %.not73 = icmp eq ptr %123, null
  br i1 %.not73, label %140, label %124

124:                                              ; preds = %121
  %125 = load i32, ptr %123, align 8, !tbaa !32
  switch i32 %125, label %135 [
    i32 1, label %.thread
    i32 0, label %130
  ]

.thread:                                          ; preds = %124
  %126 = getelementptr inbounds i8, ptr %123, i64 8
  %127 = load ptr, ptr %126, align 8, !tbaa !34
  %128 = getelementptr inbounds i8, ptr %127, i64 8
  %129 = load i32, ptr %128, align 8, !tbaa !35
  br label %135

130:                                              ; preds = %124
  %131 = getelementptr inbounds i8, ptr %123, i64 8
  %132 = load ptr, ptr %131, align 8, !tbaa !34
  %133 = getelementptr inbounds i8, ptr %132, i64 12
  %134 = load i32, ptr %133, align 4, !tbaa !37
  br label %135

135:                                              ; preds = %124, %.thread, %130
  %136 = phi i32 [ 0, %130 ], [ %129, %.thread ], [ 0, %124 ]
  %137 = phi i32 [ %134, %130 ], [ 0, %.thread ], [ 0, %124 ]
  %138 = tail call i32 @ec_set_verify_precomp(ptr noundef nonnull %4, i32 noundef %136, i32 noundef %137)
  br label %140

139:                                              ; preds = %120, %110, %101, %93, %70, %43, %31, %10, %6, %2
  %.062 = phi ptr [ null, %6 ], [ %4, %10 ], [ %4, %31 ], [ %4, %43 ], [ %4, %70 ], [ %4, %101 ], [ %4, %110 ], [ %4, %120 ], [ %4, %93 ], [ null, %2 ]
  tail call void @ec_free(ptr noundef %.062)
  br label %140

140:                                              ; preds = %121, %135, %139
  %.0 = phi ptr [ null, %139 ], [ %4, %135 ], [ %4, %121 ]
  ret ptr %.0
}

declare ptr @ec2m_copy_with_alloc(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare ptr @wa_copy_with_alloc(ptr noundef) local_unnamed_addr #0

declare ptr @ecp_copy_with_alloc(ptr noundef) local_unnamed_addr #0

declare ptr @ec_point_copy_with_alloc(ptr noundef) local_unnamed_addr #0

declare ptr @ec_copy_precomp_with_alloc(ptr noundef) local_unnamed_addr #0

attributes #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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind allocsize(0,1) }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"EcCtx_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 33}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"EcParamsCtx_st", !13, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !14, i64 48, !7, i64 56, !7, i64 64, !13, i64 72, !7, i64 80}
!13 = !{!"int", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!12, !13, i64 72}
!16 = !{!12, !10, i64 40}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!12, !14, i64 48}
!20 = !{!12, !7, i64 32}
!21 = !{!12, !7, i64 64}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!12, !7, i64 56}
!26 = distinct !{!26, !24}
!27 = !{!12, !7, i64 24}
!28 = !{!12, !7, i64 8}
!29 = !{!12, !7, i64 16}
!30 = !{!12, !7, i64 80}
!31 = !{!6, !7, i64 24}
!32 = !{!33, !13, i64 0}
!33 = !{!"EcPrecomp_st", !13, i64 0, !8, i64 8}
!34 = !{!8, !8, i64 0}
!35 = !{!36, !13, i64 8}
!36 = !{!"EcPrecompComb_st", !7, i64 0, !13, i64 8}
!37 = !{!38, !13, i64 12}
!38 = !{!"EcPrecompWin_st", !7, i64 0, !13, i64 8, !13, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass