; LLVM IR from aagdev/mlimgsynth :: src (tensor_name_conv)

; 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.StrSlice = type { ptr, i64 }

@g_allocator_dopt = external global ptr, align 8
@.str.35 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @tnconv_prefix_match_replace(ptr noundef, ptr noundef, ptr, i64, ptr, i64) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @dynbuf_append(ptr noundef, i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @tnconv_number_match_push(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @tnconv_vae(ptr %0, i64 %1, ptr noundef %2) #1 {
  %4 = alloca %struct.StrSlice, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.StrSlice, align 8
  %8 = alloca %struct.StrSlice, align 8
  %9 = alloca %struct.StrSlice, align 8
  %10 = alloca %struct.StrSlice, align 8
  %11 = alloca %struct.StrSlice, align 8
  %12 = alloca %struct.StrSlice, align 8
  %13 = alloca %struct.StrSlice, align 8
  %14 = alloca %struct.StrSlice, align 8
  %15 = alloca %struct.StrSlice, align 8
  %16 = alloca %struct.StrSlice, align 8
  %17 = alloca %struct.StrSlice, align 8
  %18 = alloca %struct.StrSlice, align 8
  %19 = alloca %struct.StrSlice, align 8
  %20 = alloca %struct.StrSlice, align 8
  %21 = alloca %struct.StrSlice, align 8
  %22 = alloca %struct.StrSlice, align 8
  %23 = alloca %struct.StrSlice, align 8
  %24 = alloca %struct.StrSlice, align 8
  %25 = alloca %struct.StrSlice, align 8
  %26 = alloca %struct.StrSlice, align 8
  %27 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  store ptr %0, ptr %27, align 8
  %28 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  store i64 %1, ptr %28, align 8
  store ptr %2, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.StrSlice, ptr %7, i32 0, i32 0
  store ptr @.str.35, ptr %30, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.StrSlice, ptr %7, i32 0, i32 1
  store i64 8, ptr %31, align 8, !tbaa !14
  %32 = getelementptr inbounds %struct.StrSlice, ptr %8, i32 0, i32 0
  store ptr @.str.35, ptr %32, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct.StrSlice, ptr %8, i32 0, i32 1
  store i64 8, ptr %33, align 8, !tbaa !14
  %34 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %37 = load i64, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8
  %40 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %41 = load i64, ptr %40, align 8
  %42 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %29, ptr %35, i64 %37, ptr %39, i64 %41)
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %100

44:                                               ; preds = %3
  store i32 1, ptr %6, align 4, !tbaa !9
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.StrSlice, ptr %9, i32 0, i32 0
  store ptr @.str.36, ptr %46, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.StrSlice, ptr %9, i32 0, i32 1
  store i64 3, ptr %47, align 8, !tbaa !14
  %48 = getelementptr inbounds %struct.StrSlice, ptr %10, i32 0, i32 0
  store ptr @.str.36, ptr %48, align 8, !tbaa !11
  %49 = getelementptr inbounds %struct.StrSlice, ptr %10, i32 0, i32 1
  store i64 3, ptr %49, align 8, !tbaa !14
  %50 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 1
  %57 = load i64, ptr %56, align 8
  %58 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %45, ptr %51, i64 %53, ptr %55, i64 %57)
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %99

60:                                               ; preds = %44
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = call i32 @tnconv_number_match_push(ptr noundef %4, ptr noundef %61)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %99

64:                                               ; preds = %60
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.StrSlice, ptr %11, i32 0, i32 0
  store ptr @.str.37, ptr %66, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct.StrSlice, ptr %11, i32 0, i32 1
  store i64 6, ptr %67, align 8, !tbaa !14
  %68 = getelementptr inbounds %struct.StrSlice, ptr %12, i32 0, i32 0
  store ptr @.str.37, ptr %68, align 8, !tbaa !11
  %69 = getelementptr inbounds %struct.StrSlice, ptr %12, i32 0, i32 1
  store i64 6, ptr %69, align 8, !tbaa !14
  %70 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8
  %72 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %73 = load i64, ptr %72, align 8
  %74 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %77 = load i64, ptr %76, align 8
  %78 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %65, ptr %71, i64 %73, ptr %75, i64 %77)
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %99

80:                                               ; preds = %64
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = call i32 @tnconv_number_match_push(ptr noundef %4, ptr noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %99

84:                                               ; preds = %80
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.StrSlice, ptr %13, i32 0, i32 0
  store ptr @.str.38, ptr %86, align 8, !tbaa !11
  %87 = getelementptr inbounds %struct.StrSlice, ptr %13, i32 0, i32 1
  store i64 13, ptr %87, align 8, !tbaa !14
  %88 = getelementptr inbounds %struct.StrSlice, ptr %14, i32 0, i32 0
  store ptr @.str.39, ptr %88, align 8, !tbaa !11
  %89 = getelementptr inbounds %struct.StrSlice, ptr %14, i32 0, i32 1
  store i64 10, ptr %89, align 8, !tbaa !14
  %90 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8
  %92 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %93 = load i64, ptr %92, align 8
  %94 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  %96 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %97 = load i64, ptr %96, align 8
  %98 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %85, ptr %91, i64 %93, ptr %95, i64 %97)
  br label %99

99:                                               ; preds = %84, %80, %64, %60, %44
  br label %209

100:                                              ; preds = %3
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.StrSlice, ptr %15, i32 0, i32 0
  store ptr @.str.40, ptr %102, align 8, !tbaa !11
  %103 = getelementptr inbounds %struct.StrSlice, ptr %15, i32 0, i32 1
  store i64 8, ptr %103, align 8, !tbaa !14
  %104 = getelementptr inbounds %struct.StrSlice, ptr %16, i32 0, i32 0
  store ptr @.str.40, ptr %104, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.StrSlice, ptr %16, i32 0, i32 1
  store i64 8, ptr %105, align 8, !tbaa !14
  %106 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8
  %108 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %109 = load i64, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8
  %112 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %113 = load i64, ptr %112, align 8
  %114 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %101, ptr %107, i64 %109, ptr %111, i64 %113)
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %172

116:                                              ; preds = %100
  store i32 1, ptr %6, align 4, !tbaa !9
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.StrSlice, ptr %17, i32 0, i32 0
  store ptr @.str.41, ptr %118, align 8, !tbaa !11
  %119 = getelementptr inbounds %struct.StrSlice, ptr %17, i32 0, i32 1
  store i64 5, ptr %119, align 8, !tbaa !14
  %120 = getelementptr inbounds %struct.StrSlice, ptr %18, i32 0, i32 0
  store ptr @.str.41, ptr %120, align 8, !tbaa !11
  %121 = getelementptr inbounds %struct.StrSlice, ptr %18, i32 0, i32 1
  store i64 5, ptr %121, align 8, !tbaa !14
  %122 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8
  %124 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %125 = load i64, ptr %124, align 8
  %126 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8
  %128 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %129 = load i64, ptr %128, align 8
  %130 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %117, ptr %123, i64 %125, ptr %127, i64 %129)
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %171

132:                                              ; preds = %116
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = call i32 @tnconv_number_match_push(ptr noundef %4, ptr noundef %133)
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %171

136:                                              ; preds = %132
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.StrSlice, ptr %19, i32 0, i32 0
  store ptr @.str.37, ptr %138, align 8, !tbaa !11
  %139 = getelementptr inbounds %struct.StrSlice, ptr %19, i32 0, i32 1
  store i64 6, ptr %139, align 8, !tbaa !14
  %140 = getelementptr inbounds %struct.StrSlice, ptr %20, i32 0, i32 0
  store ptr @.str.37, ptr %140, align 8, !tbaa !11
  %141 = getelementptr inbounds %struct.StrSlice, ptr %20, i32 0, i32 1
  store i64 6, ptr %141, align 8, !tbaa !14
  %142 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %145 = load i64, ptr %144, align 8
  %146 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8
  %148 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %149 = load i64, ptr %148, align 8
  %150 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %137, ptr %143, i64 %145, ptr %147, i64 %149)
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %171

152:                                              ; preds = %136
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = call i32 @tnconv_number_match_push(ptr noundef %4, ptr noundef %153)
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %171

156:                                              ; preds = %152
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.StrSlice, ptr %21, i32 0, i32 0
  store ptr @.str.38, ptr %158, align 8, !tbaa !11
  %159 = getelementptr inbounds %struct.StrSlice, ptr %21, i32 0, i32 1
  store i64 13, ptr %159, align 8, !tbaa !14
  %160 = getelementptr inbounds %struct.StrSlice, ptr %22, i32 0, i32 0
  store ptr @.str.39, ptr %160, align 8, !tbaa !11
  %161 = getelementptr inbounds %struct.StrSlice, ptr %22, i32 0, i32 1
  store i64 10, ptr %161, align 8, !tbaa !14
  %162 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8
  %164 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %165 = load i64, ptr %164, align 8
  %166 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8
  %168 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %169 = load i64, ptr %168, align 8
  %170 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %157, ptr %163, i64 %165, ptr %167, i64 %169)
  br label %171

171:                                              ; preds = %156, %152, %136, %132, %116
  br label %208

172:                                              ; preds = %100
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.StrSlice, ptr %23, i32 0, i32 0
  store ptr @.str.42, ptr %174, align 8, !tbaa !11
  %175 = getelementptr inbounds %struct.StrSlice, ptr %23, i32 0, i32 1
  store i64 11, ptr %175, align 8, !tbaa !14
  %176 = getelementptr inbounds %struct.StrSlice, ptr %24, i32 0, i32 0
  store ptr @.str.42, ptr %176, align 8, !tbaa !11
  %177 = getelementptr inbounds %struct.StrSlice, ptr %24, i32 0, i32 1
  store i64 11, ptr %177, align 8, !tbaa !14
  %178 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8
  %180 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %181 = load i64, ptr %180, align 8
  %182 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8
  %184 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 1
  %185 = load i64, ptr %184, align 8
  %186 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %173, ptr %179, i64 %181, ptr %183, i64 %185)
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %189

188:                                              ; preds = %172
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %207

189:                                              ; preds = %172
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.StrSlice, ptr %25, i32 0, i32 0
  store ptr @.str.43, ptr %191, align 8, !tbaa !11
  %192 = getelementptr inbounds %struct.StrSlice, ptr %25, i32 0, i32 1
  store i64 16, ptr %192, align 8, !tbaa !14
  %193 = getelementptr inbounds %struct.StrSlice, ptr %26, i32 0, i32 0
  store ptr @.str.43, ptr %193, align 8, !tbaa !11
  %194 = getelementptr inbounds %struct.StrSlice, ptr %26, i32 0, i32 1
  store i64 16, ptr %194, align 8, !tbaa !14
  %195 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8
  %197 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %198 = load i64, ptr %197, align 8
  %199 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %200 = load ptr, ptr %199, align 8
  %201 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %202 = load i64, ptr %201, align 8
  %203 = call i32 @tnconv_prefix_match_replace(ptr noundef %4, ptr noundef %190, ptr %196, i64 %198, ptr %200, i64 %202)
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %205, label %206

205:                                              ; preds = %189
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %206

206:                                              ; preds = %205, %189
  br label %207

207:                                              ; preds = %206, %188
  br label %208

208:                                              ; preds = %207, %171
  br label %209

209:                                              ; preds = %208, %99
  %210 = load i32, ptr %6, align 4, !tbaa !9
  %211 = icmp sgt i32 %210, 0
  br i1 %211, label %212, label %221

212:                                              ; preds = %209
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.StrSlice, ptr %4, i32 0, i32 1
  %215 = load i64, ptr %214, align 8, !tbaa !14
  %216 = trunc i64 %215 to i32
  %217 = getelementptr inbounds %struct.StrSlice, ptr %4, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8, !tbaa !11
  %219 = load ptr, ptr @g_allocator_dopt, align 8, !tbaa !5
  %220 = call ptr @dynbuf_append(ptr noundef %213, i32 noundef %216, ptr noundef %218, i64 noundef 1, i32 noundef 1, ptr noundef %219)
  br label %221

221:                                              ; preds = %212, %209
  %222 = load i32, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  ret i32 %222
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { inlinehint 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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"StrSlice", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}


; 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.StrSlice = type { ptr, i64 }

@g_allocator_dopt = external local_unnamed_addr global ptr, align 8
@.str.35 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @tnconv_prefix_match_replace(ptr noundef, ptr noundef, ptr, i64, ptr, i64) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @dynbuf_append(ptr noundef, i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @tnconv_number_match_push(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @tnconv_vae(ptr %0, i64 %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct.StrSlice, align 8
  store ptr %0, ptr %4, align 8
  %5 = getelementptr inbounds i8, ptr %4, i64 8
  store i64 %1, ptr %5, align 8
  %6 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.35, i64 8, ptr nonnull @.str.35, i64 8)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %15, label %7

7:                                                ; preds = %3
  %8 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.36, i64 3, ptr nonnull @.str.36, i64 3)
  %.not61 = icmp eq i32 %8, 0
  br i1 %.not61, label %.thread, label %9

9:                                                ; preds = %7
  %10 = call i32 @tnconv_number_match_push(ptr noundef nonnull %4, ptr noundef %2)
  %.not62 = icmp eq i32 %10, 0
  br i1 %.not62, label %.thread, label %11

11:                                               ; preds = %9
  %12 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.37, i64 6, ptr nonnull @.str.37, i64 6)
  %.not63 = icmp eq i32 %12, 0
  br i1 %.not63, label %.thread, label %13

13:                                               ; preds = %11
  %14 = call i32 @tnconv_number_match_push(ptr noundef nonnull %4, ptr noundef %2)
  %.not64 = icmp eq i32 %14, 0
  br i1 %.not64, label %.thread, label %.thread.sink.split

15:                                               ; preds = %3
  %16 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.40, i64 8, ptr nonnull @.str.40, i64 8)
  %.not54 = icmp eq i32 %16, 0
  br i1 %.not54, label %25, label %17

17:                                               ; preds = %15
  %18 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.41, i64 5, ptr nonnull @.str.41, i64 5)
  %.not57 = icmp eq i32 %18, 0
  br i1 %.not57, label %.thread, label %19

19:                                               ; preds = %17
  %20 = call i32 @tnconv_number_match_push(ptr noundef nonnull %4, ptr noundef %2)
  %.not58 = icmp eq i32 %20, 0
  br i1 %.not58, label %.thread, label %21

21:                                               ; preds = %19
  %22 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.37, i64 6, ptr nonnull @.str.37, i64 6)
  %.not59 = icmp eq i32 %22, 0
  br i1 %.not59, label %.thread, label %23

23:                                               ; preds = %21
  %24 = call i32 @tnconv_number_match_push(ptr noundef nonnull %4, ptr noundef %2)
  %.not60 = icmp eq i32 %24, 0
  br i1 %.not60, label %.thread, label %.thread.sink.split

25:                                               ; preds = %15
  %26 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.42, i64 11, ptr nonnull @.str.42, i64 11)
  %.not55 = icmp eq i32 %26, 0
  br i1 %.not55, label %27, label %.thread

27:                                               ; preds = %25
  %28 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.43, i64 16, ptr nonnull @.str.43, i64 16)
  %.not56.not.not = icmp eq i32 %28, 0
  br i1 %.not56.not.not, label %35, label %.thread

.thread.sink.split:                               ; preds = %23, %13
  %29 = call i32 @tnconv_prefix_match_replace(ptr noundef nonnull %4, ptr noundef %2, ptr nonnull @.str.38, i64 13, ptr nonnull @.str.39, i64 10)
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %25, %17, %19, %21, %23, %7, %9, %11, %13, %27
  %30 = load i64, ptr %5, align 8, !tbaa !5
  %31 = trunc i64 %30 to i32
  %32 = load ptr, ptr %4, align 8, !tbaa !11
  %33 = load ptr, ptr @g_allocator_dopt, align 8, !tbaa !12
  %34 = call ptr @dynbuf_append(ptr noundef %2, i32 noundef %31, ptr noundef %32, i64 noundef 1, i32 noundef 1, ptr noundef %33)
  br label %35

35:                                               ; preds = %.thread, %27
  %.067 = phi i32 [ 1, %.thread ], [ 0, %27 ]
  ret i32 %.067
}

attributes #0 = { 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 = { inlinehint 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, !10, i64 8}
!6 = !{!"StrSlice", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!7, !7, i64 0}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass