; LLVM IR from ARMmbed/mbed-crypto :: library (aes)

; 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.mbedtls_aes_context = type { i32, ptr, [68 x i32] }
%struct.mbedtls_aes_xts_context = type { %struct.mbedtls_aes_context, %struct.mbedtls_aes_context }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@aes_test_ecb_dec = external hidden constant [3 x [16 x i8]], align 16
@aes_test_ecb_enc = external hidden constant [3 x [16 x i8]], align 16
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_cbc_dec = external hidden constant [3 x [16 x i8]], align 16
@aes_test_cbc_enc = external hidden constant [3 x [16 x i8]], align 16
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@aes_test_cfb128_iv = external hidden constant [16 x i8], align 16
@aes_test_cfb128_ct = external hidden constant [3 x [64 x i8]], align 16
@aes_test_cfb128_pt = external hidden constant [64 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_ofb_iv = external hidden constant [16 x i8], align 16
@aes_test_ofb_ct = external hidden constant [3 x [64 x i8]], align 16
@aes_test_ofb_pt = external hidden constant [64 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_ctr_nonce_counter = external hidden constant [3 x [16 x i8]], align 16
@aes_test_ctr_key = external hidden constant [3 x [16 x i8]], align 16
@aes_test_ctr_len = external hidden constant [3 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_xts_key = external hidden constant [3 x [32 x i8]], align 16
@aes_test_xts_ct32 = external hidden constant [3 x [32 x i8]], align 16
@aes_test_xts_pt32 = external hidden constant [3 x [32 x i8]], align 16
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@aes_test_cfb128_key = external hidden constant <{ <{ [16 x i8], [16 x i8] }>, <{ [24 x i8], [8 x i8] }>, [32 x i8] }>, align 16
@aes_test_ofb_key = external hidden constant <{ <{ [16 x i8], [16 x i8] }>, <{ [24 x i8], [8 x i8] }>, [32 x i8] }>, align 16
@aes_test_ctr_ct = external hidden constant <{ <{ [16 x i8], [32 x i8] }>, <{ [32 x i8], [16 x i8] }>, <{ [36 x i8], [12 x i8] }> }>, align 16
@aes_test_ctr_pt = external hidden constant <{ <{ [16 x i8], [32 x i8] }>, <{ [32 x i8], [16 x i8] }>, <{ [36 x i8], [12 x i8] }> }>, align 16
@aes_test_xts_data_unit = external hidden constant <{ [16 x i8], <{ i8, i8, i8, i8, i8, [11 x i8] }>, <{ i8, i8, i8, i8, i8, [11 x i8] }> }>, align 16

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_aes_init(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) #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_setkey_enc(ptr noundef, ptr noundef, i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_setkey_dec(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_xts_setkey_enc(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_xts_setkey_dec(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_ecb(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_aes_self_test(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [32 x i8], align 16
  %11 = alloca [64 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca [16 x i8], align 16
  %14 = alloca [16 x i8], align 16
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca [16 x i8], align 16
  %18 = alloca [16 x i8], align 16
  %19 = alloca %struct.mbedtls_aes_context, align 8
  %20 = alloca [16 x i8], align 16
  %21 = alloca %struct.mbedtls_aes_xts_context, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  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 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 288, ptr %19) #6
  %24 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %24, i8 0, i64 32, i1 false)
  call void @mbedtls_aes_init(ptr noundef %19)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %106, %1
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = icmp slt i32 %26, 6
  br i1 %27, label %28, label %109

28:                                               ; preds = %25
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = ashr i32 %29, 1
  store i32 %30, ptr %7, align 4, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = mul nsw i32 %31, 64
  %33 = add nsw i32 128, %32
  store i32 %33, ptr %9, align 4, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = and i32 %34, 1
  store i32 %35, ptr %8, align 4, !tbaa !5
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %45

38:                                               ; preds = %28
  %39 = load i32, ptr %9, align 4, !tbaa !5
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = icmp eq i32 %40, 0
  %42 = zext i1 %41 to i64
  %43 = select i1 %41, ptr @.str.1, ptr @.str.2
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %39, ptr noundef %43)
  br label %45

45:                                               ; preds = %38, %28
  %46 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %46, i8 0, i64 16, i1 false)
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %57

49:                                               ; preds = %45
  %50 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = call i32 @mbedtls_aes_setkey_dec(ptr noundef %19, ptr noundef %50, i32 noundef %51)
  store i32 %52, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_ecb_dec, i64 0, i64 %54
  %56 = getelementptr inbounds [16 x i8], ptr %55, i64 0, i64 0
  store ptr %56, ptr %12, align 8, !tbaa !9
  br label %65

57:                                               ; preds = %45
  %58 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = call i32 @mbedtls_aes_setkey_enc(ptr noundef %19, ptr noundef %58, i32 noundef %59)
  store i32 %60, ptr %4, align 4, !tbaa !5
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_ecb_enc, i64 0, i64 %62
  %64 = getelementptr inbounds [16 x i8], ptr %63, i64 0, i64 0
  store ptr %64, ptr %12, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %57, %49
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = icmp eq i32 %66, -114
  br i1 %67, label %68, label %73

68:                                               ; preds = %65
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 192
  br i1 %70, label %71, label %73

71:                                               ; preds = %68
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %106

73:                                               ; preds = %68, %65
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  br label %598

77:                                               ; preds = %73
  br label %78

78:                                               ; preds = %77
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %91, %78
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 10000
  br i1 %81, label %82, label %94

82:                                               ; preds = %79
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %85 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %86 = call i32 @mbedtls_aes_crypt_ecb(ptr noundef %19, i32 noundef %83, ptr noundef %84, ptr noundef %85)
  store i32 %86, ptr %4, align 4, !tbaa !5
  %87 = load i32, ptr %4, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %82
  br label %598

90:                                               ; preds = %82
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %6, align 4, !tbaa !5
  br label %79, !llvm.loop !11

94:                                               ; preds = %79
  %95 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %96 = load ptr, ptr %12, align 8, !tbaa !9
  %97 = call i32 @memcmp(ptr noundef %95, ptr noundef %96, i64 noundef 16) #7
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %94
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %598

100:                                              ; preds = %94
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %105

103:                                              ; preds = %100
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %105

105:                                              ; preds = %103, %100
  br label %106

106:                                              ; preds = %105, %71
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %5, align 4, !tbaa !5
  br label %25, !llvm.loop !13

109:                                              ; preds = %25
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %109
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %114

114:                                              ; preds = %112, %109
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %209, %114
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = icmp slt i32 %116, 6
  br i1 %117, label %118, label %212

118:                                              ; preds = %115
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = ashr i32 %119, 1
  store i32 %120, ptr %7, align 4, !tbaa !5
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = mul nsw i32 %121, 64
  %123 = add nsw i32 128, %122
  store i32 %123, ptr %9, align 4, !tbaa !5
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = and i32 %124, 1
  store i32 %125, ptr %8, align 4, !tbaa !5
  %126 = load i32, ptr %3, align 4, !tbaa !5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %135

128:                                              ; preds = %118
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = icmp eq i32 %130, 0
  %132 = zext i1 %131 to i64
  %133 = select i1 %131, ptr @.str.1, ptr @.str.2
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %129, ptr noundef %133)
  br label %135

135:                                              ; preds = %128, %118
  %136 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %136, i8 0, i64 16, i1 false)
  %137 = getelementptr inbounds [16 x i8], ptr %14, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %137, i8 0, i64 16, i1 false)
  %138 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %138, i8 0, i64 16, i1 false)
  %139 = load i32, ptr %8, align 4, !tbaa !5
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %149

141:                                              ; preds = %135
  %142 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = call i32 @mbedtls_aes_setkey_dec(ptr noundef %19, ptr noundef %142, i32 noundef %143)
  store i32 %144, ptr %4, align 4, !tbaa !5
  %145 = load i32, ptr %7, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_cbc_dec, i64 0, i64 %146
  %148 = getelementptr inbounds [16 x i8], ptr %147, i64 0, i64 0
  store ptr %148, ptr %12, align 8, !tbaa !9
  br label %157

149:                                              ; preds = %135
  %150 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = call i32 @mbedtls_aes_setkey_enc(ptr noundef %19, ptr noundef %150, i32 noundef %151)
  store i32 %152, ptr %4, align 4, !tbaa !5
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_cbc_enc, i64 0, i64 %154
  %156 = getelementptr inbounds [16 x i8], ptr %155, i64 0, i64 0
  store ptr %156, ptr %12, align 8, !tbaa !9
  br label %157

157:                                              ; preds = %149, %141
  %158 = load i32, ptr %4, align 4, !tbaa !5
  %159 = icmp eq i32 %158, -114
  br i1 %159, label %160, label %165

160:                                              ; preds = %157
  %161 = load i32, ptr %9, align 4, !tbaa !5
  %162 = icmp eq i32 %161, 192
  br i1 %162, label %163, label %165

163:                                              ; preds = %160
  %164 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %209

165:                                              ; preds = %160, %157
  %166 = load i32, ptr %4, align 4, !tbaa !5
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %169

168:                                              ; preds = %165
  br label %598

169:                                              ; preds = %165
  br label %170

170:                                              ; preds = %169
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %194, %170
  %172 = load i32, ptr %6, align 4, !tbaa !5
  %173 = icmp slt i32 %172, 10000
  br i1 %173, label %174, label %197

174:                                              ; preds = %171
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = icmp eq i32 %175, 1
  br i1 %176, label %177, label %184

177:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  %178 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  %179 = getelementptr inbounds [16 x i8], ptr %14, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %178, ptr align 16 %179, i64 16, i1 false)
  %180 = getelementptr inbounds [16 x i8], ptr %14, i64 0, i64 0
  %181 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %180, ptr align 16 %181, i64 16, i1 false)
  %182 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %183 = getelementptr inbounds [16 x i8], ptr %20, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %182, ptr align 16 %183, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  br label %184

184:                                              ; preds = %177, %174
  %185 = load i32, ptr %8, align 4, !tbaa !5
  %186 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %187 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %188 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %189 = call i32 @mbedtls_aes_crypt_cbc(ptr noundef %19, i32 noundef %185, i64 noundef 16, ptr noundef %186, ptr noundef %187, ptr noundef %188)
  store i32 %189, ptr %4, align 4, !tbaa !5
  %190 = load i32, ptr %4, align 4, !tbaa !5
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %193

192:                                              ; preds = %184
  br label %598

193:                                              ; preds = %184
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %6, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %6, align 4, !tbaa !5
  br label %171, !llvm.loop !14

197:                                              ; preds = %171
  %198 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %199 = load ptr, ptr %12, align 8, !tbaa !9
  %200 = call i32 @memcmp(ptr noundef %198, ptr noundef %199, i64 noundef 16) #7
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %203

202:                                              ; preds = %197
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %598

203:                                              ; preds = %197
  %204 = load i32, ptr %3, align 4, !tbaa !5
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %208

206:                                              ; preds = %203
  %207 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %208

208:                                              ; preds = %206, %203
  br label %209

209:                                              ; preds = %208, %163
  %210 = load i32, ptr %5, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %5, align 4, !tbaa !5
  br label %115, !llvm.loop !15

212:                                              ; preds = %115
  %213 = load i32, ptr %3, align 4, !tbaa !5
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %215, label %217

215:                                              ; preds = %212
  %216 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %217

217:                                              ; preds = %215, %212
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %218

218:                                              ; preds = %299, %217
  %219 = load i32, ptr %5, align 4, !tbaa !5
  %220 = icmp slt i32 %219, 6
  br i1 %220, label %221, label %302

221:                                              ; preds = %218
  %222 = load i32, ptr %5, align 4, !tbaa !5
  %223 = ashr i32 %222, 1
  store i32 %223, ptr %7, align 4, !tbaa !5
  %224 = load i32, ptr %7, align 4, !tbaa !5
  %225 = mul nsw i32 %224, 64
  %226 = add nsw i32 128, %225
  store i32 %226, ptr %9, align 4, !tbaa !5
  %227 = load i32, ptr %5, align 4, !tbaa !5
  %228 = and i32 %227, 1
  store i32 %228, ptr %8, align 4, !tbaa !5
  %229 = load i32, ptr %3, align 4, !tbaa !5
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %238

231:                                              ; preds = %221
  %232 = load i32, ptr %9, align 4, !tbaa !5
  %233 = load i32, ptr %8, align 4, !tbaa !5
  %234 = icmp eq i32 %233, 0
  %235 = zext i1 %234 to i64
  %236 = select i1 %234, ptr @.str.1, ptr @.str.2
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %232, ptr noundef %236)
  br label %238

238:                                              ; preds = %231, %221
  %239 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %239, ptr align 16 @aes_test_cfb128_iv, i64 16, i1 false)
  %240 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %241 = load i32, ptr %7, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_cfb128_key, i64 0, i64 %242
  %244 = getelementptr inbounds [32 x i8], ptr %243, i64 0, i64 0
  %245 = load i32, ptr %9, align 4, !tbaa !5
  %246 = udiv i32 %245, 8
  %247 = zext i32 %246 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %240, ptr align 16 %244, i64 %247, i1 false)
  store i64 0, ptr %15, align 8, !tbaa !16
  %248 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %249 = load i32, ptr %9, align 4, !tbaa !5
  %250 = call i32 @mbedtls_aes_setkey_enc(ptr noundef %19, ptr noundef %248, i32 noundef %249)
  store i32 %250, ptr %4, align 4, !tbaa !5
  %251 = load i32, ptr %4, align 4, !tbaa !5
  %252 = icmp eq i32 %251, -114
  br i1 %252, label %253, label %258

253:                                              ; preds = %238
  %254 = load i32, ptr %9, align 4, !tbaa !5
  %255 = icmp eq i32 %254, 192
  br i1 %255, label %256, label %258

256:                                              ; preds = %253
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %299

258:                                              ; preds = %253, %238
  %259 = load i32, ptr %4, align 4, !tbaa !5
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %261, label %262

261:                                              ; preds = %258
  br label %598

262:                                              ; preds = %258
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %8, align 4, !tbaa !5
  %265 = icmp eq i32 %264, 0
  br i1 %265, label %266, label %272

266:                                              ; preds = %263
  %267 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %268 = load i32, ptr %7, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_cfb128_ct, i64 0, i64 %269
  %271 = getelementptr inbounds [64 x i8], ptr %270, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %267, ptr align 16 %271, i64 64, i1 false)
  store ptr @aes_test_cfb128_pt, ptr %12, align 8, !tbaa !9
  br label %278

272:                                              ; preds = %263
  %273 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %273, ptr align 16 @aes_test_cfb128_pt, i64 64, i1 false)
  %274 = load i32, ptr %7, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_cfb128_ct, i64 0, i64 %275
  %277 = getelementptr inbounds [64 x i8], ptr %276, i64 0, i64 0
  store ptr %277, ptr %12, align 8, !tbaa !9
  br label %278

278:                                              ; preds = %272, %266
  %279 = load i32, ptr %8, align 4, !tbaa !5
  %280 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %281 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %282 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %283 = call i32 @mbedtls_aes_crypt_cfb128(ptr noundef %19, i32 noundef %279, i64 noundef 64, ptr noundef %15, ptr noundef %280, ptr noundef %281, ptr noundef %282)
  store i32 %283, ptr %4, align 4, !tbaa !5
  %284 = load i32, ptr %4, align 4, !tbaa !5
  %285 = icmp ne i32 %284, 0
  br i1 %285, label %286, label %287

286:                                              ; preds = %278
  br label %598

287:                                              ; preds = %278
  %288 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %289 = load ptr, ptr %12, align 8, !tbaa !9
  %290 = call i32 @memcmp(ptr noundef %288, ptr noundef %289, i64 noundef 64) #7
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %292, label %293

292:                                              ; preds = %287
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %598

293:                                              ; preds = %287
  %294 = load i32, ptr %3, align 4, !tbaa !5
  %295 = icmp ne i32 %294, 0
  br i1 %295, label %296, label %298

296:                                              ; preds = %293
  %297 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %298

298:                                              ; preds = %296, %293
  br label %299

299:                                              ; preds = %298, %256
  %300 = load i32, ptr %5, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %5, align 4, !tbaa !5
  br label %218, !llvm.loop !18

302:                                              ; preds = %218
  %303 = load i32, ptr %3, align 4, !tbaa !5
  %304 = icmp ne i32 %303, 0
  br i1 %304, label %305, label %307

305:                                              ; preds = %302
  %306 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %307

307:                                              ; preds = %305, %302
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %308

308:                                              ; preds = %388, %307
  %309 = load i32, ptr %5, align 4, !tbaa !5
  %310 = icmp slt i32 %309, 6
  br i1 %310, label %311, label %391

311:                                              ; preds = %308
  %312 = load i32, ptr %5, align 4, !tbaa !5
  %313 = ashr i32 %312, 1
  store i32 %313, ptr %7, align 4, !tbaa !5
  %314 = load i32, ptr %7, align 4, !tbaa !5
  %315 = mul nsw i32 %314, 64
  %316 = add nsw i32 128, %315
  store i32 %316, ptr %9, align 4, !tbaa !5
  %317 = load i32, ptr %5, align 4, !tbaa !5
  %318 = and i32 %317, 1
  store i32 %318, ptr %8, align 4, !tbaa !5
  %319 = load i32, ptr %3, align 4, !tbaa !5
  %320 = icmp ne i32 %319, 0
  br i1 %320, label %321, label %328

321:                                              ; preds = %311
  %322 = load i32, ptr %9, align 4, !tbaa !5
  %323 = load i32, ptr %8, align 4, !tbaa !5
  %324 = icmp eq i32 %323, 0
  %325 = zext i1 %324 to i64
  %326 = select i1 %324, ptr @.str.1, ptr @.str.2
  %327 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %322, ptr noundef %326)
  br label %328

328:                                              ; preds = %321, %311
  %329 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %329, ptr align 16 @aes_test_ofb_iv, i64 16, i1 false)
  %330 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %331 = load i32, ptr %7, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_ofb_key, i64 0, i64 %332
  %334 = getelementptr inbounds [32 x i8], ptr %333, i64 0, i64 0
  %335 = load i32, ptr %9, align 4, !tbaa !5
  %336 = udiv i32 %335, 8
  %337 = zext i32 %336 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %330, ptr align 16 %334, i64 %337, i1 false)
  store i64 0, ptr %15, align 8, !tbaa !16
  %338 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %339 = load i32, ptr %9, align 4, !tbaa !5
  %340 = call i32 @mbedtls_aes_setkey_enc(ptr noundef %19, ptr noundef %338, i32 noundef %339)
  store i32 %340, ptr %4, align 4, !tbaa !5
  %341 = load i32, ptr %4, align 4, !tbaa !5
  %342 = icmp eq i32 %341, -114
  br i1 %342, label %343, label %348

343:                                              ; preds = %328
  %344 = load i32, ptr %9, align 4, !tbaa !5
  %345 = icmp eq i32 %344, 192
  br i1 %345, label %346, label %348

346:                                              ; preds = %343
  %347 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %388

348:                                              ; preds = %343, %328
  %349 = load i32, ptr %4, align 4, !tbaa !5
  %350 = icmp ne i32 %349, 0
  br i1 %350, label %351, label %352

351:                                              ; preds = %348
  br label %598

352:                                              ; preds = %348
  br label %353

353:                                              ; preds = %352
  %354 = load i32, ptr %8, align 4, !tbaa !5
  %355 = icmp eq i32 %354, 0
  br i1 %355, label %356, label %362

356:                                              ; preds = %353
  %357 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %358 = load i32, ptr %7, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_ofb_ct, i64 0, i64 %359
  %361 = getelementptr inbounds [64 x i8], ptr %360, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %357, ptr align 16 %361, i64 64, i1 false)
  store ptr @aes_test_ofb_pt, ptr %12, align 8, !tbaa !9
  br label %368

362:                                              ; preds = %353
  %363 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %363, ptr align 16 @aes_test_ofb_pt, i64 64, i1 false)
  %364 = load i32, ptr %7, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_ofb_ct, i64 0, i64 %365
  %367 = getelementptr inbounds [64 x i8], ptr %366, i64 0, i64 0
  store ptr %367, ptr %12, align 8, !tbaa !9
  br label %368

368:                                              ; preds = %362, %356
  %369 = getelementptr inbounds [16 x i8], ptr %13, i64 0, i64 0
  %370 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %371 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %372 = call i32 @mbedtls_aes_crypt_ofb(ptr noundef %19, i64 noundef 64, ptr noundef %15, ptr noundef %369, ptr noundef %370, ptr noundef %371)
  store i32 %372, ptr %4, align 4, !tbaa !5
  %373 = load i32, ptr %4, align 4, !tbaa !5
  %374 = icmp ne i32 %373, 0
  br i1 %374, label %375, label %376

375:                                              ; preds = %368
  br label %598

376:                                              ; preds = %368
  %377 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %378 = load ptr, ptr %12, align 8, !tbaa !9
  %379 = call i32 @memcmp(ptr noundef %377, ptr noundef %378, i64 noundef 64) #7
  %380 = icmp ne i32 %379, 0
  br i1 %380, label %381, label %382

381:                                              ; preds = %376
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %598

382:                                              ; preds = %376
  %383 = load i32, ptr %3, align 4, !tbaa !5
  %384 = icmp ne i32 %383, 0
  br i1 %384, label %385, label %387

385:                                              ; preds = %382
  %386 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %387

387:                                              ; preds = %385, %382
  br label %388

388:                                              ; preds = %387, %346
  %389 = load i32, ptr %5, align 4, !tbaa !5
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %5, align 4, !tbaa !5
  br label %308, !llvm.loop !19

391:                                              ; preds = %308
  %392 = load i32, ptr %3, align 4, !tbaa !5
  %393 = icmp ne i32 %392, 0
  br i1 %393, label %394, label %396

394:                                              ; preds = %391
  %395 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %396

396:                                              ; preds = %394, %391
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %397

397:                                              ; preds = %484, %396
  %398 = load i32, ptr %5, align 4, !tbaa !5
  %399 = icmp slt i32 %398, 6
  br i1 %399, label %400, label %487

400:                                              ; preds = %397
  %401 = load i32, ptr %5, align 4, !tbaa !5
  %402 = ashr i32 %401, 1
  store i32 %402, ptr %7, align 4, !tbaa !5
  %403 = load i32, ptr %5, align 4, !tbaa !5
  %404 = and i32 %403, 1
  store i32 %404, ptr %8, align 4, !tbaa !5
  %405 = load i32, ptr %3, align 4, !tbaa !5
  %406 = icmp ne i32 %405, 0
  br i1 %406, label %407, label %413

407:                                              ; preds = %400
  %408 = load i32, ptr %8, align 4, !tbaa !5
  %409 = icmp eq i32 %408, 0
  %410 = zext i1 %409 to i64
  %411 = select i1 %409, ptr @.str.1, ptr @.str.2
  %412 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %411)
  br label %413

413:                                              ; preds = %407, %400
  %414 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %415 = load i32, ptr %7, align 4, !tbaa !5
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_ctr_nonce_counter, i64 0, i64 %416
  %418 = getelementptr inbounds [16 x i8], ptr %417, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %414, ptr align 16 %418, i64 16, i1 false)
  %419 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %420 = load i32, ptr %7, align 4, !tbaa !5
  %421 = sext i32 %420 to i64
  %422 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_ctr_key, i64 0, i64 %421
  %423 = getelementptr inbounds [16 x i8], ptr %422, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %419, ptr align 16 %423, i64 16, i1 false)
  store i64 0, ptr %15, align 8, !tbaa !16
  %424 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %425 = call i32 @mbedtls_aes_setkey_enc(ptr noundef %19, ptr noundef %424, i32 noundef 128)
  store i32 %425, ptr %4, align 4, !tbaa !5
  %426 = icmp ne i32 %425, 0
  br i1 %426, label %427, label %428

427:                                              ; preds = %413
  br label %598

428:                                              ; preds = %413
  %429 = load i32, ptr %7, align 4, !tbaa !5
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [3 x i32], ptr @aes_test_ctr_len, i64 0, i64 %430
  %432 = load i32, ptr %431, align 4, !tbaa !5
  store i32 %432, ptr %16, align 4, !tbaa !5
  %433 = load i32, ptr %8, align 4, !tbaa !5
  %434 = icmp eq i32 %433, 0
  br i1 %434, label %435, label %447

435:                                              ; preds = %428
  %436 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %437 = load i32, ptr %7, align 4, !tbaa !5
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds [3 x [48 x i8]], ptr @aes_test_ctr_ct, i64 0, i64 %438
  %440 = getelementptr inbounds [48 x i8], ptr %439, i64 0, i64 0
  %441 = load i32, ptr %16, align 4, !tbaa !5
  %442 = sext i32 %441 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %436, ptr align 16 %440, i64 %442, i1 false)
  %443 = load i32, ptr %7, align 4, !tbaa !5
  %444 = sext i32 %443 to i64
  %445 = getelementptr inbounds [3 x [48 x i8]], ptr @aes_test_ctr_pt, i64 0, i64 %444
  %446 = getelementptr inbounds [48 x i8], ptr %445, i64 0, i64 0
  store ptr %446, ptr %12, align 8, !tbaa !9
  br label %459

447:                                              ; preds = %428
  %448 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %449 = load i32, ptr %7, align 4, !tbaa !5
  %450 = sext i32 %449 to i64
  %451 = getelementptr inbounds [3 x [48 x i8]], ptr @aes_test_ctr_pt, i64 0, i64 %450
  %452 = getelementptr inbounds [48 x i8], ptr %451, i64 0, i64 0
  %453 = load i32, ptr %16, align 4, !tbaa !5
  %454 = sext i32 %453 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %448, ptr align 16 %452, i64 %454, i1 false)
  %455 = load i32, ptr %7, align 4, !tbaa !5
  %456 = sext i32 %455 to i64
  %457 = getelementptr inbounds [3 x [48 x i8]], ptr @aes_test_ctr_ct, i64 0, i64 %456
  %458 = getelementptr inbounds [48 x i8], ptr %457, i64 0, i64 0
  store ptr %458, ptr %12, align 8, !tbaa !9
  br label %459

459:                                              ; preds = %447, %435
  %460 = load i32, ptr %16, align 4, !tbaa !5
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds [16 x i8], ptr %17, i64 0, i64 0
  %463 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %464 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %465 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %466 = call i32 @mbedtls_aes_crypt_ctr(ptr noundef %19, i64 noundef %461, ptr noundef %15, ptr noundef %462, ptr noundef %463, ptr noundef %464, ptr noundef %465)
  store i32 %466, ptr %4, align 4, !tbaa !5
  %467 = load i32, ptr %4, align 4, !tbaa !5
  %468 = icmp ne i32 %467, 0
  br i1 %468, label %469, label %470

469:                                              ; preds = %459
  br label %598

470:                                              ; preds = %459
  %471 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %472 = load ptr, ptr %12, align 8, !tbaa !9
  %473 = load i32, ptr %16, align 4, !tbaa !5
  %474 = sext i32 %473 to i64
  %475 = call i32 @memcmp(ptr noundef %471, ptr noundef %472, i64 noundef %474) #7
  %476 = icmp ne i32 %475, 0
  br i1 %476, label %477, label %478

477:                                              ; preds = %470
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %598

478:                                              ; preds = %470
  %479 = load i32, ptr %3, align 4, !tbaa !5
  %480 = icmp ne i32 %479, 0
  br i1 %480, label %481, label %483

481:                                              ; preds = %478
  %482 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %483

483:                                              ; preds = %481, %478
  br label %484

484:                                              ; preds = %483
  %485 = load i32, ptr %5, align 4, !tbaa !5
  %486 = add nsw i32 %485, 1
  store i32 %486, ptr %5, align 4, !tbaa !5
  br label %397, !llvm.loop !20

487:                                              ; preds = %397
  %488 = load i32, ptr %3, align 4, !tbaa !5
  %489 = icmp ne i32 %488, 0
  br i1 %489, label %490, label %492

490:                                              ; preds = %487
  %491 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %492

492:                                              ; preds = %490, %487
  call void @llvm.lifetime.start.p0(i64 576, ptr %21) #6
  call void @mbedtls_aes_xts_init(ptr noundef %21)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %493

493:                                              ; preds = %586, %492
  %494 = load i32, ptr %5, align 4, !tbaa !5
  %495 = icmp slt i32 %494, 6
  br i1 %495, label %496, label %589

496:                                              ; preds = %493
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %497 = load i32, ptr %5, align 4, !tbaa !5
  %498 = ashr i32 %497, 1
  store i32 %498, ptr %7, align 4, !tbaa !5
  %499 = load i32, ptr %5, align 4, !tbaa !5
  %500 = and i32 %499, 1
  store i32 %500, ptr %8, align 4, !tbaa !5
  %501 = load i32, ptr %3, align 4, !tbaa !5
  %502 = icmp ne i32 %501, 0
  br i1 %502, label %503, label %509

503:                                              ; preds = %496
  %504 = load i32, ptr %8, align 4, !tbaa !5
  %505 = icmp eq i32 %504, 0
  %506 = zext i1 %505 to i64
  %507 = select i1 %505, ptr @.str.1, ptr @.str.2
  %508 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef %507)
  br label %509

509:                                              ; preds = %503, %496
  %510 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %510, i8 0, i64 32, i1 false)
  %511 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %512 = load i32, ptr %7, align 4, !tbaa !5
  %513 = sext i32 %512 to i64
  %514 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_xts_key, i64 0, i64 %513
  %515 = getelementptr inbounds [32 x i8], ptr %514, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %511, ptr align 16 %515, i64 32, i1 false)
  %516 = load i32, ptr %7, align 4, !tbaa !5
  %517 = sext i32 %516 to i64
  %518 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_xts_data_unit, i64 0, i64 %517
  %519 = getelementptr inbounds [16 x i8], ptr %518, i64 0, i64 0
  store ptr %519, ptr %22, align 8, !tbaa !9
  store i32 32, ptr %16, align 4, !tbaa !5
  %520 = load i32, ptr %8, align 4, !tbaa !5
  %521 = icmp eq i32 %520, 0
  br i1 %521, label %522, label %540

522:                                              ; preds = %509
  %523 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %524 = call i32 @mbedtls_aes_xts_setkey_dec(ptr noundef %21, ptr noundef %523, i32 noundef 256)
  store i32 %524, ptr %4, align 4, !tbaa !5
  %525 = load i32, ptr %4, align 4, !tbaa !5
  %526 = icmp ne i32 %525, 0
  br i1 %526, label %527, label %528

527:                                              ; preds = %522
  store i32 5, ptr %23, align 4
  br label %583

528:                                              ; preds = %522
  %529 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %530 = load i32, ptr %7, align 4, !tbaa !5
  %531 = sext i32 %530 to i64
  %532 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_xts_ct32, i64 0, i64 %531
  %533 = getelementptr inbounds [32 x i8], ptr %532, i64 0, i64 0
  %534 = load i32, ptr %16, align 4, !tbaa !5
  %535 = sext i32 %534 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %529, ptr align 16 %533, i64 %535, i1 false)
  %536 = load i32, ptr %7, align 4, !tbaa !5
  %537 = sext i32 %536 to i64
  %538 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_xts_pt32, i64 0, i64 %537
  %539 = getelementptr inbounds [32 x i8], ptr %538, i64 0, i64 0
  store ptr %539, ptr %12, align 8, !tbaa !9
  br label %558

540:                                              ; preds = %509
  %541 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %542 = call i32 @mbedtls_aes_xts_setkey_enc(ptr noundef %21, ptr noundef %541, i32 noundef 256)
  store i32 %542, ptr %4, align 4, !tbaa !5
  %543 = load i32, ptr %4, align 4, !tbaa !5
  %544 = icmp ne i32 %543, 0
  br i1 %544, label %545, label %546

545:                                              ; preds = %540
  store i32 5, ptr %23, align 4
  br label %583

546:                                              ; preds = %540
  %547 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %548 = load i32, ptr %7, align 4, !tbaa !5
  %549 = sext i32 %548 to i64
  %550 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_xts_pt32, i64 0, i64 %549
  %551 = getelementptr inbounds [32 x i8], ptr %550, i64 0, i64 0
  %552 = load i32, ptr %16, align 4, !tbaa !5
  %553 = sext i32 %552 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %547, ptr align 16 %551, i64 %553, i1 false)
  %554 = load i32, ptr %7, align 4, !tbaa !5
  %555 = sext i32 %554 to i64
  %556 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_xts_ct32, i64 0, i64 %555
  %557 = getelementptr inbounds [32 x i8], ptr %556, i64 0, i64 0
  store ptr %557, ptr %12, align 8, !tbaa !9
  br label %558

558:                                              ; preds = %546, %528
  %559 = load i32, ptr %8, align 4, !tbaa !5
  %560 = load i32, ptr %16, align 4, !tbaa !5
  %561 = sext i32 %560 to i64
  %562 = load ptr, ptr %22, align 8, !tbaa !9
  %563 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %564 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %565 = call i32 @mbedtls_aes_crypt_xts(ptr noundef %21, i32 noundef %559, i64 noundef %561, ptr noundef %562, ptr noundef %563, ptr noundef %564)
  store i32 %565, ptr %4, align 4, !tbaa !5
  %566 = load i32, ptr %4, align 4, !tbaa !5
  %567 = icmp ne i32 %566, 0
  br i1 %567, label %568, label %569

568:                                              ; preds = %558
  store i32 5, ptr %23, align 4
  br label %583

569:                                              ; preds = %558
  %570 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %571 = load ptr, ptr %12, align 8, !tbaa !9
  %572 = load i32, ptr %16, align 4, !tbaa !5
  %573 = sext i32 %572 to i64
  %574 = call i32 @memcmp(ptr noundef %570, ptr noundef %571, i64 noundef %573) #7
  %575 = icmp ne i32 %574, 0
  br i1 %575, label %576, label %577

576:                                              ; preds = %569
  store i32 1, ptr %4, align 4, !tbaa !5
  store i32 5, ptr %23, align 4
  br label %583

577:                                              ; preds = %569
  %578 = load i32, ptr %3, align 4, !tbaa !5
  %579 = icmp ne i32 %578, 0
  br i1 %579, label %580, label %582

580:                                              ; preds = %577
  %581 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %582

582:                                              ; preds = %580, %577
  store i32 0, ptr %23, align 4
  br label %583

583:                                              ; preds = %582, %576, %568, %545, %527
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %584 = load i32, ptr %23, align 4
  switch i32 %584, label %595 [
    i32 0, label %585
  ]

585:                                              ; preds = %583
  br label %586

586:                                              ; preds = %585
  %587 = load i32, ptr %5, align 4, !tbaa !5
  %588 = add nsw i32 %587, 1
  store i32 %588, ptr %5, align 4, !tbaa !5
  br label %493, !llvm.loop !21

589:                                              ; preds = %493
  %590 = load i32, ptr %3, align 4, !tbaa !5
  %591 = icmp ne i32 %590, 0
  br i1 %591, label %592, label %594

592:                                              ; preds = %589
  %593 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %594

594:                                              ; preds = %592, %589
  call void @mbedtls_aes_xts_free(ptr noundef %21)
  store i32 0, ptr %23, align 4
  br label %595

595:                                              ; preds = %594, %583
  call void @llvm.lifetime.end.p0(i64 576, ptr %21) #6
  %596 = load i32, ptr %23, align 4
  switch i32 %596, label %608 [
    i32 0, label %597
    i32 5, label %598
  ]

597:                                              ; preds = %595
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %598

598:                                              ; preds = %597, %595, %477, %469, %427, %381, %375, %351, %292, %286, %261, %202, %192, %168, %99, %89, %76
  %599 = load i32, ptr %4, align 4, !tbaa !5
  %600 = icmp ne i32 %599, 0
  br i1 %600, label %601, label %606

601:                                              ; preds = %598
  %602 = load i32, ptr %3, align 4, !tbaa !5
  %603 = icmp ne i32 %602, 0
  br i1 %603, label %604, label %606

604:                                              ; preds = %601
  %605 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  br label %606

606:                                              ; preds = %604, %601, %598
  call void @mbedtls_aes_free(ptr noundef %19)
  %607 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %607, ptr %2, align 4
  store i32 1, ptr %23, align 4
  br label %608

608:                                              ; preds = %606, %595
  call void @llvm.lifetime.end.p0(i64 288, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %609 = load i32, ptr %2, align 4
  ret i32 %609
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 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 nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 #6 = { nounwind }
attributes #7 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; 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.mbedtls_aes_context = type { i32, ptr, [68 x i32] }
%struct.mbedtls_aes_xts_context = type { %struct.mbedtls_aes_context, %struct.mbedtls_aes_context }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@aes_test_ecb_dec = external hidden constant [3 x [16 x i8]], align 16
@aes_test_ecb_enc = external hidden constant [3 x [16 x i8]], align 16
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_cbc_dec = external hidden constant [3 x [16 x i8]], align 16
@aes_test_cbc_enc = external hidden constant [3 x [16 x i8]], align 16
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@aes_test_cfb128_iv = external hidden local_unnamed_addr constant [16 x i8], align 16
@aes_test_cfb128_ct = external hidden constant [3 x [64 x i8]], align 16
@aes_test_cfb128_pt = external hidden constant [64 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_ofb_iv = external hidden local_unnamed_addr constant [16 x i8], align 16
@aes_test_ofb_ct = external hidden constant [3 x [64 x i8]], align 16
@aes_test_ofb_pt = external hidden constant [64 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_ctr_nonce_counter = external hidden local_unnamed_addr constant [3 x [16 x i8]], align 16
@aes_test_ctr_key = external hidden local_unnamed_addr constant [3 x [16 x i8]], align 16
@aes_test_ctr_len = external hidden local_unnamed_addr constant [3 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1
@aes_test_xts_key = external hidden local_unnamed_addr constant [3 x [32 x i8]], align 16
@aes_test_xts_ct32 = external hidden constant [3 x [32 x i8]], align 16
@aes_test_xts_pt32 = external hidden constant [3 x [32 x i8]], align 16
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@aes_test_cfb128_key = external hidden local_unnamed_addr constant <{ <{ [16 x i8], [16 x i8] }>, <{ [24 x i8], [8 x i8] }>, [32 x i8] }>, align 16
@aes_test_ofb_key = external hidden local_unnamed_addr constant <{ <{ [16 x i8], [16 x i8] }>, <{ [24 x i8], [8 x i8] }>, [32 x i8] }>, align 16
@aes_test_ctr_ct = external hidden constant <{ <{ [16 x i8], [32 x i8] }>, <{ [32 x i8], [16 x i8] }>, <{ [36 x i8], [12 x i8] }> }>, align 16
@aes_test_ctr_pt = external hidden constant <{ <{ [16 x i8], [32 x i8] }>, <{ [32 x i8], [16 x i8] }>, <{ [36 x i8], [12 x i8] }> }>, align 16
@aes_test_xts_data_unit = external hidden constant <{ [16 x i8], <{ i8, i8, i8, i8, i8, [11 x i8] }>, <{ i8, i8, i8, i8, i8, [11 x i8] }> }>, align 16

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_aes_init(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) #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_setkey_enc(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_setkey_dec(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_xts_setkey_enc(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_xts_setkey_dec(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_ecb(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_cbc(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress 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) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_xts(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_cfb128(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_ofb(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_aes_crypt_ctr(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_aes_self_test(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca [32 x i8], align 16
  %3 = alloca [64 x i8], align 16
  %4 = alloca [16 x i8], align 16
  %5 = alloca [16 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca [16 x i8], align 16
  %8 = alloca [16 x i8], align 16
  %9 = alloca %struct.mbedtls_aes_context, align 8
  %10 = alloca [16 x i8], align 16
  %11 = alloca %struct.mbedtls_aes_xts_context, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 64, 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)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 288, ptr nonnull %9) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %2, i8 0, i64 32, i1 false)
  call void @mbedtls_aes_init(ptr noundef nonnull %9)
  %.not208 = icmp eq i32 %0, 0
  br label %.backedge321

.backedge321:                                     ; preds = %.backedge321.backedge, %1
  %.0156246 = phi i32 [ 0, %1 ], [ %.0156246.be, %.backedge321.backedge ]
  %12 = lshr i32 %.0156246, 1
  %13 = shl nuw nsw i32 %12, 6
  %14 = add nuw nsw i32 %13, 128
  %15 = and i32 %.0156246, 1
  br i1 %.not208, label %20, label %16

16:                                               ; preds = %.backedge321
  %17 = icmp eq i32 %15, 0
  %18 = select i1 %17, ptr @.str.1, ptr @.str.2
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %14, ptr noundef nonnull %18)
  br label %20

20:                                               ; preds = %16, %.backedge321
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  %21 = icmp eq i32 %15, 0
  %22 = zext nneg i32 %12 to i64
  br i1 %21, label %23, label %25

23:                                               ; preds = %20
  %24 = call i32 @mbedtls_aes_setkey_dec(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef %14)
  br label %27

25:                                               ; preds = %20
  %26 = call i32 @mbedtls_aes_setkey_enc(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef %14)
  br label %27

27:                                               ; preds = %25, %23
  %aes_test_ecb_enc.sink = phi ptr [ @aes_test_ecb_enc, %25 ], [ @aes_test_ecb_dec, %23 ]
  %.1163 = phi i32 [ %26, %25 ], [ %24, %23 ]
  %28 = getelementptr inbounds [3 x [16 x i8]], ptr %aes_test_ecb_enc.sink, i64 0, i64 %22
  %29 = icmp eq i32 %.1163, -114
  %30 = icmp eq i32 %14, 192
  %or.cond = select i1 %29, i1 %30, i1 false
  br i1 %or.cond, label %37, label %31

31:                                               ; preds = %27
  %.not209 = icmp eq i32 %.1163, 0
  br i1 %.not209, label %.preheader240, label %.loopexit

32:                                               ; preds = %.preheader240
  %33 = add nuw nsw i32 %.0154245, 1
  %exitcond.not = icmp eq i32 %33, 10000
  br i1 %exitcond.not, label %35, label %.preheader240, !llvm.loop !5

.preheader240:                                    ; preds = %31, %32
  %.0154245 = phi i32 [ %33, %32 ], [ 0, %31 ]
  %34 = call i32 @mbedtls_aes_crypt_ecb(ptr noundef nonnull %9, i32 noundef %15, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not212 = icmp eq i32 %34, 0
  br i1 %.not212, label %32, label %.loopexit

35:                                               ; preds = %32
  %bcmp210 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) %28, i64 16)
  %.not211 = icmp eq i32 %bcmp210, 0
  br i1 %.not211, label %36, label %.loopexit

36:                                               ; preds = %35
  br i1 %.not208, label %.thread281, label %.thread

37:                                               ; preds = %27
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %39 = add nuw nsw i32 %.0156246, 1
  %exitcond271.not = icmp eq i32 %39, 6
  br i1 %exitcond271.not, label %43, label %.backedge321.backedge

.backedge321.backedge:                            ; preds = %37, %.thread, %.thread281
  %.0156246.be = phi i32 [ %39, %37 ], [ %42, %.thread ], [ %40, %.thread281 ]
  br label %.backedge321, !llvm.loop !7

.thread281:                                       ; preds = %36
  %40 = add nuw nsw i32 %.0156246, 1
  %exitcond271.not282 = icmp eq i32 %40, 6
  br i1 %exitcond271.not282, label %.thread283.preheader, label %.backedge321.backedge

.thread:                                          ; preds = %36
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %42 = add nuw nsw i32 %.0156246, 1
  %exitcond271.not279 = icmp eq i32 %42, 6
  br i1 %exitcond271.not279, label %.thread280, label %.backedge321.backedge

43:                                               ; preds = %37
  br i1 %.not208, label %.thread283.preheader, label %.thread280

.thread280:                                       ; preds = %.thread, %43
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread283.preheader

.thread283.preheader:                             ; preds = %.thread281, %.thread280, %43
  br label %.thread283

.thread283:                                       ; preds = %.thread283.backedge, %.thread283.preheader
  %.1157248 = phi i32 [ 0, %.thread283.preheader ], [ %.1157248.be, %.thread283.backedge ]
  %45 = lshr i32 %.1157248, 1
  %46 = shl nuw nsw i32 %45, 6
  %47 = add nuw nsw i32 %46, 128
  %48 = and i32 %.1157248, 1
  br i1 %.not208, label %53, label %49

49:                                               ; preds = %.thread283
  %50 = icmp eq i32 %48, 0
  %51 = select i1 %50, ptr @.str.1, ptr @.str.2
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %47, ptr noundef nonnull %51)
  br label %53

53:                                               ; preds = %49, %.thread283
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  %54 = icmp eq i32 %48, 0
  %55 = zext nneg i32 %45 to i64
  br i1 %54, label %56, label %58

56:                                               ; preds = %53
  %57 = call i32 @mbedtls_aes_setkey_dec(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef %47)
  br label %60

58:                                               ; preds = %53
  %59 = call i32 @mbedtls_aes_setkey_enc(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef %47)
  br label %60

60:                                               ; preds = %58, %56
  %aes_test_cbc_enc.sink = phi ptr [ @aes_test_cbc_enc, %58 ], [ @aes_test_cbc_dec, %56 ]
  %.5167 = phi i32 [ %59, %58 ], [ %57, %56 ]
  %61 = getelementptr inbounds [3 x [16 x i8]], ptr %aes_test_cbc_enc.sink, i64 0, i64 %55
  %62 = icmp eq i32 %.5167, -114
  %63 = icmp eq i32 %47, 192
  %or.cond3 = select i1 %62, i1 %63, i1 false
  br i1 %or.cond3, label %72, label %64

64:                                               ; preds = %60
  %.not203 = icmp eq i32 %.5167, 0
  br i1 %.not203, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %64
  br i1 %54, label %.preheader.split.us, label %.preheader.split

.preheader.split.us:                              ; preds = %.preheader, %66
  %.1155247.us = phi i32 [ %67, %66 ], [ 0, %.preheader ]
  %65 = call i32 @mbedtls_aes_crypt_cbc(ptr noundef nonnull %9, i32 noundef 0, i64 noundef 16, ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not207.us = icmp eq i32 %65, 0
  br i1 %.not207.us, label %66, label %.loopexit

66:                                               ; preds = %.preheader.split.us
  %67 = add nuw nsw i32 %.1155247.us, 1
  %exitcond273.not = icmp eq i32 %67, 10000
  br i1 %exitcond273.not, label %.split.us, label %.preheader.split.us, !llvm.loop !8

68:                                               ; preds = %.preheader.split
  %69 = add nuw nsw i32 %.1155247, 1
  %exitcond272.not = icmp eq i32 %69, 10000
  br i1 %exitcond272.not, label %.split.us, label %.preheader.split, !llvm.loop !8

.preheader.split:                                 ; preds = %.preheader, %68
  %.1155247 = phi i32 [ %69, %68 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %3, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) %10, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10)
  %70 = call i32 @mbedtls_aes_crypt_cbc(ptr noundef nonnull %9, i32 noundef %48, i64 noundef 16, ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not207 = icmp eq i32 %70, 0
  br i1 %.not207, label %68, label %.loopexit

.split.us:                                        ; preds = %68, %66
  %bcmp204 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %3, ptr noundef nonnull dereferenceable(16) %61, i64 16)
  %.not205 = icmp eq i32 %bcmp204, 0
  br i1 %.not205, label %71, label %.loopexit

71:                                               ; preds = %.split.us
  br i1 %.not208, label %.thread287, label %.thread284

72:                                               ; preds = %60
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %74 = add nuw nsw i32 %.1157248, 1
  %exitcond274.not = icmp eq i32 %74, 6
  br i1 %exitcond274.not, label %78, label %.thread283.backedge

.thread283.backedge:                              ; preds = %72, %.thread284, %.thread287
  %.1157248.be = phi i32 [ %74, %72 ], [ %77, %.thread284 ], [ %75, %.thread287 ]
  br label %.thread283, !llvm.loop !9

.thread287:                                       ; preds = %71
  %75 = add nuw nsw i32 %.1157248, 1
  %exitcond274.not288 = icmp eq i32 %75, 6
  br i1 %exitcond274.not288, label %.thread289.preheader, label %.thread283.backedge

.thread284:                                       ; preds = %71
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %77 = add nuw nsw i32 %.1157248, 1
  %exitcond274.not285 = icmp eq i32 %77, 6
  br i1 %exitcond274.not285, label %.thread286, label %.thread283.backedge

78:                                               ; preds = %72
  br i1 %.not208, label %.thread289.preheader, label %.thread286

.thread286:                                       ; preds = %.thread284, %78
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread289.preheader

.thread289.preheader:                             ; preds = %.thread287, %.thread286, %78
  br label %.thread289

.thread289:                                       ; preds = %.thread289.backedge, %.thread289.preheader
  %.2158249 = phi i32 [ 0, %.thread289.preheader ], [ %.2158249.be, %.thread289.backedge ]
  %80 = lshr i32 %.2158249, 1
  %81 = shl nuw nsw i32 %80, 6
  %82 = add nuw nsw i32 %81, 128
  %83 = and i32 %.2158249, 1
  br i1 %.not208, label %88, label %84

84:                                               ; preds = %.thread289
  %85 = icmp eq i32 %83, 0
  %86 = select i1 %85, ptr @.str.1, ptr @.str.2
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %82, ptr noundef nonnull %86)
  br label %88

88:                                               ; preds = %84, %.thread289
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 16 dereferenceable(16) @aes_test_cfb128_iv, i64 16, i1 false)
  %89 = zext nneg i32 %80 to i64
  %90 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_cfb128_key, i64 0, i64 %89
  %91 = lshr exact i32 %82, 3
  %92 = zext nneg i32 %91 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %2, ptr noundef nonnull align 16 dereferenceable(1) %90, i64 %92, i1 false)
  store i64 0, ptr %6, align 8, !tbaa !10
  %93 = call i32 @mbedtls_aes_setkey_enc(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef %82)
  %94 = icmp eq i32 %93, -114
  %95 = icmp eq i32 %82, 192
  %or.cond5 = select i1 %94, i1 %95, i1 false
  br i1 %or.cond5, label %107, label %96

96:                                               ; preds = %88
  %.not199 = icmp eq i32 %93, 0
  br i1 %.not199, label %97, label %.loopexit

97:                                               ; preds = %96
  %98 = icmp eq i32 %83, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %97
  %100 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_cfb128_ct, i64 0, i64 %89
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, ptr noundef nonnull align 16 dereferenceable(64) %100, i64 64, i1 false)
  br label %103

101:                                              ; preds = %97
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, ptr noundef nonnull align 16 dereferenceable(64) @aes_test_cfb128_pt, i64 64, i1 false)
  %102 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_cfb128_ct, i64 0, i64 %89
  br label %103

103:                                              ; preds = %101, %99
  %.2 = phi ptr [ @aes_test_cfb128_pt, %99 ], [ %102, %101 ]
  %104 = call i32 @mbedtls_aes_crypt_cfb128(ptr noundef nonnull %9, i32 noundef %83, i64 noundef 64, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not200 = icmp eq i32 %104, 0
  br i1 %.not200, label %105, label %.loopexit

105:                                              ; preds = %103
  %bcmp201 = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %3, ptr noundef nonnull dereferenceable(64) %.2, i64 64)
  %.not202 = icmp eq i32 %bcmp201, 0
  br i1 %.not202, label %106, label %.loopexit

106:                                              ; preds = %105
  br i1 %.not208, label %.thread293, label %.thread290

107:                                              ; preds = %88
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %109 = add nuw nsw i32 %.2158249, 1
  %exitcond275.not = icmp eq i32 %109, 6
  br i1 %exitcond275.not, label %113, label %.thread289.backedge

.thread289.backedge:                              ; preds = %107, %.thread290, %.thread293
  %.2158249.be = phi i32 [ %109, %107 ], [ %112, %.thread290 ], [ %110, %.thread293 ]
  br label %.thread289, !llvm.loop !14

.thread293:                                       ; preds = %106
  %110 = add nuw nsw i32 %.2158249, 1
  %exitcond275.not294 = icmp eq i32 %110, 6
  br i1 %exitcond275.not294, label %.thread295.preheader, label %.thread289.backedge

.thread290:                                       ; preds = %106
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %112 = add nuw nsw i32 %.2158249, 1
  %exitcond275.not291 = icmp eq i32 %112, 6
  br i1 %exitcond275.not291, label %.thread292, label %.thread289.backedge

113:                                              ; preds = %107
  br i1 %.not208, label %.thread295.preheader, label %.thread292

.thread292:                                       ; preds = %.thread290, %113
  %114 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread295.preheader

.thread295.preheader:                             ; preds = %.thread293, %.thread292, %113
  br label %.thread295

.thread295:                                       ; preds = %.thread295.backedge, %.thread295.preheader
  %.3159250 = phi i32 [ 0, %.thread295.preheader ], [ %.3159250.be, %.thread295.backedge ]
  %115 = lshr i32 %.3159250, 1
  %116 = shl nuw nsw i32 %115, 6
  %117 = add nuw nsw i32 %116, 128
  %118 = and i32 %.3159250, 1
  br i1 %.not208, label %123, label %119

119:                                              ; preds = %.thread295
  %120 = icmp eq i32 %118, 0
  %121 = select i1 %120, ptr @.str.1, ptr @.str.2
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %117, ptr noundef nonnull %121)
  br label %123

123:                                              ; preds = %119, %.thread295
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 16 dereferenceable(16) @aes_test_ofb_iv, i64 16, i1 false)
  %124 = zext nneg i32 %115 to i64
  %125 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_ofb_key, i64 0, i64 %124
  %126 = lshr exact i32 %117, 3
  %127 = zext nneg i32 %126 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %2, ptr noundef nonnull align 16 dereferenceable(1) %125, i64 %127, i1 false)
  store i64 0, ptr %6, align 8, !tbaa !10
  %128 = call i32 @mbedtls_aes_setkey_enc(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef %117)
  %129 = icmp eq i32 %128, -114
  %130 = icmp eq i32 %117, 192
  %or.cond7 = select i1 %129, i1 %130, i1 false
  br i1 %or.cond7, label %142, label %131

131:                                              ; preds = %123
  %.not195 = icmp eq i32 %128, 0
  br i1 %.not195, label %132, label %.loopexit

132:                                              ; preds = %131
  %133 = icmp eq i32 %118, 0
  br i1 %133, label %134, label %136

134:                                              ; preds = %132
  %135 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_ofb_ct, i64 0, i64 %124
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, ptr noundef nonnull align 16 dereferenceable(64) %135, i64 64, i1 false)
  br label %138

136:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, ptr noundef nonnull align 16 dereferenceable(64) @aes_test_ofb_pt, i64 64, i1 false)
  %137 = getelementptr inbounds [3 x [64 x i8]], ptr @aes_test_ofb_ct, i64 0, i64 %124
  br label %138

138:                                              ; preds = %136, %134
  %.3 = phi ptr [ @aes_test_ofb_pt, %134 ], [ %137, %136 ]
  %139 = call i32 @mbedtls_aes_crypt_ofb(ptr noundef nonnull %9, i64 noundef 64, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not196 = icmp eq i32 %139, 0
  br i1 %.not196, label %140, label %.loopexit

140:                                              ; preds = %138
  %bcmp197 = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %3, ptr noundef nonnull dereferenceable(64) %.3, i64 64)
  %.not198 = icmp eq i32 %bcmp197, 0
  br i1 %.not198, label %141, label %.loopexit

141:                                              ; preds = %140
  br i1 %.not208, label %.thread299, label %.thread296

142:                                              ; preds = %123
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %144 = add nuw nsw i32 %.3159250, 1
  %exitcond276.not = icmp eq i32 %144, 6
  br i1 %exitcond276.not, label %148, label %.thread295.backedge

.thread295.backedge:                              ; preds = %142, %.thread296, %.thread299
  %.3159250.be = phi i32 [ %144, %142 ], [ %147, %.thread296 ], [ %145, %.thread299 ]
  br label %.thread295, !llvm.loop !15

.thread299:                                       ; preds = %141
  %145 = add nuw nsw i32 %.3159250, 1
  %exitcond276.not300 = icmp eq i32 %145, 6
  br i1 %exitcond276.not300, label %.thread301.preheader, label %.thread295.backedge

.thread296:                                       ; preds = %141
  %146 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %147 = add nuw nsw i32 %.3159250, 1
  %exitcond276.not297 = icmp eq i32 %147, 6
  br i1 %exitcond276.not297, label %.thread298, label %.thread295.backedge

148:                                              ; preds = %142
  br i1 %.not208, label %.thread301.preheader, label %.thread298

.thread298:                                       ; preds = %.thread296, %148
  %149 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread301.preheader

.thread301.preheader:                             ; preds = %.thread299, %.thread298, %148
  br label %.thread301

.thread301:                                       ; preds = %.thread301.backedge, %.thread301.preheader
  %.4160251 = phi i32 [ 0, %.thread301.preheader ], [ %.4160251.be, %.thread301.backedge ]
  %150 = lshr i32 %.4160251, 1
  %151 = and i32 %.4160251, 1
  br i1 %.not208, label %156, label %152

152:                                              ; preds = %.thread301
  %153 = icmp eq i32 %151, 0
  %154 = select i1 %153, ptr @.str.1, ptr @.str.2
  %155 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %154)
  br label %156

156:                                              ; preds = %152, %.thread301
  %157 = zext nneg i32 %150 to i64
  %158 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_ctr_nonce_counter, i64 0, i64 %157
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %158, i64 16, i1 false)
  %159 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_ctr_key, i64 0, i64 %157
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, ptr noundef nonnull align 16 dereferenceable(16) %159, i64 16, i1 false)
  store i64 0, ptr %6, align 8, !tbaa !10
  %160 = call i32 @mbedtls_aes_setkey_enc(ptr noundef nonnull %9, ptr noundef nonnull %2, i32 noundef 128)
  %.not191 = icmp eq i32 %160, 0
  br i1 %.not191, label %161, label %.loopexit

161:                                              ; preds = %156
  %162 = getelementptr inbounds [3 x i32], ptr @aes_test_ctr_len, i64 0, i64 %157
  %163 = load i32, ptr %162, align 4, !tbaa !16
  %164 = icmp eq i32 %151, 0
  %165 = sext i32 %163 to i64
  %aes_test_ctr_ct.aes_test_ctr_pt = select i1 %164, ptr @aes_test_ctr_ct, ptr @aes_test_ctr_pt
  %166 = getelementptr inbounds [3 x [48 x i8]], ptr %aes_test_ctr_ct.aes_test_ctr_pt, i64 0, i64 %157
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %3, ptr nonnull align 16 %166, i64 %165, i1 false)
  %167 = call i32 @mbedtls_aes_crypt_ctr(ptr noundef nonnull %9, i64 noundef %165, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not192 = icmp eq i32 %167, 0
  br i1 %.not192, label %168, label %.loopexit

168:                                              ; preds = %161
  %aes_test_ctr_pt.aes_test_ctr_ct = select i1 %164, ptr @aes_test_ctr_pt, ptr @aes_test_ctr_ct
  %.4 = getelementptr inbounds [3 x [48 x i8]], ptr %aes_test_ctr_pt.aes_test_ctr_ct, i64 0, i64 %157
  %bcmp193 = call i32 @bcmp(ptr nonnull %3, ptr nonnull %.4, i64 %165)
  %.not194 = icmp eq i32 %bcmp193, 0
  br i1 %.not194, label %169, label %.loopexit

169:                                              ; preds = %168
  br i1 %.not208, label %170, label %.thread302

170:                                              ; preds = %169
  %171 = add nuw nsw i32 %.4160251, 1
  %exitcond277.not = icmp eq i32 %171, 6
  br i1 %exitcond277.not, label %.loopexit305, label %.thread301.backedge

.thread301.backedge:                              ; preds = %170, %.thread302
  %.4160251.be = phi i32 [ %171, %170 ], [ %173, %.thread302 ]
  br label %.thread301, !llvm.loop !18

.thread302:                                       ; preds = %169
  %172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %173 = add nuw nsw i32 %.4160251, 1
  %exitcond277.not303 = icmp eq i32 %173, 6
  br i1 %exitcond277.not303, label %174, label %.thread301.backedge

174:                                              ; preds = %.thread302
  %175 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.loopexit305

.loopexit305:                                     ; preds = %170, %174
  call void @llvm.lifetime.start.p0(i64 576, ptr nonnull %11) #6
  call void @mbedtls_aes_xts_init(ptr noundef nonnull %11)
  br label %176

176:                                              ; preds = %.loopexit305, %198
  %.5161252 = phi i32 [ 0, %.loopexit305 ], [ %199, %198 ]
  %177 = lshr i32 %.5161252, 1
  %178 = and i32 %.5161252, 1
  br i1 %.not208, label %183, label %179

179:                                              ; preds = %176
  %180 = icmp eq i32 %178, 0
  %181 = select i1 %180, ptr @.str.1, ptr @.str.2
  %182 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef nonnull %181)
  br label %183

183:                                              ; preds = %179, %176
  %184 = zext nneg i32 %177 to i64
  %185 = getelementptr inbounds [3 x [32 x i8]], ptr @aes_test_xts_key, i64 0, i64 %184
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %2, ptr noundef nonnull align 16 dereferenceable(32) %185, i64 32, i1 false)
  %186 = getelementptr inbounds [3 x [16 x i8]], ptr @aes_test_xts_data_unit, i64 0, i64 %184
  %187 = icmp eq i32 %178, 0
  br i1 %187, label %188, label %190

188:                                              ; preds = %183
  %189 = call i32 @mbedtls_aes_xts_setkey_dec(ptr noundef nonnull %11, ptr noundef nonnull %2, i32 noundef 256)
  %.not188 = icmp eq i32 %189, 0
  br i1 %.not188, label %192, label %.thread226

190:                                              ; preds = %183
  %191 = call i32 @mbedtls_aes_xts_setkey_enc(ptr noundef nonnull %11, ptr noundef nonnull %2, i32 noundef 256)
  %.not187 = icmp eq i32 %191, 0
  br i1 %.not187, label %192, label %.thread226

192:                                              ; preds = %190, %188
  %aes_test_xts_pt32.sink = phi ptr [ @aes_test_xts_ct32, %188 ], [ @aes_test_xts_pt32, %190 ]
  %aes_test_xts_pt32.pn = phi ptr [ @aes_test_xts_pt32, %188 ], [ @aes_test_xts_ct32, %190 ]
  %193 = getelementptr inbounds [3 x [32 x i8]], ptr %aes_test_xts_pt32.sink, i64 0, i64 %184
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %3, ptr noundef nonnull align 16 dereferenceable(32) %193, i64 32, i1 false)
  %194 = call i32 @mbedtls_aes_crypt_xts(ptr noundef nonnull %11, i32 noundef %178, i64 noundef 32, ptr noundef nonnull %186, ptr noundef nonnull %3, ptr noundef nonnull %3)
  %.not189 = icmp eq i32 %194, 0
  br i1 %.not189, label %195, label %.thread226

195:                                              ; preds = %192
  %.5 = getelementptr inbounds [3 x [32 x i8]], ptr %aes_test_xts_pt32.pn, i64 0, i64 %184
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(32) %3, ptr noundef nonnull dereferenceable(32) %.5, i64 32)
  %.not190 = icmp ne i32 %bcmp, 0
  %brmerge = or i1 %.not208, %.not190
  br i1 %brmerge, label %197, label %.thread218

.thread218:                                       ; preds = %195
  %196 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %198

.thread226:                                       ; preds = %192, %190, %188
  %.14.ph = phi i32 [ %194, %192 ], [ %191, %190 ], [ %189, %188 ]
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %11) #6
  br label %.loopexit

197:                                              ; preds = %195
  br i1 %.not190, label %203, label %198

198:                                              ; preds = %.thread218, %197
  %199 = add nuw nsw i32 %.5161252, 1
  %exitcond278.not = icmp eq i32 %199, 6
  br i1 %exitcond278.not, label %200, label %176, !llvm.loop !19

200:                                              ; preds = %198
  br i1 %.not208, label %.thread223, label %201

201:                                              ; preds = %200
  %202 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread223

.thread223:                                       ; preds = %200, %201
  call void @mbedtls_aes_xts_free(ptr noundef nonnull %11)
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %11) #6
  br label %.thread229

203:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %11) #6
  br label %.loopexit

.loopexit:                                        ; preds = %35, %31, %.preheader240, %.split.us, %64, %.preheader.split, %.preheader.split.us, %105, %103, %96, %140, %138, %131, %168, %161, %156, %203, %.thread226
  %.16 = phi i32 [ 1, %203 ], [ %.14.ph, %.thread226 ], [ 1, %168 ], [ %167, %161 ], [ %160, %156 ], [ 1, %140 ], [ %139, %138 ], [ %128, %131 ], [ 1, %105 ], [ %104, %103 ], [ %93, %96 ], [ %65, %.preheader.split.us ], [ %70, %.preheader.split ], [ 1, %.split.us ], [ %.5167, %64 ], [ %34, %.preheader240 ], [ 1, %35 ], [ %.1163, %31 ]
  %.not = icmp eq i32 %0, 0
  br i1 %.not, label %.thread229, label %204

204:                                              ; preds = %.loopexit
  %205 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %.thread229

.thread229:                                       ; preds = %.thread223, %204, %.loopexit
  %.16232 = phi i32 [ %.16, %204 ], [ %.16, %.loopexit ], [ 0, %.thread223 ]
  call void @mbedtls_aes_free(ptr noundef nonnull %9)
  call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  ret i32 %.16232
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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 nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C/C++ TBAA"}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !12, i64 0}
!18 = distinct !{!18, !6}
!19 = distinct !{!19, !6}


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