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

; 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_cipher_context_t = type { ptr, i32, i32, ptr, ptr, [16 x i8], i64, [16 x i8], i64, ptr, ptr }
%struct.mbedtls_md_context_t = type { ptr, ptr, ptr }
%struct.mbedtls_cipher_info_t = type { i32, i32, i32, ptr, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [210 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [50 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca [16 x i8], align 16
  %19 = alloca [512 x i8], align 16
  %20 = alloca [64 x i8], align 16
  %21 = alloca [1024 x i8], align 16
  %22 = alloca [1024 x i8], align 16
  %23 = alloca i8, align 1
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %struct.mbedtls_cipher_context_t, align 8
  %27 = alloca %struct.mbedtls_md_context_t, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  store ptr null, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 512, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 96, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  call void @mbedtls_cipher_init(ptr noundef %26)
  call void @mbedtls_md_init(ptr noundef %27)
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = icmp ne i32 %32, 7
  br i1 %33, label %34, label %70

34:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %37 = call ptr @mbedtls_cipher_list()
  store ptr %37, ptr %30, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %42, %34
  %39 = load ptr, ptr %30, align 8, !tbaa !9
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %52

42:                                               ; preds = %38
  %43 = load ptr, ptr %30, align 8, !tbaa !9
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = call ptr @mbedtls_cipher_info_from_type(i32 noundef %44)
  store ptr %45, ptr %24, align 8, !tbaa !9
  %46 = load ptr, ptr %24, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.mbedtls_cipher_info_t, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %48)
  %50 = load ptr, ptr %30, align 8, !tbaa !9
  %51 = getelementptr inbounds i32, ptr %50, i32 1
  store ptr %51, ptr %30, align 8, !tbaa !9
  br label %38, !llvm.loop !13

52:                                               ; preds = %38
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %54 = call ptr @mbedtls_md_list()
  store ptr %54, ptr %30, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %59, %52
  %56 = load ptr, ptr %30, align 8, !tbaa !9
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %68

59:                                               ; preds = %55
  %60 = load ptr, ptr %30, align 8, !tbaa !9
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = call ptr @mbedtls_md_info_from_type(i32 noundef %61)
  store ptr %62, ptr %25, align 8, !tbaa !9
  %63 = load ptr, ptr %25, align 8, !tbaa !9
  %64 = call ptr @mbedtls_md_get_name(ptr noundef %63)
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %64)
  %66 = load ptr, ptr %30, align 8, !tbaa !9
  %67 = getelementptr inbounds i32, ptr %66, i32 1
  store ptr %67, ptr %30, align 8, !tbaa !9
  br label %55, !llvm.loop !15

68:                                               ; preds = %55
  store i32 6, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  %69 = load i32, ptr %31, align 4
  switch i32 %69, label %687 [
    i32 6, label %648
  ]

70:                                               ; preds = %2
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 1
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = call i32 @atoi(ptr noundef %73) #10
  store i32 %74, ptr %10, align 4, !tbaa !5
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %83

77:                                               ; preds = %70
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 1
  br i1 %79, label %80, label %83

80:                                               ; preds = %77
  %81 = load ptr, ptr @stderr, align 8, !tbaa !9
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.4) #9
  br label %648

83:                                               ; preds = %77, %70
  %84 = load ptr, ptr %5, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i64 2
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = load ptr, ptr %5, align 8, !tbaa !9
  %88 = getelementptr inbounds ptr, ptr %87, i64 3
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = call i32 @strcmp(ptr noundef %86, ptr noundef %89) #10
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %95

92:                                               ; preds = %83
  %93 = load ptr, ptr @stderr, align 8, !tbaa !9
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str.5) #9
  br label %648

95:                                               ; preds = %83
  %96 = load ptr, ptr %5, align 8, !tbaa !9
  %97 = getelementptr inbounds ptr, ptr %96, i64 2
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = call noalias ptr @fopen(ptr noundef %98, ptr noundef @.str.6)
  store ptr %99, ptr %15, align 8, !tbaa !9
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %107

101:                                              ; preds = %95
  %102 = load ptr, ptr @stderr, align 8, !tbaa !9
  %103 = load ptr, ptr %5, align 8, !tbaa !9
  %104 = getelementptr inbounds ptr, ptr %103, i64 2
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.7, ptr noundef %105) #9
  br label %648

107:                                              ; preds = %95
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = getelementptr inbounds ptr, ptr %108, i64 3
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = call noalias ptr @fopen(ptr noundef %110, ptr noundef @.str.8)
  store ptr %111, ptr %16, align 8, !tbaa !9
  %112 = icmp eq ptr %111, null
  br i1 %112, label %113, label %119

113:                                              ; preds = %107
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = load ptr, ptr %5, align 8, !tbaa !9
  %116 = getelementptr inbounds ptr, ptr %115, i64 3
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.9, ptr noundef %117) #9
  br label %648

119:                                              ; preds = %107
  %120 = load ptr, ptr %5, align 8, !tbaa !9
  %121 = getelementptr inbounds ptr, ptr %120, i64 4
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = call ptr @mbedtls_cipher_info_from_string(ptr noundef %122)
  store ptr %123, ptr %24, align 8, !tbaa !9
  %124 = load ptr, ptr %24, align 8, !tbaa !9
  %125 = icmp eq ptr %124, null
  br i1 %125, label %126, label %132

126:                                              ; preds = %119
  %127 = load ptr, ptr @stderr, align 8, !tbaa !9
  %128 = load ptr, ptr %5, align 8, !tbaa !9
  %129 = getelementptr inbounds ptr, ptr %128, i64 4
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.10, ptr noundef %130) #9
  br label %648

132:                                              ; preds = %119
  %133 = load ptr, ptr %24, align 8, !tbaa !9
  %134 = call i32 @mbedtls_cipher_setup(ptr noundef %26, ptr noundef %133)
  store i32 %134, ptr %6, align 4, !tbaa !5
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %132
  %137 = load ptr, ptr @stderr, align 8, !tbaa !9
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.11) #9
  br label %648

139:                                              ; preds = %132
  %140 = load ptr, ptr %5, align 8, !tbaa !9
  %141 = getelementptr inbounds ptr, ptr %140, i64 5
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = call ptr @mbedtls_md_info_from_string(ptr noundef %142)
  store ptr %143, ptr %25, align 8, !tbaa !9
  %144 = load ptr, ptr %25, align 8, !tbaa !9
  %145 = icmp eq ptr %144, null
  br i1 %145, label %146, label %152

146:                                              ; preds = %139
  %147 = load ptr, ptr @stderr, align 8, !tbaa !9
  %148 = load ptr, ptr %5, align 8, !tbaa !9
  %149 = getelementptr inbounds ptr, ptr %148, i64 5
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str.12, ptr noundef %150) #9
  br label %648

152:                                              ; preds = %139
  %153 = load ptr, ptr %25, align 8, !tbaa !9
  %154 = call i32 @mbedtls_md_setup(ptr noundef %27, ptr noundef %153, i32 noundef 1)
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %159

156:                                              ; preds = %152
  %157 = load ptr, ptr @stderr, align 8, !tbaa !9
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.13) #9
  br label %648

159:                                              ; preds = %152
  %160 = load ptr, ptr %5, align 8, !tbaa !9
  %161 = getelementptr inbounds ptr, ptr %160, i64 6
  %162 = load ptr, ptr %161, align 8, !tbaa !9
  %163 = call noalias ptr @fopen(ptr noundef %162, ptr noundef @.str.6)
  store ptr %163, ptr %14, align 8, !tbaa !9
  %164 = icmp ne ptr %163, null
  br i1 %164, label %165, label %171

165:                                              ; preds = %159
  %166 = getelementptr inbounds [512 x i8], ptr %19, i64 0, i64 0
  %167 = load ptr, ptr %14, align 8, !tbaa !9
  %168 = call i64 @fread(ptr noundef %166, i64 noundef 1, i64 noundef 512, ptr noundef %167)
  store i64 %168, ptr %11, align 8, !tbaa !16
  %169 = load ptr, ptr %14, align 8, !tbaa !9
  %170 = call i32 @fclose(ptr noundef %169)
  br label %215

171:                                              ; preds = %159
  %172 = load ptr, ptr %5, align 8, !tbaa !9
  %173 = getelementptr inbounds ptr, ptr %172, i64 6
  %174 = load ptr, ptr %173, align 8, !tbaa !9
  %175 = call i32 @memcmp(ptr noundef %174, ptr noundef @.str.14, i64 noundef 4) #10
  %176 = icmp eq i32 %175, 0
  br i1 %176, label %177, label %200

177:                                              ; preds = %171
  %178 = load ptr, ptr %5, align 8, !tbaa !9
  %179 = getelementptr inbounds ptr, ptr %178, i64 6
  %180 = load ptr, ptr %179, align 8, !tbaa !9
  %181 = getelementptr inbounds i8, ptr %180, i64 4
  store ptr %181, ptr %17, align 8, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !16
  br label %182

182:                                              ; preds = %191, %177
  %183 = load ptr, ptr %17, align 8, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %183, ptr noundef @.str.15, ptr noundef %8) #9
  %185 = icmp sgt i32 %184, 0
  br i1 %185, label %186, label %189

186:                                              ; preds = %182
  %187 = load i64, ptr %11, align 8, !tbaa !16
  %188 = icmp ult i64 %187, 512
  br label %189

189:                                              ; preds = %186, %182
  %190 = phi i1 [ false, %182 ], [ %188, %186 ]
  br i1 %190, label %191, label %199

191:                                              ; preds = %189
  %192 = load i32, ptr %8, align 4, !tbaa !5
  %193 = trunc i32 %192 to i8
  %194 = load i64, ptr %11, align 8, !tbaa !16
  %195 = add i64 %194, 1
  store i64 %195, ptr %11, align 8, !tbaa !16
  %196 = getelementptr inbounds [512 x i8], ptr %19, i64 0, i64 %194
  store i8 %193, ptr %196, align 1, !tbaa !18
  %197 = load ptr, ptr %17, align 8, !tbaa !9
  %198 = getelementptr inbounds i8, ptr %197, i64 2
  store ptr %198, ptr %17, align 8, !tbaa !9
  br label %182, !llvm.loop !19

199:                                              ; preds = %189
  br label %214

200:                                              ; preds = %171
  %201 = load ptr, ptr %5, align 8, !tbaa !9
  %202 = getelementptr inbounds ptr, ptr %201, i64 6
  %203 = load ptr, ptr %202, align 8, !tbaa !9
  %204 = call i64 @strlen(ptr noundef %203) #10
  store i64 %204, ptr %11, align 8, !tbaa !16
  %205 = load i64, ptr %11, align 8, !tbaa !16
  %206 = icmp ugt i64 %205, 512
  br i1 %206, label %207, label %208

207:                                              ; preds = %200
  store i64 512, ptr %11, align 8, !tbaa !16
  br label %208

208:                                              ; preds = %207, %200
  %209 = getelementptr inbounds [512 x i8], ptr %19, i64 0, i64 0
  %210 = load ptr, ptr %5, align 8, !tbaa !9
  %211 = getelementptr inbounds ptr, ptr %210, i64 6
  %212 = load ptr, ptr %211, align 8, !tbaa !9
  %213 = load i64, ptr %11, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %209, ptr align 1 %212, i64 %213, i1 false)
  br label %214

214:                                              ; preds = %208, %199
  br label %215

215:                                              ; preds = %214, %165
  %216 = load ptr, ptr %15, align 8, !tbaa !9
  %217 = call i32 @fileno(ptr noundef %216) #9
  %218 = call i64 @lseek(i32 noundef %217, i64 noundef 0, i32 noundef 2) #9
  store i64 %218, ptr %28, align 8, !tbaa !16
  %219 = icmp slt i64 %218, 0
  br i1 %219, label %220, label %221

220:                                              ; preds = %215
  call void @perror(ptr noundef @.str.16)
  br label %648

221:                                              ; preds = %215
  %222 = load ptr, ptr %15, align 8, !tbaa !9
  %223 = call i32 @fseek(ptr noundef %222, i64 noundef 0, i32 noundef 0)
  %224 = icmp slt i32 %223, 0
  br i1 %224, label %225, label %228

225:                                              ; preds = %221
  %226 = load ptr, ptr @stderr, align 8, !tbaa !9
  %227 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.17) #9
  br label %648

228:                                              ; preds = %221
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = icmp eq i32 %229, 0
  br i1 %230, label %231, label %418

231:                                              ; preds = %228
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %245, %231
  %233 = load i32, ptr %7, align 4, !tbaa !5
  %234 = icmp slt i32 %233, 8
  br i1 %234, label %235, label %248

235:                                              ; preds = %232
  %236 = load i64, ptr %28, align 8, !tbaa !16
  %237 = load i32, ptr %7, align 4, !tbaa !5
  %238 = shl i32 %237, 3
  %239 = zext i32 %238 to i64
  %240 = ashr i64 %236, %239
  %241 = trunc i64 %240 to i8
  %242 = load i32, ptr %7, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 %243
  store i8 %241, ptr %244, align 1, !tbaa !18
  br label %245

245:                                              ; preds = %235
  %246 = load i32, ptr %7, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %7, align 4, !tbaa !5
  br label %232, !llvm.loop !20

248:                                              ; preds = %232
  %249 = load ptr, ptr %5, align 8, !tbaa !9
  %250 = getelementptr inbounds ptr, ptr %249, i64 2
  %251 = load ptr, ptr %250, align 8, !tbaa !9
  store ptr %251, ptr %17, align 8, !tbaa !9
  %252 = call i32 @mbedtls_md_starts(ptr noundef %27)
  %253 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %254 = call i32 @mbedtls_md_update(ptr noundef %27, ptr noundef %253, i64 noundef 8)
  %255 = load ptr, ptr %17, align 8, !tbaa !9
  %256 = load ptr, ptr %17, align 8, !tbaa !9
  %257 = call i64 @strlen(ptr noundef %256) #10
  %258 = call i32 @mbedtls_md_update(ptr noundef %27, ptr noundef %255, i64 noundef %257)
  %259 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %260 = call i32 @mbedtls_md_finish(ptr noundef %27, ptr noundef %259)
  %261 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %262 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %261, ptr align 16 %262, i64 16, i1 false)
  %263 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %264 = load ptr, ptr %16, align 8, !tbaa !9
  %265 = call i64 @fwrite(ptr noundef %263, i64 noundef 1, i64 noundef 16, ptr noundef %264)
  %266 = icmp ne i64 %265, 16
  br i1 %266, label %267, label %270

267:                                              ; preds = %248
  %268 = load ptr, ptr @stderr, align 8, !tbaa !9
  %269 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %268, ptr noundef @.str.18, i32 noundef 16) #9
  br label %648

270:                                              ; preds = %248
  %271 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %271, i8 0, i64 32, i1 false)
  %272 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %273 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %272, ptr align 16 %273, i64 16, i1 false)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %286, %270
  %275 = load i32, ptr %7, align 4, !tbaa !5
  %276 = icmp slt i32 %275, 8192
  br i1 %276, label %277, label %289

277:                                              ; preds = %274
  %278 = call i32 @mbedtls_md_starts(ptr noundef %27)
  %279 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %280 = call i32 @mbedtls_md_update(ptr noundef %27, ptr noundef %279, i64 noundef 32)
  %281 = getelementptr inbounds [512 x i8], ptr %19, i64 0, i64 0
  %282 = load i64, ptr %11, align 8, !tbaa !16
  %283 = call i32 @mbedtls_md_update(ptr noundef %27, ptr noundef %281, i64 noundef %282)
  %284 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %285 = call i32 @mbedtls_md_finish(ptr noundef %27, ptr noundef %284)
  br label %286

286:                                              ; preds = %277
  %287 = load i32, ptr %7, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %7, align 4, !tbaa !5
  br label %274, !llvm.loop !21

289:                                              ; preds = %274
  %290 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %291 = load ptr, ptr %24, align 8, !tbaa !9
  %292 = getelementptr inbounds %struct.mbedtls_cipher_info_t, ptr %291, i32 0, i32 2
  %293 = load i32, ptr %292, align 8, !tbaa !22
  %294 = call i32 @mbedtls_cipher_setkey(ptr noundef %26, ptr noundef %290, i32 noundef %293, i32 noundef 1)
  %295 = icmp ne i32 %294, 0
  br i1 %295, label %296, label %299

296:                                              ; preds = %289
  %297 = load ptr, ptr @stderr, align 8, !tbaa !9
  %298 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %297, ptr noundef @.str.19) #9
  br label %648

299:                                              ; preds = %289
  %300 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %301 = call i32 @mbedtls_cipher_set_iv(ptr noundef %26, ptr noundef %300, i64 noundef 16)
  %302 = icmp ne i32 %301, 0
  br i1 %302, label %303, label %306

303:                                              ; preds = %299
  %304 = load ptr, ptr @stderr, align 8, !tbaa !9
  %305 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %304, ptr noundef @.str.20) #9
  br label %648

306:                                              ; preds = %299
  %307 = call i32 @mbedtls_cipher_reset(ptr noundef %26)
  %308 = icmp ne i32 %307, 0
  br i1 %308, label %309, label %312

309:                                              ; preds = %306
  %310 = load ptr, ptr @stderr, align 8, !tbaa !9
  %311 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %310, ptr noundef @.str.21) #9
  br label %648

312:                                              ; preds = %306
  %313 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %314 = call i32 @mbedtls_md_hmac_starts(ptr noundef %27, ptr noundef %313, i64 noundef 32)
  store i64 0, ptr %29, align 8, !tbaa !16
  br label %315

315:                                              ; preds = %372, %312
  %316 = load i64, ptr %29, align 8, !tbaa !16
  %317 = load i64, ptr %28, align 8, !tbaa !16
  %318 = icmp slt i64 %316, %317
  br i1 %318, label %319, label %377

319:                                              ; preds = %315
  %320 = load i64, ptr %28, align 8, !tbaa !16
  %321 = trunc i64 %320 to i32
  %322 = zext i32 %321 to i64
  %323 = load i64, ptr %29, align 8, !tbaa !16
  %324 = sub nsw i64 %322, %323
  %325 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %326 = zext i32 %325 to i64
  %327 = icmp sgt i64 %324, %326
  br i1 %327, label %328, label %330

328:                                              ; preds = %319
  %329 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  br label %335

330:                                              ; preds = %319
  %331 = load i64, ptr %28, align 8, !tbaa !16
  %332 = load i64, ptr %29, align 8, !tbaa !16
  %333 = sub nsw i64 %331, %332
  %334 = trunc i64 %333 to i32
  br label %335

335:                                              ; preds = %330, %328
  %336 = phi i32 [ %329, %328 ], [ %334, %330 ]
  %337 = zext i32 %336 to i64
  store i64 %337, ptr %12, align 8, !tbaa !16
  %338 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %339 = load i64, ptr %12, align 8, !tbaa !16
  %340 = load ptr, ptr %15, align 8, !tbaa !9
  %341 = call i64 @fread(ptr noundef %338, i64 noundef 1, i64 noundef %339, ptr noundef %340)
  %342 = load i64, ptr %12, align 8, !tbaa !16
  %343 = icmp ne i64 %341, %342
  br i1 %343, label %344, label %348

344:                                              ; preds = %335
  %345 = load ptr, ptr @stderr, align 8, !tbaa !9
  %346 = load i64, ptr %12, align 8, !tbaa !16
  %347 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %345, ptr noundef @.str.22, i64 noundef %346) #9
  br label %648

348:                                              ; preds = %335
  %349 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %350 = load i64, ptr %12, align 8, !tbaa !16
  %351 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %352 = call i32 @mbedtls_cipher_update(ptr noundef %26, ptr noundef %349, i64 noundef %350, ptr noundef %351, ptr noundef %13)
  %353 = icmp ne i32 %352, 0
  br i1 %353, label %354, label %357

354:                                              ; preds = %348
  %355 = load ptr, ptr @stderr, align 8, !tbaa !9
  %356 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %355, ptr noundef @.str.23) #9
  br label %648

357:                                              ; preds = %348
  %358 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %359 = load i64, ptr %13, align 8, !tbaa !16
  %360 = call i32 @mbedtls_md_hmac_update(ptr noundef %27, ptr noundef %358, i64 noundef %359)
  %361 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %362 = load i64, ptr %13, align 8, !tbaa !16
  %363 = load ptr, ptr %16, align 8, !tbaa !9
  %364 = call i64 @fwrite(ptr noundef %361, i64 noundef 1, i64 noundef %362, ptr noundef %363)
  %365 = load i64, ptr %13, align 8, !tbaa !16
  %366 = icmp ne i64 %364, %365
  br i1 %366, label %367, label %371

367:                                              ; preds = %357
  %368 = load ptr, ptr @stderr, align 8, !tbaa !9
  %369 = load i64, ptr %13, align 8, !tbaa !16
  %370 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %368, ptr noundef @.str.24, i64 noundef %369) #9
  br label %648

371:                                              ; preds = %357
  br label %372

372:                                              ; preds = %371
  %373 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %374 = zext i32 %373 to i64
  %375 = load i64, ptr %29, align 8, !tbaa !16
  %376 = add nsw i64 %375, %374
  store i64 %376, ptr %29, align 8, !tbaa !16
  br label %315, !llvm.loop !23

377:                                              ; preds = %315
  %378 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %379 = call i32 @mbedtls_cipher_finish(ptr noundef %26, ptr noundef %378, ptr noundef %13)
  %380 = icmp ne i32 %379, 0
  br i1 %380, label %381, label %384

381:                                              ; preds = %377
  %382 = load ptr, ptr @stderr, align 8, !tbaa !9
  %383 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %382, ptr noundef @.str.25) #9
  br label %648

384:                                              ; preds = %377
  %385 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %386 = load i64, ptr %13, align 8, !tbaa !16
  %387 = call i32 @mbedtls_md_hmac_update(ptr noundef %27, ptr noundef %385, i64 noundef %386)
  %388 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %389 = load i64, ptr %13, align 8, !tbaa !16
  %390 = load ptr, ptr %16, align 8, !tbaa !9
  %391 = call i64 @fwrite(ptr noundef %388, i64 noundef 1, i64 noundef %389, ptr noundef %390)
  %392 = load i64, ptr %13, align 8, !tbaa !16
  %393 = icmp ne i64 %391, %392
  br i1 %393, label %394, label %398

394:                                              ; preds = %384
  %395 = load ptr, ptr @stderr, align 8, !tbaa !9
  %396 = load i64, ptr %13, align 8, !tbaa !16
  %397 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %395, ptr noundef @.str.24, i64 noundef %396) #9
  br label %648

398:                                              ; preds = %384
  %399 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %400 = call i32 @mbedtls_md_hmac_finish(ptr noundef %27, ptr noundef %399)
  %401 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %402 = load ptr, ptr %25, align 8, !tbaa !9
  %403 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %402)
  %404 = zext i8 %403 to i64
  %405 = load ptr, ptr %16, align 8, !tbaa !9
  %406 = call i64 @fwrite(ptr noundef %401, i64 noundef 1, i64 noundef %404, ptr noundef %405)
  %407 = load ptr, ptr %25, align 8, !tbaa !9
  %408 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %407)
  %409 = zext i8 %408 to i64
  %410 = icmp ne i64 %406, %409
  br i1 %410, label %411, label %417

411:                                              ; preds = %398
  %412 = load ptr, ptr @stderr, align 8, !tbaa !9
  %413 = load ptr, ptr %25, align 8, !tbaa !9
  %414 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %413)
  %415 = zext i8 %414 to i32
  %416 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %412, ptr noundef @.str.18, i32 noundef %415) #9
  br label %648

417:                                              ; preds = %398
  br label %418

418:                                              ; preds = %417, %228
  %419 = load i32, ptr %10, align 4, !tbaa !5
  %420 = icmp eq i32 %419, 1
  br i1 %420, label %421, label %647

421:                                              ; preds = %418
  %422 = load i64, ptr %28, align 8, !tbaa !16
  %423 = load ptr, ptr %25, align 8, !tbaa !9
  %424 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %423)
  %425 = zext i8 %424 to i32
  %426 = add nsw i32 16, %425
  %427 = sext i32 %426 to i64
  %428 = icmp slt i64 %422, %427
  br i1 %428, label %429, label %432

429:                                              ; preds = %421
  %430 = load ptr, ptr @stderr, align 8, !tbaa !9
  %431 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %430, ptr noundef @.str.26) #9
  br label %648

432:                                              ; preds = %421
  %433 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %434 = icmp eq i32 %433, 0
  br i1 %434, label %435, label %438

435:                                              ; preds = %432
  %436 = load ptr, ptr @stderr, align 8, !tbaa !9
  %437 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %436, ptr noundef @.str.27) #9
  br label %648

438:                                              ; preds = %432
  %439 = load ptr, ptr %24, align 8, !tbaa !9
  %440 = getelementptr inbounds %struct.mbedtls_cipher_info_t, ptr %439, i32 0, i32 1
  %441 = load i32, ptr %440, align 4, !tbaa !24
  %442 = icmp ne i32 %441, 6
  br i1 %442, label %443, label %457

443:                                              ; preds = %438
  %444 = load i64, ptr %28, align 8, !tbaa !16
  %445 = load ptr, ptr %25, align 8, !tbaa !9
  %446 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %445)
  %447 = zext i8 %446 to i64
  %448 = sub nsw i64 %444, %447
  %449 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %450 = zext i32 %449 to i64
  %451 = srem i64 %448, %450
  %452 = icmp ne i64 %451, 0
  br i1 %452, label %453, label %457

453:                                              ; preds = %443
  %454 = load ptr, ptr @stderr, align 8, !tbaa !9
  %455 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %456 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %454, ptr noundef @.str.28, i32 noundef %455) #9
  br label %648

457:                                              ; preds = %443, %438
  %458 = load ptr, ptr %25, align 8, !tbaa !9
  %459 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %458)
  %460 = zext i8 %459 to i32
  %461 = add nsw i32 16, %460
  %462 = sext i32 %461 to i64
  %463 = load i64, ptr %28, align 8, !tbaa !16
  %464 = sub nsw i64 %463, %462
  store i64 %464, ptr %28, align 8, !tbaa !16
  %465 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %466 = load ptr, ptr %15, align 8, !tbaa !9
  %467 = call i64 @fread(ptr noundef %465, i64 noundef 1, i64 noundef 16, ptr noundef %466)
  %468 = icmp ne i64 %467, 16
  br i1 %468, label %469, label %472

469:                                              ; preds = %457
  %470 = load ptr, ptr @stderr, align 8, !tbaa !9
  %471 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %470, ptr noundef @.str.29, i32 noundef 16) #9
  br label %648

472:                                              ; preds = %457
  %473 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %474 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %473, ptr align 16 %474, i64 16, i1 false)
  %475 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %475, i8 0, i64 32, i1 false)
  %476 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %477 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %476, ptr align 16 %477, i64 16, i1 false)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %478

478:                                              ; preds = %490, %472
  %479 = load i32, ptr %7, align 4, !tbaa !5
  %480 = icmp slt i32 %479, 8192
  br i1 %480, label %481, label %493

481:                                              ; preds = %478
  %482 = call i32 @mbedtls_md_starts(ptr noundef %27)
  %483 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %484 = call i32 @mbedtls_md_update(ptr noundef %27, ptr noundef %483, i64 noundef 32)
  %485 = getelementptr inbounds [512 x i8], ptr %19, i64 0, i64 0
  %486 = load i64, ptr %11, align 8, !tbaa !16
  %487 = call i32 @mbedtls_md_update(ptr noundef %27, ptr noundef %485, i64 noundef %486)
  %488 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %489 = call i32 @mbedtls_md_finish(ptr noundef %27, ptr noundef %488)
  br label %490

490:                                              ; preds = %481
  %491 = load i32, ptr %7, align 4, !tbaa !5
  %492 = add nsw i32 %491, 1
  store i32 %492, ptr %7, align 4, !tbaa !5
  br label %478, !llvm.loop !25

493:                                              ; preds = %478
  %494 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %495 = load ptr, ptr %24, align 8, !tbaa !9
  %496 = getelementptr inbounds %struct.mbedtls_cipher_info_t, ptr %495, i32 0, i32 2
  %497 = load i32, ptr %496, align 8, !tbaa !22
  %498 = call i32 @mbedtls_cipher_setkey(ptr noundef %26, ptr noundef %494, i32 noundef %497, i32 noundef 0)
  %499 = icmp ne i32 %498, 0
  br i1 %499, label %500, label %503

500:                                              ; preds = %493
  %501 = load ptr, ptr @stderr, align 8, !tbaa !9
  %502 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %501, ptr noundef @.str.19) #9
  br label %648

503:                                              ; preds = %493
  %504 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %505 = call i32 @mbedtls_cipher_set_iv(ptr noundef %26, ptr noundef %504, i64 noundef 16)
  %506 = icmp ne i32 %505, 0
  br i1 %506, label %507, label %510

507:                                              ; preds = %503
  %508 = load ptr, ptr @stderr, align 8, !tbaa !9
  %509 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %508, ptr noundef @.str.20) #9
  br label %648

510:                                              ; preds = %503
  %511 = call i32 @mbedtls_cipher_reset(ptr noundef %26)
  %512 = icmp ne i32 %511, 0
  br i1 %512, label %513, label %516

513:                                              ; preds = %510
  %514 = load ptr, ptr @stderr, align 8, !tbaa !9
  %515 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %514, ptr noundef @.str.21) #9
  br label %648

516:                                              ; preds = %510
  %517 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %518 = call i32 @mbedtls_md_hmac_starts(ptr noundef %27, ptr noundef %517, i64 noundef 32)
  store i64 0, ptr %29, align 8, !tbaa !16
  br label %519

519:                                              ; preds = %576, %516
  %520 = load i64, ptr %29, align 8, !tbaa !16
  %521 = load i64, ptr %28, align 8, !tbaa !16
  %522 = icmp slt i64 %520, %521
  br i1 %522, label %523, label %581

523:                                              ; preds = %519
  %524 = load i64, ptr %28, align 8, !tbaa !16
  %525 = trunc i64 %524 to i32
  %526 = zext i32 %525 to i64
  %527 = load i64, ptr %29, align 8, !tbaa !16
  %528 = sub nsw i64 %526, %527
  %529 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %530 = zext i32 %529 to i64
  %531 = icmp sgt i64 %528, %530
  br i1 %531, label %532, label %534

532:                                              ; preds = %523
  %533 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  br label %539

534:                                              ; preds = %523
  %535 = load i64, ptr %28, align 8, !tbaa !16
  %536 = load i64, ptr %29, align 8, !tbaa !16
  %537 = sub nsw i64 %535, %536
  %538 = trunc i64 %537 to i32
  br label %539

539:                                              ; preds = %534, %532
  %540 = phi i32 [ %533, %532 ], [ %538, %534 ]
  %541 = zext i32 %540 to i64
  store i64 %541, ptr %12, align 8, !tbaa !16
  %542 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %543 = load i64, ptr %12, align 8, !tbaa !16
  %544 = load ptr, ptr %15, align 8, !tbaa !9
  %545 = call i64 @fread(ptr noundef %542, i64 noundef 1, i64 noundef %543, ptr noundef %544)
  %546 = load i64, ptr %12, align 8, !tbaa !16
  %547 = icmp ne i64 %545, %546
  br i1 %547, label %548, label %552

548:                                              ; preds = %539
  %549 = load ptr, ptr @stderr, align 8, !tbaa !9
  %550 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %551 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %549, ptr noundef @.str.29, i32 noundef %550) #9
  br label %648

552:                                              ; preds = %539
  %553 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %554 = load i64, ptr %12, align 8, !tbaa !16
  %555 = call i32 @mbedtls_md_hmac_update(ptr noundef %27, ptr noundef %553, i64 noundef %554)
  %556 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %557 = load i64, ptr %12, align 8, !tbaa !16
  %558 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %559 = call i32 @mbedtls_cipher_update(ptr noundef %26, ptr noundef %556, i64 noundef %557, ptr noundef %558, ptr noundef %13)
  %560 = icmp ne i32 %559, 0
  br i1 %560, label %561, label %564

561:                                              ; preds = %552
  %562 = load ptr, ptr @stderr, align 8, !tbaa !9
  %563 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %562, ptr noundef @.str.23) #9
  br label %648

564:                                              ; preds = %552
  %565 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %566 = load i64, ptr %13, align 8, !tbaa !16
  %567 = load ptr, ptr %16, align 8, !tbaa !9
  %568 = call i64 @fwrite(ptr noundef %565, i64 noundef 1, i64 noundef %566, ptr noundef %567)
  %569 = load i64, ptr %13, align 8, !tbaa !16
  %570 = icmp ne i64 %568, %569
  br i1 %570, label %571, label %575

571:                                              ; preds = %564
  %572 = load ptr, ptr @stderr, align 8, !tbaa !9
  %573 = load i64, ptr %13, align 8, !tbaa !16
  %574 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %572, ptr noundef @.str.24, i64 noundef %573) #9
  br label %648

575:                                              ; preds = %564
  br label %576

576:                                              ; preds = %575
  %577 = call i32 @mbedtls_cipher_get_block_size(ptr noundef %26)
  %578 = zext i32 %577 to i64
  %579 = load i64, ptr %29, align 8, !tbaa !16
  %580 = add nsw i64 %579, %578
  store i64 %580, ptr %29, align 8, !tbaa !16
  br label %519, !llvm.loop !26

581:                                              ; preds = %519
  %582 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %583 = call i32 @mbedtls_md_hmac_finish(ptr noundef %27, ptr noundef %582)
  %584 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  %585 = load ptr, ptr %25, align 8, !tbaa !9
  %586 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %585)
  %587 = zext i8 %586 to i64
  %588 = load ptr, ptr %15, align 8, !tbaa !9
  %589 = call i64 @fread(ptr noundef %584, i64 noundef 1, i64 noundef %587, ptr noundef %588)
  %590 = load ptr, ptr %25, align 8, !tbaa !9
  %591 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %590)
  %592 = zext i8 %591 to i64
  %593 = icmp ne i64 %589, %592
  br i1 %593, label %594, label %600

594:                                              ; preds = %581
  %595 = load ptr, ptr @stderr, align 8, !tbaa !9
  %596 = load ptr, ptr %25, align 8, !tbaa !9
  %597 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %596)
  %598 = zext i8 %597 to i32
  %599 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %595, ptr noundef @.str.29, i32 noundef %598) #9
  br label %648

600:                                              ; preds = %581
  store i8 0, ptr %23, align 1, !tbaa !18
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %601

601:                                              ; preds = %623, %600
  %602 = load i32, ptr %7, align 4, !tbaa !5
  %603 = load ptr, ptr %25, align 8, !tbaa !9
  %604 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %603)
  %605 = zext i8 %604 to i32
  %606 = icmp slt i32 %602, %605
  br i1 %606, label %607, label %626

607:                                              ; preds = %601
  %608 = load i32, ptr %7, align 4, !tbaa !5
  %609 = sext i32 %608 to i64
  %610 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 %609
  %611 = load i8, ptr %610, align 1, !tbaa !18
  %612 = zext i8 %611 to i32
  %613 = load i32, ptr %7, align 4, !tbaa !5
  %614 = sext i32 %613 to i64
  %615 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 %614
  %616 = load i8, ptr %615, align 1, !tbaa !18
  %617 = zext i8 %616 to i32
  %618 = xor i32 %612, %617
  %619 = load i8, ptr %23, align 1, !tbaa !18
  %620 = zext i8 %619 to i32
  %621 = or i32 %620, %618
  %622 = trunc i32 %621 to i8
  store i8 %622, ptr %23, align 1, !tbaa !18
  br label %623

623:                                              ; preds = %607
  %624 = load i32, ptr %7, align 4, !tbaa !5
  %625 = add nsw i32 %624, 1
  store i32 %625, ptr %7, align 4, !tbaa !5
  br label %601, !llvm.loop !27

626:                                              ; preds = %601
  %627 = load i8, ptr %23, align 1, !tbaa !18
  %628 = zext i8 %627 to i32
  %629 = icmp ne i32 %628, 0
  br i1 %629, label %630, label %633

630:                                              ; preds = %626
  %631 = load ptr, ptr @stderr, align 8, !tbaa !9
  %632 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %631, ptr noundef @.str.30) #9
  br label %648

633:                                              ; preds = %626
  %634 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %635 = call i32 @mbedtls_cipher_finish(ptr noundef %26, ptr noundef %634, ptr noundef %13)
  %636 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %637 = load i64, ptr %13, align 8, !tbaa !16
  %638 = load ptr, ptr %16, align 8, !tbaa !9
  %639 = call i64 @fwrite(ptr noundef %636, i64 noundef 1, i64 noundef %637, ptr noundef %638)
  %640 = load i64, ptr %13, align 8, !tbaa !16
  %641 = icmp ne i64 %639, %640
  br i1 %641, label %642, label %646

642:                                              ; preds = %633
  %643 = load ptr, ptr @stderr, align 8, !tbaa !9
  %644 = load i64, ptr %13, align 8, !tbaa !16
  %645 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %643, ptr noundef @.str.24, i64 noundef %644) #9
  br label %648

646:                                              ; preds = %633
  br label %647

647:                                              ; preds = %646, %418
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %648

648:                                              ; preds = %647, %642, %630, %594, %571, %561, %548, %513, %507, %500, %469, %453, %435, %429, %411, %394, %381, %367, %354, %344, %309, %303, %296, %267, %225, %220, %156, %146, %136, %126, %113, %101, %92, %80, %68
  %649 = load ptr, ptr %15, align 8, !tbaa !9
  %650 = icmp ne ptr %649, null
  br i1 %650, label %651, label %654

651:                                              ; preds = %648
  %652 = load ptr, ptr %15, align 8, !tbaa !9
  %653 = call i32 @fclose(ptr noundef %652)
  br label %654

654:                                              ; preds = %651, %648
  %655 = load ptr, ptr %16, align 8, !tbaa !9
  %656 = icmp ne ptr %655, null
  br i1 %656, label %657, label %660

657:                                              ; preds = %654
  %658 = load ptr, ptr %16, align 8, !tbaa !9
  %659 = call i32 @fclose(ptr noundef %658)
  br label %660

660:                                              ; preds = %657, %654
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %661

661:                                              ; preds = %677, %660
  %662 = load i32, ptr %7, align 4, !tbaa !5
  %663 = load i32, ptr %4, align 4, !tbaa !5
  %664 = icmp slt i32 %662, %663
  br i1 %664, label %665, label %680

665:                                              ; preds = %661
  %666 = load ptr, ptr %5, align 8, !tbaa !9
  %667 = load i32, ptr %7, align 4, !tbaa !5
  %668 = sext i32 %667 to i64
  %669 = getelementptr inbounds ptr, ptr %666, i64 %668
  %670 = load ptr, ptr %669, align 8, !tbaa !9
  %671 = load ptr, ptr %5, align 8, !tbaa !9
  %672 = load i32, ptr %7, align 4, !tbaa !5
  %673 = sext i32 %672 to i64
  %674 = getelementptr inbounds ptr, ptr %671, i64 %673
  %675 = load ptr, ptr %674, align 8, !tbaa !9
  %676 = call i64 @strlen(ptr noundef %675) #10
  call void @mbedtls_platform_zeroize(ptr noundef %670, i64 noundef %676)
  br label %677

677:                                              ; preds = %665
  %678 = load i32, ptr %7, align 4, !tbaa !5
  %679 = add nsw i32 %678, 1
  store i32 %679, ptr %7, align 4, !tbaa !5
  br label %661, !llvm.loop !28

680:                                              ; preds = %661
  %681 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  call void @mbedtls_platform_zeroize(ptr noundef %681, i64 noundef 16)
  %682 = getelementptr inbounds [512 x i8], ptr %19, i64 0, i64 0
  call void @mbedtls_platform_zeroize(ptr noundef %682, i64 noundef 512)
  %683 = getelementptr inbounds [1024 x i8], ptr %21, i64 0, i64 0
  call void @mbedtls_platform_zeroize(ptr noundef %683, i64 noundef 1024)
  %684 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  call void @mbedtls_platform_zeroize(ptr noundef %684, i64 noundef 1024)
  %685 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  call void @mbedtls_platform_zeroize(ptr noundef %685, i64 noundef 64)
  call void @mbedtls_cipher_free(ptr noundef %26)
  call void @mbedtls_md_free(ptr noundef %27)
  %686 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %686, ptr %3, align 4
  store i32 1, ptr %31, align 4
  br label %687

687:                                              ; preds = %680, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  %688 = load i32, ptr %3, align 4
  ret i32 %688
}

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

declare void @mbedtls_cipher_init(ptr noundef) #2

declare void @mbedtls_md_init(ptr noundef) #2

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

declare ptr @mbedtls_cipher_list() #2

declare ptr @mbedtls_cipher_info_from_type(i32 noundef) #2

declare ptr @mbedtls_md_list() #2

declare ptr @mbedtls_md_info_from_type(i32 noundef) #2

declare ptr @mbedtls_md_get_name(ptr noundef) #2

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #5

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare ptr @mbedtls_cipher_info_from_string(ptr noundef) #2

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

declare ptr @mbedtls_md_info_from_string(ptr noundef) #2

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

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

; Function Attrs: nounwind
declare i64 @lseek(i32 noundef, i64 noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @fileno(ptr noundef) #4

declare void @perror(ptr noundef) #2

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @mbedtls_md_starts(ptr noundef) #2

declare i32 @mbedtls_md_update(ptr noundef, ptr noundef, i64 noundef) #2

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

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

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

declare i32 @mbedtls_cipher_set_iv(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @mbedtls_cipher_reset(ptr noundef) #2

declare i32 @mbedtls_md_hmac_starts(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mbedtls_cipher_get_block_size(ptr noundef) #8

declare i32 @mbedtls_cipher_update(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

declare i32 @mbedtls_md_hmac_update(ptr noundef, ptr noundef, i64 noundef) #2

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

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

declare zeroext i8 @mbedtls_md_get_size(ptr noundef) #2

declare void @mbedtls_platform_zeroize(ptr noundef, i64 noundef) #2

declare void @mbedtls_cipher_free(ptr noundef) #2

declare void @mbedtls_md_free(ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"mbedtls_cipher_info_t", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !10, i64 40}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = !{!12, !6, i64 8}
!23 = distinct !{!23, !14}
!24 = !{!12, !6, i64 4}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.mbedtls_cipher_context_t = type { ptr, i32, i32, ptr, ptr, [16 x i8], i64, [16 x i8], i64, ptr, ptr }
%struct.mbedtls_md_context_t = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [210 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [50 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca [16 x i8], align 16
  %6 = alloca [512 x i8], align 16
  %7 = alloca [64 x i8], align 16
  %8 = alloca [1024 x i8], align 16
  %9 = alloca [1024 x i8], align 16
  %10 = alloca %struct.mbedtls_cipher_context_t, align 8
  %11 = alloca %struct.mbedtls_md_context_t, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #12
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %6) #12
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #12
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %8) #12
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %9) #12
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %10) #12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #12
  call void @mbedtls_cipher_init(ptr noundef nonnull %10) #12
  call void @mbedtls_md_init(ptr noundef nonnull %11) #12
  %.not = icmp eq i32 %0, 7
  br i1 %.not, label %33, label %12

12:                                               ; preds = %2
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %15 = call ptr @mbedtls_cipher_list() #12
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %.not180211 = icmp eq i32 %16, 0
  br i1 %.not180211, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %12, %.lr.ph
  %17 = phi i32 [ %23, %.lr.ph ], [ %16, %12 ]
  %.0212 = phi ptr [ %22, %.lr.ph ], [ %15, %12 ]
  %18 = call ptr @mbedtls_cipher_info_from_type(i32 noundef %17) #12
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %20)
  %22 = getelementptr inbounds i8, ptr %.0212, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %.not180 = icmp eq i32 %23, 0
  br i1 %.not180, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %12
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %25 = call ptr @mbedtls_md_list() #12
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %.not181213 = icmp eq i32 %26, 0
  br i1 %.not181213, label %.thread199, label %.lr.ph216

.lr.ph216:                                        ; preds = %._crit_edge, %.lr.ph216
  %27 = phi i32 [ %32, %.lr.ph216 ], [ %26, %._crit_edge ]
  %.1214 = phi ptr [ %31, %.lr.ph216 ], [ %25, %._crit_edge ]
  %28 = call ptr @mbedtls_md_info_from_type(i32 noundef %27) #12
  %29 = call ptr @mbedtls_md_get_name(ptr noundef %28) #12
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %29)
  %31 = getelementptr inbounds i8, ptr %.1214, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %.not181 = icmp eq i32 %32, 0
  br i1 %.not181, label %.thread199, label %.lr.ph216, !llvm.loop !14

33:                                               ; preds = %2
  %34 = getelementptr inbounds i8, ptr %1, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = call i32 @atoi(ptr nocapture noundef %35) #13
  %or.cond = icmp ugt i32 %36, 1
  br i1 %or.cond, label %37, label %40

37:                                               ; preds = %33
  %38 = load ptr, ptr @stderr, align 8, !tbaa !15
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.4) #14
  br label %.lr.ph238.preheader

40:                                               ; preds = %33
  %41 = getelementptr inbounds i8, ptr %1, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !15
  %43 = getelementptr inbounds i8, ptr %1, i64 24
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %42, ptr noundef nonnull dereferenceable(1) %44) #13
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %50

47:                                               ; preds = %40
  %48 = load ptr, ptr @stderr, align 8, !tbaa !15
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.5) #14
  br label %.lr.ph238.preheader

50:                                               ; preds = %40
  %51 = call noalias ptr @fopen(ptr noundef %42, ptr noundef nonnull @.str.6)
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %57

53:                                               ; preds = %50
  %54 = load ptr, ptr @stderr, align 8, !tbaa !15
  %55 = load ptr, ptr %41, align 8, !tbaa !15
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.7, ptr noundef %55) #14
  br label %.lr.ph238.preheader

57:                                               ; preds = %50
  %58 = load ptr, ptr %43, align 8, !tbaa !15
  %59 = call noalias ptr @fopen(ptr noundef %58, ptr noundef nonnull @.str.8)
  %60 = icmp eq ptr %59, null
  br i1 %60, label %.thread.thread263, label %65

.thread.thread263:                                ; preds = %57
  %61 = load ptr, ptr @stderr, align 8, !tbaa !15
  %62 = load ptr, ptr %43, align 8, !tbaa !15
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.9, ptr noundef %62) #14
  %64 = call i32 @fclose(ptr noundef nonnull %51)
  br label %.lr.ph238.preheader

65:                                               ; preds = %57
  %66 = getelementptr inbounds i8, ptr %1, i64 32
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  %68 = call ptr @mbedtls_cipher_info_from_string(ptr noundef %67) #12
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %74

70:                                               ; preds = %65
  %71 = load ptr, ptr @stderr, align 8, !tbaa !15
  %72 = load ptr, ptr %66, align 8, !tbaa !15
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.10, ptr noundef %72) #14
  br label %.thread.thread

74:                                               ; preds = %65
  %75 = call i32 @mbedtls_cipher_setup(ptr noundef nonnull %10, ptr noundef nonnull %68) #12
  %.not155 = icmp eq i32 %75, 0
  br i1 %.not155, label %79, label %76

76:                                               ; preds = %74
  %77 = load ptr, ptr @stderr, align 8, !tbaa !15
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.11) #14
  br label %.thread.thread

79:                                               ; preds = %74
  %80 = getelementptr inbounds i8, ptr %1, i64 40
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = call ptr @mbedtls_md_info_from_string(ptr noundef %81) #12
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %88

84:                                               ; preds = %79
  %85 = load ptr, ptr @stderr, align 8, !tbaa !15
  %86 = load ptr, ptr %80, align 8, !tbaa !15
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.12, ptr noundef %86) #14
  br label %.thread.thread

88:                                               ; preds = %79
  %89 = call i32 @mbedtls_md_setup(ptr noundef nonnull %11, ptr noundef nonnull %82, i32 noundef 1) #12
  %.not156 = icmp eq i32 %89, 0
  br i1 %.not156, label %93, label %90

90:                                               ; preds = %88
  %91 = load ptr, ptr @stderr, align 8, !tbaa !15
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.13) #14
  br label %.thread.thread

93:                                               ; preds = %88
  %94 = getelementptr inbounds i8, ptr %1, i64 48
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = call noalias ptr @fopen(ptr noundef %95, ptr noundef nonnull @.str.6)
  %.not157 = icmp eq ptr %96, null
  br i1 %.not157, label %100, label %97

97:                                               ; preds = %93
  %98 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 1, i64 noundef 512, ptr noundef nonnull %96)
  %99 = call i32 @fclose(ptr noundef nonnull %96)
  br label %.loopexit

100:                                              ; preds = %93
  %101 = load ptr, ptr %94, align 8, !tbaa !15
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %101, ptr noundef nonnull dereferenceable(4) @.str.14, i64 4)
  %102 = icmp eq i32 %bcmp, 0
  br i1 %102, label %103, label %116

103:                                              ; preds = %100
  %104 = getelementptr inbounds i8, ptr %101, i64 4
  %105 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %104, ptr noundef nonnull @.str.15, ptr noundef nonnull %3) #12
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %.lr.ph220, label %.loopexit

.lr.ph220:                                        ; preds = %103, %.lr.ph220
  %.0128218 = phi ptr [ %111, %.lr.ph220 ], [ %104, %103 ]
  %.0132217 = phi i64 [ %109, %.lr.ph220 ], [ 0, %103 ]
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = trunc i32 %107 to i8
  %109 = add nuw nsw i64 %.0132217, 1
  %110 = getelementptr inbounds [512 x i8], ptr %6, i64 0, i64 %.0132217
  store i8 %108, ptr %110, align 1, !tbaa !16
  %111 = getelementptr inbounds i8, ptr %.0128218, i64 2
  %112 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %111, ptr noundef nonnull @.str.15, ptr noundef nonnull %3) #12
  %113 = icmp sgt i32 %112, 0
  %114 = icmp ult i64 %.0132217, 511
  %115 = and i1 %113, %114
  br i1 %115, label %.lr.ph220, label %.loopexit, !llvm.loop !17

116:                                              ; preds = %100
  %117 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %101) #13
  %spec.store.select = call i64 @llvm.umin.i64(i64 %117, i64 512)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %6, ptr align 1 %101, i64 %spec.store.select, i1 false)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph220, %103, %116, %97
  %.1133 = phi i64 [ %98, %97 ], [ %spec.store.select, %116 ], [ 0, %103 ], [ %109, %.lr.ph220 ]
  %118 = call i32 @fileno(ptr noundef nonnull %51) #12
  %119 = call i64 @lseek(i32 noundef %118, i64 noundef 0, i32 noundef 2) #12
  %120 = icmp slt i64 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %.loopexit
  call void @perror(ptr noundef nonnull @.str.16) #15
  br label %.thread.thread

122:                                              ; preds = %.loopexit
  %123 = call i32 @fseek(ptr noundef nonnull %51, i64 noundef 0, i32 noundef 0)
  %124 = icmp slt i32 %123, 0
  br i1 %124, label %125, label %128

125:                                              ; preds = %122
  %126 = load ptr, ptr @stderr, align 8, !tbaa !15
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef nonnull @.str.17) #14
  br label %.thread.thread

128:                                              ; preds = %122
  %trunc = trunc nuw i32 %36 to i1
  br i1 %trunc, label %252, label %.preheader206.preheader

.preheader206.preheader:                          ; preds = %128
  %129 = trunc i64 %119 to i8
  store i8 %129, ptr %8, align 16, !tbaa !16
  %130 = lshr i64 %119, 8
  %131 = trunc i64 %130 to i8
  %132 = getelementptr inbounds i8, ptr %8, i64 1
  store i8 %131, ptr %132, align 1, !tbaa !16
  %133 = lshr i64 %119, 16
  %134 = trunc i64 %133 to i8
  %135 = getelementptr inbounds i8, ptr %8, i64 2
  store i8 %134, ptr %135, align 2, !tbaa !16
  %136 = lshr i64 %119, 24
  %137 = trunc i64 %136 to i8
  %138 = getelementptr inbounds i8, ptr %8, i64 3
  store i8 %137, ptr %138, align 1, !tbaa !16
  %139 = lshr i64 %119, 32
  %140 = trunc i64 %139 to i8
  %141 = getelementptr inbounds i8, ptr %8, i64 4
  store i8 %140, ptr %141, align 4, !tbaa !16
  %142 = lshr i64 %119, 40
  %143 = trunc i64 %142 to i8
  %144 = getelementptr inbounds i8, ptr %8, i64 5
  store i8 %143, ptr %144, align 1, !tbaa !16
  %145 = lshr i64 %119, 48
  %146 = trunc i64 %145 to i8
  %147 = getelementptr inbounds i8, ptr %8, i64 6
  store i8 %146, ptr %147, align 2, !tbaa !16
  %148 = lshr i64 %119, 56
  %149 = trunc nuw i64 %148 to i8
  %150 = getelementptr inbounds i8, ptr %8, i64 7
  store i8 %149, ptr %150, align 1, !tbaa !16
  %151 = load ptr, ptr %41, align 8, !tbaa !15
  %152 = call i32 @mbedtls_md_starts(ptr noundef nonnull %11) #12
  %153 = call i32 @mbedtls_md_update(ptr noundef nonnull %11, ptr noundef nonnull %8, i64 noundef 8) #12
  %154 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %151) #13
  %155 = call i32 @mbedtls_md_update(ptr noundef nonnull %11, ptr noundef %151, i64 noundef %154) #12
  %156 = call i32 @mbedtls_md_finish(ptr noundef nonnull %11, ptr noundef nonnull %7) #12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %7, i64 16, i1 false)
  %157 = call i64 @fwrite(ptr noundef nonnull %5, i64 noundef 1, i64 noundef 16, ptr noundef nonnull %59)
  %.not158 = icmp eq i64 %157, 16
  br i1 %.not158, label %161, label %158

158:                                              ; preds = %.preheader206.preheader
  %159 = load ptr, ptr @stderr, align 8, !tbaa !15
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef nonnull @.str.18, i32 noundef 16) #14
  br label %.thread.thread

161:                                              ; preds = %.preheader206.preheader
  %162 = getelementptr inbounds i8, ptr %7, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %162, i8 0, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false)
  br label %163

163:                                              ; preds = %161, %163
  %.1136222 = phi i32 [ 0, %161 ], [ %168, %163 ]
  %164 = call i32 @mbedtls_md_starts(ptr noundef nonnull %11) #12
  %165 = call i32 @mbedtls_md_update(ptr noundef nonnull %11, ptr noundef nonnull %7, i64 noundef 32) #12
  %166 = call i32 @mbedtls_md_update(ptr noundef nonnull %11, ptr noundef nonnull %6, i64 noundef %.1133) #12
  %167 = call i32 @mbedtls_md_finish(ptr noundef nonnull %11, ptr noundef nonnull %7) #12
  %168 = add nuw nsw i32 %.1136222, 1
  %exitcond.not = icmp eq i32 %168, 8192
  br i1 %exitcond.not, label %169, label %163, !llvm.loop !18

169:                                              ; preds = %163
  %170 = getelementptr inbounds i8, ptr %68, i64 8
  %171 = load i32, ptr %170, align 8, !tbaa !19
  %172 = call i32 @mbedtls_cipher_setkey(ptr noundef nonnull %10, ptr noundef nonnull %7, i32 noundef %171, i32 noundef 1) #12
  %.not159 = icmp eq i32 %172, 0
  br i1 %.not159, label %176, label %173

173:                                              ; preds = %169
  %174 = load ptr, ptr @stderr, align 8, !tbaa !15
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %174, ptr noundef nonnull @.str.19) #14
  br label %.thread.thread

176:                                              ; preds = %169
  %177 = call i32 @mbedtls_cipher_set_iv(ptr noundef nonnull %10, ptr noundef nonnull %5, i64 noundef 16) #12
  %.not160 = icmp eq i32 %177, 0
  br i1 %.not160, label %181, label %178

178:                                              ; preds = %176
  %179 = load ptr, ptr @stderr, align 8, !tbaa !15
  %180 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %179, ptr noundef nonnull @.str.20) #14
  br label %.thread.thread

181:                                              ; preds = %176
  %182 = call i32 @mbedtls_cipher_reset(ptr noundef nonnull %10) #12
  %.not161 = icmp eq i32 %182, 0
  br i1 %.not161, label %186, label %183

183:                                              ; preds = %181
  %184 = load ptr, ptr @stderr, align 8, !tbaa !15
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %184, ptr noundef nonnull @.str.21) #14
  br label %.thread.thread

186:                                              ; preds = %181
  %187 = call i32 @mbedtls_md_hmac_starts(ptr noundef nonnull %11, ptr noundef nonnull %7, i64 noundef 32) #12
  %.not240 = icmp eq i64 %119, 0
  br i1 %.not240, label %._crit_edge226, label %.lr.ph225

.lr.ph225:                                        ; preds = %186
  %188 = and i64 %119, 4294967295
  br label %189

189:                                              ; preds = %.lr.ph225, %220
  %.0125223 = phi i64 [ 0, %.lr.ph225 ], [ %223, %220 ]
  %190 = sub nsw i64 %188, %.0125223
  %191 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %192 = zext i32 %191 to i64
  %193 = icmp sgt i64 %190, %192
  br i1 %193, label %194, label %196

194:                                              ; preds = %189
  %195 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  br label %199

196:                                              ; preds = %189
  %197 = sub nsw i64 %119, %.0125223
  %198 = trunc i64 %197 to i32
  br label %199

199:                                              ; preds = %196, %194
  %200 = phi i32 [ %195, %194 ], [ %198, %196 ]
  %201 = zext i32 %200 to i64
  %202 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef %201, ptr noundef nonnull %51)
  %.not177 = icmp eq i64 %202, %201
  br i1 %.not177, label %206, label %203

203:                                              ; preds = %199
  %204 = load ptr, ptr @stderr, align 8, !tbaa !15
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef nonnull @.str.22, i64 noundef %201) #14
  br label %.thread.thread

206:                                              ; preds = %199
  %207 = call i32 @mbedtls_cipher_update(ptr noundef nonnull %10, ptr noundef nonnull %8, i64 noundef %201, ptr noundef nonnull %9, ptr noundef nonnull %4) #12
  %.not178 = icmp eq i32 %207, 0
  br i1 %.not178, label %211, label %208

208:                                              ; preds = %206
  %209 = load ptr, ptr @stderr, align 8, !tbaa !15
  %210 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %209, ptr noundef nonnull @.str.23) #14
  br label %.thread.thread

211:                                              ; preds = %206
  %212 = load i64, ptr %4, align 8, !tbaa !20
  %213 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %11, ptr noundef nonnull %9, i64 noundef %212) #12
  %214 = load i64, ptr %4, align 8, !tbaa !20
  %215 = call i64 @fwrite(ptr noundef nonnull %9, i64 noundef 1, i64 noundef %214, ptr noundef nonnull %59)
  %216 = load i64, ptr %4, align 8, !tbaa !20
  %.not179 = icmp eq i64 %215, %216
  br i1 %.not179, label %220, label %217

217:                                              ; preds = %211
  %218 = load ptr, ptr @stderr, align 8, !tbaa !15
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %218, ptr noundef nonnull @.str.24, i64 noundef %216) #14
  br label %.thread.thread

220:                                              ; preds = %211
  %221 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %222 = zext i32 %221 to i64
  %223 = add nuw nsw i64 %.0125223, %222
  %224 = icmp slt i64 %223, %119
  br i1 %224, label %189, label %._crit_edge226, !llvm.loop !22

._crit_edge226:                                   ; preds = %220, %186
  %225 = call i32 @mbedtls_cipher_finish(ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef nonnull %4) #12
  %.not162 = icmp eq i32 %225, 0
  br i1 %.not162, label %229, label %226

226:                                              ; preds = %._crit_edge226
  %227 = load ptr, ptr @stderr, align 8, !tbaa !15
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef nonnull @.str.25) #14
  br label %.thread.thread

229:                                              ; preds = %._crit_edge226
  %230 = load i64, ptr %4, align 8, !tbaa !20
  %231 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %11, ptr noundef nonnull %9, i64 noundef %230) #12
  %232 = load i64, ptr %4, align 8, !tbaa !20
  %233 = call i64 @fwrite(ptr noundef nonnull %9, i64 noundef 1, i64 noundef %232, ptr noundef nonnull %59)
  %234 = load i64, ptr %4, align 8, !tbaa !20
  %.not163 = icmp eq i64 %233, %234
  br i1 %.not163, label %238, label %235

235:                                              ; preds = %229
  %236 = load ptr, ptr @stderr, align 8, !tbaa !15
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef nonnull @.str.24, i64 noundef %234) #14
  br label %.thread.thread

238:                                              ; preds = %229
  %239 = call i32 @mbedtls_md_hmac_finish(ptr noundef nonnull %11, ptr noundef nonnull %7) #12
  %240 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %241 = zext i8 %240 to i64
  %242 = call i64 @fwrite(ptr noundef nonnull %7, i64 noundef 1, i64 noundef %241, ptr noundef nonnull %59)
  %243 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %244 = zext i8 %243 to i64
  %.not164 = icmp eq i64 %242, %244
  br i1 %.not164, label %250, label %245

245:                                              ; preds = %238
  %246 = load ptr, ptr @stderr, align 8, !tbaa !15
  %247 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %248 = zext i8 %247 to i32
  %249 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %246, ptr noundef nonnull @.str.18, i32 noundef %248) #14
  br label %.thread.thread

250:                                              ; preds = %238
  %251 = icmp eq i32 %36, 1
  br i1 %251, label %252, label %.thread.thread

252:                                              ; preds = %128, %250
  %253 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %254 = zext i8 %253 to i64
  %255 = add nuw nsw i64 %254, 16
  %256 = icmp slt i64 %119, %255
  br i1 %256, label %257, label %260

257:                                              ; preds = %252
  %258 = load ptr, ptr @stderr, align 8, !tbaa !15
  %259 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %258, ptr noundef nonnull @.str.26) #14
  br label %.thread.thread

260:                                              ; preds = %252
  %261 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %262 = icmp eq i32 %261, 0
  br i1 %262, label %263, label %266

263:                                              ; preds = %260
  %264 = load ptr, ptr @stderr, align 8, !tbaa !15
  %265 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %264, ptr noundef nonnull @.str.27) #14
  br label %.thread.thread

266:                                              ; preds = %260
  %267 = getelementptr inbounds i8, ptr %68, i64 4
  %268 = load i32, ptr %267, align 4, !tbaa !23
  %.not165 = icmp eq i32 %268, 6
  br i1 %.not165, label %280, label %269

269:                                              ; preds = %266
  %270 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %271 = zext i8 %270 to i64
  %272 = sub nsw i64 %119, %271
  %273 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %274 = zext i32 %273 to i64
  %275 = srem i64 %272, %274
  %.not166 = icmp eq i64 %275, 0
  br i1 %.not166, label %280, label %276

276:                                              ; preds = %269
  %277 = load ptr, ptr @stderr, align 8, !tbaa !15
  %278 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %279 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %277, ptr noundef nonnull @.str.28, i32 noundef %278) #14
  br label %.thread.thread

280:                                              ; preds = %269, %266
  %281 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %282 = zext i8 %281 to i64
  %.neg205 = add nsw i64 %119, -16
  %283 = sub nsw i64 %.neg205, %282
  %284 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 16, ptr noundef nonnull %51)
  %.not167 = icmp eq i64 %284, 16
  br i1 %.not167, label %288, label %285

285:                                              ; preds = %280
  %286 = load ptr, ptr @stderr, align 8, !tbaa !15
  %287 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %286, ptr noundef nonnull @.str.29, i32 noundef 16) #14
  br label %.thread.thread

288:                                              ; preds = %280
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %8, i64 16, i1 false)
  %289 = getelementptr inbounds i8, ptr %7, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %289, i8 0, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %8, i64 16, i1 false)
  br label %290

290:                                              ; preds = %288, %290
  %.2227 = phi i32 [ 0, %288 ], [ %295, %290 ]
  %291 = call i32 @mbedtls_md_starts(ptr noundef nonnull %11) #12
  %292 = call i32 @mbedtls_md_update(ptr noundef nonnull %11, ptr noundef nonnull %7, i64 noundef 32) #12
  %293 = call i32 @mbedtls_md_update(ptr noundef nonnull %11, ptr noundef nonnull %6, i64 noundef %.1133) #12
  %294 = call i32 @mbedtls_md_finish(ptr noundef nonnull %11, ptr noundef nonnull %7) #12
  %295 = add nuw nsw i32 %.2227, 1
  %exitcond252.not = icmp eq i32 %295, 8192
  br i1 %exitcond252.not, label %296, label %290, !llvm.loop !24

296:                                              ; preds = %290
  %297 = getelementptr inbounds i8, ptr %68, i64 8
  %298 = load i32, ptr %297, align 8, !tbaa !19
  %299 = call i32 @mbedtls_cipher_setkey(ptr noundef nonnull %10, ptr noundef nonnull %7, i32 noundef %298, i32 noundef 0) #12
  %.not168 = icmp eq i32 %299, 0
  br i1 %.not168, label %303, label %300

300:                                              ; preds = %296
  %301 = load ptr, ptr @stderr, align 8, !tbaa !15
  %302 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %301, ptr noundef nonnull @.str.19) #14
  br label %.thread.thread

303:                                              ; preds = %296
  %304 = call i32 @mbedtls_cipher_set_iv(ptr noundef nonnull %10, ptr noundef nonnull %5, i64 noundef 16) #12
  %.not169 = icmp eq i32 %304, 0
  br i1 %.not169, label %308, label %305

305:                                              ; preds = %303
  %306 = load ptr, ptr @stderr, align 8, !tbaa !15
  %307 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %306, ptr noundef nonnull @.str.20) #14
  br label %.thread.thread

308:                                              ; preds = %303
  %309 = call i32 @mbedtls_cipher_reset(ptr noundef nonnull %10) #12
  %.not170 = icmp eq i32 %309, 0
  br i1 %.not170, label %313, label %310

310:                                              ; preds = %308
  %311 = load ptr, ptr @stderr, align 8, !tbaa !15
  %312 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %311, ptr noundef nonnull @.str.21) #14
  br label %.thread.thread

313:                                              ; preds = %308
  %314 = call i32 @mbedtls_md_hmac_starts(ptr noundef nonnull %11, ptr noundef nonnull %7, i64 noundef 32) #12
  %315 = icmp sgt i64 %283, 0
  br i1 %315, label %.lr.ph230, label %._crit_edge231

.lr.ph230:                                        ; preds = %313
  %316 = and i64 %283, 4294967295
  br label %317

317:                                              ; preds = %.lr.ph230, %348
  %.1126228 = phi i64 [ 0, %.lr.ph230 ], [ %351, %348 ]
  %318 = sub nsw i64 %316, %.1126228
  %319 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %320 = zext i32 %319 to i64
  %321 = icmp sgt i64 %318, %320
  br i1 %321, label %322, label %324

322:                                              ; preds = %317
  %323 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  br label %327

324:                                              ; preds = %317
  %325 = sub nsw i64 %283, %.1126228
  %326 = trunc i64 %325 to i32
  br label %327

327:                                              ; preds = %324, %322
  %328 = phi i32 [ %323, %322 ], [ %326, %324 ]
  %329 = zext i32 %328 to i64
  %330 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef %329, ptr noundef nonnull %51)
  %.not174 = icmp eq i64 %330, %329
  br i1 %.not174, label %335, label %331

331:                                              ; preds = %327
  %332 = load ptr, ptr @stderr, align 8, !tbaa !15
  %333 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %334 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %332, ptr noundef nonnull @.str.29, i32 noundef %333) #14
  br label %.thread.thread

335:                                              ; preds = %327
  %336 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %11, ptr noundef nonnull %8, i64 noundef %329) #12
  %337 = call i32 @mbedtls_cipher_update(ptr noundef nonnull %10, ptr noundef nonnull %8, i64 noundef %329, ptr noundef nonnull %9, ptr noundef nonnull %4) #12
  %.not175 = icmp eq i32 %337, 0
  br i1 %.not175, label %341, label %338

338:                                              ; preds = %335
  %339 = load ptr, ptr @stderr, align 8, !tbaa !15
  %340 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %339, ptr noundef nonnull @.str.23) #14
  br label %.thread.thread

341:                                              ; preds = %335
  %342 = load i64, ptr %4, align 8, !tbaa !20
  %343 = call i64 @fwrite(ptr noundef nonnull %9, i64 noundef 1, i64 noundef %342, ptr noundef nonnull %59)
  %344 = load i64, ptr %4, align 8, !tbaa !20
  %.not176 = icmp eq i64 %343, %344
  br i1 %.not176, label %348, label %345

345:                                              ; preds = %341
  %346 = load ptr, ptr @stderr, align 8, !tbaa !15
  %347 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %346, ptr noundef nonnull @.str.24, i64 noundef %344) #14
  br label %.thread.thread

348:                                              ; preds = %341
  %349 = call i32 @mbedtls_cipher_get_block_size(ptr noundef nonnull %10)
  %350 = zext i32 %349 to i64
  %351 = add nuw nsw i64 %.1126228, %350
  %352 = icmp slt i64 %351, %283
  br i1 %352, label %317, label %._crit_edge231, !llvm.loop !25

._crit_edge231:                                   ; preds = %348, %313
  %353 = call i32 @mbedtls_md_hmac_finish(ptr noundef nonnull %11, ptr noundef nonnull %7) #12
  %354 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %355 = zext i8 %354 to i64
  %356 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef %355, ptr noundef nonnull %51)
  %357 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %358 = zext i8 %357 to i64
  %.not171 = icmp eq i64 %356, %358
  br i1 %.not171, label %.preheader, label %360

.preheader:                                       ; preds = %._crit_edge231
  %359 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %.not241 = icmp eq i8 %359, 0
  br i1 %.not241, label %._crit_edge235.thread, label %.lr.ph234

360:                                              ; preds = %._crit_edge231
  %361 = load ptr, ptr @stderr, align 8, !tbaa !15
  %362 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %363 = zext i8 %362 to i32
  %364 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %361, ptr noundef nonnull @.str.29, i32 noundef %363) #14
  br label %.thread.thread

.lr.ph234:                                        ; preds = %.preheader, %.lr.ph234
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph234 ], [ 0, %.preheader ]
  %.0127233 = phi i8 [ %370, %.lr.ph234 ], [ 0, %.preheader ]
  %365 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %indvars.iv
  %366 = load i8, ptr %365, align 1, !tbaa !16
  %367 = getelementptr inbounds [1024 x i8], ptr %8, i64 0, i64 %indvars.iv
  %368 = load i8, ptr %367, align 1, !tbaa !16
  %369 = xor i8 %368, %366
  %370 = or i8 %369, %.0127233
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %371 = call zeroext i8 @mbedtls_md_get_size(ptr noundef nonnull %82) #12
  %372 = zext i8 %371 to i64
  %373 = icmp ult i64 %indvars.iv.next, %372
  br i1 %373, label %.lr.ph234, label %._crit_edge235, !llvm.loop !26

._crit_edge235:                                   ; preds = %.lr.ph234
  %374 = icmp eq i8 %370, 0
  br i1 %374, label %._crit_edge235.thread, label %375

375:                                              ; preds = %._crit_edge235
  %376 = load ptr, ptr @stderr, align 8, !tbaa !15
  %377 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %376, ptr noundef nonnull @.str.30) #14
  br label %.thread.thread

._crit_edge235.thread:                            ; preds = %.preheader, %._crit_edge235
  %378 = call i32 @mbedtls_cipher_finish(ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef nonnull %4) #12
  %379 = load i64, ptr %4, align 8, !tbaa !20
  %380 = call i64 @fwrite(ptr noundef nonnull %9, i64 noundef 1, i64 noundef %379, ptr noundef nonnull %59)
  %381 = load i64, ptr %4, align 8, !tbaa !20
  %.not173 = icmp eq i64 %380, %381
  br i1 %.not173, label %.thread.thread, label %382

382:                                              ; preds = %._crit_edge235.thread
  %383 = load ptr, ptr @stderr, align 8, !tbaa !15
  %384 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %383, ptr noundef nonnull @.str.24, i64 noundef %381) #14
  br label %.thread.thread

.thread.thread:                                   ; preds = %250, %._crit_edge235.thread, %382, %375, %360, %345, %338, %331, %310, %305, %300, %285, %276, %263, %257, %245, %235, %226, %217, %208, %203, %183, %178, %173, %158, %125, %121, %70, %76, %84, %90
  %.0134188262 = phi i32 [ 1, %90 ], [ 1, %84 ], [ 1, %76 ], [ 1, %70 ], [ 0, %250 ], [ 0, %._crit_edge235.thread ], [ 1, %382 ], [ 1, %375 ], [ 1, %360 ], [ 1, %345 ], [ 1, %338 ], [ 1, %331 ], [ 1, %310 ], [ 1, %305 ], [ 1, %300 ], [ 1, %285 ], [ 1, %276 ], [ 1, %263 ], [ 1, %257 ], [ 1, %245 ], [ 1, %235 ], [ 1, %226 ], [ 1, %217 ], [ 1, %208 ], [ 1, %203 ], [ 1, %183 ], [ 1, %178 ], [ 1, %173 ], [ 1, %158 ], [ 1, %125 ], [ 1, %121 ]
  %385 = call i32 @fclose(ptr noundef nonnull %51)
  %386 = call i32 @fclose(ptr noundef nonnull %59)
  br label %.thread199

.thread199:                                       ; preds = %.lr.ph216, %._crit_edge, %.thread.thread
  %.0134189203 = phi i32 [ %.0134188262, %.thread.thread ], [ 1, %._crit_edge ], [ 1, %.lr.ph216 ]
  %387 = icmp sgt i32 %0, 0
  br i1 %387, label %.lr.ph238.preheader, label %._crit_edge239

.lr.ph238.preheader:                              ; preds = %53, %47, %37, %.thread.thread263, %.thread199
  %.0134189203269 = phi i32 [ %.0134189203, %.thread199 ], [ 1, %.thread.thread263 ], [ 1, %37 ], [ 1, %47 ], [ 1, %53 ]
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph238

.lr.ph238:                                        ; preds = %.lr.ph238.preheader, %.lr.ph238
  %indvars.iv253 = phi i64 [ 0, %.lr.ph238.preheader ], [ %indvars.iv.next254, %.lr.ph238 ]
  %388 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv253
  %389 = load ptr, ptr %388, align 8, !tbaa !15
  %390 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %389) #13
  call void @mbedtls_platform_zeroize(ptr noundef %389, i64 noundef %390) #12
  %indvars.iv.next254 = add nuw nsw i64 %indvars.iv253, 1
  %exitcond256.not = icmp eq i64 %indvars.iv.next254, %wide.trip.count
  br i1 %exitcond256.not, label %._crit_edge239, label %.lr.ph238, !llvm.loop !27

._crit_edge239:                                   ; preds = %.lr.ph238, %.thread199
  %.0134189203268 = phi i32 [ %.0134189203, %.thread199 ], [ %.0134189203269, %.lr.ph238 ]
  call void @mbedtls_platform_zeroize(ptr noundef nonnull %5, i64 noundef 16) #12
  call void @mbedtls_platform_zeroize(ptr noundef nonnull %6, i64 noundef 512) #12
  call void @mbedtls_platform_zeroize(ptr noundef nonnull %8, i64 noundef 1024) #12
  call void @mbedtls_platform_zeroize(ptr noundef nonnull %9, i64 noundef 1024) #12
  call void @mbedtls_platform_zeroize(ptr noundef nonnull %7, i64 noundef 64) #12
  call void @mbedtls_cipher_free(ptr noundef nonnull %10) #12
  call void @mbedtls_md_free(ptr noundef nonnull %11) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #12
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %10) #12
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #12
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #12
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %6) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #12
  ret i32 %.0134189203268
}

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

declare void @mbedtls_cipher_init(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_md_init(ptr noundef) local_unnamed_addr #2

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

declare ptr @mbedtls_cipher_list() local_unnamed_addr #2

declare ptr @mbedtls_cipher_info_from_type(i32 noundef) local_unnamed_addr #2

declare ptr @mbedtls_md_list() local_unnamed_addr #2

declare ptr @mbedtls_md_info_from_type(i32 noundef) local_unnamed_addr #2

declare ptr @mbedtls_md_get_name(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

declare ptr @mbedtls_cipher_info_from_string(ptr noundef) local_unnamed_addr #2

declare i32 @mbedtls_cipher_setup(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @mbedtls_md_info_from_string(ptr noundef) local_unnamed_addr #2

declare i32 @mbedtls_md_setup(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5

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

; Function Attrs: nounwind
declare i64 @lseek(i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef i32 @fileno(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @mbedtls_md_starts(ptr noundef) local_unnamed_addr #2

declare i32 @mbedtls_md_update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @mbedtls_md_finish(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

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

declare i32 @mbedtls_cipher_setkey(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @mbedtls_cipher_set_iv(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @mbedtls_cipher_reset(ptr noundef) local_unnamed_addr #2

declare i32 @mbedtls_md_hmac_starts(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mbedtls_cipher_get_block_size(ptr noundef) local_unnamed_addr #9

declare i32 @mbedtls_cipher_update(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @mbedtls_md_hmac_update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @mbedtls_cipher_finish(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @mbedtls_md_hmac_finish(ptr noundef, ptr noundef) local_unnamed_addr #2

declare zeroext i8 @mbedtls_md_get_size(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_platform_zeroize(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @mbedtls_cipher_free(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_md_free(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #11

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 = { "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 = { 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 #4 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nofree nounwind willreturn memory(argmem: read) }
attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { cold nounwind }
attributes #15 = { cold }

!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, !11, i64 16}
!10 = !{!"mbedtls_cipher_info_t", !6, i64 0, !6, i64 4, !6, i64 8, !11, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !11, i64 40}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!11, !11, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = !{!10, !6, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = distinct !{!22, !13}
!23 = !{!10, !6, i64 4}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}


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