; LLVM IR from JayXon/Leanify :: formats (pe)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.Pe::RsrcEntry" = type { ptr, ptr, %"class.std::__cxx11::basic_string" }
%"struct.Pe::ImageResourceDirectory" = type { i32, i32, i16, i16, i16, i16 }
%"struct.Pe::ImageResourceDirectoryEntry" = type { %union.anon.4, %union.anon.5 }
%union.anon.4 = type { %struct.anon }
%struct.anon = type { i32 }
%union.anon.5 = type { i32 }
%class.Pe = type { %class.Format, ptr, i32, %"class.std::vector" }
%class.Format = type { ptr, ptr, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Pe::RsrcEntry, std::allocator<Pe::RsrcEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<Pe::RsrcEntry, std::allocator<Pe::RsrcEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<Pe::RsrcEntry, std::allocator<Pe::RsrcEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Pe::RsrcEntry, std::allocator<Pe::RsrcEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN12_GLOBAL__N_114resource_typesB5cxx11E = external hidden global [25 x %"class.std::__cxx11::basic_string"], align 16
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.30 = external hidden unnamed_addr constant [26 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 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)) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2Pe12TraverseRSRCEPNS_22ImageResourceDirectoryENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i16, align 2
  %14 = alloca [256 x i8], align 16
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"struct.Pe::RsrcEntry", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  store ptr %24, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %231, %4
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.Pe::ImageResourceDirectory", ptr %27, i32 0, i32 4
  %29 = load i16, ptr %28, align 1, !tbaa !11
  %30 = zext i16 %29 to i32
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.Pe::ImageResourceDirectory", ptr %31, i32 0, i32 5
  %33 = load i16, ptr %32, align 1, !tbaa !14
  %34 = zext i16 %33 to i32
  %35 = add nsw i32 %30, %34
  %36 = icmp slt i32 %26, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %25
  store i32 2, ptr %11, align 4
  br label %235

38:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %39, i64 %41
  %43 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 1
  %45 = lshr i32 %44, 31
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %90

47:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #7
  %48 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !15
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %50, i64 %52
  %54 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 1
  %56 = and i32 %55, 2147483647
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %49, i64 %57
  %59 = load i16, ptr %58, align 2, !tbaa !23
  store i16 %59, ptr %13, align 2, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 256, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 256, i1 false)
  %60 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %62, i64 %64
  %66 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 1
  %68 = and i32 %67, 2147483647
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i8, ptr %61, i64 %69
  %71 = getelementptr inbounds i8, ptr %70, i64 2
  %72 = load i16, ptr %13, align 2, !tbaa !23
  %73 = zext i16 %72 to i32
  %74 = mul nsw i32 %73, 2
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 0
  invoke void @_Z10UTF16toMBSPKwmPcm(ptr noundef %71, i64 noundef %75, ptr noundef %76, i64 noundef 256)
          to label %77 unwind label %81

77:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  %78 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 0
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef %78)
          to label %79 unwind label %85

79:                                               ; preds = %77
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  br label %140

81:                                               ; preds = %47
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %15, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %16, align 4
  br label %89

85:                                               ; preds = %77
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %15, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %89

89:                                               ; preds = %85, %81
  call void @llvm.lifetime.end.p0(i64 256, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  br label %234

90:                                               ; preds = %38
  %91 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br i1 %91, label %92, label %126

92:                                               ; preds = %90
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %93, i64 %95
  %97 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 1, !tbaa !24
  %99 = zext i32 %98 to i64
  %100 = icmp ult i64 %99, 25
  br i1 %100, label %101, label %126

101:                                              ; preds = %92
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %102, i64 %104
  %106 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 1, !tbaa !24
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds [25 x %"class.std::__cxx11::basic_string"], ptr @_ZN12_GLOBAL__N_114resource_typesB5cxx11E, i64 0, i64 %108
  %110 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %109) #7
  br i1 %110, label %126, label %111

111:                                              ; preds = %101
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %112, i64 %114
  %116 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %115, i32 0, i32 0
  %117 = load i32, ptr %116, align 1, !tbaa !24
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [25 x %"class.std::__cxx11::basic_string"], ptr @_ZN12_GLOBAL__N_114resource_typesB5cxx11E, i64 0, i64 %118
  %120 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %119)
          to label %121 unwind label %122

121:                                              ; preds = %111
  br label %139

122:                                              ; preds = %165, %153, %151, %111
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %15, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %16, align 4
  br label %234

126:                                              ; preds = %101, %92, %90
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %127, i64 %129
  %131 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 1, !tbaa !24
  call void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, i32 noundef %132) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %133 unwind label %135

133:                                              ; preds = %126
  %134 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %139

135:                                              ; preds = %126
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %15, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %234

139:                                              ; preds = %133, %121
  br label %140

140:                                              ; preds = %139, %79
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load i32, ptr %10, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %141, i64 %143
  %145 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 1
  %147 = and i32 %146, 2147483647
  %148 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 2
  %149 = load i32, ptr %148, align 8, !tbaa !25
  %150 = icmp ugt i32 %147, %149
  br i1 %150, label %151, label %156

151:                                              ; preds = %140
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.30)
          to label %153 unwind label %122

153:                                              ; preds = %151
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %155 unwind label %122

155:                                              ; preds = %153
  store i32 1, ptr %11, align 4
  br label %228

156:                                              ; preds = %140
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %157, i64 %159
  %161 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %160, i32 0, i32 1
  %162 = load i32, ptr %161, align 1
  %163 = lshr i32 %162, 31
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %184

165:                                              ; preds = %156
  %166 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !15
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = load i32, ptr %10, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %168, i64 %170
  %172 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %171, i32 0, i32 1
  %173 = load i32, ptr %172, align 1
  %174 = and i32 %173, 2147483647
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i8, ptr %167, i64 %175
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %12, i8 noundef signext 47)
          to label %177 unwind label %122

177:                                              ; preds = %165
  %178 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @_ZN2Pe12TraverseRSRCEPNS_22ImageResourceDirectoryENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 8 dereferenceable(64) %22, ptr noundef %176, ptr noundef %20, i32 noundef %178)
          to label %179 unwind label %180

179:                                              ; preds = %177
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %227

180:                                              ; preds = %177
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %15, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %234

184:                                              ; preds = %156
  %185 = load i32, ptr %8, align 4, !tbaa !9
  %186 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 1
  %187 = load ptr, ptr %186, align 8, !tbaa !15
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = load i32, ptr %10, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %188, i64 %190
  %192 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %191, i32 0, i32 1
  %193 = load i32, ptr %192, align 1, !tbaa !24
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds i8, ptr %187, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !9
  %197 = sub i32 %196, %185
  store i32 %197, ptr %195, align 4, !tbaa !9
  %198 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #7
  %199 = getelementptr inbounds %"struct.Pe::RsrcEntry", ptr %21, i32 0, i32 0
  %200 = getelementptr inbounds %class.Pe, ptr %22, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !15
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = load i32, ptr %10, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %202, i64 %204
  %206 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %205, i32 0, i32 1
  %207 = load i32, ptr %206, align 1, !tbaa !24
  %208 = zext i32 %207 to i64
  %209 = getelementptr inbounds i8, ptr %201, i64 %208
  store ptr %209, ptr %199, align 8, !tbaa !26
  %210 = getelementptr inbounds %"struct.Pe::RsrcEntry", ptr %21, i32 0, i32 1
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = load i32, ptr %10, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %211, i64 %213
  store ptr %214, ptr %210, align 8, !tbaa !30
  %215 = getelementptr inbounds %"struct.Pe::RsrcEntry", ptr %21, i32 0, i32 2
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %215, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %216 unwind label %218

216:                                              ; preds = %184
  invoke void @_ZNSt6vectorIN2Pe9RsrcEntryESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %198, ptr noundef nonnull align 8 dereferenceable(48) %21)
          to label %217 unwind label %222

217:                                              ; preds = %216
  call void @_ZN2Pe9RsrcEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #7
  br label %227

218:                                              ; preds = %184
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %15, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %16, align 4
  br label %226

222:                                              ; preds = %216
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %15, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %16, align 4
  call void @_ZN2Pe9RsrcEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  br label %226

226:                                              ; preds = %222, %218
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #7
  br label %234

227:                                              ; preds = %217, %179
  store i32 0, ptr %11, align 4
  br label %228

228:                                              ; preds = %227, %155
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  %229 = load i32, ptr %11, align 4
  switch i32 %229, label %235 [
    i32 0, label %230
  ]

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %10, align 4, !tbaa !9
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %10, align 4, !tbaa !9
  br label %25, !llvm.loop !31

234:                                              ; preds = %226, %180, %135, %122, %89
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %241

235:                                              ; preds = %228, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %236 = load i32, ptr %11, align 4
  switch i32 %236, label %238 [
    i32 2, label %237
  ]

237:                                              ; preds = %235
  store i32 0, ptr %11, align 4
  br label %238

238:                                              ; preds = %237, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %239 = load i32, ptr %11, align 4
  switch i32 %239, label %246 [
    i32 0, label %240
    i32 1, label %240
  ]

240:                                              ; preds = %238, %238
  ret void

241:                                              ; preds = %234
  %242 = load ptr, ptr %15, align 8
  %243 = load i32, ptr %16, align 4
  %244 = insertvalue { ptr, i32 } poison, ptr %242, 0
  %245 = insertvalue { ptr, i32 } %244, i32 %243, 1
  resume { ptr, i32 } %245

