; LLVM IR from openanolis/openssl :: demos/bio (client-conf)

; 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.CONF_VALUE = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@stdout = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = 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 i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [1024 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %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 8, ptr %6) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store ptr null, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store ptr @.str, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i64 -1, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 1, ptr %20, align 4, !tbaa !5
  %21 = call ptr @NCONF_new(ptr noundef null)
  store ptr %21, ptr %15, align 8, !tbaa !9
  %22 = load ptr, ptr %15, align 8, !tbaa !9
  %23 = call i32 @NCONF_load(ptr noundef %22, ptr noundef @.str.1, ptr noundef %19)
  %24 = icmp sle i32 %23, 0
  br i1 %24, label %25, label %36

25:                                               ; preds = %2
  %26 = load i64, ptr %19, align 8, !tbaa !11
  %27 = icmp sle i64 %26, 0
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = load ptr, ptr @stderr, align 8, !tbaa !9
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef @.str.2) #6
  br label %35

31:                                               ; preds = %25
  %32 = load ptr, ptr @stderr, align 8, !tbaa !9
  %33 = load i64, ptr %19, align 8, !tbaa !11
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.3, i64 noundef %33) #6
  br label %35

35:                                               ; preds = %31, %28
  br label %156

36:                                               ; preds = %2
  %37 = load ptr, ptr %15, align 8, !tbaa !9
  %38 = call ptr @NCONF_get_section(ptr noundef %37, ptr noundef @.str.4)
  store ptr %38, ptr %16, align 8, !tbaa !9
  %39 = load ptr, ptr %16, align 8, !tbaa !9
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %44

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

44:                                               ; preds = %36
  %45 = call ptr @TLS_client_method()
  %46 = call ptr @SSL_CTX_new(ptr noundef %45)
  store ptr %46, ptr %12, align 8, !tbaa !9
  %47 = call ptr @SSL_CONF_CTX_new()
  store ptr %47, ptr %13, align 8, !tbaa !9
  %48 = load ptr, ptr %13, align 8, !tbaa !9
  %49 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %48, i32 noundef 4)
  %50 = load ptr, ptr %13, align 8, !tbaa !9
  %51 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %50, i32 noundef 2)
  %52 = load ptr, ptr %13, align 8, !tbaa !9
  %53 = load ptr, ptr %12, align 8, !tbaa !9
  call void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef %52, ptr noundef %53)
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %106, %44
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = load ptr, ptr %16, align 8, !tbaa !9
  %57 = call ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef %56)
  %58 = call i32 @OPENSSL_sk_num(ptr noundef %57)
  %59 = icmp slt i32 %55, %58
  br i1 %59, label %60, label %109

60:                                               ; preds = %54
  %61 = load ptr, ptr %16, align 8, !tbaa !9
  %62 = call ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef %61)
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = call ptr @OPENSSL_sk_value(ptr noundef %62, i32 noundef %63)
  store ptr %64, ptr %17, align 8, !tbaa !9
  %65 = load ptr, ptr %13, align 8, !tbaa !9
  %66 = load ptr, ptr %17, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.CONF_VALUE, ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  %69 = load ptr, ptr %17, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.CONF_VALUE, ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !15
  %72 = call i32 @SSL_CONF_cmd(ptr noundef %65, ptr noundef %68, ptr noundef %71)
  store i32 %72, ptr %10, align 4, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %60
  br label %106

76:                                               ; preds = %60
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = icmp ne i32 %77, -2
  br i1 %78, label %79, label %89

79:                                               ; preds = %76
  %80 = load ptr, ptr @stderr, align 8, !tbaa !9
  %81 = load ptr, ptr %17, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.CONF_VALUE, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = load ptr, ptr %17, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.CONF_VALUE, ptr %84, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.6, ptr noundef %83, ptr noundef %86) #6
  %88 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %88)
  br label %156

89:                                               ; preds = %76
  %90 = load ptr, ptr %17, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.CONF_VALUE, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !13
  %93 = call i32 @strcmp(ptr noundef %92, ptr noundef @.str.7) #7
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %99

95:                                               ; preds = %89
  %96 = load ptr, ptr %17, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.CONF_VALUE, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !15
  store ptr %98, ptr %18, align 8, !tbaa !9
  br label %105

99:                                               ; preds = %89
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = load ptr, ptr %17, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct.CONF_VALUE, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str.8, ptr noundef %103) #6
  br label %156

105:                                              ; preds = %95
  br label %106

106:                                              ; preds = %105, %75
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !5
  br label %54, !llvm.loop !16

109:                                              ; preds = %54
  %110 = load ptr, ptr %13, align 8, !tbaa !9
  %111 = call i32 @SSL_CONF_CTX_finish(ptr noundef %110)
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %117, label %113

113:                                              ; preds = %109
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.9) #6
  %116 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %116)
  br label %156

117:                                              ; preds = %109
  %118 = load ptr, ptr %12, align 8, !tbaa !9
  %119 = call ptr @BIO_new_ssl_connect(ptr noundef %118)
  store ptr %119, ptr %6, align 8, !tbaa !9
  %120 = load ptr, ptr %6, align 8, !tbaa !9
  %121 = call i64 @BIO_ctrl(ptr noundef %120, i32 noundef 110, i64 noundef 0, ptr noundef %14)
  %122 = load ptr, ptr %14, align 8, !tbaa !9
  %123 = icmp ne ptr %122, null
  br i1 %123, label %127, label %124

124:                                              ; preds = %117
  %125 = load ptr, ptr @stderr, align 8, !tbaa !9
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.10) #6
  br label %156

127:                                              ; preds = %117
  %128 = load ptr, ptr %6, align 8, !tbaa !9
  %129 = load ptr, ptr %18, align 8, !tbaa !9
  %130 = call i64 @BIO_ctrl(ptr noundef %128, i32 noundef 100, i64 noundef 0, ptr noundef %129)
  %131 = load ptr, ptr @stdout, align 8, !tbaa !9
  %132 = call ptr @BIO_new_fp(ptr noundef %131, i32 noundef 0)
  store ptr %132, ptr %7, align 8, !tbaa !9
  %133 = load ptr, ptr %6, align 8, !tbaa !9
  %134 = call i64 @BIO_ctrl(ptr noundef %133, i32 noundef 101, i64 noundef 0, ptr noundef null)
  %135 = icmp sle i64 %134, 0
  br i1 %135, label %136, label %140

136:                                              ; preds = %127
  %137 = load ptr, ptr @stderr, align 8, !tbaa !9
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.11) #6
  %139 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %139)
  br label %156

140:                                              ; preds = %127
  %141 = load ptr, ptr %6, align 8, !tbaa !9
  %142 = call i32 @BIO_puts(ptr noundef %141, ptr noundef @.str.12)
  br label %143

143:                                              ; preds = %150, %140
  %144 = load ptr, ptr %6, align 8, !tbaa !9
  %145 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %146 = call i32 @BIO_read(ptr noundef %144, ptr noundef %145, i32 noundef 1024)
  store i32 %146, ptr %9, align 4, !tbaa !5
  %147 = load i32, ptr %9, align 4, !tbaa !5
  %148 = icmp sle i32 %147, 0
  br i1 %148, label %149, label %150

149:                                              ; preds = %143
  br label %155

150:                                              ; preds = %143
  %151 = load ptr, ptr %7, align 8, !tbaa !9
  %152 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = call i32 @BIO_write(ptr noundef %151, ptr noundef %152, i32 noundef %153)
  br label %143

155:                                              ; preds = %149
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %155, %136, %124, %113, %99, %79, %41, %35
  %157 = load ptr, ptr %13, align 8, !tbaa !9
  call void @SSL_CONF_CTX_free(ptr noundef %157)
  %158 = load ptr, ptr %6, align 8, !tbaa !9
  call void @BIO_free_all(ptr noundef %158)
  %159 = load ptr, ptr %7, align 8, !tbaa !9
  %160 = call i32 @BIO_free(ptr noundef %159)
  %161 = load ptr, ptr %15, align 8, !tbaa !9
  call void @NCONF_free(ptr noundef %161)
  %162 = load i32, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  ret i32 %162
}

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

declare ptr @NCONF_new(ptr noundef) #2

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

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

declare ptr @NCONF_get_section(ptr noundef, ptr noundef) #2

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 @OPENSSL_sk_num(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef) #4

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

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

declare void @ERR_print_errors_fp(ptr noundef) #2

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

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

declare void @NCONF_free(ptr noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"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 = !{!14, !10, i64 8}
!14 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!14, !10, i64 16}
!16 = distinct !{!16, !17}
!17 = !{!"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
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = 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 nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [1024 x i8], align 16
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 -1, ptr %5, align 8, !tbaa !9
  %6 = tail call ptr @NCONF_new(ptr noundef null) #6
  %7 = call i32 @NCONF_load(ptr noundef %6, ptr noundef nonnull @.str.1, ptr noundef nonnull %5) #6
  %8 = icmp slt i32 %7, 1
  br i1 %8, label %9, label %17

9:                                                ; preds = %2
  %10 = load i64, ptr %5, align 8, !tbaa !9
  %11 = icmp slt i64 %10, 1
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  br i1 %11, label %13, label %15

13:                                               ; preds = %9
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.2) #7
  br label %.loopexit

15:                                               ; preds = %9
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.3, i64 noundef %10) #7
  br label %.loopexit

17:                                               ; preds = %2
  %18 = call ptr @NCONF_get_section(ptr noundef %6, ptr noundef nonnull @.str.4) #6
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %23

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

23:                                               ; preds = %17
  %24 = call ptr @TLS_client_method() #6
  %25 = call ptr @SSL_CTX_new(ptr noundef %24) #6
  %26 = call ptr @SSL_CONF_CTX_new() #6
  %27 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %26, i32 noundef 4) #6
  %28 = call i32 @SSL_CONF_CTX_set_flags(ptr noundef %26, i32 noundef 2) #6
  call void @SSL_CONF_CTX_set_ssl_ctx(ptr noundef %26, ptr noundef %25) #6
  %29 = call ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef nonnull %18)
  %30 = call i32 @OPENSSL_sk_num(ptr noundef %29) #6
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23, %56
  %.03755 = phi ptr [ %.1, %56 ], [ @.str, %23 ]
  %.04154 = phi i32 [ %57, %56 ], [ 0, %23 ]
  %32 = call ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef nonnull %18)
  %33 = call ptr @OPENSSL_sk_value(ptr noundef %32, i32 noundef %.04154) #6
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %33, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = call i32 @SSL_CONF_cmd(ptr noundef %26, ptr noundef %35, ptr noundef %37) #6
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %56, label %40

40:                                               ; preds = %.lr.ph
  %.not47 = icmp eq i32 %38, -2
  br i1 %.not47, label %47, label %41

41:                                               ; preds = %40
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = load ptr, ptr %34, align 8, !tbaa !11
  %44 = load ptr, ptr %36, align 8, !tbaa !13
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.6, ptr noundef %43, ptr noundef %44) #7
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %46) #6
  br label %.loopexit

47:                                               ; preds = %40
  %48 = load ptr, ptr %34, align 8, !tbaa !11
  %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %48, ptr noundef nonnull dereferenceable(1) @.str.7) #8
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %53

51:                                               ; preds = %47
  %52 = load ptr, ptr %36, align 8, !tbaa !13
  br label %56

53:                                               ; preds = %47
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.8, ptr noundef %48) #7
  br label %.loopexit

56:                                               ; preds = %.lr.ph, %51
  %.1 = phi ptr [ %.03755, %.lr.ph ], [ %52, %51 ]
  %57 = add nuw nsw i32 %.04154, 1
  %58 = call ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef nonnull %18)
  %59 = call i32 @OPENSSL_sk_num(ptr noundef %58) #6
  %60 = icmp slt i32 %57, %59
  br i1 %60, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %56, %23
  %.037.lcssa = phi ptr [ @.str, %23 ], [ %.1, %56 ]
  %61 = call i32 @SSL_CONF_CTX_finish(ptr noundef %26) #6
  %.not = icmp eq i32 %61, 0
  br i1 %.not, label %62, label %66

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

66:                                               ; preds = %._crit_edge
  %67 = call ptr @BIO_new_ssl_connect(ptr noundef %25) #6
  %68 = call i64 @BIO_ctrl(ptr noundef %67, i32 noundef 110, i64 noundef 0, ptr noundef nonnull %4) #6
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %.not46 = icmp eq ptr %69, null
  br i1 %.not46, label %70, label %73

70:                                               ; preds = %66
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.10) #7
  br label %.loopexit

73:                                               ; preds = %66
  %74 = call i64 @BIO_ctrl(ptr noundef %67, i32 noundef 100, i64 noundef 0, ptr noundef %.037.lcssa) #6
  %75 = load ptr, ptr @stdout, align 8, !tbaa !5
  %76 = call ptr @BIO_new_fp(ptr noundef %75, i32 noundef 0) #6
  %77 = call i64 @BIO_ctrl(ptr noundef %67, i32 noundef 101, i64 noundef 0, ptr noundef null) #6
  %78 = icmp slt i64 %77, 1
  br i1 %78, label %79, label %83

79:                                               ; preds = %73
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.11) #7
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %82) #6
  br label %.loopexit

83:                                               ; preds = %73
  %84 = call i32 @BIO_puts(ptr noundef %67, ptr noundef nonnull @.str.12) #6
  %85 = call i32 @BIO_read(ptr noundef %67, ptr noundef nonnull %3, i32 noundef 1024) #6
  %86 = icmp slt i32 %85, 1
  br i1 %86, label %.loopexit, label %.lr.ph57

.lr.ph57:                                         ; preds = %83, %.lr.ph57
  %87 = phi i32 [ %89, %.lr.ph57 ], [ %85, %83 ]
  %88 = call i32 @BIO_write(ptr noundef %76, ptr noundef nonnull %3, i32 noundef %87) #6
  %89 = call i32 @BIO_read(ptr noundef %67, ptr noundef nonnull %3, i32 noundef 1024) #6
  %90 = icmp slt i32 %89, 1
  br i1 %90, label %.loopexit, label %.lr.ph57

.loopexit:                                        ; preds = %.lr.ph57, %83, %13, %15, %79, %70, %62, %53, %41, %20
  %.040 = phi ptr [ null, %13 ], [ null, %15 ], [ null, %20 ], [ null, %41 ], [ null, %53 ], [ %76, %79 ], [ null, %70 ], [ null, %62 ], [ %76, %83 ], [ %76, %.lr.ph57 ]
  %.039 = phi ptr [ null, %13 ], [ null, %15 ], [ null, %20 ], [ %26, %41 ], [ %26, %53 ], [ %26, %79 ], [ %26, %70 ], [ %26, %62 ], [ %26, %83 ], [ %26, %.lr.ph57 ]
  %.038 = phi ptr [ null, %13 ], [ null, %15 ], [ null, %20 ], [ null, %41 ], [ null, %53 ], [ %67, %79 ], [ %67, %70 ], [ null, %62 ], [ %67, %83 ], [ %67, %.lr.ph57 ]
  %.0 = phi i32 [ 1, %13 ], [ 1, %15 ], [ 1, %20 ], [ 1, %41 ], [ 1, %53 ], [ 1, %79 ], [ 1, %70 ], [ 1, %62 ], [ 0, %83 ], [ 0, %.lr.ph57 ]
  call void @SSL_CONF_CTX_free(ptr noundef %.039) #6
  call void @BIO_free_all(ptr noundef %.038) #6
  %91 = call i32 @BIO_free(ptr noundef %.040) #6
  call void @NCONF_free(ptr noundef %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #6
  ret i32 %.0
}

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

declare ptr @NCONF_new(ptr noundef) local_unnamed_addr #2

declare i32 @NCONF_load(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 ptr @NCONF_get_section(ptr noundef, ptr noundef) local_unnamed_addr #2

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 @OPENSSL_sk_num(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_const_CONF_VALUE_sk_type(ptr noundef) local_unnamed_addr #4

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

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

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 #5

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

declare void @NCONF_free(ptr noundef) local_unnamed_addr #2

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

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


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