; LLVM IR from PacktPublishing/Demystifying-Cryptography-with-OpenSSL-3 :: Chapter11 (tls-cert-pinning)

; 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.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__.run_tls_client = external hidden unnamed_addr constant [69 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [45 x i8], align 1
@stdout = external global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @run_tls_client(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %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 ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr null, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 16384, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %25 = call noalias ptr @malloc(i64 noundef 16384) #8
  store ptr %25, ptr %18, align 8, !tbaa !5
  %26 = load ptr, ptr %18, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %4
  br label %30

29:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 52, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %31 = call noalias ptr @malloc(i64 noundef 16384) #8
  store ptr %31, ptr %19, align 8, !tbaa !5
  %32 = load ptr, ptr %19, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  br label %36

35:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 54, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

36:                                               ; preds = %34
  call void @ERR_clear_error()
  %37 = call ptr @TLS_client_method()
  %38 = call ptr @SSL_CTX_new(ptr noundef %37)
  store ptr %38, ptr %12, align 8, !tbaa !5
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %42

41:                                               ; preds = %36
  br label %43

42:                                               ; preds = %36
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.4, i32 noundef 59, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

43:                                               ; preds = %41
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call noalias ptr @fopen(ptr noundef %44, ptr noundef @.str.7)
  store ptr %45, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %51

48:                                               ; preds = %43
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = call ptr @PEM_read_X509(ptr noundef %49, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %50, ptr %14, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %48, %43
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %61, label %54

54:                                               ; preds = %51
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %60

57:                                               ; preds = %54
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.8) #7
  br label %60

60:                                               ; preds = %57, %54
  br label %198

61:                                               ; preds = %51
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  call void @SSL_CTX_set_cert_verify_callback(ptr noundef %62, ptr noundef @cert_verify_callback, ptr noundef %63)
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  call void @SSL_CTX_set_verify(ptr noundef %64, i32 noundef 1, ptr noundef null)
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = call i64 @SSL_CTX_ctrl(ptr noundef %65, i32 noundef 33, i64 noundef 4, ptr noundef null)
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = call ptr @BIO_new_ssl_connect(ptr noundef %67)
  store ptr %68, ptr %15, align 8, !tbaa !5
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %72

71:                                               ; preds = %61
  br label %73

72:                                               ; preds = %61
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.4, i32 noundef 77, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

73:                                               ; preds = %71
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call i64 @BIO_ctrl(ptr noundef %74, i32 noundef 100, i64 noundef 0, ptr noundef %75)
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = call i64 @BIO_ctrl(ptr noundef %77, i32 noundef 100, i64 noundef 1, ptr noundef %78)
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = call i64 @BIO_ctrl(ptr noundef %80, i32 noundef 110, i64 noundef 0, ptr noundef %16)
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %11, align 4, !tbaa !9
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %86

85:                                               ; preds = %73
  br label %87

86:                                               ; preds = %73
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.4, i32 noundef 83, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

87:                                               ; preds = %85
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  br label %92

91:                                               ; preds = %87
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.4, i32 noundef 84, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

92:                                               ; preds = %90
  %93 = load ptr, ptr %16, align 8, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = call i64 @SSL_ctrl(ptr noundef %93, i32 noundef 55, i64 noundef 0, ptr noundef %94)
  %96 = trunc i64 %95 to i32
  store i32 %96, ptr %11, align 4, !tbaa !9
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = icmp eq i32 %97, 1
  br i1 %98, label %99, label %100

99:                                               ; preds = %92
  br label %101

100:                                              ; preds = %92
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.4, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

101:                                              ; preds = %99
  %102 = load ptr, ptr %16, align 8, !tbaa !5
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = call i32 @SSL_set1_host(ptr noundef %102, ptr noundef %103)
  store i32 %104, ptr %11, align 4, !tbaa !9
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = icmp eq i32 %105, 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %101
  br label %109

108:                                              ; preds = %101
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.4, i32 noundef 90, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

109:                                              ; preds = %107
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = call i32 @SSL_set_ex_data(ptr noundef %110, i32 noundef 0, ptr noundef %111)
  store i32 %112, ptr %11, align 4, !tbaa !9
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %109
  br label %117

116:                                              ; preds = %109
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.4, i32 noundef 94, ptr noundef @__PRETTY_FUNCTION__.run_tls_client) #9
  unreachable

117:                                              ; preds = %115
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = call i64 @BIO_ctrl(ptr noundef %118, i32 noundef 101, i64 noundef 0, ptr noundef null)
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %11, align 4, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = icmp sle i32 %121, 0
  br i1 %122, label %123, label %132

123:                                              ; preds = %117
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %131

126:                                              ; preds = %123
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.12, ptr noundef %128, ptr noundef %129) #7
  br label %131

131:                                              ; preds = %126, %123
  br label %198

132:                                              ; preds = %117
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %133, i64 noundef 16384, ptr noundef @.str.13, ptr noundef %134) #7
  %136 = load ptr, ptr %19, align 8, !tbaa !5
  %137 = call i64 @strlen(ptr noundef %136) #10
  %138 = trunc i64 %137 to i32
  store i32 %138, ptr %20, align 4, !tbaa !9
  %139 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %140 = load ptr, ptr %19, align 8, !tbaa !5
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, ptr noundef %140)
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = load ptr, ptr %19, align 8, !tbaa !5
  %144 = load i32, ptr %20, align 4, !tbaa !9
  %145 = call i32 @BIO_write(ptr noundef %142, ptr noundef %143, i32 noundef %144)
  store i32 %145, ptr %21, align 4, !tbaa !9
  %146 = load i32, ptr %21, align 4, !tbaa !9
  %147 = load i32, ptr %20, align 4, !tbaa !9
  %148 = icmp ne i32 %146, %147
  br i1 %148, label %149, label %156

149:                                              ; preds = %132
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = icmp ne ptr %150, null
  br i1 %151, label %152, label %155

152:                                              ; preds = %149
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.16) #7
  br label %155

155:                                              ; preds = %152, %149
  br label %198

156:                                              ; preds = %132
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  br label %159

159:                                              ; preds = %194, %156
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  %161 = call i32 @SSL_get_shutdown(ptr noundef %160)
  %162 = and i32 %161, 2
  %163 = icmp ne i32 %162, 2
  br i1 %163, label %164, label %195

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %165 = load ptr, ptr %15, align 8, !tbaa !5
  %166 = load ptr, ptr %18, align 8, !tbaa !5
  %167 = call i32 @BIO_read(ptr noundef %165, ptr noundef %166, i32 noundef 16384)
  store i32 %167, ptr %22, align 4, !tbaa !9
  %168 = load i32, ptr %22, align 4, !tbaa !9
  %169 = icmp sle i32 %168, 0
  br i1 %169, label %170, label %186

170:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %171 = load ptr, ptr %16, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = call i32 @SSL_get_error(ptr noundef %171, i32 noundef %172)
  store i32 %173, ptr %23, align 4, !tbaa !9
  %174 = load i32, ptr %23, align 4, !tbaa !9
  %175 = icmp eq i32 %174, 6
  br i1 %175, label %176, label %177

176:                                              ; preds = %170
  store i32 4, ptr %24, align 4
  br label %185

177:                                              ; preds = %170
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = icmp ne ptr %178, null
  br i1 %179, label %180, label %184

180:                                              ; preds = %177
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = load i32, ptr %23, align 4, !tbaa !9
  %183 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str.19, i32 noundef %182) #7
  br label %184

184:                                              ; preds = %180, %177
  store i32 2, ptr %24, align 4
  br label %185

185:                                              ; preds = %184, %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %192

186:                                              ; preds = %164
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  %188 = load i32, ptr %22, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = load ptr, ptr @stdout, align 8, !tbaa !5
  %191 = call i64 @fwrite(ptr noundef %187, i64 noundef 1, i64 noundef %189, ptr noundef %190)
  store i32 0, ptr %24, align 4
  br label %192

192:                                              ; preds = %186, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  %193 = load i32, ptr %24, align 4
  switch i32 %193, label %235 [
    i32 0, label %194
    i32 4, label %195
    i32 2, label %198
  ]

194:                                              ; preds = %192
  br label %159, !llvm.loop !13

195:                                              ; preds = %192, %159
  %196 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  call void @BIO_ssl_shutdown(ptr noundef %197)
  br label %199

198:                                              ; preds = %192, %155, %131, %60
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %198, %195
  %200 = load ptr, ptr %15, align 8, !tbaa !5
  %201 = icmp ne ptr %200, null
  br i1 %201, label %202, label %204

202:                                              ; preds = %199
  %203 = load ptr, ptr %15, align 8, !tbaa !5
  call void @BIO_free_all(ptr noundef %203)
  br label %204

204:                                              ; preds = %202, %199
  %205 = load ptr, ptr %14, align 8, !tbaa !5
  %206 = icmp ne ptr %205, null
  br i1 %206, label %207, label %209

207:                                              ; preds = %204
  %208 = load ptr, ptr %14, align 8, !tbaa !5
  call void @X509_free(ptr noundef %208)
  br label %209

209:                                              ; preds = %207, %204
  %210 = load ptr, ptr %13, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %215

212:                                              ; preds = %209
  %213 = load ptr, ptr %13, align 8, !tbaa !5
  %214 = call i32 @fclose(ptr noundef %213)
  br label %215

215:                                              ; preds = %212, %209
  %216 = load ptr, ptr %12, align 8, !tbaa !5
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %220

218:                                              ; preds = %215
  %219 = load ptr, ptr %12, align 8, !tbaa !5
  call void @SSL_CTX_free(ptr noundef %219)
  br label %220

220:                                              ; preds = %218, %215
  %221 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %221) #7
  %222 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %222) #7
  %223 = call i64 @ERR_peek_error()
  %224 = icmp ne i64 %223, 0
  br i1 %224, label %225, label %233

225:                                              ; preds = %220
  store i32 1, ptr %10, align 4, !tbaa !9
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  %227 = icmp ne ptr %226, null
  br i1 %227, label %228, label %232

228:                                              ; preds = %225
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef @.str.21) #7
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %231)
  br label %232

232:                                              ; preds = %228, %225
  call void @ERR_clear_error()
  br label %233

233:                                              ; preds = %232, %220
  %234 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %234, ptr %5, align 4
  store i32 1, ptr %24, align 4
  br label %235

235:                                              ; preds = %233, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, 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
  %236 = load i32, ptr %5, align 4
  ret i32 %236
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

declare void @ERR_clear_error() #5

declare ptr @SSL_CTX_new(ptr noundef) #5

declare ptr @TLS_client_method() #5

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare ptr @PEM_read_X509(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare void @SSL_CTX_set_cert_verify_callback(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @cert_verify_callback(ptr noundef, ptr noundef) #2

declare void @SSL_CTX_set_verify(ptr noundef, i32 noundef, ptr noundef) #5

declare i64 @SSL_CTX_ctrl(ptr noundef, i32 noundef, i64 noundef, ptr noundef) #5

declare ptr @BIO_new_ssl_connect(ptr noundef) #5

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

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

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

declare i32 @SSL_set_ex_data(ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

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

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

declare i32 @SSL_get_shutdown(ptr noundef) #5

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

declare i32 @SSL_get_error(ptr noundef, i32 noundef) #5

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

declare void @BIO_ssl_shutdown(ptr noundef) #5

declare void @BIO_free_all(ptr noundef) #5

declare void @X509_free(ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

declare void @SSL_CTX_free(ptr noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

declare i64 @ERR_peek_error() #5

declare void @ERR_print_errors_fp(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nounwind allocsize(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 #4 = { 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 #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 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 = { nounwind allocsize(0) }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__.run_tls_client = external hidden unnamed_addr constant [69 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [45 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @run_tls_client(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store ptr null, ptr %5, align 8, !tbaa !5
  %6 = tail call noalias dereferenceable_or_null(16384) ptr @malloc(i64 noundef 16384) #9
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %8

7:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 52, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

8:                                                ; preds = %4
  %9 = tail call noalias dereferenceable_or_null(16384) ptr @malloc(i64 noundef 16384) #9
  %.not88 = icmp eq ptr %9, null
  br i1 %.not88, label %10, label %11

10:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 54, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

11:                                               ; preds = %8
  tail call void @ERR_clear_error() #8
  %12 = tail call ptr @TLS_client_method() #8
  %13 = tail call ptr @SSL_CTX_new(ptr noundef %12) #8
  %.not89 = icmp eq ptr %13, null
  br i1 %.not89, label %14, label %15

14:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.4, i32 noundef 59, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

15:                                               ; preds = %11
  %16 = tail call noalias ptr @fopen(ptr noundef %2, ptr noundef nonnull @.str.7)
  %.not90 = icmp eq ptr %16, null
  br i1 %.not90, label %.thread, label %17

17:                                               ; preds = %15
  %18 = tail call ptr @PEM_read_X509(ptr noundef nonnull %16, ptr noundef null, ptr noundef null, ptr noundef null) #8
  %.not91 = icmp eq ptr %18, null
  br i1 %.not91, label %.thread, label %21

.thread:                                          ; preds = %15, %17
  %.not92 = icmp eq ptr %3, null
  br i1 %.not92, label %.thread134, label %19

19:                                               ; preds = %.thread
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.8) #8
  br label %.thread134

21:                                               ; preds = %17
  tail call void @SSL_CTX_set_cert_verify_callback(ptr noundef nonnull %13, ptr noundef nonnull @cert_verify_callback, ptr noundef nonnull %18) #8
  tail call void @SSL_CTX_set_verify(ptr noundef nonnull %13, i32 noundef 1, ptr noundef null) #8
  %22 = tail call i64 @SSL_CTX_ctrl(ptr noundef nonnull %13, i32 noundef 33, i64 noundef 4, ptr noundef null) #8
  %23 = tail call ptr @BIO_new_ssl_connect(ptr noundef nonnull %13) #8
  %.not93 = icmp eq ptr %23, null
  br i1 %.not93, label %24, label %25

24:                                               ; preds = %21
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.4, i32 noundef 77, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

25:                                               ; preds = %21
  %26 = tail call i64 @BIO_ctrl(ptr noundef nonnull %23, i32 noundef 100, i64 noundef 0, ptr noundef %0) #8
  %27 = tail call i64 @BIO_ctrl(ptr noundef nonnull %23, i32 noundef 100, i64 noundef 1, ptr noundef %1) #8
  %28 = call i64 @BIO_ctrl(ptr noundef nonnull %23, i32 noundef 110, i64 noundef 0, ptr noundef nonnull %5) #8
  %29 = and i64 %28, 4294967295
  %30 = icmp eq i64 %29, 1
  br i1 %30, label %32, label %31

31:                                               ; preds = %25
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.4, i32 noundef 83, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

32:                                               ; preds = %25
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %.not94 = icmp eq ptr %33, null
  br i1 %.not94, label %34, label %35

34:                                               ; preds = %32
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.4, i32 noundef 84, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

35:                                               ; preds = %32
  %36 = call i64 @SSL_ctrl(ptr noundef nonnull %33, i32 noundef 55, i64 noundef 0, ptr noundef %0) #8
  %37 = and i64 %36, 4294967295
  %38 = icmp eq i64 %37, 1
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.4, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

40:                                               ; preds = %35
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = call i32 @SSL_set1_host(ptr noundef %41, ptr noundef %0) #8
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.4, i32 noundef 90, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

45:                                               ; preds = %40
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call i32 @SSL_set_ex_data(ptr noundef %46, i32 noundef 0, ptr noundef %3) #8
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.4, i32 noundef 94, ptr noundef nonnull @__PRETTY_FUNCTION__.run_tls_client) #10
  unreachable

50:                                               ; preds = %45
  %51 = call i64 @BIO_ctrl(ptr noundef nonnull %23, i32 noundef 101, i64 noundef 0, ptr noundef null) #8
  %52 = trunc i64 %51 to i32
  %53 = icmp slt i32 %52, 1
  br i1 %53, label %54, label %57

54:                                               ; preds = %50
  %.not99 = icmp eq ptr %3, null
  br i1 %.not99, label %.thread114.thread, label %55

55:                                               ; preds = %54
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.12, ptr noundef %0, ptr noundef %1) #8
  br label %.thread114.thread

57:                                               ; preds = %50
  %58 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 16384, ptr noundef nonnull @.str.13, ptr noundef %0) #8
  %59 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %9) #11
  %60 = trunc i64 %59 to i32
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef nonnull %9)
  %63 = call i32 @BIO_write(ptr noundef nonnull %23, ptr noundef nonnull %9, i32 noundef %60) #8
  %.not95 = icmp eq i32 %63, %60
  br i1 %.not95, label %67, label %64

64:                                               ; preds = %57
  %.not98 = icmp eq ptr %3, null
  br i1 %.not98, label %.thread114.thread, label %65

65:                                               ; preds = %64
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.16) #8
  br label %.thread114.thread

67:                                               ; preds = %57
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = call i32 @SSL_get_shutdown(ptr noundef %70) #8
  %72 = and i32 %71, 2
  %.not96.not145 = icmp eq i32 %72, 0
  br i1 %.not96.not145, label %.lr.ph, label %.thread111

.lr.ph:                                           ; preds = %67, %82
  %73 = call i32 @BIO_read(ptr noundef nonnull %23, ptr noundef nonnull %6, i32 noundef 16384) #8
  %74 = icmp slt i32 %73, 1
  br i1 %74, label %75, label %82

75:                                               ; preds = %.lr.ph
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = call i32 @SSL_get_error(ptr noundef %76, i32 noundef %73) #8
  %78 = icmp eq i32 %77, 6
  br i1 %78, label %.thread111, label %79

79:                                               ; preds = %75
  %.not97 = icmp eq ptr %3, null
  br i1 %.not97, label %.thread114.thread, label %80

80:                                               ; preds = %79
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.19, i32 noundef %77) #8
  br label %.thread114.thread

82:                                               ; preds = %.lr.ph
  %83 = zext nneg i32 %73 to i64
  %84 = load ptr, ptr @stdout, align 8, !tbaa !5
  %85 = call i64 @fwrite(ptr noundef nonnull %6, i64 noundef 1, i64 noundef %83, ptr noundef %84)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = call i32 @SSL_get_shutdown(ptr noundef %86) #8
  %88 = and i32 %87, 2
  %.not96.not = icmp eq i32 %88, 0
  br i1 %.not96.not, label %.lr.ph, label %.thread111

.thread111:                                       ; preds = %82, %67, %75
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  call void @BIO_ssl_shutdown(ptr noundef nonnull %23) #8
  br label %.thread114.thread

.thread114.thread:                                ; preds = %79, %80, %.thread111, %64, %65, %54, %55
  %.071126139 = phi i32 [ 1, %55 ], [ 1, %54 ], [ 1, %65 ], [ 1, %64 ], [ 0, %.thread111 ], [ 1, %80 ], [ 1, %79 ]
  call void @BIO_free_all(ptr noundef nonnull %23) #8
  call void @X509_free(ptr noundef nonnull %18) #8
  br label %.thread134

.thread134:                                       ; preds = %19, %.thread, %.thread114.thread
  %.071126138 = phi i32 [ %.071126139, %.thread114.thread ], [ 1, %.thread ], [ 1, %19 ]
  br i1 %.not90, label %92, label %90

90:                                               ; preds = %.thread134
  %91 = call i32 @fclose(ptr noundef nonnull %16)
  br label %92

92:                                               ; preds = %.thread134, %90
  call void @SSL_CTX_free(ptr noundef nonnull %13) #8
  call void @free(ptr noundef %9) #8
  call void @free(ptr noundef %6) #8
  %93 = call i64 @ERR_peek_error() #8
  %.not101 = icmp eq i64 %93, 0
  br i1 %.not101, label %98, label %94

94:                                               ; preds = %92
  %.not102 = icmp eq ptr %3, null
  br i1 %.not102, label %97, label %95

95:                                               ; preds = %94
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.21) #8
  call void @ERR_print_errors_fp(ptr noundef nonnull %3) #8
  br label %97

97:                                               ; preds = %95, %94
  call void @ERR_clear_error() #8
  br label %98

98:                                               ; preds = %92, %97
  %.070 = phi i32 [ 1, %97 ], [ %.071126138, %92 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  ret i32 %.070
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @ERR_clear_error() local_unnamed_addr #5

declare ptr @SSL_CTX_new(ptr noundef) local_unnamed_addr #5

declare ptr @TLS_client_method() local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

declare ptr @PEM_read_X509(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @SSL_CTX_set_cert_verify_callback(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @cert_verify_callback(ptr noundef, ptr noundef) #2

declare void @SSL_CTX_set_verify(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

declare ptr @BIO_new_ssl_connect(ptr noundef) local_unnamed_addr #5

declare i64 @BIO_ctrl(ptr noundef, i32 noundef, i64 noundef, ptr 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_set_ex_data(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6

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

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

declare i32 @SSL_get_shutdown(ptr noundef) local_unnamed_addr #5

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

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

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

declare void @BIO_ssl_shutdown(ptr noundef) local_unnamed_addr #5

declare void @BIO_free_all(ptr noundef) local_unnamed_addr #5

declare void @X509_free(ptr noundef) local_unnamed_addr #5

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

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

declare i64 @ERR_peek_error() local_unnamed_addr #5

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #4 = { 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 #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 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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"}


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