; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (http-helper)

; 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.HTTP_HELPER = type { i8, i8, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::mutex", %"class.std::map" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::mutex>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::mutex>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::mutex>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::mutex>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@_ZL11http_helper = external hidden global %struct.HTTP_HELPER, align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

declare ptr @curl_easy_init() #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL22curl_set_url_and_proxyPvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZL12cb_curlwritePvmmS_(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare ptr @ba_alloc() #2

declare i32 @curl_easy_perform(ptr noundef) #2

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

declare void @curl_easy_cleanup(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10HttpHelper4postERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcS9_S7_S7_PP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %5) #3 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %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 ptr, align 8
  %19 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %20 = load i8, ptr getelementptr inbounds (%struct.HTTP_HELPER, ptr @_ZL11http_helper, i32 0, i32 1), align 1, !tbaa !9, !range !25, !noundef !26
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %23

22:                                               ; preds = %6
  store i32 4120, ptr %7, align 4
  store i32 1, ptr %17, align 4
  br label %92

23:                                               ; preds = %6
  %24 = call ptr @curl_easy_init()
  store ptr %24, ptr %14, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  store i32 4097, ptr %7, align 4
  store i32 1, ptr %17, align 4
  br label %92

27:                                               ; preds = %23
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %34

30:                                               ; preds = %27
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %31, i32 noundef 10005, ptr noundef %32)
  br label %34

34:                                               ; preds = %30, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store ptr null, ptr %18, align 8, !tbaa !5
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = call ptr @curl_slist_append(ptr noundef %35, ptr noundef %36)
  store ptr %37, ptr %18, align 8, !tbaa !5
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %38) #4
  br i1 %39, label %45, label %40

40:                                               ; preds = %34
  %41 = load ptr, ptr %18, align 8, !tbaa !5
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %42) #4
  %44 = call ptr @curl_slist_append(ptr noundef %41, ptr noundef %43)
  store ptr %44, ptr %18, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %40, %34
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %46, i32 noundef 10023, ptr noundef %47)
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = call noundef zeroext i1 @_ZL22curl_set_url_and_proxyPvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %49, ptr noundef nonnull align 8 dereferenceable(32) %50)
  br i1 %51, label %53, label %52

52:                                               ; preds = %45
  store i32 4098, ptr %7, align 4
  store i32 1, ptr %17, align 4
  br label %91

53:                                               ; preds = %45
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %54, i32 noundef 47, i64 noundef 1)
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %56) #4
  br i1 %57, label %63, label %58

58:                                               ; preds = %53
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %60) #4
  %62 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %59, i32 noundef 10015, ptr noundef %61)
  br label %63

63:                                               ; preds = %58, %53
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %65) #4
  %67 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %64, i32 noundef 60, i64 noundef %66)
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %68, i32 noundef 20011, ptr noundef @_ZL12cb_curlwritePvmmS_)
  %70 = call ptr @ba_alloc()
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %70, ptr %71, align 8, !tbaa !5
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %72, i32 noundef 10001, ptr noundef %74)
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = call i32 @curl_easy_perform(ptr noundef %76)
  store i32 %77, ptr %15, align 4, !tbaa !27
  %78 = load i32, ptr %15, align 4, !tbaa !27
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %87

80:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %19, align 8, !tbaa !29
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = call i32 (ptr, i32, ...) @curl_easy_getinfo(ptr noundef %81, i32 noundef 2097154, ptr noundef %19)
  store i32 %82, ptr %15, align 4, !tbaa !27
  %83 = load i64, ptr %19, align 8, !tbaa !29
  %84 = icmp eq i64 %83, 200
  %85 = zext i1 %84 to i64
  %86 = select i1 %84, i32 0, i32 4133
  store i32 %86, ptr %16, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %88

87:                                               ; preds = %63
  store i32 4098, ptr %16, align 4, !tbaa !30
  br label %88

88:                                               ; preds = %87, %80
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  call void @curl_easy_cleanup(ptr noundef %89)
  %90 = load i32, ptr %16, align 4, !tbaa !30
  store i32 %90, ptr %7, align 4
  store i32 1, ptr %17, align 4
  br label %91

91:                                               ; preds = %88, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %92

92:                                               ; preds = %91, %26, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %93 = load i32, ptr %7, align 4
  ret i32 %93
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #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 = { mustprogress 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 #4 = { nounwind }

!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++ TBAA"}
!9 = !{!10, !11, i64 1}
!10 = !{!"_ZTS11HTTP_HELPER", !11, i64 0, !11, i64 1, !12, i64 8, !12, i64 40, !15, i64 72, !17, i64 112}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt5mutex", !16, i64 0}
!16 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!17 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt5mutexSt4lessIS5_ESaISt4pairIKS5_S6_EEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St5mutexESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St5mutexESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE13_Rb_tree_implISD_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !14, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !28, i64 0}
!28 = !{!"_ZTS8CURLcode", !7, i64 0}
!29 = !{!14, !14, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"int", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.HTTP_HELPER = type { i8, i8, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::mutex", %"class.std::map" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::mutex>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::mutex>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::mutex>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::mutex>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@_ZL11http_helper = external hidden local_unnamed_addr global %struct.HTTP_HELPER, align 8

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

; 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 nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare ptr @curl_easy_init() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL22curl_set_url_and_proxyPvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare i32 @curl_easy_setopt(ptr noundef, i32 noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZL12cb_curlwritePvmmS_(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare ptr @ba_alloc() local_unnamed_addr #2

declare i32 @curl_easy_perform(ptr noundef) local_unnamed_addr #2

declare i32 @curl_easy_getinfo(ptr noundef, i32 noundef, ...) local_unnamed_addr #2

declare void @curl_easy_cleanup(ptr noundef) local_unnamed_addr #2

declare ptr @curl_slist_append(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 4134) i32 @_ZN10HttpHelper4postERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcS9_S7_S7_PP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #3 align 2 {
  %7 = alloca i64, align 8
  %8 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL11http_helper, i64 1), align 1, !tbaa !5, !range !24, !noundef !25
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %45, label %10

10:                                               ; preds = %6
  %11 = tail call ptr @curl_easy_init()
  %12 = icmp eq ptr %11, null
  br i1 %12, label %45, label %13

13:                                               ; preds = %10
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %16, label %14

14:                                               ; preds = %13
  %15 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 10005, ptr noundef nonnull %2)
  br label %16

16:                                               ; preds = %14, %13
  %17 = tail call ptr @curl_slist_append(ptr noundef null, ptr noundef %1)
  %18 = tail call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br i1 %18, label %22, label %19

19:                                               ; preds = %16
  %20 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  %21 = tail call ptr @curl_slist_append(ptr noundef %17, ptr noundef %20)
  br label %22

22:                                               ; preds = %19, %16
  %.0 = phi ptr [ %17, %16 ], [ %21, %19 ]
  %23 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 10023, ptr noundef %.0)
  %24 = tail call noundef zeroext i1 @_ZL22curl_set_url_and_proxyPvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %11, ptr noundef nonnull align 8 dereferenceable(32) %0)
  br i1 %24, label %25, label %45

25:                                               ; preds = %22
  %26 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 47, i64 noundef 1)
  %27 = tail call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br i1 %27, label %31, label %28

28:                                               ; preds = %25
  %29 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  %30 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 10015, ptr noundef %29)
  br label %31

31:                                               ; preds = %28, %25
  %32 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  %33 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 60, i64 noundef %32)
  %34 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 20011, ptr noundef nonnull @_ZL12cb_curlwritePvmmS_)
  %35 = tail call ptr @ba_alloc()
  store ptr %35, ptr %5, align 8, !tbaa !26
  %36 = tail call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef nonnull %11, i32 noundef 10001, ptr noundef %35)
  %37 = tail call i32 @curl_easy_perform(ptr noundef nonnull %11)
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %44

39:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store i64 0, ptr %7, align 8, !tbaa !27
  %40 = call i32 (ptr, i32, ...) @curl_easy_getinfo(ptr noundef nonnull %11, i32 noundef 2097154, ptr noundef nonnull %7)
  %41 = load i64, ptr %7, align 8, !tbaa !27
  %42 = icmp eq i64 %41, 200
  %43 = select i1 %42, i32 0, i32 4133
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %44

44:                                               ; preds = %31, %39
  %.027 = phi i32 [ %43, %39 ], [ 4098, %31 ]
  call void @curl_easy_cleanup(ptr noundef nonnull %11)
  br label %45

45:                                               ; preds = %44, %22, %10, %6
  %.1 = phi i32 [ 4120, %6 ], [ 4097, %10 ], [ %.027, %44 ], [ 4098, %22 ]
  ret i32 %.1
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #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 = { mustprogress 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 #4 = { nounwind }

!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, !7, i64 1}
!6 = !{!"_ZTS11HTTP_HELPER", !7, i64 0, !7, i64 1, !10, i64 8, !10, i64 40, !14, i64 72, !16, i64 112}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !13, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSSt5mutex", !15, i64 0}
!15 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!16 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt5mutexSt4lessIS5_ESaISt4pairIKS5_S6_EEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St5mutexESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St5mutexESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE13_Rb_tree_implISD_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !13, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!12, !12, i64 0}
!27 = !{!13, !13, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass