; LLVM IR from microsoft/Multiverso :: Applications/WordEmbedding/src/reader.ll (ZN13wordembedding6Reader11GetSentenceEPiRl)

; 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::allocator.2" = type { i8 }
%"class.wordembedding::Reader" = type { ptr, ptr, [501 x i8], ptr, ptr, i64, i64, %"class.std::unordered_set" }
%"class.std::unordered_set" = 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 }
%"struct.wordembedding::Option" = type <{ ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, [2 x i8], float, [4 x i8], i64, i32, i32, i32, i32, i32, i32, i64, i64, float, [4 x i8] }>
%"struct.wordembedding::WordInfo" = type { %"class.std::__cxx11::basic_string", i64 }

; 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: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13wordembedding6Reader8ReadWordEPcP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(608), ptr noundef, ptr noundef) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13wordembedding6Reader11GetSentenceEPiRl(ptr noundef nonnull align 8 dereferenceable(608) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca i1, align 1
  %11 = alloca %"class.std::allocator.2", align 1
  %12 = alloca i1, align 1
  %13 = alloca i1, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  store i64 0, ptr %18, align 8, !tbaa !11
  br label %19

19:                                               ; preds = %124, %113, %67, %35, %3
  br label %20

20:                                               ; preds = %19
  %21 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 2
  %22 = getelementptr inbounds [501 x i8], ptr %21, i64 0, i64 0
  %23 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = call noundef zeroext i1 @_ZN13wordembedding6Reader8ReadWordEPcP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(608) %17, ptr noundef %22, ptr noundef %24)
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  br label %125

27:                                               ; preds = %20
  %28 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !20
  %30 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 2
  %31 = getelementptr inbounds [501 x i8], ptr %30, i64 0, i64 0
  %32 = call noundef i32 @_ZN13wordembedding10Dictionary10GetWordIdxEPKc(ptr noundef nonnull align 8 dereferenceable(152) %29, ptr noundef %31)
  store i32 %32, ptr %8, align 4, !tbaa !9
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = icmp eq i32 %33, -1
  br i1 %34, label %35, label %36

35:                                               ; preds = %27
  br label %19, !llvm.loop !21

36:                                               ; preds = %27
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %37, align 8, !tbaa !11
  %40 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !23
  %42 = getelementptr inbounds %"struct.wordembedding::Option", ptr %41, i32 0, i32 8
  %43 = load i8, ptr %42, align 1, !tbaa !24, !range !27, !noundef !28
  %44 = trunc i8 %43 to i1
  store i1 false, ptr %10, align 1
  store i1 false, ptr %12, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %16, align 1
  br i1 %44, label %45, label %53

45:                                               ; preds = %36
  %46 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  store i1 true, ptr %10, align 1
  %47 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 2
  %48 = getelementptr inbounds [501 x i8], ptr %47, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  store i1 true, ptr %12, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  store i1 true, ptr %13, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %48, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %49 unwind label %68

49:                                               ; preds = %45
  store i1 true, ptr %16, align 1
  %50 = invoke noundef i64 @_ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %51 unwind label %72

51:                                               ; preds = %49
  %52 = icmp ne i64 %50, 0
  br label %53

53:                                               ; preds = %51, %36
  %54 = phi i1 [ false, %36 ], [ %52, %51 ]
  %55 = load i1, ptr %16, align 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %57

57:                                               ; preds = %56, %53
  %58 = load i1, ptr %13, align 1
  br i1 %58, label %59, label %60

59:                                               ; preds = %57
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  br label %60

60:                                               ; preds = %59, %57
  %61 = load i1, ptr %12, align 1
  br i1 %61, label %62, label %63

62:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  br label %63

63:                                               ; preds = %62, %60
  %64 = load i1, ptr %10, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  br label %66

66:                                               ; preds = %65, %63
  br i1 %54, label %67, label %89

67:                                               ; preds = %66
  br label %19, !llvm.loop !21

68:                                               ; preds = %45
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %14, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %15, align 4
  br label %79

72:                                               ; preds = %49
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %14, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %15, align 4
  %76 = load i1, ptr %16, align 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %78

78:                                               ; preds = %77, %72
  br label %79

79:                                               ; preds = %78, %68
  %80 = load i1, ptr %13, align 1
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  br label %82

82:                                               ; preds = %81, %79
  %83 = load i1, ptr %12, align 1
  br i1 %83, label %84, label %85

84:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  br label %85

85:                                               ; preds = %84, %82
  %86 = load i1, ptr %10, align 1
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  br label %88

88:                                               ; preds = %87, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %127

89:                                               ; preds = %66
  %90 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !23
  %92 = getelementptr inbounds %"struct.wordembedding::Option", ptr %91, i32 0, i32 12
  %93 = load float, ptr %92, align 8, !tbaa !29
  %94 = fcmp ogt float %93, 0.000000e+00
  br i1 %94, label %95, label %114

95:                                               ; preds = %89
  %96 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !30
  %98 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !20
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = call noundef ptr @_ZN13wordembedding10Dictionary11GetWordInfoEi(ptr noundef nonnull align 8 dereferenceable(152) %99, i32 noundef %100)
  %102 = getelementptr inbounds %"struct.wordembedding::WordInfo", ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !31
  %104 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !23
  %106 = getelementptr inbounds %"struct.wordembedding::Option", ptr %105, i32 0, i32 21
  %107 = load i64, ptr %106, align 8, !tbaa !35
  %108 = getelementptr inbounds %"class.wordembedding::Reader", ptr %17, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !23
  %110 = getelementptr inbounds %"struct.wordembedding::Option", ptr %109, i32 0, i32 12
  %111 = load float, ptr %110, align 8, !tbaa !29
  %112 = call noundef zeroext i1 @_ZN13wordembedding7Sampler12WordSamplingEllf(ptr noundef nonnull align 8 dereferenceable(8) %97, i64 noundef %103, i64 noundef %107, float noundef %111)
  br i1 %112, label %114, label %113

113:                                              ; preds = %95
  br label %19, !llvm.loop !21

114:                                              ; preds = %95, %89
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %7, align 4, !tbaa !9
  %119 = sext i32 %117 to i64
  %120 = getelementptr inbounds i32, ptr %116, i64 %119
  store i32 %115, ptr %120, align 4, !tbaa !9
  %121 = load i32, ptr %7, align 4, !tbaa !9
  %122 = icmp sge i32 %121, 1000
  br i1 %122, label %123, label %124

123:                                              ; preds = %114
  br label %125

124:                                              ; preds = %114
  br label %19, !llvm.loop !21

125:                                              ; preds = %123, %26
  %126 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i32 %126

127:                                              ; preds = %88
  %128 = load ptr, ptr %14, align 8
  %129 = load i32, ptr %15, align 4
  %130 = insertvalue { ptr, i32 } poison, ptr %128, 0
  %131 = insertvalue { ptr, i32 } %130, i32 %129, 1
  resume { ptr, i32 } %131
}

declare noundef i32 @_ZN13wordembedding10Dictionary10GetWordIdxEPKc(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

declare noundef zeroext i1 @_ZN13wordembedding7Sampler12WordSamplingEllf(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef, float noundef) #3

declare noundef ptr @_ZN13wordembedding10Dictionary11GetWordInfoEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN13wordembedding6ReaderE", !6, i64 0, !6, i64 8, !7, i64 16, !6, i64 520, !6, i64 528, !12, i64 536, !12, i64 544, !15, i64 552}
!15 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !12, i64 8, !17, i64 16, !12, i64 24, !18, i64 32, !6, i64 48}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !12, i64 8}
!19 = !{!"float", !7, i64 0}
!20 = !{!14, !6, i64 520}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!14, !6, i64 0}
!24 = !{!25, !26, i64 43}
!25 = !{!"_ZTSN13wordembedding6OptionE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !26, i64 40, !26, i64 41, !26, i64 42, !26, i64 43, !26, i64 44, !26, i64 45, !19, i64 48, !12, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !12, i64 88, !12, i64 96, !19, i64 104}
!26 = !{!"bool", !7, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!25, !19, i64 48}
!30 = !{!14, !6, i64 528}
!31 = !{!32, !12, i64 32}
!32 = !{!"_ZTSN13wordembedding8WordInfoE", !33, i64 0, !12, i64 32}
!33 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !34, i64 0, !12, i64 8, !7, i64 16}
!34 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!35 = !{!25, !12, i64 88}


; 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::allocator.2" = type { i8 }

; 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 uwtable
declare dso_local noundef zeroext i1 @_ZN13wordembedding6Reader8ReadWordEPcP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(608), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13wordembedding6Reader11GetSentenceEPiRl(ptr noundef nonnull align 8 dereferenceable(608) %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  store i64 0, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = getelementptr inbounds i8, ptr %0, i64 520
  %9 = getelementptr inbounds i8, ptr %0, i64 552
  %10 = getelementptr inbounds i8, ptr %0, i64 528
  br label %.outer

.outer:                                           ; preds = %49, %3
  %indvars.iv = phi i64 [ %indvars.iv.next, %49 ], [ 0, %3 ]
  %11 = load ptr, ptr %7, align 8, !tbaa !9
  %12 = call noundef zeroext i1 @_ZN13wordembedding6Reader8ReadWordEPcP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(608) %0, ptr noundef nonnull %6, ptr noundef %11)
  br i1 %12, label %.lr.ph, label %.loopexit.loopexit46.split.loop.exit

.lr.ph:                                           ; preds = %.outer, %.backedge
  %13 = load ptr, ptr %8, align 8, !tbaa !17
  %14 = call noundef i32 @_ZN13wordembedding10Dictionary10GetWordIdxEPKc(ptr noundef nonnull align 8 dereferenceable(152) %13, ptr noundef nonnull %6)
  %15 = icmp eq i32 %14, -1
  br i1 %15, label %.backedge, label %18

.backedge:                                        ; preds = %.lr.ph, %.critedge30, %37
  %16 = load ptr, ptr %7, align 8, !tbaa !9
  %17 = call noundef zeroext i1 @_ZN13wordembedding6Reader8ReadWordEPcP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(608) %0, ptr noundef nonnull %6, ptr noundef %16)
  br i1 %17, label %.lr.ph, label %.loopexit.loopexit, !llvm.loop !18

18:                                               ; preds = %.lr.ph
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %20 = add nsw i64 %19, 1
  store i64 %20, ptr %2, align 8, !tbaa !5
  %21 = load ptr, ptr %0, align 8, !tbaa !20
  %22 = getelementptr inbounds i8, ptr %21, i64 43
  %23 = load i8, ptr %22, align 1, !tbaa !21, !range !25, !noundef !26
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %25, label %.critedge30.thread

25:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull %6, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %26 unwind label %28

26:                                               ; preds = %25
  %27 = invoke noundef i64 @_ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %.critedge30 unwind label %30

.critedge30:                                      ; preds = %26
  %.not = icmp eq i64 %27, 0
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br i1 %.not, label %.critedge30..critedge30.thread_crit_edge, label %.backedge

.critedge30..critedge30.thread_crit_edge:         ; preds = %.critedge30
  %.pre = load ptr, ptr %0, align 8, !tbaa !20
  br label %.critedge30.thread

28:                                               ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %32

32:                                               ; preds = %28, %30
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn

.critedge30.thread:                               ; preds = %.critedge30..critedge30.thread_crit_edge, %18
  %33 = phi ptr [ %.pre, %.critedge30..critedge30.thread_crit_edge ], [ %21, %18 ]
  %34 = getelementptr inbounds i8, ptr %33, i64 48
  %35 = load float, ptr %34, align 8, !tbaa !27
  %36 = fcmp ogt float %35, 0.000000e+00
  br i1 %36, label %37, label %49

37:                                               ; preds = %.critedge30.thread
  %38 = load ptr, ptr %10, align 8, !tbaa !28
  %39 = load ptr, ptr %8, align 8, !tbaa !17
  %40 = call noundef ptr @_ZN13wordembedding10Dictionary11GetWordInfoEi(ptr noundef nonnull align 8 dereferenceable(152) %39, i32 noundef %14)
  %41 = getelementptr inbounds i8, ptr %40, i64 32
  %42 = load i64, ptr %41, align 8, !tbaa !29
  %43 = load ptr, ptr %0, align 8, !tbaa !20
  %44 = getelementptr inbounds i8, ptr %43, i64 88
  %45 = load i64, ptr %44, align 8, !tbaa !33
  %46 = getelementptr inbounds i8, ptr %43, i64 48
  %47 = load float, ptr %46, align 8, !tbaa !27
  %48 = call noundef zeroext i1 @_ZN13wordembedding7Sampler12WordSamplingEllf(ptr noundef nonnull align 8 dereferenceable(8) %38, i64 noundef %42, i64 noundef %45, float noundef %47)
  br i1 %48, label %49, label %.backedge

49:                                               ; preds = %37, %.critedge30.thread
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  store i32 %14, ptr %50, align 4, !tbaa !34
  %exitcond = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond, label %.loopexit, label %.outer, !llvm.loop !18

.loopexit.loopexit:                               ; preds = %.backedge
  %51 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.loopexit

.loopexit.loopexit46.split.loop.exit:             ; preds = %.outer
  %52 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.loopexit

.loopexit:                                        ; preds = %49, %.loopexit.loopexit46.split.loop.exit, %.loopexit.loopexit
  %.1 = phi i32 [ %51, %.loopexit.loopexit ], [ %52, %.loopexit.loopexit46.split.loop.exit ], [ 1000, %49 ]
  ret i32 %.1
}

declare noundef i32 @_ZN13wordembedding10Dictionary10GetWordIdxEPKc(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN13wordembedding7Sampler12WordSamplingEllf(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef, float noundef) local_unnamed_addr #3

declare noundef ptr @_ZN13wordembedding10Dictionary11GetWordInfoEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN13wordembedding6ReaderE", !11, i64 0, !11, i64 8, !7, i64 16, !11, i64 520, !11, i64 528, !6, i64 536, !6, i64 544, !12, i64 552}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !13, i64 0}
!13 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !11, i64 0, !6, i64 8, !14, i64 16, !6, i64 24, !15, i64 32, !11, i64 48}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !11, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !6, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = !{!10, !11, i64 520}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !11, i64 0}
!21 = !{!22, !23, i64 43}
!22 = !{!"_ZTSN13wordembedding6OptionE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !23, i64 40, !23, i64 41, !23, i64 42, !23, i64 43, !23, i64 44, !23, i64 45, !16, i64 48, !6, i64 56, !24, i64 64, !24, i64 68, !24, i64 72, !24, i64 76, !24, i64 80, !24, i64 84, !6, i64 88, !6, i64 96, !16, i64 104}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"int", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!22, !16, i64 48}
!28 = !{!10, !11, i64 528}
!29 = !{!30, !6, i64 32}
!30 = !{!"_ZTSN13wordembedding8WordInfoE", !31, i64 0, !6, i64 32}
!31 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !32, i64 0, !6, i64 8, !7, i64 16}
!32 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!33 = !{!22, !6, i64 88}
!34 = !{!24, !24, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass