; LLVM IR from hasseily/SuperDuperDisplay :: extras (ImGuiFileDialog)

; 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.__va_list_tag = type { i32, i32, ptr, ptr }
%struct.ImVec2 = type { float, float }
%"class.IGFD::FileDialog" = type <{ ptr, %"class.IGFD::FileDialogInternal", %struct.ImGuiListClipper, %struct.ImGuiListClipper, float, [4 x i8] }>
%"class.IGFD::FileDialogInternal" = type { %"class.IGFD::FileManager", %"class.IGFD::FilterManager", %"class.IGFD::SearchManager", %"class.std::__cxx11::basic_string", i8, %struct.ImVec2, i32, float, i8, i8, i8, i8, i8, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i8, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"struct.IGFD::FileDialogConfig" }
%"class.IGFD::FileManager" = type { %"class.std::__cxx11::basic_string", %"class.std::vector", %"class.std::vector.46", %"class.std::vector.46", %"class.std::vector.46", %"class.std::vector.46", %"class.__gnu_cxx::__normal_iterator.51", %"class.std::__cxx11::basic_string", %"class.std::set", i8, %"class.std::__cxx11::basic_string", %"class.std::unique_ptr", i8, i8, i8, [1024 x i8], [1024 x i8], [1024 x i8], [1024 x i8], %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", [4 x i8], i32, i8, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, i8, %"class.std::__cxx11::basic_string" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.46" = type { %"struct.std::_Vector_base.47" }
%"struct.std::_Vector_base.47" = type { %"struct.std::_Vector_base<std::shared_ptr<IGFD::FileInfos>, std::allocator<std::shared_ptr<IGFD::FileInfos>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<IGFD::FileInfos>, std::allocator<std::shared_ptr<IGFD::FileInfos>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<IGFD::FileInfos>, std::allocator<std::shared_ptr<IGFD::FileInfos>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<IGFD::FileInfos>, std::allocator<std::shared_ptr<IGFD::FileInfos>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.51" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char>>, 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 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.56" }
%"struct.std::_Head_base.56" = type { ptr }
%"class.IGFD::FilterManager" = type { %"class.std::vector.57", %"class.std::unordered_map", %"class.std::vector.67", %"class.IGFD::FilterInfos", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::vector.57" = type { %"struct.std::_Vector_base.58" }
%"struct.std::_Vector_base.58" = type { %"struct.std::_Vector_base<IGFD::FilterInfos, std::allocator<IGFD::FilterInfos>>::_Vector_impl" }
%"struct.std::_Vector_base<IGFD::FilterInfos, std::allocator<IGFD::FilterInfos>>::_Vector_impl" = type { %"struct.std::_Vector_base<IGFD::FilterInfos, std::allocator<IGFD::FilterInfos>>::_Vector_impl_data" }
%"struct.std::_Vector_base<IGFD::FilterInfos, std::allocator<IGFD::FilterInfos>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.67" = type { %"struct.std::_Vector_base.68" }
%"struct.std::_Vector_base.68" = type { %"struct.std::_Vector_base<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>, std::allocator<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>, std::allocator<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>, std::allocator<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>, std::allocator<std::function<bool (const IGFD::FileInfos &, IGFD::FileStyle &)>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.IGFD::FilterInfos" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.IGFD::SearchableVector", %"class.IGFD::SearchableVector", %"class.std::vector.92", i64 }
%"class.IGFD::SearchableVector" = type { %"class.std::unordered_map.72", %"class.std::vector" }
%"class.std::unordered_map.72" = type { %"class.std::_Hashtable.73" }
%"class.std::_Hashtable.73" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.92" = type { %"struct.std::_Vector_base.93" }
%"struct.std::_Vector_base.93" = type { %"struct.std::_Vector_base<std::__cxx11::basic_regex<char>, std::allocator<std::__cxx11::basic_regex<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_regex<char>, std::allocator<std::__cxx11::basic_regex<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_regex<char>, std::allocator<std::__cxx11::basic_regex<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_regex<char>, std::allocator<std::__cxx11::basic_regex<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.IGFD::SearchManager" = type <{ %"class.std::__cxx11::basic_string", [1024 x i8], i8, [7 x i8] }>
%"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] }
%"struct.IGFD::FileDialogConfig" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, ptr, i32, %"class.std::function", float, %"class.std::function.97" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.97" = type { %"class.std::_Function_base", ptr }
%struct.ImGuiListClipper = type { ptr, i32, i32, i32, float, float, ptr }
%"class.IGFD::FileInfos" = type { %"struct.std::array", %"struct.std::array", %"struct.std::array", %"struct.std::array", i64, %"class.IGFD::FileType", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::shared_ptr.101" }
%"struct.std::array" = type { [10 x %"class.std::__cxx11::basic_string"] }
%"class.IGFD::FileType" = type <{ i32, i8, [3 x i8] }>
%"class.std::shared_ptr.101" = type { %"class.std::__shared_ptr.102" }
%"class.std::__shared_ptr.102" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, i8, i8, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, %struct.ImVec2, [666 x i32], [666 x i8], [16 x float], ptr, %struct.ImVec2, [5 x i8], float, float, i32, i8, i8, i8, i8, i32, [666 x %struct.ImGuiKeyData], i8, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i16], [5 x i16], [5 x i8], [5 x i8], [5 x i8], i8, [5 x float], [5 x float], [5 x float], float, i8, i8, i8, i8, i16, %struct.ImVector }
%struct.ImGuiKeyData = type { i8, float, float, float }
%struct.ImVector = type { i32, i32, ptr }

@_ZZN4IGFD10FileDialog16m_SelectableItemEiSt10shared_ptrINS_9FileInfosEEbPKczE15selectableFlags = external hidden global i32, align 4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; 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 dso_local noundef i64 @_ZNKSt12__shared_ptrIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2EE9use_countEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4IGFD8FileType5isDirEv(ptr noundef nonnull align 4 dereferenceable(5)) #1 align 2

declare noundef zeroext i1 @_ZN5ImGui10SelectableEPKcbiRK6ImVec2(ptr noundef, i1 noundef zeroext, i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648), ptr noundef nonnull align 8 dereferenceable(6528), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

declare noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv() #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4IGFD10FileDialog16m_SelectableItemEiSt10shared_ptrINS_9FileInfosEEbPKcz(ptr noundef nonnull align 8 dereferenceable(6620) %0, i32 noundef %1, ptr noundef %2, i1 noundef zeroext %3, ptr noundef %4, ...) unnamed_addr #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca [1 x %struct.__va_list_tag], align 16
  %13 = alloca float, align 4
  %14 = alloca i8, align 1
  %15 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  %16 = zext i1 %3 to i8
  store i8 %16, ptr %9, align 1, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8
  %18 = call noundef i64 @_ZNKSt12__shared_ptrIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2EE9use_countEv(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  %19 = icmp ne i64 %18, 0
  br i1 %19, label %21, label %20

20:                                               ; preds = %5
  br label %106

21:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %22 = getelementptr inbounds %"class.IGFD::FileDialog", ptr %17, i32 0, i32 1
  %23 = getelementptr inbounds %"class.IGFD::FileDialogInternal", ptr %22, i32 0, i32 0
  store ptr %23, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  %24 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %12, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %24)
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.IGFD::FileManager", ptr %25, i32 0, i32 16
  %27 = getelementptr inbounds [1024 x i8], ptr %26, i64 0, i64 0
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %12, i64 0, i64 0
  %30 = call i32 @vsnprintf(ptr noundef %27, i64 noundef 1024, ptr noundef %28, ptr noundef %29) #6
  %31 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %12, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %31)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store float 0.000000e+00, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.IGFD::FileManager", ptr %32, i32 0, i32 16
  %34 = getelementptr inbounds [1024 x i8], ptr %33, i64 0, i64 0
  %35 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %36 = trunc i8 %35 to i1
  %37 = load i32, ptr @_ZZN4IGFD10FileDialog16m_SelectableItemEiSt10shared_ptrINS_9FileInfosEEbPKczE15selectableFlags, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %38 = load float, ptr %13, align 4, !tbaa !13
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef -1.000000e+00, float noundef %38)
  %39 = call noundef zeroext i1 @_ZN5ImGui10SelectableEPKcbiRK6ImVec2(ptr noundef %34, i1 noundef zeroext %36, i32 noundef %37, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %40 = zext i1 %39 to i8
  store i8 %40, ptr %14, align 1, !tbaa !11
  %41 = load i8, ptr %14, align 1, !tbaa !11, !range !15, !noundef !16
  %42 = trunc i8 %41 to i1
  br i1 %42, label %43, label %105

43:                                               ; preds = %21
  %44 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %45 = getelementptr inbounds %"class.IGFD::FileInfos", ptr %44, i32 0, i32 5
  %46 = call noundef zeroext i1 @_ZNK4IGFD8FileType5isDirEv(ptr noundef nonnull align 4 dereferenceable(5) %45)
  br i1 %46, label %47, label %96

47:                                               ; preds = %43
  %48 = call noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv()
  %49 = getelementptr inbounds %struct.ImGuiIO, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !17
  %51 = and i32 %50, 1
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %77

53:                                               ; preds = %47
  %54 = call noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef 0)
  br i1 %54, label %55, label %61

55:                                               ; preds = %53
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %56, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.IGFD::FileManager", ptr %58, i32 0, i32 14
  %60 = zext i1 %57 to i8
  store i8 %60, ptr %59, align 2, !tbaa !23
  br label %76

61:                                               ; preds = %53
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.IGFD::FileManager", ptr %62, i32 0, i32 29
  %64 = load i8, ptr %63, align 8, !tbaa !52, !range !15, !noundef !16
  %65 = trunc i8 %64 to i1
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.IGFD::FileDialog", ptr %17, i32 0, i32 1
  call void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %67, ptr noundef nonnull align 8 dereferenceable(6528) %68, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br label %75

69:                                               ; preds = %61
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = call noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %70, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.IGFD::FileManager", ptr %72, i32 0, i32 14
  %74 = zext i1 %71 to i8
  store i8 %74, ptr %73, align 2, !tbaa !23
  br label %75

75:                                               ; preds = %69, %66
  br label %76

76:                                               ; preds = %75, %55
  br label %95

77:                                               ; preds = %47
  %78 = call noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef 0)
  br i1 %78, label %79, label %85

79:                                               ; preds = %77
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = call noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %80, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.IGFD::FileManager", ptr %82, i32 0, i32 14
  %84 = zext i1 %81 to i8
  store i8 %84, ptr %83, align 2, !tbaa !23
  br label %94

85:                                               ; preds = %77
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.IGFD::FileManager", ptr %86, i32 0, i32 29
  %88 = load i8, ptr %87, align 8, !tbaa !52, !range !15, !noundef !16
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %93

90:                                               ; preds = %85
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.IGFD::FileDialog", ptr %17, i32 0, i32 1
  call void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %91, ptr noundef nonnull align 8 dereferenceable(6528) %92, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br label %93

93:                                               ; preds = %90, %85
  br label %94

94:                                               ; preds = %93, %79
  br label %95

95:                                               ; preds = %94, %76
  br label %104

96:                                               ; preds = %43
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.IGFD::FileDialog", ptr %17, i32 0, i32 1
  call void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %97, ptr noundef nonnull align 8 dereferenceable(6528) %98, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %99 = call noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef 0)
  br i1 %99, label %100, label %103

100:                                              ; preds = %96
  %101 = getelementptr inbounds %"class.IGFD::FileDialog", ptr %17, i32 0, i32 1
  %102 = getelementptr inbounds %"class.IGFD::FileDialogInternal", ptr %101, i32 0, i32 10
  store i8 1, ptr %102, align 2, !tbaa !53
  br label %103

103:                                              ; preds = %100, %96
  br label %104

104:                                              ; preds = %103, %95
  br label %105

105:                                              ; preds = %104, %21
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %106

106:                                              ; preds = %105, %20
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nounwind
declare i32 @vsnprintf(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

declare noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 #6 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTS7ImGuiIO", !10, i64 0, !10, i64 4, !19, i64 8, !14, i64 16, !14, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !14, i64 56, !12, i64 60, !6, i64 64, !19, i64 72, !12, i64 80, !12, i64 81, !12, i64 82, !12, i64 83, !12, i64 84, !12, i64 85, !12, i64 86, !12, i64 87, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !12, i64 112, !12, i64 113, !12, i64 114, !12, i64 115, !12, i64 116, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !20, i64 192, !12, i64 194, !12, i64 195, !12, i64 196, !12, i64 197, !12, i64 198, !12, i64 199, !12, i64 200, !14, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !19, i64 224, !7, i64 232, !7, i64 2896, !7, i64 3564, !6, i64 3632, !19, i64 3640, !7, i64 3648, !14, i64 3656, !14, i64 3660, !21, i64 3664, !12, i64 3668, !12, i64 3669, !12, i64 3670, !12, i64 3671, !10, i64 3672, !7, i64 3676, !12, i64 14332, !19, i64 14336, !7, i64 14344, !7, i64 14384, !7, i64 14424, !7, i64 14429, !7, i64 14434, !7, i64 14444, !7, i64 14454, !7, i64 14459, !7, i64 14464, !12, i64 14469, !7, i64 14472, !7, i64 14492, !7, i64 14512, !14, i64 14532, !12, i64 14536, !12, i64 14537, !7, i64 14538, !12, i64 14539, !20, i64 14540, !22, i64 14544}
!19 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_ZTS16ImGuiMouseSource", !7, i64 0}
!22 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!23 = !{!24, !12, i64 290}
!24 = !{!"_ZTSN4IGFD11FileManagerE", !25, i64 0, !28, i64 32, !32, i64 56, !32, i64 80, !32, i64 104, !32, i64 128, !36, i64 152, !25, i64 160, !37, i64 192, !12, i64 240, !25, i64 248, !45, i64 280, !12, i64 288, !12, i64 289, !12, i64 290, !7, i64 291, !7, i64 1315, !7, i64 2339, !7, i64 3363, !25, i64 4392, !25, i64 4424, !25, i64 4456, !25, i64 4488, !7, i64 4520, !51, i64 4524, !12, i64 4528, !25, i64 4536, !25, i64 4568, !27, i64 4600, !12, i64 4608, !25, i64 4616}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !27, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSSt6vectorISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEE", !6, i64 0}
!37 = !{!"_ZTSSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE", !38, i64 0}
!38 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE", !39, i64 0}
!39 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !40, i64 0, !42, i64 8}
!40 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !41, i64 0}
!41 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!42 = !{!"_ZTSSt15_Rb_tree_header", !43, i64 0, !27, i64 32}
!43 = !{!"_ZTSSt18_Rb_tree_node_base", !44, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!44 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!45 = !{!"_ZTSSt10unique_ptrIN4IGFD11IFileSystemESt14default_deleteIS1_EE", !46, i64 0}
!46 = !{!"_ZTSSt15__uniq_ptr_dataIN4IGFD11IFileSystemESt14default_deleteIS1_ELb1ELb1EE", !47, i64 0}
!47 = !{!"_ZTSSt15__uniq_ptr_implIN4IGFD11IFileSystemESt14default_deleteIS1_EE", !48, i64 0}
!48 = !{!"_ZTSSt5tupleIJPN4IGFD11IFileSystemESt14default_deleteIS1_EEE", !49, i64 0}
!49 = !{!"_ZTSSt11_Tuple_implILm0EJPN4IGFD11IFileSystemESt14default_deleteIS1_EEE", !50, i64 0}
!50 = !{!"_ZTSSt10_Head_baseILm0EPN4IGFD11IFileSystemELb0EE", !6, i64 0}
!51 = !{!"_ZTSN4IGFD11FileManager16SortingFieldEnumE", !7, i64 0}
!52 = !{!24, !12, i64 4608}
!53 = !{!54, !12, i64 6198}
!54 = !{!"_ZTSN4IGFD10FileDialogE", !55, i64 8, !82, i64 6536, !82, i64 6576, !14, i64 6616}
!55 = !{!"_ZTSN4IGFD18FileDialogInternalE", !24, i64 0, !56, i64 4648, !77, i64 5072, !25, i64 6136, !12, i64 6168, !19, i64 6172, !10, i64 6180, !14, i64 6184, !12, i64 6188, !12, i64 6189, !12, i64 6190, !12, i64 6191, !12, i64 6192, !25, i64 6200, !25, i64 6232, !12, i64 6264, !12, i64 6265, !10, i64 6268, !25, i64 6272, !25, i64 6304, !78, i64 6336}
!56 = !{!"_ZTSN4IGFD13FilterManagerE", !57, i64 0, !61, i64 24, !65, i64 80, !69, i64 104, !25, i64 360, !25, i64 392}
!57 = !{!"_ZTSSt6vectorIN4IGFD11FilterInfosESaIS1_EE", !58, i64 0}
!58 = !{!"_ZTSSt12_Vector_baseIN4IGFD11FilterInfosESaIS1_EE", !59, i64 0}
!59 = !{!"_ZTSNSt12_Vector_baseIN4IGFD11FilterInfosESaIS1_EE12_Vector_implE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseIN4IGFD11FilterInfosESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!61 = !{!"_ZTSSt13unordered_mapIiS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN4IGFD9FileStyleEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEESA_IiESC_IiESaISE_IKiSI_EEE", !62, i64 0}
!62 = !{!"_ZTSSt10_HashtableIiSt4pairIKiSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN4IGFD9FileStyleEESt4hashIS8_ESt8equal_toIS8_ESaIS0_IKS8_SC_EEEESaISL_ENSt8__detail10_Select1stESF_IiESD_IiENSN_18_Mod_range_hashingENSN_20_Default_ranged_hashENSN_20_Prime_rehash_policyENSN_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !27, i64 8, !63, i64 16, !27, i64 24, !64, i64 32, !6, i64 48}
!63 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!64 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !14, i64 0, !27, i64 8}
!65 = !{!"_ZTSSt6vectorISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE", !66, i64 0}
!66 = !{!"_ZTSSt12_Vector_baseISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE", !67, i64 0}
!67 = !{!"_ZTSNSt12_Vector_baseISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE12_Vector_implE", !68, i64 0}
!68 = !{!"_ZTSNSt12_Vector_baseISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!69 = !{!"_ZTSN4IGFD11FilterInfosE", !25, i64 0, !25, i64 32, !70, i64 64, !70, i64 144, !73, i64 224, !27, i64 248}
!70 = !{!"_ZTSN4IGFD16SearchableVectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !71, i64 0, !28, i64 56}
!71 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE", !72, i64 0}
!72 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !27, i64 8, !63, i64 16, !27, i64 24, !64, i64 32, !6, i64 48}
!73 = !{!"_ZTSSt6vectorINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE", !74, i64 0}
!74 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE", !75, i64 0}
!75 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE12_Vector_implE", !76, i64 0}
!76 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!77 = !{!"_ZTSN4IGFD13SearchManagerE", !25, i64 0, !7, i64 32, !12, i64 1056}
!78 = !{!"_ZTSN4IGFD16FileDialogConfigE", !25, i64 0, !25, i64 32, !25, i64 64, !10, i64 96, !6, i64 104, !10, i64 112, !79, i64 120, !14, i64 152, !81, i64 160}
!79 = !{!"_ZTSSt8functionIFvPKcPvPbEE", !80, i64 0, !6, i64 24}
!80 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!81 = !{!"_ZTSSt8functionIFbPN4IGFD9FileInfosEPvEE", !80, i64 0, !6, i64 24}
!82 = !{!"_ZTS16ImGuiListClipper", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !14, i64 20, !14, i64 24, !6, i64 32}


; 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.__va_list_tag = type { i32, i32, ptr, ptr }
%struct.ImVec2 = type { float, float }

@_ZZN4IGFD10FileDialog16m_SelectableItemEiSt10shared_ptrINS_9FileInfosEEbPKczE15selectableFlags = external hidden local_unnamed_addr global i32, align 4

; 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 nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; 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 dso_local noundef i64 @_ZNKSt12__shared_ptrIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2EE9use_countEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4IGFD8FileType5isDirEv(ptr noundef nonnull align 4 dereferenceable(5)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN5ImGui10SelectableEPKcbiRK6ImVec2(ptr noundef, i1 noundef zeroext, i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648), ptr noundef nonnull align 8 dereferenceable(6528), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4IGFD10FileDialog16m_SelectableItemEiSt10shared_ptrINS_9FileInfosEEbPKcz(ptr noundef nonnull align 8 dereferenceable(6620) %0, i32 noundef %1, ptr noundef nonnull %2, i1 noundef zeroext %3, ptr nocapture noundef readonly %4, ...) unnamed_addr #3 align 2 {
  %6 = alloca [1 x %struct.__va_list_tag], align 16
  %7 = alloca %struct.ImVec2, align 4
  %8 = tail call noundef i64 @_ZNKSt12__shared_ptrIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2EE9use_countEv(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %53, label %9

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.va_start.p0(ptr nonnull %6)
  %11 = getelementptr inbounds i8, ptr %0, i64 1323
  %12 = call i32 @vsnprintf(ptr noundef nonnull %11, i64 noundef 1024, ptr noundef %4, ptr noundef nonnull %6) #6
  call void @llvm.va_end.p0(ptr nonnull %6)
  %13 = load i32, ptr @_ZZN4IGFD10FileDialog16m_SelectableItemEiSt10shared_ptrINS_9FileInfosEEbPKczE15selectableFlags, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef -1.000000e+00, float noundef 0.000000e+00)
  %14 = call noundef zeroext i1 @_ZN5ImGui10SelectableEPKcbiRK6ImVec2(ptr noundef nonnull %11, i1 noundef zeroext %3, i32 noundef %13, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br i1 %14, label %15, label %52

15:                                               ; preds = %9
  %16 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4IGFD9FileInfosELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %17 = getelementptr inbounds i8, ptr %16, i64 1288
  %18 = call noundef zeroext i1 @_ZNK4IGFD8FileType5isDirEv(ptr noundef nonnull align 4 dereferenceable(5) %17)
  br i1 %18, label %19, label %48

19:                                               ; preds = %15
  %20 = call noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv()
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = and i32 %21, 1
  %.not17 = icmp eq i32 %22, 0
  %23 = call noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef 0)
  br i1 %.not17, label %38, label %24

24:                                               ; preds = %19
  br i1 %23, label %25, label %29

25:                                               ; preds = %24
  %26 = call noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %10, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %27 = getelementptr inbounds i8, ptr %0, i64 298
  %28 = zext i1 %26 to i8
  store i8 %28, ptr %27, align 2, !tbaa !18
  br label %52

29:                                               ; preds = %24
  %30 = getelementptr inbounds i8, ptr %0, i64 4616
  %31 = load i8, ptr %30, align 8, !tbaa !47, !range !48, !noundef !49
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %33, label %34

33:                                               ; preds = %29
  call void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %10, ptr noundef nonnull align 8 dereferenceable(6528) %10, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br label %52

34:                                               ; preds = %29
  %35 = call noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %10, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %36 = getelementptr inbounds i8, ptr %0, i64 298
  %37 = zext i1 %35 to i8
  store i8 %37, ptr %36, align 2, !tbaa !18
  br label %52

38:                                               ; preds = %19
  br i1 %23, label %39, label %43

39:                                               ; preds = %38
  %40 = call noundef zeroext i1 @_ZN4IGFD11FileManager15SelectDirectoryERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %10, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %41 = getelementptr inbounds i8, ptr %0, i64 298
  %42 = zext i1 %40 to i8
  store i8 %42, ptr %41, align 2, !tbaa !18
  br label %52

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %0, i64 4616
  %45 = load i8, ptr %44, align 8, !tbaa !47, !range !48, !noundef !49
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %47, label %52

47:                                               ; preds = %43
  call void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %10, ptr noundef nonnull align 8 dereferenceable(6528) %10, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br label %52

48:                                               ; preds = %15
  call void @_ZN4IGFD11FileManager14SelectFileNameERKNS_18FileDialogInternalERKSt10shared_ptrINS_9FileInfosEE(ptr noundef nonnull align 8 dereferenceable(4648) %10, ptr noundef nonnull align 8 dereferenceable(6528) %10, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %49 = call noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef 0)
  br i1 %49, label %50, label %52

50:                                               ; preds = %48
  %51 = getelementptr inbounds i8, ptr %0, i64 6198
  store i8 1, ptr %51, align 2, !tbaa !50
  br label %52

52:                                               ; preds = %39, %47, %43, %25, %34, %33, %50, %48, %9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %53

53:                                               ; preds = %5, %52
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nofree nounwind
declare noundef i32 @vsnprintf(ptr nocapture noundef, i64 noundef, ptr nocapture noundef readonly, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

declare noundef zeroext i1 @_ZN5ImGui20IsMouseDoubleClickedEi(i32 noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS7ImGuiIO", !6, i64 0, !6, i64 4, !11, i64 8, !12, i64 16, !12, i64 20, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !12, i64 56, !14, i64 60, !13, i64 64, !11, i64 72, !14, i64 80, !14, i64 81, !14, i64 82, !14, i64 83, !14, i64 84, !14, i64 85, !14, i64 86, !14, i64 87, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !14, i64 112, !14, i64 113, !14, i64 114, !14, i64 115, !14, i64 116, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !15, i64 192, !14, i64 194, !14, i64 195, !14, i64 196, !14, i64 197, !14, i64 198, !14, i64 199, !14, i64 200, !12, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !6, i64 220, !11, i64 224, !7, i64 232, !7, i64 2896, !7, i64 3564, !13, i64 3632, !11, i64 3640, !7, i64 3648, !12, i64 3656, !12, i64 3660, !16, i64 3664, !14, i64 3668, !14, i64 3669, !14, i64 3670, !14, i64 3671, !6, i64 3672, !7, i64 3676, !14, i64 14332, !11, i64 14336, !7, i64 14344, !7, i64 14384, !7, i64 14424, !7, i64 14429, !7, i64 14434, !7, i64 14444, !7, i64 14454, !7, i64 14459, !7, i64 14464, !14, i64 14469, !7, i64 14472, !7, i64 14492, !7, i64 14512, !12, i64 14532, !14, i64 14536, !14, i64 14537, !7, i64 14538, !14, i64 14539, !15, i64 14540, !17, i64 14544}
!11 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTS16ImGuiMouseSource", !7, i64 0}
!17 = !{!"_ZTS8ImVectorItE", !6, i64 0, !6, i64 4, !13, i64 8}
!18 = !{!19, !14, i64 290}
!19 = !{!"_ZTSN4IGFD11FileManagerE", !20, i64 0, !23, i64 32, !27, i64 56, !27, i64 80, !27, i64 104, !27, i64 128, !31, i64 152, !20, i64 160, !32, i64 192, !14, i64 240, !20, i64 248, !40, i64 280, !14, i64 288, !14, i64 289, !14, i64 290, !7, i64 291, !7, i64 1315, !7, i64 2339, !7, i64 3363, !20, i64 4392, !20, i64 4424, !20, i64 4456, !20, i64 4488, !7, i64 4520, !46, i64 4524, !14, i64 4528, !20, i64 4536, !20, i64 4568, !22, i64 4600, !14, i64 4608, !20, i64 4616}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!27 = !{!"_ZTSSt6vectorISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4IGFD9FileInfosEESaIS3_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!31 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEE", !13, i64 0}
!32 = !{!"_ZTSSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !35, i64 0, !37, i64 8}
!35 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !36, i64 0}
!36 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!37 = !{!"_ZTSSt15_Rb_tree_header", !38, i64 0, !22, i64 32}
!38 = !{!"_ZTSSt18_Rb_tree_node_base", !39, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!39 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!40 = !{!"_ZTSSt10unique_ptrIN4IGFD11IFileSystemESt14default_deleteIS1_EE", !41, i64 0}
!41 = !{!"_ZTSSt15__uniq_ptr_dataIN4IGFD11IFileSystemESt14default_deleteIS1_ELb1ELb1EE", !42, i64 0}
!42 = !{!"_ZTSSt15__uniq_ptr_implIN4IGFD11IFileSystemESt14default_deleteIS1_EE", !43, i64 0}
!43 = !{!"_ZTSSt5tupleIJPN4IGFD11IFileSystemESt14default_deleteIS1_EEE", !44, i64 0}
!44 = !{!"_ZTSSt11_Tuple_implILm0EJPN4IGFD11IFileSystemESt14default_deleteIS1_EEE", !45, i64 0}
!45 = !{!"_ZTSSt10_Head_baseILm0EPN4IGFD11IFileSystemELb0EE", !13, i64 0}
!46 = !{!"_ZTSN4IGFD11FileManager16SortingFieldEnumE", !7, i64 0}
!47 = !{!19, !14, i64 4608}
!48 = !{i8 0, i8 2}
!49 = !{}
!50 = !{!51, !14, i64 6198}
!51 = !{!"_ZTSN4IGFD10FileDialogE", !52, i64 8, !79, i64 6536, !79, i64 6576, !12, i64 6616}
!52 = !{!"_ZTSN4IGFD18FileDialogInternalE", !19, i64 0, !53, i64 4648, !74, i64 5072, !20, i64 6136, !14, i64 6168, !11, i64 6172, !6, i64 6180, !12, i64 6184, !14, i64 6188, !14, i64 6189, !14, i64 6190, !14, i64 6191, !14, i64 6192, !20, i64 6200, !20, i64 6232, !14, i64 6264, !14, i64 6265, !6, i64 6268, !20, i64 6272, !20, i64 6304, !75, i64 6336}
!53 = !{!"_ZTSN4IGFD13FilterManagerE", !54, i64 0, !58, i64 24, !62, i64 80, !66, i64 104, !20, i64 360, !20, i64 392}
!54 = !{!"_ZTSSt6vectorIN4IGFD11FilterInfosESaIS1_EE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseIN4IGFD11FilterInfosESaIS1_EE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIN4IGFD11FilterInfosESaIS1_EE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIN4IGFD11FilterInfosESaIS1_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!58 = !{!"_ZTSSt13unordered_mapIiS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN4IGFD9FileStyleEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEESA_IiESC_IiESaISE_IKiSI_EEE", !59, i64 0}
!59 = !{!"_ZTSSt10_HashtableIiSt4pairIKiSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN4IGFD9FileStyleEESt4hashIS8_ESt8equal_toIS8_ESaIS0_IKS8_SC_EEEESaISL_ENSt8__detail10_Select1stESF_IiESD_IiENSN_18_Mod_range_hashingENSN_20_Default_ranged_hashENSN_20_Prime_rehash_policyENSN_17_Hashtable_traitsILb0ELb0ELb1EEEE", !13, i64 0, !22, i64 8, !60, i64 16, !22, i64 24, !61, i64 32, !13, i64 48}
!60 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !13, i64 0}
!61 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !12, i64 0, !22, i64 8}
!62 = !{!"_ZTSSt6vectorISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE", !63, i64 0}
!63 = !{!"_ZTSSt12_Vector_baseISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE", !64, i64 0}
!64 = !{!"_ZTSNSt12_Vector_baseISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE12_Vector_implE", !65, i64 0}
!65 = !{!"_ZTSNSt12_Vector_baseISt8functionIFbRKN4IGFD9FileInfosERNS1_9FileStyleEEESaIS8_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!66 = !{!"_ZTSN4IGFD11FilterInfosE", !20, i64 0, !20, i64 32, !67, i64 64, !67, i64 144, !70, i64 224, !22, i64 248}
!67 = !{!"_ZTSN4IGFD16SearchableVectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !68, i64 0, !23, i64 56}
!68 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE", !69, i64 0}
!69 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE", !13, i64 0, !22, i64 8, !60, i64 16, !22, i64 24, !61, i64 32, !13, i64 48}
!70 = !{!"_ZTSSt6vectorINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE", !71, i64 0}
!71 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE", !72, i64 0}
!72 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE12_Vector_implE", !73, i64 0}
!73 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1111basic_regexIcNS0_12regex_traitsIcEEEESaIS4_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!74 = !{!"_ZTSN4IGFD13SearchManagerE", !20, i64 0, !7, i64 32, !14, i64 1056}
!75 = !{!"_ZTSN4IGFD16FileDialogConfigE", !20, i64 0, !20, i64 32, !20, i64 64, !6, i64 96, !13, i64 104, !6, i64 112, !76, i64 120, !12, i64 152, !78, i64 160}
!76 = !{!"_ZTSSt8functionIFvPKcPvPbEE", !77, i64 0, !13, i64 24}
!77 = !{!"_ZTSSt14_Function_base", !7, i64 0, !13, i64 16}
!78 = !{!"_ZTSSt8functionIFbPN4IGFD9FileInfosEPvEE", !77, i64 0, !13, i64 24}
!79 = !{!"_ZTS16ImGuiListClipper", !13, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !12, i64 20, !12, i64 24, !13, i64 32}


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