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

; 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_des_context = type { [32 x i32] }
%struct.mbedtls_des3_context = type { [96 x i32] }

@.str = external hidden unnamed_addr constant [23 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
@des3_test_buf = external hidden constant [8 x i8], align 1
@des3_test_keys = external hidden constant [24 x i8], align 16
@des3_test_ecb_dec = external hidden constant [3 x [8 x i8]], align 16
@des3_test_ecb_enc = external hidden constant [3 x [8 x i8]], align 16
@.str.3 = external hidden unnamed_addr constant [8 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 [23 x i8], align 1
@des3_test_iv = external hidden constant [8 x i8], align 1
@des3_test_cbc_dec = external hidden constant [3 x [8 x i8]], align 16
@des3_test_cbc_enc = external hidden constant [3 x [8 x i8]], align 16

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_des_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_des3_crypt_ecb(ptr noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_des_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 %struct.mbedtls_des_context, align 4
  %10 = alloca %struct.mbedtls_des3_context, align 4
  %11 = alloca [8 x i8], align 1
  %12 = alloca [8 x i8], align 1
  %13 = alloca [8 x i8], align 1
  %14 = alloca i32, align 4
  %15 = alloca [8 x i8], align 1
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 384, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @mbedtls_des_init(ptr noundef %9)
  call void @mbedtls_des3_init(ptr noundef %10)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %108, %1
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 6
  br i1 %18, label %19, label %111

19:                                               ; preds = %16
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = ashr i32 %20, 1
  store i32 %21, ptr %6, align 4, !tbaa !5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = and i32 %22, 1
  store i32 %23, ptr %7, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %39

26:                                               ; preds = %19
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 0
  %29 = zext i1 %28 to i64
  %30 = select i1 %28, i32 32, i32 51
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = mul nsw i32 %31, 56
  %33 = add nsw i32 56, %32
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 0
  %36 = zext i1 %35 to i64
  %37 = select i1 %35, ptr @.str.1, ptr @.str.2
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %30, i32 noundef %33, ptr noundef %37)
  br label %39

39:                                               ; preds = %26, %19
  %40 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %40, ptr align 1 @des3_test_buf, i64 8, i1 false)
  %41 = load i32, ptr %4, align 4, !tbaa !5
  switch i32 %41, label %54 [
    i32 0, label %42
    i32 1, label %44
    i32 2, label %46
    i32 3, label %48
    i32 4, label %50
    i32 5, label %52
  ]

42:                                               ; preds = %39
  %43 = call i32 @mbedtls_des_setkey_dec(ptr noundef %9, ptr noundef @des3_test_keys)
  br label %55

44:                                               ; preds = %39
  %45 = call i32 @mbedtls_des_setkey_enc(ptr noundef %9, ptr noundef @des3_test_keys)
  br label %55

46:                                               ; preds = %39
  %47 = call i32 @mbedtls_des3_set2key_dec(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %55

48:                                               ; preds = %39
  %49 = call i32 @mbedtls_des3_set2key_enc(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %55

50:                                               ; preds = %39
  %51 = call i32 @mbedtls_des3_set3key_dec(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %55

52:                                               ; preds = %39
  %53 = call i32 @mbedtls_des3_set3key_enc(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %55

54:                                               ; preds = %39
  store i32 1, ptr %2, align 4
  store i32 1, ptr %14, align 4
  br label %262

55:                                               ; preds = %52, %50, %48, %46, %44, %42
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %71, %55
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = icmp slt i32 %57, 100
  br i1 %58, label %59, label %74

59:                                               ; preds = %56
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %66

62:                                               ; preds = %59
  %63 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %64 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %65 = call i32 @mbedtls_des_crypt_ecb(ptr noundef %9, ptr noundef %63, ptr noundef %64)
  br label %70

66:                                               ; preds = %59
  %67 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %68 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %69 = call i32 @mbedtls_des3_crypt_ecb(ptr noundef %10, ptr noundef %67, ptr noundef %68)
  br label %70

70:                                               ; preds = %66, %62
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %5, align 4, !tbaa !5
  br label %56, !llvm.loop !9

74:                                               ; preds = %56
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %85

77:                                               ; preds = %74
  %78 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_ecb_dec, i64 0, i64 %80
  %82 = getelementptr inbounds [8 x i8], ptr %81, i64 0, i64 0
  %83 = call i32 @memcmp(ptr noundef %78, ptr noundef %82, i64 noundef 8) #6
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %96, label %85

85:                                               ; preds = %77, %74
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %102

88:                                               ; preds = %85
  %89 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_ecb_enc, i64 0, i64 %91
  %93 = getelementptr inbounds [8 x i8], ptr %92, i64 0, i64 0
  %94 = call i32 @memcmp(ptr noundef %89, ptr noundef %93, i64 noundef 8) #6
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %102

96:                                               ; preds = %88, %77
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %96
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %101

101:                                              ; preds = %99, %96
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %260

102:                                              ; preds = %88, %85
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %102
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %107

107:                                              ; preds = %105, %102
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %4, align 4, !tbaa !5
  br label %16, !llvm.loop !11

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

114:                                              ; preds = %111
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %116

116:                                              ; preds = %114, %111
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %251, %116
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = icmp slt i32 %118, 6
  br i1 %119, label %120, label %254

120:                                              ; preds = %117
  %121 = load i32, ptr %4, align 4, !tbaa !5
  %122 = ashr i32 %121, 1
  store i32 %122, ptr %6, align 4, !tbaa !5
  %123 = load i32, ptr %4, align 4, !tbaa !5
  %124 = and i32 %123, 1
  store i32 %124, ptr %7, align 4, !tbaa !5
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %140

127:                                              ; preds = %120
  %128 = load i32, ptr %6, align 4, !tbaa !5
  %129 = icmp eq i32 %128, 0
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, i32 32, i32 51
  %132 = load i32, ptr %6, align 4, !tbaa !5
  %133 = mul nsw i32 %132, 56
  %134 = add nsw i32 56, %133
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = icmp eq i32 %135, 0
  %137 = zext i1 %136 to i64
  %138 = select i1 %136, ptr @.str.1, ptr @.str.2
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %131, i32 noundef %134, ptr noundef %138)
  br label %140

140:                                              ; preds = %127, %120
  %141 = getelementptr inbounds [8 x i8], ptr %13, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %141, ptr align 1 @des3_test_iv, i64 8, i1 false)
  %142 = getelementptr inbounds [8 x i8], ptr %12, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %142, ptr align 1 @des3_test_iv, i64 8, i1 false)
  %143 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %143, ptr align 1 @des3_test_buf, i64 8, i1 false)
  %144 = load i32, ptr %4, align 4, !tbaa !5
  switch i32 %144, label %157 [
    i32 0, label %145
    i32 1, label %147
    i32 2, label %149
    i32 3, label %151
    i32 4, label %153
    i32 5, label %155
  ]

145:                                              ; preds = %140
  %146 = call i32 @mbedtls_des_setkey_dec(ptr noundef %9, ptr noundef @des3_test_keys)
  br label %158

147:                                              ; preds = %140
  %148 = call i32 @mbedtls_des_setkey_enc(ptr noundef %9, ptr noundef @des3_test_keys)
  br label %158

149:                                              ; preds = %140
  %150 = call i32 @mbedtls_des3_set2key_dec(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %158

151:                                              ; preds = %140
  %152 = call i32 @mbedtls_des3_set2key_enc(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %158

153:                                              ; preds = %140
  %154 = call i32 @mbedtls_des3_set3key_dec(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %158

155:                                              ; preds = %140
  %156 = call i32 @mbedtls_des3_set3key_enc(ptr noundef %10, ptr noundef @des3_test_keys)
  br label %158

157:                                              ; preds = %140
  store i32 1, ptr %2, align 4
  store i32 1, ptr %14, align 4
  br label %262

158:                                              ; preds = %155, %153, %151, %149, %147, %145
  %159 = load i32, ptr %7, align 4, !tbaa !5
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %185

161:                                              ; preds = %158
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %181, %161
  %163 = load i32, ptr %5, align 4, !tbaa !5
  %164 = icmp slt i32 %163, 100
  br i1 %164, label %165, label %184

165:                                              ; preds = %162
  %166 = load i32, ptr %6, align 4, !tbaa !5
  %167 = icmp eq i32 %166, 0
  br i1 %167, label %168, label %174

168:                                              ; preds = %165
  %169 = load i32, ptr %7, align 4, !tbaa !5
  %170 = getelementptr inbounds [8 x i8], ptr %13, i64 0, i64 0
  %171 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %172 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %173 = call i32 @mbedtls_des_crypt_cbc(ptr noundef %9, i32 noundef %169, i64 noundef 8, ptr noundef %170, ptr noundef %171, ptr noundef %172)
  br label %180

174:                                              ; preds = %165
  %175 = load i32, ptr %7, align 4, !tbaa !5
  %176 = getelementptr inbounds [8 x i8], ptr %13, i64 0, i64 0
  %177 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %178 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %179 = call i32 @mbedtls_des3_crypt_cbc(ptr noundef %10, i32 noundef %175, i64 noundef 8, ptr noundef %176, ptr noundef %177, ptr noundef %178)
  br label %180

180:                                              ; preds = %174, %168
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %5, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %5, align 4, !tbaa !5
  br label %162, !llvm.loop !12

184:                                              ; preds = %162
  br label %217

185:                                              ; preds = %158
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %186

186:                                              ; preds = %211, %185
  %187 = load i32, ptr %5, align 4, !tbaa !5
  %188 = icmp slt i32 %187, 100
  br i1 %188, label %189, label %214

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %190 = load i32, ptr %6, align 4, !tbaa !5
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %192, label %198

192:                                              ; preds = %189
  %193 = load i32, ptr %7, align 4, !tbaa !5
  %194 = getelementptr inbounds [8 x i8], ptr %13, i64 0, i64 0
  %195 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %196 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %197 = call i32 @mbedtls_des_crypt_cbc(ptr noundef %9, i32 noundef %193, i64 noundef 8, ptr noundef %194, ptr noundef %195, ptr noundef %196)
  br label %204

198:                                              ; preds = %189
  %199 = load i32, ptr %7, align 4, !tbaa !5
  %200 = getelementptr inbounds [8 x i8], ptr %13, i64 0, i64 0
  %201 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %202 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %203 = call i32 @mbedtls_des3_crypt_cbc(ptr noundef %10, i32 noundef %199, i64 noundef 8, ptr noundef %200, ptr noundef %201, ptr noundef %202)
  br label %204

204:                                              ; preds = %198, %192
  %205 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 0
  %206 = getelementptr inbounds [8 x i8], ptr %12, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %205, ptr align 1 %206, i64 8, i1 false)
  %207 = getelementptr inbounds [8 x i8], ptr %12, i64 0, i64 0
  %208 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %207, ptr align 1 %208, i64 8, i1 false)
  %209 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %210 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %209, ptr align 1 %210, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %211

211:                                              ; preds = %204
  %212 = load i32, ptr %5, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %5, align 4, !tbaa !5
  br label %186, !llvm.loop !13

214:                                              ; preds = %186
  %215 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %216 = getelementptr inbounds [8 x i8], ptr %12, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %215, ptr align 1 %216, i64 8, i1 false)
  br label %217

217:                                              ; preds = %214, %184
  %218 = load i32, ptr %7, align 4, !tbaa !5
  %219 = icmp eq i32 %218, 0
  br i1 %219, label %220, label %228

220:                                              ; preds = %217
  %221 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %222 = load i32, ptr %6, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_cbc_dec, i64 0, i64 %223
  %225 = getelementptr inbounds [8 x i8], ptr %224, i64 0, i64 0
  %226 = call i32 @memcmp(ptr noundef %221, ptr noundef %225, i64 noundef 8) #6
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %239, label %228

228:                                              ; preds = %220, %217
  %229 = load i32, ptr %7, align 4, !tbaa !5
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %245

231:                                              ; preds = %228
  %232 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %233 = load i32, ptr %6, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_cbc_enc, i64 0, i64 %234
  %236 = getelementptr inbounds [8 x i8], ptr %235, i64 0, i64 0
  %237 = call i32 @memcmp(ptr noundef %232, ptr noundef %236, i64 noundef 8) #6
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %239, label %245

239:                                              ; preds = %231, %220
  %240 = load i32, ptr %3, align 4, !tbaa !5
  %241 = icmp ne i32 %240, 0
  br i1 %241, label %242, label %244

242:                                              ; preds = %239
  %243 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %244

244:                                              ; preds = %242, %239
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %260

245:                                              ; preds = %231, %228
  %246 = load i32, ptr %3, align 4, !tbaa !5
  %247 = icmp ne i32 %246, 0
  br i1 %247, label %248, label %250

248:                                              ; preds = %245
  %249 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %250

250:                                              ; preds = %248, %245
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %4, align 4, !tbaa !5
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %4, align 4, !tbaa !5
  br label %117, !llvm.loop !14

254:                                              ; preds = %117
  %255 = load i32, ptr %3, align 4, !tbaa !5
  %256 = icmp ne i32 %255, 0
  br i1 %256, label %257, label %259

257:                                              ; preds = %254
  %258 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %259

259:                                              ; preds = %257, %254
  br label %260

260:                                              ; preds = %259, %244, %101
  call void @mbedtls_des_free(ptr noundef %9)
  call void @mbedtls_des3_free(ptr noundef %10)
  %261 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %261, ptr %2, align 4
  store i32 1, ptr %14, align 4
  br label %262

262:                                              ; preds = %260, %157, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 384, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %263 = load i32, ptr %2, align 4
  ret i32 %263
}

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

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 = { 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 #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 }
attributes #6 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; 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_des_context = type { [32 x i32] }
%struct.mbedtls_des3_context = type { [96 x i32] }

@.str = external hidden unnamed_addr constant [23 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
@des3_test_buf = external hidden local_unnamed_addr constant [8 x i8], align 1
@des3_test_keys = external hidden constant [24 x i8], align 16
@des3_test_ecb_dec = external hidden constant [3 x [8 x i8]], align 16
@des3_test_ecb_enc = external hidden constant [3 x [8 x i8]], align 16
@.str.3 = external hidden unnamed_addr constant [8 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 [23 x i8], align 1
@des3_test_iv = external hidden local_unnamed_addr constant [8 x i8], align 1
@des3_test_cbc_dec = external hidden constant [3 x [8 x i8]], align 16
@des3_test_cbc_enc = external hidden constant [3 x [8 x i8]], align 16

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_des_crypt_cbc(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_des3_crypt_ecb(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @mbedtls_des_self_test(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.mbedtls_des_context, align 4
  %3 = alloca %struct.mbedtls_des3_context, align 4
  %4 = alloca [8 x i8], align 8
  %5 = alloca [8 x i8], align 8
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @mbedtls_des_init(ptr noundef nonnull %2)
  call void @mbedtls_des3_init(ptr noundef nonnull %3)
  %.not62 = icmp eq i32 %0, 0
  %6 = load i64, ptr @des3_test_buf, align 1
  br label %.backedge105

.backedge105:                                     ; preds = %.backedge105.backedge, %1
  %.05474 = phi i32 [ 0, %1 ], [ %.05474.be, %.backedge105.backedge ]
  %7 = lshr i32 %.05474, 1
  %8 = and i32 %.05474, 1
  br i1 %.not62, label %17, label %9

9:                                                ; preds = %.backedge105
  %10 = icmp ult i32 %.05474, 2
  %11 = select i1 %10, i32 32, i32 51
  %12 = mul nuw nsw i32 %7, 56
  %13 = add nuw nsw i32 %12, 56
  %14 = icmp eq i32 %8, 0
  %15 = select i1 %14, ptr @.str.1, ptr @.str.2
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %11, i32 noundef %13, ptr noundef nonnull %15)
  br label %17

17:                                               ; preds = %9, %.backedge105
  store i64 %6, ptr %4, align 8
  switch i32 %.05474, label %default.unreachable [
    i32 0, label %18
    i32 1, label %20
    i32 2, label %22
    i32 3, label %24
    i32 4, label %26
    i32 5, label %28
  ]

18:                                               ; preds = %17
  %19 = call i32 @mbedtls_des_setkey_dec(ptr noundef nonnull %2, ptr noundef nonnull @des3_test_keys)
  br label %.split.us.preheader

20:                                               ; preds = %17
  %21 = call i32 @mbedtls_des_setkey_enc(ptr noundef nonnull %2, ptr noundef nonnull @des3_test_keys)
  br label %.split.us.preheader

.split.us.preheader:                              ; preds = %18, %20
  br label %.split.us

22:                                               ; preds = %17
  %23 = call i32 @mbedtls_des3_set2key_dec(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.split.preheader

.split.preheader:                                 ; preds = %28, %26, %24, %22
  br label %.split

24:                                               ; preds = %17
  %25 = call i32 @mbedtls_des3_set2key_enc(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.split.preheader

26:                                               ; preds = %17
  %27 = call i32 @mbedtls_des3_set3key_dec(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.split.preheader

28:                                               ; preds = %17
  %29 = call i32 @mbedtls_des3_set3key_enc(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.split.preheader

.split.us:                                        ; preds = %.split.us.preheader, %.split.us
  %.05371.us = phi i32 [ %31, %.split.us ], [ 0, %.split.us.preheader ]
  %30 = call i32 @mbedtls_des_crypt_ecb(ptr noundef nonnull %2, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %31 = add nuw nsw i32 %.05371.us, 1
  %exitcond84.not = icmp eq i32 %31, 100
  br i1 %exitcond84.not, label %.split73.us, label %.split.us, !llvm.loop !5

.split:                                           ; preds = %.split.preheader, %.split
  %.05371 = phi i32 [ %33, %.split ], [ 0, %.split.preheader ]
  %32 = call i32 @mbedtls_des3_crypt_ecb(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %33 = add nuw nsw i32 %.05371, 1
  %exitcond.not = icmp eq i32 %33, 100
  br i1 %exitcond.not, label %.split73.us, label %.split, !llvm.loop !5

.split73.us:                                      ; preds = %.split, %.split.us
  %cond = icmp eq i32 %8, 0
  %34 = zext nneg i32 %7 to i64
  %lhsv109 = load i64, ptr %4, align 8
  br i1 %cond, label %35, label %37

35:                                               ; preds = %.split73.us
  %36 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_ecb_dec, i64 0, i64 %34
  %rhsv110 = load i64, ptr %36, align 8
  %.not111 = icmp eq i64 %lhsv109, %rhsv110
  br i1 %.not111, label %40, label %39

37:                                               ; preds = %.split73.us
  %38 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_ecb_enc, i64 0, i64 %34
  %rhsv = load i64, ptr %38, align 8
  %.not = icmp eq i64 %lhsv109, %rhsv
  br i1 %.not, label %40, label %39

39:                                               ; preds = %37, %35
  br i1 %.not62, label %.loopexit102, label %.loopexit102.sink.split

40:                                               ; preds = %35, %37
  br i1 %.not62, label %41, label %.thread92

41:                                               ; preds = %40
  %42 = add nuw nsw i32 %.05474, 1
  %exitcond85.not = icmp eq i32 %42, 6
  br i1 %exitcond85.not, label %.loopexit104, label %.backedge105.backedge

.backedge105.backedge:                            ; preds = %41, %.thread92
  %.05474.be = phi i32 [ %42, %41 ], [ %44, %.thread92 ]
  br label %.backedge105, !llvm.loop !7

.thread92:                                        ; preds = %40
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %44 = add nuw nsw i32 %.05474, 1
  %exitcond85.not93 = icmp eq i32 %44, 6
  br i1 %exitcond85.not93, label %45, label %.backedge105.backedge

45:                                               ; preds = %.thread92
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.loopexit104

.loopexit104:                                     ; preds = %41, %45
  %47 = load i64, ptr @des3_test_iv, align 1
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %.loopexit104
  %.15580 = phi i32 [ 0, %.loopexit104 ], [ %.15580.be, %.backedge.backedge ]
  %48 = lshr i32 %.15580, 1
  br i1 %.not62, label %58, label %49

49:                                               ; preds = %.backedge
  %50 = and i32 %.15580, 1
  %51 = icmp ult i32 %.15580, 2
  %52 = select i1 %51, i32 32, i32 51
  %53 = mul nuw nsw i32 %48, 56
  %54 = add nuw nsw i32 %53, 56
  %55 = icmp eq i32 %50, 0
  %56 = select i1 %55, ptr @.str.1, ptr @.str.2
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %52, i32 noundef %54, ptr noundef nonnull %56)
  br label %58

58:                                               ; preds = %49, %.backedge
  store i64 %47, ptr %5, align 8
  store i64 %6, ptr %4, align 8
  switch i32 %.15580, label %default.unreachable68 [
    i32 0, label %.preheader.split.us.preheader
    i32 1, label %.preheader69.split.us.preheader
    i32 2, label %59
    i32 3, label %61
    i32 4, label %63
    i32 5, label %65
  ]

59:                                               ; preds = %58
  %60 = call i32 @mbedtls_des3_set2key_dec(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.preheader.split.preheader

.preheader.split.preheader:                       ; preds = %63, %59
  br label %.preheader.split

61:                                               ; preds = %58
  %62 = call i32 @mbedtls_des3_set2key_enc(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.preheader69.split.preheader

63:                                               ; preds = %58
  %64 = call i32 @mbedtls_des3_set3key_dec(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.preheader.split.preheader

65:                                               ; preds = %58
  %66 = call i32 @mbedtls_des3_set3key_enc(ptr noundef nonnull %3, ptr noundef nonnull @des3_test_keys)
  br label %.preheader69.split.preheader

.preheader69.split.preheader:                     ; preds = %61, %65
  br label %.preheader69.split

.preheader69.split.us.preheader:                  ; preds = %58
  %67 = call i32 @mbedtls_des_setkey_enc(ptr noundef nonnull %2, ptr noundef nonnull @des3_test_keys)
  br label %.preheader69.split.us

.preheader69.split.us:                            ; preds = %.preheader69.split.us.preheader, %.preheader69.split.us
  %.sroa.02.076.us = phi i64 [ %.sroa.02.0.copyload3.us, %.preheader69.split.us ], [ %47, %.preheader69.split.us.preheader ]
  %.275.us = phi i32 [ %69, %.preheader69.split.us ], [ 0, %.preheader69.split.us.preheader ]
  %68 = call i32 @mbedtls_des_crypt_cbc(ptr noundef nonnull %2, i32 noundef 1, i64 noundef 8, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %.sroa.02.0.copyload3.us = load i64, ptr %4, align 8
  store i64 %.sroa.02.076.us, ptr %4, align 8
  %69 = add nuw nsw i32 %.275.us, 1
  %exitcond87.not = icmp eq i32 %69, 100
  br i1 %exitcond87.not, label %.loopexit.thread, label %.preheader69.split.us, !llvm.loop !8

.preheader.split.us.preheader:                    ; preds = %58
  %70 = call i32 @mbedtls_des_setkey_dec(ptr noundef nonnull %2, ptr noundef nonnull @des3_test_keys)
  br label %.preheader.split.us

.preheader.split.us:                              ; preds = %.preheader.split.us.preheader, %.preheader.split.us
  %.179.us = phi i32 [ %72, %.preheader.split.us ], [ 0, %.preheader.split.us.preheader ]
  %71 = call i32 @mbedtls_des_crypt_cbc(ptr noundef nonnull %2, i32 noundef 0, i64 noundef 8, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %72 = add nuw nsw i32 %.179.us, 1
  %exitcond89.not = icmp eq i32 %72, 100
  br i1 %exitcond89.not, label %.critedge, label %.preheader.split.us, !llvm.loop !9

.preheader.split:                                 ; preds = %.preheader.split.preheader, %.preheader.split
  %.179 = phi i32 [ %74, %.preheader.split ], [ 0, %.preheader.split.preheader ]
  %73 = call i32 @mbedtls_des3_crypt_cbc(ptr noundef nonnull %3, i32 noundef 0, i64 noundef 8, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %74 = add nuw nsw i32 %.179, 1
  %exitcond88.not = icmp eq i32 %74, 100
  br i1 %exitcond88.not, label %.critedge, label %.preheader.split, !llvm.loop !9

.preheader69.split:                               ; preds = %.preheader69.split.preheader, %.preheader69.split
  %.sroa.02.076 = phi i64 [ %.sroa.02.0.copyload3, %.preheader69.split ], [ %47, %.preheader69.split.preheader ]
  %.275 = phi i32 [ %76, %.preheader69.split ], [ 0, %.preheader69.split.preheader ]
  %75 = call i32 @mbedtls_des3_crypt_cbc(ptr noundef nonnull %3, i32 noundef 1, i64 noundef 8, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %.sroa.02.0.copyload3 = load i64, ptr %4, align 8
  store i64 %.sroa.02.076, ptr %4, align 8
  %76 = add nuw nsw i32 %.275, 1
  %exitcond86.not = icmp eq i32 %76, 100
  br i1 %exitcond86.not, label %.loopexit.thread, label %.preheader69.split, !llvm.loop !8

.loopexit.thread:                                 ; preds = %.preheader69.split, %.preheader69.split.us
  %.us-phi = phi i64 [ %.sroa.02.0.copyload3.us, %.preheader69.split.us ], [ %.sroa.02.0.copyload3, %.preheader69.split ]
  store i64 %.us-phi, ptr %4, align 8
  %77 = zext nneg i32 %48 to i64
  %78 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_cbc_enc, i64 0, i64 %77
  %rhsv113 = load i64, ptr %78, align 8
  %.not114 = icmp eq i64 %.us-phi, %rhsv113
  br i1 %.not114, label %.thread, label %81

.critedge:                                        ; preds = %.preheader.split, %.preheader.split.us
  %79 = zext nneg i32 %48 to i64
  %80 = getelementptr inbounds [3 x [8 x i8]], ptr @des3_test_cbc_dec, i64 0, i64 %79
  %lhsv115 = load i64, ptr %4, align 8
  %rhsv116 = load i64, ptr %80, align 8
  %.not117 = icmp eq i64 %lhsv115, %rhsv116
  br i1 %.not117, label %.thread, label %81

81:                                               ; preds = %.loopexit.thread, %.critedge
  br i1 %.not62, label %.loopexit102, label %.loopexit102.sink.split

.thread:                                          ; preds = %.critedge, %.loopexit.thread
  br i1 %.not62, label %82, label %.thread97

82:                                               ; preds = %.thread
  %83 = add nuw nsw i32 %.15580, 1
  %exitcond90.not = icmp eq i32 %83, 6
  br i1 %exitcond90.not, label %.loopexit102, label %.backedge.backedge

.backedge.backedge:                               ; preds = %82, %.thread97
  %.15580.be = phi i32 [ %83, %82 ], [ %85, %.thread97 ]
  br label %.backedge, !llvm.loop !10

.thread97:                                        ; preds = %.thread
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %85 = add nuw nsw i32 %.15580, 1
  %exitcond90.not98 = icmp eq i32 %85, 6
  br i1 %exitcond90.not98, label %.loopexit102.sink.split, label %.backedge.backedge

.loopexit102.sink.split:                          ; preds = %.thread97, %81, %39
  %.str.3.sink = phi ptr [ @.str.3, %39 ], [ @.str.3, %81 ], [ @.str.5, %.thread97 ]
  %.052.ph = phi i32 [ 1, %39 ], [ 1, %81 ], [ 0, %.thread97 ]
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  br label %.loopexit102

.loopexit102:                                     ; preds = %82, %.loopexit102.sink.split, %81, %39
  %.052 = phi i32 [ 1, %39 ], [ 1, %81 ], [ %.052.ph, %.loopexit102.sink.split ], [ 0, %82 ]
  call void @mbedtls_des_free(ptr noundef nonnull %2)
  call void @mbedtls_des3_free(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #3
  ret i32 %.052

default.unreachable:                              ; preds = %17
  unreachable

default.unreachable68:                            ; preds = %58
  unreachable
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = distinct !{!10, !6}


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