; LLVM IR from IOsonata/IOsonata :: micro-ecc (uECC)

; 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.uECC_Curve_t = type { i8, i8, i16, [4 x i64], [4 x i64], [8 x i64], [4 x i64], ptr, ptr, ptr, ptr }

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_isZero(ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_sub(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden signext i8 @uECC_vli_cmp_unsafe(ptr noundef, ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_equal(ptr noundef, ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @uECC_verify(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca [4 x i64], align 16
  %13 = alloca [4 x i64], align 16
  %14 = alloca [4 x i64], align 16
  %15 = alloca [8 x i64], align 16
  %16 = alloca [4 x i64], align 16
  %17 = alloca [4 x i64], align 16
  %18 = alloca [4 x i64], align 16
  %19 = alloca [4 x i64], align 16
  %20 = alloca [4 x i64], align 16
  %21 = alloca [4 x ptr], align 16
  %22 = alloca ptr, align 8
  %23 = alloca i16, align 2
  %24 = alloca i16, align 2
  %25 = alloca [8 x i64], align 16
  %26 = alloca [4 x i64], align 16
  %27 = alloca [4 x i64], align 16
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #2
  call void @llvm.lifetime.start.p0(i64 2, ptr %23) #2
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #2
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #2
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.uECC_Curve_t, ptr %32, i32 0, i32 0
  %34 = load i8, ptr %33, align 8, !tbaa !11
  store i8 %34, ptr %28, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #2
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.uECC_Curve_t, ptr %35, i32 0, i32 2
  %37 = load i16, ptr %36, align 2, !tbaa !15
  %38 = sext i16 %37 to i32
  %39 = add nsw i32 %38, 63
  %40 = sdiv i32 %39, 64
  %41 = trunc i32 %40 to i8
  store i8 %41, ptr %29, align 1, !tbaa !14
  %42 = load i8, ptr %29, align 1, !tbaa !14
  %43 = sext i8 %42 to i32
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 %45
  store i64 0, ptr %46, align 8, !tbaa !16
  %47 = load i8, ptr %29, align 1, !tbaa !14
  %48 = sext i8 %47 to i32
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 %50
  store i64 0, ptr %51, align 8, !tbaa !16
  %52 = load i8, ptr %29, align 1, !tbaa !14
  %53 = sext i8 %52 to i32
  %54 = sub nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [4 x i64], ptr %27, i64 0, i64 %55
  store i64 0, ptr %56, align 8, !tbaa !16
  %57 = getelementptr inbounds [8 x i64], ptr %25, i64 0, i64 0
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.uECC_Curve_t, ptr %59, i32 0, i32 1
  %61 = load i8, ptr %60, align 1, !tbaa !18
  %62 = sext i8 %61 to i32
  call void @uECC_vli_bytesToNative(ptr noundef %57, ptr noundef %58, i32 noundef %62)
  %63 = getelementptr inbounds [8 x i64], ptr %25, i64 0, i64 0
  %64 = load i8, ptr %28, align 1, !tbaa !14
  %65 = sext i8 %64 to i32
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i64, ptr %63, i64 %66
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.uECC_Curve_t, ptr %69, i32 0, i32 1
  %71 = load i8, ptr %70, align 1, !tbaa !18
  %72 = sext i8 %71 to i32
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i8, ptr %68, i64 %73
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.uECC_Curve_t, ptr %75, i32 0, i32 1
  %77 = load i8, ptr %76, align 1, !tbaa !18
  %78 = sext i8 %77 to i32
  call void @uECC_vli_bytesToNative(ptr noundef %67, ptr noundef %74, i32 noundef %78)
  %79 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 0
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.uECC_Curve_t, ptr %81, i32 0, i32 1
  %83 = load i8, ptr %82, align 1, !tbaa !18
  %84 = sext i8 %83 to i32
  call void @uECC_vli_bytesToNative(ptr noundef %79, ptr noundef %80, i32 noundef %84)
  %85 = getelementptr inbounds [4 x i64], ptr %27, i64 0, i64 0
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.uECC_Curve_t, ptr %87, i32 0, i32 1
  %89 = load i8, ptr %88, align 1, !tbaa !18
  %90 = sext i8 %89 to i32
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i8, ptr %86, i64 %91
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.uECC_Curve_t, ptr %93, i32 0, i32 1
  %95 = load i8, ptr %94, align 1, !tbaa !18
  %96 = sext i8 %95 to i32
  call void @uECC_vli_bytesToNative(ptr noundef %85, ptr noundef %92, i32 noundef %96)
  %97 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 0
  %98 = load i8, ptr %28, align 1, !tbaa !14
  %99 = call i64 @uECC_vli_isZero(ptr noundef %97, i8 noundef signext %98)
  %100 = icmp ne i64 %99, 0
  br i1 %100, label %106, label %101

101:                                              ; preds = %5
  %102 = getelementptr inbounds [4 x i64], ptr %27, i64 0, i64 0
  %103 = load i8, ptr %28, align 1, !tbaa !14
  %104 = call i64 @uECC_vli_isZero(ptr noundef %102, i8 noundef signext %103)
  %105 = icmp ne i64 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %101, %5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %30, align 4
  br label %374

107:                                              ; preds = %101
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.uECC_Curve_t, ptr %108, i32 0, i32 4
  %110 = getelementptr inbounds [4 x i64], ptr %109, i64 0, i64 0
  %111 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 0
  %112 = load i8, ptr %29, align 1, !tbaa !14
  %113 = call signext i8 @uECC_vli_cmp_unsafe(ptr noundef %110, ptr noundef %111, i8 noundef signext %112)
  %114 = sext i8 %113 to i32
  %115 = icmp ne i32 %114, 1
  br i1 %115, label %125, label %116

116:                                              ; preds = %107
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.uECC_Curve_t, ptr %117, i32 0, i32 4
  %119 = getelementptr inbounds [4 x i64], ptr %118, i64 0, i64 0
  %120 = getelementptr inbounds [4 x i64], ptr %27, i64 0, i64 0
  %121 = load i8, ptr %29, align 1, !tbaa !14
  %122 = call signext i8 @uECC_vli_cmp_unsafe(ptr noundef %119, ptr noundef %120, i8 noundef signext %121)
  %123 = sext i8 %122 to i32
  %124 = icmp ne i32 %123, 1
  br i1 %124, label %125, label %126

125:                                              ; preds = %116, %107
  store i32 0, ptr %6, align 4
  store i32 1, ptr %30, align 4
  br label %374

126:                                              ; preds = %116
  %127 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %128 = getelementptr inbounds [4 x i64], ptr %27, i64 0, i64 0
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.uECC_Curve_t, ptr %129, i32 0, i32 4
  %131 = getelementptr inbounds [4 x i64], ptr %130, i64 0, i64 0
  %132 = load i8, ptr %29, align 1, !tbaa !14
  call void @uECC_vli_modInv(ptr noundef %127, ptr noundef %128, ptr noundef %131, i8 noundef signext %132)
  %133 = load i8, ptr %29, align 1, !tbaa !14
  %134 = sext i8 %133 to i32
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 %136
  store i64 0, ptr %137, align 8, !tbaa !16
  %138 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  call void @bits2int(ptr noundef %138, ptr noundef %139, i32 noundef %140, ptr noundef %141)
  %142 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %143 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %144 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.uECC_Curve_t, ptr %145, i32 0, i32 4
  %147 = getelementptr inbounds [4 x i64], ptr %146, i64 0, i64 0
  %148 = load i8, ptr %29, align 1, !tbaa !14
  call void @uECC_vli_modMult(ptr noundef %142, ptr noundef %143, ptr noundef %144, ptr noundef %147, i8 noundef signext %148)
  %149 = getelementptr inbounds [4 x i64], ptr %13, i64 0, i64 0
  %150 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 0
  %151 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.uECC_Curve_t, ptr %152, i32 0, i32 4
  %154 = getelementptr inbounds [4 x i64], ptr %153, i64 0, i64 0
  %155 = load i8, ptr %29, align 1, !tbaa !14
  call void @uECC_vli_modMult(ptr noundef %149, ptr noundef %150, ptr noundef %151, ptr noundef %154, i8 noundef signext %155)
  %156 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %157 = getelementptr inbounds [8 x i64], ptr %25, i64 0, i64 0
  %158 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %156, ptr noundef %157, i8 noundef signext %158)
  %159 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %160 = load i8, ptr %28, align 1, !tbaa !14
  %161 = sext i8 %160 to i32
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i64, ptr %159, i64 %162
  %164 = getelementptr inbounds [8 x i64], ptr %25, i64 0, i64 0
  %165 = load i8, ptr %28, align 1, !tbaa !14
  %166 = sext i8 %165 to i32
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds i64, ptr %164, i64 %167
  %169 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %163, ptr noundef %168, i8 noundef signext %169)
  %170 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.uECC_Curve_t, ptr %171, i32 0, i32 5
  %173 = getelementptr inbounds [8 x i64], ptr %172, i64 0, i64 0
  %174 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %170, ptr noundef %173, i8 noundef signext %174)
  %175 = getelementptr inbounds [4 x i64], ptr %19, i64 0, i64 0
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.uECC_Curve_t, ptr %176, i32 0, i32 5
  %178 = getelementptr inbounds [8 x i64], ptr %177, i64 0, i64 0
  %179 = load i8, ptr %28, align 1, !tbaa !14
  %180 = sext i8 %179 to i32
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i64, ptr %178, i64 %181
  %183 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %175, ptr noundef %182, i8 noundef signext %183)
  %184 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %185 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %186 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.uECC_Curve_t, ptr %187, i32 0, i32 3
  %189 = getelementptr inbounds [4 x i64], ptr %188, i64 0, i64 0
  %190 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_modSub(ptr noundef %184, ptr noundef %185, ptr noundef %186, ptr noundef %189, i8 noundef signext %190)
  %191 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %192 = getelementptr inbounds [4 x i64], ptr %19, i64 0, i64 0
  %193 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %194 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %195 = load i8, ptr %28, align 1, !tbaa !14
  %196 = sext i8 %195 to i32
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i64, ptr %194, i64 %197
  %199 = load ptr, ptr %11, align 8, !tbaa !5
  call void @XYcZ_add(ptr noundef %191, ptr noundef %192, ptr noundef %193, ptr noundef %198, ptr noundef %199)
  %200 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %201 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %202 = load ptr, ptr %11, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.uECC_Curve_t, ptr %202, i32 0, i32 3
  %204 = getelementptr inbounds [4 x i64], ptr %203, i64 0, i64 0
  %205 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_modInv(ptr noundef %200, ptr noundef %201, ptr noundef %204, i8 noundef signext %205)
  %206 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %207 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %208 = load i8, ptr %28, align 1, !tbaa !14
  %209 = sext i8 %208 to i32
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i64, ptr %207, i64 %210
  %212 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %213 = load ptr, ptr %11, align 8, !tbaa !5
  call void @apply_z(ptr noundef %206, ptr noundef %211, ptr noundef %212, ptr noundef %213)
  %214 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 0
  store ptr null, ptr %214, align 16, !tbaa !5
  %215 = load ptr, ptr %11, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.uECC_Curve_t, ptr %215, i32 0, i32 5
  %217 = getelementptr inbounds [8 x i64], ptr %216, i64 0, i64 0
  %218 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 1
  store ptr %217, ptr %218, align 8, !tbaa !5
  %219 = getelementptr inbounds [8 x i64], ptr %25, i64 0, i64 0
  %220 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 2
  store ptr %219, ptr %220, align 16, !tbaa !5
  %221 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 0
  %222 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 3
  store ptr %221, ptr %222, align 8, !tbaa !5
  %223 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %224 = load i8, ptr %29, align 1, !tbaa !14
  %225 = call signext i16 @uECC_vli_numBits(ptr noundef %223, i8 noundef signext %224)
  %226 = getelementptr inbounds [4 x i64], ptr %13, i64 0, i64 0
  %227 = load i8, ptr %29, align 1, !tbaa !14
  %228 = call signext i16 @uECC_vli_numBits(ptr noundef %226, i8 noundef signext %227)
  %229 = call signext i16 @smax(i16 noundef signext %225, i16 noundef signext %228)
  store i16 %229, ptr %23, align 2, !tbaa !19
  %230 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %231 = load i16, ptr %23, align 2, !tbaa !19
  %232 = sext i16 %231 to i32
  %233 = sub nsw i32 %232, 1
  %234 = trunc i32 %233 to i16
  %235 = call i64 @uECC_vli_testBit(ptr noundef %230, i16 noundef signext %234)
  %236 = icmp ne i64 %235, 0
  %237 = xor i1 %236, true
  %238 = xor i1 %237, true
  %239 = zext i1 %238 to i32
  %240 = getelementptr inbounds [4 x i64], ptr %13, i64 0, i64 0
  %241 = load i16, ptr %23, align 2, !tbaa !19
  %242 = sext i16 %241 to i32
  %243 = sub nsw i32 %242, 1
  %244 = trunc i32 %243 to i16
  %245 = call i64 @uECC_vli_testBit(ptr noundef %240, i16 noundef signext %244)
  %246 = icmp ne i64 %245, 0
  %247 = xor i1 %246, true
  %248 = xor i1 %247, true
  %249 = zext i1 %248 to i32
  %250 = shl i32 %249, 1
  %251 = or i32 %239, %250
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 %252
  %254 = load ptr, ptr %253, align 8, !tbaa !5
  store ptr %254, ptr %22, align 8, !tbaa !5
  %255 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %256 = load ptr, ptr %22, align 8, !tbaa !5
  %257 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %255, ptr noundef %256, i8 noundef signext %257)
  %258 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %259 = load ptr, ptr %22, align 8, !tbaa !5
  %260 = load i8, ptr %28, align 1, !tbaa !14
  %261 = sext i8 %260 to i32
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds i64, ptr %259, i64 %262
  %264 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %258, ptr noundef %263, i8 noundef signext %264)
  %265 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %266 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_clear(ptr noundef %265, i8 noundef signext %266)
  %267 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  store i64 1, ptr %267, align 16, !tbaa !16
  %268 = load i16, ptr %23, align 2, !tbaa !19
  %269 = sext i16 %268 to i32
  %270 = sub nsw i32 %269, 2
  %271 = trunc i32 %270 to i16
  store i16 %271, ptr %24, align 2, !tbaa !19
  br label %272

272:                                              ; preds = %338, %126
  %273 = load i16, ptr %24, align 2, !tbaa !19
  %274 = sext i16 %273 to i32
  %275 = icmp sge i32 %274, 0
  br i1 %275, label %276, label %341

276:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #2
  %277 = load ptr, ptr %11, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.uECC_Curve_t, ptr %277, i32 0, i32 7
  %279 = load ptr, ptr %278, align 8, !tbaa !20
  %280 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %281 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %282 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %283 = load ptr, ptr %11, align 8, !tbaa !5
  call void %279(ptr noundef %280, ptr noundef %281, ptr noundef %282, ptr noundef %283)
  %284 = getelementptr inbounds [4 x i64], ptr %12, i64 0, i64 0
  %285 = load i16, ptr %24, align 2, !tbaa !19
  %286 = call i64 @uECC_vli_testBit(ptr noundef %284, i16 noundef signext %285)
  %287 = icmp ne i64 %286, 0
  %288 = xor i1 %287, true
  %289 = xor i1 %288, true
  %290 = zext i1 %289 to i32
  %291 = getelementptr inbounds [4 x i64], ptr %13, i64 0, i64 0
  %292 = load i16, ptr %24, align 2, !tbaa !19
  %293 = call i64 @uECC_vli_testBit(ptr noundef %291, i16 noundef signext %292)
  %294 = icmp ne i64 %293, 0
  %295 = xor i1 %294, true
  %296 = xor i1 %295, true
  %297 = zext i1 %296 to i32
  %298 = shl i32 %297, 1
  %299 = or i32 %290, %298
  %300 = sext i32 %299 to i64
  store i64 %300, ptr %31, align 8, !tbaa !16
  %301 = load i64, ptr %31, align 8, !tbaa !16
  %302 = getelementptr inbounds [4 x ptr], ptr %21, i64 0, i64 %301
  %303 = load ptr, ptr %302, align 8, !tbaa !5
  store ptr %303, ptr %22, align 8, !tbaa !5
  %304 = load ptr, ptr %22, align 8, !tbaa !5
  %305 = icmp ne ptr %304, null
  br i1 %305, label %306, label %337

306:                                              ; preds = %276
  %307 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %308 = load ptr, ptr %22, align 8, !tbaa !5
  %309 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %307, ptr noundef %308, i8 noundef signext %309)
  %310 = getelementptr inbounds [4 x i64], ptr %19, i64 0, i64 0
  %311 = load ptr, ptr %22, align 8, !tbaa !5
  %312 = load i8, ptr %28, align 1, !tbaa !14
  %313 = sext i8 %312 to i32
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds i64, ptr %311, i64 %314
  %316 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_set(ptr noundef %310, ptr noundef %315, i8 noundef signext %316)
  %317 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %318 = getelementptr inbounds [4 x i64], ptr %19, i64 0, i64 0
  %319 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %320 = load ptr, ptr %11, align 8, !tbaa !5
  call void @apply_z(ptr noundef %317, ptr noundef %318, ptr noundef %319, ptr noundef %320)
  %321 = getelementptr inbounds [4 x i64], ptr %20, i64 0, i64 0
  %322 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %323 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %324 = load ptr, ptr %11, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.uECC_Curve_t, ptr %324, i32 0, i32 3
  %326 = getelementptr inbounds [4 x i64], ptr %325, i64 0, i64 0
  %327 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_modSub(ptr noundef %321, ptr noundef %322, ptr noundef %323, ptr noundef %326, i8 noundef signext %327)
  %328 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 0
  %329 = getelementptr inbounds [4 x i64], ptr %19, i64 0, i64 0
  %330 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %331 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %332 = load ptr, ptr %11, align 8, !tbaa !5
  call void @XYcZ_add(ptr noundef %328, ptr noundef %329, ptr noundef %330, ptr noundef %331, ptr noundef %332)
  %333 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %334 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %335 = getelementptr inbounds [4 x i64], ptr %20, i64 0, i64 0
  %336 = load ptr, ptr %11, align 8, !tbaa !5
  call void @uECC_vli_modMult_fast(ptr noundef %333, ptr noundef %334, ptr noundef %335, ptr noundef %336)
  br label %337

337:                                              ; preds = %306, %276
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #2
  br label %338

338:                                              ; preds = %337
  %339 = load i16, ptr %24, align 2, !tbaa !19
  %340 = add i16 %339, -1
  store i16 %340, ptr %24, align 2, !tbaa !19
  br label %272, !llvm.loop !21

341:                                              ; preds = %272
  %342 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %343 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %344 = load ptr, ptr %11, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.uECC_Curve_t, ptr %344, i32 0, i32 3
  %346 = getelementptr inbounds [4 x i64], ptr %345, i64 0, i64 0
  %347 = load i8, ptr %28, align 1, !tbaa !14
  call void @uECC_vli_modInv(ptr noundef %342, ptr noundef %343, ptr noundef %346, i8 noundef signext %347)
  %348 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %349 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 0
  %350 = getelementptr inbounds [4 x i64], ptr %14, i64 0, i64 0
  %351 = load ptr, ptr %11, align 8, !tbaa !5
  call void @apply_z(ptr noundef %348, ptr noundef %349, ptr noundef %350, ptr noundef %351)
  %352 = load ptr, ptr %11, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.uECC_Curve_t, ptr %352, i32 0, i32 4
  %354 = getelementptr inbounds [4 x i64], ptr %353, i64 0, i64 0
  %355 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %356 = load i8, ptr %29, align 1, !tbaa !14
  %357 = call signext i8 @uECC_vli_cmp_unsafe(ptr noundef %354, ptr noundef %355, i8 noundef signext %356)
  %358 = sext i8 %357 to i32
  %359 = icmp ne i32 %358, 1
  br i1 %359, label %360, label %368

360:                                              ; preds = %341
  %361 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %362 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %363 = load ptr, ptr %11, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.uECC_Curve_t, ptr %363, i32 0, i32 4
  %365 = getelementptr inbounds [4 x i64], ptr %364, i64 0, i64 0
  %366 = load i8, ptr %29, align 1, !tbaa !14
  %367 = call i64 @uECC_vli_sub(ptr noundef %361, ptr noundef %362, ptr noundef %365, i8 noundef signext %366)
  br label %368

368:                                              ; preds = %360, %341
  %369 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 0
  %370 = getelementptr inbounds [4 x i64], ptr %26, i64 0, i64 0
  %371 = load i8, ptr %28, align 1, !tbaa !14
  %372 = call i64 @uECC_vli_equal(ptr noundef %369, ptr noundef %370, i8 noundef signext %371)
  %373 = trunc i64 %372 to i32
  store i32 %373, ptr %6, align 4
  store i32 1, ptr %30, align 4
  br label %374

374:                                              ; preds = %368, %125, %106
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #2
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #2
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #2
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #2
  %375 = load i32, ptr %6, align 4
  ret i32 %375
}

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_modInv(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) #1

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

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_modMult(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_set(ptr noundef, ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_modSub(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) #1

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

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

; Function Attrs: nounwind uwtable
declare hidden signext i16 @smax(i16 noundef signext, i16 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden signext i16 @uECC_vli_numBits(ptr noundef, i8 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_testBit(ptr noundef, i16 noundef signext) #1

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_clear(ptr noundef, i8 noundef signext) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"uECC_Curve_t", !7, i64 0, !7, i64 1, !13, i64 2, !7, i64 8, !7, i64 40, !7, i64 72, !7, i64 136, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192}
!13 = !{!"short", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!12, !13, i64 2}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!12, !7, i64 1}
!19 = !{!13, !13, i64 0}
!20 = !{!12, !6, i64 168}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_isZero(ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_sub(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden signext i8 @uECC_vli_cmp_unsafe(ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_equal(ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @uECC_verify(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca [4 x i64], align 16
  %7 = alloca [4 x i64], align 16
  %8 = alloca [4 x i64], align 16
  %9 = alloca [8 x i64], align 16
  %10 = alloca [4 x i64], align 16
  %11 = alloca [4 x i64], align 16
  %12 = alloca [4 x i64], align 16
  %13 = alloca [4 x i64], align 16
  %14 = alloca [4 x i64], align 16
  %15 = alloca [4 x ptr], align 16
  %16 = alloca [8 x i64], align 16
  %17 = alloca [4 x i64], align 16
  %18 = alloca [4 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #2
  %19 = load i8, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %4, i64 2
  %21 = load i16, ptr %20, align 2, !tbaa !11
  %22 = sext i16 %21 to i32
  %23 = add nsw i32 %22, 63
  %24 = sdiv i32 %23, 64
  %25 = trunc i32 %24 to i8
  %sext = shl i32 %24, 24
  %26 = ashr exact i32 %sext, 24
  %27 = add nsw i32 %26, -1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [4 x i64], ptr %10, i64 0, i64 %28
  store i64 0, ptr %29, align 8, !tbaa !12
  %30 = getelementptr inbounds [4 x i64], ptr %17, i64 0, i64 %28
  store i64 0, ptr %30, align 8, !tbaa !12
  %31 = getelementptr inbounds [4 x i64], ptr %18, i64 0, i64 %28
  store i64 0, ptr %31, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %4, i64 1
  %33 = load i8, ptr %32, align 1, !tbaa !14
  %34 = sext i8 %33 to i32
  call void @uECC_vli_bytesToNative(ptr noundef nonnull %16, ptr noundef %0, i32 noundef %34)
  %35 = sext i8 %19 to i64
  %36 = getelementptr inbounds i64, ptr %16, i64 %35
  %37 = load i8, ptr %32, align 1, !tbaa !14
  %38 = sext i8 %37 to i32
  %39 = sext i8 %37 to i64
  %40 = getelementptr inbounds i8, ptr %0, i64 %39
  call void @uECC_vli_bytesToNative(ptr noundef nonnull %36, ptr noundef %40, i32 noundef %38)
  %41 = load i8, ptr %32, align 1, !tbaa !14
  %42 = sext i8 %41 to i32
  call void @uECC_vli_bytesToNative(ptr noundef nonnull %17, ptr noundef %3, i32 noundef %42)
  %43 = load i8, ptr %32, align 1, !tbaa !14
  %44 = sext i8 %43 to i32
  %45 = sext i8 %43 to i64
  %46 = getelementptr inbounds i8, ptr %3, i64 %45
  call void @uECC_vli_bytesToNative(ptr noundef nonnull %18, ptr noundef %46, i32 noundef %44)
  %47 = call i64 @uECC_vli_isZero(ptr noundef nonnull %17, i8 noundef signext %19)
  %.not = icmp eq i64 %47, 0
  br i1 %.not, label %48, label %101

48:                                               ; preds = %5
  %49 = call i64 @uECC_vli_isZero(ptr noundef nonnull %18, i8 noundef signext %19)
  %.not89 = icmp eq i64 %49, 0
  br i1 %.not89, label %50, label %101

50:                                               ; preds = %48
  %51 = getelementptr inbounds i8, ptr %4, i64 40
  %52 = call signext i8 @uECC_vli_cmp_unsafe(ptr noundef nonnull %51, ptr noundef nonnull %17, i8 noundef signext %25)
  %.not90 = icmp eq i8 %52, 1
  br i1 %.not90, label %53, label %101

53:                                               ; preds = %50
  %54 = call signext i8 @uECC_vli_cmp_unsafe(ptr noundef nonnull %51, ptr noundef nonnull %18, i8 noundef signext %25)
  %.not91 = icmp eq i8 %54, 1
  br i1 %.not91, label %55, label %101

55:                                               ; preds = %53
  call void @uECC_vli_modInv(ptr noundef nonnull %8, ptr noundef nonnull %18, ptr noundef nonnull %51, i8 noundef signext %25)
  %56 = getelementptr inbounds [4 x i64], ptr %6, i64 0, i64 %28
  store i64 0, ptr %56, align 8, !tbaa !12
  call void @bits2int(ptr noundef nonnull %6, ptr noundef %1, i32 noundef %2, ptr noundef nonnull %4)
  call void @uECC_vli_modMult(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %8, ptr noundef nonnull %51, i8 noundef signext %25)
  call void @uECC_vli_modMult(ptr noundef nonnull %7, ptr noundef nonnull %17, ptr noundef nonnull %8, ptr noundef nonnull %51, i8 noundef signext %25)
  call void @uECC_vli_set(ptr noundef nonnull %9, ptr noundef nonnull %16, i8 noundef signext %19)
  %57 = getelementptr inbounds i64, ptr %9, i64 %35
  call void @uECC_vli_set(ptr noundef nonnull %57, ptr noundef nonnull %36, i8 noundef signext %19)
  %58 = getelementptr inbounds i8, ptr %4, i64 72
  call void @uECC_vli_set(ptr noundef nonnull %12, ptr noundef nonnull %58, i8 noundef signext %19)
  %59 = getelementptr inbounds i64, ptr %58, i64 %35
  call void @uECC_vli_set(ptr noundef nonnull %13, ptr noundef nonnull %59, i8 noundef signext %19)
  %60 = getelementptr inbounds i8, ptr %4, i64 8
  call void @uECC_vli_modSub(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef nonnull %60, i8 noundef signext %19)
  call void @XYcZ_add(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %9, ptr noundef nonnull %57, ptr noundef nonnull %4)
  call void @uECC_vli_modInv(ptr noundef nonnull %8, ptr noundef nonnull %8, ptr noundef nonnull %60, i8 noundef signext %19)
  call void @apply_z(ptr noundef nonnull %9, ptr noundef nonnull %57, ptr noundef nonnull %8, ptr noundef nonnull %4)
  store ptr null, ptr %15, align 16, !tbaa !15
  %61 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %58, ptr %61, align 8, !tbaa !15
  %62 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %16, ptr %62, align 16, !tbaa !15
  %63 = getelementptr inbounds i8, ptr %15, i64 24
  store ptr %9, ptr %63, align 8, !tbaa !15
  %64 = call signext i16 @uECC_vli_numBits(ptr noundef nonnull %6, i8 noundef signext %25)
  %65 = call signext i16 @uECC_vli_numBits(ptr noundef nonnull %7, i8 noundef signext %25)
  %66 = call signext i16 @smax(i16 noundef signext %64, i16 noundef signext %65)
  %67 = add i16 %66, -1
  %68 = call i64 @uECC_vli_testBit(ptr noundef nonnull %6, i16 noundef signext %67)
  %69 = icmp ne i64 %68, 0
  %70 = zext i1 %69 to i64
  %71 = call i64 @uECC_vli_testBit(ptr noundef nonnull %7, i16 noundef signext %67)
  %.not92 = icmp eq i64 %71, 0
  %72 = select i1 %.not92, i64 0, i64 2
  %73 = or disjoint i64 %72, %70
  %74 = getelementptr inbounds [4 x ptr], ptr %15, i64 0, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  call void @uECC_vli_set(ptr noundef nonnull %10, ptr noundef %75, i8 noundef signext %19)
  %76 = getelementptr inbounds i64, ptr %75, i64 %35
  call void @uECC_vli_set(ptr noundef nonnull %11, ptr noundef %76, i8 noundef signext %19)
  call void @uECC_vli_clear(ptr noundef nonnull %8, i8 noundef signext %19)
  store i64 1, ptr %8, align 16, !tbaa !12
  %77 = add i16 %66, -2
  %78 = icmp sgt i16 %77, -1
  br i1 %78, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %55
  %79 = getelementptr inbounds i8, ptr %4, i64 168
  br label %80

80:                                               ; preds = %.lr.ph, %92
  %.08796 = phi i16 [ %77, %.lr.ph ], [ %93, %92 ]
  %81 = load ptr, ptr %79, align 8, !tbaa !16
  call void %81(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %8, ptr noundef nonnull %4) #2
  %82 = call i64 @uECC_vli_testBit(ptr noundef nonnull %6, i16 noundef signext %.08796)
  %83 = icmp ne i64 %82, 0
  %84 = zext i1 %83 to i64
  %85 = call i64 @uECC_vli_testBit(ptr noundef nonnull %7, i16 noundef signext %.08796)
  %.not94 = icmp eq i64 %85, 0
  %86 = select i1 %.not94, i64 0, i64 2
  %87 = or disjoint i64 %86, %84
  %88 = getelementptr inbounds [4 x ptr], ptr %15, i64 0, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !15
  %.not95 = icmp eq ptr %89, null
  br i1 %.not95, label %92, label %90

90:                                               ; preds = %80
  call void @uECC_vli_set(ptr noundef nonnull %12, ptr noundef nonnull %89, i8 noundef signext %19)
  %91 = getelementptr inbounds i64, ptr %89, i64 %35
  call void @uECC_vli_set(ptr noundef nonnull %13, ptr noundef nonnull %91, i8 noundef signext %19)
  call void @apply_z(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %8, ptr noundef nonnull %4)
  call void @uECC_vli_modSub(ptr noundef nonnull %14, ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef nonnull %60, i8 noundef signext %19)
  call void @XYcZ_add(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %4)
  call void @uECC_vli_modMult_fast(ptr noundef nonnull %8, ptr noundef nonnull %8, ptr noundef nonnull %14, ptr noundef nonnull %4)
  br label %92

92:                                               ; preds = %90, %80
  %93 = add nsw i16 %.08796, -1
  %94 = icmp sgt i16 %.08796, 0
  br i1 %94, label %80, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %92, %55
  call void @uECC_vli_modInv(ptr noundef nonnull %8, ptr noundef nonnull %8, ptr noundef nonnull %60, i8 noundef signext %19)
  call void @apply_z(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %8, ptr noundef nonnull %4)
  %95 = call signext i8 @uECC_vli_cmp_unsafe(ptr noundef nonnull %51, ptr noundef nonnull %10, i8 noundef signext %25)
  %.not93 = icmp eq i8 %95, 1
  br i1 %.not93, label %98, label %96

96:                                               ; preds = %._crit_edge
  %97 = call i64 @uECC_vli_sub(ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef nonnull %51, i8 noundef signext %25)
  br label %98

98:                                               ; preds = %96, %._crit_edge
  %99 = call i64 @uECC_vli_equal(ptr noundef nonnull %10, ptr noundef nonnull %17, i8 noundef signext %19)
  %100 = trunc i64 %99 to i32
  br label %101

101:                                              ; preds = %50, %53, %5, %48, %98
  %.0 = phi i32 [ %100, %98 ], [ 0, %48 ], [ 0, %5 ], [ 0, %53 ], [ 0, %50 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #2
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_modInv(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_modMult(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_set(ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_modSub(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef signext) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare hidden signext i16 @smax(i16 noundef signext, i16 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden signext i16 @uECC_vli_numBits(ptr noundef, i8 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @uECC_vli_testBit(ptr noundef, i16 noundef signext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @uECC_vli_clear(ptr noundef, i8 noundef signext) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !7, i64 0}
!6 = !{!"uECC_Curve_t", !7, i64 0, !7, i64 1, !9, i64 2, !7, i64 8, !7, i64 40, !7, i64 72, !7, i64 136, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !9, i64 2}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!6, !7, i64 1}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !10, i64 168}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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