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

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

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

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

; 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
define dso_local i32 @Hacl_AEAD_Chacha20Poly1305_decrypt(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #4 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca [16 x i8], align 16
  %19 = alloca [64 x i8], align 16
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca i8, align 1
  %31 = alloca i8, align 1
  %32 = alloca i8, align 1
  %33 = alloca i8, align 1
  %34 = alloca i8, align 1
  %35 = alloca i8, align 1
  %36 = alloca i8, align 1
  %37 = alloca i8, align 1
  %38 = alloca i8, align 1
  %39 = alloca i8, align 1
  %40 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i32 %4, ptr %14, align 4, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  call void @llvm.memset.p0.i64(ptr align 16 %18, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 16 %19, i8 0, i64 64, i1 false)
  %41 = getelementptr inbounds [64 x i8], ptr %19, i64 0, i64 0
  %42 = getelementptr inbounds [64 x i8], ptr %19, i64 0, i64 0
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  call void @Hacl_Chacha20_chacha20_encrypt(i32 noundef 64, ptr noundef %41, ptr noundef %42, ptr noundef %43, ptr noundef %44, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %45 = getelementptr inbounds [64 x i8], ptr %19, i64 0, i64 0
  store ptr %45, ptr %20, align 8, !tbaa !5
  %46 = load ptr, ptr %20, align 8, !tbaa !5
  %47 = load i32, ptr %14, align 4, !tbaa !9
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  call void @poly1305_do_32(ptr noundef %46, i32 noundef %47, ptr noundef %48, i32 noundef %49, ptr noundef %50, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i8 -1, ptr %21, align 1, !tbaa !11
  br label %52

52:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  %53 = load i32, ptr %22, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = load ptr, ptr %17, align 8, !tbaa !5
  %58 = load i32, ptr %22, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !11
  %62 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %56, i8 noundef zeroext %61)
  store i8 %62, ptr %23, align 1, !tbaa !11
  %63 = load i8, ptr %23, align 1, !tbaa !11
  %64 = zext i8 %63 to i32
  %65 = load i8, ptr %21, align 1, !tbaa !11
  %66 = zext i8 %65 to i32
  %67 = and i32 %64, %66
  %68 = trunc i32 %67 to i8
  store i8 %68, ptr %21, align 1, !tbaa !11
  %69 = load i32, ptr %22, align 4, !tbaa !9
  %70 = add i32 %69, 1
  store i32 %70, ptr %22, align 4, !tbaa !9
  %71 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  %72 = load i32, ptr %22, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  %77 = load i32, ptr %22, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %75, i8 noundef zeroext %80)
  store i8 %81, ptr %24, align 1, !tbaa !11
  %82 = load i8, ptr %24, align 1, !tbaa !11
  %83 = zext i8 %82 to i32
  %84 = load i8, ptr %21, align 1, !tbaa !11
  %85 = zext i8 %84 to i32
  %86 = and i32 %83, %85
  %87 = trunc i32 %86 to i8
  store i8 %87, ptr %21, align 1, !tbaa !11
  %88 = load i32, ptr %22, align 4, !tbaa !9
  %89 = add i32 %88, 1
  store i32 %89, ptr %22, align 4, !tbaa !9
  %90 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  %91 = load i32, ptr %22, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  %96 = load i32, ptr %22, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %95, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !11
  %100 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %94, i8 noundef zeroext %99)
  store i8 %100, ptr %25, align 1, !tbaa !11
  %101 = load i8, ptr %25, align 1, !tbaa !11
  %102 = zext i8 %101 to i32
  %103 = load i8, ptr %21, align 1, !tbaa !11
  %104 = zext i8 %103 to i32
  %105 = and i32 %102, %104
  %106 = trunc i32 %105 to i8
  store i8 %106, ptr %21, align 1, !tbaa !11
  %107 = load i32, ptr %22, align 4, !tbaa !9
  %108 = add i32 %107, 1
  store i32 %108, ptr %22, align 4, !tbaa !9
  %109 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  %110 = load i32, ptr %22, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !11
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  %115 = load i32, ptr %22, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds i8, ptr %114, i64 %116
  %118 = load i8, ptr %117, align 1, !tbaa !11
  %119 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %113, i8 noundef zeroext %118)
  store i8 %119, ptr %26, align 1, !tbaa !11
  %120 = load i8, ptr %26, align 1, !tbaa !11
  %121 = zext i8 %120 to i32
  %122 = load i8, ptr %21, align 1, !tbaa !11
  %123 = zext i8 %122 to i32
  %124 = and i32 %121, %123
  %125 = trunc i32 %124 to i8
  store i8 %125, ptr %21, align 1, !tbaa !11
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = add i32 %126, 1
  store i32 %127, ptr %22, align 4, !tbaa !9
  %128 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #6
  %129 = load i32, ptr %22, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %130
  %132 = load i8, ptr %131, align 1, !tbaa !11
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = load i32, ptr %22, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i8, ptr %133, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !11
  %138 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %132, i8 noundef zeroext %137)
  store i8 %138, ptr %27, align 1, !tbaa !11
  %139 = load i8, ptr %27, align 1, !tbaa !11
  %140 = zext i8 %139 to i32
  %141 = load i8, ptr %21, align 1, !tbaa !11
  %142 = zext i8 %141 to i32
  %143 = and i32 %140, %142
  %144 = trunc i32 %143 to i8
  store i8 %144, ptr %21, align 1, !tbaa !11
  %145 = load i32, ptr %22, align 4, !tbaa !9
  %146 = add i32 %145, 1
  store i32 %146, ptr %22, align 4, !tbaa !9
  %147 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  %148 = load i32, ptr %22, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !11
  %152 = load ptr, ptr %17, align 8, !tbaa !5
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds i8, ptr %152, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !11
  %157 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %151, i8 noundef zeroext %156)
  store i8 %157, ptr %28, align 1, !tbaa !11
  %158 = load i8, ptr %28, align 1, !tbaa !11
  %159 = zext i8 %158 to i32
  %160 = load i8, ptr %21, align 1, !tbaa !11
  %161 = zext i8 %160 to i32
  %162 = and i32 %159, %161
  %163 = trunc i32 %162 to i8
  store i8 %163, ptr %21, align 1, !tbaa !11
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = add i32 %164, 1
  store i32 %165, ptr %22, align 4, !tbaa !9
  %166 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #6
  %167 = load i32, ptr %22, align 4, !tbaa !9
  %168 = zext i32 %167 to i64
  %169 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %168
  %170 = load i8, ptr %169, align 1, !tbaa !11
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds i8, ptr %171, i64 %173
  %175 = load i8, ptr %174, align 1, !tbaa !11
  %176 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %170, i8 noundef zeroext %175)
  store i8 %176, ptr %29, align 1, !tbaa !11
  %177 = load i8, ptr %29, align 1, !tbaa !11
  %178 = zext i8 %177 to i32
  %179 = load i8, ptr %21, align 1, !tbaa !11
  %180 = zext i8 %179 to i32
  %181 = and i32 %178, %180
  %182 = trunc i32 %181 to i8
  store i8 %182, ptr %21, align 1, !tbaa !11
  %183 = load i32, ptr %22, align 4, !tbaa !9
  %184 = add i32 %183, 1
  store i32 %184, ptr %22, align 4, !tbaa !9
  %185 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #6
  %186 = load i32, ptr %22, align 4, !tbaa !9
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %187
  %189 = load i8, ptr %188, align 1, !tbaa !11
  %190 = load ptr, ptr %17, align 8, !tbaa !5
  %191 = load i32, ptr %22, align 4, !tbaa !9
  %192 = zext i32 %191 to i64
  %193 = getelementptr inbounds i8, ptr %190, i64 %192
  %194 = load i8, ptr %193, align 1, !tbaa !11
  %195 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %189, i8 noundef zeroext %194)
  store i8 %195, ptr %30, align 1, !tbaa !11
  %196 = load i8, ptr %30, align 1, !tbaa !11
  %197 = zext i8 %196 to i32
  %198 = load i8, ptr %21, align 1, !tbaa !11
  %199 = zext i8 %198 to i32
  %200 = and i32 %197, %199
  %201 = trunc i32 %200 to i8
  store i8 %201, ptr %21, align 1, !tbaa !11
  %202 = load i32, ptr %22, align 4, !tbaa !9
  %203 = add i32 %202, 1
  store i32 %203, ptr %22, align 4, !tbaa !9
  %204 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #6
  %205 = load i32, ptr %22, align 4, !tbaa !9
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %206
  %208 = load i8, ptr %207, align 1, !tbaa !11
  %209 = load ptr, ptr %17, align 8, !tbaa !5
  %210 = load i32, ptr %22, align 4, !tbaa !9
  %211 = zext i32 %210 to i64
  %212 = getelementptr inbounds i8, ptr %209, i64 %211
  %213 = load i8, ptr %212, align 1, !tbaa !11
  %214 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %208, i8 noundef zeroext %213)
  store i8 %214, ptr %31, align 1, !tbaa !11
  %215 = load i8, ptr %31, align 1, !tbaa !11
  %216 = zext i8 %215 to i32
  %217 = load i8, ptr %21, align 1, !tbaa !11
  %218 = zext i8 %217 to i32
  %219 = and i32 %216, %218
  %220 = trunc i32 %219 to i8
  store i8 %220, ptr %21, align 1, !tbaa !11
  %221 = load i32, ptr %22, align 4, !tbaa !9
  %222 = add i32 %221, 1
  store i32 %222, ptr %22, align 4, !tbaa !9
  %223 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #6
  %224 = load i32, ptr %22, align 4, !tbaa !9
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %225
  %227 = load i8, ptr %226, align 1, !tbaa !11
  %228 = load ptr, ptr %17, align 8, !tbaa !5
  %229 = load i32, ptr %22, align 4, !tbaa !9
  %230 = zext i32 %229 to i64
  %231 = getelementptr inbounds i8, ptr %228, i64 %230
  %232 = load i8, ptr %231, align 1, !tbaa !11
  %233 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %227, i8 noundef zeroext %232)
  store i8 %233, ptr %32, align 1, !tbaa !11
  %234 = load i8, ptr %32, align 1, !tbaa !11
  %235 = zext i8 %234 to i32
  %236 = load i8, ptr %21, align 1, !tbaa !11
  %237 = zext i8 %236 to i32
  %238 = and i32 %235, %237
  %239 = trunc i32 %238 to i8
  store i8 %239, ptr %21, align 1, !tbaa !11
  %240 = load i32, ptr %22, align 4, !tbaa !9
  %241 = add i32 %240, 1
  store i32 %241, ptr %22, align 4, !tbaa !9
  %242 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #6
  %243 = load i32, ptr %22, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %244
  %246 = load i8, ptr %245, align 1, !tbaa !11
  %247 = load ptr, ptr %17, align 8, !tbaa !5
  %248 = load i32, ptr %22, align 4, !tbaa !9
  %249 = zext i32 %248 to i64
  %250 = getelementptr inbounds i8, ptr %247, i64 %249
  %251 = load i8, ptr %250, align 1, !tbaa !11
  %252 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %246, i8 noundef zeroext %251)
  store i8 %252, ptr %33, align 1, !tbaa !11
  %253 = load i8, ptr %33, align 1, !tbaa !11
  %254 = zext i8 %253 to i32
  %255 = load i8, ptr %21, align 1, !tbaa !11
  %256 = zext i8 %255 to i32
  %257 = and i32 %254, %256
  %258 = trunc i32 %257 to i8
  store i8 %258, ptr %21, align 1, !tbaa !11
  %259 = load i32, ptr %22, align 4, !tbaa !9
  %260 = add i32 %259, 1
  store i32 %260, ptr %22, align 4, !tbaa !9
  %261 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #6
  %262 = load i32, ptr %22, align 4, !tbaa !9
  %263 = zext i32 %262 to i64
  %264 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %263
  %265 = load i8, ptr %264, align 1, !tbaa !11
  %266 = load ptr, ptr %17, align 8, !tbaa !5
  %267 = load i32, ptr %22, align 4, !tbaa !9
  %268 = zext i32 %267 to i64
  %269 = getelementptr inbounds i8, ptr %266, i64 %268
  %270 = load i8, ptr %269, align 1, !tbaa !11
  %271 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %265, i8 noundef zeroext %270)
  store i8 %271, ptr %34, align 1, !tbaa !11
  %272 = load i8, ptr %34, align 1, !tbaa !11
  %273 = zext i8 %272 to i32
  %274 = load i8, ptr %21, align 1, !tbaa !11
  %275 = zext i8 %274 to i32
  %276 = and i32 %273, %275
  %277 = trunc i32 %276 to i8
  store i8 %277, ptr %21, align 1, !tbaa !11
  %278 = load i32, ptr %22, align 4, !tbaa !9
  %279 = add i32 %278, 1
  store i32 %279, ptr %22, align 4, !tbaa !9
  %280 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #6
  %281 = load i32, ptr %22, align 4, !tbaa !9
  %282 = zext i32 %281 to i64
  %283 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %282
  %284 = load i8, ptr %283, align 1, !tbaa !11
  %285 = load ptr, ptr %17, align 8, !tbaa !5
  %286 = load i32, ptr %22, align 4, !tbaa !9
  %287 = zext i32 %286 to i64
  %288 = getelementptr inbounds i8, ptr %285, i64 %287
  %289 = load i8, ptr %288, align 1, !tbaa !11
  %290 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %284, i8 noundef zeroext %289)
  store i8 %290, ptr %35, align 1, !tbaa !11
  %291 = load i8, ptr %35, align 1, !tbaa !11
  %292 = zext i8 %291 to i32
  %293 = load i8, ptr %21, align 1, !tbaa !11
  %294 = zext i8 %293 to i32
  %295 = and i32 %292, %294
  %296 = trunc i32 %295 to i8
  store i8 %296, ptr %21, align 1, !tbaa !11
  %297 = load i32, ptr %22, align 4, !tbaa !9
  %298 = add i32 %297, 1
  store i32 %298, ptr %22, align 4, !tbaa !9
  %299 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #6
  %300 = load i32, ptr %22, align 4, !tbaa !9
  %301 = zext i32 %300 to i64
  %302 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %301
  %303 = load i8, ptr %302, align 1, !tbaa !11
  %304 = load ptr, ptr %17, align 8, !tbaa !5
  %305 = load i32, ptr %22, align 4, !tbaa !9
  %306 = zext i32 %305 to i64
  %307 = getelementptr inbounds i8, ptr %304, i64 %306
  %308 = load i8, ptr %307, align 1, !tbaa !11
  %309 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %303, i8 noundef zeroext %308)
  store i8 %309, ptr %36, align 1, !tbaa !11
  %310 = load i8, ptr %36, align 1, !tbaa !11
  %311 = zext i8 %310 to i32
  %312 = load i8, ptr %21, align 1, !tbaa !11
  %313 = zext i8 %312 to i32
  %314 = and i32 %311, %313
  %315 = trunc i32 %314 to i8
  store i8 %315, ptr %21, align 1, !tbaa !11
  %316 = load i32, ptr %22, align 4, !tbaa !9
  %317 = add i32 %316, 1
  store i32 %317, ptr %22, align 4, !tbaa !9
  %318 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #6
  %319 = load i32, ptr %22, align 4, !tbaa !9
  %320 = zext i32 %319 to i64
  %321 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %320
  %322 = load i8, ptr %321, align 1, !tbaa !11
  %323 = load ptr, ptr %17, align 8, !tbaa !5
  %324 = load i32, ptr %22, align 4, !tbaa !9
  %325 = zext i32 %324 to i64
  %326 = getelementptr inbounds i8, ptr %323, i64 %325
  %327 = load i8, ptr %326, align 1, !tbaa !11
  %328 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %322, i8 noundef zeroext %327)
  store i8 %328, ptr %37, align 1, !tbaa !11
  %329 = load i8, ptr %37, align 1, !tbaa !11
  %330 = zext i8 %329 to i32
  %331 = load i8, ptr %21, align 1, !tbaa !11
  %332 = zext i8 %331 to i32
  %333 = and i32 %330, %332
  %334 = trunc i32 %333 to i8
  store i8 %334, ptr %21, align 1, !tbaa !11
  %335 = load i32, ptr %22, align 4, !tbaa !9
  %336 = add i32 %335, 1
  store i32 %336, ptr %22, align 4, !tbaa !9
  %337 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #6
  %338 = load i32, ptr %22, align 4, !tbaa !9
  %339 = zext i32 %338 to i64
  %340 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 %339
  %341 = load i8, ptr %340, align 1, !tbaa !11
  %342 = load ptr, ptr %17, align 8, !tbaa !5
  %343 = load i32, ptr %22, align 4, !tbaa !9
  %344 = zext i32 %343 to i64
  %345 = getelementptr inbounds i8, ptr %342, i64 %344
  %346 = load i8, ptr %345, align 1, !tbaa !11
  %347 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %341, i8 noundef zeroext %346)
  store i8 %347, ptr %38, align 1, !tbaa !11
  %348 = load i8, ptr %38, align 1, !tbaa !11
  %349 = zext i8 %348 to i32
  %350 = load i8, ptr %21, align 1, !tbaa !11
  %351 = zext i8 %350 to i32
  %352 = and i32 %349, %351
  %353 = trunc i32 %352 to i8
  store i8 %353, ptr %21, align 1, !tbaa !11
  %354 = load i32, ptr %22, align 4, !tbaa !9
  %355 = add i32 %354, 1
  store i32 %355, ptr %22, align 4, !tbaa !9
  %356 = load i32, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %357

357:                                              ; preds = %52
  br label %358

358:                                              ; preds = %357
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #6
  %359 = load i8, ptr %21, align 1, !tbaa !11
  store i8 %359, ptr %39, align 1, !tbaa !11
  %360 = load i8, ptr %39, align 1, !tbaa !11
  %361 = zext i8 %360 to i32
  %362 = icmp eq i32 %361, 255
  br i1 %362, label %363, label %369

363:                                              ; preds = %358
  %364 = load i32, ptr %12, align 4, !tbaa !9
  %365 = load ptr, ptr %10, align 8, !tbaa !5
  %366 = load ptr, ptr %11, align 8, !tbaa !5
  %367 = load ptr, ptr %15, align 8, !tbaa !5
  %368 = load ptr, ptr %16, align 8, !tbaa !5
  call void @Hacl_Chacha20_chacha20_encrypt(i32 noundef %364, ptr noundef %365, ptr noundef %366, ptr noundef %367, ptr noundef %368, i32 noundef 1)
  store i32 0, ptr %9, align 4
  store i32 1, ptr %40, align 4
  br label %370

369:                                              ; preds = %358
  store i32 1, ptr %9, align 4
  store i32 1, ptr %40, align 4
  br label %370

370:                                              ; preds = %369, %363
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  %371 = load i32, ptr %9, align 4
  ret i32 %371
}

; Function Attrs: noinline nounwind uwtable
declare hidden zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext, i8 noundef zeroext) #5

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


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

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

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

; 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
define dso_local range(i32 0, 2) i32 @Hacl_AEAD_Chacha20Poly1305_decrypt(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr nocapture noundef readonly %7) local_unnamed_addr #4 {
  %9 = alloca [16 x i8], align 16
  %10 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @Hacl_Chacha20_chacha20_encrypt(i32 noundef 64, ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef %5, ptr noundef %6, i32 noundef 0) #6
  call void @poly1305_do_32(ptr noundef nonnull %10, i32 noundef %4, ptr noundef %3, i32 noundef %2, ptr noundef %1, ptr noundef nonnull %9)
  %11 = load i8, ptr %9, align 16, !tbaa !5
  %12 = load i8, ptr %7, align 1, !tbaa !5
  %13 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %11, i8 noundef zeroext %12)
  %14 = getelementptr inbounds i8, ptr %9, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %7, i64 1
  %17 = load i8, ptr %16, align 1, !tbaa !5
  %18 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %15, i8 noundef zeroext %17)
  %19 = and i8 %18, %13
  %20 = getelementptr inbounds i8, ptr %9, i64 2
  %21 = load i8, ptr %20, align 2, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %7, i64 2
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %24 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %21, i8 noundef zeroext %23)
  %25 = and i8 %19, %24
  %26 = getelementptr inbounds i8, ptr %9, i64 3
  %27 = load i8, ptr %26, align 1, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %7, i64 3
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %27, i8 noundef zeroext %29)
  %31 = and i8 %25, %30
  %32 = getelementptr inbounds i8, ptr %9, i64 4
  %33 = load i8, ptr %32, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %7, i64 4
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %33, i8 noundef zeroext %35)
  %37 = and i8 %31, %36
  %38 = getelementptr inbounds i8, ptr %9, i64 5
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %7, i64 5
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %42 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %39, i8 noundef zeroext %41)
  %43 = and i8 %37, %42
  %44 = getelementptr inbounds i8, ptr %9, i64 6
  %45 = load i8, ptr %44, align 2, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %7, i64 6
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %45, i8 noundef zeroext %47)
  %49 = and i8 %43, %48
  %50 = getelementptr inbounds i8, ptr %9, i64 7
  %51 = load i8, ptr %50, align 1, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %7, i64 7
  %53 = load i8, ptr %52, align 1, !tbaa !5
  %54 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %51, i8 noundef zeroext %53)
  %55 = and i8 %49, %54
  %56 = getelementptr inbounds i8, ptr %9, i64 8
  %57 = load i8, ptr %56, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %7, i64 8
  %59 = load i8, ptr %58, align 1, !tbaa !5
  %60 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %57, i8 noundef zeroext %59)
  %61 = and i8 %55, %60
  %62 = getelementptr inbounds i8, ptr %9, i64 9
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %7, i64 9
  %65 = load i8, ptr %64, align 1, !tbaa !5
  %66 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %63, i8 noundef zeroext %65)
  %67 = and i8 %61, %66
  %68 = getelementptr inbounds i8, ptr %9, i64 10
  %69 = load i8, ptr %68, align 2, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %7, i64 10
  %71 = load i8, ptr %70, align 1, !tbaa !5
  %72 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %69, i8 noundef zeroext %71)
  %73 = and i8 %67, %72
  %74 = getelementptr inbounds i8, ptr %9, i64 11
  %75 = load i8, ptr %74, align 1, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %7, i64 11
  %77 = load i8, ptr %76, align 1, !tbaa !5
  %78 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %75, i8 noundef zeroext %77)
  %79 = and i8 %73, %78
  %80 = getelementptr inbounds i8, ptr %9, i64 12
  %81 = load i8, ptr %80, align 4, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %7, i64 12
  %83 = load i8, ptr %82, align 1, !tbaa !5
  %84 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %81, i8 noundef zeroext %83)
  %85 = and i8 %79, %84
  %86 = getelementptr inbounds i8, ptr %9, i64 13
  %87 = load i8, ptr %86, align 1, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %7, i64 13
  %89 = load i8, ptr %88, align 1, !tbaa !5
  %90 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %87, i8 noundef zeroext %89)
  %91 = and i8 %85, %90
  %92 = getelementptr inbounds i8, ptr %9, i64 14
  %93 = load i8, ptr %92, align 2, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %7, i64 14
  %95 = load i8, ptr %94, align 1, !tbaa !5
  %96 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %93, i8 noundef zeroext %95)
  %97 = and i8 %91, %96
  %98 = getelementptr inbounds i8, ptr %9, i64 15
  %99 = load i8, ptr %98, align 1, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %7, i64 15
  %101 = load i8, ptr %100, align 1, !tbaa !5
  %102 = call zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext %99, i8 noundef zeroext %101)
  %103 = and i8 %97, %102
  %104 = icmp eq i8 %103, -1
  br i1 %104, label %105, label %106

105:                                              ; preds = %8
  call void @Hacl_Chacha20_chacha20_encrypt(i32 noundef %2, ptr noundef %0, ptr noundef %1, ptr noundef %5, ptr noundef %6, i32 noundef 1) #6
  br label %106

106:                                              ; preds = %8, %105
  %.0 = phi i32 [ 0, %105 ], [ 1, %8 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  ret i32 %.0
}

; Function Attrs: noinline nounwind uwtable
declare hidden zeroext i8 @FStar_UInt8_eq_mask(i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #5

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 = { noinline 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 #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}


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