; LLVM IR from simbody/simbody :: SimTKcommon/src (tinyxmlparser)

; 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.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"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] }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZN5SimTK9TiXmlBase18condenseWhiteSpaceE = external global 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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 noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef, i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext) #3 align 2

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef, ptr noundef, i1 noundef zeroext, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK9TiXmlBase8ReadTextEPKcPNS_6StringEbS2_bNS_13TiXmlEncodingE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i32 noundef %5) #2 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca %"class.SimTK::String", align 8
  %14 = alloca i32, align 4
  %15 = alloca [4 x i8], align 1
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca [4 x i8], align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  %19 = zext i1 %2 to i8
  store i8 %19, ptr %9, align 1, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  %20 = zext i1 %4 to i8
  store i8 %20, ptr %11, align 1, !tbaa !9
  store i32 %5, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.11)
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  %23 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %28

25:                                               ; preds = %6
  %26 = load i8, ptr @_ZN5SimTK9TiXmlBase18condenseWhiteSpaceE, align 1, !tbaa !9, !range !13, !noundef !14
  %27 = trunc i8 %26 to i1
  br i1 %27, label %57, label %28

28:                                               ; preds = %25, %6
  br label %29

29:                                               ; preds = %46, %28
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %44

32:                                               ; preds = %29
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !15
  %35 = icmp ne i8 %34, 0
  br i1 %35, label %36, label %44

36:                                               ; preds = %32
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = load i8, ptr %11, align 1, !tbaa !9, !range !13, !noundef !14
  %40 = trunc i8 %39 to i1
  %41 = load i32, ptr %12, align 4, !tbaa !11
  %42 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %37, ptr noundef %38, i1 noundef zeroext %40, i32 noundef %41)
  %43 = xor i1 %42, true
  br label %44

44:                                               ; preds = %36, %32, %29
  %45 = phi i1 [ false, %32 ], [ false, %29 ], [ %43, %36 ]
  br i1 %45, label %46, label %56

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.memset.p0.i64(ptr align 1 %15, i8 0, i64 4, i1 false)
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds [4 x i8], ptr %15, i64 0, i64 0
  %49 = load i32, ptr %12, align 4, !tbaa !11
  %50 = call noundef ptr @_ZN5SimTK9TiXmlBase7GetCharEPKcPcPiNS_13TiXmlEncodingE(ptr noundef %47, ptr noundef %48, ptr noundef %14, i32 noundef %49)
  store ptr %50, ptr %7, align 8, !tbaa !5
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds [4 x i8], ptr %15, i64 0, i64 0
  %53 = load i32, ptr %14, align 4, !tbaa !16
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef %52, i64 noundef %54)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %29, !llvm.loop !18

56:                                               ; preds = %44
  br label %126

57:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  store i8 0, ptr %16, align 1, !tbaa !9
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !11
  %60 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %58, i32 noundef %59)
  store ptr %60, ptr %7, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %124, %57
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %76

64:                                               ; preds = %61
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load i8, ptr %65, align 1, !tbaa !15
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %68, label %76

68:                                               ; preds = %64
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load i8, ptr %11, align 1, !tbaa !9, !range !13, !noundef !14
  %72 = trunc i8 %71 to i1
  %73 = load i32, ptr %12, align 4, !tbaa !11
  %74 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %69, ptr noundef %70, i1 noundef zeroext %72, i32 noundef %73)
  %75 = xor i1 %74, true
  br label %76

76:                                               ; preds = %68, %64, %61
  %77 = phi i1 [ false, %64 ], [ false, %61 ], [ %75, %68 ]
  br i1 %77, label %78, label %125

78:                                               ; preds = %76
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i8, ptr %79, align 1, !tbaa !15
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %81, 13
  br i1 %82, label %88, label %83

83:                                               ; preds = %78
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = load i8, ptr %84, align 1, !tbaa !15
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 10
  br i1 %87, label %88, label %91

88:                                               ; preds = %83, %78
  store i8 1, ptr %16, align 1, !tbaa !9
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %7, align 8, !tbaa !5
  br label %124

91:                                               ; preds = %83
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i8, ptr %92, align 1, !tbaa !15
  %94 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext %93)
  br i1 %94, label %95, label %98

95:                                               ; preds = %91
  store i8 1, ptr %16, align 1, !tbaa !9
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i32 1
  store ptr %97, ptr %7, align 8, !tbaa !5
  br label %123

98:                                               ; preds = %91
  %99 = load i8, ptr %16, align 1, !tbaa !9, !range !13, !noundef !14
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %104

101:                                              ; preds = %98
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %102, i8 noundef signext 32)
  store i8 0, ptr %16, align 1, !tbaa !9
  br label %104

104:                                              ; preds = %101, %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.memset.p0.i64(ptr align 1 %18, i8 0, i64 4, i1 false)
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds [4 x i8], ptr %18, i64 0, i64 0
  %107 = load i32, ptr %12, align 4, !tbaa !11
  %108 = call noundef ptr @_ZN5SimTK9TiXmlBase7GetCharEPKcPcPiNS_13TiXmlEncodingE(ptr noundef %105, ptr noundef %106, ptr noundef %17, i32 noundef %107)
  store ptr %108, ptr %7, align 8, !tbaa !5
  %109 = load i32, ptr %17, align 4, !tbaa !16
  %110 = icmp eq i32 %109, 1
  br i1 %110, label %111, label %116

111:                                              ; preds = %104
  %112 = getelementptr inbounds [4 x i8], ptr %18, i64 0, i64 0
  %113 = load i8, ptr %112, align 1, !tbaa !15
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %114, i8 noundef signext %113)
  br label %122

116:                                              ; preds = %104
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds [4 x i8], ptr %18, i64 0, i64 0
  %119 = load i32, ptr %17, align 4, !tbaa !16
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %117, ptr noundef %118, i64 noundef %120)
  br label %122

122:                                              ; preds = %116, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %123

123:                                              ; preds = %122, %95
  br label %124

124:                                              ; preds = %123, %88
  br label %61, !llvm.loop !20

125:                                              ; preds = %76
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br label %126

126:                                              ; preds = %125, %56
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %134

129:                                              ; preds = %126
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = call i64 @strlen(ptr noundef %130) #8
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 %131
  store ptr %133, ptr %7, align 8, !tbaa !5
  br label %134

134:                                              ; preds = %129, %126
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  ret ptr %135
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlBase7GetCharEPKcPcPiNS_13TiXmlEncodingE(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #6 align 2

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

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

!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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN5SimTK13TiXmlEncodingE", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"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] }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZN5SimTK9TiXmlBase18condenseWhiteSpaceE = external local_unnamed_addr global 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 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 noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef, ptr noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK9TiXmlBase8ReadTextEPKcPNS_6StringEbS2_bNS_13TiXmlEncodingE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i32 noundef %5) local_unnamed_addr #1 align 2 {
  %7 = alloca %"class.SimTK::String", align 8
  %8 = alloca i32, align 4
  %9 = alloca [4 x i8], align 4
  %10 = alloca i32, align 4
  %11 = alloca [4 x i8], align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.11)
  %12 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br i1 %2, label %13, label %16

13:                                               ; preds = %6
  %14 = load i8, ptr @_ZN5SimTK9TiXmlBase18condenseWhiteSpaceE, align 1, !tbaa !5, !range !9, !noundef !10
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %25, label %16

16:                                               ; preds = %13, %6
  %.not51 = icmp eq ptr %0, null
  br i1 %.not51, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %16, %20
  %.03552 = phi ptr [ %21, %20 ], [ %0, %16 ]
  %17 = load i8, ptr %.03552, align 1, !tbaa !11
  %.not40 = icmp eq i8 %17, 0
  br i1 %.not40, label %.loopexit, label %18

18:                                               ; preds = %.lr.ph
  %19 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %.03552, ptr noundef %3, i1 noundef zeroext %4, i32 noundef %5)
  br i1 %19, label %.loopexit, label %20

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 0, ptr %9, align 4
  %21 = call noundef ptr @_ZN5SimTK9TiXmlBase7GetCharEPKcPcPiNS_13TiXmlEncodingE(ptr noundef nonnull %.03552, ptr noundef nonnull %9, ptr noundef nonnull %8, i32 noundef %5)
  %22 = load i32, ptr %8, align 4, !tbaa !12
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %9, i64 noundef %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %.not = icmp eq ptr %21, null
  br i1 %.not, label %.critedge, label %.lr.ph, !llvm.loop !14

25:                                               ; preds = %13
  %26 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %0, i32 noundef %5)
  %.not4153 = icmp eq ptr %26, null
  br i1 %.not4153, label %.critedge, label %.lr.ph56

.lr.ph56:                                         ; preds = %25, %52
  %.055 = phi i1 [ %.2, %52 ], [ false, %25 ]
  %.13654 = phi ptr [ %.237, %52 ], [ %26, %25 ]
  %27 = load i8, ptr %.13654, align 1, !tbaa !11
  %.not42 = icmp eq i8 %27, 0
  br i1 %.not42, label %.loopexit, label %28

28:                                               ; preds = %.lr.ph56
  %29 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %.13654, ptr noundef %3, i1 noundef zeroext %4, i32 noundef %5)
  br i1 %29, label %.loopexit, label %30

30:                                               ; preds = %28
  %31 = load i8, ptr %.13654, align 1, !tbaa !11
  switch i8 %31, label %34 [
    i8 13, label %32
    i8 10, label %32
  ]

32:                                               ; preds = %30, %30
  %33 = getelementptr inbounds i8, ptr %.13654, i64 1
  br label %52

34:                                               ; preds = %30
  %35 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext %31)
  br i1 %35, label %36, label %38

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %.13654, i64 1
  br label %52

38:                                               ; preds = %34
  br i1 %.055, label %39, label %41

39:                                               ; preds = %38
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef signext 32)
  br label %41

41:                                               ; preds = %39, %38
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 0, ptr %11, align 4
  %42 = call noundef ptr @_ZN5SimTK9TiXmlBase7GetCharEPKcPcPiNS_13TiXmlEncodingE(ptr noundef nonnull %.13654, ptr noundef nonnull %11, ptr noundef nonnull %10, i32 noundef %5)
  %43 = load i32, ptr %10, align 4, !tbaa !12
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %48

45:                                               ; preds = %41
  %46 = load i8, ptr %11, align 4, !tbaa !11
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef signext %46)
  br label %51

48:                                               ; preds = %41
  %49 = sext i32 %43 to i64
  %50 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %11, i64 noundef %49)
  br label %51

51:                                               ; preds = %48, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %52

52:                                               ; preds = %36, %51, %32
  %.237 = phi ptr [ %33, %32 ], [ %37, %36 ], [ %42, %51 ]
  %.2 = phi i1 [ true, %32 ], [ true, %36 ], [ false, %51 ]
  %.not41 = icmp eq ptr %.237, null
  br i1 %.not41, label %.critedge, label %.lr.ph56, !llvm.loop !16

.loopexit:                                        ; preds = %18, %.lr.ph, %.lr.ph56, %28
  %.3.ph = phi ptr [ %.13654, %28 ], [ %.13654, %.lr.ph56 ], [ %.03552, %.lr.ph ], [ %.03552, %18 ]
  %53 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #7
  %54 = getelementptr inbounds i8, ptr %.3.ph, i64 %53
  br label %.critedge

.critedge:                                        ; preds = %20, %52, %16, %25, %.loopexit
  %.4 = phi ptr [ %54, %.loopexit ], [ null, %25 ], [ null, %16 ], [ null, %52 ], [ null, %20 ]
  ret ptr %.4
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlBase7GetCharEPKcPcPiNS_13TiXmlEncodingE(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #1 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 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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