; LLVM IR from openanolis/openssl :: demos/bio (server-arg)

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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@stdout = external global ptr, align 8

; 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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [512 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = 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 8, ptr %6) #5
  store ptr @.str, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 1
  store ptr %20, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sub nsw i32 %21, 1
  store i32 %22, ptr %16, align 4, !tbaa !5
  %23 = call ptr @TLS_server_method()
  %24 = call ptr @SSL_CTX_new(ptr noundef %23)
  store ptr %24, ptr %9, align 8, !tbaa !9
  %25 = call ptr @SSL_CONF_CTX_new()
  store ptr %25, ptr %10, align 8, !tbaa !9
  %26 = load ptr, ptr %10, align 8, !tbaa !9
  %27 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %26, i32 noundef 8)
  %28 = load ptr, ptr %10, align 8, !tbaa !9
  %29 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %28, i32 noundef 32)
  %30 = load ptr, ptr %10, align 8, !tbaa !9
  %31 = load ptr, ptr %9, align 8, !tbaa !9
  call void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef %30, ptr noundef %31)
  br label %32

32:                                               ; preds = %91, %2
  %33 = load ptr, ptr %15, align 8, !tbaa !9
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %42

36:                                               ; preds = %32
  %37 = load ptr, ptr %15, align 8, !tbaa !9
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 45
  br label %42

42:                                               ; preds = %36, %32
  %43 = phi i1 [ false, %32 ], [ %41, %36 ]
  br i1 %43, label %44, label %93

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %45 = load ptr, ptr %10, align 8, !tbaa !9
  %46 = call i32 @SSL_CONF_cmd_argv(ptr noundef %45, ptr noundef %16, ptr noundef %15)
  store i32 %46, ptr %17, align 4, !tbaa !5
  %47 = load i32, ptr %17, align 4, !tbaa !5
  %48 = icmp eq i32 %47, -3
  br i1 %48, label %49, label %54

49:                                               ; preds = %44
  %50 = load ptr, ptr @stderr, align 8, !tbaa !9
  %51 = load ptr, ptr %15, align 8, !tbaa !9
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.1, ptr noundef %52) #5
  store i32 4, ptr %18, align 4
  br label %91

54:                                               ; preds = %44
  %55 = load i32, ptr %17, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 0
  br i1 %56, label %57, label %63

57:                                               ; preds = %54
  %58 = load ptr, ptr @stderr, align 8, !tbaa !9
  %59 = load ptr, ptr %15, align 8, !tbaa !9
  %60 = load ptr, ptr %59, align 8, !tbaa !9
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.2, ptr noundef %60) #5
  %62 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %62)
  store i32 4, ptr %18, align 4
  br label %91

63:                                               ; preds = %54
  %64 = load i32, ptr %17, align 4, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 2, ptr %18, align 4
  br label %91, !llvm.loop !12

67:                                               ; preds = %63
  %68 = load ptr, ptr %15, align 8, !tbaa !9
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = call i32 @strcmp(ptr noundef %69, ptr noundef @.str.3) #6
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %86

72:                                               ; preds = %67
  %73 = load ptr, ptr %15, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %73, i64 1
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  store ptr %75, ptr %6, align 8, !tbaa !9
  %76 = load ptr, ptr %6, align 8, !tbaa !9
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %81

78:                                               ; preds = %72
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.4) #5
  store i32 4, ptr %18, align 4
  br label %91

81:                                               ; preds = %72
  %82 = load ptr, ptr %15, align 8, !tbaa !9
  %83 = getelementptr inbounds ptr, ptr %82, i64 2
  store ptr %83, ptr %15, align 8, !tbaa !9
  %84 = load i32, ptr %16, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 2
  store i32 %85, ptr %16, align 4, !tbaa !5
  store i32 2, ptr %18, align 4
  br label %91, !llvm.loop !12

86:                                               ; preds = %67
  %87 = load ptr, ptr @stderr, align 8, !tbaa !9
  %88 = load ptr, ptr %15, align 8, !tbaa !9
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.5, ptr noundef %89) #5
  store i32 4, ptr %18, align 4
  br label %91

91:                                               ; preds = %86, %81, %78, %66, %57, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  %92 = load i32, ptr %18, align 4
  switch i32 %92, label %150 [
    i32 2, label %32
    i32 4, label %141
  ]

93:                                               ; preds = %42
  %94 = load ptr, ptr %10, align 8, !tbaa !9
  %95 = call i32 @SSL_CONF_CTX_finish(ptr noundef %94)
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %101, label %97

97:                                               ; preds = %93
  %98 = load ptr, ptr @stderr, align 8, !tbaa !9
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.6) #5
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %100)
  br label %141

101:                                              ; preds = %93
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = call ptr @BIO_new_ssl(ptr noundef %102, i32 noundef 0)
  store ptr %103, ptr %7, align 8, !tbaa !9
  %104 = load ptr, ptr %6, align 8, !tbaa !9
  %105 = call ptr @BIO_new_accept(ptr noundef %104)
  store ptr %105, ptr %12, align 8, !tbaa !9
  %106 = icmp eq ptr %105, null
  br i1 %106, label %107, label %108

107:                                              ; preds = %101
  br label %141

108:                                              ; preds = %101
  %109 = load ptr, ptr %12, align 8, !tbaa !9
  %110 = load ptr, ptr %7, align 8, !tbaa !9
  %111 = call i64 @BIO_ctrl(ptr noundef %109, i32 noundef 118, i64 noundef 3, ptr noundef %110)
  br label %112

112:                                              ; preds = %124, %108
  %113 = load ptr, ptr %12, align 8, !tbaa !9
  %114 = call i64 @BIO_ctrl(ptr noundef %113, i32 noundef 101, i64 noundef 0, ptr noundef null)
  %115 = icmp sle i64 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %112
  br label %141

117:                                              ; preds = %112
  br label %118

118:                                              ; preds = %133, %117
  %119 = load ptr, ptr %12, align 8, !tbaa !9
  %120 = getelementptr inbounds [512 x i8], ptr %11, i64 0, i64 0
  %121 = call i32 @BIO_read(ptr noundef %119, ptr noundef %120, i32 noundef 512)
  store i32 %121, ptr %14, align 4, !tbaa !5
  %122 = load i32, ptr %14, align 4, !tbaa !5
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %129

124:                                              ; preds = %118
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %126 = load ptr, ptr %12, align 8, !tbaa !9
  %127 = call ptr @BIO_pop(ptr noundef %126)
  store ptr %127, ptr %8, align 8, !tbaa !9
  %128 = load ptr, ptr %8, align 8, !tbaa !9
  call void @BIO_free_all(ptr noundef %128)
  br label %112

129:                                              ; preds = %118
  %130 = load i32, ptr %14, align 4, !tbaa !5
  %131 = icmp slt i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %129
  br label %141

133:                                              ; preds = %129
  %134 = getelementptr inbounds [512 x i8], ptr %11, i64 0, i64 0
  %135 = load i32, ptr %14, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = load ptr, ptr @stdout, align 8, !tbaa !9
  %138 = call i64 @fwrite(ptr noundef %134, i64 noundef 1, i64 noundef %136, ptr noundef %137)
  %139 = load ptr, ptr @stdout, align 8, !tbaa !9
  %140 = call i32 @fflush(ptr noundef %139)
  br label %118

141:                                              ; preds = %132, %116, %107, %97, %91
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %146

144:                                              ; preds = %141
  %145 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %145)
  br label %146

146:                                              ; preds = %144, %141
  %147 = load ptr, ptr %12, align 8, !tbaa !9
  %148 = call i32 @BIO_free(ptr noundef %147)
  %149 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %149, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %150

150:                                              ; preds = %146, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %151 = load i32, ptr %3, align 4
  ret i32 %151
}

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

declare ptr @SSL_CTX_new(ptr noundef) #2

declare ptr @TLS_server_method() #2

declare ptr @SSL_CONF_CTX_new() #2

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

declare void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef, ptr noundef) #2

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

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

declare void @ERR_print_errors_fp(ptr noundef) #2

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

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

declare i32 @SSL_CONF_CTX_finish(ptr noundef) #2

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

declare ptr @BIO_new_accept(ptr noundef) #2

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

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

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

declare ptr @BIO_pop(ptr noundef) #2

declare void @BIO_free_all(ptr noundef) #2

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

declare i32 @fflush(ptr noundef) #2

declare i32 @BIO_free(ptr noundef) #2

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

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

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


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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [512 x i8], align 16
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr %6, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %7 = add nsw i32 %0, -1
  store i32 %7, ptr %5, align 4, !tbaa !9
  %8 = tail call ptr @TLS_server_method() #5
  %9 = tail call ptr @SSL_CTX_new(ptr noundef %8) #5
  %10 = tail call ptr @SSL_CONF_CTX_new() #5
  %11 = tail call i32 @SSL_CONF_CTX_set_flags(ptr noundef %10, i32 noundef 8) #5
  %12 = tail call i32 @SSL_CONF_CTX_set_flags(ptr noundef %10, i32 noundef 32) #5
  tail call void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef %10, ptr noundef %9) #5
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %.not47 = icmp eq ptr %13, null
  br i1 %.not47, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %51
  %14 = phi ptr [ %53, %51 ], [ %13, %2 ]
  %.02848 = phi ptr [ %.1, %51 ], [ @.str, %2 ]
  %15 = load i8, ptr %14, align 1, !tbaa !11
  %16 = icmp eq i8 %15, 45
  br i1 %16, label %17, label %.critedge

17:                                               ; preds = %.lr.ph
  %18 = call i32 @SSL_CONF_cmd_argv(ptr noundef %10, ptr noundef nonnull %5, ptr noundef nonnull %4) #5
  %19 = icmp eq i32 %18, -3
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  br i1 %19, label %21, label %25

21:                                               ; preds = %17
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = load ptr, ptr %20, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.1, ptr noundef %23) #6
  br label %.thread

25:                                               ; preds = %17
  %26 = icmp slt i32 %18, 0
  br i1 %26, label %27, label %32

27:                                               ; preds = %25
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = load ptr, ptr %20, align 8, !tbaa !5
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.2, ptr noundef %29) #6
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %31) #5
  br label %.thread

32:                                               ; preds = %25
  %.not38 = icmp eq i32 %18, 0
  br i1 %.not38, label %33, label %51, !llvm.loop !12

33:                                               ; preds = %32
  %34 = load ptr, ptr %20, align 8, !tbaa !5
  %35 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.3) #7
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %48

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %20, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %44

41:                                               ; preds = %37
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.4) #6
  br label %.thread

44:                                               ; preds = %37
  %45 = getelementptr inbounds i8, ptr %20, i64 16
  store ptr %45, ptr %4, align 8, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = add nsw i32 %46, -2
  store i32 %47, ptr %5, align 4, !tbaa !9
  br label %51, !llvm.loop !12

48:                                               ; preds = %33
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.5, ptr noundef %34) #6
  br label %.thread

51:                                               ; preds = %32, %44
  %52 = phi ptr [ %45, %44 ], [ %20, %32 ]
  %.1 = phi ptr [ %39, %44 ], [ %.02848, %32 ]
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %.not = icmp eq ptr %53, null
  br i1 %.not, label %.critedge, label %.lr.ph

.critedge:                                        ; preds = %.lr.ph, %51, %2
  %.028.lcssa = phi ptr [ @.str, %2 ], [ %.1, %51 ], [ %.02848, %.lr.ph ]
  %54 = call i32 @SSL_CONF_CTX_finish(ptr noundef %10) #5
  %.not37 = icmp eq i32 %54, 0
  br i1 %.not37, label %55, label %59

55:                                               ; preds = %.critedge
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.6) #6
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %58) #5
  br label %.thread

59:                                               ; preds = %.critedge
  %60 = call ptr @BIO_new_ssl(ptr noundef %9, i32 noundef 0) #5
  %61 = call ptr @BIO_new_accept(ptr noundef %.028.lcssa) #5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %.thread, label %63

63:                                               ; preds = %59
  %64 = call i64 @BIO_ctrl(ptr noundef nonnull %61, i32 noundef 118, i64 noundef 3, ptr noundef %60) #5
  %65 = call i64 @BIO_ctrl(ptr noundef nonnull %61, i32 noundef 101, i64 noundef 0, ptr noundef null) #5
  %66 = icmp slt i64 %65, 1
  br i1 %66, label %.thread, label %.preheader

.preheader:                                       ; preds = %63, %._crit_edge
  %67 = call i32 @BIO_read(ptr noundef nonnull %61, ptr noundef nonnull %3, i32 noundef 512) #5
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %._crit_edge, label %.lr.ph51

._crit_edge:                                      ; preds = %75, %.preheader
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %70 = call ptr @BIO_pop(ptr noundef nonnull %61) #5
  call void @BIO_free_all(ptr noundef %70) #5
  %71 = call i64 @BIO_ctrl(ptr noundef nonnull %61, i32 noundef 101, i64 noundef 0, ptr noundef null) #5
  %72 = icmp slt i64 %71, 1
  br i1 %72, label %.thread, label %.preheader

.lr.ph51:                                         ; preds = %.preheader, %75
  %73 = phi i32 [ %81, %75 ], [ %67, %.preheader ]
  %74 = icmp slt i32 %73, 0
  br i1 %74, label %.thread, label %75

75:                                               ; preds = %.lr.ph51
  %76 = zext nneg i32 %73 to i64
  %77 = load ptr, ptr @stdout, align 8, !tbaa !5
  %78 = call i64 @fwrite(ptr noundef nonnull %3, i64 noundef 1, i64 noundef %76, ptr noundef %77)
  %79 = load ptr, ptr @stdout, align 8, !tbaa !5
  %80 = call i32 @fflush(ptr noundef %79)
  %81 = call i32 @BIO_read(ptr noundef nonnull %61, ptr noundef nonnull %3, i32 noundef 512) #5
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %._crit_edge, label %.lr.ph51

.thread:                                          ; preds = %._crit_edge, %.lr.ph51, %63, %48, %41, %27, %21, %59, %55
  %.029 = phi ptr [ null, %59 ], [ null, %55 ], [ null, %21 ], [ null, %27 ], [ null, %41 ], [ null, %48 ], [ %61, %63 ], [ %61, %.lr.ph51 ], [ %61, %._crit_edge ]
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %83) #5
  %84 = call i32 @BIO_free(ptr noundef %.029) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #5
  ret i32 1
}

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

declare ptr @SSL_CTX_new(ptr noundef) local_unnamed_addr #2

declare ptr @TLS_server_method() local_unnamed_addr #2

declare ptr @SSL_CONF_CTX_new() local_unnamed_addr #2

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

declare void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) 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

declare i32 @SSL_CONF_CTX_finish(ptr noundef) local_unnamed_addr #2

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

declare ptr @BIO_new_accept(ptr noundef) local_unnamed_addr #2

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

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

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

declare ptr @BIO_pop(ptr noundef) local_unnamed_addr #2

declare void @BIO_free_all(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @BIO_free(ptr noundef) local_unnamed_addr #2

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


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