; LLVM IR from rweather/lightweight-crypto :: src/combined (lotus-locus)

; 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.gift64n_key_schedule_t = type { [4 x i32], [8 x i32] }

; Function Attrs: nounwind uwtable
define dso_local i32 @locus_aead_encrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %struct.gift64n_key_schedule_t, align 4
  %20 = alloca [16 x i8], align 16
  %21 = alloca [8 x i8], align 1
  %22 = alloca [8 x i8], align 1
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca i32, align 4
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca ptr, align 8
  %47 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store i64 %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store i64 %5, ptr %15, align 8, !tbaa !9
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  %49 = load i64, ptr %13, align 8, !tbaa !9
  %50 = add i64 %49, 8
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 %50, ptr %51, align 8, !tbaa !9
  %52 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  %53 = load ptr, ptr %18, align 8, !tbaa !5
  %54 = load ptr, ptr %17, align 8, !tbaa !5
  %55 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  call void @lotus_or_locus_init(ptr noundef %19, ptr noundef %52, ptr noundef %53, ptr noundef %54, ptr noundef %55)
  %56 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %56, i8 0, i64 16, i1 false)
  %57 = load i64, ptr %15, align 8, !tbaa !9
  %58 = icmp ugt i64 %57, 0
  br i1 %58, label %59, label %65

59:                                               ; preds = %9
  %60 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  %61 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = load i64, ptr %15, align 8, !tbaa !9
  call void @lotus_or_locus_process_ad(ptr noundef %19, ptr noundef %60, ptr noundef %62, ptr noundef %63, i64 noundef %64)
  br label %65

65:                                               ; preds = %59, %9
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = icmp ugt i64 %66, 0
  br i1 %67, label %68, label %270

68:                                               ; preds = %65
  br label %69

69:                                               ; preds = %148, %68
  %70 = load i64, ptr %13, align 8, !tbaa !9
  %71 = icmp ugt i64 %70, 8
  br i1 %71, label %72, label %155

72:                                               ; preds = %69
  call void @lotus_or_locus_mul_2(ptr noundef %19)
  br label %73

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %74 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  store ptr %74, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %75, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %76 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  store ptr %76, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 8, ptr %27, align 4, !tbaa !11
  br label %77

77:                                               ; preds = %80, %73
  %78 = load i32, ptr %27, align 4, !tbaa !11
  %79 = icmp ugt i32 %78, 0
  br i1 %79, label %80, label %95

80:                                               ; preds = %77
  %81 = load ptr, ptr %25, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i32 1
  store ptr %82, ptr %25, align 8, !tbaa !5
  %83 = load i8, ptr %81, align 1, !tbaa !13
  %84 = zext i8 %83 to i32
  %85 = load ptr, ptr %26, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i32 1
  store ptr %86, ptr %26, align 8, !tbaa !5
  %87 = load i8, ptr %85, align 1, !tbaa !13
  %88 = zext i8 %87 to i32
  %89 = xor i32 %84, %88
  %90 = trunc i32 %89 to i8
  %91 = load ptr, ptr %24, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i32 1
  store ptr %92, ptr %24, align 8, !tbaa !5
  store i8 %90, ptr %91, align 1, !tbaa !13
  %93 = load i32, ptr %27, align 4, !tbaa !11
  %94 = add i32 %93, -1
  store i32 %94, ptr %27, align 4, !tbaa !11
  br label %77, !llvm.loop !14

95:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  %98 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  %99 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  call void @gift64t_encrypt(ptr noundef %19, ptr noundef %98, ptr noundef %99, i16 noundef zeroext -19276)
  br label %100

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %101 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  store ptr %101, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %102 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  store ptr %102, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 8, ptr %30, align 4, !tbaa !11
  br label %103

103:                                              ; preds = %106, %100
  %104 = load i32, ptr %30, align 4, !tbaa !11
  %105 = icmp ugt i32 %104, 0
  br i1 %105, label %106, label %119

106:                                              ; preds = %103
  %107 = load ptr, ptr %29, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i32 1
  store ptr %108, ptr %29, align 8, !tbaa !5
  %109 = load i8, ptr %107, align 1, !tbaa !13
  %110 = zext i8 %109 to i32
  %111 = load ptr, ptr %28, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i32 1
  store ptr %112, ptr %28, align 8, !tbaa !5
  %113 = load i8, ptr %111, align 1, !tbaa !13
  %114 = zext i8 %113 to i32
  %115 = xor i32 %114, %110
  %116 = trunc i32 %115 to i8
  store i8 %116, ptr %111, align 1, !tbaa !13
  %117 = load i32, ptr %30, align 4, !tbaa !11
  %118 = add i32 %117, -1
  store i32 %118, ptr %30, align 4, !tbaa !11
  br label %103, !llvm.loop !16

119:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  %123 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  call void @gift64t_encrypt(ptr noundef %19, ptr noundef %122, ptr noundef %123, i16 noundef zeroext -19276)
  br label %124

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %125, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %126 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  store ptr %126, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %127 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  store ptr %127, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  store i32 8, ptr %34, align 4, !tbaa !11
  br label %128

128:                                              ; preds = %131, %124
  %129 = load i32, ptr %34, align 4, !tbaa !11
  %130 = icmp ugt i32 %129, 0
  br i1 %130, label %131, label %146

131:                                              ; preds = %128
  %132 = load ptr, ptr %32, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i32 1
  store ptr %133, ptr %32, align 8, !tbaa !5
  %134 = load i8, ptr %132, align 1, !tbaa !13
  %135 = zext i8 %134 to i32
  %136 = load ptr, ptr %33, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i32 1
  store ptr %137, ptr %33, align 8, !tbaa !5
  %138 = load i8, ptr %136, align 1, !tbaa !13
  %139 = zext i8 %138 to i32
  %140 = xor i32 %135, %139
  %141 = trunc i32 %140 to i8
  %142 = load ptr, ptr %31, align 8, !tbaa !5
  %143 = getelementptr inbounds i8, ptr %142, i32 1
  store ptr %143, ptr %31, align 8, !tbaa !5
  store i8 %141, ptr %142, align 1, !tbaa !13
  %144 = load i32, ptr %34, align 4, !tbaa !11
  %145 = add i32 %144, -1
  store i32 %145, ptr %34, align 4, !tbaa !11
  br label %128, !llvm.loop !17

146:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds i8, ptr %149, i64 8
  store ptr %150, ptr %10, align 8, !tbaa !5
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = getelementptr inbounds i8, ptr %151, i64 8
  store ptr %152, ptr %12, align 8, !tbaa !5
  %153 = load i64, ptr %13, align 8, !tbaa !9
  %154 = sub i64 %153, 8
  store i64 %154, ptr %13, align 8, !tbaa !9
  br label %69, !llvm.loop !18

155:                                              ; preds = %69
  %156 = load i64, ptr %13, align 8, !tbaa !9
  %157 = trunc i64 %156 to i32
  store i32 %157, ptr %23, align 4, !tbaa !11
  call void @lotus_or_locus_mul_2(ptr noundef %19)
  %158 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  %159 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %158, ptr align 1 %159, i64 8, i1 false)
  %160 = load i32, ptr %23, align 4, !tbaa !11
  %161 = trunc i32 %160 to i8
  %162 = zext i8 %161 to i32
  %163 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  %164 = load i8, ptr %163, align 1, !tbaa !13
  %165 = zext i8 %164 to i32
  %166 = xor i32 %165, %162
  %167 = trunc i32 %166 to i8
  store i8 %167, ptr %163, align 1, !tbaa !13
  %168 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  %169 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  call void @gift64t_encrypt(ptr noundef %19, ptr noundef %168, ptr noundef %169, i16 noundef zeroext 21845)
  br label %170

170:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %171 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  store ptr %171, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %172 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  store ptr %172, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 8, ptr %37, align 4, !tbaa !11
  br label %173

173:                                              ; preds = %176, %170
  %174 = load i32, ptr %37, align 4, !tbaa !11
  %175 = icmp ugt i32 %174, 0
  br i1 %175, label %176, label %189

176:                                              ; preds = %173
  %177 = load ptr, ptr %36, align 8, !tbaa !5
  %178 = getelementptr inbounds i8, ptr %177, i32 1
  store ptr %178, ptr %36, align 8, !tbaa !5
  %179 = load i8, ptr %177, align 1, !tbaa !13
  %180 = zext i8 %179 to i32
  %181 = load ptr, ptr %35, align 8, !tbaa !5
  %182 = getelementptr inbounds i8, ptr %181, i32 1
  store ptr %182, ptr %35, align 8, !tbaa !5
  %183 = load i8, ptr %181, align 1, !tbaa !13
  %184 = zext i8 %183 to i32
  %185 = xor i32 %184, %180
  %186 = trunc i32 %185 to i8
  store i8 %186, ptr %181, align 1, !tbaa !13
  %187 = load i32, ptr %37, align 4, !tbaa !11
  %188 = add i32 %187, -1
  store i32 %188, ptr %37, align 4, !tbaa !11
  br label %173, !llvm.loop !19

189:                                              ; preds = %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %190

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190
  br label %192

192:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %193 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  store ptr %193, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %194, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  %195 = load i32, ptr %23, align 4, !tbaa !11
  store i32 %195, ptr %40, align 4, !tbaa !11
  br label %196

196:                                              ; preds = %199, %192
  %197 = load i32, ptr %40, align 4, !tbaa !11
  %198 = icmp ugt i32 %197, 0
  br i1 %198, label %199, label %212

199:                                              ; preds = %196
  %200 = load ptr, ptr %39, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i32 1
  store ptr %201, ptr %39, align 8, !tbaa !5
  %202 = load i8, ptr %200, align 1, !tbaa !13
  %203 = zext i8 %202 to i32
  %204 = load ptr, ptr %38, align 8, !tbaa !5
  %205 = getelementptr inbounds i8, ptr %204, i32 1
  store ptr %205, ptr %38, align 8, !tbaa !5
  %206 = load i8, ptr %204, align 1, !tbaa !13
  %207 = zext i8 %206 to i32
  %208 = xor i32 %207, %203
  %209 = trunc i32 %208 to i8
  store i8 %209, ptr %204, align 1, !tbaa !13
  %210 = load i32, ptr %40, align 4, !tbaa !11
  %211 = add i32 %210, -1
  store i32 %211, ptr %40, align 4, !tbaa !11
  br label %196, !llvm.loop !20

212:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  br label %213

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213
  %215 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  %216 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  call void @gift64t_encrypt(ptr noundef %19, ptr noundef %215, ptr noundef %216, i16 noundef zeroext 21845)
  br label %217

217:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %218 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  store ptr %218, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  %219 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  store ptr %219, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #6
  %220 = load i32, ptr %23, align 4, !tbaa !11
  store i32 %220, ptr %43, align 4, !tbaa !11
  br label %221

221:                                              ; preds = %224, %217
  %222 = load i32, ptr %43, align 4, !tbaa !11
  %223 = icmp ugt i32 %222, 0
  br i1 %223, label %224, label %237

224:                                              ; preds = %221
  %225 = load ptr, ptr %42, align 8, !tbaa !5
  %226 = getelementptr inbounds i8, ptr %225, i32 1
  store ptr %226, ptr %42, align 8, !tbaa !5
  %227 = load i8, ptr %225, align 1, !tbaa !13
  %228 = zext i8 %227 to i32
  %229 = load ptr, ptr %41, align 8, !tbaa !5
  %230 = getelementptr inbounds i8, ptr %229, i32 1
  store ptr %230, ptr %41, align 8, !tbaa !5
  %231 = load i8, ptr %229, align 1, !tbaa !13
  %232 = zext i8 %231 to i32
  %233 = xor i32 %232, %228
  %234 = trunc i32 %233 to i8
  store i8 %234, ptr %229, align 1, !tbaa !13
  %235 = load i32, ptr %43, align 4, !tbaa !11
  %236 = add i32 %235, -1
  store i32 %236, ptr %43, align 4, !tbaa !11
  br label %221, !llvm.loop !21

237:                                              ; preds = %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %238

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238
  br label %240

240:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %241, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  %242 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %242, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  %243 = getelementptr inbounds [8 x i8], ptr %22, i64 0, i64 0
  store ptr %243, ptr %46, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #6
  %244 = load i32, ptr %23, align 4, !tbaa !11
  store i32 %244, ptr %47, align 4, !tbaa !11
  br label %245

245:                                              ; preds = %248, %240
  %246 = load i32, ptr %47, align 4, !tbaa !11
  %247 = icmp ugt i32 %246, 0
  br i1 %247, label %248, label %263

248:                                              ; preds = %245
  %249 = load ptr, ptr %45, align 8, !tbaa !5
  %250 = getelementptr inbounds i8, ptr %249, i32 1
  store ptr %250, ptr %45, align 8, !tbaa !5
  %251 = load i8, ptr %249, align 1, !tbaa !13
  %252 = zext i8 %251 to i32
  %253 = load ptr, ptr %46, align 8, !tbaa !5
  %254 = getelementptr inbounds i8, ptr %253, i32 1
  store ptr %254, ptr %46, align 8, !tbaa !5
  %255 = load i8, ptr %253, align 1, !tbaa !13
  %256 = zext i8 %255 to i32
  %257 = xor i32 %252, %256
  %258 = trunc i32 %257 to i8
  %259 = load ptr, ptr %44, align 8, !tbaa !5
  %260 = getelementptr inbounds i8, ptr %259, i32 1
  store ptr %260, ptr %44, align 8, !tbaa !5
  store i8 %258, ptr %259, align 1, !tbaa !13
  %261 = load i32, ptr %47, align 4, !tbaa !11
  %262 = add i32 %261, -1
  store i32 %262, ptr %47, align 4, !tbaa !11
  br label %245, !llvm.loop !22

263:                                              ; preds = %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %23, align 4, !tbaa !11
  %267 = load ptr, ptr %10, align 8, !tbaa !5
  %268 = zext i32 %266 to i64
  %269 = getelementptr inbounds i8, ptr %267, i64 %268
  store ptr %269, ptr %10, align 8, !tbaa !5
  br label %270

270:                                              ; preds = %265, %65
  %271 = load ptr, ptr %10, align 8, !tbaa !5
  %272 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 0
  %273 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  %274 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  %275 = getelementptr inbounds i8, ptr %274, i64 8
  call void @lotus_or_locus_gen_tag(ptr noundef %19, ptr noundef %271, ptr noundef %272, ptr noundef %273, ptr noundef %275)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #6
  ret i32 0
}

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

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

; 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: nounwind uwtable
declare hidden void @lotus_or_locus_process_ad(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #0

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

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

declare void @gift64t_encrypt(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext) #4

; 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) #5

; Function Attrs: nounwind uwtable
declare hidden void @lotus_or_locus_gen_tag(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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 = { 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


; 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.gift64n_key_schedule_t = type { [4 x i32], [8 x i32] }

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @locus_aead_encrypt(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef readonly %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr nocapture noundef readnone %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = alloca %struct.gift64n_key_schedule_t, align 4
  %11 = alloca [16 x i8], align 16
  %12 = alloca [8 x i8], align 8
  %13 = alloca [8 x i8], align 8
  %14 = ptrtoint ptr %13 to i64
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %15 = add i64 %3, 8
  store i64 %15, ptr %1, align 8, !tbaa !5
  call void @lotus_or_locus_init(ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef %8, ptr noundef %7, ptr noundef nonnull %11)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %11, i8 0, i64 16, i1 false)
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %18, label %16

16:                                               ; preds = %9
  %17 = getelementptr inbounds i8, ptr %11, i64 8
  call void @lotus_or_locus_process_ad(ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef nonnull %17, ptr noundef %4, i64 noundef %5)
  br label %18

18:                                               ; preds = %16, %9
  %.not84 = icmp eq i64 %3, 0
  br i1 %.not84, label %146, label %.preheader93

.preheader93:                                     ; preds = %18
  %19 = icmp ugt i64 %3, 8
  br i1 %19, label %.lr.ph, label %iter.check

.lr.ph:                                           ; preds = %.preheader93, %.lr.ph
  %.079107 = phi ptr [ %29, %.lr.ph ], [ %0, %.preheader93 ]
  %.080106 = phi ptr [ %30, %.lr.ph ], [ %2, %.preheader93 ]
  %.081105 = phi i64 [ %31, %.lr.ph ], [ %3, %.preheader93 ]
  call void @lotus_or_locus_mul_2(ptr noundef nonnull %10)
  %20 = load <8 x i8>, ptr %.080106, align 1, !tbaa !9
  %21 = load <8 x i8>, ptr %12, align 8, !tbaa !9
  %22 = xor <8 x i8> %21, %20
  store <8 x i8> %22, ptr %13, align 8, !tbaa !9
  call void @gift64t_encrypt(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %13, i16 noundef zeroext -19276) #5
  %23 = load <8 x i8>, ptr %13, align 8, !tbaa !9
  %24 = load <8 x i8>, ptr %11, align 16, !tbaa !9
  %25 = xor <8 x i8> %24, %23
  store <8 x i8> %25, ptr %11, align 16, !tbaa !9
  call void @gift64t_encrypt(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %13, i16 noundef zeroext -19276) #5
  %26 = load <8 x i8>, ptr %13, align 8, !tbaa !9
  %27 = load <8 x i8>, ptr %12, align 8, !tbaa !9
  %28 = xor <8 x i8> %27, %26
  store <8 x i8> %28, ptr %.079107, align 1, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %.079107, i64 8
  %30 = getelementptr inbounds i8, ptr %.080106, i64 8
  %31 = add i64 %.081105, -8
  %32 = icmp ugt i64 %31, 8
  br i1 %32, label %.lr.ph, label %iter.check, !llvm.loop !10

iter.check:                                       ; preds = %.lr.ph, %.preheader93
  %.081.lcssa = phi i64 [ %3, %.preheader93 ], [ %31, %.lr.ph ]
  %.080.lcssa = phi ptr [ %2, %.preheader93 ], [ %30, %.lr.ph ]
  %.079.lcssa = phi ptr [ %0, %.preheader93 ], [ %29, %.lr.ph ]
  %.079.lcssa213 = ptrtoint ptr %.079.lcssa to i64
  %.080.lcssa214 = ptrtoint ptr %.080.lcssa to i64
  call void @lotus_or_locus_mul_2(ptr noundef nonnull %10)
  %33 = load i64, ptr %12, align 8
  store i64 %33, ptr %13, align 8
  %34 = xor i64 %33, %.081.lcssa
  %35 = trunc i64 %34 to i8
  store i8 %35, ptr %13, align 8, !tbaa !9
  call void @gift64t_encrypt(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %13, i16 noundef zeroext 21845) #5
  %36 = load <8 x i8>, ptr %13, align 8, !tbaa !9
  %37 = load <8 x i8>, ptr %11, align 16, !tbaa !9
  %38 = xor <8 x i8> %37, %36
  store <8 x i8> %38, ptr %11, align 16, !tbaa !9
  %39 = trunc nuw i64 %.081.lcssa to i32
  %40 = add nuw nsw i64 %.081.lcssa, 4294967295
  %41 = and i64 %40, 4294967295
  %42 = add nuw nsw i64 %41, 1
  %min.iters.check = icmp ult i64 %41, 7
  br i1 %min.iters.check, label %.lr.ph117.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %43 = add nuw nsw i64 %.081.lcssa, 4294967295
  %44 = and i64 %43, 4294967295
  %45 = add nuw nsw i64 %44, 1
  %scevgep = getelementptr i8, ptr %11, i64 %45
  %scevgep138 = getelementptr i8, ptr %.080.lcssa, i64 %45
  %bound0 = icmp ult ptr %11, %scevgep138
  %bound1 = icmp ult ptr %.080.lcssa, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph117.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check139 = icmp ult i64 %41, 31
  br i1 %min.iters.check139, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %42, 8589934560
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %next.gep = getelementptr i8, ptr %.080.lcssa, i64 %index
  %next.gep141 = getelementptr i8, ptr %11, i64 %index
  %46 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load = load <16 x i8>, ptr %next.gep, align 1, !tbaa !9, !alias.scope !12
  %wide.load143 = load <16 x i8>, ptr %46, align 1, !tbaa !9, !alias.scope !12
  %47 = getelementptr i8, ptr %next.gep141, i64 16
  %wide.load144 = load <16 x i8>, ptr %next.gep141, align 16, !tbaa !9, !alias.scope !15, !noalias !12
  %wide.load145 = load <16 x i8>, ptr %47, align 16, !tbaa !9, !alias.scope !15, !noalias !12
  %48 = xor <16 x i8> %wide.load144, %wide.load
  %49 = xor <16 x i8> %wide.load145, %wide.load143
  store <16 x i8> %48, ptr %next.gep141, align 16, !tbaa !9, !alias.scope !15, !noalias !12
  store <16 x i8> %49, ptr %47, align 16, !tbaa !9, !alias.scope !15, !noalias !12
  %index.next = add nuw i64 %index, 32
  %50 = icmp eq i64 %index.next, %n.vec
  br i1 %50, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %42, %n.vec
  br i1 %cmp.n, label %iter.check166, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end154 = getelementptr i8, ptr %11, i64 %n.vec
  %ind.end151 = getelementptr i8, ptr %.080.lcssa, i64 %n.vec
  %.cast148 = trunc i64 %n.vec to i32
  %ind.end149 = sub i32 %39, %.cast148
  %n.vec.remaining = and i64 %42, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph117.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec147 = and i64 %42, 8589934584
  %.cast = trunc i64 %n.vec147 to i32
  %ind.end = sub i32 %39, %.cast
  %ind.end150 = getelementptr i8, ptr %.080.lcssa, i64 %n.vec147
  %ind.end153 = getelementptr i8, ptr %11, i64 %n.vec147
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index156 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next161, %vec.epilog.vector.body ]
  %next.gep157 = getelementptr i8, ptr %.080.lcssa, i64 %index156
  %next.gep158 = getelementptr i8, ptr %11, i64 %index156
  %wide.load159 = load <8 x i8>, ptr %next.gep157, align 1, !tbaa !9, !alias.scope !20
  %wide.load160 = load <8 x i8>, ptr %next.gep158, align 8, !tbaa !9, !alias.scope !23, !noalias !20
  %51 = xor <8 x i8> %wide.load160, %wide.load159
  store <8 x i8> %51, ptr %next.gep158, align 8, !tbaa !9, !alias.scope !23, !noalias !20
  %index.next161 = add nuw i64 %index156, 8
  %52 = icmp eq i64 %index.next161, %n.vec147
  br i1 %52, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !25

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n162 = icmp eq i64 %42, %n.vec147
  br i1 %cmp.n162, label %iter.check166, label %.lr.ph117.preheader

.lr.ph117.preheader:                              ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %.062116.ph = phi i32 [ %39, %iter.check ], [ %39, %vector.memcheck ], [ %ind.end149, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  %.063115.ph = phi ptr [ %.080.lcssa, %iter.check ], [ %.080.lcssa, %vector.memcheck ], [ %ind.end151, %vec.epilog.iter.check ], [ %ind.end150, %vec.epilog.middle.block ]
  %.064114.ph = phi ptr [ %11, %iter.check ], [ %11, %vector.memcheck ], [ %ind.end154, %vec.epilog.iter.check ], [ %ind.end153, %vec.epilog.middle.block ]
  %53 = add nsw i32 %.062116.ph, -1
  %xtraiter = and i32 %.062116.ph, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph117.prol.loopexit, label %.lr.ph117.prol

.lr.ph117.prol:                                   ; preds = %.lr.ph117.preheader, %.lr.ph117.prol
  %.062116.prol = phi i32 [ %59, %.lr.ph117.prol ], [ %.062116.ph, %.lr.ph117.preheader ]
  %.063115.prol = phi ptr [ %54, %.lr.ph117.prol ], [ %.063115.ph, %.lr.ph117.preheader ]
  %.064114.prol = phi ptr [ %56, %.lr.ph117.prol ], [ %.064114.ph, %.lr.ph117.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph117.prol ], [ 0, %.lr.ph117.preheader ]
  %54 = getelementptr inbounds i8, ptr %.063115.prol, i64 1
  %55 = load i8, ptr %.063115.prol, align 1, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %.064114.prol, i64 1
  %57 = load i8, ptr %.064114.prol, align 1, !tbaa !9
  %58 = xor i8 %57, %55
  store i8 %58, ptr %.064114.prol, align 1, !tbaa !9
  %59 = add nsw i32 %.062116.prol, -1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph117.prol.loopexit, label %.lr.ph117.prol, !llvm.loop !26

.lr.ph117.prol.loopexit:                          ; preds = %.lr.ph117.prol, %.lr.ph117.preheader
  %.062116.unr = phi i32 [ %.062116.ph, %.lr.ph117.preheader ], [ %59, %.lr.ph117.prol ]
  %.063115.unr = phi ptr [ %.063115.ph, %.lr.ph117.preheader ], [ %54, %.lr.ph117.prol ]
  %.064114.unr = phi ptr [ %.064114.ph, %.lr.ph117.preheader ], [ %56, %.lr.ph117.prol ]
  %60 = icmp ult i32 %53, 3
  br i1 %60, label %iter.check166, label %.lr.ph117

.lr.ph117:                                        ; preds = %.lr.ph117.prol.loopexit, %.lr.ph117
  %.062116 = phi i32 [ %81, %.lr.ph117 ], [ %.062116.unr, %.lr.ph117.prol.loopexit ]
  %.063115 = phi ptr [ %76, %.lr.ph117 ], [ %.063115.unr, %.lr.ph117.prol.loopexit ]
  %.064114 = phi ptr [ %78, %.lr.ph117 ], [ %.064114.unr, %.lr.ph117.prol.loopexit ]
  %61 = getelementptr inbounds i8, ptr %.063115, i64 1
  %62 = load i8, ptr %.063115, align 1, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %.064114, i64 1
  %64 = load i8, ptr %.064114, align 1, !tbaa !9
  %65 = xor i8 %64, %62
  store i8 %65, ptr %.064114, align 1, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %.063115, i64 2
  %67 = load i8, ptr %61, align 1, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %.064114, i64 2
  %69 = load i8, ptr %63, align 1, !tbaa !9
  %70 = xor i8 %69, %67
  store i8 %70, ptr %63, align 1, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %.063115, i64 3
  %72 = load i8, ptr %66, align 1, !tbaa !9
  %73 = getelementptr inbounds i8, ptr %.064114, i64 3
  %74 = load i8, ptr %68, align 1, !tbaa !9
  %75 = xor i8 %74, %72
  store i8 %75, ptr %68, align 1, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %.063115, i64 4
  %77 = load i8, ptr %71, align 1, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %.064114, i64 4
  %79 = load i8, ptr %73, align 1, !tbaa !9
  %80 = xor i8 %79, %77
  store i8 %80, ptr %73, align 1, !tbaa !9
  %81 = add nsw i32 %.062116, -4
  %.not86.3 = icmp eq i32 %81, 0
  br i1 %.not86.3, label %iter.check166, label %.lr.ph117, !llvm.loop !28

iter.check166:                                    ; preds = %.lr.ph117.prol.loopexit, %.lr.ph117, %vec.epilog.middle.block, %middle.block
  call void @gift64t_encrypt(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %13, i16 noundef zeroext 21845) #5
  %82 = add nuw nsw i64 %.081.lcssa, 4294967295
  %83 = and i64 %82, 4294967295
  %84 = add nuw nsw i64 %83, 1
  %min.iters.check164 = icmp ult i64 %83, 7
  br i1 %min.iters.check164, label %.lr.ph124.preheader, label %vector.main.loop.iter.check168

vector.main.loop.iter.check168:                   ; preds = %iter.check166
  %min.iters.check167 = icmp ult i64 %83, 31
  br i1 %min.iters.check167, label %vec.epilog.ph186, label %vector.ph169

vector.ph169:                                     ; preds = %vector.main.loop.iter.check168
  %n.vec171 = and i64 %84, 8589934560
  br label %vector.body172

vector.body172:                                   ; preds = %vector.body172, %vector.ph169
  %index173 = phi i64 [ 0, %vector.ph169 ], [ %index.next182, %vector.body172 ]
  %next.gep174 = getelementptr i8, ptr %12, i64 %index173
  %next.gep176 = getelementptr i8, ptr %13, i64 %index173
  %85 = getelementptr i8, ptr %next.gep174, i64 16
  %wide.load178 = load <16 x i8>, ptr %next.gep174, align 8, !tbaa !9
  %wide.load179 = load <16 x i8>, ptr %85, align 8, !tbaa !9
  %86 = getelementptr i8, ptr %next.gep176, i64 16
  %wide.load180 = load <16 x i8>, ptr %next.gep176, align 8, !tbaa !9
  %wide.load181 = load <16 x i8>, ptr %86, align 8, !tbaa !9
  %87 = xor <16 x i8> %wide.load180, %wide.load178
  %88 = xor <16 x i8> %wide.load181, %wide.load179
  store <16 x i8> %87, ptr %next.gep176, align 8, !tbaa !9
  store <16 x i8> %88, ptr %86, align 8, !tbaa !9
  %index.next182 = add nuw i64 %index173, 32
  %89 = icmp eq i64 %index.next182, %n.vec171
  br i1 %89, label %middle.block163, label %vector.body172, !llvm.loop !29

middle.block163:                                  ; preds = %vector.body172
  %cmp.n183 = icmp eq i64 %84, %n.vec171
  br i1 %cmp.n183, label %iter.check219, label %vec.epilog.iter.check187

vec.epilog.iter.check187:                         ; preds = %middle.block163
  %ind.end202 = getelementptr i8, ptr %13, i64 %n.vec171
  %ind.end199 = getelementptr i8, ptr %12, i64 %n.vec171
  %.cast195 = trunc i64 %n.vec171 to i32
  %ind.end196 = sub i32 %39, %.cast195
  %n.vec.remaining188 = and i64 %84, 24
  %min.epilog.iters.check189 = icmp eq i64 %n.vec.remaining188, 0
  br i1 %min.epilog.iters.check189, label %.lr.ph124.preheader, label %vec.epilog.ph186

vec.epilog.ph186:                                 ; preds = %vector.main.loop.iter.check168, %vec.epilog.iter.check187
  %vec.epilog.resume.val190 = phi i64 [ %n.vec171, %vec.epilog.iter.check187 ], [ 0, %vector.main.loop.iter.check168 ]
  %n.vec192 = and i64 %84, 8589934584
  %.cast193 = trunc i64 %n.vec192 to i32
  %ind.end194 = sub i32 %39, %.cast193
  %ind.end198 = getelementptr i8, ptr %12, i64 %n.vec192
  %ind.end201 = getelementptr i8, ptr %13, i64 %n.vec192
  br label %vec.epilog.vector.body204

vec.epilog.vector.body204:                        ; preds = %vec.epilog.vector.body204, %vec.epilog.ph186
  %index205 = phi i64 [ %vec.epilog.resume.val190, %vec.epilog.ph186 ], [ %index.next210, %vec.epilog.vector.body204 ]
  %next.gep206 = getelementptr i8, ptr %12, i64 %index205
  %next.gep207 = getelementptr i8, ptr %13, i64 %index205
  %wide.load208 = load <8 x i8>, ptr %next.gep206, align 8, !tbaa !9
  %wide.load209 = load <8 x i8>, ptr %next.gep207, align 8, !tbaa !9
  %90 = xor <8 x i8> %wide.load209, %wide.load208
  store <8 x i8> %90, ptr %next.gep207, align 8, !tbaa !9
  %index.next210 = add nuw i64 %index205, 8
  %91 = icmp eq i64 %index.next210, %n.vec192
  br i1 %91, label %vec.epilog.middle.block184, label %vec.epilog.vector.body204, !llvm.loop !30

vec.epilog.middle.block184:                       ; preds = %vec.epilog.vector.body204
  %cmp.n211 = icmp eq i64 %84, %n.vec192
  br i1 %cmp.n211, label %iter.check219, label %.lr.ph124.preheader

.lr.ph124.preheader:                              ; preds = %vec.epilog.middle.block184, %iter.check166, %vec.epilog.iter.check187
  %.059122.ph = phi i32 [ %39, %iter.check166 ], [ %ind.end196, %vec.epilog.iter.check187 ], [ %ind.end194, %vec.epilog.middle.block184 ]
  %.060121.ph = phi ptr [ %12, %iter.check166 ], [ %ind.end199, %vec.epilog.iter.check187 ], [ %ind.end198, %vec.epilog.middle.block184 ]
  %.061120.ph = phi ptr [ %13, %iter.check166 ], [ %ind.end202, %vec.epilog.iter.check187 ], [ %ind.end201, %vec.epilog.middle.block184 ]
  br label %.lr.ph124

.lr.ph124:                                        ; preds = %.lr.ph124.preheader, %.lr.ph124
  %.059122 = phi i32 [ %97, %.lr.ph124 ], [ %.059122.ph, %.lr.ph124.preheader ]
  %.060121 = phi ptr [ %92, %.lr.ph124 ], [ %.060121.ph, %.lr.ph124.preheader ]
  %.061120 = phi ptr [ %94, %.lr.ph124 ], [ %.061120.ph, %.lr.ph124.preheader ]
  %92 = getelementptr inbounds i8, ptr %.060121, i64 1
  %93 = load i8, ptr %.060121, align 1, !tbaa !9
  %94 = getelementptr inbounds i8, ptr %.061120, i64 1
  %95 = load i8, ptr %.061120, align 1, !tbaa !9
  %96 = xor i8 %95, %93
  store i8 %96, ptr %.061120, align 1, !tbaa !9
  %97 = add nsw i32 %.059122, -1
  %.not87 = icmp eq i32 %97, 0
  br i1 %.not87, label %iter.check219, label %.lr.ph124, !llvm.loop !31

iter.check219:                                    ; preds = %.lr.ph124, %vec.epilog.middle.block184, %middle.block163
  %98 = add nuw nsw i64 %.081.lcssa, 4294967295
  %99 = and i64 %98, 4294967295
  %100 = add nuw nsw i64 %99, 1
  %min.iters.check217 = icmp ult i64 %99, 7
  br i1 %min.iters.check217, label %.lr.ph130.preheader, label %vector.memcheck212

vector.memcheck212:                               ; preds = %iter.check219
  %101 = sub i64 %.079.lcssa213, %.080.lcssa214
  %diff.check = icmp ult i64 %101, 32
  %102 = sub i64 %.079.lcssa213, %14
  %diff.check215 = icmp ult i64 %102, 32
  %conflict.rdx = or i1 %diff.check, %diff.check215
  br i1 %conflict.rdx, label %.lr.ph130.preheader, label %vector.main.loop.iter.check221

vector.main.loop.iter.check221:                   ; preds = %vector.memcheck212
  %min.iters.check220 = icmp ult i64 %99, 31
  br i1 %min.iters.check220, label %vec.epilog.ph241, label %vector.ph222

vector.ph222:                                     ; preds = %vector.main.loop.iter.check221
  %n.vec224 = and i64 %100, 8589934560
  br label %vector.body225

vector.body225:                                   ; preds = %vector.body225, %vector.ph222
  %index226 = phi i64 [ 0, %vector.ph222 ], [ %index.next237, %vector.body225 ]
  %next.gep227 = getelementptr i8, ptr %13, i64 %index226
  %next.gep229 = getelementptr i8, ptr %.080.lcssa, i64 %index226
  %next.gep231 = getelementptr i8, ptr %.079.lcssa, i64 %index226
  %103 = getelementptr i8, ptr %next.gep229, i64 16
  %wide.load233 = load <16 x i8>, ptr %next.gep229, align 1, !tbaa !9
  %wide.load234 = load <16 x i8>, ptr %103, align 1, !tbaa !9
  %104 = getelementptr i8, ptr %next.gep227, i64 16
  %wide.load235 = load <16 x i8>, ptr %next.gep227, align 8, !tbaa !9
  %wide.load236 = load <16 x i8>, ptr %104, align 8, !tbaa !9
  %105 = xor <16 x i8> %wide.load235, %wide.load233
  %106 = xor <16 x i8> %wide.load236, %wide.load234
  %107 = getelementptr i8, ptr %next.gep231, i64 16
  store <16 x i8> %105, ptr %next.gep231, align 1, !tbaa !9
  store <16 x i8> %106, ptr %107, align 1, !tbaa !9
  %index.next237 = add nuw i64 %index226, 32
  %108 = icmp eq i64 %index.next237, %n.vec224
  br i1 %108, label %middle.block216, label %vector.body225, !llvm.loop !32

middle.block216:                                  ; preds = %vector.body225
  %cmp.n238 = icmp eq i64 %100, %n.vec224
  br i1 %cmp.n238, label %._crit_edge131, label %vec.epilog.iter.check242

vec.epilog.iter.check242:                         ; preds = %middle.block216
  %ind.end260 = getelementptr i8, ptr %.079.lcssa, i64 %n.vec224
  %ind.end257 = getelementptr i8, ptr %.080.lcssa, i64 %n.vec224
  %ind.end254 = getelementptr i8, ptr %13, i64 %n.vec224
  %.cast250 = trunc i64 %n.vec224 to i32
  %ind.end251 = sub i32 %39, %.cast250
  %n.vec.remaining243 = and i64 %100, 24
  %min.epilog.iters.check244 = icmp eq i64 %n.vec.remaining243, 0
  br i1 %min.epilog.iters.check244, label %.lr.ph130.preheader, label %vec.epilog.ph241

vec.epilog.ph241:                                 ; preds = %vector.main.loop.iter.check221, %vec.epilog.iter.check242
  %vec.epilog.resume.val245 = phi i64 [ %n.vec224, %vec.epilog.iter.check242 ], [ 0, %vector.main.loop.iter.check221 ]
  %n.vec247 = and i64 %100, 8589934584
  %.cast248 = trunc i64 %n.vec247 to i32
  %ind.end249 = sub i32 %39, %.cast248
  %ind.end253 = getelementptr i8, ptr %13, i64 %n.vec247
  %ind.end256 = getelementptr i8, ptr %.080.lcssa, i64 %n.vec247
  %ind.end259 = getelementptr i8, ptr %.079.lcssa, i64 %n.vec247
  br label %vec.epilog.vector.body262

vec.epilog.vector.body262:                        ; preds = %vec.epilog.vector.body262, %vec.epilog.ph241
  %index263 = phi i64 [ %vec.epilog.resume.val245, %vec.epilog.ph241 ], [ %index.next269, %vec.epilog.vector.body262 ]
  %next.gep264 = getelementptr i8, ptr %13, i64 %index263
  %next.gep265 = getelementptr i8, ptr %.080.lcssa, i64 %index263
  %next.gep266 = getelementptr i8, ptr %.079.lcssa, i64 %index263
  %wide.load267 = load <8 x i8>, ptr %next.gep265, align 1, !tbaa !9
  %wide.load268 = load <8 x i8>, ptr %next.gep264, align 8, !tbaa !9
  %109 = xor <8 x i8> %wide.load268, %wide.load267
  store <8 x i8> %109, ptr %next.gep266, align 1, !tbaa !9
  %index.next269 = add nuw i64 %index263, 8
  %110 = icmp eq i64 %index.next269, %n.vec247
  br i1 %110, label %vec.epilog.middle.block239, label %vec.epilog.vector.body262, !llvm.loop !33

vec.epilog.middle.block239:                       ; preds = %vec.epilog.vector.body262
  %cmp.n270 = icmp eq i64 %100, %n.vec247
  br i1 %cmp.n270, label %._crit_edge131, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %vec.epilog.middle.block239, %vector.memcheck212, %iter.check219, %vec.epilog.iter.check242
  %.0129.ph = phi i32 [ %39, %iter.check219 ], [ %39, %vector.memcheck212 ], [ %ind.end251, %vec.epilog.iter.check242 ], [ %ind.end249, %vec.epilog.middle.block239 ]
  %.056128.ph = phi ptr [ %13, %iter.check219 ], [ %13, %vector.memcheck212 ], [ %ind.end254, %vec.epilog.iter.check242 ], [ %ind.end253, %vec.epilog.middle.block239 ]
  %.057127.ph = phi ptr [ %.080.lcssa, %iter.check219 ], [ %.080.lcssa, %vector.memcheck212 ], [ %ind.end257, %vec.epilog.iter.check242 ], [ %ind.end256, %vec.epilog.middle.block239 ]
  %.058126.ph = phi ptr [ %.079.lcssa, %iter.check219 ], [ %.079.lcssa, %vector.memcheck212 ], [ %ind.end260, %vec.epilog.iter.check242 ], [ %ind.end259, %vec.epilog.middle.block239 ]
  %111 = add nsw i32 %.0129.ph, -1
  %xtraiter273 = and i32 %.0129.ph, 3
  %lcmp.mod274.not = icmp eq i32 %xtraiter273, 0
  br i1 %lcmp.mod274.not, label %.lr.ph130.prol.loopexit, label %.lr.ph130.prol

.lr.ph130.prol:                                   ; preds = %.lr.ph130.preheader, %.lr.ph130.prol
  %.0129.prol = phi i32 [ %118, %.lr.ph130.prol ], [ %.0129.ph, %.lr.ph130.preheader ]
  %.056128.prol = phi ptr [ %114, %.lr.ph130.prol ], [ %.056128.ph, %.lr.ph130.preheader ]
  %.057127.prol = phi ptr [ %112, %.lr.ph130.prol ], [ %.057127.ph, %.lr.ph130.preheader ]
  %.058126.prol = phi ptr [ %117, %.lr.ph130.prol ], [ %.058126.ph, %.lr.ph130.preheader ]
  %prol.iter275 = phi i32 [ %prol.iter275.next, %.lr.ph130.prol ], [ 0, %.lr.ph130.preheader ]
  %112 = getelementptr inbounds i8, ptr %.057127.prol, i64 1
  %113 = load i8, ptr %.057127.prol, align 1, !tbaa !9
  %114 = getelementptr inbounds i8, ptr %.056128.prol, i64 1
  %115 = load i8, ptr %.056128.prol, align 1, !tbaa !9
  %116 = xor i8 %115, %113
  %117 = getelementptr inbounds i8, ptr %.058126.prol, i64 1
  store i8 %116, ptr %.058126.prol, align 1, !tbaa !9
  %118 = add nsw i32 %.0129.prol, -1
  %prol.iter275.next = add i32 %prol.iter275, 1
  %prol.iter275.cmp.not = icmp eq i32 %prol.iter275.next, %xtraiter273
  br i1 %prol.iter275.cmp.not, label %.lr.ph130.prol.loopexit, label %.lr.ph130.prol, !llvm.loop !34

.lr.ph130.prol.loopexit:                          ; preds = %.lr.ph130.prol, %.lr.ph130.preheader
  %.0129.unr = phi i32 [ %.0129.ph, %.lr.ph130.preheader ], [ %118, %.lr.ph130.prol ]
  %.056128.unr = phi ptr [ %.056128.ph, %.lr.ph130.preheader ], [ %114, %.lr.ph130.prol ]
  %.057127.unr = phi ptr [ %.057127.ph, %.lr.ph130.preheader ], [ %112, %.lr.ph130.prol ]
  %.058126.unr = phi ptr [ %.058126.ph, %.lr.ph130.preheader ], [ %117, %.lr.ph130.prol ]
  %119 = icmp ult i32 %111, 3
  br i1 %119, label %._crit_edge131, label %.lr.ph130

.lr.ph130:                                        ; preds = %.lr.ph130.prol.loopexit, %.lr.ph130
  %.0129 = phi i32 [ %144, %.lr.ph130 ], [ %.0129.unr, %.lr.ph130.prol.loopexit ]
  %.056128 = phi ptr [ %140, %.lr.ph130 ], [ %.056128.unr, %.lr.ph130.prol.loopexit ]
  %.057127 = phi ptr [ %138, %.lr.ph130 ], [ %.057127.unr, %.lr.ph130.prol.loopexit ]
  %.058126 = phi ptr [ %143, %.lr.ph130 ], [ %.058126.unr, %.lr.ph130.prol.loopexit ]
  %120 = getelementptr inbounds i8, ptr %.057127, i64 1
  %121 = load i8, ptr %.057127, align 1, !tbaa !9
  %122 = getelementptr inbounds i8, ptr %.056128, i64 1
  %123 = load i8, ptr %.056128, align 1, !tbaa !9
  %124 = xor i8 %123, %121
  %125 = getelementptr inbounds i8, ptr %.058126, i64 1
  store i8 %124, ptr %.058126, align 1, !tbaa !9
  %126 = getelementptr inbounds i8, ptr %.057127, i64 2
  %127 = load i8, ptr %120, align 1, !tbaa !9
  %128 = getelementptr inbounds i8, ptr %.056128, i64 2
  %129 = load i8, ptr %122, align 1, !tbaa !9
  %130 = xor i8 %129, %127
  %131 = getelementptr inbounds i8, ptr %.058126, i64 2
  store i8 %130, ptr %125, align 1, !tbaa !9
  %132 = getelementptr inbounds i8, ptr %.057127, i64 3
  %133 = load i8, ptr %126, align 1, !tbaa !9
  %134 = getelementptr inbounds i8, ptr %.056128, i64 3
  %135 = load i8, ptr %128, align 1, !tbaa !9
  %136 = xor i8 %135, %133
  %137 = getelementptr inbounds i8, ptr %.058126, i64 3
  store i8 %136, ptr %131, align 1, !tbaa !9
  %138 = getelementptr inbounds i8, ptr %.057127, i64 4
  %139 = load i8, ptr %132, align 1, !tbaa !9
  %140 = getelementptr inbounds i8, ptr %.056128, i64 4
  %141 = load i8, ptr %134, align 1, !tbaa !9
  %142 = xor i8 %141, %139
  %143 = getelementptr inbounds i8, ptr %.058126, i64 4
  store i8 %142, ptr %137, align 1, !tbaa !9
  %144 = add nsw i32 %.0129, -4
  %.not88.3 = icmp eq i32 %144, 0
  br i1 %.not88.3, label %._crit_edge131, label %.lr.ph130, !llvm.loop !35

._crit_edge131:                                   ; preds = %.lr.ph130.prol.loopexit, %.lr.ph130, %vec.epilog.middle.block239, %middle.block216
  %145 = getelementptr inbounds i8, ptr %.079.lcssa, i64 %.081.lcssa
  br label %146

146:                                              ; preds = %._crit_edge131, %18
  %.1 = phi ptr [ %145, %._crit_edge131 ], [ %0, %18 ]
  %147 = getelementptr inbounds i8, ptr %11, i64 8
  call void @lotus_or_locus_gen_tag(ptr noundef nonnull %10, ptr noundef %.1, ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef nonnull %147)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #5
  ret i32 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: nounwind uwtable
declare hidden void @lotus_or_locus_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; 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: nounwind uwtable
declare hidden void @lotus_or_locus_process_ad(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @lotus_or_locus_mul_2(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

declare void @gift64t_encrypt(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @lotus_or_locus_gen_tag(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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 = { 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 = { "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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13}
!13 = distinct !{!13, !14}
!14 = distinct !{!14, !"LVerDomain"}
!15 = !{!16}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !11, !18, !19}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = !{!21}
!21 = distinct !{!21, !22}
!22 = distinct !{!22, !"LVerDomain"}
!23 = !{!24}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !11, !18, !19}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.unroll.disable"}
!28 = distinct !{!28, !11, !18}
!29 = distinct !{!29, !11, !18, !19}
!30 = distinct !{!30, !11, !18, !19}
!31 = distinct !{!31, !11, !19, !18}
!32 = distinct !{!32, !11, !18, !19}
!33 = distinct !{!33, !11, !18, !19}
!34 = distinct !{!34, !27}
!35 = distinct !{!35, !11, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass