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

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

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [22 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 @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 noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @remove(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @test_indexed_list() #3 {
  %1 = alloca %struct.offset_size_pair, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 50, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %10 = call ptr @indexed_list_init(i64 noundef 5, i32 noundef 16)
  store ptr %10, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %25, %0
  %12 = load i64, ptr %5, align 8, !tbaa !5
  %13 = icmp ult i64 %12, 5
  br i1 %13, label %14, label %28

14:                                               ; preds = %11
  %15 = load i64, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 0
  store i64 %15, ptr %16, align 8, !tbaa !11
  %17 = load i64, ptr %5, align 8, !tbaa !5
  %18 = mul i64 %17, 2
  %19 = trunc i64 %18 to i32
  %20 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 1
  store i32 %19, ptr %20, align 8, !tbaa !14
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  %22 = load i64, ptr %5, align 8, !tbaa !5
  %23 = call i32 @indexed_list_add(ptr noundef %21, i64 noundef %22, ptr noundef %1)
  %24 = zext i32 %23 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %24, ptr noundef null, i64 noundef 661, i32 noundef 148)
  br label %25

25:                                               ; preds = %14
  %26 = load i64, ptr %5, align 8, !tbaa !5
  %27 = add i64 %26, 1
  store i64 %27, ptr %5, align 8, !tbaa !5
  br label %11, !llvm.loop !15

28:                                               ; preds = %11
  %29 = load i64, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 0
  store i64 %29, ptr %30, align 8, !tbaa !11
  %31 = load i64, ptr %5, align 8, !tbaa !5
  %32 = mul i64 %31, 2
  %33 = trunc i64 %32 to i32
  %34 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 1
  store i32 %33, ptr %34, align 8, !tbaa !14
  %35 = load ptr, ptr %4, align 8, !tbaa !9
  %36 = load i64, ptr %5, align 8, !tbaa !5
  %37 = call i32 @indexed_list_add(ptr noundef %35, i64 noundef %36, ptr noundef %1)
  %38 = zext i32 %37 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %38, ptr noundef null, i64 noundef 666, i32 noundef 148)
  %39 = load i64, ptr %5, align 8, !tbaa !5
  %40 = add i64 %39, 1
  store i64 %40, ptr %5, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %55, %28
  %42 = load i64, ptr %5, align 8, !tbaa !5
  %43 = load i64, ptr %3, align 8, !tbaa !5
  %44 = icmp ult i64 %42, %43
  br i1 %44, label %45, label %58

45:                                               ; preds = %41
  %46 = load i64, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 0
  store i64 %46, ptr %47, align 8, !tbaa !11
  %48 = load i64, ptr %5, align 8, !tbaa !5
  %49 = mul i64 %48, 2
  %50 = trunc i64 %49 to i32
  %51 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 1
  store i32 %50, ptr %51, align 8, !tbaa !14
  %52 = load ptr, ptr %4, align 8, !tbaa !9
  %53 = load i64, ptr %5, align 8, !tbaa !5
  %54 = call i32 @indexed_list_add(ptr noundef %52, i64 noundef %53, ptr noundef %1)
  br label %55

55:                                               ; preds = %45
  %56 = load i64, ptr %5, align 8, !tbaa !5
  %57 = add i64 %56, 1
  store i64 %57, ptr %5, align 8, !tbaa !5
  br label %41, !llvm.loop !17

58:                                               ; preds = %41
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %77, %58
  %60 = load i64, ptr %5, align 8, !tbaa !5
  %61 = load i64, ptr %3, align 8, !tbaa !5
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %63, label %80

63:                                               ; preds = %59
  %64 = load ptr, ptr %4, align 8, !tbaa !9
  %65 = load i64, ptr %5, align 8, !tbaa !5
  %66 = call ptr @indexed_list_get(ptr noundef %64, i64 noundef %65)
  store ptr %66, ptr %2, align 8, !tbaa !9
  %67 = load i64, ptr %5, align 8, !tbaa !5
  %68 = load ptr, ptr %2, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.offset_size_pair, ptr %68, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !11
  call void @UnityAssertEqualNumber(i64 noundef %67, i64 noundef %70, ptr noundef null, i64 noundef 678, i32 noundef 148)
  %71 = load i64, ptr %5, align 8, !tbaa !5
  %72 = mul i64 %71, 2
  %73 = load ptr, ptr %2, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.offset_size_pair, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !14
  %76 = zext i32 %75 to i64
  call void @UnityAssertEqualNumber(i64 noundef %72, i64 noundef %76, ptr noundef null, i64 noundef 679, i32 noundef 148)
  br label %77

77:                                               ; preds = %63
  %78 = load i64, ptr %5, align 8, !tbaa !5
  %79 = add i64 %78, 1
  store i64 %79, ptr %5, align 8, !tbaa !5
  br label %59, !llvm.loop !18

80:                                               ; preds = %59
  %81 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 0
  store i64 100, ptr %81, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.offset_size_pair, ptr %1, i32 0, i32 1
  store i32 200, ptr %82, align 8, !tbaa !14
  %83 = load ptr, ptr %4, align 8, !tbaa !9
  %84 = call i32 @indexed_list_add(ptr noundef %83, i64 noundef 100, ptr noundef %1)
  %85 = zext i32 %84 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %85, ptr noundef null, i64 noundef 684, i32 noundef 148)
  %86 = load ptr, ptr %4, align 8, !tbaa !9
  %87 = call ptr @indexed_list_get(ptr noundef %86, i64 noundef 100)
  store ptr %87, ptr %2, align 8, !tbaa !9
  %88 = load ptr, ptr %2, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.offset_size_pair, ptr %88, i32 0, i32 0
  %90 = load i64, ptr %89, align 8, !tbaa !11
  call void @UnityAssertEqualNumber(i64 noundef 100, i64 noundef %90, ptr noundef null, i64 noundef 687, i32 noundef 148)
  %91 = load ptr, ptr %2, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.offset_size_pair, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 8, !tbaa !14
  %94 = zext i32 %93 to i64
  call void @UnityAssertEqualNumber(i64 noundef 200, i64 noundef %94, ptr noundef null, i64 noundef 688, i32 noundef 148)
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %113, %80
  %96 = load i64, ptr %5, align 8, !tbaa !5
  %97 = load i64, ptr %3, align 8, !tbaa !5
  %98 = icmp ult i64 %96, %97
  br i1 %98, label %99, label %116

99:                                               ; preds = %95
  %100 = load ptr, ptr %4, align 8, !tbaa !9
  %101 = load i64, ptr %5, align 8, !tbaa !5
  %102 = call ptr @indexed_list_get(ptr noundef %100, i64 noundef %101)
  store ptr %102, ptr %2, align 8, !tbaa !9
  %103 = load i64, ptr %5, align 8, !tbaa !5
  %104 = load ptr, ptr %2, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.offset_size_pair, ptr %104, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !11
  call void @UnityAssertEqualNumber(i64 noundef %103, i64 noundef %106, ptr noundef null, i64 noundef 692, i32 noundef 148)
  %107 = load i64, ptr %5, align 8, !tbaa !5
  %108 = mul i64 %107, 2
  %109 = load ptr, ptr %2, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.offset_size_pair, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 8, !tbaa !14
  %112 = zext i32 %111 to i64
  call void @UnityAssertEqualNumber(i64 noundef %108, i64 noundef %112, ptr noundef null, i64 noundef 693, i32 noundef 148)
  br label %113

113:                                              ; preds = %99
  %114 = load i64, ptr %5, align 8, !tbaa !5
  %115 = add i64 %114, 1
  store i64 %115, ptr %5, align 8, !tbaa !5
  br label %95, !llvm.loop !19

116:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %117 = call noalias ptr @fopen(ptr noundef @.str.16, ptr noundef @.str.1)
  store ptr %117, ptr %6, align 8, !tbaa !9
  %118 = load ptr, ptr %4, align 8, !tbaa !9
  %119 = load ptr, ptr %6, align 8, !tbaa !9
  call void @indexed_list_write(ptr noundef %118, ptr noundef %119, ptr noundef @.str.16)
  %120 = load ptr, ptr %6, align 8, !tbaa !9
  %121 = call i32 @fclose(ptr noundef %120)
  %122 = call noalias ptr @fopen(ptr noundef @.str.16, ptr noundef @.str.2)
  store ptr %122, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  %124 = call ptr @indexed_list_load(ptr noundef %123, ptr noundef @.str.16)
  store ptr %124, ptr %7, align 8, !tbaa !9
  %125 = load ptr, ptr %6, align 8, !tbaa !9
  %126 = call i32 @fclose(ptr noundef %125)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %127

127:                                              ; preds = %152, %116
  %128 = load i64, ptr %5, align 8, !tbaa !5
  %129 = load i64, ptr %3, align 8, !tbaa !5
  %130 = icmp ult i64 %128, %129
  br i1 %130, label %131, label %155

131:                                              ; preds = %127
  %132 = load ptr, ptr %4, align 8, !tbaa !9
  %133 = load i64, ptr %5, align 8, !tbaa !5
  %134 = call ptr @indexed_list_get(ptr noundef %132, i64 noundef %133)
  store ptr %134, ptr %8, align 8, !tbaa !9
  %135 = load ptr, ptr %7, align 8, !tbaa !9
  %136 = load i64, ptr %5, align 8, !tbaa !5
  %137 = call ptr @indexed_list_get(ptr noundef %135, i64 noundef %136)
  store ptr %137, ptr %9, align 8, !tbaa !9
  %138 = load ptr, ptr %8, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.offset_size_pair, ptr %138, i32 0, i32 0
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = load ptr, ptr %9, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.offset_size_pair, ptr %141, i32 0, i32 0
  %143 = load i64, ptr %142, align 8, !tbaa !11
  call void @UnityAssertEqualNumber(i64 noundef %140, i64 noundef %143, ptr noundef null, i64 noundef 708, i32 noundef 148)
  %144 = load ptr, ptr %8, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.offset_size_pair, ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 8, !tbaa !14
  %147 = zext i32 %146 to i64
  %148 = load ptr, ptr %9, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct.offset_size_pair, ptr %148, i32 0, i32 1
  %150 = load i32, ptr %149, align 8, !tbaa !14
  %151 = zext i32 %150 to i64
  call void @UnityAssertEqualNumber(i64 noundef %147, i64 noundef %151, ptr noundef null, i64 noundef 709, i32 noundef 148)
  br label %152

152:                                              ; preds = %131
  %153 = load i64, ptr %5, align 8, !tbaa !5
  %154 = add i64 %153, 1
  store i64 %154, ptr %5, align 8, !tbaa !5
  br label %127, !llvm.loop !20

155:                                              ; preds = %127
  call void @indexed_list_destroy(ptr noundef %4)
  call void @indexed_list_destroy(ptr noundef %7)
  %156 = load ptr, ptr %4, align 8, !tbaa !9
  %157 = ptrtoint ptr %156 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %157, ptr noundef null, i64 noundef 714, i32 noundef 148)
  %158 = load ptr, ptr %7, align 8, !tbaa !9
  %159 = ptrtoint ptr %158 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %159, ptr noundef null, i64 noundef 715, i32 noundef 148)
  %160 = call i32 @remove(ptr noundef @.str.16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %1) #4
  ret void
}

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

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

declare ptr @indexed_list_get(ptr noundef, i64 noundef) #1

declare void @indexed_list_write(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @indexed_list_load(ptr noundef, ptr noundef) #1

declare void @indexed_list_destroy(ptr noundef) #1

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 = !{!"long", !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, !6, i64 0}
!12 = !{!"offset_size_pair", !6, i64 0, !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


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

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @test_indexed_list() local_unnamed_addr #3 {
.lr.ph.preheader:
  %0 = alloca %struct.offset_size_pair, align 8
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %3 = tail call ptr @indexed_list_init(i64 noundef 5, i32 noundef 16) #4
  store ptr %3, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 0, ptr %0, align 8, !tbaa !9
  store i32 0, ptr %4, align 8, !tbaa !13
  %5 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 0, ptr noundef nonnull %0) #4
  %6 = zext i32 %5 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %6, ptr noundef null, i64 noundef 661, i32 noundef 148) #4
  store i64 1, ptr %0, align 8, !tbaa !9
  store i32 2, ptr %4, align 8, !tbaa !13
  %7 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 1, ptr noundef nonnull %0) #4
  %8 = zext i32 %7 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %8, ptr noundef null, i64 noundef 661, i32 noundef 148) #4
  store i64 2, ptr %0, align 8, !tbaa !9
  store i32 4, ptr %4, align 8, !tbaa !13
  %9 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 2, ptr noundef nonnull %0) #4
  %10 = zext i32 %9 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %10, ptr noundef null, i64 noundef 661, i32 noundef 148) #4
  store i64 3, ptr %0, align 8, !tbaa !9
  store i32 6, ptr %4, align 8, !tbaa !13
  %11 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 3, ptr noundef nonnull %0) #4
  %12 = zext i32 %11 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %12, ptr noundef null, i64 noundef 661, i32 noundef 148) #4
  store i64 4, ptr %0, align 8, !tbaa !9
  store i32 8, ptr %4, align 8, !tbaa !13
  %13 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 4, ptr noundef nonnull %0) #4
  %14 = zext i32 %13 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %14, ptr noundef null, i64 noundef 661, i32 noundef 148) #4
  store i64 5, ptr %0, align 8, !tbaa !9
  store i32 10, ptr %4, align 8, !tbaa !13
  %15 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 5, ptr noundef nonnull %0) #4
  %16 = zext i32 %15 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %16, ptr noundef null, i64 noundef 666, i32 noundef 148) #4
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.1.in47 = phi i64 [ %.1, %.lr.ph ], [ 5, %.lr.ph.preheader ]
  %.1 = add nuw nsw i64 %.1.in47, 1
  store i64 %.1, ptr %0, align 8, !tbaa !9
  %.1.tr = trunc nuw i64 %.1 to i32
  %17 = shl nuw nsw i32 %.1.tr, 1
  store i32 %17, ptr %4, align 8, !tbaa !13
  %18 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef %.1, ptr noundef nonnull %0) #4
  %exitcond.not = icmp eq i64 %.1, 49
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph, %.preheader
  %.248 = phi i64 [ %25, %.preheader ], [ 0, %.lr.ph ]
  %19 = call ptr @indexed_list_get(ptr noundef %3, i64 noundef %.248) #4
  %20 = load i64, ptr %19, align 8, !tbaa !9
  call void @UnityAssertEqualNumber(i64 noundef %.248, i64 noundef %20, ptr noundef null, i64 noundef 678, i32 noundef 148) #4
  %21 = shl nuw nsw i64 %.248, 1
  %22 = getelementptr inbounds i8, ptr %19, i64 8
  %23 = load i32, ptr %22, align 8, !tbaa !13
  %24 = zext i32 %23 to i64
  call void @UnityAssertEqualNumber(i64 noundef %21, i64 noundef %24, ptr noundef null, i64 noundef 679, i32 noundef 148) #4
  %25 = add nuw nsw i64 %.248, 1
  %exitcond51.not = icmp eq i64 %25, 50
  br i1 %exitcond51.not, label %26, label %.preheader, !llvm.loop !16

26:                                               ; preds = %.preheader
  store i64 100, ptr %0, align 8, !tbaa !9
  store i32 200, ptr %4, align 8, !tbaa !13
  %27 = call i32 @indexed_list_add(ptr noundef %3, i64 noundef 100, ptr noundef nonnull %0) #4
  %28 = zext i32 %27 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %28, ptr noundef null, i64 noundef 684, i32 noundef 148) #4
  %29 = call ptr @indexed_list_get(ptr noundef %3, i64 noundef 100) #4
  %30 = load i64, ptr %29, align 8, !tbaa !9
  call void @UnityAssertEqualNumber(i64 noundef 100, i64 noundef %30, ptr noundef null, i64 noundef 687, i32 noundef 148) #4
  %31 = getelementptr inbounds i8, ptr %29, i64 8
  %32 = load i32, ptr %31, align 8, !tbaa !13
  %33 = zext i32 %32 to i64
  call void @UnityAssertEqualNumber(i64 noundef 200, i64 noundef %33, ptr noundef null, i64 noundef 688, i32 noundef 148) #4
  br label %34

34:                                               ; preds = %26, %34
  %.349 = phi i64 [ 0, %26 ], [ %41, %34 ]
  %35 = call ptr @indexed_list_get(ptr noundef %3, i64 noundef %.349) #4
  %36 = load i64, ptr %35, align 8, !tbaa !9
  call void @UnityAssertEqualNumber(i64 noundef %.349, i64 noundef %36, ptr noundef null, i64 noundef 692, i32 noundef 148) #4
  %37 = shl nuw nsw i64 %.349, 1
  %38 = getelementptr inbounds i8, ptr %35, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !13
  %40 = zext i32 %39 to i64
  call void @UnityAssertEqualNumber(i64 noundef %37, i64 noundef %40, ptr noundef null, i64 noundef 693, i32 noundef 148) #4
  %41 = add nuw nsw i64 %.349, 1
  %exitcond52.not = icmp eq i64 %41, 50
  br i1 %exitcond52.not, label %42, label %34, !llvm.loop !17

42:                                               ; preds = %34
  %43 = call noalias ptr @fopen(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1)
  call void @indexed_list_write(ptr noundef %3, ptr noundef %43, ptr noundef nonnull @.str.16) #4
  %44 = call i32 @fclose(ptr noundef %43)
  %45 = call noalias ptr @fopen(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %46 = call ptr @indexed_list_load(ptr noundef %45, ptr noundef nonnull @.str.16) #4
  store ptr %46, ptr %2, align 8, !tbaa !5
  %47 = call i32 @fclose(ptr noundef %45)
  br label %48

48:                                               ; preds = %42, %48
  %.450 = phi i64 [ 0, %42 ], [ %59, %48 ]
  %49 = call ptr @indexed_list_get(ptr noundef %3, i64 noundef %.450) #4
  %50 = call ptr @indexed_list_get(ptr noundef %46, i64 noundef %.450) #4
  %51 = load i64, ptr %49, align 8, !tbaa !9
  %52 = load i64, ptr %50, align 8, !tbaa !9
  call void @UnityAssertEqualNumber(i64 noundef %51, i64 noundef %52, ptr noundef null, i64 noundef 708, i32 noundef 148) #4
  %53 = getelementptr inbounds i8, ptr %49, i64 8
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %50, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !13
  %58 = zext i32 %57 to i64
  call void @UnityAssertEqualNumber(i64 noundef %55, i64 noundef %58, ptr noundef null, i64 noundef 709, i32 noundef 148) #4
  %59 = add nuw nsw i64 %.450, 1
  %exitcond53.not = icmp eq i64 %59, 50
  br i1 %exitcond53.not, label %60, label %48, !llvm.loop !18

60:                                               ; preds = %48
  call void @indexed_list_destroy(ptr noundef nonnull %1) #4
  call void @indexed_list_destroy(ptr noundef nonnull %2) #4
  %61 = load ptr, ptr %1, align 8, !tbaa !5
  %62 = ptrtoint ptr %61 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %62, ptr noundef null, i64 noundef 714, i32 noundef 148) #4
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = ptrtoint ptr %63 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %64, ptr noundef null, i64 noundef 715, i32 noundef 148) #4
  %65 = call i32 @remove(ptr noundef nonnull @.str.16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %0) #4
  ret void
}

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

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

declare ptr @indexed_list_get(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @indexed_list_write(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @indexed_list_load(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @indexed_list_destroy(ptr noundef) local_unnamed_addr #1

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 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"offset_size_pair", !11, i64 0, !12, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass