; LLVM IR from thepowersgang/mrustc :: src/hir_typeck/expr_cs.ll (ZN7Context22get_ivar_possibilitiesERK4Spanj)

; 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.Context = type { ptr, %"class.std::vector", %class.HMTypeInferrence, %class.TraitResolution, i32, %"class.std::vector.23", %"class.std::vector.28", %"class.std::vector.33", %"class.std::vector.38", %"class.std::vector.43", %"class.std::vector.47", %"class.std::map.52", %"struct.HIR::SimplePath" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Context::Binding, std::allocator<Context::Binding>>::_Vector_impl" }
%"struct.std::_Vector_base<Context::Binding, std::allocator<Context::Binding>>::_Vector_impl" = type { %"struct.std::_Vector_base<Context::Binding, std::allocator<Context::Binding>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Context::Binding, std::allocator<Context::Binding>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.HMTypeInferrence = type <{ %"class.std::vector.0", %"class.std::vector.5", i8, [7 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl" }
%"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl" }
%"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.TraitResolution = type { %struct.TraitResolveCommon, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.18" }
%struct.TraitResolveCommon = type { ptr, ptr, ptr, %"class.std::map", %class.RangeVecMap, %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<HIR::TypeRef, std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>, std::_Select1st<std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>>, std::less<HIR::TypeRef>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<HIR::TypeRef, std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>, std::_Select1st<std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>>, std::less<HIR::TypeRef>>::_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.RangeVecMap = type <{ %"class.std::vector.13", [8 x i8] }>
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<std::unique_ptr<Context::Coercion>, std::allocator<std::unique_ptr<Context::Coercion>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Context::Coercion>, std::allocator<std::unique_ptr<Context::Coercion>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Context::Coercion>, std::allocator<std::unique_ptr<Context::Coercion>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Context::Coercion>, std::allocator<std::unique_ptr<Context::Coercion>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<Context::Associated, std::allocator<Context::Associated>>::_Vector_impl" }
%"struct.std::_Vector_base<Context::Associated, std::allocator<Context::Associated>>::_Vector_impl" = type { %"struct.std::_Vector_base<Context::Associated, std::allocator<Context::Associated>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Context::Associated, std::allocator<Context::Associated>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<HIR::ExprNode *, std::allocator<HIR::ExprNode *>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::ExprNode *, std::allocator<HIR::ExprNode *>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::ExprNode *, std::allocator<HIR::ExprNode *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::ExprNode *, std::allocator<HIR::ExprNode *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<std::unique_ptr<Context::Revisitor>, std::allocator<std::unique_ptr<Context::Revisitor>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Context::Revisitor>, std::allocator<std::unique_ptr<Context::Revisitor>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Context::Revisitor>, std::allocator<std::unique_ptr<Context::Revisitor>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Context::Revisitor>, std::allocator<std::unique_ptr<Context::Revisitor>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.43" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::vector.47" = type { %"struct.std::_Vector_base.48" }
%"struct.std::_Vector_base.48" = type { %"struct.std::_Vector_base<Context::IVarPossible, std::allocator<Context::IVarPossible>>::_Vector_impl" }
%"struct.std::_Vector_base<Context::IVarPossible, std::allocator<Context::IVarPossible>>::_Vector_impl" = type { %"struct.std::_Vector_base<Context::IVarPossible, std::allocator<Context::IVarPossible>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Context::IVarPossible, std::allocator<Context::IVarPossible>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.52" = type { %"class.std::_Rb_tree.53" }
%"class.std::_Rb_tree.53" = type { %"struct.std::_Rb_tree<HIR::TypeData_ErasedType_AliasInner *, std::pair<HIR::TypeData_ErasedType_AliasInner *const, Context::TaitEntry>, std::_Select1st<std::pair<HIR::TypeData_ErasedType_AliasInner *const, Context::TaitEntry>>, std::less<HIR::TypeData_ErasedType_AliasInner *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<HIR::TypeData_ErasedType_AliasInner *, std::pair<HIR::TypeData_ErasedType_AliasInner *const, Context::TaitEntry>, std::_Select1st<std::pair<HIR::TypeData_ErasedType_AliasInner *const, Context::TaitEntry>>, std::less<HIR::TypeData_ErasedType_AliasInner *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%"struct.HIR::TypeData::Data_Infer" = type { i32, i32 }

@g_debug_indent_level = external global i32, align 4
@__FUNCTION__._ZN7Context22get_ivar_possibilitiesERK4Spanj = external hidden unnamed_addr constant [23 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [14 x i8], align 1

declare noundef zeroext i1 @_Z13debug_enabledv() #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK3HIR8TypeData8as_InferEv(ptr noundef nonnull align 8 dereferenceable(184)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7Context22get_ivar_possibilitiesERK4Spanj(ptr noundef nonnull align 8 dereferenceable(592) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %10 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %11 = getelementptr inbounds %struct.Context, ptr %10, i32 0, i32 2
  %12 = load i32, ptr %7, align 4, !tbaa !9
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN16HMTypeInferrence8get_typeEj(ptr noundef nonnull align 8 dereferenceable(49) %11, i32 noundef %12)
  store ptr %13, ptr %8, align 8, !tbaa !5
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = call noundef zeroext i1 @_ZNK3HIR8TypeData8is_InferEv(ptr noundef nonnull align 8 dereferenceable(184) %15)
  br i1 %16, label %17, label %25

17:                                               ; preds = %3
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  %20 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK3HIR8TypeData8as_InferEv(ptr noundef nonnull align 8 dereferenceable(184) %19)
  %21 = getelementptr inbounds %"struct.HIR::TypeData::Data_Infer", ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = icmp eq i32 %22, %23
  br i1 %24, label %42, label %25

25:                                               ; preds = %17, %3
  br label %26

26:                                               ; preds = %25
  %27 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %27, label %28, label %39

28:                                               ; preds = %26
  %29 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %29, ptr noundef @__FUNCTION__._ZN7Context22get_ivar_possibilitiesERK4Spanj)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef @.str.39)
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %31, i32 noundef %32)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @.str.40)
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @_ZSt3decRSt8ios_base)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %39

39:                                               ; preds = %28, %26
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %43

42:                                               ; preds = %17
  store i32 0, ptr %9, align 4
  br label %43

43:                                               ; preds = %42, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %44 = load i32, ptr %9, align 4
  switch i32 %44, label %63 [
    i32 0, label %45
    i32 1, label %61
  ]

45:                                               ; preds = %43
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds %struct.Context, ptr %10, i32 0, i32 10
  %49 = call noundef i64 @_ZNKSt6vectorIN7Context12IVarPossibleESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #6
  %50 = icmp uge i64 %47, %49
  br i1 %50, label %51, label %56

51:                                               ; preds = %45
  %52 = getelementptr inbounds %struct.Context, ptr %10, i32 0, i32 10
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = add i32 %53, 1
  %55 = zext i32 %54 to i64
  call void @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %55)
  br label %56

56:                                               ; preds = %51, %45
  %57 = getelementptr inbounds %struct.Context, ptr %10, i32 0, i32 10
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #6
  store ptr %60, ptr %4, align 8
  br label %61

61:                                               ; preds = %56, %43
  %62 = load ptr, ptr %4, align 8
  ret ptr %62

63:                                               ; preds = %43
  unreachable
}

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN16HMTypeInferrence8get_typeEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN7Context12IVarPossibleESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

attributes #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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { 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 #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, !10, i64 0}
!12 = !{!"_ZTSN3HIR8TypeData10Data_InferE", !10, i64 0, !13, i64 4}
!13 = !{!"_ZTSN3HIR10InferClassE", !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"

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__FUNCTION__._ZN7Context22get_ivar_possibilitiesERK4Spanj = external hidden unnamed_addr constant [23 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [14 x i8], align 1

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK3HIR8TypeData8as_InferEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7Context22get_ivar_possibilitiesERK4Spanj(ptr noundef nonnull align 8 dereferenceable(592) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %1, i32 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN16HMTypeInferrence8get_typeEj(ptr noundef nonnull align 8 dereferenceable(49) %4, i32 noundef %2)
  %6 = tail call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %7 = tail call noundef zeroext i1 @_ZNK3HIR8TypeData8is_InferEv(ptr noundef nonnull align 8 dereferenceable(184) %6)
  br i1 %7, label %8, label %13

8:                                                ; preds = %3
  %9 = tail call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %10 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK3HIR8TypeData8as_InferEv(ptr noundef nonnull align 8 dereferenceable(184) %9)
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = icmp eq i32 %11, %2
  br i1 %12, label %24, label %13

13:                                               ; preds = %3, %8
  %14 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %14, label %15, label %.thread

15:                                               ; preds = %13
  %16 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %16, ptr noundef nonnull @__FUNCTION__._ZN7Context22get_ivar_possibilitiesERK4Spanj)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @.str.39)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %2)
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str.40)
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread

24:                                               ; preds = %8
  %25 = zext i32 %2 to i64
  %26 = getelementptr inbounds i8, ptr %0, i64 512
  %27 = tail call noundef i64 @_ZNKSt6vectorIN7Context12IVarPossibleESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %.not = icmp ugt i64 %27, %25
  br i1 %.not, label %31, label %28

28:                                               ; preds = %24
  %29 = add i32 %2, 1
  %30 = zext i32 %29 to i64
  tail call void @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %30)
  br label %31

31:                                               ; preds = %28, %24
  %32 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %25) #5
  br label %.thread

.thread:                                          ; preds = %13, %15, %31
  %.1 = phi ptr [ %32, %31 ], [ null, %15 ], [ null, %13 ]
  ret ptr %.1
}

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN16HMTypeInferrence8get_typeEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN7Context12IVarPossibleESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6vectorIN7Context12IVarPossibleESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

attributes #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 = { 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 #2 = { 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 #3 = { inlinehint 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 #4 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTSN3HIR8TypeData10Data_InferE", !7, i64 0, !10, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3HIR10InferClassE", !8, i64 0}
!11 = !{!7, !7, i64 0}


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