; LLVM IR from openanolis/openssl :: demos/sslecho (main)

; 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 }

@stderr = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [32 x i8], align 1
@server_running = external hidden global i8, align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [38 x i8], align 1
@stdin = external global ptr, align 8
@.str.28 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @create_socket(i8 noundef zeroext) #0

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

declare void @perror(ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @create_context(i8 noundef zeroext) #0

declare void @ERR_print_errors_fp(ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca [128 x i8], align 16
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %struct.sockaddr_in, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 -1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 128, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr null, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 16, ptr %20, align 4, !tbaa !5
  %21 = call ptr @signal(i32 noundef 13, ptr noundef inttoptr (i64 1 to ptr)) #7
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef @.str.12, ptr noundef @.str.13)
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 2
  br i1 %24, label %25, label %26

25:                                               ; preds = %2
  call void @usage()
  br label %26

26:                                               ; preds = %25, %2
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 1
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %29, i64 0
  %31 = load i8, ptr %30, align 1, !tbaa !13
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 115
  %34 = zext i1 %33 to i64
  %35 = select i1 %33, i32 1, i32 0
  %36 = trunc i32 %35 to i8
  store i8 %36, ptr %6, align 1, !tbaa !13
  %37 = load i8, ptr %6, align 1, !tbaa !13
  %38 = icmp ne i8 %37, 0
  br i1 %38, label %47, label %39

39:                                               ; preds = %26
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp ne i32 %40, 3
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  call void @usage()
  br label %43

43:                                               ; preds = %42, %39
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 2
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  store ptr %46, ptr %18, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %43, %26
  %48 = load i8, ptr %6, align 1, !tbaa !13
  %49 = call ptr @create_context(i8 noundef zeroext %48)
  store ptr %49, ptr %8, align 8, !tbaa !9
  %50 = load i8, ptr %6, align 1, !tbaa !13
  %51 = icmp ne i8 %50, 0
  br i1 %51, label %52, label %130

52:                                               ; preds = %47
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef 4433)
  %54 = load ptr, ptr %8, align 8, !tbaa !9
  call void @configure_server_context(ptr noundef %54)
  %55 = call i32 @create_socket(i8 noundef zeroext 1)
  store i32 %55, ptr %10, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %127, %52
  %57 = load volatile i8, ptr @server_running, align 1, !tbaa !13
  %58 = icmp ne i8 %57, 0
  br i1 %58, label %59, label %128

59:                                               ; preds = %56
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = call i32 @accept(i32 noundef %60, ptr noundef %19, ptr noundef %20)
  store i32 %61, ptr %11, align 4, !tbaa !5
  %62 = load i32, ptr %11, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %59
  call void @perror(ptr noundef @.str.15)
  call void @exit(i32 noundef 1) #8
  unreachable

65:                                               ; preds = %59
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %67 = load ptr, ptr %8, align 8, !tbaa !9
  %68 = call ptr @SSL_new(ptr noundef %67)
  store ptr %68, ptr %9, align 8, !tbaa !9
  %69 = load ptr, ptr %9, align 8, !tbaa !9
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = call i32 @SSL_set_fd(ptr noundef %69, i32 noundef %70)
  %72 = load ptr, ptr %9, align 8, !tbaa !9
  %73 = call i32 @SSL_accept(ptr noundef %72)
  %74 = icmp sle i32 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %65
  %76 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %76)
  store volatile i8 0, ptr @server_running, align 1, !tbaa !13
  br label %118

77:                                               ; preds = %65
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  br label %79

79:                                               ; preds = %116, %77
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %9, align 8, !tbaa !9
  %82 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %83 = load i64, ptr %16, align 8, !tbaa !11
  %84 = trunc i64 %83 to i32
  %85 = call i32 @SSL_read(ptr noundef %81, ptr noundef %82, i32 noundef %84)
  store i32 %85, ptr %17, align 4, !tbaa !5
  %86 = icmp sle i32 %85, 0
  br i1 %86, label %87, label %97

87:                                               ; preds = %80
  %88 = load i32, ptr %17, align 4, !tbaa !5
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %87
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  br label %95

92:                                               ; preds = %87
  %93 = load i32, ptr %17, align 4, !tbaa !5
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, i32 noundef %93)
  br label %95

95:                                               ; preds = %92, %90
  %96 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %96)
  br label %117

97:                                               ; preds = %80
  %98 = load i32, ptr %17, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 %99
  store i8 0, ptr %100, align 1, !tbaa !13
  %101 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %102 = call i32 @strcmp(ptr noundef %101, ptr noundef @.str.20) #9
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %106

104:                                              ; preds = %97
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  store volatile i8 0, ptr @server_running, align 1, !tbaa !13
  br label %117

106:                                              ; preds = %97
  %107 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, ptr noundef %107)
  %109 = load ptr, ptr %9, align 8, !tbaa !9
  %110 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %111 = load i32, ptr %17, align 4, !tbaa !5
  %112 = call i32 @SSL_write(ptr noundef %109, ptr noundef %110, i32 noundef %111)
  %113 = icmp sle i32 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %106
  %115 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %115)
  br label %116

116:                                              ; preds = %114, %106
  br label %79

117:                                              ; preds = %104, %95
  br label %118

118:                                              ; preds = %117, %75
  %119 = load volatile i8, ptr @server_running, align 1, !tbaa !13
  %120 = icmp ne i8 %119, 0
  br i1 %120, label %121, label %127

121:                                              ; preds = %118
  %122 = load ptr, ptr %9, align 8, !tbaa !9
  %123 = call i32 @SSL_shutdown(ptr noundef %122)
  %124 = load ptr, ptr %9, align 8, !tbaa !9
  call void @SSL_free(ptr noundef %124)
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = call i32 @close(i32 noundef %125)
  br label %127

127:                                              ; preds = %121, %118
  br label %56, !llvm.loop !14

128:                                              ; preds = %56
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  br label %215

130:                                              ; preds = %47
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %132 = load ptr, ptr %8, align 8, !tbaa !9
  call void @configure_client_context(ptr noundef %132)
  %133 = call i32 @create_socket(i8 noundef zeroext 0)
  store i32 %133, ptr %11, align 4, !tbaa !5
  %134 = getelementptr inbounds %struct.sockaddr_in, ptr %19, i32 0, i32 0
  store i16 2, ptr %134, align 4, !tbaa !16
  %135 = load ptr, ptr %18, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.sockaddr_in, ptr %19, i32 0, i32 2
  %137 = getelementptr inbounds %struct.in_addr, ptr %136, i32 0, i32 0
  %138 = call i32 @inet_pton(i32 noundef 2, ptr noundef %135, ptr noundef %137) #7
  %139 = call zeroext i16 @__bswap_16(i16 noundef zeroext 4433)
  %140 = getelementptr inbounds %struct.sockaddr_in, ptr %19, i32 0, i32 1
  store i16 %139, ptr %140, align 2, !tbaa !20
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = call i32 @connect(i32 noundef %141, ptr noundef %19, i32 noundef 16)
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %145

144:                                              ; preds = %130
  call void @perror(ptr noundef @.str.25)
  br label %216

145:                                              ; preds = %130
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.26)
  br label %147

147:                                              ; preds = %145
  %148 = load ptr, ptr %8, align 8, !tbaa !9
  %149 = call ptr @SSL_new(ptr noundef %148)
  store ptr %149, ptr %9, align 8, !tbaa !9
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = call i32 @SSL_set_fd(ptr noundef %150, i32 noundef %151)
  %153 = load ptr, ptr %9, align 8, !tbaa !9
  %154 = load ptr, ptr %18, align 8, !tbaa !9
  %155 = call i64 @SSL_ctrl(ptr noundef %153, i32 noundef 55, i64 noundef 0, ptr noundef %154)
  %156 = load ptr, ptr %9, align 8, !tbaa !9
  %157 = load ptr, ptr %18, align 8, !tbaa !9
  %158 = call i32 @SSL_set1_host(ptr noundef %156, ptr noundef %157)
  %159 = load ptr, ptr %9, align 8, !tbaa !9
  %160 = call i32 @SSL_connect(ptr noundef %159)
  %161 = icmp eq i32 %160, 1
  br i1 %161, label %162, label %211

162:                                              ; preds = %147
  %163 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  br label %164

164:                                              ; preds = %208, %162
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr @stdin, align 8, !tbaa !9
  %167 = call i64 @getline(ptr noundef %12, ptr noundef %13, ptr noundef %166)
  %168 = trunc i64 %167 to i32
  store i32 %168, ptr %14, align 4, !tbaa !5
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = icmp slt i32 %169, 0
  br i1 %170, label %174, label %171

171:                                              ; preds = %165
  %172 = load ptr, ptr %12, align 8, !tbaa !9
  %173 = icmp eq ptr %172, null
  br i1 %173, label %174, label %175

174:                                              ; preds = %171, %165
  br label %209

175:                                              ; preds = %171
  %176 = load ptr, ptr %12, align 8, !tbaa !9
  %177 = getelementptr inbounds i8, ptr %176, i64 0
  %178 = load i8, ptr %177, align 1, !tbaa !13
  %179 = sext i8 %178 to i32
  %180 = icmp eq i32 %179, 10
  br i1 %180, label %181, label %182

181:                                              ; preds = %175
  br label %209

182:                                              ; preds = %175
  %183 = load ptr, ptr %9, align 8, !tbaa !9
  %184 = load ptr, ptr %12, align 8, !tbaa !9
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = call i32 @SSL_write(ptr noundef %183, ptr noundef %184, i32 noundef %185)
  store i32 %186, ptr %7, align 4, !tbaa !5
  %187 = icmp sle i32 %186, 0
  br i1 %187, label %188, label %191

188:                                              ; preds = %182
  %189 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  %190 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %190)
  br label %209

191:                                              ; preds = %182
  %192 = load ptr, ptr %9, align 8, !tbaa !9
  %193 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %194 = load i64, ptr %16, align 8, !tbaa !11
  %195 = trunc i64 %194 to i32
  %196 = call i32 @SSL_read(ptr noundef %192, ptr noundef %193, i32 noundef %195)
  store i32 %196, ptr %17, align 4, !tbaa !5
  %197 = load i32, ptr %17, align 4, !tbaa !5
  %198 = icmp sle i32 %197, 0
  br i1 %198, label %199, label %202

199:                                              ; preds = %191
  %200 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  %201 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %201)
  br label %209

202:                                              ; preds = %191
  %203 = load i32, ptr %17, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 %204
  store i8 0, ptr %205, align 1, !tbaa !13
  %206 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %207 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, ptr noundef %206)
  br label %208

208:                                              ; preds = %202
  br label %164

209:                                              ; preds = %199, %188, %181, %174
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.29)
  br label %214

211:                                              ; preds = %147
  %212 = call i32 (ptr, ...) @printf(ptr noundef @.str.30)
  %213 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %213)
  br label %214

214:                                              ; preds = %211, %209
  br label %215

215:                                              ; preds = %214, %128
  br label %216

216:                                              ; preds = %215, %144
  %217 = load ptr, ptr %9, align 8, !tbaa !9
  %218 = icmp ne ptr %217, null
  br i1 %218, label %219, label %223

219:                                              ; preds = %216
  %220 = load ptr, ptr %9, align 8, !tbaa !9
  %221 = call i32 @SSL_shutdown(ptr noundef %220)
  %222 = load ptr, ptr %9, align 8, !tbaa !9
  call void @SSL_free(ptr noundef %222)
  br label %223

223:                                              ; preds = %219, %216
  %224 = load ptr, ptr %8, align 8, !tbaa !9
  call void @SSL_CTX_free(ptr noundef %224)
  %225 = load i32, ptr %11, align 4, !tbaa !5
  %226 = icmp ne i32 %225, -1
  br i1 %226, label %227, label %230

227:                                              ; preds = %223
  %228 = load i32, ptr %11, align 4, !tbaa !5
  %229 = call i32 @close(i32 noundef %228)
  br label %230

230:                                              ; preds = %227, %223
  %231 = load i32, ptr %10, align 4, !tbaa !5
  %232 = icmp ne i32 %231, -1
  br i1 %232, label %233, label %236

233:                                              ; preds = %230
  %234 = load i32, ptr %10, align 4, !tbaa !5
  %235 = call i32 @close(i32 noundef %234)
  br label %236

236:                                              ; preds = %233, %230
  %237 = load ptr, ptr %12, align 8, !tbaa !9
  %238 = icmp ne ptr %237, null
  br i1 %238, label %239, label %244

239:                                              ; preds = %236
  %240 = load i64, ptr %13, align 8, !tbaa !11
  %241 = icmp ugt i64 %240, 0
  br i1 %241, label %242, label %244

242:                                              ; preds = %239
  %243 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %243) #7
  br label %244

244:                                              ; preds = %242, %239, %236
  %245 = call i32 (ptr, ...) @printf(ptr noundef @.str.31)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  ret i32 0
}

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) #5

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

declare ptr @SSL_new(ptr noundef) #2

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

declare i32 @SSL_accept(ptr noundef) #2

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

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

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

declare i32 @SSL_shutdown(ptr noundef) #2

declare void @SSL_free(ptr noundef) #2

declare i32 @close(i32 noundef) #2

; Function Attrs: nounwind
declare i32 @inet_pton(i32 noundef, ptr noundef, ptr noundef) #5

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

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

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

declare i32 @SSL_connect(ptr noundef) #2

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

declare void @SSL_CTX_free(ptr noundef) #2

; Function Attrs: nounwind
declare void @free(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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !18, i64 0}
!17 = !{!"sockaddr_in", !18, i64 0, !18, i64 2, !19, i64 4, !7, i64 8}
!18 = !{!"short", !7, i64 0}
!19 = !{!"in_addr", !6, i64 0}
!20 = !{!17, !18, i64 2}


; 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 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [32 x i8], align 1
@server_running = external hidden global i8, align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [38 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.28 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @create_socket(i8 noundef zeroext) local_unnamed_addr #0

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @create_context(i8 noundef zeroext) local_unnamed_addr #0

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca [128 x i8], align 16
  %6 = alloca %struct.sockaddr_in, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 16, ptr %7, align 4, !tbaa !11
  %8 = tail call ptr @signal(i32 noundef 13, ptr noundef nonnull inttoptr (i64 1 to ptr)) #9
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13)
  %10 = icmp slt i32 %0, 2
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  tail call void @usage()
  br label %12

12:                                               ; preds = %11, %2
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = load i8, ptr %14, align 1, !tbaa !13
  %16 = icmp eq i8 %15, 115
  %17 = zext i1 %16 to i8
  br i1 %16, label %20, label %18

18:                                               ; preds = %12
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %71, label %19

19:                                               ; preds = %18
  tail call void @usage()
  br label %71

20:                                               ; preds = %12
  %21 = tail call ptr @create_context(i8 noundef zeroext %17)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef 4433)
  tail call void @configure_server_context(ptr noundef %21)
  %23 = tail call i32 @create_socket(i8 noundef zeroext 1)
  %24 = load volatile i8, ptr @server_running, align 1, !tbaa !13
  %.not6382 = icmp eq i8 %24, 0
  br i1 %.not6382, label %._crit_edge85, label %.lr.ph84

.lr.ph84:                                         ; preds = %20, %68
  %25 = call i32 @accept(i32 noundef %23, ptr noundef nonnull %6, ptr noundef nonnull %7) #9
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %.lr.ph84
  call void @perror(ptr noundef nonnull @.str.15) #10
  call void @exit(i32 noundef 1) #11
  unreachable

28:                                               ; preds = %.lr.ph84
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %30 = call ptr @SSL_new(ptr noundef %21) #9
  %31 = call i32 @SSL_set_fd(ptr noundef %30, i32 noundef %25) #9
  %32 = call i32 @SSL_accept(ptr noundef %30) #9
  %33 = icmp slt i32 %32, 1
  br i1 %33, label %34, label %36

34:                                               ; preds = %28
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %35) #9
  store volatile i8 0, ptr @server_running, align 1, !tbaa !13
  br label %63

36:                                               ; preds = %28
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %38 = call i32 @SSL_read(ptr noundef %30, ptr noundef nonnull %5, i32 noundef 128) #9
  %39 = icmp slt i32 %38, 1
  br i1 %39, label %._crit_edge, label %.lr.ph81

._crit_edge:                                      ; preds = %60, %36
  %.lcssa = phi i32 [ %38, %36 ], [ %61, %60 ]
  %40 = icmp eq i32 %.lcssa, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %._crit_edge
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  br label %45

43:                                               ; preds = %._crit_edge
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %.lcssa)
  br label %45

45:                                               ; preds = %43, %41
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %46) #9
  br label %63

.lr.ph81:                                         ; preds = %36, %60
  %47 = phi i32 [ %61, %60 ], [ %38, %36 ]
  %48 = zext nneg i32 %47 to i64
  %49 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 %48
  store i8 0, ptr %49, align 1, !tbaa !13
  %50 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.20) #12
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %.lr.ph81
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  store volatile i8 0, ptr @server_running, align 1, !tbaa !13
  br label %63

54:                                               ; preds = %.lr.ph81
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef nonnull %5)
  %56 = call i32 @SSL_write(ptr noundef %30, ptr noundef nonnull %5, i32 noundef %47) #9
  %57 = icmp slt i32 %56, 1
  br i1 %57, label %58, label %60

58:                                               ; preds = %54
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %59) #9
  br label %60

60:                                               ; preds = %58, %54
  %61 = call i32 @SSL_read(ptr noundef %30, ptr noundef nonnull %5, i32 noundef 128) #9
  %62 = icmp slt i32 %61, 1
  br i1 %62, label %._crit_edge, label %.lr.ph81

63:                                               ; preds = %45, %52, %34
  %64 = load volatile i8, ptr @server_running, align 1, !tbaa !13
  %.not67 = icmp eq i8 %64, 0
  br i1 %.not67, label %68, label %65

65:                                               ; preds = %63
  %66 = call i32 @SSL_shutdown(ptr noundef %30) #9
  call void @SSL_free(ptr noundef %30) #9
  %67 = call i32 @close(i32 noundef %25) #9
  br label %68

68:                                               ; preds = %65, %63
  %69 = load volatile i8, ptr @server_running, align 1, !tbaa !13
  %.not63 = icmp eq i8 %69, 0
  br i1 %.not63, label %._crit_edge85, label %.lr.ph84, !llvm.loop !14

._crit_edge85:                                    ; preds = %68, %20
  %.053.lcssa = phi i32 [ -1, %20 ], [ %25, %68 ]
  %.052.lcssa = phi ptr [ null, %20 ], [ %30, %68 ]
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23)
  br label %124

71:                                               ; preds = %19, %18
  %72 = getelementptr inbounds i8, ptr %1, i64 16
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = tail call ptr @create_context(i8 noundef zeroext %17)
  %75 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  tail call void @configure_client_context(ptr noundef %74)
  %76 = tail call i32 @create_socket(i8 noundef zeroext 0)
  store i16 2, ptr %6, align 4, !tbaa !16
  %77 = getelementptr inbounds i8, ptr %6, i64 4
  %78 = call i32 @inet_pton(i32 noundef 2, ptr noundef %73, ptr noundef nonnull %77) #9
  %79 = call zeroext i16 @__bswap_16(i16 noundef zeroext 4433)
  %80 = getelementptr inbounds i8, ptr %6, i64 2
  store i16 %79, ptr %80, align 2, !tbaa !20
  %81 = call i32 @connect(i32 noundef %76, ptr noundef nonnull %6, i32 noundef 16) #9
  %.not62 = icmp eq i32 %81, 0
  br i1 %.not62, label %82, label %.thread69

.thread69:                                        ; preds = %71
  call void @perror(ptr noundef nonnull @.str.25) #10
  br label %128

82:                                               ; preds = %71
  %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26)
  %84 = call ptr @SSL_new(ptr noundef %74) #9
  %85 = call i32 @SSL_set_fd(ptr noundef %84, i32 noundef %76) #9
  %86 = call i64 @SSL_ctrl(ptr noundef %84, i32 noundef 55, i64 noundef 0, ptr noundef %73) #9
  %87 = call i32 @SSL_set1_host(ptr noundef %84, ptr noundef %73) #9
  %88 = call i32 @SSL_connect(ptr noundef %84) #9
  %89 = icmp eq i32 %88, 1
  br i1 %89, label %90, label %121

90:                                               ; preds = %82
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %92 = load ptr, ptr @stdin, align 8, !tbaa !5
  %93 = call i64 @getline(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef %92) #9
  %94 = trunc i64 %93 to i32
  %95 = icmp slt i32 %94, 0
  %96 = load ptr, ptr %3, align 8
  %97 = icmp eq ptr %96, null
  %or.cond79 = select i1 %95, i1 true, i1 %97
  br i1 %or.cond79, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %90, %108
  %98 = phi ptr [ %116, %108 ], [ %96, %90 ]
  %99 = phi i32 [ %114, %108 ], [ %94, %90 ]
  %100 = load i8, ptr %98, align 1, !tbaa !13
  %101 = icmp eq i8 %100, 10
  br i1 %101, label %.loopexit, label %102

102:                                              ; preds = %.lr.ph
  %103 = call i32 @SSL_write(ptr noundef %84, ptr noundef nonnull %98, i32 noundef %99) #9
  %104 = icmp slt i32 %103, 1
  br i1 %104, label %.loopexit.sink.split, label %105

105:                                              ; preds = %102
  %106 = call i32 @SSL_read(ptr noundef %84, ptr noundef nonnull %5, i32 noundef 128) #9
  %107 = icmp slt i32 %106, 1
  br i1 %107, label %.loopexit.sink.split, label %108

108:                                              ; preds = %105
  %109 = zext nneg i32 %106 to i64
  %110 = getelementptr inbounds [128 x i8], ptr %5, i64 0, i64 %109
  store i8 0, ptr %110, align 1, !tbaa !13
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef nonnull %5)
  %112 = load ptr, ptr @stdin, align 8, !tbaa !5
  %113 = call i64 @getline(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef %112) #9
  %114 = trunc i64 %113 to i32
  %115 = icmp slt i32 %114, 0
  %116 = load ptr, ptr %3, align 8
  %117 = icmp eq ptr %116, null
  %or.cond = select i1 %115, i1 true, i1 %117
  br i1 %or.cond, label %.loopexit, label %.lr.ph

.loopexit.sink.split:                             ; preds = %105, %102
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  %119 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %119) #9
  br label %.loopexit

.loopexit:                                        ; preds = %108, %.lr.ph, %.loopexit.sink.split, %90
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29)
  br label %124

121:                                              ; preds = %82
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30)
  %123 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %123) #9
  br label %124

124:                                              ; preds = %._crit_edge85, %121, %.loopexit
  %125 = phi ptr [ %21, %._crit_edge85 ], [ %74, %.loopexit ], [ %74, %121 ]
  %.055 = phi i32 [ %23, %._crit_edge85 ], [ -1, %.loopexit ], [ -1, %121 ]
  %.154 = phi i32 [ %.053.lcssa, %._crit_edge85 ], [ %76, %.loopexit ], [ %76, %121 ]
  %.1 = phi ptr [ %.052.lcssa, %._crit_edge85 ], [ %84, %.loopexit ], [ %84, %121 ]
  %.not64 = icmp eq ptr %.1, null
  br i1 %.not64, label %128, label %126

126:                                              ; preds = %124
  %127 = call i32 @SSL_shutdown(ptr noundef nonnull %.1) #9
  call void @SSL_free(ptr noundef nonnull %.1) #9
  br label %128

128:                                              ; preds = %.thread69, %126, %124
  %.15475 = phi i32 [ %76, %.thread69 ], [ %.154, %126 ], [ %.154, %124 ]
  %.05574 = phi i32 [ -1, %.thread69 ], [ %.055, %126 ], [ %.055, %124 ]
  %129 = phi ptr [ %74, %.thread69 ], [ %125, %126 ], [ %125, %124 ]
  call void @SSL_CTX_free(ptr noundef %129) #9
  %.not65 = icmp eq i32 %.15475, -1
  br i1 %.not65, label %132, label %130

130:                                              ; preds = %128
  %131 = call i32 @close(i32 noundef %.15475) #9
  br label %132

132:                                              ; preds = %130, %128
  %.not66 = icmp eq i32 %.05574, -1
  br i1 %.not66, label %135, label %133

133:                                              ; preds = %132
  %134 = call i32 @close(i32 noundef %.05574) #9
  br label %135

135:                                              ; preds = %133, %132
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = icmp ne ptr %136, null
  %138 = load i64, ptr %4, align 8
  %139 = icmp ne i64 %138, 0
  %or.cond3 = select i1 %137, i1 %139, i1 false
  br i1 %or.cond3, label %140, label %141

140:                                              ; preds = %135
  call void @free(ptr noundef nonnull %136) #9
  br label %141

141:                                              ; preds = %140, %135
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret i32 0
}

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) local_unnamed_addr #6

declare i32 @accept(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @SSL_new(ptr noundef) local_unnamed_addr #5

declare i32 @SSL_set_fd(ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @SSL_accept(ptr noundef) local_unnamed_addr #5

declare i32 @SSL_read(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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

declare i32 @SSL_write(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @SSL_shutdown(ptr noundef) local_unnamed_addr #5

declare void @SSL_free(ptr noundef) local_unnamed_addr #5

declare i32 @close(i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @inet_pton(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @connect(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i64 @SSL_ctrl(ptr noundef, i32 noundef, i64 noundef, ptr noundef) local_unnamed_addr #5

declare i32 @SSL_set1_host(ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @SSL_connect(ptr noundef) local_unnamed_addr #5

declare i64 @getline(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @SSL_CTX_free(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #8

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 #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 = { 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 #7 = { 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 #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }
attributes #11 = { noreturn nounwind }
attributes #12 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !18, i64 0}
!17 = !{!"sockaddr_in", !18, i64 0, !18, i64 2, !19, i64 4, !7, i64 8}
!18 = !{!"short", !7, i64 0}
!19 = !{!"in_addr", !12, i64 0}
!20 = !{!17, !18, i64 2}


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