246:                                              ; preds = %238
  unreachable
}

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

declare void @_Z10UTF16toMBSPKwmPcm(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #5

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

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

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

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

; 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)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2Pe9RsrcEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 nounwind willreturn memory(argmem: write) }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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, !13, i64 12}
!12 = !{!"_ZTSN2Pe22ImageResourceDirectoryE", !10, i64 0, !10, i64 4, !13, i64 8, !13, i64 10, !13, i64 12, !13, i64 14}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !13, i64 14}
!15 = !{!16, !6, i64 24}
!16 = !{!"_ZTS2Pe", !17, i64 0, !6, i64 24, !10, i64 32, !19, i64 40}
!17 = !{!"_ZTS6Format", !6, i64 8, !18, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIN2Pe9RsrcEntryESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN2Pe9RsrcEntryESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN2Pe9RsrcEntryESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN2Pe9RsrcEntryESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!13, !13, i64 0}
!24 = !{!7, !7, i64 0}
!25 = !{!16, !10, i64 32}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTSN2Pe9RsrcEntryE", !6, i64 0, !6, i64 8, !28, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !29, i64 0, !18, i64 8, !7, i64 16}
!29 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!30 = !{!27, !6, i64 8}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.Pe::RsrcEntry" = type { ptr, ptr, %"class.std::__cxx11::basic_string" }
%"struct.Pe::ImageResourceDirectoryEntry" = type { %union.anon.4, %union.anon.5 }
%union.anon.4 = type { %struct.anon }
%struct.anon = type { i32 }
%union.anon.5 = type { i32 }

@_ZN12_GLOBAL__N_114resource_typesB5cxx11E = external hidden global [25 x %"class.std::__cxx11::basic_string"], align 16
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.30 = external hidden unnamed_addr constant [26 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; 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 #3 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)) #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2Pe12TraverseRSRCEPNS_22ImageResourceDirectoryENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca [256 x i8], align 16
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"struct.Pe::RsrcEntry", align 8
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = getelementptr inbounds i8, ptr %1, i64 12
  %14 = getelementptr inbounds i8, ptr %1, i64 14
  %15 = load i16, ptr %13, align 1, !tbaa !5
  %16 = load i16, ptr %14, align 1, !tbaa !11
  %17 = or i16 %16, %15
  %.not56 = icmp eq i16 %17, 0
  br i1 %.not56, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = getelementptr inbounds i8, ptr %11, i64 8
  %21 = getelementptr inbounds i8, ptr %11, i64 16
  %22 = getelementptr inbounds i8, ptr %0, i64 40
  br label %23

23:                                               ; preds = %.lr.ph, %94
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %94 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %24 = getelementptr inbounds %"struct.Pe::ImageResourceDirectoryEntry", ptr %12, i64 %indvars.iv
  %25 = load i32, ptr %24, align 1
  %.not = icmp sgt i32 %25, -1
  br i1 %.not, label %43, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr %18, align 8, !tbaa !12
  %28 = and i32 %25, 2147483647
  %29 = zext nneg i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr %27, i64 %29
  %31 = load i16, ptr %30, align 2, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %6, i8 0, i64 256, i1 false)
  %32 = getelementptr inbounds i8, ptr %30, i64 2
  %33 = zext i16 %31 to i64
  %34 = shl nuw nsw i64 %33, 1
  invoke void @_Z10UTF16toMBSPKwmPcm(ptr noundef nonnull %32, i64 noundef %34, ptr noundef nonnull %6, i64 noundef 256)
          to label %35 unwind label %38

35:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull %6)
          to label %36 unwind label %40

36:                                               ; preds = %35
  %37 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #7
  br label %60

38:                                               ; preds = %26
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %35
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #7
  br label %101

43:                                               ; preds = %23
  %44 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.pre58 = load i32, ptr %24, align 1, !tbaa !22
  %45 = icmp ult i32 %.pre58, 25
  %or.cond = select i1 %44, i1 %45, i1 false
  br i1 %or.cond, label %46, label %54

46:                                               ; preds = %43
  %47 = zext nneg i32 %.pre58 to i64
  %48 = getelementptr inbounds [25 x %"class.std::__cxx11::basic_string"], ptr @_ZN12_GLOBAL__N_114resource_typesB5cxx11E, i64 0, i64 %47
  %49 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  %.pre = load i32, ptr %24, align 1, !tbaa !22
  br i1 %49, label %54, label %50

50:                                               ; preds = %46
  %51 = zext i32 %.pre to i64
  %52 = getelementptr inbounds [25 x %"class.std::__cxx11::basic_string"], ptr @_ZN12_GLOBAL__N_114resource_typesB5cxx11E, i64 0, i64 %51
  %53 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %52)
          to label %60 unwind label %.loopexit54

.loopexit54:                                      ; preds = %50, %71
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %101

.loopexit.split-lp:                               ; preds = %65, %67
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %101

54:                                               ; preds = %46, %43
  %55 = phi i32 [ %.pre, %46 ], [ %.pre58, %43 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, i32 noundef %55) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %56 unwind label %58

56:                                               ; preds = %54
  %57 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %60

58:                                               ; preds = %54
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %101

60:                                               ; preds = %56, %50, %36
  %61 = getelementptr inbounds i8, ptr %24, i64 4
  %62 = load i32, ptr %61, align 1
  %63 = and i32 %62, 2147483647
  %64 = load i32, ptr %19, align 8, !tbaa !23
  %.not53 = icmp ugt i32 %63, %64
  br i1 %.not53, label %65, label %69

65:                                               ; preds = %60
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.30)
          to label %67 unwind label %.loopexit.split-lp

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %93 unwind label %.loopexit.split-lp

69:                                               ; preds = %60
  %.not48 = icmp sgt i32 %62, -1
  %70 = load ptr, ptr %18, align 8, !tbaa !12
  br i1 %.not48, label %78, label %71

71:                                               ; preds = %69
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %5, i8 noundef signext 47)
          to label %72 unwind label %.loopexit54

72:                                               ; preds = %71
  %73 = zext nneg i32 %63 to i64
  %74 = getelementptr inbounds i8, ptr %70, i64 %73
  invoke void @_ZN2Pe12TraverseRSRCEPNS_22ImageResourceDirectoryENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %74, ptr noundef nonnull %10, i32 noundef %3)
          to label %75 unwind label %76

75:                                               ; preds = %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %94

76:                                               ; preds = %72
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %101

78:                                               ; preds = %69
  %79 = zext nneg i32 %62 to i64
  %80 = getelementptr inbounds i8, ptr %70, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !24
  %82 = sub i32 %81, %3
  store i32 %82, ptr %80, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #7
  %83 = load i32, ptr %61, align 1, !tbaa !22
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %70, i64 %84
  store ptr %85, ptr %11, align 8, !tbaa !25
  store ptr %24, ptr %20, align 8, !tbaa !29
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %86 unwind label %88

86:                                               ; preds = %78
  invoke void @_ZNSt6vectorIN2Pe9RsrcEntryESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(48) %11)
          to label %87 unwind label %90

87:                                               ; preds = %86
  call void @_ZN2Pe9RsrcEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #7
  br label %94

88:                                               ; preds = %78
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %86
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2Pe9RsrcEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  br label %92

92:                                               ; preds = %90, %88
  %.pn49 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #7
  br label %101

93:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %.loopexit

94:                                               ; preds = %75, %87
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %95 = load i16, ptr %13, align 1, !tbaa !5
  %96 = zext i16 %95 to i64
  %97 = load i16, ptr %14, align 1, !tbaa !11
  %98 = zext i16 %97 to i64
  %99 = add nuw nsw i64 %98, %96
  %100 = icmp ult i64 %indvars.iv.next, %99
  br i1 %100, label %23, label %.loopexit, !llvm.loop !30

101:                                              ; preds = %.loopexit54, %.loopexit.split-lp, %92, %76, %58, %42
  %.pn51 = phi { ptr, i32 } [ %77, %76 ], [ %.pn49, %92 ], [ %.pn, %42 ], [ %59, %58 ], [ %lpad.loopexit, %.loopexit54 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn51

.loopexit:                                        ; preds = %94, %4, %93
  ret void
}

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

declare void @_Z10UTF16toMBSPKwmPcm(ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2Pe9RsrcEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 nounwind willreturn memory(argmem: write) }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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, !10, i64 12}
!6 = !{!"_ZTSN2Pe22ImageResourceDirectoryE", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 10, !10, i64 12, !10, i64 14}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!6, !10, i64 14}
!12 = !{!13, !15, i64 24}
!13 = !{!"_ZTS2Pe", !14, i64 0, !15, i64 24, !7, i64 32, !17, i64 40}
!14 = !{!"_ZTS6Format", !15, i64 8, !16, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIN2Pe9RsrcEntryESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN2Pe9RsrcEntryESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN2Pe9RsrcEntryESaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN2Pe9RsrcEntryESaIS1_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!21 = !{!10, !10, i64 0}
!22 = !{!8, !8, i64 0}
!23 = !{!13, !7, i64 32}
!24 = !{!7, !7, i64 0}
!25 = !{!26, !15, i64 0}
!26 = !{!"_ZTSN2Pe9RsrcEntryE", !15, i64 0, !15, i64 8, !27, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !28, i64 0, !16, i64 8, !8, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !15, i64 0}
!29 = !{!26, !15, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass