; LLVM IR from DanEngelbrecht/longtail :: lib/hpcdcchunker (longtail_hpcdcchunker)

; 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.Longtail_HPCDCChunker = type { %struct.Longtail_HPCDCChunkerParams, %struct.HPCDCArray, i32, i32, i32, [48 x i8], i32, ptr, ptr, i64 }
%struct.Longtail_HPCDCChunkerParams = type { i32, i32, i32 }
%struct.HPCDCArray = type { ptr, i32 }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@hashTable = external hidden global [256 x i32], align 16
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@__func__.HPCDCChunker_NextChunkFromBuffer = external hidden unnamed_addr constant [33 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 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

declare void @Longtail_CallLogger(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

; 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 @HPCDCChunker_NextChunkFromBuffer(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) #2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %32, label %30

30:                                               ; preds = %5
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str, ptr noundef @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 470, ptr noundef %31, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.6)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %208

32:                                               ; preds = %5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %37, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str, ptr noundef @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 471, ptr noundef %36, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.14)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %208

37:                                               ; preds = %32
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %42, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str, ptr noundef @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 472, ptr noundef %41, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.17)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %208

42:                                               ; preds = %37
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = icmp ugt i64 %43, 0
  br i1 %44, label %47, label %45

45:                                               ; preds = %42
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str, ptr noundef @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 473, ptr noundef %46, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.18)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %208

47:                                               ; preds = %42
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %52, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef @.str, ptr noundef @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 474, ptr noundef %51, i32 noundef 3, ptr noundef @.str.8, ptr noundef @.str.19)
  store i32 22, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %208

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %53, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %54, ptr %15, align 8, !tbaa !5
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !11
  %60 = zext i32 %59 to i64
  %61 = icmp ule i64 %55, %60
  br i1 %61, label %62, label %67

62:                                               ; preds = %52
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = load i64, ptr %10, align 8, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %63, i64 %64
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %65, ptr %66, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %207

67:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %68, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !16
  br label %69

69:                                               ; preds = %107, %67
  %70 = load i32, ptr %18, align 4, !tbaa !16
  %71 = icmp ult i32 %70, 48
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %110

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #3
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load i32, ptr %18, align 4, !tbaa !16
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %74, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !17
  store i8 %78, ptr %19, align 1, !tbaa !17
  %79 = load i8, ptr %19, align 1, !tbaa !17
  %80 = zext i8 %79 to i64
  %81 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !16
  %83 = load i32, ptr %18, align 4, !tbaa !16
  %84 = sub i32 48, %83
  %85 = sub i32 %84, 1
  %86 = and i32 %85, 31
  %87 = shl i32 %82, %86
  %88 = load i8, ptr %19, align 1, !tbaa !17
  %89 = zext i8 %88 to i64
  %90 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !16
  %92 = load i32, ptr %18, align 4, !tbaa !16
  %93 = sub i32 48, %92
  %94 = sub i32 %93, 1
  %95 = and i32 %94, 31
  %96 = sub nsw i32 32, %95
  %97 = lshr i32 %91, %96
  %98 = or i32 %87, %97
  %99 = load i32, ptr %17, align 4, !tbaa !16
  %100 = xor i32 %99, %98
  store i32 %100, ptr %17, align 4, !tbaa !16
  %101 = load i8, ptr %19, align 1, !tbaa !17
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %102, i32 0, i32 5
  %104 = load i32, ptr %18, align 4, !tbaa !16
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds [48 x i8], ptr %103, i64 0, i64 %105
  store i8 %101, ptr %106, align 1, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #3
  br label %107

107:                                              ; preds = %73
  %108 = load i32, ptr %18, align 4, !tbaa !16
  %109 = add i32 %108, 1
  store i32 %109, ptr %18, align 4, !tbaa !16
  br label %69, !llvm.loop !18

110:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !11
  store i32 %114, ptr %20, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %115 = load i64, ptr %10, align 8, !tbaa !9
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 8, !tbaa !20
  %120 = zext i32 %119 to i64
  %121 = icmp ugt i64 %115, %120
  br i1 %121, label %122, label %128

122:                                              ; preds = %110
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.Longtail_HPCDCChunkerParams, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 8, !tbaa !20
  %127 = zext i32 %126 to i64
  br label %130

128:                                              ; preds = %110
  %129 = load i64, ptr %10, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %128, %122
  %131 = phi i64 [ %127, %122 ], [ %129, %128 ]
  %132 = trunc i64 %131 to i32
  store i32 %132, ptr %22, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %133, i32 0, i32 5
  %135 = getelementptr inbounds [48 x i8], ptr %134, i64 0, i64 0
  store ptr %135, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %136, i32 0, i32 6
  %138 = load i32, ptr %137, align 4, !tbaa !21
  %139 = sub i32 %138, 1
  store i32 %139, ptr %24, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.Longtail_HPCDCChunker, ptr %140, i32 0, i32 6
  %142 = load i32, ptr %141, align 4, !tbaa !21
  store i32 %142, ptr %25, align 4, !tbaa !16
  br label %143

143:                                              ; preds = %200, %130
  %144 = load i32, ptr %20, align 4, !tbaa !16
  %145 = load i32, ptr %22, align 4, !tbaa !16
  %146 = icmp ult i32 %144, %145
  br i1 %146, label %147, label %201

147:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #3
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = load i32, ptr %20, align 4, !tbaa !16
  %150 = add i32 %149, 1
  store i32 %150, ptr %20, align 4, !tbaa !16
  %151 = zext i32 %149 to i64
  %152 = getelementptr inbounds i8, ptr %148, i64 %151
  %153 = load i8, ptr %152, align 1, !tbaa !17
  store i8 %153, ptr %26, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #3
  %154 = load ptr, ptr %23, align 8, !tbaa !5
  %155 = load i32, ptr %21, align 4, !tbaa !16
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds i8, ptr %154, i64 %156
  %158 = load i8, ptr %157, align 1, !tbaa !17
  store i8 %158, ptr %27, align 1, !tbaa !17
  %159 = load i8, ptr %26, align 1, !tbaa !17
  %160 = load ptr, ptr %23, align 8, !tbaa !5
  %161 = load i32, ptr %21, align 4, !tbaa !16
  %162 = add i32 %161, 1
  store i32 %162, ptr %21, align 4, !tbaa !16
  %163 = zext i32 %161 to i64
  %164 = getelementptr inbounds i8, ptr %160, i64 %163
  store i8 %159, ptr %164, align 1, !tbaa !17
  %165 = load i32, ptr %17, align 4, !tbaa !16
  %166 = shl i32 %165, 1
  %167 = load i32, ptr %17, align 4, !tbaa !16
  %168 = lshr i32 %167, 31
  %169 = or i32 %166, %168
  %170 = load i8, ptr %27, align 1, !tbaa !17
  %171 = zext i8 %170 to i64
  %172 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !16
  %174 = shl i32 %173, 16
  %175 = load i8, ptr %27, align 1, !tbaa !17
  %176 = zext i8 %175 to i64
  %177 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !16
  %179 = lshr i32 %178, 16
  %180 = or i32 %174, %179
  %181 = xor i32 %169, %180
  %182 = load i8, ptr %26, align 1, !tbaa !17
  %183 = zext i8 %182 to i64
  %184 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !16
  %186 = xor i32 %181, %185
  store i32 %186, ptr %17, align 4, !tbaa !16
  %187 = load i32, ptr %17, align 4, !tbaa !16
  %188 = load i32, ptr %25, align 4, !tbaa !16
  %189 = urem i32 %187, %188
  %190 = load i32, ptr %24, align 4, !tbaa !16
  %191 = icmp eq i32 %189, %190
  br i1 %191, label %192, label %193

192:                                              ; preds = %147
  store i32 6, ptr %13, align 4
  br label %198

193:                                              ; preds = %147
  %194 = load i32, ptr %21, align 4, !tbaa !16
  %195 = icmp eq i32 %194, 48
  br i1 %195, label %196, label %197

196:                                              ; preds = %193
  store i32 0, ptr %21, align 4, !tbaa !16
  br label %197

197:                                              ; preds = %196, %193
  store i32 0, ptr %13, align 4
  br label %198

198:                                              ; preds = %197, %192
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #3
  %199 = load i32, ptr %13, align 4
  switch i32 %199, label %210 [
    i32 0, label %200
    i32 6, label %201
  ]

200:                                              ; preds = %198
  br label %143, !llvm.loop !22

201:                                              ; preds = %198, %143
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = load i32, ptr %20, align 4, !tbaa !16
  %204 = zext i32 %203 to i64
  %205 = getelementptr inbounds i8, ptr %202, i64 %204
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %205, ptr %206, align 8, !tbaa !5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %207

207:                                              ; preds = %201, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %208

208:                                              ; preds = %207, %50, %45, %40, %35, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %209 = load i32, ptr %6, align 4
  ret i32 %209

210:                                              ; preds = %198
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = !{!"long", !7, i64 0}
!11 = !{!12, !14, i64 0}
!12 = !{!"Longtail_HPCDCChunker", !13, i64 0, !15, i64 16, !14, i64 32, !14, i64 36, !14, i64 40, !7, i64 44, !14, i64 92, !6, i64 96, !6, i64 104, !10, i64 112}
!13 = !{!"Longtail_HPCDCChunkerParams", !14, i64 0, !14, i64 4, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"HPCDCArray", !6, i64 0, !14, i64 8}
!16 = !{!14, !14, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !14, i64 8}
!21 = !{!12, !14, i64 92}
!22 = distinct !{!22, !19}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@hashTable = external hidden local_unnamed_addr global [256 x i32], align 16
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@__func__.HPCDCChunker_NextChunkFromBuffer = external hidden unnamed_addr constant [33 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1

declare void @Longtail_CallLogger(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 23) i32 @HPCDCChunker_NextChunkFromBuffer(ptr noundef readnone %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef writeonly %4) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %7

6:                                                ; preds = %5
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 470, ptr noundef null, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.6) #3
  br label %81

7:                                                ; preds = %5
  %.not72 = icmp eq ptr %1, null
  br i1 %.not72, label %8, label %9

8:                                                ; preds = %7
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 471, ptr noundef null, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.14) #3
  br label %81

9:                                                ; preds = %7
  %.not73 = icmp eq ptr %2, null
  br i1 %.not73, label %10, label %11

10:                                               ; preds = %9
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 472, ptr noundef null, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.17) #3
  br label %81

11:                                               ; preds = %9
  %.not74 = icmp eq i64 %3, 0
  br i1 %.not74, label %12, label %13

12:                                               ; preds = %11
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 473, ptr noundef null, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.18) #3
  br label %81

13:                                               ; preds = %11
  %.not75 = icmp eq ptr %4, null
  br i1 %.not75, label %14, label %15

14:                                               ; preds = %13
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @Longtail_CallLogger(ptr noundef nonnull @.str, ptr noundef nonnull @__func__.HPCDCChunker_NextChunkFromBuffer, i32 noundef 474, ptr noundef null, i32 noundef 3, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.19) #3
  br label %81

15:                                               ; preds = %13
  %16 = load i32, ptr %1, align 8, !tbaa !5
  %17 = zext i32 %16 to i64
  %.not76 = icmp ult i64 %17, %3
  br i1 %.not76, label %.preheader, label %split

.preheader:                                       ; preds = %15
  %18 = getelementptr inbounds i8, ptr %1, i64 44
  br label %29

19:                                               ; preds = %29
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !14
  %22 = zext i32 %21 to i64
  %23 = icmp ult i64 %22, %3
  %24 = trunc nuw i64 %3 to i32
  %25 = select i1 %23, i32 %21, i32 %24
  %26 = getelementptr inbounds i8, ptr %1, i64 92
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %28 = add i32 %27, -1
  %umax = tail call i32 @llvm.umax.i32(i32 %25, i32 %16)
  %wide.trip.count = zext i32 %umax to i64
  br label %60

29:                                               ; preds = %29, %.preheader
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next.2, %29 ]
  %.06178 = phi i32 [ 0, %.preheader ], [ %58, %29 ]
  %30 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  %31 = load i8, ptr %30, align 1, !tbaa !16
  %32 = zext i8 %31 to i64
  %33 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !17
  %35 = trunc i64 %indvars.iv to i32
  %36 = sub nsw i32 15, %35
  %37 = tail call i32 @llvm.fshl.i32(i32 %34, i32 %34, i32 %36)
  %38 = xor i32 %37, %.06178
  %39 = getelementptr inbounds [48 x i8], ptr %18, i64 0, i64 %indvars.iv
  store i8 %31, ptr %39, align 1, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next
  %41 = load i8, ptr %40, align 1, !tbaa !16
  %42 = zext i8 %41 to i64
  %43 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !17
  %45 = trunc i64 %indvars.iv.next to i32
  %46 = sub nsw i32 15, %45
  %47 = tail call i32 @llvm.fshl.i32(i32 %44, i32 %44, i32 %46)
  %48 = xor i32 %47, %38
  %49 = getelementptr inbounds [48 x i8], ptr %18, i64 0, i64 %indvars.iv.next
  store i8 %41, ptr %49, align 1, !tbaa !16
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %50 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next.1
  %51 = load i8, ptr %50, align 1, !tbaa !16
  %52 = zext i8 %51 to i64
  %53 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !17
  %55 = trunc i64 %indvars.iv.next.1 to i32
  %56 = sub nsw i32 15, %55
  %57 = tail call i32 @llvm.fshl.i32(i32 %54, i32 %54, i32 %56)
  %58 = xor i32 %57, %48
  %59 = getelementptr inbounds [48 x i8], ptr %18, i64 0, i64 %indvars.iv.next.1
  store i8 %51, ptr %59, align 1, !tbaa !16
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 48
  br i1 %exitcond.not.2, label %19, label %29, !llvm.loop !18

60:                                               ; preds = %61, %19
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %61 ], [ %17, %19 ]
  %.066 = phi i32 [ %spec.store.select, %61 ], [ 0, %19 ]
  %.162 = phi i32 [ %77, %61 ], [ %58, %19 ]
  %exitcond83.not = icmp eq i64 %indvars.iv80, %wide.trip.count
  br i1 %exitcond83.not, label %split, label %61

61:                                               ; preds = %60
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %62 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv80
  %63 = load i8, ptr %62, align 1, !tbaa !16
  %64 = zext i32 %.066 to i64
  %65 = getelementptr inbounds i8, ptr %18, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !16
  %67 = add i32 %.066, 1
  store i8 %63, ptr %65, align 1, !tbaa !16
  %68 = tail call i32 @llvm.fshl.i32(i32 %.162, i32 %.162, i32 1)
  %69 = zext i8 %66 to i64
  %70 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !17
  %72 = tail call i32 @llvm.fshl.i32(i32 %71, i32 %71, i32 16)
  %73 = xor i32 %72, %68
  %74 = zext i8 %63 to i64
  %75 = getelementptr inbounds [256 x i32], ptr @hashTable, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !17
  %77 = xor i32 %73, %76
  %78 = urem i32 %77, %27
  %79 = icmp eq i32 %78, %28
  %80 = icmp eq i32 %67, 48
  %spec.store.select = select i1 %80, i32 0, i32 %67
  br i1 %79, label %._crit_edge, label %60

._crit_edge:                                      ; preds = %61
  %.pre = and i64 %indvars.iv.next81, 4294967295
  br label %split

split:                                            ; preds = %60, %._crit_edge, %15
  %.pn = phi i64 [ %3, %15 ], [ %.pre, %._crit_edge ], [ %wide.trip.count, %60 ]
  %storemerge = getelementptr inbounds i8, ptr %2, i64 %.pn
  store ptr %storemerge, ptr %4, align 8, !tbaa !20
  br label %81

81:                                               ; preds = %split, %14, %12, %10, %8, %6
  %.1 = phi i32 [ 0, %split ], [ 22, %14 ], [ 22, %12 ], [ 22, %10 ], [ 22, %8 ], [ 22, %6 ]
  ret i32 %.1
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.fshl.i32(i32, i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #2

attributes #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !8, i64 0}
!6 = !{!"Longtail_HPCDCChunker", !7, i64 0, !11, i64 16, !8, i64 32, !8, i64 36, !8, i64 40, !9, i64 44, !8, i64 92, !12, i64 96, !12, i64 104, !13, i64 112}
!7 = !{!"Longtail_HPCDCChunkerParams", !8, i64 0, !8, i64 4, !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"HPCDCArray", !12, i64 0, !8, i64 8}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"long", !9, i64 0}
!14 = !{!6, !8, i64 8}
!15 = !{!6, !8, i64 92}
!16 = !{!9, !9, i64 0}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !12, i64 0}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass