; LLVM IR from mncoppola/rpef :: utilities_src/squashfs2.1/lzma/C/7zip/Compress/LZMA (LZMAEncoder)

; 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.NPat2::CPatricia" = type { %struct.IMatchFinder, %struct.IMatchFinderSetCallback, %class.CMyUnknownImp, %class.CLZInWindow, i32, i32, ptr, ptr, i32, i32, i32, i32, i8, i32, ptr, %class.CMyComPtr }
%struct.IMatchFinder = type { %struct.IInWindowStream }
%struct.IInWindowStream = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.IMatchFinderSetCallback = type { %struct.IUnknown }
%class.CMyUnknownImp = type { i32 }
%class.CLZInWindow = type { ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%class.CMyComPtr = type { ptr }
%"struct.NPat2::CNode" = type { i32, i32, %union.anon }
%union.anon = type { [4 x %"union.NPat2::CDescendant"] }
%"union.NPat2::CDescendant" = type { i32 }

; 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 nounwind uwtable
declare dso_local void @_ZN5NPat211CDescendant9MakeEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5NPat211CDescendant6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5NPat211CDescendant7IsMatchEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef %2, i32 noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  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
  store i32 %3, ptr %8, align 4, !tbaa !9
  %17 = load ptr, ptr %5, align 8
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %18)
  br i1 %19, label %20, label %21

20:                                               ; preds = %4
  br label %123

21:                                               ; preds = %4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsMatchEv(ptr noundef nonnull align 4 dereferenceable(4) %22)
  br i1 %23, label %24, label %38

24:                                               ; preds = %21
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = icmp ult i32 %26, %27
  br i1 %28, label %29, label %31

29:                                               ; preds = %24
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN5NPat211CDescendant9MakeEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %30)
  br label %37

31:                                               ; preds = %24
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i32, ptr %32, align 4, !tbaa !11
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = sub i32 %33, %34
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 %35, ptr %36, align 4, !tbaa !11
  br label %37

37:                                               ; preds = %31, %29
  br label %123

38:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %39 = getelementptr inbounds %"class.NPat2::CPatricia", ptr %17, i32 0, i32 7
  %40 = load ptr, ptr %39, align 8, !tbaa !12
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds %"struct.NPat2::CNode", ptr %40, i64 %43
  store ptr %44, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %65, %38
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = icmp ult i32 %46, 4
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %68

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.NPat2::CNode", ptr %50, i32 0, i32 2
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds [4 x %"union.NPat2::CDescendant"], ptr %51, i64 0, i64 %53
  store ptr %54, ptr %13, align 8, !tbaa !5
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr noundef nonnull align 8 dereferenceable(160) %17, ptr noundef nonnull align 4 dereferenceable(4) %55, i32 noundef %56, i32 noundef %57)
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %58)
  br i1 %59, label %64, label %60

60:                                               ; preds = %49
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = add i32 %61, 1
  store i32 %62, ptr %10, align 4, !tbaa !9
  %63 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %63, ptr %11, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %60, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = add i32 %66, 1
  store i32 %67, ptr %12, align 4, !tbaa !9
  br label %45, !llvm.loop !22

68:                                               ; preds = %48
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = icmp ugt i32 %69, 1
  br i1 %70, label %71, label %79

71:                                               ; preds = %68
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.NPat2::CNode", ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !24
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = sub i32 %74, %75
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.NPat2::CNode", ptr %77, i32 0, i32 0
  store i32 %76, ptr %78, align 4, !tbaa !24
  store i32 1, ptr %14, align 4
  br label %121

79:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !11
  store i32 %81, ptr %15, align 4, !tbaa !9
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = icmp eq i32 %82, 1
  br i1 %83, label %84, label %109

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.NPat2::CNode", ptr %85, i32 0, i32 2
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds [4 x %"union.NPat2::CDescendant"], ptr %86, i64 0, i64 %88
  store ptr %89, ptr %16, align 8, !tbaa !5
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = call noundef zeroext i1 @_ZNK5NPat211CDescendant6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %90)
  br i1 %91, label %92, label %106

92:                                               ; preds = %84
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.NPat2::CNode", ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !26
  %96 = add i32 %95, 2
  %97 = getelementptr inbounds %"class.NPat2::CPatricia", ptr %17, i32 0, i32 7
  %98 = load ptr, ptr %97, align 8, !tbaa !12
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  %100 = load i32, ptr %99, align 4, !tbaa !11
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds %"struct.NPat2::CNode", ptr %98, i64 %101
  %103 = getelementptr inbounds %"struct.NPat2::CNode", ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !26
  %105 = add i32 %104, %96
  store i32 %105, ptr %103, align 4, !tbaa !26
  br label %106

106:                                              ; preds = %92, %84
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %108, ptr align 4 %107, i64 4, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %111

109:                                              ; preds = %79
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN5NPat211CDescendant9MakeEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %110)
  br label %111

111:                                              ; preds = %109, %106
  %112 = getelementptr inbounds %"class.NPat2::CPatricia", ptr %17, i32 0, i32 8
  %113 = load i32, ptr %112, align 8, !tbaa !28
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.NPat2::CNode", ptr %114, i32 0, i32 2
  store i32 %113, ptr %115, align 4, !tbaa !11
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = getelementptr inbounds %"class.NPat2::CPatricia", ptr %17, i32 0, i32 8
  store i32 %116, ptr %117, align 8, !tbaa !28
  %118 = getelementptr inbounds %"class.NPat2::CPatricia", ptr %17, i32 0, i32 10
  %119 = load i32, ptr %118, align 8, !tbaa !29
  %120 = add i32 %119, -1
  store i32 %120, ptr %118, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  store i32 0, ptr %14, align 4
  br label %121

121:                                              ; preds = %111, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %122 = load i32, ptr %14, align 4
  switch i32 %122, label %124 [
    i32 0, label %123
    i32 1, label %123
  ]

123:                                              ; preds = %121, %121, %37, %20
  ret void

124:                                              ; preds = %121
  unreachable
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 112}
!13 = !{!"_ZTSN5NPat29CPatriciaE", !14, i64 0, !17, i64 8, !18, i64 16, !19, i64 24, !10, i64 96, !10, i64 100, !6, i64 104, !6, i64 112, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !20, i64 136, !10, i64 140, !6, i64 144, !21, i64 152}
!14 = !{!"_ZTS12IMatchFinder", !15, i64 0}
!15 = !{!"_ZTS15IInWindowStream", !16, i64 0}
!16 = !{!"_ZTS8IUnknown"}
!17 = !{!"_ZTS23IMatchFinderSetCallback", !16, i64 0}
!18 = !{!"_ZTS13CMyUnknownImp", !10, i64 0}
!19 = !{!"_ZTS11CLZInWindow", !6, i64 8, !6, i64 16, !10, i64 24, !20, i64 28, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS9CMyComPtrI20IMatchFinderCallbackE", !6, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !10, i64 0}
!25 = !{!"_ZTSN5NPat25CNodeE", !10, i64 0, !10, i64 4, !7, i64 8}
!26 = !{!25, !10, i64 4}
!27 = !{i64 0, i64 4, !11}
!28 = !{!13, !10, i64 120}
!29 = !{!13, !10, i64 128}


; 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.NPat2::CNode" = type { i32, i32, %union.anon }
%union.anon = type { [4 x %"union.NPat2::CDescendant"] }
%"union.NPat2::CDescendant" = type { i32 }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5NPat211CDescendant6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5NPat211CDescendant7IsMatchEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr nocapture noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 align 2 {
  %5 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %5, label %64, label %6

6:                                                ; preds = %4
  %7 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsMatchEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %7, label %8, label %14

8:                                                ; preds = %6
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp ult i32 %9, %2
  br i1 %10, label %11, label %12

11:                                               ; preds = %8
  tail call void @_ZN5NPat211CDescendant9MakeEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br label %64

12:                                               ; preds = %8
  %13 = sub i32 %9, %3
  store i32 %13, ptr %1, align 4, !tbaa !5
  br label %64

14:                                               ; preds = %6
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  %16 = load ptr, ptr %15, align 8, !tbaa !8
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds %"struct.NPat2::CNode", ptr %16, i64 %18
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  tail call void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef %2, i32 noundef %3)
  %21 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %not. = xor i1 %21, true
  %22 = zext i1 %not. to i32
  %23 = getelementptr inbounds i8, ptr %19, i64 12
  tail call void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef %2, i32 noundef %3)
  %24 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %23)
  %not.44 = xor i1 %24, true
  %not..1 = xor i1 %24, true
  %25 = zext i1 %not..1 to i32
  %spec.select39.1 = add nuw nsw i32 %22, %25
  %26 = getelementptr inbounds i8, ptr %19, i64 16
  tail call void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %26, i32 noundef %2, i32 noundef %3)
  %27 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %26)
  %28 = zext i1 %not.44 to i64
  %not..2 = xor i1 %27, true
  %29 = zext i1 %not..2 to i32
  %spec.select39.2 = add nuw nsw i32 %spec.select39.1, %29
  %30 = getelementptr inbounds i8, ptr %19, i64 20
  tail call void @_ZN5NPat29CPatricia32TestRemoveAndNormalizeDescendantERNS_11CDescendantEjj(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 4 dereferenceable(4) %30, i32 noundef %2, i32 noundef %3)
  %31 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %30)
  %32 = select i1 %27, i64 %28, i64 2
  %not..3 = xor i1 %31, true
  %33 = zext i1 %not..3 to i32
  %spec.select39.3 = add nuw nsw i32 %spec.select39.2, %33
  %34 = icmp ugt i32 %spec.select39.3, 1
  br i1 %34, label %35, label %38

35:                                               ; preds = %14
  %36 = load i32, ptr %19, align 4, !tbaa !20
  %37 = sub i32 %36, %3
  store i32 %37, ptr %19, align 4, !tbaa !20
  br label %64

38:                                               ; preds = %14
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = icmp eq i32 %spec.select39.3, 1
  br i1 %40, label %41, label %57

41:                                               ; preds = %38
  %42 = select i1 %31, i64 %32, i64 3
  %43 = getelementptr inbounds [4 x %"union.NPat2::CDescendant"], ptr %20, i64 0, i64 %42
  %44 = tail call noundef zeroext i1 @_ZNK5NPat211CDescendant6IsNodeEv(ptr noundef nonnull align 4 dereferenceable(4) %43)
  br i1 %44, label %45, label %55

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %19, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !22
  %48 = add i32 %47, 2
  %49 = load ptr, ptr %15, align 8, !tbaa !8
  %50 = load i32, ptr %43, align 4, !tbaa !5
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds %"struct.NPat2::CNode", ptr %49, i64 %51, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !22
  %54 = add i32 %48, %53
  store i32 %54, ptr %52, align 4, !tbaa !22
  br label %55

55:                                               ; preds = %45, %41
  %56 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %56, ptr %1, align 4, !tbaa !5
  br label %58

57:                                               ; preds = %38
  tail call void @_ZN5NPat211CDescendant9MakeEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br label %58

58:                                               ; preds = %57, %55
  %59 = getelementptr inbounds i8, ptr %0, i64 120
  %60 = load i32, ptr %59, align 8, !tbaa !23
  store i32 %60, ptr %20, align 4, !tbaa !5
  store i32 %39, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds i8, ptr %0, i64 128
  %62 = load i32, ptr %61, align 8, !tbaa !24
  %63 = add i32 %62, -1
  store i32 %63, ptr %61, align 8, !tbaa !24
  br label %64

64:                                               ; preds = %35, %58, %11, %12, %4
  ret void
}

attributes #0 = { 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" }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !17, i64 112}
!9 = !{!"_ZTSN5NPat29CPatriciaE", !10, i64 0, !13, i64 8, !14, i64 16, !16, i64 24, !15, i64 96, !15, i64 100, !17, i64 104, !17, i64 112, !15, i64 120, !15, i64 124, !15, i64 128, !15, i64 132, !18, i64 136, !15, i64 140, !17, i64 144, !19, i64 152}
!10 = !{!"_ZTS12IMatchFinder", !11, i64 0}
!11 = !{!"_ZTS15IInWindowStream", !12, i64 0}
!12 = !{!"_ZTS8IUnknown"}
!13 = !{!"_ZTS23IMatchFinderSetCallback", !12, i64 0}
!14 = !{!"_ZTS13CMyUnknownImp", !15, i64 0}
!15 = !{!"int", !6, i64 0}
!16 = !{!"_ZTS11CLZInWindow", !17, i64 8, !17, i64 16, !15, i64 24, !18, i64 28, !17, i64 32, !17, i64 40, !15, i64 48, !15, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68}
!17 = !{!"any pointer", !6, i64 0}
!18 = !{!"bool", !6, i64 0}
!19 = !{!"_ZTS9CMyComPtrI20IMatchFinderCallbackE", !17, i64 0}
!20 = !{!21, !15, i64 0}
!21 = !{!"_ZTSN5NPat25CNodeE", !15, i64 0, !15, i64 4, !6, i64 8}
!22 = !{!21, !15, i64 4}
!23 = !{!9, !15, i64 120}
!24 = !{!9, !15, i64 128}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass