; LLVM IR from vergecurrency/verge :: src/crypto/ctaes (test)

; 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.ctaes_test = type { i32, ptr, ptr, ptr }
%struct.AES128_ctx = type { [11 x %struct.AES_state] }
%struct.AES_state = type { [8 x i16] }
%struct.AES192_ctx = type { [13 x %struct.AES_state] }
%struct.AES256_ctx = type { [15 x %struct.AES_state] }

@ctaes_tests = external hidden constant [15 x %struct.ctaes_test], align 16
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [32 x i8], align 16
  %5 = alloca [16 x i8], align 16
  %6 = alloca [16 x i8], align 16
  %7 = alloca [16 x i8], align 16
  %8 = alloca [16 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca %struct.AES128_ctx, align 2
  %11 = alloca %struct.AES192_ctx, align 2
  %12 = alloca %struct.AES256_ctx, align 2
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %118, %0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp ult i64 %15, 15
  br i1 %16, label %17, label %121

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [15 x %struct.ctaes_test], ptr @ctaes_tests, i64 0, i64 %19
  store ptr %20, ptr %9, align 8, !tbaa !9
  %21 = load ptr, ptr %9, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.ctaes_test, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = icmp eq i32 %23, 128
  br i1 %24, label %35, label %25

25:                                               ; preds = %17
  %26 = load ptr, ptr %9, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.ctaes_test, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp eq i32 %28, 192
  br i1 %29, label %35, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %9, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.ctaes_test, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !11
  %34 = icmp eq i32 %33, 256
  br i1 %34, label %35, label %36

35:                                               ; preds = %30, %25, %17
  br label %37

36:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 66, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

37:                                               ; preds = %35
  %38 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %39 = load ptr, ptr %9, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.ctaes_test, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  call void @from_hex(ptr noundef %38, i32 noundef 16, ptr noundef %41)
  %42 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %43 = load ptr, ptr %9, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.ctaes_test, ptr %43, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  call void @from_hex(ptr noundef %42, i32 noundef 16, ptr noundef %45)
  %46 = load ptr, ptr %9, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.ctaes_test, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !11
  switch i32 %48, label %79 [
    i32 128, label %49
    i32 192, label %59
    i32 256, label %69
  ]

49:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 176, ptr %10) #6
  %50 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %51 = load ptr, ptr %9, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.ctaes_test, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  call void @from_hex(ptr noundef %50, i32 noundef 16, ptr noundef %53)
  %54 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  call void @AES128_init(ptr noundef %10, ptr noundef %54)
  %55 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %56 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  call void @AES128_encrypt(ptr noundef %10, i64 noundef 1, ptr noundef %55, ptr noundef %56)
  %57 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  %58 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  call void @AES128_decrypt(ptr noundef %10, i64 noundef 1, ptr noundef %57, ptr noundef %58)
  call void @llvm.lifetime.end.p0(i64 176, ptr %10) #6
  br label %79

59:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 208, ptr %11) #6
  %60 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.ctaes_test, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  call void @from_hex(ptr noundef %60, i32 noundef 24, ptr noundef %63)
  %64 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  call void @AES192_init(ptr noundef %11, ptr noundef %64)
  %65 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %66 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  call void @AES192_encrypt(ptr noundef %11, i64 noundef 1, ptr noundef %65, ptr noundef %66)
  %67 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  %68 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  call void @AES192_decrypt(ptr noundef %11, i64 noundef 1, ptr noundef %67, ptr noundef %68)
  call void @llvm.lifetime.end.p0(i64 208, ptr %11) #6
  br label %79

69:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 240, ptr %12) #6
  %70 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.ctaes_test, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  call void @from_hex(ptr noundef %70, i32 noundef 32, ptr noundef %73)
  %74 = getelementptr inbounds [32 x i8], ptr %4, i64 0, i64 0
  call void @AES256_init(ptr noundef %12, ptr noundef %74)
  %75 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %76 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  call void @AES256_encrypt(ptr noundef %12, i64 noundef 1, ptr noundef %75, ptr noundef %76)
  %77 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  %78 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  call void @AES256_decrypt(ptr noundef %12, i64 noundef 1, ptr noundef %77, ptr noundef %78)
  call void @llvm.lifetime.end.p0(i64 240, ptr %12) #6
  br label %79

79:                                               ; preds = %69, %59, %49, %37
  %80 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %81 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %82 = call i32 @memcmp(ptr noundef %80, ptr noundef %81, i64 noundef 16) #8
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %98

84:                                               ; preds = %79
  %85 = load ptr, ptr @stderr, align 8, !tbaa !9
  %86 = load ptr, ptr %9, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.ctaes_test, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !15
  %89 = load ptr, ptr %9, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct.ctaes_test, ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = load ptr, ptr %9, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.ctaes_test, ptr %92, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !14
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.2, ptr noundef %88, ptr noundef %91, ptr noundef %94) #6
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %3, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %84, %79
  %99 = getelementptr inbounds [16 x i8], ptr %5, i64 0, i64 0
  %100 = getelementptr inbounds [16 x i8], ptr %8, i64 0, i64 0
  %101 = call i32 @memcmp(ptr noundef %99, ptr noundef %100, i64 noundef 16) #8
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %117

103:                                              ; preds = %98
  %104 = load ptr, ptr @stderr, align 8, !tbaa !9
  %105 = load ptr, ptr %9, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.ctaes_test, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !15
  %108 = load ptr, ptr %9, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.ctaes_test, ptr %108, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !14
  %111 = load ptr, ptr %9, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.ctaes_test, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str.3, ptr noundef %107, ptr noundef %110, ptr noundef %113) #6
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %3, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %103, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %2, align 4, !tbaa !5
  br label %13, !llvm.loop !16

121:                                              ; preds = %13
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %127

124:                                              ; preds = %121
  %125 = load ptr, ptr @stderr, align 8, !tbaa !9
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.4) #6
  br label %131

127:                                              ; preds = %121
  %128 = load ptr, ptr @stderr, align 8, !tbaa !9
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.5, i32 noundef %129) #6
  br label %131

131:                                              ; preds = %127, %124
  %132 = load i32, ptr %3, align 4, !tbaa !5
  %133 = icmp ne i32 %132, 0
  %134 = zext i1 %133 to i32
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 %134
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

declare void @AES128_init(ptr noundef, ptr noundef) #3

declare void @AES128_encrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare void @AES128_decrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

declare void @AES192_init(ptr noundef, ptr noundef) #3

declare void @AES192_encrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare void @AES192_decrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare void @AES256_init(ptr noundef, ptr noundef) #3

declare void @AES256_encrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare void @AES256_decrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn 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 = { "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 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 "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 }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"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, !6, i64 0}
!12 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 24}
!15 = !{!12, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; 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.ctaes_test = type { i32, ptr, ptr, ptr }
%struct.AES128_ctx = type { [11 x %struct.AES_state] }
%struct.AES_state = type { [8 x i16] }
%struct.AES192_ctx = type { [13 x %struct.AES_state] }
%struct.AES256_ctx = type { [15 x %struct.AES_state] }

@ctaes_tests = external hidden local_unnamed_addr constant [15 x %struct.ctaes_test], align 16
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main() local_unnamed_addr #0 {
  %1 = alloca [32 x i8], align 16
  %2 = alloca [16 x i8], align 16
  %3 = alloca [16 x i8], align 16
  %4 = alloca [16 x i8], align 16
  %5 = alloca [16 x i8], align 16
  %6 = alloca %struct.AES128_ctx, align 2
  %7 = alloca %struct.AES192_ctx, align 2
  %8 = alloca %struct.AES256_ctx, align 2
  br label %9

9:                                                ; preds = %0, %41
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %41 ]
  %.02228 = phi i32 [ 0, %0 ], [ %.2, %41 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %10 = getelementptr inbounds [15 x %struct.ctaes_test], ptr @ctaes_tests, i64 0, i64 %indvars.iv
  %11 = load i32, ptr %10, align 16, !tbaa !5
  switch i32 %11, label %12 [
    i32 128, label %13
    i32 192, label %13
    i32 256, label %13
  ]

12:                                               ; preds = %9
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 66, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

13:                                               ; preds = %9, %9, %9
  %14 = getelementptr inbounds i8, ptr %10, i64 16
  %15 = load ptr, ptr %14, align 16, !tbaa !11
  call void @from_hex(ptr noundef nonnull %2, i32 noundef 16, ptr noundef %15)
  %16 = getelementptr inbounds i8, ptr %10, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  call void @from_hex(ptr noundef nonnull %3, i32 noundef 16, ptr noundef %17)
  switch i32 %11, label %27 [
    i32 128, label %18
    i32 192, label %21
    i32 256, label %24
  ]

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %6) #6
  %19 = getelementptr inbounds i8, ptr %10, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  call void @from_hex(ptr noundef nonnull %1, i32 noundef 16, ptr noundef %20)
  call void @AES128_init(ptr noundef nonnull %6, ptr noundef nonnull %1) #6
  call void @AES128_encrypt(ptr noundef nonnull %6, i64 noundef 1, ptr noundef nonnull %4, ptr noundef nonnull %2) #6
  call void @AES128_decrypt(ptr noundef nonnull %6, i64 noundef 1, ptr noundef nonnull %5, ptr noundef nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %6) #6
  br label %27

21:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %7) #6
  %22 = getelementptr inbounds i8, ptr %10, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  call void @from_hex(ptr noundef nonnull %1, i32 noundef 24, ptr noundef %23)
  call void @AES192_init(ptr noundef nonnull %7, ptr noundef nonnull %1) #6
  call void @AES192_encrypt(ptr noundef nonnull %7, i64 noundef 1, ptr noundef nonnull %4, ptr noundef nonnull %2) #6
  call void @AES192_decrypt(ptr noundef nonnull %7, i64 noundef 1, ptr noundef nonnull %5, ptr noundef nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %7) #6
  br label %27

24:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %8) #6
  %25 = getelementptr inbounds i8, ptr %10, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  call void @from_hex(ptr noundef nonnull %1, i32 noundef 32, ptr noundef %26)
  call void @AES256_init(ptr noundef nonnull %8, ptr noundef nonnull %1) #6
  call void @AES256_encrypt(ptr noundef nonnull %8, i64 noundef 1, ptr noundef nonnull %4, ptr noundef nonnull %2) #6
  call void @AES256_decrypt(ptr noundef nonnull %8, i64 noundef 1, ptr noundef nonnull %5, ptr noundef nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %8) #6
  br label %27

27:                                               ; preds = %24, %21, %18, %13
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) %4, i64 16)
  %.not = icmp eq i32 %bcmp, 0
  br i1 %.not, label %34, label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr @stderr, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %10, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.2, ptr noundef %31, ptr noundef %15, ptr noundef %17) #8
  %33 = add nsw i32 %.02228, 1
  br label %34

34:                                               ; preds = %28, %27
  %.1 = phi i32 [ %33, %28 ], [ %.02228, %27 ]
  %bcmp25 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %2, ptr noundef nonnull dereferenceable(16) %5, i64 16)
  %.not26 = icmp eq i32 %bcmp25, 0
  br i1 %.not26, label %41, label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr @stderr, align 8, !tbaa !14
  %37 = getelementptr inbounds i8, ptr %10, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.3, ptr noundef %38, ptr noundef %17, ptr noundef %15) #8
  %40 = add nsw i32 %.1, 1
  br label %41

41:                                               ; preds = %35, %34
  %.2 = phi i32 [ %40, %35 ], [ %.1, %34 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 15
  br i1 %exitcond.not, label %42, label %9, !llvm.loop !15

42:                                               ; preds = %41
  %43 = icmp eq i32 %.2, 0
  %44 = load ptr, ptr @stderr, align 8, !tbaa !14
  br i1 %43, label %45, label %47

45:                                               ; preds = %42
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.4) #8
  br label %49

47:                                               ; preds = %42
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.5, i32 noundef %.2) #8
  br label %49

49:                                               ; preds = %47, %45
  %50 = icmp ne i32 %.2, 0
  %51 = zext i1 %50 to i32
  ret i32 %51
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare void @AES128_init(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES128_encrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES128_decrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @AES192_init(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES192_encrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES192_decrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES256_init(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES256_encrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @AES256_decrypt(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) 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 = { noreturn 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 = { "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 = { 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 #5 = { nofree nounwind willreturn memory(argmem: read) }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { cold 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!6, !10, i64 24}
!13 = !{!6, !10, i64 8}
!14 = !{!10, !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,SROAPass,SimplifyCFGPass