; LLVM IR from ryanlayer/giggle :: test/unit (test_giggle)

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

@ORDER = external dso_local global i32, align 4
@cache = external dso_local global %struct.cache_def, align 8

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

declare ptr @simple_cache_init(i32 noundef, i32 noundef, ptr noundef) #1

declare i32 @giggle_insert(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef) #1

declare void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #1

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

declare void @wah_giggle_set_data_handler(...) #1

declare i32 @wah_get_ints(ptr noundef, ptr noundef) #1

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

declare ptr @giggle_search(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_wah_giggle_search() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store i32 7, ptr @ORDER, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %8 = call ptr @simple_cache_init(i32 noundef 5, i32 noundef 1, ptr noundef null)
  store ptr %8, ptr %1, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  call void (...) @wah_giggle_set_data_handler()
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = call i32 @giggle_insert(i32 noundef %9, ptr noundef %3, i32 noundef 1, i32 noundef 10, i64 noundef 0)
  store i32 %10, ptr %4, align 4, !tbaa !5
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = call i32 @giggle_insert(i32 noundef %11, ptr noundef %3, i32 noundef 11, i32 noundef 13, i64 noundef 1)
  store i32 %12, ptr %4, align 4, !tbaa !5
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = call i32 @giggle_insert(i32 noundef %13, ptr noundef %3, i32 noundef 2, i32 noundef 4, i64 noundef 2)
  store i32 %14, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = call i32 @giggle_insert(i32 noundef %15, ptr noundef %3, i32 noundef 5, i32 noundef 8, i64 noundef 3)
  store i32 %16, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = call i32 @giggle_insert(i32 noundef %17, ptr noundef %3, i32 noundef 3, i32 noundef 6, i64 noundef 4)
  store i32 %18, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = call i32 @giggle_insert(i32 noundef %19, ptr noundef %3, i32 noundef 7, i32 noundef 9, i64 noundef 5)
  store i32 %20, ptr %4, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = call i32 @giggle_insert(i32 noundef %21, ptr noundef %3, i32 noundef 7, i32 noundef 12, i64 noundef 6)
  store i32 %22, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = call i32 @giggle_insert(i32 noundef %23, ptr noundef %3, i32 noundef 11, i32 noundef 18, i64 noundef 7)
  store i32 %24, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = call i32 @giggle_insert(i32 noundef %25, ptr noundef %3, i32 noundef 1, i32 noundef 17, i64 noundef 8)
  store i32 %26, ptr %4, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = call i32 @giggle_insert(i32 noundef %27, ptr noundef %3, i32 noundef 15, i32 noundef 18, i64 noundef 9)
  store i32 %28, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = call ptr @giggle_search(i32 noundef %29, i32 noundef %30, i32 noundef 2, i32 noundef 5)
  store ptr %31, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = call i32 @wah_get_ints(ptr noundef %32, ptr noundef %6)
  store i32 %33, ptr %7, align 4, !tbaa !5
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = zext i32 %34 to i64
  call void @UnityAssertEqualNumber(i64 noundef 5, i64 noundef %35, ptr noundef null, i64 noundef 827, i32 noundef 148)
  %36 = load ptr, ptr %6, align 8, !tbaa !9
  %37 = getelementptr inbounds i32, ptr %36, i64 0
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = sub i32 %38, 1
  %40 = zext i32 %39 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %40, ptr noundef null, i64 noundef 828, i32 noundef 148)
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  %42 = getelementptr inbounds i32, ptr %41, i64 1
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sub i32 %43, 1
  %45 = zext i32 %44 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %45, ptr noundef null, i64 noundef 829, i32 noundef 148)
  %46 = load ptr, ptr %6, align 8, !tbaa !9
  %47 = getelementptr inbounds i32, ptr %46, i64 2
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = sub i32 %48, 1
  %50 = zext i32 %49 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %50, ptr noundef null, i64 noundef 830, i32 noundef 148)
  %51 = load ptr, ptr %6, align 8, !tbaa !9
  %52 = getelementptr inbounds i32, ptr %51, i64 3
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sub i32 %53, 1
  %55 = zext i32 %54 to i64
  call void @UnityAssertEqualNumber(i64 noundef 4, i64 noundef %55, ptr noundef null, i64 noundef 831, i32 noundef 148)
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  %57 = getelementptr inbounds i32, ptr %56, i64 4
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sub i32 %58, 1
  %60 = zext i32 %59 to i64
  call void @UnityAssertEqualNumber(i64 noundef 8, i64 noundef %60, ptr noundef null, i64 noundef 832, i32 noundef 148)
  %61 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %61) #4
  store ptr null, ptr %5, align 8, !tbaa !9
  %62 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %62) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = call ptr @giggle_search(i32 noundef %63, i32 noundef %64, i32 noundef 5, i32 noundef 15)
  store ptr %65, ptr %5, align 8, !tbaa !9
  %66 = load ptr, ptr %5, align 8, !tbaa !9
  %67 = call i32 @wah_get_ints(ptr noundef %66, ptr noundef %6)
  store i32 %67, ptr %7, align 4, !tbaa !5
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = zext i32 %68 to i64
  call void @UnityAssertEqualNumber(i64 noundef 9, i64 noundef %69, ptr noundef null, i64 noundef 841, i32 noundef 148)
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  %71 = getelementptr inbounds i32, ptr %70, i64 0
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sub i32 %72, 1
  %74 = zext i32 %73 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %74, ptr noundef null, i64 noundef 842, i32 noundef 148)
  %75 = load ptr, ptr %6, align 8, !tbaa !9
  %76 = getelementptr inbounds i32, ptr %75, i64 1
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sub i32 %77, 1
  %79 = zext i32 %78 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %79, ptr noundef null, i64 noundef 843, i32 noundef 148)
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = getelementptr inbounds i32, ptr %80, i64 2
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sub i32 %82, 1
  %84 = zext i32 %83 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %84, ptr noundef null, i64 noundef 844, i32 noundef 148)
  %85 = load ptr, ptr %6, align 8, !tbaa !9
  %86 = getelementptr inbounds i32, ptr %85, i64 3
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = sub i32 %87, 1
  %89 = zext i32 %88 to i64
  call void @UnityAssertEqualNumber(i64 noundef 4, i64 noundef %89, ptr noundef null, i64 noundef 845, i32 noundef 148)
  %90 = load ptr, ptr %6, align 8, !tbaa !9
  %91 = getelementptr inbounds i32, ptr %90, i64 4
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sub i32 %92, 1
  %94 = zext i32 %93 to i64
  call void @UnityAssertEqualNumber(i64 noundef 5, i64 noundef %94, ptr noundef null, i64 noundef 846, i32 noundef 148)
  %95 = load ptr, ptr %6, align 8, !tbaa !9
  %96 = getelementptr inbounds i32, ptr %95, i64 5
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = sub i32 %97, 1
  %99 = zext i32 %98 to i64
  call void @UnityAssertEqualNumber(i64 noundef 6, i64 noundef %99, ptr noundef null, i64 noundef 847, i32 noundef 148)
  %100 = load ptr, ptr %6, align 8, !tbaa !9
  %101 = getelementptr inbounds i32, ptr %100, i64 6
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = sub i32 %102, 1
  %104 = zext i32 %103 to i64
  call void @UnityAssertEqualNumber(i64 noundef 7, i64 noundef %104, ptr noundef null, i64 noundef 848, i32 noundef 148)
  %105 = load ptr, ptr %6, align 8, !tbaa !9
  %106 = getelementptr inbounds i32, ptr %105, i64 7
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sub i32 %107, 1
  %109 = zext i32 %108 to i64
  call void @UnityAssertEqualNumber(i64 noundef 8, i64 noundef %109, ptr noundef null, i64 noundef 849, i32 noundef 148)
  %110 = load ptr, ptr %6, align 8, !tbaa !9
  %111 = getelementptr inbounds i32, ptr %110, i64 8
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sub i32 %112, 1
  %114 = zext i32 %113 to i64
  call void @UnityAssertEqualNumber(i64 noundef 9, i64 noundef %114, ptr noundef null, i64 noundef 850, i32 noundef 148)
  %115 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %115) #4
  store ptr null, ptr %5, align 8, !tbaa !9
  %116 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %116) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = call ptr @giggle_search(i32 noundef %117, i32 noundef %118, i32 noundef 19, i32 noundef 20)
  store ptr %119, ptr %5, align 8, !tbaa !9
  %120 = load ptr, ptr %5, align 8, !tbaa !9
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %129

122:                                              ; preds = %0
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  %124 = call i32 @wah_get_ints(ptr noundef %123, ptr noundef %6)
  store i32 %124, ptr %7, align 4, !tbaa !5
  %125 = load i32, ptr %7, align 4, !tbaa !5
  %126 = zext i32 %125 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %126, ptr noundef null, i64 noundef 860, i32 noundef 148)
  %127 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %127) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  %128 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %128) #4
  store ptr null, ptr %5, align 8, !tbaa !9
  br label %132

129:                                              ; preds = %0
  %130 = load ptr, ptr %5, align 8, !tbaa !9
  %131 = ptrtoint ptr %130 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %131, ptr noundef null, i64 noundef 866, i32 noundef 148)
  br label %132

132:                                              ; preds = %129, %122
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = load i32, ptr %3, align 4, !tbaa !5
  %135 = call ptr @giggle_search(i32 noundef %133, i32 noundef %134, i32 noundef 18, i32 noundef 20)
  store ptr %135, ptr %5, align 8, !tbaa !9
  %136 = load ptr, ptr %5, align 8, !tbaa !9
  %137 = call i32 @wah_get_ints(ptr noundef %136, ptr noundef %6)
  store i32 %137, ptr %7, align 4, !tbaa !5
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = zext i32 %138 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %139, ptr noundef null, i64 noundef 871, i32 noundef 148)
  %140 = load ptr, ptr %6, align 8, !tbaa !9
  %141 = getelementptr inbounds i32, ptr %140, i64 0
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = sub i32 %142, 1
  %144 = zext i32 %143 to i64
  call void @UnityAssertEqualNumber(i64 noundef 7, i64 noundef %144, ptr noundef null, i64 noundef 872, i32 noundef 148)
  %145 = load ptr, ptr %6, align 8, !tbaa !9
  %146 = getelementptr inbounds i32, ptr %145, i64 1
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sub i32 %147, 1
  %149 = zext i32 %148 to i64
  call void @UnityAssertEqualNumber(i64 noundef 9, i64 noundef %149, ptr noundef null, i64 noundef 873, i32 noundef 148)
  %150 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %150) #4
  store ptr null, ptr %5, align 8, !tbaa !9
  %151 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %151) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  %152 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 6), align 8, !tbaa !11
  call void (...) %152()
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

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 "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 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 #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"cache_def", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}


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

@ORDER = external dso_local local_unnamed_addr global i32, align 4
@cache = external dso_local local_unnamed_addr global %struct.cache_def, align 8

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

declare ptr @simple_cache_init(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @giggle_insert(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

declare void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

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

declare void @wah_giggle_set_data_handler(...) local_unnamed_addr #1

declare i32 @wah_get_ints(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @giggle_search(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @test_wah_giggle_search() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  store i32 7, ptr @ORDER, align 4, !tbaa !5
  %3 = tail call ptr @simple_cache_init(i32 noundef 5, i32 noundef 1, ptr noundef null) #4
  tail call void (...) @wah_giggle_set_data_handler() #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  %4 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 1, i32 noundef 10, i64 noundef 0) #4
  %5 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 11, i32 noundef 13, i64 noundef 1) #4
  %6 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 2, i32 noundef 4, i64 noundef 2) #4
  %7 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 5, i32 noundef 8, i64 noundef 3) #4
  %8 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 3, i32 noundef 6, i64 noundef 4) #4
  %9 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 7, i32 noundef 9, i64 noundef 5) #4
  %10 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 7, i32 noundef 12, i64 noundef 6) #4
  %11 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 11, i32 noundef 18, i64 noundef 7) #4
  %12 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 1, i32 noundef 17, i64 noundef 8) #4
  %13 = call i32 @giggle_insert(i32 noundef 0, ptr noundef nonnull %1, i32 noundef 15, i32 noundef 18, i64 noundef 9) #4
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = call ptr @giggle_search(i32 noundef 0, i32 noundef %14, i32 noundef 2, i32 noundef 5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store ptr null, ptr %2, align 8, !tbaa !9
  %16 = call i32 @wah_get_ints(ptr noundef %15, ptr noundef nonnull %2) #4
  %17 = zext i32 %16 to i64
  call void @UnityAssertEqualNumber(i64 noundef 5, i64 noundef %17, ptr noundef null, i64 noundef 827, i32 noundef 148) #4
  %18 = load ptr, ptr %2, align 8, !tbaa !9
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = add i32 %19, -1
  %21 = zext i32 %20 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %21, ptr noundef null, i64 noundef 828, i32 noundef 148) #4
  %22 = load ptr, ptr %2, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %22, i64 4
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = add i32 %24, -1
  %26 = zext i32 %25 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %26, ptr noundef null, i64 noundef 829, i32 noundef 148) #4
  %27 = load ptr, ptr %2, align 8, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add i32 %29, -1
  %31 = zext i32 %30 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %31, ptr noundef null, i64 noundef 830, i32 noundef 148) #4
  %32 = load ptr, ptr %2, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %32, i64 12
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = add i32 %34, -1
  %36 = zext i32 %35 to i64
  call void @UnityAssertEqualNumber(i64 noundef 4, i64 noundef %36, ptr noundef null, i64 noundef 831, i32 noundef 148) #4
  %37 = load ptr, ptr %2, align 8, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add i32 %39, -1
  %41 = zext i32 %40 to i64
  call void @UnityAssertEqualNumber(i64 noundef 8, i64 noundef %41, ptr noundef null, i64 noundef 832, i32 noundef 148) #4
  call void @free(ptr noundef %15) #4
  %42 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %42) #4
  store ptr null, ptr %2, align 8, !tbaa !9
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = call ptr @giggle_search(i32 noundef 0, i32 noundef %43, i32 noundef 5, i32 noundef 15) #4
  %45 = call i32 @wah_get_ints(ptr noundef %44, ptr noundef nonnull %2) #4
  %46 = zext i32 %45 to i64
  call void @UnityAssertEqualNumber(i64 noundef 9, i64 noundef %46, ptr noundef null, i64 noundef 841, i32 noundef 148) #4
  %47 = load ptr, ptr %2, align 8, !tbaa !9
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add i32 %48, -1
  %50 = zext i32 %49 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %50, ptr noundef null, i64 noundef 842, i32 noundef 148) #4
  %51 = load ptr, ptr %2, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i64 4
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add i32 %53, -1
  %55 = zext i32 %54 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %55, ptr noundef null, i64 noundef 843, i32 noundef 148) #4
  %56 = load ptr, ptr %2, align 8, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = add i32 %58, -1
  %60 = zext i32 %59 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %60, ptr noundef null, i64 noundef 844, i32 noundef 148) #4
  %61 = load ptr, ptr %2, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %61, i64 12
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add i32 %63, -1
  %65 = zext i32 %64 to i64
  call void @UnityAssertEqualNumber(i64 noundef 4, i64 noundef %65, ptr noundef null, i64 noundef 845, i32 noundef 148) #4
  %66 = load ptr, ptr %2, align 8, !tbaa !9
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add i32 %68, -1
  %70 = zext i32 %69 to i64
  call void @UnityAssertEqualNumber(i64 noundef 5, i64 noundef %70, ptr noundef null, i64 noundef 846, i32 noundef 148) #4
  %71 = load ptr, ptr %2, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %71, i64 20
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add i32 %73, -1
  %75 = zext i32 %74 to i64
  call void @UnityAssertEqualNumber(i64 noundef 6, i64 noundef %75, ptr noundef null, i64 noundef 847, i32 noundef 148) #4
  %76 = load ptr, ptr %2, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %76, i64 24
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = add i32 %78, -1
  %80 = zext i32 %79 to i64
  call void @UnityAssertEqualNumber(i64 noundef 7, i64 noundef %80, ptr noundef null, i64 noundef 848, i32 noundef 148) #4
  %81 = load ptr, ptr %2, align 8, !tbaa !9
  %82 = getelementptr inbounds i8, ptr %81, i64 28
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add i32 %83, -1
  %85 = zext i32 %84 to i64
  call void @UnityAssertEqualNumber(i64 noundef 8, i64 noundef %85, ptr noundef null, i64 noundef 849, i32 noundef 148) #4
  %86 = load ptr, ptr %2, align 8, !tbaa !9
  %87 = getelementptr inbounds i8, ptr %86, i64 32
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add i32 %88, -1
  %90 = zext i32 %89 to i64
  call void @UnityAssertEqualNumber(i64 noundef 9, i64 noundef %90, ptr noundef null, i64 noundef 850, i32 noundef 148) #4
  call void @free(ptr noundef %44) #4
  %91 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %91) #4
  store ptr null, ptr %2, align 8, !tbaa !9
  %92 = load i32, ptr %1, align 4, !tbaa !5
  %93 = call ptr @giggle_search(i32 noundef 0, i32 noundef %92, i32 noundef 19, i32 noundef 20) #4
  %.not = icmp eq ptr %93, null
  br i1 %.not, label %98, label %94

94:                                               ; preds = %0
  %95 = call i32 @wah_get_ints(ptr noundef nonnull %93, ptr noundef nonnull %2) #4
  %96 = zext i32 %95 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %96, ptr noundef null, i64 noundef 860, i32 noundef 148) #4
  %97 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %97) #4
  store ptr null, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef nonnull %93) #4
  br label %99

98:                                               ; preds = %0
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef 0, ptr noundef null, i64 noundef 866, i32 noundef 148) #4
  br label %99

99:                                               ; preds = %98, %94
  %100 = load i32, ptr %1, align 4, !tbaa !5
  %101 = call ptr @giggle_search(i32 noundef 0, i32 noundef %100, i32 noundef 18, i32 noundef 20) #4
  %102 = call i32 @wah_get_ints(ptr noundef %101, ptr noundef nonnull %2) #4
  %103 = zext i32 %102 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %103, ptr noundef null, i64 noundef 871, i32 noundef 148) #4
  %104 = load ptr, ptr %2, align 8, !tbaa !9
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add i32 %105, -1
  %107 = zext i32 %106 to i64
  call void @UnityAssertEqualNumber(i64 noundef 7, i64 noundef %107, ptr noundef null, i64 noundef 872, i32 noundef 148) #4
  %108 = load ptr, ptr %2, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %108, i64 4
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add i32 %110, -1
  %112 = zext i32 %111 to i64
  call void @UnityAssertEqualNumber(i64 noundef 9, i64 noundef %112, ptr noundef null, i64 noundef 873, i32 noundef 148) #4
  call void @free(ptr noundef %101) #4
  %113 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %113) #4
  store ptr null, ptr %2, align 8, !tbaa !9
  %114 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 48), align 8, !tbaa !11
  call void (...) %114() #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void
}

attributes #0 = { mustprogress 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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"cache_def", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass