; LLVM IR from SSBMTonberry/pocketlzma :: ref_spec/lzma1900/CPP/7zip/UI/Common/LoadCodecs.ll (ZN7CCodecs4LoadEv)

; 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.CArcInfoEx = type { i32, ptr, ptr, %class.UString, %class.CObjectVector, ptr, i8, i8, i32, %class.CObjectVector.0 }
%class.UString = type { ptr, i32, i32 }
%class.CObjectVector = type { %class.CRecordVector }
%class.CRecordVector = type { ptr, i32, i32 }
%class.CObjectVector.0 = type { %class.CRecordVector }
%class.CCodecs = type <{ %struct.IUnknown, %class.CMyUnknownImp, [4 x i8], %class.CObjectVector.2, i8, i8, [6 x i8] }>
%struct.IUnknown = type { ptr }
%class.CMyUnknownImp = type { i32 }
%class.CObjectVector.2 = type { %class.CRecordVector }
%struct.CArcInfo = type { i16, i8, i8, i16, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@_ZL9g_NumArcs = external hidden global i32, align 4
@_ZL6g_Arcs = external hidden global [64 x ptr], align 16

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

; 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
declare dso_local void @_ZN10CArcInfoEx7AddExtsERK7UStringS2_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7CCodecs4LoadEv(ptr noundef nonnull align 8 dereferenceable(34) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %struct.CArcInfoEx, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.UString, align 8
  %9 = alloca %class.UString, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = getelementptr inbounds %class.CCodecs, ptr %10, i32 0, i32 3
  call void @_ZN13CObjectVectorI10CArcInfoExE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %130, %1
  %13 = load i32, ptr %3, align 4, !tbaa !9
  %14 = load i32, ptr @_ZL9g_NumArcs, align 4, !tbaa !9
  %15 = icmp ult i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %134

17:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = getelementptr inbounds [64 x ptr], ptr @_ZL6g_Arcs, i64 0, i64 %19
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %21, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr %5) #5
  call void @_ZN10CArcInfoExC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5)
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.CArcInfo, ptr %22, i32 0, i32 5
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 3
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef %24)
          to label %27 unwind label %53

27:                                               ; preds = %17
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.CArcInfo, ptr %28, i32 0, i32 8
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 1
  store ptr %30, ptr %31, align 8, !tbaa !15
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.CArcInfo, ptr %32, i32 0, i32 10
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %35 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 2
  store ptr %34, ptr %35, align 8, !tbaa !23
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.CArcInfo, ptr %36, i32 0, i32 0
  %38 = load i16, ptr %37, align 8, !tbaa !24
  %39 = zext i16 %38 to i32
  %40 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 0
  store i32 %39, ptr %40, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  invoke void @_ZN7UStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %41 unwind label %57

41:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  invoke void @_ZN7UStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %42 unwind label %61

42:                                               ; preds = %41
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.CArcInfo, ptr %43, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !26
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %69

47:                                               ; preds = %42
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.CArcInfo, ptr %48, i32 0, i32 6
  %50 = load ptr, ptr %49, align 8, !tbaa !26
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %50)
          to label %52 unwind label %65

52:                                               ; preds = %47
  br label %69

53:                                               ; preds = %126, %117, %114, %101, %81, %17
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  br label %133

57:                                               ; preds = %27
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %6, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %7, align 4
  br label %113

61:                                               ; preds = %41
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  br label %112

65:                                               ; preds = %80, %74, %47
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %6, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %7, align 4
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br label %112

69:                                               ; preds = %52, %42
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.CArcInfo, ptr %70, i32 0, i32 7
  %72 = load ptr, ptr %71, align 8, !tbaa !27
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %80

74:                                               ; preds = %69
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.CArcInfo, ptr %75, i32 0, i32 7
  %77 = load ptr, ptr %76, align 8, !tbaa !27
  %78 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %77)
          to label %79 unwind label %65

79:                                               ; preds = %74
  br label %80

80:                                               ; preds = %79, %69
  invoke void @_ZN10CArcInfoEx7AddExtsERK7UStringS2_(ptr noundef nonnull align 8 dereferenceable(88) %5, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %81 unwind label %65

81:                                               ; preds = %80
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.CArcInfo, ptr %82, i32 0, i32 9
  %84 = load ptr, ptr %83, align 8, !tbaa !28
  %85 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 5
  store ptr %84, ptr %85, align 8, !tbaa !29
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.CArcInfo, ptr %86, i32 0, i32 9
  %88 = load ptr, ptr %87, align 8, !tbaa !28
  %89 = icmp ne ptr %88, null
  %90 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 6
  %91 = zext i1 %89 to i8
  store i8 %91, ptr %90, align 8, !tbaa !30
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.CArcInfo, ptr %92, i32 0, i32 3
  %94 = load i16, ptr %93, align 4, !tbaa !31
  %95 = zext i16 %94 to i32
  %96 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 8
  store i32 %95, ptr %96, align 4, !tbaa !32
  %97 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 7
  store i8 1, ptr %97, align 1, !tbaa !33
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = invoke noundef zeroext i1 @_ZNK8CArcInfo16IsMultiSignatureEv(ptr noundef nonnull align 8 dereferenceable(64) %98)
          to label %100 unwind label %53

100:                                              ; preds = %81
  br i1 %99, label %101, label %114

101:                                              ; preds = %100
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CArcInfo, ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !34
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.CArcInfo, ptr %105, i32 0, i32 2
  %107 = load i8, ptr %106, align 1, !tbaa !35
  %108 = zext i8 %107 to i32
  %109 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 9
  %110 = invoke noundef zeroext i1 @_ZL15ParseSignaturesPKhjR13CObjectVectorI7CBufferIhEE(ptr noundef %104, i32 noundef %108, ptr noundef nonnull align 8 dereferenceable(16) %109)
          to label %111 unwind label %53

111:                                              ; preds = %101
  br label %126

112:                                              ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %113

113:                                              ; preds = %112, %57
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %133

114:                                              ; preds = %100
  %115 = getelementptr inbounds %struct.CArcInfoEx, ptr %5, i32 0, i32 9
  %116 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN13CObjectVectorI7CBufferIhEE6AddNewEv(ptr noundef nonnull align 8 dereferenceable(16) %115)
          to label %117 unwind label %53

117:                                              ; preds = %114
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.CArcInfo, ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !34
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.CArcInfo, ptr %121, i32 0, i32 2
  %123 = load i8, ptr %122, align 1, !tbaa !35
  %124 = zext i8 %123 to i64
  invoke void @_ZN7CBufferIhE8CopyFromEPKhm(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef %120, i64 noundef %124)
          to label %125 unwind label %53

125:                                              ; preds = %117
  br label %126

126:                                              ; preds = %125, %111
  %127 = getelementptr inbounds %class.CCodecs, ptr %10, i32 0, i32 3
  %128 = invoke noundef i32 @_ZN13CObjectVectorI10CArcInfoExE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef nonnull align 8 dereferenceable(88) %5)
          to label %129 unwind label %53

129:                                              ; preds = %126
  call void @_ZN10CArcInfoExD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #5
  call void @llvm.lifetime.end.p0(i64 88, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %3, align 4, !tbaa !9
  %132 = add i32 %131, 1
  store i32 %132, ptr %3, align 4, !tbaa !9
  br label %12, !llvm.loop !36

133:                                              ; preds = %113, %53
  call void @_ZN10CArcInfoExD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #5
  call void @llvm.lifetime.end.p0(i64 88, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %135

134:                                              ; preds = %16
  ret i32 0

135:                                              ; preds = %133
  %136 = load ptr, ptr %6, align 8
  %137 = load i32, ptr %7, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13CObjectVectorI10CArcInfoExE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #3

declare void @_ZN7UStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15ParseSignaturesPKhjR13CObjectVectorI7CBufferIhEE(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN13CObjectVectorI7CBufferIhEE6AddNewEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN13CObjectVectorI10CArcInfoExE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10CArcInfoExD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #4 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 = { 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 = { 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, !6, i64 16}
!12 = !{!"_ZTS8CArcInfo", !13, i64 0, !7, i64 2, !7, i64 3, !13, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !6, i64 40}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTS10CArcInfoEx", !10, i64 0, !6, i64 8, !6, i64 16, !17, i64 24, !18, i64 40, !6, i64 56, !20, i64 64, !20, i64 65, !10, i64 68, !21, i64 72}
!17 = !{!"_ZTS7UString", !6, i64 0, !10, i64 8, !10, i64 12}
!18 = !{!"_ZTS13CObjectVectorI11CArcExtInfoE", !19, i64 0}
!19 = !{!"_ZTS13CRecordVectorIPvE", !6, i64 0, !10, i64 8, !10, i64 12}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS13CObjectVectorI7CBufferIhEE", !19, i64 0}
!22 = !{!12, !6, i64 56}
!23 = !{!16, !6, i64 16}
!24 = !{!12, !13, i64 0}
!25 = !{!16, !10, i64 0}
!26 = !{!12, !6, i64 24}
!27 = !{!12, !6, i64 32}
!28 = !{!12, !6, i64 48}
!29 = !{!16, !6, i64 56}
!30 = !{!16, !20, i64 64}
!31 = !{!12, !13, i64 4}
!32 = !{!16, !10, i64 68}
!33 = !{!16, !20, i64 65}
!34 = !{!12, !6, i64 8}
!35 = !{!12, !7, i64 3}
!36 = distinct !{!36, !37}
!37 = !{!"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"

%struct.CArcInfoEx = type { i32, ptr, ptr, %class.UString, %class.CObjectVector, ptr, i8, i8, i32, %class.CObjectVector.0 }
%class.UString = type { ptr, i32, i32 }
%class.CObjectVector = type { %class.CRecordVector }
%class.CRecordVector = type { ptr, i32, i32 }
%class.CObjectVector.0 = type { %class.CRecordVector }

@_ZL9g_NumArcs = external hidden local_unnamed_addr global i32, align 4
@_ZL6g_Arcs = external hidden local_unnamed_addr global [64 x ptr], align 16

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10CArcInfoEx7AddExtsERK7UStringS2_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7CCodecs4LoadEv(ptr noundef nonnull align 8 dereferenceable(34) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.CArcInfoEx, align 8
  %3 = alloca %class.UString, align 8
  %4 = alloca %class.UString, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN13CObjectVectorI10CArcInfoExE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %6 = load i32, ptr @_ZL9g_NumArcs, align 4, !tbaa !5
  %.not33 = icmp eq i32 %6, 0
  br i1 %.not33, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %7 = getelementptr inbounds i8, ptr %2, i64 24
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  %9 = getelementptr inbounds i8, ptr %2, i64 16
  %10 = getelementptr inbounds i8, ptr %2, i64 56
  %11 = getelementptr inbounds i8, ptr %2, i64 64
  %12 = getelementptr inbounds i8, ptr %2, i64 68
  %13 = getelementptr inbounds i8, ptr %2, i64 65
  %14 = getelementptr inbounds i8, ptr %2, i64 72
  br label %15

._crit_edge:                                      ; preds = %76, %1
  ret i32 0

15:                                               ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %16 = getelementptr inbounds [64 x ptr], ptr @_ZL6g_Arcs, i64 0, i64 %indvars.iv
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %2) #5
  call void @_ZN10CArcInfoExC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2)
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef %19)
          to label %21 unwind label %34

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %17, i64 40
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  store ptr %23, ptr %8, align 8, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %17, i64 56
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  store ptr %25, ptr %9, align 8, !tbaa !23
  %26 = load i16, ptr %17, align 8, !tbaa !24
  %27 = zext i16 %26 to i32
  store i32 %27, ptr %2, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  invoke void @_ZN7UStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %28 unwind label %36

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  invoke void @_ZN7UStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %29 unwind label %38

29:                                               ; preds = %28
  %30 = getelementptr inbounds i8, ptr %17, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !26
  %.not = icmp eq ptr %31, null
  br i1 %.not, label %42, label %32

32:                                               ; preds = %29
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %31)
          to label %42 unwind label %40

34:                                               ; preds = %74, %68, %66, %57, %15
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %80

36:                                               ; preds = %21
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %65

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

40:                                               ; preds = %47, %45, %32
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %64

42:                                               ; preds = %32, %29
  %43 = getelementptr inbounds i8, ptr %17, i64 32
  %44 = load ptr, ptr %43, align 8, !tbaa !27
  %.not27 = icmp eq ptr %44, null
  br i1 %.not27, label %47, label %45

45:                                               ; preds = %42
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull %44)
          to label %47 unwind label %40

47:                                               ; preds = %45, %42
  invoke void @_ZN10CArcInfoEx7AddExtsERK7UStringS2_(ptr noundef nonnull align 8 dereferenceable(88) %2, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %48 unwind label %40

48:                                               ; preds = %47
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %49 = getelementptr inbounds i8, ptr %17, i64 48
  %50 = load ptr, ptr %49, align 8, !tbaa !28
  store ptr %50, ptr %10, align 8, !tbaa !29
  %51 = icmp ne ptr %50, null
  %52 = zext i1 %51 to i8
  store i8 %52, ptr %11, align 8, !tbaa !30
  %53 = getelementptr inbounds i8, ptr %17, i64 4
  %54 = load i16, ptr %53, align 4, !tbaa !31
  %55 = zext i16 %54 to i32
  store i32 %55, ptr %12, align 4, !tbaa !32
  store i8 1, ptr %13, align 1, !tbaa !33
  %56 = call noundef zeroext i1 @_ZNK8CArcInfo16IsMultiSignatureEv(ptr noundef nonnull align 8 dereferenceable(64) %17)
  br i1 %56, label %57, label %66

57:                                               ; preds = %48
  %58 = getelementptr inbounds i8, ptr %17, i64 8
  %59 = load ptr, ptr %58, align 8, !tbaa !34
  %60 = getelementptr inbounds i8, ptr %17, i64 3
  %61 = load i8, ptr %60, align 1, !tbaa !35
  %62 = zext i8 %61 to i32
  %63 = invoke noundef zeroext i1 @_ZL15ParseSignaturesPKhjR13CObjectVectorI7CBufferIhEE(ptr noundef %59, i32 noundef %62, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %74 unwind label %34

64:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @_ZN7UStringD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  br label %65

65:                                               ; preds = %64, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %64 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  br label %80

66:                                               ; preds = %48
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN13CObjectVectorI7CBufferIhEE6AddNewEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %68 unwind label %34

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %17, i64 8
  %70 = load ptr, ptr %69, align 8, !tbaa !34
  %71 = getelementptr inbounds i8, ptr %17, i64 3
  %72 = load i8, ptr %71, align 1, !tbaa !35
  %73 = zext i8 %72 to i64
  invoke void @_ZN7CBufferIhE8CopyFromEPKhm(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef %70, i64 noundef %73)
          to label %74 unwind label %34

74:                                               ; preds = %68, %57
  %75 = invoke noundef i32 @_ZN13CObjectVectorI10CArcInfoExE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(88) %2)
          to label %76 unwind label %34

76:                                               ; preds = %74
  call void @_ZN10CArcInfoExD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2) #5
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %77 = load i32, ptr @_ZL9g_NumArcs, align 4, !tbaa !5
  %78 = zext i32 %77 to i64
  %79 = icmp ult i64 %indvars.iv.next, %78
  br i1 %79, label %15, label %._crit_edge, !llvm.loop !36

80:                                               ; preds = %65, %34
  %.pn30 = phi { ptr, i32 } [ %35, %34 ], [ %.pn.pn, %65 ]
  call void @_ZN10CArcInfoExD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2) #5
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn30
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13CObjectVectorI10CArcInfoExE5ClearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN7UStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #3

declare void @_ZN7UStringC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15ParseSignaturesPKhjR13CObjectVectorI7CBufferIhEE(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN13CObjectVectorI10CArcInfoExE3AddERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10CArcInfoExD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #4 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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTS8CArcInfo", !13, i64 0, !7, i64 2, !7, i64 3, !13, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !10, i64 40}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTS10CArcInfoEx", !6, i64 0, !10, i64 8, !10, i64 16, !17, i64 24, !18, i64 40, !10, i64 56, !20, i64 64, !20, i64 65, !6, i64 68, !21, i64 72}
!17 = !{!"_ZTS7UString", !10, i64 0, !6, i64 8, !6, i64 12}
!18 = !{!"_ZTS13CObjectVectorI11CArcExtInfoE", !19, i64 0}
!19 = !{!"_ZTS13CRecordVectorIPvE", !10, i64 0, !6, i64 8, !6, i64 12}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS13CObjectVectorI7CBufferIhEE", !19, i64 0}
!22 = !{!12, !10, i64 56}
!23 = !{!16, !10, i64 16}
!24 = !{!12, !13, i64 0}
!25 = !{!16, !6, i64 0}
!26 = !{!12, !10, i64 24}
!27 = !{!12, !10, i64 32}
!28 = !{!12, !10, i64 48}
!29 = !{!16, !10, i64 56}
!30 = !{!16, !20, i64 64}
!31 = !{!12, !13, i64 4}
!32 = !{!16, !6, i64 68}
!33 = !{!16, !20, i64 65}
!34 = !{!12, !10, i64 8}
!35 = !{!12, !7, i64 3}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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