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

; 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.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.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }

@__const.tlcp_server_main.server_ciphers = external hidden unnamed_addr constant [1 x i32], align 4
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@options = 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 [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 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 [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 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_server_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 [18 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [36 x i8], align 1

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

37:                                               ; preds = %2
  %38 = load ptr, ptr @stderr, align 8, !tbaa !9
  %39 = load ptr, ptr %7, align 8, !tbaa !9
  %40 = load ptr, ptr @options, align 8, !tbaa !9
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str, ptr noundef %39, ptr noundef %40) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

42:                                               ; preds = %2
  br label %43

43:                                               ; preds = %173, %42
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %46, label %178

46:                                               ; preds = %43
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = call i32 @strcmp(ptr noundef %48, ptr noundef @.str.1) #10
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %55, label %51

51:                                               ; preds = %46
  %52 = load ptr, ptr %7, align 8, !tbaa !9
  %53 = load ptr, ptr @options, align 8, !tbaa !9
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %52, ptr noundef %53)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

55:                                               ; preds = %46
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = call i32 @strcmp(ptr noundef %57, ptr noundef @.str.2) #10
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %70, label %60

60:                                               ; preds = %55
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %4, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 1
  br i1 %63, label %64, label %65

64:                                               ; preds = %60
  br label %160

65:                                               ; preds = %60
  %66 = load ptr, ptr %5, align 8, !tbaa !9
  %67 = getelementptr inbounds ptr, ptr %66, i32 1
  store ptr %67, ptr %5, align 8, !tbaa !9
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  %69 = call i32 @atoi(ptr noundef %68) #10
  store i32 %69, ptr %8, align 4, !tbaa !5
  br label %172

70:                                               ; preds = %55
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = call i32 @strcmp(ptr noundef %72, ptr noundef @.str.3) #10
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %84, label %75

75:                                               ; preds = %70
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %4, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 1
  br i1 %78, label %79, label %80

79:                                               ; preds = %75
  br label %160

80:                                               ; preds = %75
  %81 = load ptr, ptr %5, align 8, !tbaa !9
  %82 = getelementptr inbounds ptr, ptr %81, i32 1
  store ptr %82, ptr %5, align 8, !tbaa !9
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  store ptr %83, ptr %9, align 8, !tbaa !9
  br label %171

84:                                               ; preds = %70
  %85 = load ptr, ptr %5, align 8, !tbaa !9
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = call i32 @strcmp(ptr noundef %86, ptr noundef @.str.4) #10
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %98, label %89

89:                                               ; preds = %84
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = add nsw i32 %90, -1
  store i32 %91, ptr %4, align 4, !tbaa !5
  %92 = icmp slt i32 %91, 1
  br i1 %92, label %93, label %94

93:                                               ; preds = %89
  br label %160

94:                                               ; preds = %89
  %95 = load ptr, ptr %5, align 8, !tbaa !9
  %96 = getelementptr inbounds ptr, ptr %95, i32 1
  store ptr %96, ptr %5, align 8, !tbaa !9
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  store ptr %97, ptr %10, align 8, !tbaa !9
  br label %170

98:                                               ; preds = %84
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = call i32 @strcmp(ptr noundef %100, ptr noundef @.str.5) #10
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %112, label %103

103:                                              ; preds = %98
  %104 = load i32, ptr %4, align 4, !tbaa !5
  %105 = add nsw i32 %104, -1
  store i32 %105, ptr %4, align 4, !tbaa !5
  %106 = icmp slt i32 %105, 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  br label %160

108:                                              ; preds = %103
  %109 = load ptr, ptr %5, align 8, !tbaa !9
  %110 = getelementptr inbounds ptr, ptr %109, i32 1
  store ptr %110, ptr %5, align 8, !tbaa !9
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  store ptr %111, ptr %11, align 8, !tbaa !9
  br label %169

112:                                              ; preds = %98
  %113 = load ptr, ptr %5, align 8, !tbaa !9
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  %115 = call i32 @strcmp(ptr noundef %114, ptr noundef @.str.6) #10
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %126, label %117

117:                                              ; preds = %112
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = add nsw i32 %118, -1
  store i32 %119, ptr %4, align 4, !tbaa !5
  %120 = icmp slt i32 %119, 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %117
  br label %160

122:                                              ; preds = %117
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  %124 = getelementptr inbounds ptr, ptr %123, i32 1
  store ptr %124, ptr %5, align 8, !tbaa !9
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  store ptr %125, ptr %12, align 8, !tbaa !9
  br label %168

126:                                              ; preds = %112
  %127 = load ptr, ptr %5, align 8, !tbaa !9
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = call i32 @strcmp(ptr noundef %128, ptr noundef @.str.7) #10
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %140, label %131

131:                                              ; preds = %126
  %132 = load i32, ptr %4, align 4, !tbaa !5
  %133 = add nsw i32 %132, -1
  store i32 %133, ptr %4, align 4, !tbaa !5
  %134 = icmp slt i32 %133, 1
  br i1 %134, label %135, label %136

135:                                              ; preds = %131
  br label %160

136:                                              ; preds = %131
  %137 = load ptr, ptr %5, align 8, !tbaa !9
  %138 = getelementptr inbounds ptr, ptr %137, i32 1
  store ptr %138, ptr %5, align 8, !tbaa !9
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  store ptr %139, ptr %13, align 8, !tbaa !9
  br label %167

140:                                              ; preds = %126
  %141 = load ptr, ptr %5, align 8, !tbaa !9
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = call i32 @strcmp(ptr noundef %142, ptr noundef @.str.8) #10
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %154, label %145

145:                                              ; preds = %140
  %146 = load i32, ptr %4, align 4, !tbaa !5
  %147 = add nsw i32 %146, -1
  store i32 %147, ptr %4, align 4, !tbaa !5
  %148 = icmp slt i32 %147, 1
  br i1 %148, label %149, label %150

149:                                              ; preds = %145
  br label %160

150:                                              ; preds = %145
  %151 = load ptr, ptr %5, align 8, !tbaa !9
  %152 = getelementptr inbounds ptr, ptr %151, i32 1
  store ptr %152, ptr %5, align 8, !tbaa !9
  %153 = load ptr, ptr %152, align 8, !tbaa !9
  store ptr %153, ptr %14, align 8, !tbaa !9
  br label %166

154:                                              ; preds = %140
  %155 = load ptr, ptr @stderr, align 8, !tbaa !9
  %156 = load ptr, ptr %7, align 8, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !9
  %158 = load ptr, ptr %157, align 8, !tbaa !9
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef @.str.9, ptr noundef %156, ptr noundef %158) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

160:                                              ; preds = %149, %135, %121, %107, %93, %79, %64
  %161 = load ptr, ptr @stderr, align 8, !tbaa !9
  %162 = load ptr, ptr %7, align 8, !tbaa !9
  %163 = load ptr, ptr %5, align 8, !tbaa !9
  %164 = load ptr, ptr %163, align 8, !tbaa !9
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.10, ptr noundef %162, ptr noundef %164) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

166:                                              ; preds = %150
  br label %167

167:                                              ; preds = %166, %136
  br label %168

168:                                              ; preds = %167, %122
  br label %169

169:                                              ; preds = %168, %108
  br label %170

170:                                              ; preds = %169, %94
  br label %171

171:                                              ; preds = %170, %80
  br label %172

172:                                              ; preds = %171, %65
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %4, align 4, !tbaa !5
  %175 = add nsw i32 %174, -1
  store i32 %175, ptr %4, align 4, !tbaa !5
  %176 = load ptr, ptr %5, align 8, !tbaa !9
  %177 = getelementptr inbounds ptr, ptr %176, i32 1
  store ptr %177, ptr %5, align 8, !tbaa !9
  br label %43, !llvm.loop !13

178:                                              ; preds = %43
  %179 = load ptr, ptr %9, align 8, !tbaa !9
  %180 = icmp ne ptr %179, null
  br i1 %180, label %185, label %181

181:                                              ; preds = %178
  %182 = load ptr, ptr @stderr, align 8, !tbaa !9
  %183 = load ptr, ptr %7, align 8, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %182, ptr noundef @.str.11, ptr noundef %183) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

185:                                              ; preds = %178
  %186 = load ptr, ptr %10, align 8, !tbaa !9
  %187 = icmp ne ptr %186, null
  br i1 %187, label %192, label %188

188:                                              ; preds = %185
  %189 = load ptr, ptr @stderr, align 8, !tbaa !9
  %190 = load ptr, ptr %7, align 8, !tbaa !9
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.12, ptr noundef %190) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

192:                                              ; preds = %185
  %193 = load ptr, ptr %11, align 8, !tbaa !9
  %194 = icmp ne ptr %193, null
  br i1 %194, label %199, label %195

195:                                              ; preds = %192
  %196 = load ptr, ptr @stderr, align 8, !tbaa !9
  %197 = load ptr, ptr %7, align 8, !tbaa !9
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %196, ptr noundef @.str.13, ptr noundef %197) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

199:                                              ; preds = %192
  %200 = load ptr, ptr %12, align 8, !tbaa !9
  %201 = icmp ne ptr %200, null
  br i1 %201, label %206, label %202

202:                                              ; preds = %199
  %203 = load ptr, ptr @stderr, align 8, !tbaa !9
  %204 = load ptr, ptr %7, align 8, !tbaa !9
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %203, ptr noundef @.str.14, ptr noundef %204) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

206:                                              ; preds = %199
  %207 = load ptr, ptr %13, align 8, !tbaa !9
  %208 = icmp ne ptr %207, null
  br i1 %208, label %213, label %209

209:                                              ; preds = %206
  %210 = load ptr, ptr @stderr, align 8, !tbaa !9
  %211 = load ptr, ptr %7, align 8, !tbaa !9
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.15, ptr noundef %211) #9
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

213:                                              ; preds = %206
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 568, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 63176, i1 false)
  %214 = call i32 @tls_ctx_init(ptr noundef %16, i32 noundef 257, i32 noundef 0)
  %215 = icmp ne i32 %214, 1
  br i1 %215, label %228, label %216

216:                                              ; preds = %213
  %217 = getelementptr inbounds [1 x i32], ptr %15, i64 0, i64 0
  %218 = call i32 @tls_ctx_set_cipher_suites(ptr noundef %16, ptr noundef %217, i64 noundef 1)
  %219 = icmp ne i32 %218, 1
  br i1 %219, label %228, label %220

220:                                              ; preds = %216
  %221 = load ptr, ptr %9, align 8, !tbaa !9
  %222 = load ptr, ptr %10, align 8, !tbaa !9
  %223 = load ptr, ptr %11, align 8, !tbaa !9
  %224 = load ptr, ptr %12, align 8, !tbaa !9
  %225 = load ptr, ptr %13, align 8, !tbaa !9
  %226 = call i32 @tls_ctx_set_tlcp_server_certificate_and_keys(ptr noundef %16, ptr noundef %221, ptr noundef %222, ptr noundef %223, ptr noundef %224, ptr noundef %225)
  %227 = icmp ne i32 %226, 1
  br i1 %227, label %228, label %234

228:                                              ; preds = %220, %216, %213
  br label %229

229:                                              ; preds = %228
  %230 = load ptr, ptr @stderr, align 8, !tbaa !9
  %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %230, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 117, ptr noundef @__FUNCTION__.tlcp_server_main) #9
  br label %232

232:                                              ; preds = %229
  br label %233

233:                                              ; preds = %232
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

234:                                              ; preds = %220
  %235 = load ptr, ptr %14, align 8, !tbaa !9
  %236 = icmp ne ptr %235, null
  br i1 %236, label %237, label %248

237:                                              ; preds = %234
  %238 = load ptr, ptr %14, align 8, !tbaa !9
  %239 = call i32 @tls_ctx_set_ca_certificates(ptr noundef %16, ptr noundef %238, i32 noundef 4)
  %240 = icmp ne i32 %239, 1
  br i1 %240, label %241, label %247

241:                                              ; preds = %237
  br label %242

242:                                              ; preds = %241
  %243 = load ptr, ptr @stderr, align 8, !tbaa !9
  %244 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %243, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 122, ptr noundef @__FUNCTION__.tlcp_server_main) #9
  br label %245

245:                                              ; preds = %242
  br label %246

246:                                              ; preds = %245
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

247:                                              ; preds = %237
  br label %248

248:                                              ; preds = %247, %234
  %249 = call i32 @tls_socket_lib_init()
  %250 = icmp ne i32 %249, 1
  br i1 %250, label %251, label %257

251:                                              ; preds = %248
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr @stderr, align 8, !tbaa !9
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 129, ptr noundef @__FUNCTION__.tlcp_server_main) #9
  br label %255

255:                                              ; preds = %252
  br label %256

256:                                              ; preds = %255
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

257:                                              ; preds = %248
  %258 = call i32 @tls_socket_create(ptr noundef %20, i32 noundef 2, i32 noundef 1, i32 noundef 0)
  %259 = icmp ne i32 %258, 1
  br i1 %259, label %260, label %266

260:                                              ; preds = %257
  br label %261

261:                                              ; preds = %260
  %262 = load ptr, ptr @stderr, align 8, !tbaa !9
  %263 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %262, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 134, ptr noundef @__FUNCTION__.tlcp_server_main) #9
  br label %264

264:                                              ; preds = %261
  br label %265

265:                                              ; preds = %264
  store i32 1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

266:                                              ; preds = %257
  %267 = getelementptr inbounds %struct.sockaddr_in, ptr %22, i32 0, i32 0
  store i16 2, ptr %267, align 4, !tbaa !15
  %268 = getelementptr inbounds %struct.sockaddr_in, ptr %22, i32 0, i32 2
  %269 = getelementptr inbounds %struct.in_addr, ptr %268, i32 0, i32 0
  store i32 0, ptr %269, align 4, !tbaa !19
  %270 = load i32, ptr %8, align 4, !tbaa !5
  %271 = trunc i32 %270 to i16
  %272 = call zeroext i16 @__bswap_16(i16 noundef zeroext %271)
  %273 = getelementptr inbounds %struct.sockaddr_in, ptr %22, i32 0, i32 1
  store i16 %272, ptr %273, align 2, !tbaa !20
  %274 = load i32, ptr %20, align 4, !tbaa !5
  %275 = call i32 @tls_socket_bind(i32 noundef %274, ptr noundef %22)
  %276 = icmp ne i32 %275, 1
  br i1 %276, label %277, label %281

277:                                              ; preds = %266
  %278 = load ptr, ptr @stderr, align 8, !tbaa !9
  %279 = load ptr, ptr %7, align 8, !tbaa !9
  %280 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %278, ptr noundef @.str.18, ptr noundef %279) #9
  br label %355

281:                                              ; preds = %266
  %282 = call i32 @puts(ptr noundef @.str.19)
  %283 = load i32, ptr %20, align 4, !tbaa !5
  %284 = call i32 @tls_socket_listen(i32 noundef %283, i32 noundef 1)
  br label %285

285:                                              ; preds = %352, %281
  store i32 16, ptr %24, align 4, !tbaa !5
  %286 = load i32, ptr %20, align 4, !tbaa !5
  %287 = call i32 @tls_socket_accept(i32 noundef %286, ptr noundef %23, ptr noundef %21)
  %288 = icmp ne i32 %287, 1
  br i1 %288, label %289, label %293

289:                                              ; preds = %285
  %290 = load ptr, ptr @stderr, align 8, !tbaa !9
  %291 = load ptr, ptr %7, align 8, !tbaa !9
  %292 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %290, ptr noundef @.str.20, ptr noundef %291) #9
  br label %355

293:                                              ; preds = %285
  %294 = call i32 @puts(ptr noundef @.str.21)
  %295 = call i32 @tls_init(ptr noundef %17, ptr noundef %16)
  %296 = icmp ne i32 %295, 1
  br i1 %296, label %301, label %297

297:                                              ; preds = %293
  %298 = load i32, ptr %21, align 4, !tbaa !5
  %299 = call i32 @tls_set_socket(ptr noundef %17, i32 noundef %298)
  %300 = icmp ne i32 %299, 1
  br i1 %300, label %301, label %307

301:                                              ; preds = %297, %293
  br label %302

302:                                              ; preds = %301
  %303 = load ptr, ptr @stderr, align 8, !tbaa !9
  %304 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %303, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 162, ptr noundef @__FUNCTION__.tlcp_server_main) #9
  br label %305

305:                                              ; preds = %302
  br label %306

306:                                              ; preds = %305
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

307:                                              ; preds = %297
  %308 = call i32 @tls_do_handshake(ptr noundef %17)
  %309 = icmp ne i32 %308, 1
  br i1 %309, label %310, label %316

310:                                              ; preds = %307
  br label %311

311:                                              ; preds = %310
  %312 = load ptr, ptr @stderr, align 8, !tbaa !9
  %313 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %312, ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 167, ptr noundef @__FUNCTION__.tlcp_server_main) #9
  br label %314

314:                                              ; preds = %311
  br label %315

315:                                              ; preds = %314
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

316:                                              ; preds = %307
  br label %317

317:                                              ; preds = %354, %316
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  br label %318

318:                                              ; preds = %335, %317
  store i64 1600, ptr %19, align 8, !tbaa !11
  %319 = getelementptr inbounds [1600 x i8], ptr %18, i64 0, i64 0
  %320 = call i32 @tls_recv(ptr noundef %17, ptr noundef %319, i64 noundef 1600, ptr noundef %19)
  store i32 %320, ptr %26, align 4, !tbaa !5
  %321 = icmp ne i32 %320, 1
  br i1 %321, label %322, label %334

322:                                              ; preds = %318
  %323 = load i32, ptr %26, align 4, !tbaa !5
  %324 = icmp slt i32 %323, 0
  br i1 %324, label %325, label %329

325:                                              ; preds = %322
  %326 = load ptr, ptr @stderr, align 8, !tbaa !9
  %327 = load ptr, ptr %7, align 8, !tbaa !9
  %328 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %326, ptr noundef @.str.22, ptr noundef %327) #9
  br label %333

329:                                              ; preds = %322
  %330 = load ptr, ptr @stderr, align 8, !tbaa !9
  %331 = load ptr, ptr %7, align 8, !tbaa !9
  %332 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %330, ptr noundef @.str.23, ptr noundef %331) #9
  br label %333

333:                                              ; preds = %329, %325
  call void @tls_cleanup(ptr noundef %17)
  store i32 14, ptr %25, align 4
  br label %352

334:                                              ; preds = %318
  br label %335

335:                                              ; preds = %334
  %336 = load i64, ptr %19, align 8, !tbaa !11
  %337 = icmp ne i64 %336, 0
  %338 = xor i1 %337, true
  br i1 %338, label %318, label %339, !llvm.loop !21

339:                                              ; preds = %335
  %340 = getelementptr inbounds [1600 x i8], ptr %18, i64 0, i64 0
  %341 = load i64, ptr %19, align 8, !tbaa !11
  %342 = call i32 @tls_send(ptr noundef %17, ptr noundef %340, i64 noundef %341, ptr noundef %27)
  %343 = icmp ne i32 %342, 1
  br i1 %343, label %344, label %351

344:                                              ; preds = %339
  %345 = load ptr, ptr @stderr, align 8, !tbaa !9
  %346 = load ptr, ptr %7, align 8, !tbaa !9
  %347 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %345, ptr noundef @.str.24, ptr noundef %346) #9
  %348 = getelementptr inbounds %struct.TLS_CONNECT, ptr %17, i32 0, i32 4
  %349 = load i32, ptr %348, align 8, !tbaa !22
  %350 = call i32 @close(i32 noundef %349)
  store i32 13, ptr %25, align 4
  br label %352

351:                                              ; preds = %339
  store i32 0, ptr %25, align 4
  br label %352

352:                                              ; preds = %351, %344, %333
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  %353 = load i32, ptr %25, align 4
  switch i32 %353, label %357 [
    i32 0, label %354
    i32 14, label %285
    i32 13, label %355
  ]

354:                                              ; preds = %352
  br label %317

355:                                              ; preds = %352, %289, %277
  %356 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %356, ptr %3, align 4
  store i32 1, ptr %25, align 4
  br label %357

357:                                              ; preds = %355, %352, %315, %306, %265, %256, %246, %233, %209, %202, %195, %188, %181, %160, %154, %51, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 1600, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 63176, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 568, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, 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
  %358 = load i32, ptr %3, align 4
  ret i32 %358
}

; 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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

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

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

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

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

declare i32 @tls_ctx_set_tlcp_server_certificate_and_keys(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #6

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

declare i32 @tls_socket_lib_init() #6

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

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

declare i32 @tls_socket_bind(i32 noundef, ptr noundef) #6

declare i32 @puts(ptr noundef) #6

declare i32 @tls_socket_listen(i32 noundef, i32 noundef) #6

declare i32 @tls_socket_accept(i32 noundef, ptr noundef, ptr noundef) #6

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

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

declare i32 @tls_do_handshake(ptr noundef) #6

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

declare void @tls_cleanup(ptr noundef) #6

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

declare i32 @close(i32 noundef) #6

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

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: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 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 #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, !17, i64 0}
!16 = !{!"sockaddr_in", !17, i64 0, !17, i64 2, !18, i64 4, !7, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!"in_addr", !6, i64 0}
!19 = !{!16, !6, i64 4}
!20 = !{!16, !17, i64 2}
!21 = distinct !{!21, !14}
!22 = !{!23, !6, i64 272}
!23 = !{!"", !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, !24, i64 61840, !24, i64 61968, !6, i64 62096, !7, i64 62100, !7, i64 62148, !26, i64 62248, !26, i64 62424, !28, i64 62600, !28, i64 62728, !7, i64 62856, !7, i64 62864, !7, i64 62872, !7, i64 62884, !29, i64 62896, !29, i64 63032, !6, i64 63168}
!24 = !{!"", !25, i64 0, !7, i64 96}
!25 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!26 = !{!"", !27, i64 0, !7, i64 112}
!27 = !{!"", !7, i64 0, !12, i64 32, !7, i64 40, !12, i64 104}
!28 = !{!"", !7, i64 0}
!29 = !{!"BLOCK_CIPHER_KEY", !7, i64 0, !10, i64 128}


; 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.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.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }

@__const.tlcp_server_main.server_ciphers = external hidden unnamed_addr constant [1 x i32], align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@options = 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 [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 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 [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 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_server_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 [18 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [36 x i8], align 1

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

.preheader117.preheader:                          ; preds = %2
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  br label %.preheader117

17:                                               ; preds = %2
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = load ptr, ptr @options, align 8, !tbaa !5
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str, ptr noundef %13, ptr noundef %19) #9
  br label %.loopexit

.preheader117:                                    ; preds = %.preheader117.preheader, %82
  %.062.in152 = phi i32 [ %.1, %82 ], [ %0, %.preheader117.preheader ]
  %.063151 = phi ptr [ %.164, %82 ], [ null, %.preheader117.preheader ]
  %.065150 = phi ptr [ %.166, %82 ], [ null, %.preheader117.preheader ]
  %.067149 = phi ptr [ %.168, %82 ], [ null, %.preheader117.preheader ]
  %.069148 = phi ptr [ %.170, %82 ], [ null, %.preheader117.preheader ]
  %.071147 = phi ptr [ %.172, %82 ], [ null, %.preheader117.preheader ]
  %.073146 = phi ptr [ %.174, %82 ], [ null, %.preheader117.preheader ]
  %.075145 = phi i32 [ %.176, %82 ], [ 443, %.preheader117.preheader ]
  %.077144 = phi ptr [ %83, %82 ], [ %16, %.preheader117.preheader ]
  %21 = load ptr, ptr %.077144, align 8, !tbaa !5
  %22 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.1) #10
  %.not107 = icmp eq i32 %22, 0
  br i1 %.not107, label %23, label %26

23:                                               ; preds = %.preheader117
  %24 = load ptr, ptr @options, align 8, !tbaa !5
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %13, ptr noundef %24)
  br label %.loopexit

26:                                               ; preds = %.preheader117
  %27 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.2) #10
  %.not108 = icmp eq i32 %27, 0
  br i1 %.not108, label %28, label %34

28:                                               ; preds = %26
  %29 = icmp eq i32 %.062.in152, 2
  br i1 %29, label %79, label %30

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %.077144, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = tail call i32 @atoi(ptr nocapture noundef %32) #10
  br label %82

34:                                               ; preds = %26
  %35 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.3) #10
  %.not109 = icmp eq i32 %35, 0
  br i1 %.not109, label %36, label %41

36:                                               ; preds = %34
  %37 = icmp eq i32 %.062.in152, 2
  br i1 %37, label %79, label %38

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %.077144, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  br label %82

41:                                               ; preds = %34
  %42 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.4) #10
  %.not110 = icmp eq i32 %42, 0
  br i1 %.not110, label %43, label %48

43:                                               ; preds = %41
  %44 = icmp eq i32 %.062.in152, 2
  br i1 %44, label %79, label %45

45:                                               ; preds = %43
  %46 = getelementptr inbounds i8, ptr %.077144, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  br label %82

48:                                               ; preds = %41
  %49 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.5) #10
  %.not111 = icmp eq i32 %49, 0
  br i1 %.not111, label %50, label %55

50:                                               ; preds = %48
  %51 = icmp eq i32 %.062.in152, 2
  br i1 %51, label %79, label %52

52:                                               ; preds = %50
  %53 = getelementptr inbounds i8, ptr %.077144, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  br label %82

55:                                               ; preds = %48
  %56 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.6) #10
  %.not112 = icmp eq i32 %56, 0
  br i1 %.not112, label %57, label %62

57:                                               ; preds = %55
  %58 = icmp eq i32 %.062.in152, 2
  br i1 %58, label %79, label %59

59:                                               ; preds = %57
  %60 = getelementptr inbounds i8, ptr %.077144, i64 8
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  br label %82

62:                                               ; preds = %55
  %63 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.7) #10
  %.not113 = icmp eq i32 %63, 0
  br i1 %.not113, label %64, label %69

64:                                               ; preds = %62
  %65 = icmp eq i32 %.062.in152, 2
  br i1 %65, label %79, label %66

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %.077144, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  br label %82

69:                                               ; preds = %62
  %70 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.8) #10
  %.not114 = icmp eq i32 %70, 0
  br i1 %.not114, label %71, label %76

71:                                               ; preds = %69
  %72 = icmp eq i32 %.062.in152, 2
  br i1 %72, label %79, label %73

73:                                               ; preds = %71
  %74 = getelementptr inbounds i8, ptr %.077144, i64 8
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  br label %82

76:                                               ; preds = %69
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.9, ptr noundef %13, ptr noundef %21) #9
  br label %.loopexit

79:                                               ; preds = %71, %64, %57, %50, %43, %36, %28
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.10, ptr noundef %13, ptr noundef %21) #9
  br label %.loopexit

82:                                               ; preds = %30, %45, %59, %73, %66, %52, %38
  %.176 = phi i32 [ %.075145, %73 ], [ %.075145, %66 ], [ %.075145, %59 ], [ %.075145, %52 ], [ %.075145, %45 ], [ %.075145, %38 ], [ %33, %30 ]
  %.174 = phi ptr [ %.073146, %73 ], [ %.073146, %66 ], [ %.073146, %59 ], [ %.073146, %52 ], [ %.073146, %45 ], [ %40, %38 ], [ %.073146, %30 ]
  %.172 = phi ptr [ %.071147, %73 ], [ %.071147, %66 ], [ %.071147, %59 ], [ %.071147, %52 ], [ %47, %45 ], [ %.071147, %38 ], [ %.071147, %30 ]
  %.170 = phi ptr [ %.069148, %73 ], [ %.069148, %66 ], [ %.069148, %59 ], [ %54, %52 ], [ %.069148, %45 ], [ %.069148, %38 ], [ %.069148, %30 ]
  %.168 = phi ptr [ %.067149, %73 ], [ %.067149, %66 ], [ %61, %59 ], [ %.067149, %52 ], [ %.067149, %45 ], [ %.067149, %38 ], [ %.067149, %30 ]
  %.166 = phi ptr [ %.065150, %73 ], [ %68, %66 ], [ %.065150, %59 ], [ %.065150, %52 ], [ %.065150, %45 ], [ %.065150, %38 ], [ %.065150, %30 ]
  %.164 = phi ptr [ %75, %73 ], [ %.063151, %66 ], [ %.063151, %59 ], [ %.063151, %52 ], [ %.063151, %45 ], [ %.063151, %38 ], [ %.063151, %30 ]
  %.1 = add nsw i32 %.062.in152, -2
  %83 = getelementptr inbounds i8, ptr %.077144, i64 16
  %84 = icmp sgt i32 %.062.in152, 3
  br i1 %84, label %.preheader117, label %85, !llvm.loop !11

85:                                               ; preds = %82
  %.not = icmp eq ptr %.174, null
  br i1 %.not, label %86, label %89

86:                                               ; preds = %85
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.11, ptr noundef %13) #9
  br label %.loopexit

89:                                               ; preds = %85
  %.not88 = icmp eq ptr %.172, null
  br i1 %.not88, label %90, label %93

90:                                               ; preds = %89
  %91 = load ptr, ptr @stderr, align 8, !tbaa !5
  %92 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.12, ptr noundef %13) #9
  br label %.loopexit

93:                                               ; preds = %89
  %.not89 = icmp eq ptr %.170, null
  br i1 %.not89, label %94, label %97

94:                                               ; preds = %93
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef nonnull @.str.13, ptr noundef %13) #9
  br label %.loopexit

97:                                               ; preds = %93
  %.not90 = icmp eq ptr %.168, null
  br i1 %.not90, label %98, label %101

98:                                               ; preds = %97
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef nonnull @.str.14, ptr noundef %13) #9
  br label %.loopexit

101:                                              ; preds = %97
  %.not91 = icmp eq ptr %.166, null
  br i1 %.not91, label %102, label %105

102:                                              ; preds = %101
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.15, ptr noundef %13) #9
  br label %.loopexit

105:                                              ; preds = %101
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(568) %4, i8 0, i64 568, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(63176) %5, i8 0, i64 63176, i1 false)
  %106 = call i32 @tls_ctx_init(ptr noundef nonnull %4, i32 noundef 257, i32 noundef 0) #8
  %.not92 = icmp eq i32 %106, 1
  br i1 %.not92, label %107, label %111

107:                                              ; preds = %105
  %108 = call i32 @tls_ctx_set_cipher_suites(ptr noundef nonnull %4, ptr noundef nonnull %3, i64 noundef 1) #8
  %.not93 = icmp eq i32 %108, 1
  br i1 %.not93, label %109, label %111

109:                                              ; preds = %107
  %110 = call i32 @tls_ctx_set_tlcp_server_certificate_and_keys(ptr noundef nonnull %4, ptr noundef nonnull %.174, ptr noundef nonnull %.172, ptr noundef nonnull %.170, ptr noundef nonnull %.168, ptr noundef nonnull %.166) #8
  %.not94 = icmp eq i32 %110, 1
  br i1 %.not94, label %114, label %111

111:                                              ; preds = %105, %107, %109
  %112 = load ptr, ptr @stderr, align 8, !tbaa !5
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 117, ptr noundef nonnull @__FUNCTION__.tlcp_server_main) #9
  br label %.loopexit

114:                                              ; preds = %109
  %.not95 = icmp eq ptr %.164, null
  br i1 %.not95, label %120, label %115

115:                                              ; preds = %114
  %116 = call i32 @tls_ctx_set_ca_certificates(ptr noundef nonnull %4, ptr noundef nonnull %.164, i32 noundef 4) #8
  %.not96 = icmp eq i32 %116, 1
  br i1 %.not96, label %120, label %117

117:                                              ; preds = %115
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 122, ptr noundef nonnull @__FUNCTION__.tlcp_server_main) #9
  br label %.loopexit

120:                                              ; preds = %115, %114
  %121 = call i32 @tls_socket_lib_init() #8
  %.not97 = icmp eq i32 %121, 1
  br i1 %.not97, label %125, label %122

122:                                              ; preds = %120
  %123 = load ptr, ptr @stderr, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 129, ptr noundef nonnull @__FUNCTION__.tlcp_server_main) #9
  br label %.loopexit

125:                                              ; preds = %120
  %126 = call i32 @tls_socket_create(ptr noundef nonnull %8, i32 noundef 2, i32 noundef 1, i32 noundef 0) #8
  %.not98 = icmp eq i32 %126, 1
  br i1 %.not98, label %130, label %127

127:                                              ; preds = %125
  %128 = load ptr, ptr @stderr, align 8, !tbaa !5
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 134, ptr noundef nonnull @__FUNCTION__.tlcp_server_main) #9
  br label %.loopexit

130:                                              ; preds = %125
  store i16 2, ptr %10, align 4, !tbaa !13
  %131 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 0, ptr %131, align 4, !tbaa !18
  %132 = trunc i32 %.176 to i16
  %133 = call zeroext i16 @__bswap_16(i16 noundef zeroext %132)
  %134 = getelementptr inbounds i8, ptr %10, i64 2
  store i16 %133, ptr %134, align 2, !tbaa !19
  %135 = load i32, ptr %8, align 4, !tbaa !20
  %136 = call i32 @tls_socket_bind(i32 noundef %135, ptr noundef nonnull %10) #8
  %.not99 = icmp eq i32 %136, 1
  br i1 %.not99, label %140, label %137

137:                                              ; preds = %130
  %138 = load ptr, ptr @stderr, align 8, !tbaa !5
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef nonnull @.str.18, ptr noundef %13) #9
  br label %.loopexit

140:                                              ; preds = %130
  %141 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.19)
  %142 = load i32, ptr %8, align 4, !tbaa !20
  %143 = call i32 @tls_socket_listen(i32 noundef %142, i32 noundef 1) #8
  %144 = load i32, ptr %8, align 4, !tbaa !20
  %145 = call i32 @tls_socket_accept(i32 noundef %144, ptr noundef nonnull %11, ptr noundef nonnull %9) #8
  %.not100153 = icmp eq i32 %145, 1
  br i1 %.not100153, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit116, %140
  %146 = load ptr, ptr @stderr, align 8, !tbaa !5
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef nonnull @.str.20, ptr noundef %13) #9
  br label %.loopexit

.lr.ph:                                           ; preds = %140, %.loopexit116
  %148 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.21)
  %149 = call i32 @tls_init(ptr noundef nonnull %5, ptr noundef nonnull %4) #8
  %.not101 = icmp eq i32 %149, 1
  br i1 %.not101, label %150, label %153

150:                                              ; preds = %.lr.ph
  %151 = load i32, ptr %9, align 4, !tbaa !20
  %152 = call i32 @tls_set_socket(ptr noundef nonnull %5, i32 noundef %151) #8
  %.not102 = icmp eq i32 %152, 1
  br i1 %.not102, label %156, label %153

153:                                              ; preds = %.lr.ph, %150
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 162, ptr noundef nonnull @__FUNCTION__.tlcp_server_main) #9
  br label %.loopexit

156:                                              ; preds = %150
  %157 = call i32 @tls_do_handshake(ptr noundef nonnull %5) #8
  %.not103 = icmp eq i32 %157, 1
  br i1 %.not103, label %.preheader, label %158

158:                                              ; preds = %156
  %159 = load ptr, ptr @stderr, align 8, !tbaa !5
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 167, ptr noundef nonnull @__FUNCTION__.tlcp_server_main) #9
  br label %.loopexit

.preheader:                                       ; preds = %156, %177
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  br label %161

161:                                              ; preds = %168, %.preheader
  store i64 1600, ptr %7, align 8, !tbaa !9
  %162 = call i32 @tls_recv(ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef 1600, ptr noundef nonnull %7) #8
  %.not104 = icmp eq i32 %162, 1
  br i1 %.not104, label %168, label %.loopexit116

.loopexit116:                                     ; preds = %161
  %163 = icmp slt i32 %162, 0
  %.str.22..str.23 = select i1 %163, ptr @.str.22, ptr @.str.23
  %164 = load ptr, ptr @stderr, align 8, !tbaa !5
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef nonnull %.str.22..str.23, ptr noundef %13) #9
  call void @tls_cleanup(ptr noundef nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %166 = load i32, ptr %8, align 4, !tbaa !20
  %167 = call i32 @tls_socket_accept(i32 noundef %166, ptr noundef nonnull %11, ptr noundef nonnull %9) #8
  %.not100 = icmp eq i32 %167, 1
  br i1 %.not100, label %.lr.ph, label %._crit_edge

168:                                              ; preds = %161
  %169 = load i64, ptr %7, align 8, !tbaa !9
  %.not105 = icmp eq i64 %169, 0
  br i1 %.not105, label %161, label %170, !llvm.loop !21

170:                                              ; preds = %168
  %171 = call i32 @tls_send(ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef %169, ptr noundef nonnull %12) #8
  %.not106 = icmp eq i32 %171, 1
  br i1 %.not106, label %177, label %.thread

.thread:                                          ; preds = %170
  %172 = load ptr, ptr @stderr, align 8, !tbaa !5
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef nonnull @.str.24, ptr noundef %13) #9
  %174 = getelementptr inbounds i8, ptr %5, i64 272
  %175 = load i32, ptr %174, align 8, !tbaa !22
  %176 = call i32 @close(i32 noundef %175) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %.loopexit

177:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %.preheader

.loopexit:                                        ; preds = %.thread, %137, %._crit_edge, %158, %153, %127, %122, %117, %111, %102, %98, %94, %90, %86, %79, %76, %23, %17
  %.0 = phi i32 [ 1, %17 ], [ 1, %76 ], [ 1, %79 ], [ 0, %23 ], [ -1, %111 ], [ -1, %117 ], [ -1, %122 ], [ 1, %127 ], [ -1, %153 ], [ -1, %158 ], [ 1, %102 ], [ 1, %98 ], [ 1, %94 ], [ 1, %90 ], [ 1, %86 ], [ 1, %._crit_edge ], [ 1, %137 ], [ 1, %.thread ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1600, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 63176, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 568, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  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_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_tlcp_server_certificate_and_keys(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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_socket_lib_init() local_unnamed_addr #6

declare i32 @tls_socket_create(ptr noundef, i32 noundef, i32 noundef, i32 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_bind(i32 noundef, ptr noundef) local_unnamed_addr #6

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

declare i32 @tls_socket_listen(i32 noundef, i32 noundef) local_unnamed_addr #6

declare i32 @tls_socket_accept(i32 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

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

declare void @tls_cleanup(ptr noundef) local_unnamed_addr #6

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

declare i32 @close(i32 noundef) local_unnamed_addr #6

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass