; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/zeromq/src/radix_tree.ll (ZN3zmq12radix_tree_t2rmEPKhm)

; 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.match_result_t = type { i64, i64, i64, i64, %struct.node_t, %struct.node_t, %struct.node_t }
%struct.node_t = type { ptr }
%"class.zmq::radix_tree_t" = type { %struct.node_t, i64 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6node_tneES_(ptr noundef nonnull align 8 dereferenceable(8), ptr) #0 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) #1

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #4

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

declare i32 @fflush(ptr noundef) #6

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3zmq12radix_tree_t5matchEPKhmb(ptr dead_on_unwind noalias writable sret(%struct.match_result_t) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i1 noundef zeroext) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8)) #8 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6node_t11set_edge_atEmhS_(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i8 noundef zeroext, ptr) #8 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6node_t11first_bytesEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3zmq12radix_tree_t2rmEPKhm(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, i64 noundef %2) #2 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct.match_result_t, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.node_t, align 8
  %14 = alloca %struct.node_t, align 8
  %15 = alloca %struct.node_t, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.node_t, align 8
  %18 = alloca i64, align 8
  %19 = alloca %struct.node_t, align 8
  %20 = alloca i32, align 4
  %21 = alloca %struct.node_t, align 8
  %22 = alloca %struct.node_t, align 8
  %23 = alloca %struct.node_t, align 8
  %24 = alloca i32, align 4
  %25 = alloca %struct.node_t, align 8
  %26 = alloca i64, align 8
  %27 = alloca i8, align 1
  %28 = alloca %struct.node_t, align 8
  %29 = alloca %struct.node_t, align 8
  %30 = alloca %struct.node_t, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  %31 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i64, ptr %7, align 8, !tbaa !9
  call void @_ZNK3zmq12radix_tree_t5matchEPKhmb(ptr dead_on_unwind writable sret(%struct.match_result_t) align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef %32, i64 noundef %33, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %34 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 0
  %35 = load i64, ptr %34, align 8, !tbaa !11
  store i64 %35, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %36 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !14
  store i64 %37, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %38 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 2
  %39 = load i64, ptr %38, align 8, !tbaa !15
  store i64 %39, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %40 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 3
  %41 = load i64, ptr %40, align 8, !tbaa !16
  store i64 %41, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %42 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %42, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %43 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %43, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %44 = getelementptr inbounds %struct.match_result_t, ptr %8, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %44, i64 8, i1 false), !tbaa.struct !17
  %45 = load i64, ptr %9, align 8, !tbaa !9
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = icmp ne i64 %45, %46
  br i1 %47, label %56, label %48

48:                                               ; preds = %3
  %49 = load i64, ptr %10, align 8, !tbaa !9
  %50 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %51 = zext i32 %50 to i64
  %52 = icmp ne i64 %49, %51
  br i1 %52, label %56, label %53

53:                                               ; preds = %48
  %54 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %53, %48, %3
  store i1 false, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %217

57:                                               ; preds = %53
  %58 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %59 = sub i32 %58, 1
  call void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %59)
  %60 = getelementptr inbounds %"class.zmq::radix_tree_t", ptr %31, i32 0, i32 1
  %61 = load i64, ptr %60, align 8, !tbaa !18
  %62 = add i64 %61, -1
  store i64 %62, ptr %60, align 8, !tbaa !18
  %63 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %64 = icmp ugt i32 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %57
  store i1 false, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %217

66:                                               ; preds = %57
  %67 = getelementptr inbounds %"class.zmq::radix_tree_t", ptr %31, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %67, i64 8, i1 false), !tbaa.struct !17
  %68 = getelementptr inbounds %struct.node_t, ptr %17, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8
  %70 = call noundef zeroext i1 @_ZNK6node_teqES_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr %69)
  br i1 %70, label %71, label %72

71:                                               ; preds = %66
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %217

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %73 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %74 = zext i32 %73 to i64
  store i64 %74, ptr %18, align 8, !tbaa !9
  %75 = load i64, ptr %18, align 8, !tbaa !9
  %76 = icmp ugt i64 %75, 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %216

78:                                               ; preds = %72
  %79 = load i64, ptr %18, align 8, !tbaa !9
  %80 = icmp eq i64 %79, 1
  br i1 %80, label %81, label %106

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %82 = call ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef 0)
  %83 = getelementptr inbounds %struct.node_t, ptr %19, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %84 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  store i32 %84, ptr %20, align 4, !tbaa !20
  %85 = load i32, ptr %20, align 4, !tbaa !20
  %86 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %87 = add i32 %85, %86
  %88 = zext i32 %87 to i64
  %89 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %90 = zext i32 %89 to i64
  call void @_ZN6node_t6resizeEmm(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %88, i64 noundef %90)
  %91 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %92 = load i32, ptr %20, align 4, !tbaa !20
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %91, i64 %93
  %95 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %96 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %97 = zext i32 %96 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %94, ptr align 1 %95, i64 %97, i1 false)
  %98 = call noundef ptr @_ZN6node_t11first_bytesEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @_ZN6node_t15set_first_bytesEPKh(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %98)
  %99 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @_ZN6node_t17set_node_pointersEPKh(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %99)
  %100 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %100)
  %101 = getelementptr inbounds %struct.node_t, ptr %19, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !22
  call void @free(ptr noundef %102) #9
  %103 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %13, i64 8, i1 false), !tbaa.struct !17
  %104 = getelementptr inbounds %struct.node_t, ptr %21, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8
  call void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %103, ptr %105)
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %216

106:                                              ; preds = %78
  %107 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %108 = icmp eq i32 %107, 2
  br i1 %108, label %109, label %163

109:                                              ; preds = %106
  %110 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %163

112:                                              ; preds = %109
  %113 = getelementptr inbounds %"class.zmq::radix_tree_t", ptr %31, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %113, i64 8, i1 false), !tbaa.struct !17
  %114 = getelementptr inbounds %struct.node_t, ptr %22, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8
  %116 = call noundef zeroext i1 @_ZNK6node_tneES_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr %115)
  br i1 %116, label %117, label %163

117:                                              ; preds = %112
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr %11, align 8, !tbaa !9
  %120 = icmp ult i64 %119, 2
  %121 = xor i1 %120, true
  %122 = zext i1 %121 to i64
  %123 = call i64 @llvm.expect.i64(i64 %122, i64 0)
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %118
  %126 = load ptr, ptr @stderr, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str, ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 470) #9
  %128 = load ptr, ptr @stderr, align 8, !tbaa !5
  %129 = call i32 @fflush(ptr noundef %128)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.6)
  br label %130

130:                                              ; preds = %125, %118
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %133 = load i64, ptr %11, align 8, !tbaa !9
  %134 = icmp ne i64 %133, 0
  %135 = xor i1 %134, true
  %136 = zext i1 %135 to i64
  %137 = call ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %136)
  %138 = getelementptr inbounds %struct.node_t, ptr %23, i32 0, i32 0
  store ptr %137, ptr %138, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %139 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  store i32 %139, ptr %24, align 4, !tbaa !20
  %140 = load i32, ptr %24, align 4, !tbaa !20
  %141 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %142 = add i32 %140, %141
  %143 = zext i32 %142 to i64
  %144 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %145 = zext i32 %144 to i64
  call void @_ZN6node_t6resizeEmm(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %143, i64 noundef %145)
  %146 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %147 = load i32, ptr %24, align 4, !tbaa !20
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %146, i64 %148
  %150 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %151 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %152 = zext i32 %151 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %149, ptr align 1 %150, i64 %152, i1 false)
  %153 = call noundef ptr @_ZN6node_t11first_bytesEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  call void @_ZN6node_t15set_first_bytesEPKh(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %153)
  %154 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  call void @_ZN6node_t17set_node_pointersEPKh(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %154)
  %155 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  call void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %155)
  %156 = getelementptr inbounds %struct.node_t, ptr %13, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !22
  call void @free(ptr noundef %157) #9
  %158 = getelementptr inbounds %struct.node_t, ptr %23, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !22
  call void @free(ptr noundef %159) #9
  %160 = load i64, ptr %12, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %14, i64 8, i1 false), !tbaa.struct !17
  %161 = getelementptr inbounds %struct.node_t, ptr %25, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  call void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %160, ptr %162)
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %216

163:                                              ; preds = %112, %109, %106
  br label %164

164:                                              ; preds = %163
  %165 = load i64, ptr %18, align 8, !tbaa !9
  %166 = icmp eq i64 %165, 0
  %167 = xor i1 %166, true
  %168 = zext i1 %167 to i64
  %169 = call i64 @llvm.expect.i64(i64 %168, i64 0)
  %170 = icmp ne i64 %169, 0
  br i1 %170, label %171, label %176

171:                                              ; preds = %164
  %172 = load ptr, ptr @stderr, align 8, !tbaa !5
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef @.str, ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 498) #9
  %174 = load ptr, ptr @stderr, align 8, !tbaa !5
  %175 = call i32 @fflush(ptr noundef %174)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.7)
  br label %176

176:                                              ; preds = %171, %164
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %179 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %180 = sub i32 %179, 1
  %181 = zext i32 %180 to i64
  store i64 %181, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #9
  %182 = load i64, ptr %26, align 8, !tbaa !9
  %183 = call noundef zeroext i8 @_ZN6node_t13first_byte_atEm(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %182)
  store i8 %183, ptr %27, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %184 = load i64, ptr %26, align 8, !tbaa !9
  %185 = call ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %184)
  %186 = getelementptr inbounds %struct.node_t, ptr %28, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  %187 = load i64, ptr %11, align 8, !tbaa !9
  %188 = load i8, ptr %27, align 1, !tbaa !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %28, i64 8, i1 false), !tbaa.struct !17
  %189 = getelementptr inbounds %struct.node_t, ptr %29, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8
  call void @_ZN6node_t11set_edge_atEmhS_(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %187, i8 noundef zeroext %188, ptr %190)
  %191 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %192 = getelementptr inbounds i8, ptr %191, i64 -1
  %193 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %194 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %195 = zext i32 %194 to i64
  %196 = mul i64 %195, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %192, ptr align 1 %193, i64 %196, i1 false)
  %197 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %198 = zext i32 %197 to i64
  %199 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %200 = sub i32 %199, 1
  %201 = zext i32 %200 to i64
  call void @_ZN6node_t6resizeEmm(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %198, i64 noundef %201)
  %202 = getelementptr inbounds %struct.node_t, ptr %13, i32 0, i32 0
  %203 = load ptr, ptr %202, align 8, !tbaa !22
  call void @free(ptr noundef %203) #9
  %204 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %205 = icmp eq i32 %204, 0
  br i1 %205, label %206, label %211

206:                                              ; preds = %178
  %207 = getelementptr inbounds %struct.node_t, ptr %14, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8, !tbaa !22
  %209 = getelementptr inbounds %"class.zmq::radix_tree_t", ptr %31, i32 0, i32 0
  %210 = getelementptr inbounds %struct.node_t, ptr %209, i32 0, i32 0
  store ptr %208, ptr %210, align 8, !tbaa !24
  br label %215

211:                                              ; preds = %178
  %212 = load i64, ptr %12, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %14, i64 8, i1 false), !tbaa.struct !17
  %213 = getelementptr inbounds %struct.node_t, ptr %30, i32 0, i32 0
  %214 = load ptr, ptr %213, align 8
  call void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %212, ptr %214)
  br label %215

215:                                              ; preds = %211, %206
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %216

216:                                              ; preds = %215, %132, %81, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %217

217:                                              ; preds = %216, %71, %65, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #9
  %218 = load i1, ptr %4, align 1
  ret i1 %218
}

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN6node_t13first_byte_atEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #8 align 2

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" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { 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 #6 = { "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 = { 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 #8 = { 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 #9 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS14match_result_t", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !13, i64 40, !13, i64 48}
!13 = !{!"_ZTS6node_t", !6, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !10, i64 16}
!16 = !{!12, !10, i64 24}
!17 = !{i64 0, i64 8, !5}
!18 = !{!19, !10, i64 8}
!19 = !{!"_ZTSN3zmq12radix_tree_tE", !13, i64 0, !10, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!13, !6, i64 0}
!23 = !{!7, !7, i64 0}
!24 = !{!19, !6, 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"

%struct.match_result_t = type { i64, i64, i64, i64, %struct.node_t, %struct.node_t, %struct.node_t }
%struct.node_t = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1

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

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

; Function Attrs: mustprogress 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) #1

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

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

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

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

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3zmq12radix_tree_t5matchEPKhmb(ptr dead_on_unwind noalias writable sret(%struct.match_result_t) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i1 noundef zeroext) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6node_t11set_edge_atEmhS_(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i8 noundef zeroext, ptr) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, ptr) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6node_t15set_first_bytesEPKh(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6node_t17set_node_pointersEPKh(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3zmq12radix_tree_t2rmEPKhm(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %struct.match_result_t, align 8
  %5 = alloca %struct.node_t, align 8
  %6 = alloca %struct.node_t, align 8
  %7 = alloca %struct.node_t, align 8
  %8 = alloca %struct.node_t, align 8
  %9 = alloca %struct.node_t, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #9
  call void @_ZNK3zmq12radix_tree_t5matchEPKhmb(ptr dead_on_unwind nonnull writable sret(%struct.match_result_t) align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, i64 noundef %2, i1 noundef zeroext false)
  %10 = load i64, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %4, i64 16
  %14 = load i64, ptr %13, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %4, i64 24
  %16 = load i64, ptr %15, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %17 = getelementptr inbounds i8, ptr %4, i64 32
  %18 = load i64, ptr %17, align 8, !tbaa !15
  store i64 %18, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %19 = getelementptr inbounds i8, ptr %4, i64 40
  %20 = load i64, ptr %19, align 8, !tbaa !15
  store i64 %20, ptr %6, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %21 = getelementptr inbounds i8, ptr %4, i64 48
  %22 = load i64, ptr %21, align 8, !tbaa !15
  store i64 %22, ptr %7, align 8, !tbaa !15
  %.not = icmp eq i64 %10, %2
  br i1 %.not, label %23, label %119

23:                                               ; preds = %3
  %24 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %25 = zext i32 %24 to i64
  %.not28 = icmp eq i64 %12, %25
  br i1 %.not28, label %26, label %119

26:                                               ; preds = %23
  %27 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %119, label %29

29:                                               ; preds = %26
  %30 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %31 = add i32 %30, -1
  call void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %31)
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = load i64, ptr %32, align 8, !tbaa !16
  %34 = add i64 %33, -1
  store i64 %34, ptr %32, align 8, !tbaa !16
  %35 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %.not29 = icmp eq i32 %35, 0
  br i1 %.not29, label %36, label %119

36:                                               ; preds = %29
  %.sroa.015.0.copyload = load ptr, ptr %0, align 8, !tbaa !15
  %37 = call noundef zeroext i1 @_ZNK6node_teqES_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr %.sroa.015.0.copyload)
  br i1 %37, label %119, label %38

38:                                               ; preds = %36
  %39 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %40 = icmp ugt i32 %39, 1
  br i1 %40, label %119, label %41

41:                                               ; preds = %38
  %42 = icmp eq i32 %39, 1
  br i1 %42, label %43, label %61

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %44 = call ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef 0)
  store ptr %44, ptr %8, align 8
  %45 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %46 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %47 = add i32 %46, %45
  %48 = zext i32 %47 to i64
  %49 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %50 = zext i32 %49 to i64
  call void @_ZN6node_t6resizeEmm(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %48, i64 noundef %50)
  %51 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %52 = zext i32 %45 to i64
  %53 = getelementptr inbounds i8, ptr %51, i64 %52
  %54 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %55 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %56 = zext i32 %55 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %53, ptr align 1 %54, i64 %56, i1 false)
  %57 = call noundef ptr @_ZN6node_t11first_bytesEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN6node_t15set_first_bytesEPKh(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %57)
  %58 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN6node_t17set_node_pointersEPKh(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %58)
  %59 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %59)
  %60 = load ptr, ptr %8, align 8, !tbaa !18
  call void @free(ptr noundef %60) #9
  %.sroa.09.0.copyload = load ptr, ptr %5, align 8, !tbaa !15
  call void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %14, ptr %.sroa.09.0.copyload)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %119

61:                                               ; preds = %41
  %62 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %96

64:                                               ; preds = %61
  %65 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %96

67:                                               ; preds = %64
  %.sroa.08.0.copyload = load ptr, ptr %0, align 8, !tbaa !15
  %68 = call noundef zeroext i1 @_ZNK6node_tneES_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr %.sroa.08.0.copyload)
  br i1 %68, label %69, label %96

69:                                               ; preds = %67
  %70 = icmp ugt i64 %14, 1
  br i1 %70, label %71, label %76, !prof !19

71:                                               ; preds = %69
  %72 = load ptr, ptr @stderr, align 8, !tbaa !15
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 470) #10
  %74 = load ptr, ptr @stderr, align 8, !tbaa !15
  %75 = call i32 @fflush(ptr noundef %74)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.6)
  br label %76

76:                                               ; preds = %71, %69
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %.not30 = icmp eq i64 %14, 0
  %77 = zext i1 %.not30 to i64
  %78 = call ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %77)
  store ptr %78, ptr %9, align 8
  %79 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %80 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %81 = add i32 %80, %79
  %82 = zext i32 %81 to i64
  %83 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %84 = zext i32 %83 to i64
  call void @_ZN6node_t6resizeEmm(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %82, i64 noundef %84)
  %85 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %86 = zext i32 %79 to i64
  %87 = getelementptr inbounds i8, ptr %85, i64 %86
  %88 = call noundef ptr @_ZN6node_t6prefixEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %89 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %90 = zext i32 %89 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %87, ptr align 1 %88, i64 %90, i1 false)
  %91 = call noundef ptr @_ZN6node_t11first_bytesEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @_ZN6node_t15set_first_bytesEPKh(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %91)
  %92 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @_ZN6node_t17set_node_pointersEPKh(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %92)
  %93 = call noundef i32 @_ZN6node_t8refcountEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @_ZN6node_t12set_refcountEj(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %93)
  %94 = load ptr, ptr %5, align 8, !tbaa !18
  call void @free(ptr noundef %94) #9
  %95 = load ptr, ptr %9, align 8, !tbaa !18
  call void @free(ptr noundef %95) #9
  %.sroa.05.0.copyload = load ptr, ptr %6, align 8, !tbaa !15
  call void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %16, ptr %.sroa.05.0.copyload)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %119

96:                                               ; preds = %67, %64, %61
  %97 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %98 = add i32 %97, -1
  %99 = zext i32 %98 to i64
  %100 = call noundef zeroext i8 @_ZN6node_t13first_byte_atEm(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %99)
  %101 = call ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %99)
  call void @_ZN6node_t11set_edge_atEmhS_(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %14, i8 noundef zeroext %100, ptr %101)
  %102 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %103 = getelementptr inbounds i8, ptr %102, i64 -1
  %104 = call noundef ptr @_ZN6node_t13node_pointersEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %105 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %106 = zext i32 %105 to i64
  %107 = shl nuw nsw i64 %106, 3
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %103, ptr align 1 %104, i64 %107, i1 false)
  %108 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %109 = zext i32 %108 to i64
  %110 = call noundef i32 @_ZN6node_t9edgecountEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %111 = add i32 %110, -1
  %112 = zext i32 %111 to i64
  call void @_ZN6node_t6resizeEmm(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %109, i64 noundef %112)
  %113 = load ptr, ptr %5, align 8, !tbaa !18
  call void @free(ptr noundef %113) #9
  %114 = call noundef i32 @_ZN6node_t13prefix_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %115 = icmp eq i32 %114, 0
  %116 = load ptr, ptr %6, align 8, !tbaa !15
  br i1 %115, label %117, label %118

117:                                              ; preds = %96
  store ptr %116, ptr %0, align 8, !tbaa !20
  br label %119

118:                                              ; preds = %96
  call void @_ZN6node_t11set_node_atEmS_(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %16, ptr %116)
  br label %119

119:                                              ; preds = %43, %76, %38, %118, %117, %36, %29, %3, %23, %26
  %.1 = phi i1 [ false, %26 ], [ false, %23 ], [ false, %3 ], [ false, %29 ], [ true, %36 ], [ true, %117 ], [ true, %118 ], [ true, %38 ], [ true, %76 ], [ true, %43 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #9
  ret i1 %.1
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZN6node_t7node_atEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN6node_t13first_byte_atEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #7 align 2

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" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 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 #7 = { 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 #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { nounwind }
attributes #10 = { cold 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, !7, i64 0}
!6 = !{!"_ZTS14match_result_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6node_t", !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 24}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !7, i64 8}
!17 = !{!"_ZTSN3zmq12radix_tree_tE", !10, i64 0, !7, i64 8}
!18 = !{!10, !11, i64 0}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!17, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,ReassociatePass,SROAPass,SimplifyCFGPass