; LLVM IR from thuhcsi/Crystal.TTVS :: TinyXML/tinyxml.ll (ZN13TiXmlDocument8LoadFileEPKc13TiXmlEncoding)

; 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.TiXmlString = type { ptr, i64, i64 }
%class.TiXmlBase = type { ptr, %struct.TiXmlCursor, ptr }
%struct.TiXmlCursor = type { i32, i32 }
%class.TiXmlNode = type { %class.TiXmlBase, ptr, i32, ptr, ptr, %class.TiXmlString, ptr, ptr }

@.str.17 = external hidden unnamed_addr constant [2 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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN11TiXmlStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #2

declare void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140), i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13TiXmlDocument8LoadFileEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef %1, i32 noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.TiXmlString, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [2048 x i8], align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8
  call void @_ZN9TiXmlNode5ClearEv(ptr noundef nonnull align 8 dereferenceable(96) %16)
  %17 = getelementptr inbounds %class.TiXmlBase, ptr %16, i32 0, i32 1
  call void @_ZN11TiXmlCursor5ClearEv(ptr noundef nonnull align 4 dereferenceable(8) %17)
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %class.TiXmlNode, ptr %16, i32 0, i32 5
  call void @_ZN11TiXmlStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %20 = getelementptr inbounds %class.TiXmlNode, ptr %16, i32 0, i32 5
  %21 = call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %22 = call noalias ptr @fopen(ptr noundef %21, ptr noundef @.str.17)
  store ptr %22, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %78

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !11
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = call i32 @fseek(ptr noundef %26, i64 noundef 0, i32 noundef 2)
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = call i64 @ftell(ptr noundef %28)
  store i64 %29, ptr %9, align 8, !tbaa !11
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = call i32 @fseek(ptr noundef %30, i64 noundef 0, i32 noundef 0)
  %32 = load i64, ptr %9, align 8, !tbaa !11
  %33 = icmp eq i64 %32, 0
  br i1 %33, label %34, label %37

34:                                               ; preds = %25
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call i32 @fclose(ptr noundef %35)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %77

37:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @_ZN11TiXmlStringC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %38 = load i64, ptr %9, align 8, !tbaa !11
  %39 = trunc i64 %38 to i32
  invoke void @_ZN11TiXmlString7reserveEj(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %39)
          to label %40 unwind label %51

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 2048, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 2048, ptr %15) #4
  br label %41

41:                                               ; preds = %50, %40
  %42 = getelementptr inbounds [2048 x i8], ptr %15, i64 0, i64 0
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = invoke ptr @fgets(ptr noundef %42, i32 noundef 2048, ptr noundef %43)
          to label %45 unwind label %55

45:                                               ; preds = %41
  %46 = icmp ne ptr %44, null
  br i1 %46, label %47, label %59

47:                                               ; preds = %45
  %48 = getelementptr inbounds [2048 x i8], ptr %15, i64 0, i64 0
  %49 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11TiXmlStringpLEPKc(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %48)
          to label %50 unwind label %55

50:                                               ; preds = %47
  br label %41, !llvm.loop !15

51:                                               ; preds = %37
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %12, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %13, align 4
  br label %76

55:                                               ; preds = %70, %64, %62, %59, %47, %41
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %12, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 2048, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %76

59:                                               ; preds = %45
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = invoke i32 @fclose(ptr noundef %60)
          to label %62 unwind label %55

62:                                               ; preds = %59
  %63 = invoke noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %64 unwind label %55

64:                                               ; preds = %62
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = load ptr, ptr %16, align 8, !tbaa !17
  %67 = getelementptr inbounds ptr, ptr %66, i64 3
  %68 = load ptr, ptr %67, align 8
  %69 = invoke noundef ptr %68(ptr noundef nonnull align 8 dereferenceable(140) %16, ptr noundef %63, ptr noundef null, i32 noundef %65)
          to label %70 unwind label %55

70:                                               ; preds = %64
  %71 = invoke noundef zeroext i1 @_ZNK13TiXmlDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(140) %16)
          to label %72 unwind label %55

72:                                               ; preds = %70
  br i1 %71, label %73, label %74

73:                                               ; preds = %72
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %75

74:                                               ; preds = %72
  store i1 true, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %75

75:                                               ; preds = %74, %73
  call void @llvm.lifetime.end.p0(i64 2048, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %77

76:                                               ; preds = %55, %51
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %81

77:                                               ; preds = %75, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %79

78:                                               ; preds = %3
  call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %16, i32 noundef 2, ptr noundef null, ptr noundef null, i32 noundef 0)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %79

79:                                               ; preds = %78, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %80 = load i1, ptr %4, align 1
  ret i1 %80

81:                                               ; preds = %76
  %82 = load ptr, ptr %12, align 8
  %83 = load i32, ptr %13, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

declare i64 @ftell(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

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

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK13TiXmlDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(140)) #1 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 = { "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 = { 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 = !{!"_ZTS13TiXmlEncoding", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}


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

%class.TiXmlString = type { ptr, i64, i64 }

@.str.17 = external hidden unnamed_addr constant [2 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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN11TiXmlStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #2

declare void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140), i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13TiXmlDocument8LoadFileEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.TiXmlString, align 8
  %5 = alloca [2048 x i8], align 16
  tail call void @_ZN9TiXmlNode5ClearEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN11TiXmlCursor5ClearEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZN11TiXmlStringaSEPKc(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %1)
  %8 = tail call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %9 = tail call noalias ptr @fopen(ptr noundef %8, ptr noundef nonnull @.str.17)
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %37, label %10

10:                                               ; preds = %3
  %11 = tail call i32 @fseek(ptr noundef nonnull %9, i64 noundef 0, i32 noundef 2)
  %12 = tail call i64 @ftell(ptr noundef nonnull %9)
  %13 = tail call i32 @fseek(ptr noundef nonnull %9, i64 noundef 0, i32 noundef 0)
  %14 = icmp eq i64 %12, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %10
  %16 = tail call i32 @fclose(ptr noundef nonnull %9)
  br label %38

17:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN11TiXmlStringC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %18 = trunc i64 %12 to i32
  invoke void @_ZN11TiXmlString7reserveEj(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %18)
          to label %19 unwind label %24

19:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %5) #5
  br label %20

20:                                               ; preds = %22, %19
  %21 = call ptr @fgets(ptr noundef nonnull %5, i32 noundef 2048, ptr noundef nonnull %9)
  %.not18 = icmp eq ptr %21, null
  br i1 %.not18, label %27, label %22

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11TiXmlStringpLEPKc(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %5)
          to label %20 unwind label %.loopexit, !llvm.loop !5

24:                                               ; preds = %17
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %36

.loopexit:                                        ; preds = %22
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %26

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

26:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %5) #5
  br label %36

27:                                               ; preds = %20
  %28 = call i32 @fclose(ptr noundef nonnull %9)
  %29 = call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %30 = load ptr, ptr %0, align 8, !tbaa !7
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  %32 = load ptr, ptr %31, align 8
  %33 = invoke noundef ptr %32(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef %29, ptr noundef null, i32 noundef %2)
          to label %34 unwind label %.loopexit.split-lp

34:                                               ; preds = %27
  %35 = call noundef zeroext i1 @_ZNK13TiXmlDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(140) %0)
  %.0 = xor i1 %35, true
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %5) #5
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %38

36:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %lpad.phi, %26 ], [ %25, %24 ]
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn

37:                                               ; preds = %3
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %0, i32 noundef 2, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %38

38:                                               ; preds = %15, %34, %37
  %.2 = phi i1 [ false, %37 ], [ false, %15 ], [ %.0, %34 ]
  ret i1 %.2
}

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i64 @ftell(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK13TiXmlDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #1 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 = { "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"vtable pointer", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass