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

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

@pih = external dso_local global [32 x i8], align 16
@exh = external dso_local global [32 x i8], align 16
@res = external dso_local global <{ <{ [16 x i8], [16 x i8] }>, <{ [15 x i8], [17 x i8] }>, <{ [16 x i8], [16 x i8] }> }>, align 16
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @oblk(ptr noundef, ptr noundef, i64 noundef) #0

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

declare i32 @printf(ptr noundef, ...) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @message(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [32 x i8], align 16
  %3 = alloca [32 x i8], align 16
  %4 = alloca i8, align 1
  %5 = alloca [1 x %struct.aes_crypt_ctx], align 16
  %6 = alloca [1 x %struct.aes_crypt_ctx], align 16
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  store i8 0, ptr %4, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %6) #5
  call void @message(ptr noundef @.str.3)
  call void @llvm.memset.p0.i64(ptr align 16 %5, i8 0, i64 256, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 256, i1 false)
  %7 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 -52, i64 16, i1 false)
  %8 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 -52, i64 16, i1 false)
  %9 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %10 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %5, i64 0, i64 0
  %11 = call i32 @aes_encrypt_key128(ptr noundef @exh, ptr noundef %10)
  call void @oblk(ptr noundef @.str.5, ptr noundef @exh, i64 noundef 16)
  call void @oblk(ptr noundef @.str.6, ptr noundef @pih, i64 noundef 16)
  %12 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %13 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %5, i64 0, i64 0
  %14 = call i32 @aes_encrypt(ptr noundef @pih, ptr noundef %12, ptr noundef %13)
  %15 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  call void @oblk(ptr noundef @.str.7, ptr noundef %15, i64 noundef 16)
  %16 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %17 = call i32 @memcmp(ptr noundef %16, ptr noundef @res, i64 noundef 16) #6
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %24

19:                                               ; preds = %0
  call void @message(ptr noundef @.str.8)
  %20 = load i8, ptr %4, align 1, !tbaa !5
  %21 = zext i8 %20 to i32
  %22 = add nsw i32 %21, 1
  %23 = trunc i32 %22 to i8
  store i8 %23, ptr %4, align 1, !tbaa !5
  br label %24

24:                                               ; preds = %19, %0
  %25 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %6, i64 0, i64 0
  %26 = call i32 @aes_decrypt_key128(ptr noundef @exh, ptr noundef %25)
  %27 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %28 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %29 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %6, i64 0, i64 0
  %30 = call i32 @aes_decrypt(ptr noundef %27, ptr noundef %28, ptr noundef %29)
  %31 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  call void @oblk(ptr noundef @.str.9, ptr noundef %31, i64 noundef 16)
  %32 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %33 = call i32 @memcmp(ptr noundef %32, ptr noundef @pih, i64 noundef 16) #6
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %24
  call void @message(ptr noundef @.str.8)
  %36 = load i8, ptr %4, align 1, !tbaa !5
  %37 = zext i8 %36 to i32
  %38 = add nsw i32 %37, 2
  %39 = trunc i32 %38 to i8
  store i8 %39, ptr %4, align 1, !tbaa !5
  br label %40

40:                                               ; preds = %35, %24
  %41 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %41, i8 -52, i64 16, i1 false)
  %42 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %42, i8 -52, i64 16, i1 false)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %44 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %5, i64 0, i64 0
  %45 = call i32 @aes_encrypt_key192(ptr noundef @exh, ptr noundef %44)
  call void @oblk(ptr noundef @.str.5, ptr noundef @exh, i64 noundef 24)
  call void @oblk(ptr noundef @.str.6, ptr noundef @pih, i64 noundef 16)
  %46 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %47 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %5, i64 0, i64 0
  %48 = call i32 @aes_encrypt(ptr noundef @pih, ptr noundef %46, ptr noundef %47)
  %49 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  call void @oblk(ptr noundef @.str.7, ptr noundef %49, i64 noundef 16)
  %50 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %51 = call i32 @memcmp(ptr noundef %50, ptr noundef getelementptr inbounds ([3 x [32 x i8]], ptr @res, i64 0, i64 1), i64 noundef 16) #6
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %58

53:                                               ; preds = %40
  call void @message(ptr noundef @.str.8)
  %54 = load i8, ptr %4, align 1, !tbaa !5
  %55 = zext i8 %54 to i32
  %56 = add nsw i32 %55, 4
  %57 = trunc i32 %56 to i8
  store i8 %57, ptr %4, align 1, !tbaa !5
  br label %58

58:                                               ; preds = %53, %40
  %59 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %6, i64 0, i64 0
  %60 = call i32 @aes_decrypt_key192(ptr noundef @exh, ptr noundef %59)
  %61 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %62 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %63 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %6, i64 0, i64 0
  %64 = call i32 @aes_decrypt(ptr noundef %61, ptr noundef %62, ptr noundef %63)
  %65 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  call void @oblk(ptr noundef @.str.9, ptr noundef %65, i64 noundef 16)
  %66 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %67 = call i32 @memcmp(ptr noundef %66, ptr noundef @pih, i64 noundef 16) #6
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %74

69:                                               ; preds = %58
  call void @message(ptr noundef @.str.8)
  %70 = load i8, ptr %4, align 1, !tbaa !5
  %71 = zext i8 %70 to i32
  %72 = add nsw i32 %71, 8
  %73 = trunc i32 %72 to i8
  store i8 %73, ptr %4, align 1, !tbaa !5
  br label %74

74:                                               ; preds = %69, %58
  %75 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %75, i8 -52, i64 16, i1 false)
  %76 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %76, i8 -52, i64 16, i1 false)
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %78 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %5, i64 0, i64 0
  %79 = call i32 @aes_encrypt_key256(ptr noundef @exh, ptr noundef %78)
  call void @oblk(ptr noundef @.str.5, ptr noundef @exh, i64 noundef 32)
  call void @oblk(ptr noundef @.str.6, ptr noundef @pih, i64 noundef 16)
  %80 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %81 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %5, i64 0, i64 0
  %82 = call i32 @aes_encrypt(ptr noundef @pih, ptr noundef %80, ptr noundef %81)
  %83 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  call void @oblk(ptr noundef @.str.7, ptr noundef %83, i64 noundef 16)
  %84 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %85 = call i32 @memcmp(ptr noundef %84, ptr noundef getelementptr inbounds ([3 x [32 x i8]], ptr @res, i64 0, i64 2), i64 noundef 16) #6
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %92

87:                                               ; preds = %74
  call void @message(ptr noundef @.str.8)
  %88 = load i8, ptr %4, align 1, !tbaa !5
  %89 = zext i8 %88 to i32
  %90 = add nsw i32 %89, 16
  %91 = trunc i32 %90 to i8
  store i8 %91, ptr %4, align 1, !tbaa !5
  br label %92

92:                                               ; preds = %87, %74
  %93 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %6, i64 0, i64 0
  %94 = call i32 @aes_decrypt_key256(ptr noundef @exh, ptr noundef %93)
  %95 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %96 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %97 = getelementptr inbounds [1 x %struct.aes_crypt_ctx], ptr %6, i64 0, i64 0
  %98 = call i32 @aes_decrypt(ptr noundef %95, ptr noundef %96, ptr noundef %97)
  %99 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  call void @oblk(ptr noundef @.str.9, ptr noundef %99, i64 noundef 16)
  %100 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %101 = call i32 @memcmp(ptr noundef %100, ptr noundef @pih, i64 noundef 16) #6
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %108

103:                                              ; preds = %92
  call void @message(ptr noundef @.str.8)
  %104 = load i8, ptr %4, align 1, !tbaa !5
  %105 = zext i8 %104 to i32
  %106 = add nsw i32 %105, 32
  %107 = trunc i32 %106 to i8
  store i8 %107, ptr %4, align 1, !tbaa !5
  br label %108

108:                                              ; preds = %103, %92
  %109 = load i8, ptr %4, align 1, !tbaa !5
  %110 = icmp ne i8 %109, 0
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  call void @message(ptr noundef @.str.12)
  br label %113

112:                                              ; preds = %108
  call void @message(ptr noundef @.str.13)
  br label %113

113:                                              ; preds = %112, %111
  call void @llvm.lifetime.end.p0(i64 256, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #5
  ret i32 0
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare i32 @aes_encrypt_key128(ptr noundef, ptr noundef) #2

declare i32 @aes_encrypt(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #4

declare i32 @aes_decrypt_key128(ptr noundef, ptr noundef) #2

declare i32 @aes_decrypt(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @aes_encrypt_key192(ptr noundef, ptr noundef) #2

declare i32 @aes_decrypt_key192(ptr noundef, ptr noundef) #2

declare i32 @aes_encrypt_key256(ptr noundef, ptr noundef) #2

declare i32 @aes_decrypt_key256(ptr noundef, ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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"}


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

@pih = external dso_local global [32 x i8], align 16
@exh = external dso_local global [32 x i8], align 16
@res = external dso_local global <{ <{ [16 x i8], [16 x i8] }>, <{ [15 x i8], [17 x i8] }>, <{ [16 x i8], [16 x i8] }> }>, align 16
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @oblk(ptr noundef, ptr noundef, i64 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @message(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [32 x i8], align 16
  %2 = alloca [32 x i8], align 16
  %3 = alloca [1 x %struct.aes_crypt_ctx], align 16
  %4 = alloca [1 x %struct.aes_crypt_ctx], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #6
  tail call void @message(ptr noundef nonnull @.str.3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %3, i8 0, i64 256, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %4, i8 0, i64 256, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %1, i8 -52, i64 16, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, i8 -52, i64 16, i1 false)
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %6 = call i32 @aes_encrypt_key128(ptr noundef nonnull @exh, ptr noundef nonnull %3) #6
  call void @oblk(ptr noundef nonnull @.str.5, ptr noundef nonnull @exh, i64 noundef 16)
  call void @oblk(ptr noundef nonnull @.str.6, ptr noundef nonnull @pih, i64 noundef 16)
  %7 = call i32 @aes_encrypt(ptr noundef nonnull @pih, ptr noundef nonnull %1, ptr noundef nonnull %3) #6
  call void @oblk(ptr noundef nonnull @.str.7, ptr noundef nonnull %1, i64 noundef 16)
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %1, ptr noundef nonnull dereferenceable(16) @res, i64 16)
  %.not = icmp eq i32 %bcmp, 0
  br i1 %.not, label %9, label %8

8:                                                ; preds = %0
  call void @message(ptr noundef nonnull @.str.8)
  br label %9

9:                                                ; preds = %8, %0
  %.0 = phi i8 [ 1, %8 ], [ 0, %0 ]
  %10 = call i32 @aes_decrypt_key128(ptr noundef nonnull @exh, ptr noundef nonnull %4) #6
  %11 = call i32 @aes_decrypt(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %4) #6
  call void @oblk(ptr noundef nonnull @.str.9, ptr noundef nonnull %2, i64 noundef 16)
  %bcmp7 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %2, ptr noundef nonnull dereferenceable(16) @pih, i64 16)
  %.not8 = icmp eq i32 %bcmp7, 0
  br i1 %.not8, label %14, label %12

12:                                               ; preds = %9
  call void @message(ptr noundef nonnull @.str.8)
  %13 = or disjoint i8 %.0, 2
  br label %14

14:                                               ; preds = %12, %9
  %.1 = phi i8 [ %13, %12 ], [ %.0, %9 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %1, i8 -52, i64 16, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, i8 -52, i64 16, i1 false)
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %16 = call i32 @aes_encrypt_key192(ptr noundef nonnull @exh, ptr noundef nonnull %3) #6
  call void @oblk(ptr noundef nonnull @.str.5, ptr noundef nonnull @exh, i64 noundef 24)
  call void @oblk(ptr noundef nonnull @.str.6, ptr noundef nonnull @pih, i64 noundef 16)
  %17 = call i32 @aes_encrypt(ptr noundef nonnull @pih, ptr noundef nonnull %1, ptr noundef nonnull %3) #6
  call void @oblk(ptr noundef nonnull @.str.7, ptr noundef nonnull %1, i64 noundef 16)
  %bcmp9 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %1, ptr noundef nonnull dereferenceable(16) getelementptr inbounds (i8, ptr @res, i64 32), i64 16)
  %.not10 = icmp eq i32 %bcmp9, 0
  br i1 %.not10, label %20, label %18

18:                                               ; preds = %14
  call void @message(ptr noundef nonnull @.str.8)
  %19 = add nuw nsw i8 %.1, 4
  br label %20

20:                                               ; preds = %18, %14
  %.2 = phi i8 [ %19, %18 ], [ %.1, %14 ]
  %21 = call i32 @aes_decrypt_key192(ptr noundef nonnull @exh, ptr noundef nonnull %4) #6
  %22 = call i32 @aes_decrypt(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %4) #6
  call void @oblk(ptr noundef nonnull @.str.9, ptr noundef nonnull %2, i64 noundef 16)
  %bcmp11 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %2, ptr noundef nonnull dereferenceable(16) @pih, i64 16)
  %.not12 = icmp eq i32 %bcmp11, 0
  br i1 %.not12, label %25, label %23

23:                                               ; preds = %20
  call void @message(ptr noundef nonnull @.str.8)
  %24 = add nuw nsw i8 %.2, 8
  br label %25

25:                                               ; preds = %23, %20
  %.3 = phi i8 [ %24, %23 ], [ %.2, %20 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %1, i8 -52, i64 16, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, i8 -52, i64 16, i1 false)
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %27 = call i32 @aes_encrypt_key256(ptr noundef nonnull @exh, ptr noundef nonnull %3) #6
  call void @oblk(ptr noundef nonnull @.str.5, ptr noundef nonnull @exh, i64 noundef 32)
  call void @oblk(ptr noundef nonnull @.str.6, ptr noundef nonnull @pih, i64 noundef 16)
  %28 = call i32 @aes_encrypt(ptr noundef nonnull @pih, ptr noundef nonnull %1, ptr noundef nonnull %3) #6
  call void @oblk(ptr noundef nonnull @.str.7, ptr noundef nonnull %1, i64 noundef 16)
  %bcmp13 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %1, ptr noundef nonnull dereferenceable(16) getelementptr inbounds (i8, ptr @res, i64 64), i64 16)
  %.not14 = icmp eq i32 %bcmp13, 0
  br i1 %.not14, label %30, label %29

29:                                               ; preds = %25
  call void @message(ptr noundef nonnull @.str.8)
  br label %30

30:                                               ; preds = %29, %25
  %.4 = phi i8 [ 1, %29 ], [ %.3, %25 ]
  %31 = call i32 @aes_decrypt_key256(ptr noundef nonnull @exh, ptr noundef nonnull %4) #6
  %32 = call i32 @aes_decrypt(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %4) #6
  call void @oblk(ptr noundef nonnull @.str.9, ptr noundef nonnull %2, i64 noundef 16)
  %bcmp15 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %2, ptr noundef nonnull dereferenceable(16) @pih, i64 16)
  %.not16 = icmp eq i32 %bcmp15, 0
  br i1 %.not16, label %33, label %.thread

.thread:                                          ; preds = %30
  call void @message(ptr noundef nonnull @.str.8)
  br label %34

33:                                               ; preds = %30
  %.not17 = icmp eq i8 %.4, 0
  br i1 %.not17, label %35, label %34

34:                                               ; preds = %.thread, %33
  br label %35

35:                                               ; preds = %33, %34
  %.str.13.sink = phi ptr [ @.str.13, %34 ], [ @.str.12, %33 ]
  call void @message(ptr noundef nonnull %.str.13.sink)
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare i32 @aes_encrypt_key128(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_encrypt(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_decrypt_key128(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_decrypt(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_encrypt_key192(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_decrypt_key192(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_encrypt_key256(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @aes_decrypt_key256(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #5

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 = { nofree 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nofree nounwind willreturn memory(argmem: read) }
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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass