; LLVM IR from hanzohasashi33/Competetive_programming :: Snippets/DSA_PROBLEMS (hashtable)

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

@hasharray = external dso_local global [997 x ptr], align 16
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @hashvalue(i32 noundef) #0

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @printlinkedlist(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %12 = call noalias ptr @malloc(i64 noundef 1000000) #6
  store ptr %12, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %13 = call noalias ptr @malloc(i64 noundef 1000000) #6
  store ptr %13, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %14)
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = call i64 @strlen(ptr noundef %18) #7
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = call i64 @strlen(ptr noundef %21) #7
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %37, %0
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %40

28:                                               ; preds = %24
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i8, ptr %29, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = sext i8 %33 to i32
  %35 = sub nsw i32 %34, 48
  %36 = trunc i32 %35 to i8
  store i8 %36, ptr %32, align 1, !tbaa !11
  br label %37

37:                                               ; preds = %28
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %6, align 4, !tbaa !9
  br label %24, !llvm.loop !12

40:                                               ; preds = %24
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %54, %40
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %45, label %57

45:                                               ; preds = %41
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %46, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !11
  %51 = sext i8 %50 to i32
  %52 = sub nsw i32 %51, 48
  %53 = trunc i32 %52 to i8
  store i8 %53, ptr %49, align 1, !tbaa !11
  br label %54

54:                                               ; preds = %45
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !9
  br label %41, !llvm.loop !14

57:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 2, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 0
  %60 = load i8, ptr %59, align 1, !tbaa !11
  %61 = sext i8 %60 to i32
  store i32 %61, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 0
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = sext i8 %64 to i32
  store i32 %65, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %94, %57
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %97

70:                                               ; preds = %66
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = mul nsw i32 %71, 2
  %73 = call i32 @hashvalue(i32 noundef %72)
  store i32 %73, ptr %8, align 4, !tbaa !9
  %74 = load i32, ptr %9, align 4, !tbaa !9
  %75 = mul nsw i32 %74, 2
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = sext i8 %80 to i32
  %82 = add nsw i32 %75, %81
  %83 = call i32 @hashvalue(i32 noundef %82)
  store i32 %83, ptr %9, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = mul nsw i32 %84, 2
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = sext i8 %90 to i32
  %92 = add nsw i32 %85, %91
  %93 = call i32 @hashvalue(i32 noundef %92)
  store i32 %93, ptr %10, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %70
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !9
  br label %66, !llvm.loop !15

97:                                               ; preds = %66
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %99
  call void @Insetatbeg(ptr noundef %100, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %137, %97
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = load i32, ptr %4, align 4, !tbaa !9
  %104 = load i32, ptr %5, align 4, !tbaa !9
  %105 = sub nsw i32 %103, %104
  %106 = add nsw i32 %105, 1
  %107 = icmp slt i32 %102, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %140

109:                                              ; preds = %101
  %110 = load i32, ptr %10, align 4, !tbaa !9
  %111 = mul nsw i32 %110, 2
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = load i32, ptr %5, align 4, !tbaa !9
  %115 = add nsw i32 %113, %114
  %116 = sub nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %112, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %120 = sext i8 %119 to i32
  %121 = add nsw i32 %111, %120
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i8, ptr %123, i64 %126
  %128 = load i8, ptr %127, align 1, !tbaa !11
  %129 = sext i8 %128 to i32
  %130 = mul nsw i32 %122, %129
  %131 = sub nsw i32 %121, %130
  %132 = call i32 @hashvalue(i32 noundef %131)
  store i32 %132, ptr %10, align 4, !tbaa !9
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %134
  %136 = load i32, ptr %11, align 4, !tbaa !9
  call void @Insetatbeg(ptr noundef %135, i32 noundef %136)
  br label %137

137:                                              ; preds = %109
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %11, align 4, !tbaa !9
  br label %101, !llvm.loop !16

140:                                              ; preds = %108
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %142
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  call void @printlinkedlist(ptr noundef %144)
  %145 = load i32, ptr %9, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = load i32, ptr %4, align 4, !tbaa !9
  %152 = load i32, ptr %5, align 4, !tbaa !9
  call void @traverse(ptr noundef %148, ptr noundef %149, ptr noundef %150, i32 noundef %151, i32 noundef %152)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(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 = { "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 willreturn memory(read) "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 = { nounwind }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


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

@hasharray = external dso_local global [997 x ptr], align 16
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @printlinkedlist(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noalias dereferenceable_or_null(1000000) ptr @malloc(i64 noundef 1000000) #4
  %2 = tail call noalias dereferenceable_or_null(1000000) ptr @malloc(i64 noundef 1000000) #4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef %1)
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef %2)
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #5
  %6 = trunc i64 %5 to i32
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #5
  %8 = trunc i64 %7 to i32
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %iter.check, label %.preheader

iter.check:                                       ; preds = %0
  %wide.trip.count = and i64 %7, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check97 = icmp ult i64 %wide.trip.count, 32
  br i1 %min.iters.check97, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.mod.vf = and i64 %7, 31
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %10 = getelementptr inbounds i8, ptr %1, i64 %index
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %wide.load = load <16 x i8>, ptr %10, align 1, !tbaa !5
  %wide.load98 = load <16 x i8>, ptr %11, align 1, !tbaa !5
  %12 = add <16 x i8> %wide.load, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %13 = add <16 x i8> %wide.load98, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <16 x i8> %12, ptr %10, align 1, !tbaa !5
  store <16 x i8> %13, ptr %11, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 32
  %14 = icmp eq i64 %index.next, %n.vec
  br i1 %14, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %.preheader, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %min.epilog.iters.check = icmp ult i64 %n.mod.vf, 8
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec100, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.mod.vf99 = and i64 %7, 7
  %n.vec100 = sub nsw i64 %wide.trip.count, %n.mod.vf99
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index101 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next103, %vec.epilog.vector.body ]
  %15 = getelementptr inbounds i8, ptr %1, i64 %index101
  %wide.load102 = load <8 x i8>, ptr %15, align 1, !tbaa !5
  %16 = add <8 x i8> %wide.load102, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <8 x i8> %16, ptr %15, align 1, !tbaa !5
  %index.next103 = add nuw i64 %index101, 8
  %17 = icmp eq i64 %index.next103, %n.vec100
  br i1 %17, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !12

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n104 = icmp eq i64 %n.mod.vf99, 0
  br i1 %cmp.n104, label %.preheader, label %.lr.ph.preheader

.preheader:                                       ; preds = %.lr.ph, %middle.block, %vec.epilog.middle.block, %0
  %18 = icmp sgt i32 %6, 0
  br i1 %18, label %iter.check108, label %._crit_edge

iter.check108:                                    ; preds = %.preheader
  %wide.trip.count79 = and i64 %5, 2147483647
  %min.iters.check106 = icmp ult i64 %wide.trip.count79, 8
  br i1 %min.iters.check106, label %.lr.ph55.preheader, label %vector.main.loop.iter.check110

vector.main.loop.iter.check110:                   ; preds = %iter.check108
  %min.iters.check109 = icmp ult i64 %wide.trip.count79, 32
  br i1 %min.iters.check109, label %vec.epilog.ph122, label %vector.ph111

vector.ph111:                                     ; preds = %vector.main.loop.iter.check110
  %n.mod.vf112 = and i64 %5, 31
  %n.vec113 = sub nsw i64 %wide.trip.count79, %n.mod.vf112
  br label %vector.body114

vector.body114:                                   ; preds = %vector.body114, %vector.ph111
  %index115 = phi i64 [ 0, %vector.ph111 ], [ %index.next118, %vector.body114 ]
  %19 = getelementptr inbounds i8, ptr %2, i64 %index115
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %wide.load116 = load <16 x i8>, ptr %19, align 1, !tbaa !5
  %wide.load117 = load <16 x i8>, ptr %20, align 1, !tbaa !5
  %21 = add <16 x i8> %wide.load116, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  %22 = add <16 x i8> %wide.load117, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <16 x i8> %21, ptr %19, align 1, !tbaa !5
  store <16 x i8> %22, ptr %20, align 1, !tbaa !5
  %index.next118 = add nuw i64 %index115, 32
  %23 = icmp eq i64 %index.next118, %n.vec113
  br i1 %23, label %middle.block105, label %vector.body114, !llvm.loop !13

middle.block105:                                  ; preds = %vector.body114
  %cmp.n119 = icmp eq i64 %n.mod.vf112, 0
  br i1 %cmp.n119, label %._crit_edge, label %vec.epilog.iter.check123

vec.epilog.iter.check123:                         ; preds = %middle.block105
  %min.epilog.iters.check125 = icmp ult i64 %n.mod.vf112, 8
  br i1 %min.epilog.iters.check125, label %.lr.ph55.preheader, label %vec.epilog.ph122

.lr.ph55.preheader:                               ; preds = %vec.epilog.middle.block120, %iter.check108, %vec.epilog.iter.check123
  %indvars.iv76.ph = phi i64 [ 0, %iter.check108 ], [ %n.vec113, %vec.epilog.iter.check123 ], [ %n.vec128, %vec.epilog.middle.block120 ]
  br label %.lr.ph55

vec.epilog.ph122:                                 ; preds = %vector.main.loop.iter.check110, %vec.epilog.iter.check123
  %vec.epilog.resume.val126 = phi i64 [ %n.vec113, %vec.epilog.iter.check123 ], [ 0, %vector.main.loop.iter.check110 ]
  %n.mod.vf127 = and i64 %5, 7
  %n.vec128 = sub nsw i64 %wide.trip.count79, %n.mod.vf127
  br label %vec.epilog.vector.body130

vec.epilog.vector.body130:                        ; preds = %vec.epilog.vector.body130, %vec.epilog.ph122
  %index131 = phi i64 [ %vec.epilog.resume.val126, %vec.epilog.ph122 ], [ %index.next133, %vec.epilog.vector.body130 ]
  %24 = getelementptr inbounds i8, ptr %2, i64 %index131
  %wide.load132 = load <8 x i8>, ptr %24, align 1, !tbaa !5
  %25 = add <8 x i8> %wide.load132, <i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48, i8 -48>
  store <8 x i8> %25, ptr %24, align 1, !tbaa !5
  %index.next133 = add nuw i64 %index131, 8
  %26 = icmp eq i64 %index.next133, %n.vec128
  br i1 %26, label %vec.epilog.middle.block120, label %vec.epilog.vector.body130, !llvm.loop !14

vec.epilog.middle.block120:                       ; preds = %vec.epilog.vector.body130
  %cmp.n134 = icmp eq i64 %n.mod.vf127, 0
  br i1 %cmp.n134, label %._crit_edge, label %.lr.ph55.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %27 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
  %28 = load i8, ptr %27, align 1, !tbaa !5
  %29 = add i8 %28, -48
  store i8 %29, ptr %27, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !15

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %.lr.ph55
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %.lr.ph55 ], [ %indvars.iv76.ph, %.lr.ph55.preheader ]
  %30 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv76
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %32 = add i8 %31, -48
  store i8 %32, ptr %30, align 1, !tbaa !5
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %._crit_edge, label %.lr.ph55, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph55, %middle.block105, %vec.epilog.middle.block120, %.preheader
  %33 = load i8, ptr %2, align 1, !tbaa !5
  %34 = sext i8 %33 to i32
  %35 = load i8, ptr %1, align 1, !tbaa !5
  %36 = sext i8 %35 to i32
  %37 = icmp sgt i32 %8, 1
  br i1 %37, label %.lr.ph61.preheader, label %._crit_edge62

.lr.ph61.preheader:                               ; preds = %._crit_edge
  %wide.trip.count84 = and i64 %7, 2147483647
  br label %.lr.ph61

.lr.ph61:                                         ; preds = %.lr.ph61.preheader, %.lr.ph61
  %indvars.iv81 = phi i64 [ 1, %.lr.ph61.preheader ], [ %indvars.iv.next82, %.lr.ph61 ]
  %.04559 = phi i32 [ %36, %.lr.ph61.preheader ], [ %51, %.lr.ph61 ]
  %.04658 = phi i32 [ %34, %.lr.ph61.preheader ], [ %45, %.lr.ph61 ]
  %.04757 = phi i32 [ 2, %.lr.ph61.preheader ], [ %39, %.lr.ph61 ]
  %38 = shl nsw i32 %.04757, 1
  %39 = tail call i32 @hashvalue(i32 noundef %38)
  %40 = shl nsw i32 %.04658, 1
  %41 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv81
  %42 = load i8, ptr %41, align 1, !tbaa !5
  %43 = sext i8 %42 to i32
  %44 = add nsw i32 %40, %43
  %45 = tail call i32 @hashvalue(i32 noundef %44)
  %46 = shl nsw i32 %.04559, 1
  %47 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv81
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %49 = sext i8 %48 to i32
  %50 = add nsw i32 %46, %49
  %51 = tail call i32 @hashvalue(i32 noundef %50)
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !17

._crit_edge62:                                    ; preds = %.lr.ph61, %._crit_edge
  %.047.lcssa = phi i32 [ 2, %._crit_edge ], [ %39, %.lr.ph61 ]
  %.046.lcssa = phi i32 [ %34, %._crit_edge ], [ %45, %.lr.ph61 ]
  %.045.lcssa = phi i32 [ %36, %._crit_edge ], [ %51, %.lr.ph61 ]
  %52 = sext i32 %.045.lcssa to i64
  %53 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %52
  tail call void @Insetatbeg(ptr noundef nonnull %53, i32 noundef 0)
  %invariant.gep = getelementptr i8, ptr %1, i64 -1
  %.not67.not = icmp sgt i32 %6, %8
  br i1 %.not67.not, label %.lr.ph71.preheader, label %._crit_edge72

.lr.ph71.preheader:                               ; preds = %._crit_edge62
  %sext = shl i64 %7, 32
  %54 = ashr exact i64 %sext, 32
  %55 = add i64 %5, 1
  %56 = sub i64 %55, %7
  %wide.trip.count89 = and i64 %56, 4294967295
  %invariant.gep93 = getelementptr i8, ptr %invariant.gep, i64 %54
  br label %.lr.ph71

._crit_edge72:                                    ; preds = %.lr.ph71, %._crit_edge62
  %57 = sext i32 %.046.lcssa to i64
  %58 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  tail call void @printlinkedlist(ptr noundef %59)
  %60 = load ptr, ptr %58, align 8, !tbaa !18
  tail call void @traverse(ptr noundef %60, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %6, i32 noundef %8)
  ret i32 0

.lr.ph71:                                         ; preds = %.lr.ph71.preheader, %.lr.ph71
  %indvars.iv86 = phi i64 [ 1, %.lr.ph71.preheader ], [ %indvars.iv.next87, %.lr.ph71 ]
  %.168 = phi i32 [ %.045.lcssa, %.lr.ph71.preheader ], [ %69, %.lr.ph71 ]
  %61 = shl nsw i32 %.168, 1
  %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %indvars.iv86
  %62 = load i8, ptr %gep94, align 1, !tbaa !5
  %63 = sext i8 %62 to i32
  %64 = add nsw i32 %61, %63
  %gep66 = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv86
  %65 = load i8, ptr %gep66, align 1, !tbaa !5
  %66 = sext i8 %65 to i32
  %67 = mul i32 %.047.lcssa, %66
  %68 = sub i32 %64, %67
  %69 = tail call i32 @hashvalue(i32 noundef %68)
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [997 x ptr], ptr @hasharray, i64 0, i64 %70
  %72 = trunc nuw nsw i64 %indvars.iv86 to i32
  tail call void @Insetatbeg(ptr noundef nonnull %71, i32 noundef %72)
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge72, label %.lr.ph71, !llvm.loop !20
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 allocsize(0) }
attributes #5 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9, !10, !11}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !9, !10, !11}
!13 = distinct !{!13, !9, !10, !11}
!14 = distinct !{!14, !9, !10, !11}
!15 = distinct !{!15, !9, !11, !10}
!16 = distinct !{!16, !9, !11, !10}
!17 = distinct !{!17, !9}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !6, i64 0}
!20 = distinct !{!20, !9}


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