; LLVM IR from guanzhi/GmSSL :: tools (tlcp_client)

; 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.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.TLS_CTX = type { i32, i32, [64 x i32], i64, ptr, i64, ptr, i64, %struct.SM2_KEY, %struct.SM2_KEY, i32, i32 }
%struct.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.TLS_CONNECT = type { i32, i32, [64 x i32], i64, i32, [18437 x i8], i64, [18437 x i8], [18437 x i8], ptr, i64, i32, [32 x i8], i64, [2048 x i8], i64, [2048 x i8], i64, [2048 x i8], i64, %struct.SM2_KEY, %struct.SM2_KEY, i32, [48 x i8], [96 x i8], %struct.SM3_HMAC_CTX, %struct.SM3_HMAC_CTX, %struct.SM4_KEY, %struct.SM4_KEY, [8 x i8], [8 x i8], [12 x i8], [12 x i8], %struct.BLOCK_CIPHER_KEY, %struct.BLOCK_CIPHER_KEY, i32 }
%struct.SM3_HMAC_CTX = type { %struct.SM3_CTX, [64 x i8] }
%struct.SM3_CTX = type { [8 x i32], i64, [64 x i8], i64 }
%struct.SM4_KEY = type { [32 x i32] }
%struct.BLOCK_CIPHER_KEY = type { %union.anon, ptr }
%union.anon = type { %struct.SM4_KEY }
%struct.timeval = type { i64, i64 }
%struct.fd_set = type { [16 x i64] }
%struct.hostent = type { ptr, ptr, i32, i32, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@usage = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@help = external hidden global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [67 x i8], align 1
@__FUNCTION__.tlcp_client_main = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@client_ciphers = external hidden global [1 x i32], align 4
@.str.21 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [30 x i8], align 1
@stdout = external global ptr, align 8
@.str.33 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [18 x i8], align 1
@stdin = external global ptr, align 8
@.str.36 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @tlcp_client_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 ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %struct.sockaddr_in, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.TLS_CTX, align 8
  %21 = alloca %struct.TLS_CONNECT, align 8
  %22 = alloca [1024 x i8], align 16
  %23 = alloca i64, align 8
  %24 = alloca [1024 x i8], align 16
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca %struct.timeval, align 8
  %29 = alloca i32, align 4
  %30 = alloca %struct.fd_set, align 8
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca i32, 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 8, ptr %7) #9
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 0
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  store ptr %36, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 443, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  store ptr null, ptr %14, align 8, !tbaa !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 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !5
  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 4, ptr %19) #9
  store i32 -1, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 568, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 63176, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %22) #9
  call void @llvm.memset.p0.i64(ptr align 16 %22, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  store i64 1024, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1024, ptr %24) #9
  call void @llvm.memset.p0.i64(ptr align 16 %24, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 1, ptr %25, align 4, !tbaa !5
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %4, align 4, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i32 1
  store ptr %40, ptr %5, align 8, !tbaa !9
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = icmp slt i32 %41, 1
  br i1 %42, label %43, label %48

43:                                               ; preds = %2
  %44 = load ptr, ptr @stderr, align 8, !tbaa !9
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  %46 = load ptr, ptr @usage, align 8, !tbaa !9
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str, ptr noundef %45, ptr noundef %46) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %574

48:                                               ; preds = %2
  br label %49

49:                                               ; preds = %203, %48
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = icmp sge i32 %50, 1
  br i1 %51, label %52, label %208

52:                                               ; preds = %49
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = call i32 @strcmp(ptr noundef %54, ptr noundef @.str.1) #10
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %63, label %57

57:                                               ; preds = %52
  %58 = load ptr, ptr %7, align 8, !tbaa !9
  %59 = load ptr, ptr @usage, align 8, !tbaa !9
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %58, ptr noundef %59)
  %61 = load ptr, ptr @help, align 8, !tbaa !9
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %61)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %566

63:                                               ; preds = %52
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = call i32 @strcmp(ptr noundef %65, ptr noundef @.str.4) #10
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %77, label %68

68:                                               ; preds = %63
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr %4, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 1
  br i1 %71, label %72, label %73

72:                                               ; preds = %68
  br label %188

73:                                               ; preds = %68
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %74, i32 1
  store ptr %75, ptr %5, align 8, !tbaa !9
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  store ptr %76, ptr %8, align 8, !tbaa !9
  br label %202

77:                                               ; preds = %63
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = call i32 @strcmp(ptr noundef %79, ptr noundef @.str.5) #10
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %92, label %82

82:                                               ; preds = %77
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %4, align 4, !tbaa !5
  %85 = icmp slt i32 %84, 1
  br i1 %85, label %86, label %87

86:                                               ; preds = %82
  br label %188

87:                                               ; preds = %82
  %88 = load ptr, ptr %5, align 8, !tbaa !9
  %89 = getelementptr inbounds ptr, ptr %88, i32 1
  store ptr %89, ptr %5, align 8, !tbaa !9
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call i32 @atoi(ptr noundef %90) #10
  store i32 %91, ptr %9, align 4, !tbaa !5
  br label %201

92:                                               ; preds = %77
  %93 = load ptr, ptr %5, align 8, !tbaa !9
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = call i32 @strcmp(ptr noundef %94, ptr noundef @.str.6) #10
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %106, label %97

97:                                               ; preds = %92
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = add nsw i32 %98, -1
  store i32 %99, ptr %4, align 4, !tbaa !5
  %100 = icmp slt i32 %99, 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %97
  br label %188

102:                                              ; preds = %97
  %103 = load ptr, ptr %5, align 8, !tbaa !9
  %104 = getelementptr inbounds ptr, ptr %103, i32 1
  store ptr %104, ptr %5, align 8, !tbaa !9
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  store ptr %105, ptr %10, align 8, !tbaa !9
  br label %200

106:                                              ; preds = %92
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call i32 @strcmp(ptr noundef %108, ptr noundef @.str.7) #10
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %120, label %111

111:                                              ; preds = %106
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr %4, align 4, !tbaa !5
  %114 = icmp slt i32 %113, 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %111
  br label %188

116:                                              ; preds = %111
  %117 = load ptr, ptr %5, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %117, i32 1
  store ptr %118, ptr %5, align 8, !tbaa !9
  %119 = load ptr, ptr %118, align 8, !tbaa !9
  store ptr %119, ptr %11, align 8, !tbaa !9
  br label %199

120:                                              ; preds = %106
  %121 = load ptr, ptr %5, align 8, !tbaa !9
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = call i32 @strcmp(ptr noundef %122, ptr noundef @.str.8) #10
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %134, label %125

125:                                              ; preds = %120
  %126 = load i32, ptr %4, align 4, !tbaa !5
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %4, align 4, !tbaa !5
  %128 = icmp slt i32 %127, 1
  br i1 %128, label %129, label %130

129:                                              ; preds = %125
  br label %188

130:                                              ; preds = %125
  %131 = load ptr, ptr %5, align 8, !tbaa !9
  %132 = getelementptr inbounds ptr, ptr %131, i32 1
  store ptr %132, ptr %5, align 8, !tbaa !9
  %133 = load ptr, ptr %132, align 8, !tbaa !9
  store ptr %133, ptr %12, align 8, !tbaa !9
  br label %198

134:                                              ; preds = %120
  %135 = load ptr, ptr %5, align 8, !tbaa !9
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = call i32 @strcmp(ptr noundef %136, ptr noundef @.str.9) #10
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %148, label %139

139:                                              ; preds = %134
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = add nsw i32 %140, -1
  store i32 %141, ptr %4, align 4, !tbaa !5
  %142 = icmp slt i32 %141, 1
  br i1 %142, label %143, label %144

143:                                              ; preds = %139
  br label %188

144:                                              ; preds = %139
  %145 = load ptr, ptr %5, align 8, !tbaa !9
  %146 = getelementptr inbounds ptr, ptr %145, i32 1
  store ptr %146, ptr %5, align 8, !tbaa !9
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  store ptr %147, ptr %13, align 8, !tbaa !9
  br label %197

148:                                              ; preds = %134
  %149 = load ptr, ptr %5, align 8, !tbaa !9
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call i32 @strcmp(ptr noundef %150, ptr noundef @.str.10) #10
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %162, label %153

153:                                              ; preds = %148
  %154 = load i32, ptr %4, align 4, !tbaa !5
  %155 = add nsw i32 %154, -1
  store i32 %155, ptr %4, align 4, !tbaa !5
  %156 = icmp slt i32 %155, 1
  br i1 %156, label %157, label %158

157:                                              ; preds = %153
  br label %188

158:                                              ; preds = %153
  %159 = load ptr, ptr %5, align 8, !tbaa !9
  %160 = getelementptr inbounds ptr, ptr %159, i32 1
  store ptr %160, ptr %5, align 8, !tbaa !9
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  store ptr %161, ptr %14, align 8, !tbaa !9
  br label %196

162:                                              ; preds = %148
  %163 = load ptr, ptr %5, align 8, !tbaa !9
  %164 = load ptr, ptr %163, align 8, !tbaa !9
  %165 = call i32 @strcmp(ptr noundef %164, ptr noundef @.str.11) #10
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %176, label %167

167:                                              ; preds = %162
  %168 = load i32, ptr %4, align 4, !tbaa !5
  %169 = add nsw i32 %168, -1
  store i32 %169, ptr %4, align 4, !tbaa !5
  %170 = icmp slt i32 %169, 1
  br i1 %170, label %171, label %172

171:                                              ; preds = %167
  br label %188

172:                                              ; preds = %167
  %173 = load ptr, ptr %5, align 8, !tbaa !9
  %174 = getelementptr inbounds ptr, ptr %173, i32 1
  store ptr %174, ptr %5, align 8, !tbaa !9
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  store ptr %175, ptr %15, align 8, !tbaa !9
  br label %195

176:                                              ; preds = %162
  %177 = load ptr, ptr %5, align 8, !tbaa !9
  %178 = load ptr, ptr %177, align 8, !tbaa !9
  %179 = call i32 @strcmp(ptr noundef %178, ptr noundef @.str.12) #10
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %182, label %181

181:                                              ; preds = %176
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %194

182:                                              ; preds = %176
  %183 = load ptr, ptr @stderr, align 8, !tbaa !9
  %184 = load ptr, ptr %7, align 8, !tbaa !9
  %185 = load ptr, ptr %5, align 8, !tbaa !9
  %186 = load ptr, ptr %185, align 8, !tbaa !9
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str.13, ptr noundef %184, ptr noundef %186) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %574

188:                                              ; preds = %171, %157, %143, %129, %115, %101, %86, %72
  %189 = load ptr, ptr @stderr, align 8, !tbaa !9
  %190 = load ptr, ptr %7, align 8, !tbaa !9
  %191 = load ptr, ptr %5, align 8, !tbaa !9
  %192 = load ptr, ptr %191, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.14, ptr noundef %190, ptr noundef %192) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %574

194:                                              ; preds = %181
  br label %195

195:                                              ; preds = %194, %172
  br label %196

196:                                              ; preds = %195, %158
  br label %197

197:                                              ; preds = %196, %144
  br label %198

198:                                              ; preds = %197, %130
  br label %199

199:                                              ; preds = %198, %116
  br label %200

200:                                              ; preds = %199, %102
  br label %201

201:                                              ; preds = %200, %87
  br label %202

202:                                              ; preds = %201, %73
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %4, align 4, !tbaa !5
  %205 = add nsw i32 %204, -1
  store i32 %205, ptr %4, align 4, !tbaa !5
  %206 = load ptr, ptr %5, align 8, !tbaa !9
  %207 = getelementptr inbounds ptr, ptr %206, i32 1
  store ptr %207, ptr %5, align 8, !tbaa !9
  br label %49, !llvm.loop !13

208:                                              ; preds = %49
  %209 = load ptr, ptr %8, align 8, !tbaa !9
  %210 = icmp ne ptr %209, null
  br i1 %210, label %215, label %211

211:                                              ; preds = %208
  %212 = load ptr, ptr @stderr, align 8, !tbaa !9
  %213 = load ptr, ptr %7, align 8, !tbaa !9
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef @.str.15, ptr noundef %213) #9
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %574

215:                                              ; preds = %208
  %216 = call i32 @tls_socket_lib_init()
  %217 = icmp ne i32 %216, 1
  br i1 %217, label %218, label %224

218:                                              ; preds = %215
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr @stderr, align 8, !tbaa !9
  %221 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 129, ptr noundef @__FUNCTION__.tlcp_client_main) #9
  br label %222

222:                                              ; preds = %219
  br label %223

223:                                              ; preds = %222
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %574

224:                                              ; preds = %215
  %225 = call i32 @tls_socket_create(ptr noundef %19, i32 noundef 2, i32 noundef 1, i32 noundef 0)
  %226 = icmp ne i32 %225, 1
  br i1 %226, label %227, label %231

227:                                              ; preds = %224
  %228 = load ptr, ptr @stderr, align 8, !tbaa !9
  %229 = load ptr, ptr %7, align 8, !tbaa !9
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef @.str.18, ptr noundef %229) #9
  br label %566

231:                                              ; preds = %224
  %232 = load ptr, ptr %8, align 8, !tbaa !9
  %233 = call ptr @gethostbyname(ptr noundef %232)
  store ptr %233, ptr %17, align 8, !tbaa !9
  %234 = icmp ne ptr %233, null
  br i1 %234, label %240, label %235

235:                                              ; preds = %231
  %236 = load ptr, ptr @stderr, align 8, !tbaa !9
  %237 = load ptr, ptr %7, align 8, !tbaa !9
  %238 = load ptr, ptr %8, align 8, !tbaa !9
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.19, ptr noundef %237, ptr noundef %238) #9
  br label %566

240:                                              ; preds = %231
  %241 = getelementptr inbounds %struct.sockaddr_in, ptr %18, i32 0, i32 2
  %242 = load ptr, ptr %17, align 8, !tbaa !9
  %243 = getelementptr inbounds %struct.hostent, ptr %242, i32 0, i32 4
  %244 = load ptr, ptr %243, align 8, !tbaa !15
  %245 = getelementptr inbounds ptr, ptr %244, i64 0
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %241, ptr align 4 %246, i64 4, i1 false), !tbaa.struct !17
  %247 = getelementptr inbounds %struct.sockaddr_in, ptr %18, i32 0, i32 0
  store i16 2, ptr %247, align 4, !tbaa !18
  %248 = load i32, ptr %9, align 4, !tbaa !5
  %249 = trunc i32 %248 to i16
  %250 = call zeroext i16 @__bswap_16(i16 noundef zeroext %249)
  %251 = getelementptr inbounds %struct.sockaddr_in, ptr %18, i32 0, i32 1
  store i16 %250, ptr %251, align 2, !tbaa !22
  %252 = load i32, ptr %19, align 4, !tbaa !5
  %253 = call i32 @tls_socket_connect(i32 noundef %252, ptr noundef %18)
  %254 = icmp ne i32 %253, 1
  br i1 %254, label %255, label %259

255:                                              ; preds = %240
  %256 = load ptr, ptr @stderr, align 8, !tbaa !9
  %257 = load ptr, ptr %7, align 8, !tbaa !9
  %258 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %256, ptr noundef @.str.20, ptr noundef %257) #9
  br label %566

259:                                              ; preds = %240
  %260 = call i32 @tls_ctx_init(ptr noundef %20, i32 noundef 257, i32 noundef 1)
  %261 = icmp ne i32 %260, 1
  br i1 %261, label %265, label %262

262:                                              ; preds = %259
  %263 = call i32 @tls_ctx_set_cipher_suites(ptr noundef %20, ptr noundef @client_ciphers, i64 noundef 1)
  %264 = icmp ne i32 %263, 1
  br i1 %264, label %265, label %269

265:                                              ; preds = %262, %259
  %266 = load ptr, ptr @stderr, align 8, !tbaa !9
  %267 = load ptr, ptr %7, align 8, !tbaa !9
  %268 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %266, ptr noundef @.str.21, ptr noundef %267) #9
  br label %566

269:                                              ; preds = %262
  %270 = load ptr, ptr %10, align 8, !tbaa !9
  %271 = icmp ne ptr %270, null
  br i1 %271, label %272, label %281

272:                                              ; preds = %269
  %273 = load ptr, ptr %10, align 8, !tbaa !9
  %274 = call i32 @tls_ctx_set_ca_certificates(ptr noundef %20, ptr noundef %273, i32 noundef 4)
  %275 = icmp ne i32 %274, 1
  br i1 %275, label %276, label %280

276:                                              ; preds = %272
  %277 = load ptr, ptr @stderr, align 8, !tbaa !9
  %278 = load ptr, ptr %7, align 8, !tbaa !9
  %279 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %277, ptr noundef @.str.21, ptr noundef %278) #9
  br label %566

280:                                              ; preds = %272
  br label %281

281:                                              ; preds = %280, %269
  %282 = load ptr, ptr %11, align 8, !tbaa !9
  %283 = icmp ne ptr %282, null
  br i1 %283, label %284, label %309

284:                                              ; preds = %281
  %285 = load ptr, ptr %12, align 8, !tbaa !9
  %286 = icmp ne ptr %285, null
  br i1 %286, label %291, label %287

287:                                              ; preds = %284
  %288 = load ptr, ptr @stderr, align 8, !tbaa !9
  %289 = load ptr, ptr %7, align 8, !tbaa !9
  %290 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %288, ptr noundef @.str.22, ptr noundef %289) #9
  br label %566

291:                                              ; preds = %284
  %292 = load ptr, ptr %13, align 8, !tbaa !9
  %293 = icmp ne ptr %292, null
  br i1 %293, label %298, label %294

294:                                              ; preds = %291
  %295 = load ptr, ptr @stderr, align 8, !tbaa !9
  %296 = load ptr, ptr %7, align 8, !tbaa !9
  %297 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %295, ptr noundef @.str.23, ptr noundef %296) #9
  br label %566

298:                                              ; preds = %291
  %299 = load ptr, ptr %11, align 8, !tbaa !9
  %300 = load ptr, ptr %12, align 8, !tbaa !9
  %301 = load ptr, ptr %13, align 8, !tbaa !9
  %302 = call i32 @tls_ctx_set_certificate_and_key(ptr noundef %20, ptr noundef %299, ptr noundef %300, ptr noundef %301)
  %303 = icmp ne i32 %302, 1
  br i1 %303, label %304, label %308

304:                                              ; preds = %298
  %305 = load ptr, ptr @stderr, align 8, !tbaa !9
  %306 = load ptr, ptr %7, align 8, !tbaa !9
  %307 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %305, ptr noundef @.str.21, ptr noundef %306) #9
  br label %566

308:                                              ; preds = %298
  br label %309

309:                                              ; preds = %308, %281
  %310 = load i32, ptr %16, align 4, !tbaa !5
  %311 = icmp ne i32 %310, 0
  br i1 %311, label %312, label %314

312:                                              ; preds = %309
  %313 = getelementptr inbounds %struct.TLS_CTX, ptr %20, i32 0, i32 11
  store i32 1, ptr %313, align 4, !tbaa !23
  br label %314

314:                                              ; preds = %312, %309
  %315 = call i32 @tls_init(ptr noundef %21, ptr noundef %20)
  %316 = icmp ne i32 %315, 1
  br i1 %316, label %324, label %317

317:                                              ; preds = %314
  %318 = load i32, ptr %19, align 4, !tbaa !5
  %319 = call i32 @tls_set_socket(ptr noundef %21, i32 noundef %318)
  %320 = icmp ne i32 %319, 1
  br i1 %320, label %324, label %321

321:                                              ; preds = %317
  %322 = call i32 @tls_do_handshake(ptr noundef %21)
  %323 = icmp ne i32 %322, 1
  br i1 %323, label %324, label %328

324:                                              ; preds = %321, %317, %314
  %325 = load ptr, ptr @stderr, align 8, !tbaa !9
  %326 = load ptr, ptr %7, align 8, !tbaa !9
  %327 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %325, ptr noundef @.str.24, ptr noundef %326) #9
  br label %566

328:                                              ; preds = %321
  %329 = load ptr, ptr %15, align 8, !tbaa !9
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %360

331:                                              ; preds = %328
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %332 = load ptr, ptr %15, align 8, !tbaa !9
  %333 = call noalias ptr @fopen(ptr noundef %332, ptr noundef @.str.25)
  store ptr %333, ptr %27, align 8, !tbaa !9
  %334 = icmp ne ptr %333, null
  br i1 %334, label %340, label %335

335:                                              ; preds = %331
  %336 = load ptr, ptr @stderr, align 8, !tbaa !9
  %337 = load ptr, ptr %7, align 8, !tbaa !9
  %338 = load ptr, ptr %15, align 8, !tbaa !9
  %339 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %336, ptr noundef @.str.26, ptr noundef %337, ptr noundef %338) #9
  call void @perror(ptr noundef @.str.27)
  store i32 4, ptr %26, align 4
  br label %357

340:                                              ; preds = %331
  %341 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 14
  %342 = getelementptr inbounds [2048 x i8], ptr %341, i64 0, i64 0
  %343 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 15
  %344 = load i64, ptr %343, align 8, !tbaa !27
  %345 = load ptr, ptr %27, align 8, !tbaa !9
  %346 = call i32 @x509_certs_to_pem(ptr noundef %342, i64 noundef %344, ptr noundef %345)
  %347 = icmp ne i32 %346, 1
  br i1 %347, label %348, label %354

348:                                              ; preds = %340
  %349 = load ptr, ptr @stderr, align 8, !tbaa !9
  %350 = load ptr, ptr %7, align 8, !tbaa !9
  %351 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %349, ptr noundef @.str.28, ptr noundef %350) #9
  %352 = load ptr, ptr %27, align 8, !tbaa !9
  %353 = call i32 @fclose(ptr noundef %352)
  store i32 4, ptr %26, align 4
  br label %357

354:                                              ; preds = %340
  %355 = load ptr, ptr %27, align 8, !tbaa !9
  %356 = call i32 @fclose(ptr noundef %355)
  store i32 0, ptr %26, align 4
  br label %357

357:                                              ; preds = %354, %348, %335
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  %358 = load i32, ptr %26, align 4
  switch i32 %358, label %574 [
    i32 0, label %359
    i32 4, label %566
  ]

359:                                              ; preds = %357
  br label %360

360:                                              ; preds = %359, %328
  %361 = load ptr, ptr %14, align 8, !tbaa !9
  %362 = icmp ne ptr %361, null
  br i1 %362, label %363, label %423

363:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #9
  %364 = getelementptr inbounds %struct.timeval, ptr %28, i32 0, i32 0
  store i64 1, ptr %364, align 8, !tbaa !33
  %365 = getelementptr inbounds %struct.timeval, ptr %28, i32 0, i32 1
  store i64 0, ptr %365, align 8, !tbaa !35
  %366 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %367 = load ptr, ptr %14, align 8, !tbaa !9
  %368 = load ptr, ptr %8, align 8, !tbaa !9
  %369 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %366, i64 noundef 1024, ptr noundef @.str.29, ptr noundef %367, ptr noundef %368) #9
  %370 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %371 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %372 = call i64 @strlen(ptr noundef %371) #10
  %373 = call i32 @tls_send(ptr noundef %21, ptr noundef %370, i64 noundef %372, ptr noundef %23)
  %374 = icmp ne i32 %373, 1
  br i1 %374, label %375, label %379

375:                                              ; preds = %363
  %376 = load ptr, ptr @stderr, align 8, !tbaa !9
  %377 = load ptr, ptr %7, align 8, !tbaa !9
  %378 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %376, ptr noundef @.str.30, ptr noundef %377) #9
  store i32 4, ptr %26, align 4
  br label %421

379:                                              ; preds = %363
  %380 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 4
  %381 = load i32, ptr %380, align 8, !tbaa !36
  %382 = call i32 @setsockopt(i32 noundef %381, i32 noundef 1, i32 noundef 20, ptr noundef %28, i32 noundef 16) #9
  %383 = icmp ne i32 %382, 0
  br i1 %383, label %384, label %388

384:                                              ; preds = %379
  call void @perror(ptr noundef @.str.31)
  %385 = load ptr, ptr @stderr, align 8, !tbaa !9
  %386 = load ptr, ptr %7, align 8, !tbaa !9
  %387 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %385, ptr noundef @.str.32, ptr noundef %386) #9
  store i32 4, ptr %26, align 4
  br label %421

388:                                              ; preds = %379
  br label %389

389:                                              ; preds = %420, %388
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %390 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %391 = call i32 @tls_recv(ptr noundef %21, ptr noundef %390, i64 noundef 1024, ptr noundef %23)
  store i32 %391, ptr %29, align 4, !tbaa !5
  %392 = load i32, ptr %29, align 4, !tbaa !5
  %393 = icmp eq i32 %392, 1
  br i1 %393, label %394, label %401

394:                                              ; preds = %389
  %395 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %396 = load i64, ptr %23, align 8, !tbaa !11
  %397 = load ptr, ptr @stdout, align 8, !tbaa !9
  %398 = call i64 @fwrite(ptr noundef %395, i64 noundef 1, i64 noundef %396, ptr noundef %397)
  %399 = load ptr, ptr @stdout, align 8, !tbaa !9
  %400 = call i32 @fflush(ptr noundef %399)
  br label %417

401:                                              ; preds = %389
  %402 = load i32, ptr %29, align 4, !tbaa !5
  %403 = icmp eq i32 %402, 0
  br i1 %403, label %404, label %408

404:                                              ; preds = %401
  %405 = load ptr, ptr @stderr, align 8, !tbaa !9
  %406 = load ptr, ptr %7, align 8, !tbaa !9
  %407 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %405, ptr noundef @.str.33, ptr noundef %406) #9
  store i32 4, ptr %26, align 4
  br label %418

408:                                              ; preds = %401
  %409 = load i32, ptr %29, align 4, !tbaa !5
  %410 = icmp eq i32 %409, -11
  br i1 %410, label %411, label %413

411:                                              ; preds = %408
  %412 = call i32 @tls_shutdown(ptr noundef %21)
  store i32 0, ptr %6, align 4, !tbaa !5
  store i32 4, ptr %26, align 4
  br label %418

413:                                              ; preds = %408
  %414 = load ptr, ptr @stderr, align 8, !tbaa !9
  %415 = load ptr, ptr %7, align 8, !tbaa !9
  %416 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %414, ptr noundef @.str.34, ptr noundef %415) #9
  store i32 4, ptr %26, align 4
  br label %418

417:                                              ; preds = %394
  store i32 0, ptr %26, align 4
  br label %418

418:                                              ; preds = %417, %413, %411, %404
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  %419 = load i32, ptr %26, align 4
  switch i32 %419, label %421 [
    i32 0, label %420
  ]

420:                                              ; preds = %418
  br label %389

421:                                              ; preds = %418, %384, %375
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #9
  %422 = load i32, ptr %26, align 4
  switch i32 %422, label %574 [
    i32 4, label %566
  ]

423:                                              ; preds = %360
  br label %424

424:                                              ; preds = %565, %423
  call void @llvm.lifetime.start.p0(i64 128, ptr %30) #9
  br label %425

425:                                              ; preds = %424
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  store ptr %30, ptr %32, align 8, !tbaa !9
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %426

426:                                              ; preds = %436, %425
  %427 = load i32, ptr %31, align 4, !tbaa !5
  %428 = zext i32 %427 to i64
  %429 = icmp ult i64 %428, 16
  br i1 %429, label %430, label %439

430:                                              ; preds = %426
  %431 = load ptr, ptr %32, align 8, !tbaa !9
  %432 = getelementptr inbounds %struct.fd_set, ptr %431, i32 0, i32 0
  %433 = load i32, ptr %31, align 4, !tbaa !5
  %434 = zext i32 %433 to i64
  %435 = getelementptr inbounds [16 x i64], ptr %432, i64 0, i64 %434
  store i64 0, ptr %435, align 8, !tbaa !11
  br label %436

436:                                              ; preds = %430
  %437 = load i32, ptr %31, align 4, !tbaa !5
  %438 = add i32 %437, 1
  store i32 %438, ptr %31, align 4, !tbaa !5
  br label %426, !llvm.loop !37

439:                                              ; preds = %426
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %440

440:                                              ; preds = %439
  br label %441

441:                                              ; preds = %440
  %442 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 4
  %443 = load i32, ptr %442, align 8, !tbaa !36
  %444 = srem i32 %443, 64
  %445 = zext i32 %444 to i64
  %446 = shl i64 1, %445
  %447 = getelementptr inbounds %struct.fd_set, ptr %30, i32 0, i32 0
  %448 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 4
  %449 = load i32, ptr %448, align 8, !tbaa !36
  %450 = sdiv i32 %449, 64
  %451 = sext i32 %450 to i64
  %452 = getelementptr inbounds [16 x i64], ptr %447, i64 0, i64 %451
  %453 = load i64, ptr %452, align 8, !tbaa !11
  %454 = or i64 %453, %446
  store i64 %454, ptr %452, align 8, !tbaa !11
  %455 = load i32, ptr %25, align 4, !tbaa !5
  %456 = icmp ne i32 %455, 0
  br i1 %456, label %457, label %462

457:                                              ; preds = %441
  %458 = getelementptr inbounds %struct.fd_set, ptr %30, i32 0, i32 0
  %459 = getelementptr inbounds [16 x i64], ptr %458, i64 0, i64 0
  %460 = load i64, ptr %459, align 8, !tbaa !11
  %461 = or i64 %460, 1
  store i64 %461, ptr %459, align 8, !tbaa !11
  br label %462

462:                                              ; preds = %457, %441
  %463 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 4
  %464 = load i32, ptr %463, align 8, !tbaa !36
  %465 = add nsw i32 %464, 1
  %466 = call i32 @select(i32 noundef %465, ptr noundef %30, ptr noundef null, ptr noundef null, ptr noundef null)
  %467 = icmp slt i32 %466, 0
  br i1 %467, label %468, label %472

468:                                              ; preds = %462
  %469 = load ptr, ptr @stderr, align 8, !tbaa !9
  %470 = load ptr, ptr %7, align 8, !tbaa !9
  %471 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %469, ptr noundef @.str.35, ptr noundef %470) #9
  store i32 4, ptr %26, align 4
  br label %563

472:                                              ; preds = %462
  %473 = load i32, ptr %25, align 4, !tbaa !5
  %474 = icmp ne i32 %473, 0
  br i1 %474, label %475, label %507

475:                                              ; preds = %472
  %476 = getelementptr inbounds %struct.fd_set, ptr %30, i32 0, i32 0
  %477 = getelementptr inbounds [16 x i64], ptr %476, i64 0, i64 0
  %478 = load i64, ptr %477, align 8, !tbaa !11
  %479 = and i64 %478, 1
  %480 = icmp ne i64 %479, 0
  br i1 %480, label %481, label %507

481:                                              ; preds = %475
  %482 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %483 = load ptr, ptr @stdin, align 8, !tbaa !9
  %484 = call ptr @fgets(ptr noundef %482, i32 noundef 1024, ptr noundef %483)
  %485 = icmp ne ptr %484, null
  br i1 %485, label %486, label %497

486:                                              ; preds = %481
  %487 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %488 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %489 = call i64 @strlen(ptr noundef %488) #10
  %490 = call i32 @tls_send(ptr noundef %21, ptr noundef %487, i64 noundef %489, ptr noundef %23)
  %491 = icmp ne i32 %490, 1
  br i1 %491, label %492, label %496

492:                                              ; preds = %486
  %493 = load ptr, ptr @stderr, align 8, !tbaa !9
  %494 = load ptr, ptr %7, align 8, !tbaa !9
  %495 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %493, ptr noundef @.str.30, ptr noundef %494) #9
  store i32 4, ptr %26, align 4
  br label %563

496:                                              ; preds = %486
  br label %506

497:                                              ; preds = %481
  %498 = load ptr, ptr @stdin, align 8, !tbaa !9
  %499 = call i32 @feof(ptr noundef %498) #9
  %500 = icmp ne i32 %499, 0
  br i1 %500, label %505, label %501

501:                                              ; preds = %497
  %502 = load ptr, ptr @stderr, align 8, !tbaa !9
  %503 = load ptr, ptr %7, align 8, !tbaa !9
  %504 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %502, ptr noundef @.str.36, ptr noundef %503) #9
  store i32 4, ptr %26, align 4
  br label %563

505:                                              ; preds = %497
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %506

506:                                              ; preds = %505, %496
  br label %507

507:                                              ; preds = %506, %475, %472
  %508 = getelementptr inbounds %struct.fd_set, ptr %30, i32 0, i32 0
  %509 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 4
  %510 = load i32, ptr %509, align 8, !tbaa !36
  %511 = sdiv i32 %510, 64
  %512 = sext i32 %511 to i64
  %513 = getelementptr inbounds [16 x i64], ptr %508, i64 0, i64 %512
  %514 = load i64, ptr %513, align 8, !tbaa !11
  %515 = getelementptr inbounds %struct.TLS_CONNECT, ptr %21, i32 0, i32 4
  %516 = load i32, ptr %515, align 8, !tbaa !36
  %517 = srem i32 %516, 64
  %518 = zext i32 %517 to i64
  %519 = shl i64 1, %518
  %520 = and i64 %514, %519
  %521 = icmp ne i64 %520, 0
  br i1 %521, label %522, label %562

522:                                              ; preds = %507
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %523 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %524 = call i32 @tls_recv(ptr noundef %21, ptr noundef %523, i64 noundef 1024, ptr noundef %23)
  store i32 %524, ptr %33, align 4, !tbaa !5
  %525 = load i32, ptr %33, align 4, !tbaa !5
  %526 = icmp eq i32 %525, 1
  br i1 %526, label %527, label %534

527:                                              ; preds = %522
  %528 = getelementptr inbounds [1024 x i8], ptr %22, i64 0, i64 0
  %529 = load i64, ptr %23, align 8, !tbaa !11
  %530 = load ptr, ptr @stdout, align 8, !tbaa !9
  %531 = call i64 @fwrite(ptr noundef %528, i64 noundef 1, i64 noundef %529, ptr noundef %530)
  %532 = load ptr, ptr @stdout, align 8, !tbaa !9
  %533 = call i32 @fflush(ptr noundef %532)
  br label %558

534:                                              ; preds = %522
  %535 = load i32, ptr %33, align 4, !tbaa !5
  %536 = icmp eq i32 %535, 0
  br i1 %536, label %537, label %540

537:                                              ; preds = %534
  %538 = load ptr, ptr @stderr, align 8, !tbaa !9
  %539 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %538, ptr noundef @.str.37) #9
  store i32 4, ptr %26, align 4
  br label %559

540:                                              ; preds = %534
  %541 = load i32, ptr %33, align 4, !tbaa !5
  %542 = icmp eq i32 %541, -11
  br i1 %542, label %543, label %549

543:                                              ; preds = %540
  br label %544

544:                                              ; preds = %543
  %545 = load ptr, ptr @stderr, align 8, !tbaa !9
  %546 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %545, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 313, ptr noundef @__FUNCTION__.tlcp_client_main) #9
  br label %547

547:                                              ; preds = %544
  br label %548

548:                                              ; preds = %547
  store i32 4, ptr %26, align 4
  br label %559

549:                                              ; preds = %540
  br label %550

550:                                              ; preds = %549
  %551 = load ptr, ptr @stderr, align 8, !tbaa !9
  %552 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %551, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 316, ptr noundef @__FUNCTION__.tlcp_client_main) #9
  br label %553

553:                                              ; preds = %550
  br label %554

554:                                              ; preds = %553
  %555 = load ptr, ptr @stderr, align 8, !tbaa !9
  %556 = load ptr, ptr %7, align 8, !tbaa !9
  %557 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %555, ptr noundef @.str.34, ptr noundef %556) #9
  store i32 4, ptr %26, align 4
  br label %559

558:                                              ; preds = %527
  store i32 0, ptr %26, align 4
  br label %559

559:                                              ; preds = %558, %554, %548, %537
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  %560 = load i32, ptr %26, align 4
  switch i32 %560, label %563 [
    i32 0, label %561
  ]

561:                                              ; preds = %559
  br label %562

562:                                              ; preds = %561, %507
  store i32 0, ptr %26, align 4
  br label %563

563:                                              ; preds = %562, %559, %501, %492, %468
  call void @llvm.lifetime.end.p0(i64 128, ptr %30) #9
  %564 = load i32, ptr %26, align 4
  switch i32 %564, label %574 [
    i32 0, label %565
    i32 4, label %566
  ]

565:                                              ; preds = %563
  br label %424

566:                                              ; preds = %563, %421, %357, %324, %304, %294, %287, %276, %265, %255, %235, %227, %57
  %567 = load i32, ptr %19, align 4, !tbaa !5
  %568 = icmp ne i32 %567, -1
  br i1 %568, label %569, label %572

569:                                              ; preds = %566
  %570 = load i32, ptr %19, align 4, !tbaa !5
  %571 = call i32 @close(i32 noundef %570)
  br label %572

572:                                              ; preds = %569, %566
  call void @tls_ctx_cleanup(ptr noundef %20)
  call void @tls_cleanup(ptr noundef %21)
  %573 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %573, ptr %3, align 4
  store i32 1, ptr %26, align 4
  br label %574

574:                                              ; preds = %572, %563, %421, %357, %223, %211, %188, %182, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 63176, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 568, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, 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 4, 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 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  %575 = load i32, ptr %3, align 4
  ret i32 %575
}

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

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

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

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

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

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

declare i32 @tls_socket_lib_init() #5

declare i32 @tls_socket_create(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #5

declare ptr @gethostbyname(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) #7

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) #8

declare i32 @tls_socket_connect(i32 noundef, ptr noundef) #5

declare i32 @tls_ctx_init(ptr noundef, i32 noundef, i32 noundef) #5

declare i32 @tls_ctx_set_cipher_suites(ptr noundef, ptr noundef, i64 noundef) #5

declare i32 @tls_ctx_set_ca_certificates(ptr noundef, ptr noundef, i32 noundef) #5

declare i32 @tls_ctx_set_certificate_and_key(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare i32 @tls_init(ptr noundef, ptr noundef) #5

declare i32 @tls_set_socket(ptr noundef, i32 noundef) #5

declare i32 @tls_do_handshake(ptr noundef) #5

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

declare void @perror(ptr noundef) #5

declare i32 @x509_certs_to_pem(ptr noundef, i64 noundef, ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #3

declare i32 @tls_send(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #5

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

; Function Attrs: nounwind
declare i32 @setsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #3

declare i32 @tls_recv(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #5

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

declare i32 @fflush(ptr noundef) #5

declare i32 @tls_shutdown(ptr noundef) #5

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #3

declare i32 @close(i32 noundef) #5

declare void @tls_ctx_cleanup(ptr noundef) #5

declare void @tls_cleanup(ptr noundef) #5

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 24}
!16 = !{!"hostent", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !10, i64 24}
!17 = !{i64 0, i64 4, !5}
!18 = !{!19, !20, i64 0}
!19 = !{!"sockaddr_in", !20, i64 0, !20, i64 2, !21, i64 4, !7, i64 8}
!20 = !{!"short", !7, i64 0}
!21 = !{!"in_addr", !6, i64 0}
!22 = !{!19, !20, i64 2}
!23 = !{!24, !6, i64 564}
!24 = !{!"", !6, i64 0, !6, i64 4, !7, i64 8, !12, i64 264, !10, i64 272, !12, i64 280, !10, i64 288, !12, i64 296, !25, i64 304, !25, i64 432, !6, i64 560, !6, i64 564}
!25 = !{!"", !26, i64 0, !7, i64 96}
!26 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!27 = !{!28, !12, i64 57720}
!28 = !{!"", !6, i64 0, !6, i64 4, !7, i64 8, !12, i64 264, !6, i64 272, !7, i64 276, !12, i64 18720, !7, i64 18728, !7, i64 37165, !10, i64 55608, !12, i64 55616, !6, i64 55624, !7, i64 55628, !12, i64 55664, !7, i64 55672, !12, i64 57720, !7, i64 57728, !12, i64 59776, !7, i64 59784, !12, i64 61832, !25, i64 61840, !25, i64 61968, !6, i64 62096, !7, i64 62100, !7, i64 62148, !29, i64 62248, !29, i64 62424, !31, i64 62600, !31, i64 62728, !7, i64 62856, !7, i64 62864, !7, i64 62872, !7, i64 62884, !32, i64 62896, !32, i64 63032, !6, i64 63168}
!29 = !{!"", !30, i64 0, !7, i64 112}
!30 = !{!"", !7, i64 0, !12, i64 32, !7, i64 40, !12, i64 104}
!31 = !{!"", !7, i64 0}
!32 = !{!"BLOCK_CIPHER_KEY", !7, i64 0, !10, i64 128}
!33 = !{!34, !12, i64 0}
!34 = !{!"timeval", !12, i64 0, !12, i64 8}
!35 = !{!34, !12, i64 8}
!36 = !{!28, !6, i64 272}
!37 = distinct !{!37, !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.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.TLS_CTX = type { i32, i32, [64 x i32], i64, ptr, i64, ptr, i64, %struct.SM2_KEY, %struct.SM2_KEY, i32, i32 }
%struct.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.TLS_CONNECT = type { i32, i32, [64 x i32], i64, i32, [18437 x i8], i64, [18437 x i8], [18437 x i8], ptr, i64, i32, [32 x i8], i64, [2048 x i8], i64, [2048 x i8], i64, [2048 x i8], i64, %struct.SM2_KEY, %struct.SM2_KEY, i32, [48 x i8], [96 x i8], %struct.SM3_HMAC_CTX, %struct.SM3_HMAC_CTX, %struct.SM4_KEY, %struct.SM4_KEY, [8 x i8], [8 x i8], [12 x i8], [12 x i8], %struct.BLOCK_CIPHER_KEY, %struct.BLOCK_CIPHER_KEY, i32 }
%struct.SM3_HMAC_CTX = type { %struct.SM3_CTX, [64 x i8] }
%struct.SM3_CTX = type { [8 x i32], i64, [64 x i8], i64 }
%struct.SM4_KEY = type { [32 x i32] }
%struct.BLOCK_CIPHER_KEY = type { %union.anon, ptr }
%union.anon = type { %struct.SM4_KEY }
%struct.timeval = type { i64, i64 }
%struct.fd_set = type { [16 x i64] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@usage = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@help = external hidden local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [67 x i8], align 1
@__FUNCTION__.tlcp_client_main = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@client_ciphers = external hidden global [1 x i32], align 4
@.str.21 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [30 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.33 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [18 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.36 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @tlcp_client_main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.sockaddr_in, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.TLS_CTX, align 8
  %6 = alloca %struct.TLS_CONNECT, align 8
  %7 = alloca [1024 x i8], align 16
  %8 = alloca i64, align 8
  %9 = alloca %struct.timeval, align 8
  %10 = alloca %struct.fd_set, align 8
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 -1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 568, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 63176, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %7) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %7, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  store i64 1024, ptr %8, align 8, !tbaa !11
  %12 = icmp slt i32 %0, 2
  br i1 %12, label %13, label %.preheader204

13:                                               ; preds = %2
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = load ptr, ptr @usage, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str, ptr noundef %11, ptr noundef %15) #10
  br label %295

.preheader204:                                    ; preds = %2, %97
  %.0102.in246 = phi i32 [ %.1, %97 ], [ %0, %2 ]
  %.pn245 = phi ptr [ %.1105, %97 ], [ %1, %2 ]
  %.0115244 = phi ptr [ %.1116, %97 ], [ null, %2 ]
  %.0117243 = phi i32 [ %.1118, %97 ], [ 0, %2 ]
  %.0119242 = phi ptr [ %.1120, %97 ], [ null, %2 ]
  %.0121241 = phi ptr [ %.1122, %97 ], [ null, %2 ]
  %.0123240 = phi ptr [ %.1124, %97 ], [ null, %2 ]
  %.0125239 = phi ptr [ %.1126, %97 ], [ null, %2 ]
  %.0127238 = phi ptr [ %.1128, %97 ], [ null, %2 ]
  %.0129237 = phi ptr [ %.1130, %97 ], [ null, %2 ]
  %.0131236 = phi i32 [ %.1132, %97 ], [ 443, %2 ]
  %.0104247 = getelementptr inbounds i8, ptr %.pn245, i64 8
  %.0102248 = add nsw i32 %.0102.in246, -1
  %17 = load ptr, ptr %.0104247, align 8, !tbaa !5
  %18 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.1) #11
  %.not176 = icmp eq i32 %18, 0
  br i1 %.not176, label %19, label %24

19:                                               ; preds = %.preheader204
  %20 = load ptr, ptr @usage, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %11, ptr noundef %20)
  %22 = load ptr, ptr @help, align 8, !tbaa !5
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef %22)
  br label %.thread

24:                                               ; preds = %.preheader204
  %25 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.4) #11
  %.not178 = icmp eq i32 %25, 0
  br i1 %.not178, label %26, label %32

26:                                               ; preds = %24
  %27 = icmp eq i32 %.0102.in246, 2
  br i1 %27, label %94, label %28

28:                                               ; preds = %26
  %29 = add nsw i32 %.0102.in246, -2
  %30 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  br label %97

32:                                               ; preds = %24
  %33 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.5) #11
  %.not179 = icmp eq i32 %33, 0
  br i1 %.not179, label %34, label %41

34:                                               ; preds = %32
  %35 = icmp eq i32 %.0102.in246, 2
  br i1 %35, label %94, label %36

36:                                               ; preds = %34
  %37 = add nsw i32 %.0102.in246, -2
  %38 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = tail call i32 @atoi(ptr nocapture noundef %39) #11
  br label %97

41:                                               ; preds = %32
  %42 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.6) #11
  %.not180 = icmp eq i32 %42, 0
  br i1 %.not180, label %43, label %49

43:                                               ; preds = %41
  %44 = icmp eq i32 %.0102.in246, 2
  br i1 %44, label %94, label %45

45:                                               ; preds = %43
  %46 = add nsw i32 %.0102.in246, -2
  %47 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  br label %97

49:                                               ; preds = %41
  %50 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.7) #11
  %.not181 = icmp eq i32 %50, 0
  br i1 %.not181, label %51, label %57

51:                                               ; preds = %49
  %52 = icmp eq i32 %.0102.in246, 2
  br i1 %52, label %94, label %53

53:                                               ; preds = %51
  %54 = add nsw i32 %.0102.in246, -2
  %55 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  br label %97

57:                                               ; preds = %49
  %58 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.8) #11
  %.not182 = icmp eq i32 %58, 0
  br i1 %.not182, label %59, label %65

59:                                               ; preds = %57
  %60 = icmp eq i32 %.0102.in246, 2
  br i1 %60, label %94, label %61

61:                                               ; preds = %59
  %62 = add nsw i32 %.0102.in246, -2
  %63 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  br label %97

65:                                               ; preds = %57
  %66 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.9) #11
  %.not183 = icmp eq i32 %66, 0
  br i1 %.not183, label %67, label %73

67:                                               ; preds = %65
  %68 = icmp eq i32 %.0102.in246, 2
  br i1 %68, label %94, label %69

69:                                               ; preds = %67
  %70 = add nsw i32 %.0102.in246, -2
  %71 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  br label %97

73:                                               ; preds = %65
  %74 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.10) #11
  %.not184 = icmp eq i32 %74, 0
  br i1 %.not184, label %75, label %81

75:                                               ; preds = %73
  %76 = icmp eq i32 %.0102.in246, 2
  br i1 %76, label %94, label %77

77:                                               ; preds = %75
  %78 = add nsw i32 %.0102.in246, -2
  %79 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  br label %97

81:                                               ; preds = %73
  %82 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.11) #11
  %.not185 = icmp eq i32 %82, 0
  br i1 %.not185, label %83, label %89

83:                                               ; preds = %81
  %84 = icmp eq i32 %.0102.in246, 2
  br i1 %84, label %94, label %85

85:                                               ; preds = %83
  %86 = add nsw i32 %.0102.in246, -2
  %87 = getelementptr inbounds i8, ptr %.pn245, i64 16
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  br label %97

89:                                               ; preds = %81
  %90 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str.12) #11
  %.not186 = icmp eq i32 %90, 0
  br i1 %.not186, label %97, label %91

91:                                               ; preds = %89
  %92 = load ptr, ptr @stderr, align 8, !tbaa !5
  %93 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef nonnull @.str.13, ptr noundef %11, ptr noundef %17) #10
  br label %295

94:                                               ; preds = %83, %75, %67, %59, %51, %43, %34, %26
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef nonnull @.str.14, ptr noundef %11, ptr noundef %17) #10
  br label %295

97:                                               ; preds = %89, %28, %45, %61, %77, %85, %69, %53, %36
  %.1132 = phi i32 [ %.0131236, %85 ], [ %.0131236, %77 ], [ %.0131236, %69 ], [ %.0131236, %61 ], [ %.0131236, %53 ], [ %.0131236, %45 ], [ %40, %36 ], [ %.0131236, %28 ], [ %.0131236, %89 ]
  %.1130 = phi ptr [ %.0129237, %85 ], [ %.0129237, %77 ], [ %.0129237, %69 ], [ %.0129237, %61 ], [ %.0129237, %53 ], [ %48, %45 ], [ %.0129237, %36 ], [ %.0129237, %28 ], [ %.0129237, %89 ]
  %.1128 = phi ptr [ %.0127238, %85 ], [ %.0127238, %77 ], [ %.0127238, %69 ], [ %.0127238, %61 ], [ %56, %53 ], [ %.0127238, %45 ], [ %.0127238, %36 ], [ %.0127238, %28 ], [ %.0127238, %89 ]
  %.1126 = phi ptr [ %.0125239, %85 ], [ %.0125239, %77 ], [ %.0125239, %69 ], [ %64, %61 ], [ %.0125239, %53 ], [ %.0125239, %45 ], [ %.0125239, %36 ], [ %.0125239, %28 ], [ %.0125239, %89 ]
  %.1124 = phi ptr [ %.0123240, %85 ], [ %.0123240, %77 ], [ %72, %69 ], [ %.0123240, %61 ], [ %.0123240, %53 ], [ %.0123240, %45 ], [ %.0123240, %36 ], [ %.0123240, %28 ], [ %.0123240, %89 ]
  %.1122 = phi ptr [ %.0121241, %85 ], [ %80, %77 ], [ %.0121241, %69 ], [ %.0121241, %61 ], [ %.0121241, %53 ], [ %.0121241, %45 ], [ %.0121241, %36 ], [ %.0121241, %28 ], [ %.0121241, %89 ]
  %.1120 = phi ptr [ %88, %85 ], [ %.0119242, %77 ], [ %.0119242, %69 ], [ %.0119242, %61 ], [ %.0119242, %53 ], [ %.0119242, %45 ], [ %.0119242, %36 ], [ %.0119242, %28 ], [ %.0119242, %89 ]
  %.1118 = phi i32 [ %.0117243, %85 ], [ %.0117243, %77 ], [ %.0117243, %69 ], [ %.0117243, %61 ], [ %.0117243, %53 ], [ %.0117243, %45 ], [ %.0117243, %36 ], [ %.0117243, %28 ], [ 1, %89 ]
  %.1116 = phi ptr [ %.0115244, %85 ], [ %.0115244, %77 ], [ %.0115244, %69 ], [ %.0115244, %61 ], [ %.0115244, %53 ], [ %.0115244, %45 ], [ %.0115244, %36 ], [ %31, %28 ], [ %.0115244, %89 ]
  %.1105 = phi ptr [ %87, %85 ], [ %79, %77 ], [ %71, %69 ], [ %63, %61 ], [ %55, %53 ], [ %47, %45 ], [ %38, %36 ], [ %30, %28 ], [ %.0104247, %89 ]
  %.1 = phi i32 [ %86, %85 ], [ %78, %77 ], [ %70, %69 ], [ %62, %61 ], [ %54, %53 ], [ %46, %45 ], [ %37, %36 ], [ %29, %28 ], [ %.0102248, %89 ]
  %98 = icmp sgt i32 %.1, 1
  br i1 %98, label %.preheader204, label %99, !llvm.loop !13

99:                                               ; preds = %97
  %.not = icmp eq ptr %.1116, null
  br i1 %.not, label %100, label %103

100:                                              ; preds = %99
  %101 = load ptr, ptr @stderr, align 8, !tbaa !5
  %102 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef nonnull @.str.15, ptr noundef %11) #10
  br label %295

103:                                              ; preds = %99
  %104 = tail call i32 @tls_socket_lib_init() #9
  %.not148 = icmp eq i32 %104, 1
  br i1 %.not148, label %108, label %105

105:                                              ; preds = %103
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 129, ptr noundef nonnull @__FUNCTION__.tlcp_client_main) #10
  br label %295

108:                                              ; preds = %103
  %109 = call i32 @tls_socket_create(ptr noundef nonnull %4, i32 noundef 2, i32 noundef 1, i32 noundef 0) #9
  %.not149 = icmp eq i32 %109, 1
  br i1 %.not149, label %113, label %110

110:                                              ; preds = %108
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef nonnull @.str.18, ptr noundef %11) #10
  br label %.thread

113:                                              ; preds = %108
  %114 = call ptr @gethostbyname(ptr noundef nonnull %.1116) #9
  %.not150 = icmp eq ptr %114, null
  br i1 %.not150, label %115, label %118

115:                                              ; preds = %113
  %116 = load ptr, ptr @stderr, align 8, !tbaa !5
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef nonnull @.str.19, ptr noundef %11, ptr noundef nonnull %.1116) #10
  br label %.thread

118:                                              ; preds = %113
  %119 = getelementptr inbounds i8, ptr %3, i64 4
  %120 = getelementptr inbounds i8, ptr %114, i64 24
  %121 = load ptr, ptr %120, align 8, !tbaa !15
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = load i32, ptr %122, align 4, !tbaa !9
  store i32 %123, ptr %119, align 4, !tbaa !9
  store i16 2, ptr %3, align 4, !tbaa !17
  %124 = trunc i32 %.1132 to i16
  %125 = call zeroext i16 @__bswap_16(i16 noundef zeroext %124)
  %126 = getelementptr inbounds i8, ptr %3, i64 2
  store i16 %125, ptr %126, align 2, !tbaa !21
  %127 = load i32, ptr %4, align 4, !tbaa !9
  %128 = call i32 @tls_socket_connect(i32 noundef %127, ptr noundef nonnull %3) #9
  %.not151 = icmp eq i32 %128, 1
  br i1 %.not151, label %132, label %129

129:                                              ; preds = %118
  %130 = load ptr, ptr @stderr, align 8, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef nonnull @.str.20, ptr noundef %11) #10
  br label %.thread

132:                                              ; preds = %118
  %133 = call i32 @tls_ctx_init(ptr noundef nonnull %5, i32 noundef 257, i32 noundef 1) #9
  %.not152 = icmp eq i32 %133, 1
  br i1 %.not152, label %134, label %136

134:                                              ; preds = %132
  %135 = call i32 @tls_ctx_set_cipher_suites(ptr noundef nonnull %5, ptr noundef nonnull @client_ciphers, i64 noundef 1) #9
  %.not153 = icmp eq i32 %135, 1
  br i1 %.not153, label %139, label %136

136:                                              ; preds = %134, %132
  %137 = load ptr, ptr @stderr, align 8, !tbaa !5
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef nonnull @.str.21, ptr noundef %11) #10
  br label %.thread

139:                                              ; preds = %134
  %.not154 = icmp eq ptr %.1130, null
  br i1 %.not154, label %145, label %140

140:                                              ; preds = %139
  %141 = call i32 @tls_ctx_set_ca_certificates(ptr noundef nonnull %5, ptr noundef nonnull %.1130, i32 noundef 4) #9
  %.not155 = icmp eq i32 %141, 1
  br i1 %.not155, label %145, label %142

142:                                              ; preds = %140
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef nonnull @.str.21, ptr noundef %11) #10
  br label %.thread

145:                                              ; preds = %140, %139
  %.not156 = icmp eq ptr %.1128, null
  br i1 %.not156, label %159, label %146

146:                                              ; preds = %145
  %.not157 = icmp eq ptr %.1126, null
  br i1 %.not157, label %147, label %150

147:                                              ; preds = %146
  %148 = load ptr, ptr @stderr, align 8, !tbaa !5
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.22, ptr noundef %11) #10
  br label %.thread

150:                                              ; preds = %146
  %.not158 = icmp eq ptr %.1124, null
  br i1 %.not158, label %151, label %154

151:                                              ; preds = %150
  %152 = load ptr, ptr @stderr, align 8, !tbaa !5
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef nonnull @.str.23, ptr noundef %11) #10
  br label %.thread

154:                                              ; preds = %150
  %155 = call i32 @tls_ctx_set_certificate_and_key(ptr noundef nonnull %5, ptr noundef nonnull %.1128, ptr noundef nonnull %.1126, ptr noundef nonnull %.1124) #9
  %.not159 = icmp eq i32 %155, 1
  br i1 %.not159, label %159, label %156

156:                                              ; preds = %154
  %157 = load ptr, ptr @stderr, align 8, !tbaa !5
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef nonnull @.str.21, ptr noundef %11) #10
  br label %.thread

159:                                              ; preds = %154, %145
  %.not160 = icmp eq i32 %.1118, 0
  br i1 %.not160, label %162, label %160

160:                                              ; preds = %159
  %161 = getelementptr inbounds i8, ptr %5, i64 564
  store i32 1, ptr %161, align 4, !tbaa !22
  br label %162

162:                                              ; preds = %160, %159
  %163 = call i32 @tls_init(ptr noundef nonnull %6, ptr noundef nonnull %5) #9
  %.not161 = icmp eq i32 %163, 1
  br i1 %.not161, label %164, label %169

164:                                              ; preds = %162
  %165 = load i32, ptr %4, align 4, !tbaa !9
  %166 = call i32 @tls_set_socket(ptr noundef nonnull %6, i32 noundef %165) #9
  %.not162 = icmp eq i32 %166, 1
  br i1 %.not162, label %167, label %169

167:                                              ; preds = %164
  %168 = call i32 @tls_do_handshake(ptr noundef nonnull %6) #9
  %.not163 = icmp eq i32 %168, 1
  br i1 %.not163, label %172, label %169

169:                                              ; preds = %167, %164, %162
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef nonnull @.str.24, ptr noundef %11) #10
  br label %.thread

172:                                              ; preds = %167
  %.not164 = icmp eq ptr %.1120, null
  br i1 %.not164, label %189, label %173

173:                                              ; preds = %172
  %174 = call noalias ptr @fopen(ptr noundef nonnull %.1120, ptr noundef nonnull @.str.25)
  %.not165 = icmp eq ptr %174, null
  br i1 %.not165, label %175, label %178

175:                                              ; preds = %173
  %176 = load ptr, ptr @stderr, align 8, !tbaa !5
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef nonnull @.str.26, ptr noundef %11, ptr noundef nonnull %.1120) #10
  call void @perror(ptr noundef nonnull @.str.27) #12
  br label %.thread

178:                                              ; preds = %173
  %179 = getelementptr inbounds i8, ptr %6, i64 55672
  %180 = getelementptr inbounds i8, ptr %6, i64 57720
  %181 = load i64, ptr %180, align 8, !tbaa !26
  %182 = call i32 @x509_certs_to_pem(ptr noundef nonnull %179, i64 noundef %181, ptr noundef nonnull %174) #9
  %.not166 = icmp eq i32 %182, 1
  br i1 %.not166, label %187, label %183

183:                                              ; preds = %178
  %184 = load ptr, ptr @stderr, align 8, !tbaa !5
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %184, ptr noundef nonnull @.str.28, ptr noundef %11) #10
  %186 = call i32 @fclose(ptr noundef nonnull %174)
  br label %.thread

187:                                              ; preds = %178
  %188 = call i32 @fclose(ptr noundef nonnull %174)
  br label %189

189:                                              ; preds = %187, %172
  %.not167 = icmp eq ptr %.1122, null
  br i1 %.not167, label %.preheader, label %191

.preheader:                                       ; preds = %189
  %190 = getelementptr inbounds i8, ptr %6, i64 272
  br label %221

191:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  store i64 1, ptr %9, align 8, !tbaa !32
  %192 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 0, ptr %192, align 8, !tbaa !34
  %193 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %7, i64 noundef 1024, ptr noundef nonnull @.str.29, ptr noundef nonnull %.1122, ptr noundef nonnull %.1116) #9
  %194 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #11
  %195 = call i32 @tls_send(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef %194, ptr noundef nonnull %8) #9
  %.not174 = icmp eq i32 %195, 1
  br i1 %.not174, label %199, label %196

196:                                              ; preds = %191
  %197 = load ptr, ptr @stderr, align 8, !tbaa !5
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %197, ptr noundef nonnull @.str.30, ptr noundef %11) #10
  br label %.thread191

199:                                              ; preds = %191
  %200 = getelementptr inbounds i8, ptr %6, i64 272
  %201 = load i32, ptr %200, align 8, !tbaa !35
  %202 = call i32 @setsockopt(i32 noundef %201, i32 noundef 1, i32 noundef 20, ptr noundef nonnull %9, i32 noundef 16) #9
  %.not175 = icmp eq i32 %202, 0
  br i1 %.not175, label %.preheader203, label %203

203:                                              ; preds = %199
  call void @perror(ptr noundef nonnull @.str.31) #12
  %204 = load ptr, ptr @stderr, align 8, !tbaa !5
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef nonnull @.str.32, ptr noundef %11) #10
  br label %.thread191

.preheader203:                                    ; preds = %199, %215
  %206 = call i32 @tls_recv(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 1024, ptr noundef nonnull %8) #9
  switch i32 %206, label %212 [
    i32 1, label %215
    i32 0, label %207
    i32 -11, label %210
  ]

207:                                              ; preds = %.preheader203
  %208 = load ptr, ptr @stderr, align 8, !tbaa !5
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %208, ptr noundef nonnull @.str.33, ptr noundef %11) #10
  br label %.thread191

210:                                              ; preds = %.preheader203
  %211 = call i32 @tls_shutdown(ptr noundef nonnull %6) #9
  br label %.thread191

212:                                              ; preds = %.preheader203
  %213 = load ptr, ptr @stderr, align 8, !tbaa !5
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %213, ptr noundef nonnull @.str.34, ptr noundef %11) #10
  br label %.thread191

215:                                              ; preds = %.preheader203
  %216 = load i64, ptr %8, align 8, !tbaa !11
  %217 = load ptr, ptr @stdout, align 8, !tbaa !5
  %218 = call i64 @fwrite(ptr noundef nonnull %7, i64 noundef 1, i64 noundef %216, ptr noundef %217)
  %219 = load ptr, ptr @stdout, align 8, !tbaa !5
  %220 = call i32 @fflush(ptr noundef %219)
  br label %.preheader203

.thread191:                                       ; preds = %207, %210, %212, %203, %196
  %.2 = phi i32 [ -1, %196 ], [ -1, %203 ], [ -1, %212 ], [ 0, %210 ], [ -1, %207 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br label %.thread

221:                                              ; preds = %.preheader, %290
  %.0112 = phi i32 [ %.1113, %290 ], [ 1, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %10, i8 0, i64 128, i1 false), !tbaa !11
  %222 = load i32, ptr %190, align 8, !tbaa !35
  %223 = srem i32 %222, 64
  %224 = zext nneg i32 %223 to i64
  %225 = shl nuw i64 1, %224
  %226 = sdiv i32 %222, 64
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !11
  %230 = or i64 %225, %229
  store i64 %230, ptr %228, align 8, !tbaa !11
  %.not168 = icmp eq i32 %.0112, 0
  br i1 %.not168, label %231, label %.thread194

231:                                              ; preds = %221
  %232 = add nsw i32 %222, 1
  %233 = call i32 @select(i32 noundef %232, ptr noundef nonnull %10, ptr noundef null, ptr noundef null, ptr noundef null) #9
  %234 = icmp slt i32 %233, 0
  br i1 %234, label %240, label %261

.thread194:                                       ; preds = %221
  %235 = load i64, ptr %10, align 8, !tbaa !11
  %236 = or i64 %235, 1
  store i64 %236, ptr %10, align 8, !tbaa !11
  %237 = add nsw i32 %222, 1
  %238 = call i32 @select(i32 noundef %237, ptr noundef nonnull %10, ptr noundef null, ptr noundef null, ptr noundef null) #9
  %239 = icmp slt i32 %238, 0
  br i1 %239, label %240, label %243

240:                                              ; preds = %.thread194, %231
  %241 = load ptr, ptr @stderr, align 8, !tbaa !5
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef nonnull @.str.35, ptr noundef %11) #10
  br label %.thread200

243:                                              ; preds = %.thread194
  %244 = load i64, ptr %10, align 8, !tbaa !11
  %245 = and i64 %244, 1
  %.not169 = icmp eq i64 %245, 0
  br i1 %.not169, label %261, label %246

246:                                              ; preds = %243
  %247 = load ptr, ptr @stdin, align 8, !tbaa !5
  %248 = call ptr @fgets(ptr noundef nonnull %7, i32 noundef 1024, ptr noundef %247)
  %.not170 = icmp eq ptr %248, null
  br i1 %.not170, label %255, label %249

249:                                              ; preds = %246
  %250 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #11
  %251 = call i32 @tls_send(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef %250, ptr noundef nonnull %8) #9
  %.not172 = icmp eq i32 %251, 1
  br i1 %.not172, label %261, label %252

252:                                              ; preds = %249
  %253 = load ptr, ptr @stderr, align 8, !tbaa !5
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef nonnull @.str.30, ptr noundef %11) #10
  br label %.thread200

255:                                              ; preds = %246
  %256 = load ptr, ptr @stdin, align 8, !tbaa !5
  %257 = call i32 @feof(ptr noundef %256) #9
  %.not171 = icmp eq i32 %257, 0
  br i1 %.not171, label %258, label %261

258:                                              ; preds = %255
  %259 = load ptr, ptr @stderr, align 8, !tbaa !5
  %260 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %259, ptr noundef nonnull @.str.36, ptr noundef %11) #10
  br label %.thread200

261:                                              ; preds = %231, %255, %249, %243
  %.1113 = phi i32 [ 1, %249 ], [ 1, %243 ], [ 0, %255 ], [ 0, %231 ]
  %262 = load i32, ptr %190, align 8, !tbaa !35
  %263 = sdiv i32 %262, 64
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [16 x i64], ptr %10, i64 0, i64 %264
  %266 = load i64, ptr %265, align 8, !tbaa !11
  %267 = srem i32 %262, 64
  %268 = zext nneg i32 %267 to i64
  %269 = shl nuw i64 1, %268
  %270 = and i64 %269, %266
  %.not173 = icmp eq i64 %270, 0
  br i1 %.not173, label %290, label %271

271:                                              ; preds = %261
  %272 = call i32 @tls_recv(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 1024, ptr noundef nonnull %8) #9
  switch i32 %272, label %279 [
    i32 1, label %284
    i32 0, label %273
    i32 -11, label %276
  ]

273:                                              ; preds = %271
  %274 = load ptr, ptr @stderr, align 8, !tbaa !5
  %275 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %274, ptr noundef nonnull @.str.37) #10
  br label %.thread200

276:                                              ; preds = %271
  %277 = load ptr, ptr @stderr, align 8, !tbaa !5
  %278 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %277, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 313, ptr noundef nonnull @__FUNCTION__.tlcp_client_main) #10
  br label %.thread200

279:                                              ; preds = %271
  %280 = load ptr, ptr @stderr, align 8, !tbaa !5
  %281 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %280, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 316, ptr noundef nonnull @__FUNCTION__.tlcp_client_main) #10
  %282 = load ptr, ptr @stderr, align 8, !tbaa !5
  %283 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %282, ptr noundef nonnull @.str.34, ptr noundef %11) #10
  br label %.thread200

284:                                              ; preds = %271
  %285 = load i64, ptr %8, align 8, !tbaa !11
  %286 = load ptr, ptr @stdout, align 8, !tbaa !5
  %287 = call i64 @fwrite(ptr noundef nonnull %7, i64 noundef 1, i64 noundef %285, ptr noundef %286)
  %288 = load ptr, ptr @stdout, align 8, !tbaa !5
  %289 = call i32 @fflush(ptr noundef %288)
  br label %290

.thread200:                                       ; preds = %240, %252, %258, %279, %276, %273
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #9
  br label %.thread

290:                                              ; preds = %261, %284
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #9
  br label %221

.thread:                                          ; preds = %175, %183, %.thread200, %.thread191, %169, %156, %151, %147, %142, %136, %129, %115, %110, %19
  %.3 = phi i32 [ 0, %19 ], [ -1, %110 ], [ -1, %129 ], [ -1, %136 ], [ -1, %142 ], [ -1, %156 ], [ -1, %169 ], [ %.2, %.thread191 ], [ -1, %151 ], [ -1, %147 ], [ -1, %115 ], [ -1, %.thread200 ], [ -1, %183 ], [ -1, %175 ]
  %291 = load i32, ptr %4, align 4, !tbaa !9
  %.not177 = icmp eq i32 %291, -1
  br i1 %.not177, label %294, label %292

292:                                              ; preds = %.thread
  %293 = call i32 @close(i32 noundef %291) #9
  br label %294

294:                                              ; preds = %292, %.thread
  call void @tls_ctx_cleanup(ptr noundef nonnull %5) #9
  call void @tls_cleanup(ptr noundef nonnull %6) #9
  br label %295

295:                                              ; preds = %294, %105, %100, %94, %91, %13
  %.0 = phi i32 [ 1, %13 ], [ 1, %91 ], [ 0, %94 ], [ %.3, %294 ], [ -1, %105 ], [ -1, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 63176, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 568, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  ret i32 %.0
}

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

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

; 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 #4

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

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

declare i32 @tls_socket_lib_init() local_unnamed_addr #6

declare i32 @tls_socket_create(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare ptr @gethostbyname(ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) local_unnamed_addr #7

declare i32 @tls_socket_connect(i32 noundef, ptr noundef) local_unnamed_addr #6

declare i32 @tls_ctx_init(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare i32 @tls_ctx_set_cipher_suites(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #6

declare i32 @tls_ctx_set_ca_certificates(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

declare i32 @tls_ctx_set_certificate_and_key(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @tls_init(ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @tls_set_socket(ptr noundef, i32 noundef) local_unnamed_addr #6

declare i32 @tls_do_handshake(ptr noundef) local_unnamed_addr #6

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

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

declare i32 @x509_certs_to_pem(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

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

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

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

declare i32 @tls_send(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: nounwind
declare i32 @setsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #8

declare i32 @tls_recv(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

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

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

declare i32 @tls_shutdown(ptr noundef) local_unnamed_addr #6

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

declare i32 @close(i32 noundef) local_unnamed_addr #6

declare void @tls_ctx_cleanup(ptr noundef) local_unnamed_addr #6

declare void @tls_cleanup(ptr noundef) local_unnamed_addr #6

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { 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 #6 = { "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 #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 24}
!16 = !{!"hostent", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24}
!17 = !{!18, !19, i64 0}
!18 = !{!"sockaddr_in", !19, i64 0, !19, i64 2, !20, i64 4, !7, i64 8}
!19 = !{!"short", !7, i64 0}
!20 = !{!"in_addr", !10, i64 0}
!21 = !{!18, !19, i64 2}
!22 = !{!23, !10, i64 564}
!23 = !{!"", !10, i64 0, !10, i64 4, !7, i64 8, !12, i64 264, !6, i64 272, !12, i64 280, !6, i64 288, !12, i64 296, !24, i64 304, !24, i64 432, !10, i64 560, !10, i64 564}
!24 = !{!"", !25, i64 0, !7, i64 96}
!25 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!26 = !{!27, !12, i64 57720}
!27 = !{!"", !10, i64 0, !10, i64 4, !7, i64 8, !12, i64 264, !10, i64 272, !7, i64 276, !12, i64 18720, !7, i64 18728, !7, i64 37165, !6, i64 55608, !12, i64 55616, !10, i64 55624, !7, i64 55628, !12, i64 55664, !7, i64 55672, !12, i64 57720, !7, i64 57728, !12, i64 59776, !7, i64 59784, !12, i64 61832, !24, i64 61840, !24, i64 61968, !10, i64 62096, !7, i64 62100, !7, i64 62148, !28, i64 62248, !28, i64 62424, !30, i64 62600, !30, i64 62728, !7, i64 62856, !7, i64 62864, !7, i64 62872, !7, i64 62884, !31, i64 62896, !31, i64 63032, !10, i64 63168}
!28 = !{!"", !29, i64 0, !7, i64 112}
!29 = !{!"", !7, i64 0, !12, i64 32, !7, i64 40, !12, i64 104}
!30 = !{!"", !7, i64 0}
!31 = !{!"BLOCK_CIPHER_KEY", !7, i64 0, !6, i64 128}
!32 = !{!33, !12, i64 0}
!33 = !{!"timeval", !12, i64 0, !12, i64 8}
!34 = !{!33, !12, i64 8}
!35 = !{!27, !10, i64 272}


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