; LLVM IR from openssl/openssl :: crypto/ec/curve448 (curve448)

; 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.curve448_point_s = type { [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s] }
%struct.gf_s = type { [8 x i64] }
%struct.smvt_control = type { i32, i32 }
%struct.anon = type { [1 x %struct.niels_s], [1 x %struct.gf_s] }
%struct.niels_s = type { [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s] }

@ossl_curve448_point_identity = external dso_local constant [1 x %struct.curve448_point_s], align 16
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@ossl_curve448_wnaf_base = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret = external hidden unnamed_addr constant [180 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

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

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

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

declare void @OPENSSL_cleanse(ptr noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @curve448_point_copy(ptr noundef, ptr noundef) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @ossl_curve448_base_double_scalarmul_non_secret(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [114 x %struct.smvt_control], align 16
  %12 = alloca [77 x %struct.smvt_control], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [8 x [1 x %struct.anon]], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = 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
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 5, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 912, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 616, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %22 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = call i32 @recode_wnaf(ptr noundef %22, ptr noundef %23, i32 noundef 5)
  store i32 %24, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %25 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 0
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = call i32 @recode_wnaf(ptr noundef %25, ptr noundef %26, i32 noundef 3)
  store i32 %27, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %28 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %15, i64 0, i64 0
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  call void @prepare_wnaf_table(ptr noundef %28, ptr noundef %29, i32 noundef 3)
  %30 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 0
  %31 = getelementptr inbounds %struct.smvt_control, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 16, !tbaa !11
  store i32 %32, ptr %18, align 4, !tbaa !9
  %33 = load i32, ptr %18, align 4, !tbaa !9
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %4
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  call void @curve448_point_copy(ptr noundef %36, ptr noundef @ossl_curve448_point_identity)
  store i32 1, ptr %19, align 4
  br label %274

37:                                               ; preds = %4
  %38 = load i32, ptr %18, align 4, !tbaa !9
  %39 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  %40 = getelementptr inbounds %struct.smvt_control, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 16, !tbaa !11
  %42 = icmp sgt i32 %38, %41
  br i1 %42, label %43, label %54

43:                                               ; preds = %37
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 0
  %46 = getelementptr inbounds %struct.smvt_control, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = ashr i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %15, i64 0, i64 %49
  %51 = getelementptr inbounds [1 x %struct.anon], ptr %50, i64 0, i64 0
  call void @pniels_to_pt(ptr noundef %44, ptr noundef %51)
  %52 = load i32, ptr %17, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %17, align 4, !tbaa !9
  br label %102

54:                                               ; preds = %37
  %55 = load i32, ptr %18, align 4, !tbaa !9
  %56 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  %57 = getelementptr inbounds %struct.smvt_control, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 16, !tbaa !11
  %59 = icmp eq i32 %55, %58
  br i1 %59, label %60, label %86

60:                                               ; preds = %54
  %61 = load i32, ptr %18, align 4, !tbaa !9
  %62 = icmp sge i32 %61, 0
  br i1 %62, label %63, label %86

63:                                               ; preds = %60
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 0
  %66 = getelementptr inbounds %struct.smvt_control, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = ashr i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %15, i64 0, i64 %69
  %71 = getelementptr inbounds [1 x %struct.anon], ptr %70, i64 0, i64 0
  call void @pniels_to_pt(ptr noundef %64, ptr noundef %71)
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !5
  %74 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  %75 = getelementptr inbounds %struct.smvt_control, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = ashr i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [1 x %struct.niels_s], ptr %73, i64 %78
  %80 = getelementptr inbounds [1 x %struct.niels_s], ptr %79, i64 0, i64 0
  %81 = load i32, ptr %18, align 4, !tbaa !9
  call void @add_niels_to_pt(ptr noundef %72, ptr noundef %80, i32 noundef %81)
  %82 = load i32, ptr %17, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %17, align 4, !tbaa !9
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %16, align 4, !tbaa !9
  br label %101

86:                                               ; preds = %60, %54
  %87 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  %88 = getelementptr inbounds %struct.smvt_control, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 16, !tbaa !11
  store i32 %89, ptr %18, align 4, !tbaa !9
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !5
  %92 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  %93 = getelementptr inbounds %struct.smvt_control, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !13
  %95 = ashr i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1 x %struct.niels_s], ptr %91, i64 %96
  %98 = getelementptr inbounds [1 x %struct.niels_s], ptr %97, i64 0, i64 0
  call void @niels_to_pt(ptr noundef %90, ptr noundef %98)
  %99 = load i32, ptr %16, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %16, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %86, %63
  br label %102

102:                                              ; preds = %101, %43
  %103 = load i32, ptr %18, align 4, !tbaa !9
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr %18, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %253, %102
  %106 = load i32, ptr %18, align 4, !tbaa !9
  %107 = icmp sge i32 %106, 0
  br i1 %107, label %108, label %256

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = load i32, ptr %17, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.smvt_control, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !11
  %115 = icmp eq i32 %109, %114
  %116 = zext i1 %115 to i32
  store i32 %116, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.smvt_control, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !11
  %123 = icmp eq i32 %117, %122
  %124 = zext i1 %123 to i32
  store i32 %124, ptr %21, align 4, !tbaa !9
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %138

129:                                              ; preds = %108
  %130 = load i32, ptr %20, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %135, label %132

132:                                              ; preds = %129
  %133 = load i32, ptr %21, align 4, !tbaa !9
  %134 = icmp ne i32 %133, 0
  br label %135

135:                                              ; preds = %132, %129
  %136 = phi i1 [ true, %129 ], [ %134, %132 ]
  %137 = xor i1 %136, true
  br label %138

138:                                              ; preds = %135, %108
  %139 = phi i1 [ false, %108 ], [ %137, %135 ]
  %140 = zext i1 %139 to i32
  call void @point_double_internal(ptr noundef %125, ptr noundef %126, i32 noundef %140)
  %141 = load i32, ptr %20, align 4, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %203

143:                                              ; preds = %138
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 %145
  %147 = getelementptr inbounds %struct.smvt_control, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !13
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %143
  br label %152

151:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 691, ptr noundef @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

152:                                              ; preds = %150
  %153 = load i32, ptr %17, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.smvt_control, ptr %155, i32 0, i32 1
  %157 = load i32, ptr %156, align 4, !tbaa !13
  %158 = icmp sgt i32 %157, 0
  br i1 %158, label %159, label %179

159:                                              ; preds = %152
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = load i32, ptr %17, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 %162
  %164 = getelementptr inbounds %struct.smvt_control, ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 4, !tbaa !13
  %166 = ashr i32 %165, 1
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %15, i64 0, i64 %167
  %169 = getelementptr inbounds [1 x %struct.anon], ptr %168, i64 0, i64 0
  %170 = load i32, ptr %18, align 4, !tbaa !9
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %176

172:                                              ; preds = %159
  %173 = load i32, ptr %21, align 4, !tbaa !9
  %174 = icmp ne i32 %173, 0
  %175 = xor i1 %174, true
  br label %176

176:                                              ; preds = %172, %159
  %177 = phi i1 [ false, %159 ], [ %175, %172 ]
  %178 = zext i1 %177 to i32
  call void @add_pniels_to_pt(ptr noundef %160, ptr noundef %169, i32 noundef %178)
  br label %200

179:                                              ; preds = %152
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = load i32, ptr %17, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 %182
  %184 = getelementptr inbounds %struct.smvt_control, ptr %183, i32 0, i32 1
  %185 = load i32, ptr %184, align 4, !tbaa !13
  %186 = sub nsw i32 0, %185
  %187 = ashr i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %15, i64 0, i64 %188
  %190 = getelementptr inbounds [1 x %struct.anon], ptr %189, i64 0, i64 0
  %191 = load i32, ptr %18, align 4, !tbaa !9
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %197

193:                                              ; preds = %179
  %194 = load i32, ptr %21, align 4, !tbaa !9
  %195 = icmp ne i32 %194, 0
  %196 = xor i1 %195, true
  br label %197

197:                                              ; preds = %193, %179
  %198 = phi i1 [ false, %179 ], [ %196, %193 ]
  %199 = zext i1 %198 to i32
  call void @sub_pniels_from_pt(ptr noundef %180, ptr noundef %190, i32 noundef %199)
  br label %200

200:                                              ; preds = %197, %176
  %201 = load i32, ptr %17, align 4, !tbaa !9
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %17, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %200, %138
  %204 = load i32, ptr %21, align 4, !tbaa !9
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %252

206:                                              ; preds = %203
  %207 = load i32, ptr %16, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 %208
  %210 = getelementptr inbounds %struct.smvt_control, ptr %209, i32 0, i32 1
  %211 = load i32, ptr %210, align 4, !tbaa !13
  %212 = icmp ne i32 %211, 0
  br i1 %212, label %213, label %214

213:                                              ; preds = %206
  br label %215

214:                                              ; preds = %206
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 705, ptr noundef @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

215:                                              ; preds = %213
  %216 = load i32, ptr %16, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.smvt_control, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !13
  %221 = icmp sgt i32 %220, 0
  br i1 %221, label %222, label %235

222:                                              ; preds = %215
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !5
  %225 = load i32, ptr %16, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 %226
  %228 = getelementptr inbounds %struct.smvt_control, ptr %227, i32 0, i32 1
  %229 = load i32, ptr %228, align 4, !tbaa !13
  %230 = ashr i32 %229, 1
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [1 x %struct.niels_s], ptr %224, i64 %231
  %233 = getelementptr inbounds [1 x %struct.niels_s], ptr %232, i64 0, i64 0
  %234 = load i32, ptr %18, align 4, !tbaa !9
  call void @add_niels_to_pt(ptr noundef %223, ptr noundef %233, i32 noundef %234)
  br label %249

235:                                              ; preds = %215
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !5
  %238 = load i32, ptr %16, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 %239
  %241 = getelementptr inbounds %struct.smvt_control, ptr %240, i32 0, i32 1
  %242 = load i32, ptr %241, align 4, !tbaa !13
  %243 = sub nsw i32 0, %242
  %244 = ashr i32 %243, 1
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [1 x %struct.niels_s], ptr %237, i64 %245
  %247 = getelementptr inbounds [1 x %struct.niels_s], ptr %246, i64 0, i64 0
  %248 = load i32, ptr %18, align 4, !tbaa !9
  call void @sub_niels_from_pt(ptr noundef %236, ptr noundef %247, i32 noundef %248)
  br label %249

249:                                              ; preds = %235, %222
  %250 = load i32, ptr %16, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %16, align 4, !tbaa !9
  br label %252

252:                                              ; preds = %249, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %18, align 4, !tbaa !9
  %255 = add nsw i32 %254, -1
  store i32 %255, ptr %18, align 4, !tbaa !9
  br label %105, !llvm.loop !14

256:                                              ; preds = %105
  %257 = getelementptr inbounds [114 x %struct.smvt_control], ptr %11, i64 0, i64 0
  call void @OPENSSL_cleanse(ptr noundef %257, i64 noundef 912)
  %258 = getelementptr inbounds [77 x %struct.smvt_control], ptr %12, i64 0, i64 0
  call void @OPENSSL_cleanse(ptr noundef %258, i64 noundef 616)
  %259 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %15, i64 0, i64 0
  call void @OPENSSL_cleanse(ptr noundef %259, i64 noundef 2048)
  %260 = load i32, ptr %17, align 4, !tbaa !9
  %261 = load i32, ptr %14, align 4, !tbaa !9
  %262 = icmp eq i32 %260, %261
  br i1 %262, label %263, label %264

263:                                              ; preds = %256
  br label %265

264:                                              ; preds = %256
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 724, ptr noundef @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

265:                                              ; preds = %263
  %266 = load i32, ptr %14, align 4, !tbaa !9
  %267 = load i32, ptr %16, align 4, !tbaa !9
  %268 = load i32, ptr %13, align 4, !tbaa !9
  %269 = icmp eq i32 %267, %268
  br i1 %269, label %270, label %271

270:                                              ; preds = %265
  br label %272

271:                                              ; preds = %265
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 726, ptr noundef @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

272:                                              ; preds = %270
  %273 = load i32, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %19, align 4
  br label %274

274:                                              ; preds = %272, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 616, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 912, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %275 = load i32, ptr %19, align 4
  switch i32 %275, label %277 [
    i32 0, label %276
    i32 1, label %276
  ]

276:                                              ; preds = %274, %274
  ret void

277:                                              ; preds = %274
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden i32 @recode_wnaf(ptr noundef, ptr noundef, i32 noundef) #0

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

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

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

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

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

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

%struct.curve448_point_s = type { [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s] }
%struct.gf_s = type { [8 x i64] }
%struct.smvt_control = type { i32, i32 }
%struct.anon = type { [1 x %struct.niels_s], [1 x %struct.gf_s] }
%struct.niels_s = type { [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s] }

@ossl_curve448_point_identity = external dso_local constant [1 x %struct.curve448_point_s], align 16
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@ossl_curve448_wnaf_base = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret = external hidden unnamed_addr constant [180 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

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

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

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

declare void @OPENSSL_cleanse(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @curve448_point_copy(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @ossl_curve448_base_double_scalarmul_non_secret(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca [114 x %struct.smvt_control], align 16
  %6 = alloca [77 x %struct.smvt_control], align 16
  %7 = alloca [8 x [1 x %struct.anon]], align 16
  call void @llvm.lifetime.start.p0(i64 912, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 616, ptr nonnull %6) #5
  %8 = call i32 @recode_wnaf(ptr noundef nonnull %6, ptr noundef %1, i32 noundef 5)
  %9 = call i32 @recode_wnaf(ptr noundef nonnull %5, ptr noundef %3, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %7) #5
  call void @prepare_wnaf_table(ptr noundef nonnull %7, ptr noundef %2, i32 noundef 3)
  %10 = load i32, ptr %5, align 16, !tbaa !5
  %11 = icmp slt i32 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %4
  call void @curve448_point_copy(ptr noundef %0, ptr noundef nonnull @ossl_curve448_point_identity)
  br label %102

13:                                               ; preds = %4
  %14 = load i32, ptr %6, align 16, !tbaa !5
  %15 = icmp sgt i32 %10, %14
  br i1 %15, label %16, label %22

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %5, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !10
  %19 = ashr i32 %18, 1
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %7, i64 0, i64 %20
  call void @pniels_to_pt(ptr noundef %0, ptr noundef nonnull %21)
  br label %43

22:                                               ; preds = %13
  %23 = icmp eq i32 %10, %14
  br i1 %23, label %24, label %36

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %5, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !10
  %27 = ashr i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %7, i64 0, i64 %28
  call void @pniels_to_pt(ptr noundef %0, ptr noundef nonnull %29)
  %30 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %6, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !10
  %33 = ashr i32 %32, 1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1 x %struct.niels_s], ptr %30, i64 %34
  call void @add_niels_to_pt(ptr noundef %0, ptr noundef %35, i32 noundef %10)
  br label %43

36:                                               ; preds = %22
  %37 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %6, i64 4
  %39 = load i32, ptr %38, align 4, !tbaa !10
  %40 = ashr i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [1 x %struct.niels_s], ptr %37, i64 %41
  call void @niels_to_pt(ptr noundef %0, ptr noundef %42)
  br label %43

43:                                               ; preds = %24, %36, %16
  %.060 = phi i32 [ %10, %16 ], [ %10, %24 ], [ %14, %36 ]
  %.057 = phi i32 [ 1, %16 ], [ 1, %24 ], [ 0, %36 ]
  %.0 = phi i32 [ 0, %16 ], [ 1, %24 ], [ 1, %36 ]
  %.not80 = icmp eq i32 %.060, 0
  br i1 %.not80, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %43, %95
  %.16176.in = phi i32 [ %.16176, %95 ], [ %.060, %43 ]
  %.175 = phi i32 [ %.2, %95 ], [ %.0, %43 ]
  %.15874 = phi i32 [ %.259, %95 ], [ %.057, %43 ]
  %.16176 = add nsw i32 %.16176.in, -1
  %44 = sext i32 %.15874 to i64
  %45 = getelementptr inbounds [114 x %struct.smvt_control], ptr %5, i64 0, i64 %44
  %46 = load i32, ptr %45, align 8, !tbaa !5
  %47 = icmp ne i32 %.16176, %46
  %48 = sext i32 %.175 to i64
  %49 = getelementptr inbounds [77 x %struct.smvt_control], ptr %6, i64 0, i64 %48
  %50 = load i32, ptr %49, align 8, !tbaa !5
  %51 = icmp ne i32 %.16176, %50
  %52 = icmp ne i32 %.16176, 0
  %53 = select i1 %52, i1 %47, i1 false
  %spec.select = select i1 %53, i1 %51, i1 false
  %54 = zext i1 %spec.select to i32
  call void @point_double_internal(ptr noundef %0, ptr noundef %0, i32 noundef %54)
  br i1 %47, label %76, label %55

55:                                               ; preds = %.lr.ph
  %56 = getelementptr inbounds i8, ptr %45, i64 4
  %57 = load i32, ptr %56, align 4, !tbaa !10
  %.not = icmp eq i32 %57, 0
  br i1 %.not, label %58, label %59

58:                                               ; preds = %55
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 691, ptr noundef nonnull @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

59:                                               ; preds = %55
  %60 = icmp sgt i32 %57, 0
  br i1 %60, label %61, label %67

61:                                               ; preds = %59
  %62 = lshr i32 %57, 1
  %63 = zext nneg i32 %62 to i64
  %64 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %7, i64 0, i64 %63
  %65 = select i1 %52, i1 %51, i1 false
  %66 = zext i1 %65 to i32
  call void @add_pniels_to_pt(ptr noundef %0, ptr noundef nonnull %64, i32 noundef %66)
  br label %74

67:                                               ; preds = %59
  %68 = sub nsw i32 0, %57
  %69 = lshr i32 %68, 1
  %70 = zext nneg i32 %69 to i64
  %71 = getelementptr inbounds [8 x [1 x %struct.anon]], ptr %7, i64 0, i64 %70
  %72 = select i1 %52, i1 %51, i1 false
  %73 = zext i1 %72 to i32
  call void @sub_pniels_from_pt(ptr noundef %0, ptr noundef nonnull %71, i32 noundef %73)
  br label %74

74:                                               ; preds = %67, %61
  %75 = add nsw i32 %.15874, 1
  br label %76

76:                                               ; preds = %74, %.lr.ph
  %.259 = phi i32 [ %75, %74 ], [ %.15874, %.lr.ph ]
  br i1 %51, label %95, label %77

77:                                               ; preds = %76
  %78 = getelementptr inbounds i8, ptr %49, i64 4
  %79 = load i32, ptr %78, align 4, !tbaa !10
  %.not68 = icmp eq i32 %79, 0
  br i1 %.not68, label %80, label %81

80:                                               ; preds = %77
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 705, ptr noundef nonnull @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

81:                                               ; preds = %77
  %82 = icmp sgt i32 %79, 0
  %83 = load ptr, ptr @ossl_curve448_wnaf_base, align 8, !tbaa !11
  br i1 %82, label %84, label %88

84:                                               ; preds = %81
  %85 = lshr i32 %79, 1
  %86 = zext nneg i32 %85 to i64
  %87 = getelementptr inbounds [1 x %struct.niels_s], ptr %83, i64 %86
  call void @add_niels_to_pt(ptr noundef %0, ptr noundef %87, i32 noundef %.16176)
  br label %93

88:                                               ; preds = %81
  %89 = sub nsw i32 0, %79
  %90 = lshr i32 %89, 1
  %91 = zext nneg i32 %90 to i64
  %92 = getelementptr inbounds [1 x %struct.niels_s], ptr %83, i64 %91
  call void @sub_niels_from_pt(ptr noundef %0, ptr noundef %92, i32 noundef %.16176)
  br label %93

93:                                               ; preds = %88, %84
  %94 = add nsw i32 %.175, 1
  br label %95

95:                                               ; preds = %93, %76
  %.2 = phi i32 [ %94, %93 ], [ %.175, %76 ]
  %96 = icmp ugt i32 %.16176.in, 1
  br i1 %96, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %95, %43
  %.158.lcssa = phi i32 [ %.057, %43 ], [ %.259, %95 ]
  %.1.lcssa = phi i32 [ %.0, %43 ], [ %.2, %95 ]
  call void @OPENSSL_cleanse(ptr noundef nonnull %5, i64 noundef 912) #5
  call void @OPENSSL_cleanse(ptr noundef nonnull %6, i64 noundef 616) #5
  call void @OPENSSL_cleanse(ptr noundef nonnull %7, i64 noundef 2048) #5
  %97 = icmp eq i32 %.158.lcssa, %9
  br i1 %97, label %99, label %98

98:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 724, ptr noundef nonnull @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

99:                                               ; preds = %._crit_edge
  %100 = icmp eq i32 %.1.lcssa, %8
  br i1 %100, label %102, label %101

101:                                              ; preds = %99
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 726, ptr noundef nonnull @__PRETTY_FUNCTION__.ossl_curve448_base_double_scalarmul_non_secret) #6
  unreachable

102:                                              ; preds = %99, %12
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 616, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 912, ptr nonnull %5) #5
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden i32 @recode_wnaf(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"smvt_control", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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