; LLVM IR from cryspen/libcrux :: sys/hacl/c/src (Hacl_K256_ECDSA)

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

@__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq = external hidden unnamed_addr constant [4 x i64], align 16
@__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq10 = external hidden unnamed_addr constant [4 x i64], align 16
@__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq1 = external hidden unnamed_addr constant [4 x i64], align 16

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @Hacl_K256_ECDSA_ecdsa_sign_hashed_msg(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [4 x i64], align 16
  %10 = alloca [16 x i64], align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca [4 x i64], align 16
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca [4 x i64], align 16
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca ptr, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i64, align 8
  %42 = alloca i64, align 8
  %43 = alloca ptr, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca i64, align 8
  %47 = alloca i64, align 8
  %48 = alloca [5 x i64], align 16
  %49 = alloca [32 x i8], align 16
  %50 = alloca [15 x i64], align 16
  %51 = alloca [4 x i64], align 16
  %52 = alloca [4 x i64], align 16
  %53 = alloca i64, align 8
  %54 = alloca i64, align 8
  %55 = alloca i64, align 8
  %56 = alloca i8, align 1
  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 32, ptr %9) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq, i64 32, i1 false)
  %57 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 128, ptr %10) #5
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %58 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 0
  store ptr %58, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %59 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 0
  %60 = getelementptr inbounds i64, ptr %59, i64 4
  store ptr %60, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %61 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 0
  %62 = getelementptr inbounds i64, ptr %61, i64 8
  store ptr %62, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %63 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 0
  %64 = getelementptr inbounds i64, ptr %63, i64 12
  store ptr %64, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call i64 @load_qelem_check(ptr noundef %65, ptr noundef %66)
  store i64 %67, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq10, i64 32, i1 false)
  br label %68

68:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %69, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %70 = load i32, ptr %17, align 4, !tbaa !11
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !9
  store i64 %73, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %74 = load i64, ptr %19, align 8, !tbaa !9
  %75 = load i64, ptr %15, align 8, !tbaa !9
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load i32, ptr %17, align 4, !tbaa !11
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i64, ptr %76, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !9
  %81 = load i64, ptr %19, align 8, !tbaa !9
  %82 = xor i64 %80, %81
  %83 = and i64 %75, %82
  %84 = xor i64 %74, %83
  store i64 %84, ptr %20, align 8, !tbaa !9
  %85 = load i64, ptr %20, align 8, !tbaa !9
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  %87 = load i32, ptr %17, align 4, !tbaa !11
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i64, ptr %86, i64 %88
  store i64 %85, ptr %89, align 8, !tbaa !9
  %90 = load i32, ptr %17, align 4, !tbaa !11
  %91 = add i32 %90, 1
  store i32 %91, ptr %17, align 4, !tbaa !11
  %92 = load i32, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %93, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %94 = load i32, ptr %17, align 4, !tbaa !11
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !9
  store i64 %97, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %98 = load i64, ptr %22, align 8, !tbaa !9
  %99 = load i64, ptr %15, align 8, !tbaa !9
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = load i32, ptr %17, align 4, !tbaa !11
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds i64, ptr %100, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = load i64, ptr %22, align 8, !tbaa !9
  %106 = xor i64 %104, %105
  %107 = and i64 %99, %106
  %108 = xor i64 %98, %107
  store i64 %108, ptr %23, align 8, !tbaa !9
  %109 = load i64, ptr %23, align 8, !tbaa !9
  %110 = load ptr, ptr %21, align 8, !tbaa !5
  %111 = load i32, ptr %17, align 4, !tbaa !11
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i64, ptr %110, i64 %112
  store i64 %109, ptr %113, align 8, !tbaa !9
  %114 = load i32, ptr %17, align 4, !tbaa !11
  %115 = add i32 %114, 1
  store i32 %115, ptr %17, align 4, !tbaa !11
  %116 = load i32, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %117, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %118 = load i32, ptr %17, align 4, !tbaa !11
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !9
  store i64 %121, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %122 = load i64, ptr %25, align 8, !tbaa !9
  %123 = load i64, ptr %15, align 8, !tbaa !9
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = load i32, ptr %17, align 4, !tbaa !11
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds i64, ptr %124, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = load i64, ptr %25, align 8, !tbaa !9
  %130 = xor i64 %128, %129
  %131 = and i64 %123, %130
  %132 = xor i64 %122, %131
  store i64 %132, ptr %26, align 8, !tbaa !9
  %133 = load i64, ptr %26, align 8, !tbaa !9
  %134 = load ptr, ptr %24, align 8, !tbaa !5
  %135 = load i32, ptr %17, align 4, !tbaa !11
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds i64, ptr %134, i64 %136
  store i64 %133, ptr %137, align 8, !tbaa !9
  %138 = load i32, ptr %17, align 4, !tbaa !11
  %139 = add i32 %138, 1
  store i32 %139, ptr %17, align 4, !tbaa !11
  %140 = load i32, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %141 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %141, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %142 = load i32, ptr %17, align 4, !tbaa !11
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds [4 x i64], ptr %16, i64 0, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !9
  store i64 %145, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %146 = load i64, ptr %28, align 8, !tbaa !9
  %147 = load i64, ptr %15, align 8, !tbaa !9
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load i32, ptr %17, align 4, !tbaa !11
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds i64, ptr %148, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !9
  %153 = load i64, ptr %28, align 8, !tbaa !9
  %154 = xor i64 %152, %153
  %155 = and i64 %147, %154
  %156 = xor i64 %146, %155
  store i64 %156, ptr %29, align 8, !tbaa !9
  %157 = load i64, ptr %29, align 8, !tbaa !9
  %158 = load ptr, ptr %27, align 8, !tbaa !5
  %159 = load i32, ptr %17, align 4, !tbaa !11
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds i64, ptr %158, i64 %160
  store i64 %157, ptr %161, align 8, !tbaa !9
  %162 = load i32, ptr %17, align 4, !tbaa !11
  %163 = add i32 %162, 1
  store i32 %163, ptr %17, align 4, !tbaa !11
  %164 = load i32, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %165

165:                                              ; preds = %68
  br label %166

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %167 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %167, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = call i64 @load_qelem_check(ptr noundef %168, ptr noundef %169)
  store i64 %170, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq1, i64 32, i1 false)
  br label %171

171:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 0, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %172, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %173 = load i32, ptr %33, align 4, !tbaa !11
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds [4 x i64], ptr %32, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !9
  store i64 %176, ptr %35, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %177 = load i64, ptr %35, align 8, !tbaa !9
  %178 = load i64, ptr %31, align 8, !tbaa !9
  %179 = load ptr, ptr %14, align 8, !tbaa !5
  %180 = load i32, ptr %33, align 4, !tbaa !11
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds i64, ptr %179, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !9
  %184 = load i64, ptr %35, align 8, !tbaa !9
  %185 = xor i64 %183, %184
  %186 = and i64 %178, %185
  %187 = xor i64 %177, %186
  store i64 %187, ptr %36, align 8, !tbaa !9
  %188 = load i64, ptr %36, align 8, !tbaa !9
  %189 = load ptr, ptr %34, align 8, !tbaa !5
  %190 = load i32, ptr %33, align 4, !tbaa !11
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds i64, ptr %189, i64 %191
  store i64 %188, ptr %192, align 8, !tbaa !9
  %193 = load i32, ptr %33, align 4, !tbaa !11
  %194 = add i32 %193, 1
  store i32 %194, ptr %33, align 4, !tbaa !11
  %195 = load i32, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %196 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %196, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  %197 = load i32, ptr %33, align 4, !tbaa !11
  %198 = zext i32 %197 to i64
  %199 = getelementptr inbounds [4 x i64], ptr %32, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !9
  store i64 %200, ptr %38, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %201 = load i64, ptr %38, align 8, !tbaa !9
  %202 = load i64, ptr %31, align 8, !tbaa !9
  %203 = load ptr, ptr %14, align 8, !tbaa !5
  %204 = load i32, ptr %33, align 4, !tbaa !11
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds i64, ptr %203, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !9
  %208 = load i64, ptr %38, align 8, !tbaa !9
  %209 = xor i64 %207, %208
  %210 = and i64 %202, %209
  %211 = xor i64 %201, %210
  store i64 %211, ptr %39, align 8, !tbaa !9
  %212 = load i64, ptr %39, align 8, !tbaa !9
  %213 = load ptr, ptr %37, align 8, !tbaa !5
  %214 = load i32, ptr %33, align 4, !tbaa !11
  %215 = zext i32 %214 to i64
  %216 = getelementptr inbounds i64, ptr %213, i64 %215
  store i64 %212, ptr %216, align 8, !tbaa !9
  %217 = load i32, ptr %33, align 4, !tbaa !11
  %218 = add i32 %217, 1
  store i32 %218, ptr %33, align 4, !tbaa !11
  %219 = load i32, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  %220 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %220, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %221 = load i32, ptr %33, align 4, !tbaa !11
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds [4 x i64], ptr %32, i64 0, i64 %222
  %224 = load i64, ptr %223, align 8, !tbaa !9
  store i64 %224, ptr %41, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %225 = load i64, ptr %41, align 8, !tbaa !9
  %226 = load i64, ptr %31, align 8, !tbaa !9
  %227 = load ptr, ptr %14, align 8, !tbaa !5
  %228 = load i32, ptr %33, align 4, !tbaa !11
  %229 = zext i32 %228 to i64
  %230 = getelementptr inbounds i64, ptr %227, i64 %229
  %231 = load i64, ptr %230, align 8, !tbaa !9
  %232 = load i64, ptr %41, align 8, !tbaa !9
  %233 = xor i64 %231, %232
  %234 = and i64 %226, %233
  %235 = xor i64 %225, %234
  store i64 %235, ptr %42, align 8, !tbaa !9
  %236 = load i64, ptr %42, align 8, !tbaa !9
  %237 = load ptr, ptr %40, align 8, !tbaa !5
  %238 = load i32, ptr %33, align 4, !tbaa !11
  %239 = zext i32 %238 to i64
  %240 = getelementptr inbounds i64, ptr %237, i64 %239
  store i64 %236, ptr %240, align 8, !tbaa !9
  %241 = load i32, ptr %33, align 4, !tbaa !11
  %242 = add i32 %241, 1
  store i32 %242, ptr %33, align 4, !tbaa !11
  %243 = load i32, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %244 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %244, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  %245 = load i32, ptr %33, align 4, !tbaa !11
  %246 = zext i32 %245 to i64
  %247 = getelementptr inbounds [4 x i64], ptr %32, i64 0, i64 %246
  %248 = load i64, ptr %247, align 8, !tbaa !9
  store i64 %248, ptr %44, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #5
  %249 = load i64, ptr %44, align 8, !tbaa !9
  %250 = load i64, ptr %31, align 8, !tbaa !9
  %251 = load ptr, ptr %14, align 8, !tbaa !5
  %252 = load i32, ptr %33, align 4, !tbaa !11
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds i64, ptr %251, i64 %253
  %255 = load i64, ptr %254, align 8, !tbaa !9
  %256 = load i64, ptr %44, align 8, !tbaa !9
  %257 = xor i64 %255, %256
  %258 = and i64 %250, %257
  %259 = xor i64 %249, %258
  store i64 %259, ptr %45, align 8, !tbaa !9
  %260 = load i64, ptr %45, align 8, !tbaa !9
  %261 = load ptr, ptr %43, align 8, !tbaa !5
  %262 = load i32, ptr %33, align 4, !tbaa !11
  %263 = zext i32 %262 to i64
  %264 = getelementptr inbounds i64, ptr %261, i64 %263
  store i64 %260, ptr %264, align 8, !tbaa !9
  %265 = load i32, ptr %33, align 4, !tbaa !11
  %266 = add i32 %265, 1
  store i32 %266, ptr %33, align 4, !tbaa !11
  %267 = load i32, ptr %33, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  br label %268

268:                                              ; preds = %171
  br label %269

269:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  %270 = load i64, ptr %31, align 8, !tbaa !9
  store i64 %270, ptr %46, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #5
  %271 = load i64, ptr %30, align 8, !tbaa !9
  %272 = load i64, ptr %46, align 8, !tbaa !9
  %273 = and i64 %271, %272
  store i64 %273, ptr %47, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %48) #5
  call void @llvm.memset.p0.i64(ptr align 16 %48, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #5
  call void @llvm.memset.p0.i64(ptr align 16 %49, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 120, ptr %50) #5
  call void @llvm.memset.p0.i64(ptr align 16 %50, i8 0, i64 120, i1 false)
  %274 = getelementptr inbounds [15 x i64], ptr %50, i64 0, i64 0
  %275 = load ptr, ptr %14, align 8, !tbaa !5
  call void @point_mul_g(ptr noundef %274, ptr noundef %275)
  %276 = getelementptr inbounds [5 x i64], ptr %48, i64 0, i64 0
  %277 = getelementptr inbounds [15 x i64], ptr %50, i64 0, i64 0
  call void @to_aff_point_x(ptr noundef %276, ptr noundef %277)
  %278 = getelementptr inbounds [32 x i8], ptr %49, i64 0, i64 0
  %279 = getelementptr inbounds [5 x i64], ptr %48, i64 0, i64 0
  call void @Hacl_K256_Field_store_felem(ptr noundef %278, ptr noundef %279)
  %280 = load ptr, ptr %11, align 8, !tbaa !5
  %281 = getelementptr inbounds [32 x i8], ptr %49, i64 0, i64 0
  call void @load_qelem_modq(ptr noundef %280, ptr noundef %281)
  call void @llvm.lifetime.start.p0(i64 32, ptr %51) #5
  call void @llvm.memset.p0.i64(ptr align 16 %51, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %52) #5
  call void @llvm.memset.p0.i64(ptr align 16 %52, i8 0, i64 32, i1 false)
  %282 = getelementptr inbounds [4 x i64], ptr %51, i64 0, i64 0
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  call void @load_qelem_modq(ptr noundef %282, ptr noundef %283)
  %284 = getelementptr inbounds [4 x i64], ptr %52, i64 0, i64 0
  %285 = load ptr, ptr %14, align 8, !tbaa !5
  call void @qinv(ptr noundef %284, ptr noundef %285)
  %286 = load ptr, ptr %12, align 8, !tbaa !5
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  %288 = load ptr, ptr %13, align 8, !tbaa !5
  call void @qmul(ptr noundef %286, ptr noundef %287, ptr noundef %288)
  %289 = load ptr, ptr %12, align 8, !tbaa !5
  %290 = getelementptr inbounds [4 x i64], ptr %51, i64 0, i64 0
  %291 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qadd(ptr noundef %289, ptr noundef %290, ptr noundef %291)
  %292 = load ptr, ptr %12, align 8, !tbaa !5
  %293 = getelementptr inbounds [4 x i64], ptr %52, i64 0, i64 0
  %294 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qmul(ptr noundef %292, ptr noundef %293, ptr noundef %294)
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = load ptr, ptr %11, align 8, !tbaa !5
  call void @store_qelem(ptr noundef %295, ptr noundef %296)
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  %298 = getelementptr inbounds i8, ptr %297, i64 32
  %299 = load ptr, ptr %12, align 8, !tbaa !5
  call void @store_qelem(ptr noundef %298, ptr noundef %299)
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #5
  %300 = load ptr, ptr %11, align 8, !tbaa !5
  %301 = call i64 @is_qelem_zero(ptr noundef %300)
  store i64 %301, ptr %53, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #5
  %302 = load ptr, ptr %12, align 8, !tbaa !5
  %303 = call i64 @is_qelem_zero(ptr noundef %302)
  store i64 %303, ptr %54, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #5
  %304 = load i64, ptr %47, align 8, !tbaa !9
  %305 = load i64, ptr %53, align 8, !tbaa !9
  %306 = xor i64 %305, -1
  %307 = load i64, ptr %54, align 8, !tbaa !9
  %308 = xor i64 %307, -1
  %309 = and i64 %306, %308
  %310 = and i64 %304, %309
  store i64 %310, ptr %55, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %56) #5
  %311 = load i64, ptr %55, align 8, !tbaa !9
  %312 = icmp eq i64 %311, -1
  %313 = zext i1 %312 to i8
  store i8 %313, ptr %56, align 1, !tbaa !13
  %314 = load i8, ptr %56, align 1, !tbaa !13, !range !15, !noundef !16
  %315 = trunc i8 %314 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %56) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  ret i1 %315
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @load_qelem_check(ptr noundef, ptr noundef) #4

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @is_qelem_zero(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


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

@__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq10 = external hidden unnamed_addr constant [4 x i64], align 16
@__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq1 = external hidden unnamed_addr constant [4 x i64], align 16

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @Hacl_K256_ECDSA_ecdsa_sign_hashed_msg(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca [16 x i64], align 16
  %6 = alloca [5 x i64], align 16
  %7 = alloca [32 x i8], align 16
  %8 = alloca [15 x i64], align 16
  %9 = alloca [4 x i64], align 16
  %10 = alloca [4 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %5, i8 0, i64 128, i1 false)
  %11 = getelementptr inbounds i8, ptr %5, i64 32
  %12 = getelementptr inbounds i8, ptr %5, i64 64
  %13 = getelementptr inbounds i8, ptr %5, i64 96
  %14 = call i64 @load_qelem_check(ptr noundef nonnull %12, ptr noundef %2)
  %15 = load <2 x i64>, ptr @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq10, align 16, !tbaa !5
  %16 = load <2 x i64>, ptr %12, align 16, !tbaa !5
  %17 = xor <2 x i64> %16, %15
  %18 = insertelement <2 x i64> poison, i64 %14, i64 0
  %19 = shufflevector <2 x i64> %18, <2 x i64> poison, <2 x i32> zeroinitializer
  %20 = and <2 x i64> %17, %19
  %21 = xor <2 x i64> %20, %15
  store <2 x i64> %21, ptr %12, align 16, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %5, i64 80
  %23 = load <2 x i64>, ptr getelementptr inbounds (i8, ptr @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq10, i64 16), align 16, !tbaa !5
  %24 = load <2 x i64>, ptr %22, align 16, !tbaa !5
  %25 = xor <2 x i64> %24, %23
  %26 = and <2 x i64> %25, %19
  %27 = xor <2 x i64> %26, %23
  store <2 x i64> %27, ptr %22, align 16, !tbaa !5
  %28 = call i64 @load_qelem_check(ptr noundef nonnull %13, ptr noundef %3)
  %29 = load <2 x i64>, ptr @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq1, align 16, !tbaa !5
  %30 = load <2 x i64>, ptr %13, align 16, !tbaa !5
  %31 = xor <2 x i64> %30, %29
  %32 = insertelement <2 x i64> poison, i64 %28, i64 0
  %33 = shufflevector <2 x i64> %32, <2 x i64> poison, <2 x i32> zeroinitializer
  %34 = and <2 x i64> %31, %33
  %35 = xor <2 x i64> %34, %29
  store <2 x i64> %35, ptr %13, align 16, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %5, i64 112
  %37 = load <2 x i64>, ptr getelementptr inbounds (i8, ptr @__const.Hacl_K256_ECDSA_ecdsa_sign_hashed_msg.oneq1, i64 16), align 16, !tbaa !5
  %38 = load <2 x i64>, ptr %36, align 16, !tbaa !5
  %39 = xor <2 x i64> %38, %37
  %40 = and <2 x i64> %39, %33
  %41 = xor <2 x i64> %40, %37
  store <2 x i64> %41, ptr %36, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %6, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(120) %8, i8 0, i64 120, i1 false)
  call void @point_mul_g(ptr noundef nonnull %8, ptr noundef nonnull %13)
  call void @to_aff_point_x(ptr noundef nonnull %6, ptr noundef nonnull %8)
  call void @Hacl_K256_Field_store_felem(ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @load_qelem_modq(ptr noundef nonnull %5, ptr noundef nonnull %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %9, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %10, i8 0, i64 32, i1 false)
  call void @load_qelem_modq(ptr noundef nonnull %9, ptr noundef %1)
  call void @qinv(ptr noundef nonnull %10, ptr noundef nonnull %13)
  call void @qmul(ptr noundef nonnull %11, ptr noundef nonnull %5, ptr noundef nonnull %12)
  call void @qadd(ptr noundef nonnull %11, ptr noundef nonnull %9, ptr noundef nonnull %11)
  call void @qmul(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef nonnull %11)
  call void @store_qelem(ptr noundef %0, ptr noundef nonnull %5)
  %42 = getelementptr inbounds i8, ptr %0, i64 32
  call void @store_qelem(ptr noundef nonnull %42, ptr noundef nonnull %11)
  %43 = call i64 @is_qelem_zero(ptr noundef nonnull %5)
  %44 = call i64 @is_qelem_zero(ptr noundef nonnull %11)
  %.demorgan = or i64 %44, %43
  %45 = xor i64 %.demorgan, -1
  %46 = and i64 %14, %45
  %47 = and i64 %46, %28
  %48 = icmp eq i64 %47, -1
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #4
  ret i1 %48
}

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @is_qelem_zero(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass