; LLVM IR from jspd-group/pegit :: src (delta)

; 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.delta_table = type { ptr, ptr, ptr, i32, i32 }
%struct.basic_delta_result = type { i64, i64, i64, ptr, %struct.strbuf_list, %struct.strbuf_list }
%struct.strbuf_list = type { ptr, ptr, i64 }
%struct.deltafile = type { %struct.strbuf, ptr, i64, i8 }
%struct.strbuf = type { i64, i64, ptr }

@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 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
define dso_local i32 @delta_backtrace_table(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.delta_table, ptr %16, i32 0, i32 2
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.delta_table, ptr %19, i32 0, i32 4
  %21 = load i32, ptr %20, align 4, !tbaa !12
  %22 = sub nsw i32 %21, 1
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i32, ptr %18, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %26 = sext i32 %25 to i64
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.basic_delta_result, ptr %27, i32 0, i32 2
  store i64 %26, ptr %28, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.delta_table, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  store ptr %31, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.delta_table, ptr %32, i32 0, i32 3
  %34 = load i32, ptr %33, align 8, !tbaa !19
  store i32 %34, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.delta_table, ptr %35, i32 0, i32 4
  %37 = load i32, ptr %36, align 4, !tbaa !12
  store i32 %37, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.deltafile, ptr %38, i32 0, i32 0
  store ptr %39, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.deltafile, ptr %40, i32 0, i32 0
  store ptr %41, ptr %15, align 8, !tbaa !5
  %42 = load i32, ptr %12, align 4, !tbaa !13
  %43 = sub nsw i32 %42, 1
  store i32 %43, ptr %9, align 4, !tbaa !13
  %44 = load i32, ptr %13, align 4, !tbaa !13
  %45 = sub nsw i32 %44, 1
  store i32 %45, ptr %10, align 4, !tbaa !13
  br label %46

46:                                               ; preds = %199, %4
  %47 = load i32, ptr %9, align 4, !tbaa !13
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %46
  %50 = load i32, ptr %10, align 4, !tbaa !13
  %51 = icmp ne i32 %50, 0
  br label %52

52:                                               ; preds = %49, %46
  %53 = phi i1 [ false, %46 ], [ %51, %49 ]
  br i1 %53, label %54, label %200

54:                                               ; preds = %52
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !13
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %55, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = load i32, ptr %10, align 4, !tbaa !13
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %59, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !13
  switch i32 %63, label %185 [
    i32 0, label %64
    i32 1, label %105
    i32 2, label %146
  ]

64:                                               ; preds = %54
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.basic_delta_result, ptr %65, i32 0, i32 1
  %67 = load i64, ptr %66, align 8, !tbaa !20
  %68 = add i64 %67, 1
  store i64 %68, ptr %66, align 8, !tbaa !20
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.basic_delta_result, ptr %69, i32 0, i32 5
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.strbuf, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.deltafile, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  %77 = load i32, ptr %9, align 4, !tbaa !13
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i64, ptr %76, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !25
  %82 = getelementptr inbounds i8, ptr %73, i64 %81
  %83 = getelementptr inbounds i8, ptr %82, i64 1
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.deltafile, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !23
  %87 = load i32, ptr %9, align 4, !tbaa !13
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i64, ptr %86, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !25
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.deltafile, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !23
  %94 = load i32, ptr %9, align 4, !tbaa !13
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i64, ptr %93, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !25
  %99 = sub nsw i64 %90, %98
  %100 = load i32, ptr %9, align 4, !tbaa !13
  %101 = sext i32 %100 to i64
  %102 = call i32 @strbuf_list_add(ptr noundef %70, ptr noundef %83, i64 noundef %99, i8 noundef signext 45, i64 noundef %101)
  %103 = load i32, ptr %9, align 4, !tbaa !13
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr %9, align 4, !tbaa !13
  br label %199

105:                                              ; preds = %54
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.basic_delta_result, ptr %106, i32 0, i32 0
  %108 = load i64, ptr %107, align 8, !tbaa !26
  %109 = add i64 %108, 1
  store i64 %109, ptr %107, align 8, !tbaa !26
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.basic_delta_result, ptr %110, i32 0, i32 5
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.strbuf, ptr %112, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.deltafile, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !23
  %118 = load i32, ptr %10, align 4, !tbaa !13
  %119 = sub nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i64, ptr %117, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !25
  %123 = getelementptr inbounds i8, ptr %114, i64 %122
  %124 = getelementptr inbounds i8, ptr %123, i64 1
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.deltafile, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !23
  %128 = load i32, ptr %10, align 4, !tbaa !13
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i64, ptr %127, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !25
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.deltafile, ptr %132, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !23
  %135 = load i32, ptr %10, align 4, !tbaa !13
  %136 = sub nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i64, ptr %134, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !25
  %140 = sub nsw i64 %131, %139
  %141 = load i32, ptr %10, align 4, !tbaa !13
  %142 = sext i32 %141 to i64
  %143 = call i32 @strbuf_list_add(ptr noundef %111, ptr noundef %124, i64 noundef %140, i8 noundef signext 43, i64 noundef %142)
  %144 = load i32, ptr %10, align 4, !tbaa !13
  %145 = add nsw i32 %144, -1
  store i32 %145, ptr %10, align 4, !tbaa !13
  br label %199

146:                                              ; preds = %54
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.basic_delta_result, ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.strbuf, ptr %149, i32 0, i32 2
  %151 = load ptr, ptr %150, align 8, !tbaa !21
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.deltafile, ptr %152, i32 0, i32 1
  %154 = load ptr, ptr %153, align 8, !tbaa !23
  %155 = load i32, ptr %10, align 4, !tbaa !13
  %156 = sub nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i64, ptr %154, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !25
  %160 = getelementptr inbounds i8, ptr %151, i64 %159
  %161 = getelementptr inbounds i8, ptr %160, i64 1
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.deltafile, ptr %162, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8, !tbaa !23
  %165 = load i32, ptr %10, align 4, !tbaa !13
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i64, ptr %164, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !25
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.deltafile, ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !23
  %172 = load i32, ptr %10, align 4, !tbaa !13
  %173 = sub nsw i32 %172, 1
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i64, ptr %171, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !25
  %177 = sub nsw i64 %168, %176
  %178 = load i32, ptr %10, align 4, !tbaa !13
  %179 = sext i32 %178 to i64
  %180 = call i32 @strbuf_list_add(ptr noundef %148, ptr noundef %161, i64 noundef %177, i8 noundef signext 126, i64 noundef %179)
  %181 = load i32, ptr %10, align 4, !tbaa !13
  %182 = add nsw i32 %181, -1
  store i32 %182, ptr %10, align 4, !tbaa !13
  %183 = load i32, ptr %9, align 4, !tbaa !13
  %184 = add nsw i32 %183, -1
  store i32 %184, ptr %9, align 4, !tbaa !13
  br label %199

185:                                              ; preds = %54
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr @stderr, align 8, !tbaa !5
  %188 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef @.str.2) #4
  %189 = load ptr, ptr @stderr, align 8, !tbaa !5
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.3) #4
  %191 = load ptr, ptr @stderr, align 8, !tbaa !5
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.4) #4
  %193 = load ptr, ptr @stderr, align 8, !tbaa !5
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.5) #4
  %195 = load ptr, ptr @stderr, align 8, !tbaa !5
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.6) #4
  call void @exit(i32 noundef 1) #5
  unreachable

197:                                              ; No predecessors!
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198, %146, %105, %64
  br label %46, !llvm.loop !27

200:                                              ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret i32 0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @strbuf_list_add(ptr noundef, ptr noundef, i64 noundef, i8 noundef signext, i64 noundef) #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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 = { 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 #3 = { noreturn 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 #4 = { nounwind }
attributes #5 = { noreturn 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, !6, i64 16}
!10 = !{!"delta_table", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 28}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !16, i64 16}
!15 = !{!"basic_delta_result", !16, i64 0, !16, i64 8, !16, i64 16, !6, i64 24, !17, i64 32, !17, i64 56}
!16 = !{!"long", !7, i64 0}
!17 = !{!"strbuf_list", !6, i64 0, !6, i64 8, !16, i64 16}
!18 = !{!10, !6, i64 0}
!19 = !{!10, !11, i64 24}
!20 = !{!15, !16, i64 8}
!21 = !{!22, !6, i64 16}
!22 = !{!"strbuf", !16, i64 0, !16, i64 8, !6, i64 16}
!23 = !{!24, !6, i64 24}
!24 = !{!"deltafile", !22, i64 0, !6, i64 24, !16, i64 32, !7, i64 40}
!25 = !{!16, !16, i64 0}
!26 = !{!15, !16, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; 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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @delta_backtrace_table(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 28
  %8 = load i32, ptr %7, align 4, !tbaa !11
  %9 = sext i32 %8 to i64
  %10 = getelementptr i32, ptr %6, i64 %9
  %11 = getelementptr i8, ptr %10, i64 -4
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %13, ptr %14, align 8, !tbaa !13
  %15 = load ptr, ptr %1, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %1, i64 24
  %17 = load i32, ptr %16, align 8, !tbaa !18
  %18 = add nsw i32 %17, -1
  %19 = add nsw i32 %8, -1
  %20 = icmp ne i32 %18, 0
  %21 = icmp ne i32 %19, 0
  %22 = select i1 %20, i1 %21, i1 false
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = getelementptr inbounds i8, ptr %2, i64 16
  %25 = getelementptr inbounds i8, ptr %2, i64 24
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  %28 = getelementptr inbounds i8, ptr %3, i64 16
  %29 = getelementptr inbounds i8, ptr %3, i64 24
  br label %30

30:                                               ; preds = %.lr.ph, %89
  %.050 = phi i32 [ %18, %.lr.ph ], [ %.1, %89 ]
  %.04749 = phi i32 [ %19, %.lr.ph ], [ %.148, %89 ]
  %31 = sext i32 %.050 to i64
  %32 = getelementptr inbounds ptr, ptr %15, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !19
  %34 = sext i32 %.04749 to i64
  %35 = getelementptr inbounds i32, ptr %33, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !12
  switch i32 %36, label %78 [
    i32 0, label %37
    i32 1, label %51
    i32 2, label %65
  ]

37:                                               ; preds = %30
  %38 = load i64, ptr %27, align 8, !tbaa !20
  %39 = add i64 %38, 1
  store i64 %39, ptr %27, align 8, !tbaa !20
  %40 = load ptr, ptr %28, align 8, !tbaa !21
  %41 = load ptr, ptr %29, align 8, !tbaa !23
  %42 = getelementptr i64, ptr %41, i64 %31
  %43 = getelementptr i8, ptr %42, i64 -8
  %44 = load i64, ptr %43, align 8, !tbaa !25
  %45 = getelementptr inbounds i8, ptr %40, i64 %44
  %46 = getelementptr inbounds i8, ptr %45, i64 1
  %47 = load i64, ptr %42, align 8, !tbaa !25
  %48 = sub nsw i64 %47, %44
  %49 = tail call i32 @strbuf_list_add(ptr noundef nonnull %26, ptr noundef nonnull %46, i64 noundef %48, i8 noundef signext 45, i64 noundef %31)
  %50 = add nsw i32 %.050, -1
  br label %89

51:                                               ; preds = %30
  %52 = load i64, ptr %0, align 8, !tbaa !26
  %53 = add i64 %52, 1
  store i64 %53, ptr %0, align 8, !tbaa !26
  %54 = load ptr, ptr %24, align 8, !tbaa !21
  %55 = load ptr, ptr %25, align 8, !tbaa !23
  %56 = getelementptr i64, ptr %55, i64 %34
  %57 = getelementptr i8, ptr %56, i64 -8
  %58 = load i64, ptr %57, align 8, !tbaa !25
  %59 = getelementptr inbounds i8, ptr %54, i64 %58
  %60 = getelementptr inbounds i8, ptr %59, i64 1
  %61 = load i64, ptr %56, align 8, !tbaa !25
  %62 = sub nsw i64 %61, %58
  %63 = tail call i32 @strbuf_list_add(ptr noundef nonnull %26, ptr noundef nonnull %60, i64 noundef %62, i8 noundef signext 43, i64 noundef %34)
  %64 = add nsw i32 %.04749, -1
  br label %89

65:                                               ; preds = %30
  %66 = load ptr, ptr %24, align 8, !tbaa !21
  %67 = load ptr, ptr %25, align 8, !tbaa !23
  %68 = getelementptr i64, ptr %67, i64 %34
  %69 = getelementptr i8, ptr %68, i64 -8
  %70 = load i64, ptr %69, align 8, !tbaa !25
  %71 = getelementptr inbounds i8, ptr %66, i64 %70
  %72 = getelementptr inbounds i8, ptr %71, i64 1
  %73 = load i64, ptr %68, align 8, !tbaa !25
  %74 = sub nsw i64 %73, %70
  %75 = tail call i32 @strbuf_list_add(ptr noundef nonnull %23, ptr noundef nonnull %72, i64 noundef %74, i8 noundef signext 126, i64 noundef %34)
  %76 = add nsw i32 %.04749, -1
  %77 = add nsw i32 %.050, -1
  br label %89

78:                                               ; preds = %30
  %79 = load ptr, ptr @stderr, align 8, !tbaa !19
  %80 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.2) #3
  %81 = load ptr, ptr @stderr, align 8, !tbaa !19
  %82 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.3) #3
  %83 = load ptr, ptr @stderr, align 8, !tbaa !19
  %84 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.4) #3
  %85 = load ptr, ptr @stderr, align 8, !tbaa !19
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.5) #3
  %87 = load ptr, ptr @stderr, align 8, !tbaa !19
  %88 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.6) #3
  tail call void @exit(i32 noundef 1) #4
  unreachable

89:                                               ; preds = %65, %51, %37
  %.148 = phi i32 [ %76, %65 ], [ %64, %51 ], [ %.04749, %37 ]
  %.1 = phi i32 [ %77, %65 ], [ %.050, %51 ], [ %50, %37 ]
  %90 = icmp ne i32 %.1, 0
  %91 = icmp ne i32 %.148, 0
  %92 = select i1 %90, i1 %91, i1 false
  br i1 %92, label %30, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %89, %4
  ret i32 0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @strbuf_list_add(ptr noundef, ptr noundef, i64 noundef, i8 noundef signext, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

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 = { 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 #2 = { noreturn 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 #3 = { cold nounwind }
attributes #4 = { noreturn 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 16}
!6 = !{!"delta_table", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 28}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !15, i64 16}
!14 = !{!"basic_delta_result", !15, i64 0, !15, i64 8, !15, i64 16, !7, i64 24, !16, i64 32, !16, i64 56}
!15 = !{!"long", !8, i64 0}
!16 = !{!"strbuf_list", !7, i64 0, !7, i64 8, !15, i64 16}
!17 = !{!6, !7, i64 0}
!18 = !{!6, !10, i64 24}
!19 = !{!7, !7, i64 0}
!20 = !{!14, !15, i64 8}
!21 = !{!22, !7, i64 16}
!22 = !{!"strbuf", !15, i64 0, !15, i64 8, !7, i64 16}
!23 = !{!24, !7, i64 24}
!24 = !{!"deltafile", !22, i64 0, !7, i64 24, !15, i64 32, !8, i64 40}
!25 = !{!15, !15, i64 0}
!26 = !{!14, !15, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass