; 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.EC2m_st = type { ptr, i64, ptr, i64 }
%struct.Gf2mCtx_st = type { ptr, ptr, i64 }
%struct.EcGfpCtx_st = type { ptr, ptr, ptr, i8, i64 }
%struct.GfpCtx_st = type { ptr, ptr, ptr, ptr }
%struct.ECPoint_st = type { ptr, ptr, ptr }

@.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 uwtable
define dso_local i32 @ec_equals_params(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %12

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

15:                                               ; preds = %12
  store i32 2, ptr %10, align 4, !tbaa !9
  %16 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 639, i32 noundef %16, ptr noundef null)
  br label %279

17:                                               ; preds = %12
  br label %18

18:                                               ; preds = %17
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %25, label %23

23:                                               ; preds = %20
  store i32 2, ptr %10, align 4, !tbaa !9
  %24 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 640, i32 noundef %24, ptr noundef null)
  br label %279

25:                                               ; preds = %20
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %33, label %31

31:                                               ; preds = %28
  store i32 2, ptr %10, align 4, !tbaa !9
  %32 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 641, i32 noundef %32, ptr noundef null)
  br label %279

33:                                               ; preds = %28
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 0, ptr %36, align 1, !tbaa !11
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.EcCtx_st, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !15
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.EcCtx_st, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  %45 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !15
  %47 = icmp ne i32 %41, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %35
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

49:                                               ; preds = %35
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.EcCtx_st, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  %53 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !15
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %168

56:                                               ; preds = %49
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.EcCtx_st, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  %60 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %59, i32 0, i32 5
  %61 = load i8, ptr %60, align 8, !tbaa !18, !range !19, !noundef !20
  %62 = trunc i8 %61 to i1
  %63 = zext i1 %62 to i32
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.EcCtx_st, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %66, i32 0, i32 5
  %68 = load i8, ptr %67, align 8, !tbaa !18, !range !19, !noundef !20
  %69 = trunc i8 %68 to i1
  %70 = zext i1 %69 to i32
  %71 = icmp ne i32 %63, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %56
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 0, ptr %73, align 1, !tbaa !11
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

74:                                               ; preds = %56
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EcCtx_st, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %77, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = getelementptr inbounds %struct.EC2m_st, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !22
  %82 = getelementptr inbounds %struct.Gf2mCtx_st, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !24
  %84 = getelementptr inbounds i32, ptr %83, i64 2
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = icmp eq i32 %85, 0
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, i32 3, i32 5
  store i32 %88, ptr %8, align 4, !tbaa !9
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EcCtx_st, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %91, i32 0, i32 4
  %93 = load ptr, ptr %92, align 8, !tbaa !21
  %94 = getelementptr inbounds %struct.EC2m_st, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = getelementptr inbounds %struct.Gf2mCtx_st, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !24
  %98 = getelementptr inbounds i32, ptr %97, i64 2
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = icmp eq i32 %99, 0
  %101 = zext i1 %100 to i64
  %102 = select i1 %100, i32 3, i32 5
  store i32 %102, ptr %9, align 4, !tbaa !9
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = icmp ne i32 %103, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %74
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

107:                                              ; preds = %74
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.EcCtx_st, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !21
  %113 = getelementptr inbounds %struct.EC2m_st, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !22
  %115 = getelementptr inbounds %struct.Gf2mCtx_st, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !24
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.EcCtx_st, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %120 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !21
  %122 = getelementptr inbounds %struct.EC2m_st, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  %124 = getelementptr inbounds %struct.Gf2mCtx_st, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !24
  %126 = load i32, ptr %8, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = mul i64 %127, 4
  %129 = call i32 @memcmp(ptr noundef %116, ptr noundef %125, i64 noundef %128) #5
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %107
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

132:                                              ; preds = %107
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.EcCtx_st, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  %136 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %135, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !21
  %138 = getelementptr inbounds %struct.EC2m_st, ptr %137, i32 0, i32 1
  %139 = load i64, ptr %138, align 8, !tbaa !26
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.EcCtx_st, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = getelementptr inbounds %struct.EC2m_st, ptr %144, i32 0, i32 1
  %146 = load i64, ptr %145, align 8, !tbaa !26
  %147 = icmp ne i64 %139, %146
  br i1 %147, label %148, label %149

148:                                              ; preds = %132
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

149:                                              ; preds = %132
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.EcCtx_st, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !13
  %153 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %152, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !21
  %155 = getelementptr inbounds %struct.EC2m_st, ptr %154, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !27
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.EcCtx_st, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !13
  %160 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %159, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !21
  %162 = getelementptr inbounds %struct.EC2m_st, ptr %161, i32 0, i32 2
  %163 = load ptr, ptr %162, align 8, !tbaa !27
  %164 = call i32 @wa_cmp(ptr noundef %156, ptr noundef %163)
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %167

166:                                              ; preds = %149
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

167:                                              ; preds = %149
  br label %227

168:                                              ; preds = %49
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.EcCtx_st, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !13
  %172 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %171, i32 0, i32 3
  %173 = load ptr, ptr %172, align 8, !tbaa !28
  %174 = getelementptr inbounds %struct.EcGfpCtx_st, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !29
  %176 = getelementptr inbounds %struct.GfpCtx_st, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !31
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.EcCtx_st, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !13
  %181 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %180, i32 0, i32 3
  %182 = load ptr, ptr %181, align 8, !tbaa !28
  %183 = getelementptr inbounds %struct.EcGfpCtx_st, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !29
  %185 = getelementptr inbounds %struct.GfpCtx_st, ptr %184, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8, !tbaa !31
  %187 = call i32 @wa_cmp(ptr noundef %177, ptr noundef %186)
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %190

189:                                              ; preds = %168
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

190:                                              ; preds = %168
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.EcCtx_st, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !13
  %194 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %193, i32 0, i32 3
  %195 = load ptr, ptr %194, align 8, !tbaa !28
  %196 = getelementptr inbounds %struct.EcGfpCtx_st, ptr %195, i32 0, i32 1
  %197 = load ptr, ptr %196, align 8, !tbaa !33
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.EcCtx_st, ptr %198, i32 0, i32 0
  %200 = load ptr, ptr %199, align 8, !tbaa !13
  %201 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %200, i32 0, i32 3
  %202 = load ptr, ptr %201, align 8, !tbaa !28
  %203 = getelementptr inbounds %struct.EcGfpCtx_st, ptr %202, i32 0, i32 1
  %204 = load ptr, ptr %203, align 8, !tbaa !33
  %205 = call i32 @wa_cmp(ptr noundef %197, ptr noundef %204)
  %206 = icmp ne i32 %205, 0
  br i1 %206, label %207, label %208

207:                                              ; preds = %190
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

208:                                              ; preds = %190
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.EcCtx_st, ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %210, align 8, !tbaa !13
  %212 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %211, i32 0, i32 3
  %213 = load ptr, ptr %212, align 8, !tbaa !28
  %214 = getelementptr inbounds %struct.EcGfpCtx_st, ptr %213, i32 0, i32 2
  %215 = load ptr, ptr %214, align 8, !tbaa !34
  %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 !13
  %219 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %218, i32 0, i32 3
  %220 = load ptr, ptr %219, align 8, !tbaa !28
  %221 = getelementptr inbounds %struct.EcGfpCtx_st, ptr %220, i32 0, i32 2
  %222 = load ptr, ptr %221, align 8, !tbaa !34
  %223 = call i32 @wa_cmp(ptr noundef %215, ptr noundef %222)
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %225, label %226

225:                                              ; preds = %208
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

226:                                              ; preds = %208
  br label %227

227:                                              ; preds = %226, %167
  %228 = load ptr, ptr %5, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.EcCtx_st, ptr %228, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !13
  %231 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %230, i32 0, i32 2
  %232 = load ptr, ptr %231, align 8, !tbaa !35
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.EcCtx_st, ptr %233, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8, !tbaa !13
  %236 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %235, i32 0, i32 2
  %237 = load ptr, ptr %236, align 8, !tbaa !35
  %238 = call i32 @wa_cmp(ptr noundef %232, ptr noundef %237)
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %241

240:                                              ; preds = %227
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

241:                                              ; preds = %227
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.EcCtx_st, ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !13
  %245 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %244, i32 0, i32 1
  %246 = load ptr, ptr %245, align 8, !tbaa !36
  %247 = getelementptr inbounds %struct.ECPoint_st, ptr %246, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8, !tbaa !37
  %249 = load ptr, ptr %6, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.EcCtx_st, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !13
  %252 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %251, i32 0, i32 1
  %253 = load ptr, ptr %252, align 8, !tbaa !36
  %254 = getelementptr inbounds %struct.ECPoint_st, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !37
  %256 = call i32 @wa_cmp(ptr noundef %248, ptr noundef %255)
  %257 = icmp ne i32 %256, 0
  br i1 %257, label %258, label %259

258:                                              ; preds = %241
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

259:                                              ; preds = %241
  %260 = load ptr, ptr %5, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.EcCtx_st, ptr %260, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8, !tbaa !13
  %263 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %262, i32 0, i32 1
  %264 = load ptr, ptr %263, align 8, !tbaa !36
  %265 = getelementptr inbounds %struct.ECPoint_st, ptr %264, i32 0, i32 1
  %266 = load ptr, ptr %265, align 8, !tbaa !39
  %267 = load ptr, ptr %6, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.EcCtx_st, ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !13
  %270 = getelementptr inbounds %struct.EcParamsCtx_st, ptr %269, i32 0, i32 1
  %271 = load ptr, ptr %270, align 8, !tbaa !36
  %272 = getelementptr inbounds %struct.ECPoint_st, ptr %271, i32 0, i32 1
  %273 = load ptr, ptr %272, align 8, !tbaa !39
  %274 = call i32 @wa_cmp(ptr noundef %266, ptr noundef %273)
  %275 = icmp ne i32 %274, 0
  br i1 %275, label %276, label %277

276:                                              ; preds = %259
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

277:                                              ; preds = %259
  %278 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 1, ptr %278, align 1, !tbaa !11
  br label %279

279:                                              ; preds = %277, %31, %23, %15
  %280 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %280, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %281

281:                                              ; preds = %279, %276, %258, %240, %225, %207, %189, %166, %148, %131, %106, %72, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %282 = load i32, ptr %4, align 4
  ret i32 %282
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

declare i32 @wa_cmp(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 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 = { nounwind willreturn memory(read) "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 willreturn memory(read) }

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


; 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: nounwind uwtable
define dso_local range(i32 0, 3) i32 @ec_equals_params(ptr noundef readonly %0, ptr noundef readonly %1, ptr noundef writeonly %2) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %5

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

5:                                                ; preds = %3
  %.not44 = icmp eq ptr %1, null
  br i1 %.not44, label %6, label %7

6:                                                ; preds = %5
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 640, i32 noundef 2, ptr noundef null) #3
  br label %114

7:                                                ; preds = %5
  %.not45 = icmp eq ptr %2, null
  br i1 %.not45, label %8, label %9

8:                                                ; preds = %7
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 641, i32 noundef 2, ptr noundef null) #3
  br label %114

9:                                                ; preds = %7
  store i8 0, ptr %2, align 1, !tbaa !5
  %10 = load ptr, ptr %0, align 8, !tbaa !9
  %11 = load i32, ptr %10, align 8, !tbaa !12
  %12 = load ptr, ptr %1, align 8, !tbaa !9
  %13 = load i32, ptr %12, align 8, !tbaa !12
  %.not46 = icmp eq i32 %11, %13
  br i1 %.not46, label %14, label %114

14:                                               ; preds = %9
  %15 = icmp eq i32 %11, 1
  br i1 %15, label %16, label %49

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %10, i64 40
  %18 = load i8, ptr %17, align 8, !tbaa !16, !range !17, !noundef !18
  %19 = getelementptr inbounds i8, ptr %12, i64 40
  %20 = load i8, ptr %19, align 8, !tbaa !16, !range !17, !noundef !18
  %.not50 = icmp eq i8 %18, %20
  br i1 %.not50, label %21, label %114

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %10, i64 32
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %24 = load ptr, ptr %23, align 8, !tbaa !20
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i32, ptr %26, align 4, !tbaa !24
  %28 = icmp eq i32 %27, 0
  %29 = getelementptr inbounds i8, ptr %12, i64 32
  %30 = load ptr, ptr %29, align 8, !tbaa !19
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = load ptr, ptr %31, align 8, !tbaa !22
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load i32, ptr %33, align 4, !tbaa !24
  %35 = icmp ne i32 %34, 0
  %.not51 = xor i1 %28, %35
  br i1 %.not51, label %36, label %114

36:                                               ; preds = %21
  %37 = select i1 %28, i64 12, i64 20
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %25, ptr noundef nonnull dereferenceable(12) %32, i64 %37)
  %.not54 = icmp eq i32 %bcmp, 0
  br i1 %.not54, label %38, label %114

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %23, i64 8
  %40 = load i64, ptr %39, align 8, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %30, i64 8
  %42 = load i64, ptr %41, align 8, !tbaa !25
  %.not55 = icmp eq i64 %40, %42
  br i1 %.not55, label %43, label %114

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %23, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !26
  %46 = getelementptr inbounds i8, ptr %30, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !26
  %48 = tail call i32 @wa_cmp(ptr noundef %45, ptr noundef %47) #3
  %.not56 = icmp eq i32 %48, 0
  br i1 %.not56, label %83, label %114

49:                                               ; preds = %14
  %50 = getelementptr inbounds i8, ptr %10, i64 24
  %51 = load ptr, ptr %50, align 8, !tbaa !27
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = load ptr, ptr %52, align 8, !tbaa !30
  %54 = getelementptr inbounds i8, ptr %12, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %56 = load ptr, ptr %55, align 8, !tbaa !28
  %57 = load ptr, ptr %56, align 8, !tbaa !30
  %58 = tail call i32 @wa_cmp(ptr noundef %53, ptr noundef %57) #3
  %.not47 = icmp eq i32 %58, 0
  br i1 %.not47, label %59, label %114

59:                                               ; preds = %49
  %60 = load ptr, ptr %0, align 8, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %60, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = load ptr, ptr %63, align 8, !tbaa !32
  %65 = load ptr, ptr %1, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %65, i64 24
  %67 = load ptr, ptr %66, align 8, !tbaa !27
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load ptr, ptr %68, align 8, !tbaa !32
  %70 = tail call i32 @wa_cmp(ptr noundef %64, ptr noundef %69) #3
  %.not48 = icmp eq i32 %70, 0
  br i1 %.not48, label %71, label %114

71:                                               ; preds = %59
  %72 = load ptr, ptr %0, align 8, !tbaa !9
  %73 = getelementptr inbounds i8, ptr %72, i64 24
  %74 = load ptr, ptr %73, align 8, !tbaa !27
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  %76 = load ptr, ptr %75, align 8, !tbaa !33
  %77 = load ptr, ptr %1, align 8, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %77, i64 24
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %81 = load ptr, ptr %80, align 8, !tbaa !33
  %82 = tail call i32 @wa_cmp(ptr noundef %76, ptr noundef %81) #3
  %.not49 = icmp eq i32 %82, 0
  br i1 %.not49, label %83, label %114

83:                                               ; preds = %71, %43
  %84 = load ptr, ptr %0, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load ptr, ptr %85, align 8, !tbaa !34
  %87 = load ptr, ptr %1, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %89 = load ptr, ptr %88, align 8, !tbaa !34
  %90 = tail call i32 @wa_cmp(ptr noundef %86, ptr noundef %89) #3
  %.not57 = icmp eq i32 %90, 0
  br i1 %.not57, label %91, label %114

91:                                               ; preds = %83
  %92 = load ptr, ptr %0, align 8, !tbaa !9
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load ptr, ptr %93, align 8, !tbaa !35
  %95 = load ptr, ptr %94, align 8, !tbaa !36
  %96 = load ptr, ptr %1, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %96, i64 8
  %98 = load ptr, ptr %97, align 8, !tbaa !35
  %99 = load ptr, ptr %98, align 8, !tbaa !36
  %100 = tail call i32 @wa_cmp(ptr noundef %95, ptr noundef %99) #3
  %.not58 = icmp eq i32 %100, 0
  br i1 %.not58, label %101, label %114

101:                                              ; preds = %91
  %102 = load ptr, ptr %0, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !35
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load ptr, ptr %105, align 8, !tbaa !38
  %107 = load ptr, ptr %1, align 8, !tbaa !9
  %108 = getelementptr inbounds i8, ptr %107, i64 8
  %109 = load ptr, ptr %108, align 8, !tbaa !35
  %110 = getelementptr inbounds i8, ptr %109, i64 8
  %111 = load ptr, ptr %110, align 8, !tbaa !38
  %112 = tail call i32 @wa_cmp(ptr noundef %106, ptr noundef %111) #3
  %.not59 = icmp eq i32 %112, 0
  br i1 %.not59, label %113, label %114

113:                                              ; preds = %101
  store i8 1, ptr %2, align 1, !tbaa !5
  br label %114

114:                                              ; preds = %16, %4, %6, %8, %113, %101, %91, %83, %71, %59, %49, %43, %38, %36, %21, %9
  %.038 = phi i32 [ 0, %9 ], [ 0, %21 ], [ 0, %36 ], [ 0, %38 ], [ 0, %43 ], [ 0, %49 ], [ 0, %59 ], [ 0, %71 ], [ 0, %83 ], [ 0, %91 ], [ 0, %101 ], [ 0, %113 ], [ 2, %8 ], [ 2, %6 ], [ 2, %4 ], [ 0, %16 ]
  ret i32 %.038
}

declare i32 @wa_cmp(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #2

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 = { 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 = { nofree nounwind willreturn memory(argmem: read) }
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 = !{!"_Bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"EcCtx_st", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !6, i64 33}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"EcParamsCtx_st", !14, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !6, i64 40, !15, i64 48, !11, i64 56, !11, i64 64, !14, i64 72, !11, i64 80}
!14 = !{!"int", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!13, !6, i64 40}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!13, !11, i64 32}
!20 = !{!21, !11, i64 0}
!21 = !{!"EC2m_st", !11, i64 0, !15, i64 8, !11, i64 16, !15, i64 24}
!22 = !{!23, !11, i64 0}
!23 = !{!"Gf2mCtx_st", !11, i64 0, !11, i64 8, !15, i64 16}
!24 = !{!14, !14, i64 0}
!25 = !{!21, !15, i64 8}
!26 = !{!21, !11, i64 16}
!27 = !{!13, !11, i64 24}
!28 = !{!29, !11, i64 0}
!29 = !{!"EcGfpCtx_st", !11, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !15, i64 32}
!30 = !{!31, !11, i64 0}
!31 = !{!"GfpCtx_st", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!32 = !{!29, !11, i64 8}
!33 = !{!29, !11, i64 16}
!34 = !{!13, !11, i64 16}
!35 = !{!13, !11, i64 8}
!36 = !{!37, !11, i64 0}
!37 = !{!"ECPoint_st", !11, i64 0, !11, i64 8, !11, i64 16}
!38 = !{!37, !11, i64 8}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass