; LLVM IR from specinfo-ua/UAPKI :: library/common/loaders (cm-loader)

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

%"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.CmLoader = type { %struct.CM_PROVIDER_API }
%struct.CM_PROVIDER_API = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8CmLoader6unloadEv(ptr noundef nonnull align 8 dereferenceable(104)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8CmLoader10getLibNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8CmLoader4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  call void @_ZN8CmLoader6unloadEv(ptr noundef nonnull align 8 dereferenceable(104) %12)
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  store i8 0, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN8CmLoader10getLibNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %14)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %15 unwind label %124

15:                                               ; preds = %3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %16 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  %17 = call ptr @dlopen(ptr noundef %16, i32 noundef 2) #5
  %18 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %19 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %18, i32 0, i32 2
  store ptr %17, ptr %19, align 8, !tbaa !11
  %20 = invoke noundef zeroext i1 @_ZNK8CmLoader8isLoadedEv(ptr noundef nonnull align 8 dereferenceable(104) %12)
          to label %21 unwind label %128

21:                                               ; preds = %15
  br i1 %20, label %22, label %133

22:                                               ; preds = %21
  %23 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %24 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %23, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = call ptr @dlsym(ptr noundef %25, ptr noundef @.str.3) #5
  %27 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %28 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %27, i32 0, i32 3
  store ptr %26, ptr %28, align 8, !tbaa !15
  %29 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %30 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %29, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = call ptr @dlsym(ptr noundef %31, ptr noundef @.str.4) #5
  %33 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %34 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %33, i32 0, i32 4
  store ptr %32, ptr %34, align 8, !tbaa !16
  %35 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %36 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = call ptr @dlsym(ptr noundef %37, ptr noundef @.str.5) #5
  %39 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %40 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %39, i32 0, i32 5
  store ptr %38, ptr %40, align 8, !tbaa !17
  %41 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %42 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = call ptr @dlsym(ptr noundef %43, ptr noundef @.str.6) #5
  %45 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %46 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %45, i32 0, i32 6
  store ptr %44, ptr %46, align 8, !tbaa !18
  %47 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %48 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %47, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = call ptr @dlsym(ptr noundef %49, ptr noundef @.str.7) #5
  %51 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %52 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %51, i32 0, i32 7
  store ptr %50, ptr %52, align 8, !tbaa !19
  %53 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %54 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  %56 = call ptr @dlsym(ptr noundef %55, ptr noundef @.str.8) #5
  %57 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %58 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %57, i32 0, i32 8
  store ptr %56, ptr %58, align 8, !tbaa !20
  %59 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %60 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = call ptr @dlsym(ptr noundef %61, ptr noundef @.str.9) #5
  %63 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %64 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %63, i32 0, i32 9
  store ptr %62, ptr %64, align 8, !tbaa !21
  %65 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %66 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = call ptr @dlsym(ptr noundef %67, ptr noundef @.str.10) #5
  %69 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %70 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %69, i32 0, i32 10
  store ptr %68, ptr %70, align 8, !tbaa !22
  %71 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %72 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = call ptr @dlsym(ptr noundef %73, ptr noundef @.str.11) #5
  %75 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %76 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %75, i32 0, i32 11
  store ptr %74, ptr %76, align 8, !tbaa !23
  %77 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %78 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = call ptr @dlsym(ptr noundef %79, ptr noundef @.str.12) #5
  %81 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %82 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %81, i32 0, i32 12
  store ptr %80, ptr %82, align 8, !tbaa !24
  %83 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %84 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %117

87:                                               ; preds = %22
  %88 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %89 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %117

92:                                               ; preds = %87
  %93 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %94 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %93, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %117

97:                                               ; preds = %92
  %98 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %99 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %98, i32 0, i32 8
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %117

102:                                              ; preds = %97
  %103 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %104 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %103, i32 0, i32 9
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %117

107:                                              ; preds = %102
  %108 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %109 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %108, i32 0, i32 11
  %110 = load ptr, ptr %109, align 8, !tbaa !23
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %117

112:                                              ; preds = %107
  %113 = getelementptr inbounds %class.CmLoader, ptr %12, i32 0, i32 0
  %114 = getelementptr inbounds %struct.CM_PROVIDER_API, ptr %113, i32 0, i32 12
  %115 = load ptr, ptr %114, align 8, !tbaa !24
  %116 = icmp ne ptr %115, null
  br label %117

117:                                              ; preds = %112, %107, %102, %97, %92, %87, %22
  %118 = phi i1 [ false, %107 ], [ false, %102 ], [ false, %97 ], [ false, %92 ], [ false, %87 ], [ false, %22 ], [ %116, %112 ]
  %119 = zext i1 %118 to i8
  store i8 %119, ptr %7, align 1, !tbaa !9
  %120 = load i8, ptr %7, align 1, !tbaa !9, !range !25, !noundef !26
  %121 = trunc i8 %120 to i1
  br i1 %121, label %132, label %122

122:                                              ; preds = %117
  invoke void @_ZN8CmLoader6unloadEv(ptr noundef nonnull align 8 dereferenceable(104) %12)
          to label %123 unwind label %128

123:                                              ; preds = %122
  br label %132

124:                                              ; preds = %3
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %10, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  br label %136

128:                                              ; preds = %122, %15
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %10, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %136

132:                                              ; preds = %123, %117
  br label %133

133:                                              ; preds = %132, %21
  %134 = load i8, ptr %7, align 1, !tbaa !9, !range !25, !noundef !26
  %135 = trunc i8 %134 to i1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  ret i1 %135

136:                                              ; preds = %128, %124
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  br label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %10, align 8
  %139 = load i32, ptr %11, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: nounwind
declare ptr @dlopen(ptr noundef, i32 noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8CmLoader8isLoadedEv(ptr noundef nonnull align 8 dereferenceable(104)) #2 align 2

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) #4

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

!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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTS8CmLoader", !13, i64 0}
!13 = !{!"_ZTS15CM_PROVIDER_API", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !6, i64 24}
!16 = !{!12, !6, i64 32}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 48}
!19 = !{!12, !6, i64 56}
!20 = !{!12, !6, i64 64}
!21 = !{!12, !6, i64 72}
!22 = !{!12, !6, i64 80}
!23 = !{!12, !6, i64 88}
!24 = !{!12, !6, i64 96}
!25 = !{i8 0, i8 2}
!26 = !{}


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

%"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] }

@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8CmLoader6unloadEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8CmLoader10getLibNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8CmLoader4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN8CmLoader6unloadEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN8CmLoader10getLibNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %1)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %6 unwind label %56

6:                                                ; preds = %3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %7 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %8 = call ptr @dlopen(ptr noundef %7, i32 noundef 2) #5
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %8, ptr %9, align 8, !tbaa !5
  %10 = call noundef zeroext i1 @_ZNK8CmLoader8isLoadedEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br i1 %10, label %11, label %60

11:                                               ; preds = %6
  %12 = load ptr, ptr %9, align 8, !tbaa !5
  %13 = call ptr @dlsym(ptr noundef %12, ptr noundef nonnull @.str.3) #5
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %13, ptr %14, align 8, !tbaa !12
  %15 = load ptr, ptr %9, align 8, !tbaa !5
  %16 = call ptr @dlsym(ptr noundef %15, ptr noundef nonnull @.str.4) #5
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %16, ptr %17, align 8, !tbaa !13
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = call ptr @dlsym(ptr noundef %18, ptr noundef nonnull @.str.5) #5
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %19, ptr %20, align 8, !tbaa !14
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = call ptr @dlsym(ptr noundef %21, ptr noundef nonnull @.str.6) #5
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %22, ptr %23, align 8, !tbaa !15
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = call ptr @dlsym(ptr noundef %24, ptr noundef nonnull @.str.7) #5
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %25, ptr %26, align 8, !tbaa !16
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = call ptr @dlsym(ptr noundef %27, ptr noundef nonnull @.str.8) #5
  %29 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %28, ptr %29, align 8, !tbaa !17
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = call ptr @dlsym(ptr noundef %30, ptr noundef nonnull @.str.9) #5
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %31, ptr %32, align 8, !tbaa !18
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call ptr @dlsym(ptr noundef %33, ptr noundef nonnull @.str.10) #5
  %35 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %34, ptr %35, align 8, !tbaa !19
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = call ptr @dlsym(ptr noundef %36, ptr noundef nonnull @.str.11) #5
  %38 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %37, ptr %38, align 8, !tbaa !20
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = call ptr @dlsym(ptr noundef %39, ptr noundef nonnull @.str.12) #5
  %41 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %40, ptr %41, align 8, !tbaa !21
  %42 = load <2 x ptr>, ptr %14, align 8
  %43 = load ptr, ptr %20, align 8
  %44 = load ptr, ptr %29, align 8
  %45 = shufflevector <2 x ptr> %42, <2 x ptr> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %46 = insertelement <4 x ptr> %45, ptr %43, i64 2
  %47 = insertelement <4 x ptr> %46, ptr %44, i64 3
  %.fr = freeze <4 x ptr> %47
  %48 = load ptr, ptr %32, align 8
  %.fr25 = freeze ptr %48
  %.not11 = icmp ne ptr %.fr25, null
  %49 = load ptr, ptr %38, align 8
  %.fr24 = freeze ptr %49
  %.not12 = icmp ne ptr %.fr24, null
  %50 = icmp ne ptr %40, null
  %51 = icmp eq <4 x ptr> %.fr, zeroinitializer
  %52 = bitcast <4 x i1> %51 to i4
  %53 = icmp eq i4 %52, 0
  %op.rdx = and i1 %53, %.not11
  %54 = and i1 %op.rdx, %.not12
  %op.rdx23 = select i1 %54, i1 %50, i1 false
  br i1 %op.rdx23, label %60, label %55

55:                                               ; preds = %11
  invoke void @_ZN8CmLoader6unloadEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %60 unwind label %58

56:                                               ; preds = %3
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %61

58:                                               ; preds = %55
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %61

60:                                               ; preds = %11, %55, %6
  %.07.shrunk = phi i1 [ true, %11 ], [ false, %55 ], [ false, %6 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  ret i1 %.07.shrunk

61:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8CmLoader8isLoadedEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) local_unnamed_addr #4

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

!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, !11, i64 16}
!6 = !{!"_ZTS8CmLoader", !7, i64 0}
!7 = !{!"_ZTS15CM_PROVIDER_API", !8, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!6, !11, i64 24}
!13 = !{!6, !11, i64 32}
!14 = !{!6, !11, i64 40}
!15 = !{!6, !11, i64 48}
!16 = !{!6, !11, i64 56}
!17 = !{!6, !11, i64 64}
!18 = !{!6, !11, i64 72}
!19 = !{!6, !11, i64 80}
!20 = !{!6, !11, i64 88}
!21 = !{!6, !11, i64 96}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass