; LLVM IR from square/subzero :: core/external-crypto/aes (aestmr)

; 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.aes_crypt_ctx = type { [60 x i32], %union.aes_inf, [12 x i8] }
%union.aes_inf = type { i32 }

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @read_tsc() #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @time_eks8(i32 noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca [8 x [32 x i8]], align 16
  %16 = alloca [1 x %struct.aes_crypt_ctx], align 16
  %17 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr %16) #6
  %18 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 0
  %19 = getelementptr inbounds [32 x i8], ptr %18, i64 0, i64 0
  call void @block_rndfill(ptr noundef %19, i64 noundef 256)
  store i32 10, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %240, %3
  %21 = load i32, ptr %11, align 4, !tbaa !5
  %22 = icmp ne i32 %21, 0
  %23 = xor i1 %22, true
  br i1 %23, label %24, label %241

24:                                               ; preds = %20
  store double 0.000000e+00, ptr %14, align 8, !tbaa !11
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %82, %24
  %26 = load i32, ptr %8, align 4, !tbaa !5
  %27 = icmp slt i32 %26, 1000
  br i1 %27, label %28, label %85

28:                                               ; preds = %25
  %29 = call i64 @read_tsc()
  %30 = uitofp i64 %29 to double
  store double %30, ptr %12, align 8, !tbaa !11
  %31 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 0
  %32 = getelementptr inbounds [32 x i8], ptr %31, i64 0, i64 0
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %35 = call i32 @aes_encrypt_key(ptr noundef %32, i32 noundef %33, ptr noundef %34)
  %36 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 1
  %37 = getelementptr inbounds [32 x i8], ptr %36, i64 0, i64 0
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %40 = call i32 @aes_encrypt_key(ptr noundef %37, i32 noundef %38, ptr noundef %39)
  %41 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 2
  %42 = getelementptr inbounds [32 x i8], ptr %41, i64 0, i64 0
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %45 = call i32 @aes_encrypt_key(ptr noundef %42, i32 noundef %43, ptr noundef %44)
  %46 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 3
  %47 = getelementptr inbounds [32 x i8], ptr %46, i64 0, i64 0
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %50 = call i32 @aes_encrypt_key(ptr noundef %47, i32 noundef %48, ptr noundef %49)
  %51 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 4
  %52 = getelementptr inbounds [32 x i8], ptr %51, i64 0, i64 0
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %55 = call i32 @aes_encrypt_key(ptr noundef %52, i32 noundef %53, ptr noundef %54)
  %56 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 5
  %57 = getelementptr inbounds [32 x i8], ptr %56, i64 0, i64 0
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %60 = call i32 @aes_encrypt_key(ptr noundef %57, i32 noundef %58, ptr noundef %59)
  %61 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 6
  %62 = getelementptr inbounds [32 x i8], ptr %61, i64 0, i64 0
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %65 = call i32 @aes_encrypt_key(ptr noundef %62, i32 noundef %63, ptr noundef %64)
  %66 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 7
  %67 = getelementptr inbounds [32 x i8], ptr %66, i64 0, i64 0
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %70 = call i32 @aes_encrypt_key(ptr noundef %67, i32 noundef %68, ptr noundef %69)
  %71 = call i64 @read_tsc()
  %72 = uitofp i64 %71 to double
  %73 = load double, ptr %12, align 8, !tbaa !11
  %74 = fsub double %72, %73
  store double %74, ptr %12, align 8, !tbaa !11
  %75 = load double, ptr %12, align 8, !tbaa !11
  %76 = load double, ptr %13, align 8, !tbaa !11
  %77 = fadd double %76, %75
  store double %77, ptr %13, align 8, !tbaa !11
  %78 = load double, ptr %12, align 8, !tbaa !11
  %79 = load double, ptr %12, align 8, !tbaa !11
  %80 = load double, ptr %14, align 8, !tbaa !11
  %81 = call double @llvm.fmuladd.f64(double %78, double %79, double %80)
  store double %81, ptr %14, align 8, !tbaa !11
  br label %82

82:                                               ; preds = %28
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %8, align 4, !tbaa !5
  br label %25, !llvm.loop !13

85:                                               ; preds = %25
  %86 = load double, ptr %13, align 8, !tbaa !11
  %87 = fdiv double %86, 1.000000e+03
  store double %87, ptr %13, align 8, !tbaa !11
  %88 = load double, ptr %14, align 8, !tbaa !11
  %89 = load double, ptr %13, align 8, !tbaa !11
  %90 = load double, ptr %13, align 8, !tbaa !11
  %91 = fmul double %89, %90
  %92 = fneg double %91
  %93 = call double @llvm.fmuladd.f64(double %92, double 1.000000e+03, double %88)
  %94 = fdiv double %93, 1.000000e+03
  %95 = call double @sqrt(double noundef %94) #6
  store double %95, ptr %14, align 8, !tbaa !11
  %96 = load double, ptr %14, align 8, !tbaa !11
  %97 = load double, ptr %13, align 8, !tbaa !11
  %98 = fmul double 5.000000e-02, %97
  %99 = fcmp olt double %96, %98
  br i1 %99, label %100, label %103

100:                                              ; preds = %85
  %101 = load double, ptr %13, align 8, !tbaa !11
  %102 = fmul double 5.000000e-02, %101
  br label %105

103:                                              ; preds = %85
  %104 = load double, ptr %14, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %103, %100
  %106 = phi double [ %102, %100 ], [ %104, %103 ]
  store double %106, ptr %14, align 8, !tbaa !11
  %107 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 0
  %108 = getelementptr inbounds [32 x i8], ptr %107, i64 0, i64 0
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %111 = call i32 @aes_encrypt_key(ptr noundef %108, i32 noundef %109, ptr noundef %110)
  %112 = load ptr, ptr %7, align 8, !tbaa !9
  store double 0.000000e+00, ptr %112, align 8, !tbaa !11
  %113 = load ptr, ptr %6, align 8, !tbaa !9
  store double 0.000000e+00, ptr %113, align 8, !tbaa !11
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %188, %105
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = icmp slt i32 %115, 10000
  br i1 %116, label %117, label %191

117:                                              ; preds = %114
  %118 = call i64 @read_tsc()
  %119 = uitofp i64 %118 to double
  store double %119, ptr %12, align 8, !tbaa !11
  %120 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 0
  %121 = getelementptr inbounds [32 x i8], ptr %120, i64 0, i64 0
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %124 = call i32 @aes_encrypt_key(ptr noundef %121, i32 noundef %122, ptr noundef %123)
  %125 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 1
  %126 = getelementptr inbounds [32 x i8], ptr %125, i64 0, i64 0
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %129 = call i32 @aes_encrypt_key(ptr noundef %126, i32 noundef %127, ptr noundef %128)
  %130 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 2
  %131 = getelementptr inbounds [32 x i8], ptr %130, i64 0, i64 0
  %132 = load i32, ptr %5, align 4, !tbaa !5
  %133 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %134 = call i32 @aes_encrypt_key(ptr noundef %131, i32 noundef %132, ptr noundef %133)
  %135 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 3
  %136 = getelementptr inbounds [32 x i8], ptr %135, i64 0, i64 0
  %137 = load i32, ptr %5, align 4, !tbaa !5
  %138 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %139 = call i32 @aes_encrypt_key(ptr noundef %136, i32 noundef %137, ptr noundef %138)
  %140 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 4
  %141 = getelementptr inbounds [32 x i8], ptr %140, i64 0, i64 0
  %142 = load i32, ptr %5, align 4, !tbaa !5
  %143 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %144 = call i32 @aes_encrypt_key(ptr noundef %141, i32 noundef %142, ptr noundef %143)
  %145 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 5
  %146 = getelementptr inbounds [32 x i8], ptr %145, i64 0, i64 0
  %147 = load i32, ptr %5, align 4, !tbaa !5
  %148 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %149 = call i32 @aes_encrypt_key(ptr noundef %146, i32 noundef %147, ptr noundef %148)
  %150 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 6
  %151 = getelementptr inbounds [32 x i8], ptr %150, i64 0, i64 0
  %152 = load i32, ptr %5, align 4, !tbaa !5
  %153 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %154 = call i32 @aes_encrypt_key(ptr noundef %151, i32 noundef %152, ptr noundef %153)
  %155 = getelementptr inbounds [8 x [32 x i8]], ptr %15, i64 0, i64 7
  %156 = getelementptr inbounds [32 x i8], ptr %155, i64 0, i64 0
  %157 = load i32, ptr %5, align 4, !tbaa !5
  %158 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %16, i64 0, i64 0
  %159 = call i32 @aes_encrypt_key(ptr noundef %156, i32 noundef %157, ptr noundef %158)
  %160 = call i64 @read_tsc()
  %161 = uitofp i64 %160 to double
  %162 = load double, ptr %12, align 8, !tbaa !11
  %163 = fsub double %161, %162
  store double %163, ptr %12, align 8, !tbaa !11
  %164 = load double, ptr %12, align 8, !tbaa !11
  %165 = load double, ptr %13, align 8, !tbaa !11
  %166 = load double, ptr %14, align 8, !tbaa !11
  %167 = fsub double %165, %166
  %168 = fcmp ogt double %164, %167
  br i1 %168, label %169, label %187

169:                                              ; preds = %117
  %170 = load double, ptr %12, align 8, !tbaa !11
  %171 = load double, ptr %13, align 8, !tbaa !11
  %172 = load double, ptr %14, align 8, !tbaa !11
  %173 = fadd double %171, %172
  %174 = fcmp olt double %170, %173
  br i1 %174, label %175, label %187

175:                                              ; preds = %169
  %176 = load double, ptr %12, align 8, !tbaa !11
  %177 = load ptr, ptr %6, align 8, !tbaa !9
  %178 = load double, ptr %177, align 8, !tbaa !11
  %179 = fadd double %178, %176
  store double %179, ptr %177, align 8, !tbaa !11
  %180 = load double, ptr %12, align 8, !tbaa !11
  %181 = load double, ptr %12, align 8, !tbaa !11
  %182 = load ptr, ptr %7, align 8, !tbaa !9
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = call double @llvm.fmuladd.f64(double %180, double %181, double %183)
  store double %184, ptr %182, align 8, !tbaa !11
  %185 = load i32, ptr %11, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %11, align 4, !tbaa !5
  br label %187

187:                                              ; preds = %175, %169, %117
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %8, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %8, align 4, !tbaa !5
  br label %114, !llvm.loop !15

191:                                              ; preds = %114
  %192 = load i32, ptr %11, align 4, !tbaa !5
  %193 = mul nsw i32 10, %192
  %194 = icmp sgt i32 %193, 90000
  br i1 %194, label %195, label %228

195:                                              ; preds = %191
  %196 = load i32, ptr %11, align 4, !tbaa !5
  %197 = sitofp i32 %196 to double
  %198 = load ptr, ptr %6, align 8, !tbaa !9
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = fdiv double %199, %197
  store double %200, ptr %198, align 8, !tbaa !11
  %201 = load ptr, ptr %7, align 8, !tbaa !9
  %202 = load double, ptr %201, align 8, !tbaa !11
  %203 = load ptr, ptr %6, align 8, !tbaa !9
  %204 = load double, ptr %203, align 8, !tbaa !11
  %205 = load ptr, ptr %6, align 8, !tbaa !9
  %206 = load double, ptr %205, align 8, !tbaa !11
  %207 = fmul double %204, %206
  %208 = load i32, ptr %11, align 4, !tbaa !5
  %209 = sitofp i32 %208 to double
  %210 = fneg double %207
  %211 = call double @llvm.fmuladd.f64(double %210, double %209, double %202)
  %212 = load i32, ptr %11, align 4, !tbaa !5
  %213 = sitofp i32 %212 to double
  %214 = fdiv double %211, %213
  %215 = call double @sqrt(double noundef %214) #6
  %216 = load ptr, ptr %7, align 8, !tbaa !9
  store double %215, ptr %216, align 8, !tbaa !11
  %217 = load ptr, ptr %7, align 8, !tbaa !9
  %218 = load double, ptr %217, align 8, !tbaa !11
  %219 = load i32, ptr %9, align 4, !tbaa !5
  %220 = sitofp i32 %219 to double
  %221 = fdiv double %220, 1.000000e+02
  %222 = load ptr, ptr %6, align 8, !tbaa !9
  %223 = load double, ptr %222, align 8, !tbaa !11
  %224 = fmul double %221, %223
  %225 = fcmp ogt double %218, %224
  br i1 %225, label %226, label %227

226:                                              ; preds = %195
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %226, %195
  br label %240

228:                                              ; preds = %191
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %10, align 4, !tbaa !5
  %231 = icmp eq i32 %229, 10
  br i1 %231, label %232, label %239

232:                                              ; preds = %228
  store i32 0, ptr %10, align 4, !tbaa !5
  %233 = load i32, ptr %9, align 4, !tbaa !5
  %234 = add nsw i32 %233, 5
  store i32 %234, ptr %9, align 4, !tbaa !5
  %235 = load i32, ptr %9, align 4, !tbaa !5
  %236 = icmp sgt i32 %235, 30
  br i1 %236, label %237, label %238

237:                                              ; preds = %232
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %242

238:                                              ; preds = %232
  br label %239

239:                                              ; preds = %238, %228
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %240

240:                                              ; preds = %239, %227
  br label %20, !llvm.loop !16

241:                                              ; preds = %20
  store i32 1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %242

242:                                              ; preds = %241, %237
  call void @llvm.lifetime.end.p0(i64 256, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %243 = load i32, ptr %4, align 4
  ret i32 %243
}

declare void @block_rndfill(ptr noundef, i64 noundef) #5

declare i32 @aes_encrypt_key(ptr noundef, i32 noundef, ptr noundef) #5

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


; 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.aes_crypt_ctx = type { [60 x i32], %union.aes_inf, [12 x i8] }
%union.aes_inf = type { i32 }

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @read_tsc() local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double 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) #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @time_eks8(i32 noundef %0, ptr nocapture noundef %1, ptr nocapture noundef %2) local_unnamed_addr #4 {
  %4 = alloca [8 x [32 x i8]], align 16
  %5 = alloca [1 x %struct.aes_crypt_ctx], align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #6
  call void @block_rndfill(ptr noundef nonnull %4, i64 noundef 256) #6
  %6 = getelementptr inbounds i8, ptr %4, i64 32
  %7 = getelementptr inbounds i8, ptr %4, i64 64
  %8 = getelementptr inbounds i8, ptr %4, i64 96
  %9 = getelementptr inbounds i8, ptr %4, i64 128
  %10 = getelementptr inbounds i8, ptr %4, i64 160
  %11 = getelementptr inbounds i8, ptr %4, i64 192
  %12 = getelementptr inbounds i8, ptr %4, i64 224
  br label %.preheader.outer.outer

.preheader.outer.outer:                           ; preds = %3, %87
  %.07185.ph.ph = phi i32 [ 10, %3 ], [ %88, %87 ]
  %13 = uitofp nneg i32 %.07185.ph.ph to double
  %14 = fdiv double %13, 1.000000e+02
  br label %.preheader.outer

.preheader.outer:                                 ; preds = %.preheader.outer.outer, %84
  %.06886.ph = phi i32 [ %85, %84 ], [ 0, %.preheader.outer.outer ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.outer, %71
  br label %15

15:                                               ; preds = %.preheader, %15
  %.082 = phi double [ 0.000000e+00, %.preheader ], [ %30, %15 ]
  %.06681 = phi double [ 0.000000e+00, %.preheader ], [ %29, %15 ]
  %.07480 = phi i32 [ 0, %.preheader ], [ %31, %15 ]
  %16 = call i64 @read_tsc()
  %17 = uitofp i64 %16 to double
  %18 = call i32 @aes_encrypt_key(ptr noundef nonnull %4, i32 noundef %0, ptr noundef nonnull %5) #6
  %19 = call i32 @aes_encrypt_key(ptr noundef nonnull %6, i32 noundef %0, ptr noundef nonnull %5) #6
  %20 = call i32 @aes_encrypt_key(ptr noundef nonnull %7, i32 noundef %0, ptr noundef nonnull %5) #6
  %21 = call i32 @aes_encrypt_key(ptr noundef nonnull %8, i32 noundef %0, ptr noundef nonnull %5) #6
  %22 = call i32 @aes_encrypt_key(ptr noundef nonnull %9, i32 noundef %0, ptr noundef nonnull %5) #6
  %23 = call i32 @aes_encrypt_key(ptr noundef nonnull %10, i32 noundef %0, ptr noundef nonnull %5) #6
  %24 = call i32 @aes_encrypt_key(ptr noundef nonnull %11, i32 noundef %0, ptr noundef nonnull %5) #6
  %25 = call i32 @aes_encrypt_key(ptr noundef nonnull %12, i32 noundef %0, ptr noundef nonnull %5) #6
  %26 = call i64 @read_tsc()
  %27 = uitofp i64 %26 to double
  %28 = fsub double %27, %17
  %29 = fadd double %.06681, %28
  %30 = call double @llvm.fmuladd.f64(double %28, double %28, double %.082)
  %31 = add nuw nsw i32 %.07480, 1
  %exitcond.not = icmp eq i32 %31, 1000
  br i1 %exitcond.not, label %32, label %15, !llvm.loop !5

32:                                               ; preds = %15
  %33 = fdiv double %29, 1.000000e+03
  %34 = fneg double %33
  %35 = fmul double %33, %34
  %36 = call double @llvm.fmuladd.f64(double %35, double 1.000000e+03, double %30)
  %37 = fdiv double %36, 1.000000e+03
  %38 = call double @sqrt(double noundef %37) #6
  %39 = fmul double %33, 5.000000e-02
  %40 = fcmp olt double %38, %39
  %41 = select i1 %40, double %39, double %38
  %42 = call i32 @aes_encrypt_key(ptr noundef nonnull %4, i32 noundef %0, ptr noundef nonnull %5) #6
  store double 0.000000e+00, ptr %2, align 8, !tbaa !7
  store double 0.000000e+00, ptr %1, align 8, !tbaa !7
  %43 = fsub double %33, %41
  %44 = fadd double %33, %41
  br label %45

45:                                               ; preds = %32, %67
  %.184 = phi i32 [ 0, %32 ], [ %.2, %67 ]
  %.17583 = phi i32 [ 0, %32 ], [ %68, %67 ]
  %46 = call i64 @read_tsc()
  %47 = uitofp i64 %46 to double
  %48 = call i32 @aes_encrypt_key(ptr noundef nonnull %4, i32 noundef %0, ptr noundef nonnull %5) #6
  %49 = call i32 @aes_encrypt_key(ptr noundef nonnull %6, i32 noundef %0, ptr noundef nonnull %5) #6
  %50 = call i32 @aes_encrypt_key(ptr noundef nonnull %7, i32 noundef %0, ptr noundef nonnull %5) #6
  %51 = call i32 @aes_encrypt_key(ptr noundef nonnull %8, i32 noundef %0, ptr noundef nonnull %5) #6
  %52 = call i32 @aes_encrypt_key(ptr noundef nonnull %9, i32 noundef %0, ptr noundef nonnull %5) #6
  %53 = call i32 @aes_encrypt_key(ptr noundef nonnull %10, i32 noundef %0, ptr noundef nonnull %5) #6
  %54 = call i32 @aes_encrypt_key(ptr noundef nonnull %11, i32 noundef %0, ptr noundef nonnull %5) #6
  %55 = call i32 @aes_encrypt_key(ptr noundef nonnull %12, i32 noundef %0, ptr noundef nonnull %5) #6
  %56 = call i64 @read_tsc()
  %57 = uitofp i64 %56 to double
  %58 = fsub double %57, %47
  %59 = fcmp ogt double %58, %43
  %60 = fcmp olt double %58, %44
  %or.cond = and i1 %59, %60
  br i1 %or.cond, label %61, label %67

61:                                               ; preds = %45
  %62 = load double, ptr %1, align 8, !tbaa !7
  %63 = fadd double %58, %62
  store double %63, ptr %1, align 8, !tbaa !7
  %64 = load double, ptr %2, align 8, !tbaa !7
  %65 = call double @llvm.fmuladd.f64(double %58, double %58, double %64)
  store double %65, ptr %2, align 8, !tbaa !7
  %66 = add nsw i32 %.184, 1
  br label %67

67:                                               ; preds = %45, %61
  %.2 = phi i32 [ %66, %61 ], [ %.184, %45 ]
  %68 = add nuw nsw i32 %.17583, 1
  %exitcond89.not = icmp eq i32 %68, 10000
  br i1 %exitcond89.not, label %69, label %45, !llvm.loop !11

69:                                               ; preds = %67
  %70 = icmp sgt i32 %.2, 9000
  br i1 %70, label %71, label %84

71:                                               ; preds = %69
  %72 = uitofp nneg i32 %.2 to double
  %73 = load double, ptr %1, align 8, !tbaa !7
  %74 = fdiv double %73, %72
  store double %74, ptr %1, align 8, !tbaa !7
  %75 = load double, ptr %2, align 8, !tbaa !7
  %76 = fneg double %74
  %77 = fmul double %74, %76
  %78 = call double @llvm.fmuladd.f64(double %77, double %72, double %75)
  %79 = fdiv double %78, %72
  %80 = call double @sqrt(double noundef %79) #6
  store double %80, ptr %2, align 8, !tbaa !7
  %81 = load double, ptr %1, align 8, !tbaa !7
  %82 = fmul double %14, %81
  %83 = fcmp ogt double %80, %82
  br i1 %83, label %.preheader, label %.thread, !llvm.loop !12

84:                                               ; preds = %69
  %85 = add nuw nsw i32 %.06886.ph, 1
  %86 = icmp eq i32 %.06886.ph, 10
  br i1 %86, label %87, label %.preheader.outer, !llvm.loop !12

87:                                               ; preds = %84
  %88 = add nuw nsw i32 %.07185.ph.ph, 5
  %89 = icmp ugt i32 %.07185.ph.ph, 25
  br i1 %89, label %.thread, label %.preheader.outer.outer, !llvm.loop !12

.thread:                                          ; preds = %87, %71
  %.076 = phi i32 [ 1, %71 ], [ 0, %87 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #6
  ret i32 %.076
}

declare void @block_rndfill(ptr noundef, i64 noundef) local_unnamed_addr #5

declare i32 @aes_encrypt_key(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { "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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}


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