; LLVM IR from openanolis/openssl :: demos/bio (client-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 [15 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 [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [27 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 [26 x i8], align 1
@stdout = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca [1024 x i8], align 16
  %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 i32, align 4
  %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 null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 1
  store ptr %20, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr @.str, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sub nsw i32 %21, 1
  store i32 %22, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !5
  %23 = call ptr @TLS_client_method()
  %24 = call ptr @SSL_CTX_new(ptr noundef %23)
  store ptr %24, ptr %10, align 8, !tbaa !9
  %25 = call ptr @SSL_CONF_CTX_new()
  store ptr %25, ptr %11, align 8, !tbaa !9
  %26 = load ptr, ptr %11, align 8, !tbaa !9
  %27 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %26, i32 noundef 4)
  %28 = load ptr, ptr %11, align 8, !tbaa !9
  %29 = load ptr, ptr %10, align 8, !tbaa !9
  call void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef %28, ptr noundef %29)
  br label %30

30:                                               ; preds = %89, %2
  %31 = load ptr, ptr %13, align 8, !tbaa !9
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %40

34:                                               ; preds = %30
  %35 = load ptr, ptr %13, align 8, !tbaa !9
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = sext i8 %37 to i32
  %39 = icmp eq i32 %38, 45
  br label %40

40:                                               ; preds = %34, %30
  %41 = phi i1 [ false, %30 ], [ %39, %34 ]
  br i1 %41, label %42, label %91

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

47:                                               ; preds = %42
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = load ptr, ptr %13, align 8, !tbaa !9
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.1, ptr noundef %50) #5
  store i32 4, ptr %18, align 4
  br label %89

52:                                               ; preds = %42
  %53 = load i32, ptr %17, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  %56 = load ptr, ptr @stderr, align 8, !tbaa !9
  %57 = load ptr, ptr %13, align 8, !tbaa !9
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.2, ptr noundef %58) #5
  %60 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %60)
  store i32 4, ptr %18, align 4
  br label %89

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

64:                                               ; preds = %61
  store i32 2, ptr %18, align 4
  br label %89, !llvm.loop !12

65:                                               ; preds = %61
  %66 = load ptr, ptr %13, align 8, !tbaa !9
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = call i32 @strcmp(ptr noundef %67, ptr noundef @.str.3) #6
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %84

70:                                               ; preds = %65
  %71 = load ptr, ptr %13, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 1
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  store ptr %73, ptr %14, align 8, !tbaa !9
  %74 = load ptr, ptr %14, align 8, !tbaa !9
  %75 = icmp eq ptr %74, null
  br i1 %75, label %76, label %79

76:                                               ; preds = %70
  %77 = load ptr, ptr @stderr, align 8, !tbaa !9
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.4) #5
  store i32 4, ptr %18, align 4
  br label %89

79:                                               ; preds = %70
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = getelementptr inbounds ptr, ptr %80, i64 2
  store ptr %81, ptr %13, align 8, !tbaa !9
  %82 = load i32, ptr %15, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 2
  store i32 %83, ptr %15, align 4, !tbaa !5
  store i32 2, ptr %18, align 4
  br label %89, !llvm.loop !12

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

89:                                               ; preds = %84, %79, %76, %64, %55, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  %90 = load i32, ptr %18, align 4
  switch i32 %90, label %144 [
    i32 2, label %30
    i32 4, label %138
  ]

91:                                               ; preds = %40
  %92 = load ptr, ptr %11, align 8, !tbaa !9
  %93 = call i32 @SSL_CONF_CTX_finish(ptr noundef %92)
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %99, label %95

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

99:                                               ; preds = %91
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  %101 = call ptr @BIO_new_ssl_connect(ptr noundef %100)
  store ptr %101, ptr %6, align 8, !tbaa !9
  %102 = load ptr, ptr %6, align 8, !tbaa !9
  %103 = call i64 @BIO_ctrl(ptr noundef %102, i32 noundef 110, i64 noundef 0, ptr noundef %12)
  %104 = load ptr, ptr %12, align 8, !tbaa !9
  %105 = icmp ne ptr %104, null
  br i1 %105, label %109, label %106

106:                                              ; preds = %99
  %107 = load ptr, ptr @stderr, align 8, !tbaa !9
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.7) #5
  br label %138

109:                                              ; preds = %99
  %110 = load ptr, ptr %6, align 8, !tbaa !9
  %111 = load ptr, ptr %14, align 8, !tbaa !9
  %112 = call i64 @BIO_ctrl(ptr noundef %110, i32 noundef 100, i64 noundef 0, ptr noundef %111)
  %113 = load ptr, ptr @stdout, align 8, !tbaa !9
  %114 = call ptr @BIO_new_fp(ptr noundef %113, i32 noundef 0)
  store ptr %114, ptr %7, align 8, !tbaa !9
  %115 = load ptr, ptr %6, align 8, !tbaa !9
  %116 = call i64 @BIO_ctrl(ptr noundef %115, i32 noundef 101, i64 noundef 0, ptr noundef null)
  %117 = icmp sle i64 %116, 0
  br i1 %117, label %118, label %122

118:                                              ; preds = %109
  %119 = load ptr, ptr @stderr, align 8, !tbaa !9
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.8) #5
  %121 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %121)
  br label %138

122:                                              ; preds = %109
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  %124 = call i32 @BIO_puts(ptr noundef %123, ptr noundef @.str.9)
  br label %125

125:                                              ; preds = %132, %122
  %126 = load ptr, ptr %6, align 8, !tbaa !9
  %127 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %128 = call i32 @BIO_read(ptr noundef %126, ptr noundef %127, i32 noundef 1024)
  store i32 %128, ptr %8, align 4, !tbaa !5
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = icmp sle i32 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %125
  br label %137

132:                                              ; preds = %125
  %133 = load ptr, ptr %7, align 8, !tbaa !9
  %134 = getelementptr inbounds [1024 x i8], ptr %9, i64 0, i64 0
  %135 = load i32, ptr %8, align 4, !tbaa !5
  %136 = call i32 @BIO_write(ptr noundef %133, ptr noundef %134, i32 noundef %135)
  br label %125

137:                                              ; preds = %131
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %137, %118, %106, %95, %89
  %139 = load ptr, ptr %11, align 8, !tbaa !9
  call void @SSL_CONF_CTX_free(ptr noundef %139)
  %140 = load ptr, ptr %6, align 8, !tbaa !9
  call void @BIO_free_all(ptr noundef %140)
  %141 = load ptr, ptr %7, align 8, !tbaa !9
  %142 = call i32 @BIO_free(ptr noundef %141)
  %143 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %143, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %144

144:                                              ; preds = %138, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  %145 = load i32, ptr %3, align 4
  ret i32 %145
}

; 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_client_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_connect(ptr noundef) #2

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

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

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

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

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

declare void @SSL_CONF_CTX_free(ptr noundef) #2

declare void @BIO_free_all(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 [15 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 [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [27 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 [26 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1

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

.lr.ph:                                           ; preds = %2, %51
  %14 = phi ptr [ %53, %51 ], [ %13, %2 ]
  %.02847 = 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 %11, ptr noundef nonnull %6, ptr noundef nonnull %5) #5
  %19 = icmp eq i32 %18, -3
  %20 = load ptr, ptr %5, 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 %5, align 8, !tbaa !5
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = add nsw i32 %46, -2
  store i32 %47, ptr %6, 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 ], [ %.02847, %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 ], [ %.02847, %.lr.ph ]
  %54 = call i32 @SSL_CONF_CTX_finish(ptr noundef %11) #5
  %.not36 = icmp eq i32 %54, 0
  br i1 %.not36, 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_connect(ptr noundef %10) #5
  %61 = call i64 @BIO_ctrl(ptr noundef %60, i32 noundef 110, i64 noundef 0, ptr noundef nonnull %4) #5
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %.not37 = icmp eq ptr %62, null
  br i1 %.not37, label %63, label %66

63:                                               ; preds = %59
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.7) #6
  br label %.thread

66:                                               ; preds = %59
  %67 = call i64 @BIO_ctrl(ptr noundef %60, i32 noundef 100, i64 noundef 0, ptr noundef %.028.lcssa) #5
  %68 = load ptr, ptr @stdout, align 8, !tbaa !5
  %69 = call ptr @BIO_new_fp(ptr noundef %68, i32 noundef 0) #5
  %70 = call i64 @BIO_ctrl(ptr noundef %60, i32 noundef 101, i64 noundef 0, ptr noundef null) #5
  %71 = icmp slt i64 %70, 1
  br i1 %71, label %72, label %76

72:                                               ; preds = %66
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.8) #6
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %75) #5
  br label %.thread

76:                                               ; preds = %66
  %77 = call i32 @BIO_puts(ptr noundef %60, ptr noundef nonnull @.str.9) #5
  %78 = call i32 @BIO_read(ptr noundef %60, ptr noundef nonnull %3, i32 noundef 1024) #5
  %79 = icmp slt i32 %78, 1
  br i1 %79, label %.thread, label %.lr.ph50

.lr.ph50:                                         ; preds = %76, %.lr.ph50
  %80 = phi i32 [ %82, %.lr.ph50 ], [ %78, %76 ]
  %81 = call i32 @BIO_write(ptr noundef %69, ptr noundef nonnull %3, i32 noundef %80) #5
  %82 = call i32 @BIO_read(ptr noundef %60, ptr noundef nonnull %3, i32 noundef 1024) #5
  %83 = icmp slt i32 %82, 1
  br i1 %83, label %.thread, label %.lr.ph50

.thread:                                          ; preds = %.lr.ph50, %76, %48, %41, %27, %21, %55, %63, %72
  %.030 = phi ptr [ %69, %72 ], [ null, %63 ], [ null, %55 ], [ null, %21 ], [ null, %27 ], [ null, %41 ], [ null, %48 ], [ %69, %76 ], [ %69, %.lr.ph50 ]
  %.029 = phi ptr [ %60, %72 ], [ %60, %63 ], [ null, %55 ], [ null, %21 ], [ null, %27 ], [ null, %41 ], [ null, %48 ], [ %60, %76 ], [ %60, %.lr.ph50 ]
  %.027 = phi i32 [ 1, %72 ], [ 1, %63 ], [ 1, %55 ], [ 1, %21 ], [ 1, %27 ], [ 1, %41 ], [ 1, %48 ], [ 0, %76 ], [ 0, %.lr.ph50 ]
  call void @SSL_CONF_CTX_free(ptr noundef %11) #5
  call void @BIO_free_all(ptr noundef %.029) #5
  %84 = call i32 @BIO_free(ptr noundef %.030) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #5
  ret i32 %.027
}

; 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_client_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_connect(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

declare void @SSL_CONF_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @BIO_free_all(ptr noundef) local_unnamed_addr #2

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,SROAPass,SimplifyCFGPass,TailCallElimPass