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

; 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.__kstring_t = type { i64, i64, ptr }
%struct.offset_index = type { ptr, ptr, i32, ptr, i32 }
%struct.input_file = type { ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, ptr, ptr, ptr }
%struct.file_id_offset_pairs = type { i64, i64, ptr }
%struct.file_id_offset_pair = type { i32, i64 }

@__const.test_offset_index_add_no_data.A_offsets = external hidden unnamed_addr constant [1000 x i32], align 16
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @test_offset_index_add_no_data() #0 {
  %1 = alloca [1000 x i32], align 16
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %struct.__kstring_t, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4000, ptr %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %1, ptr align 16 @__const.test_offset_index_add_no_data.A_offsets, i64 4000, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store ptr @.str, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = call ptr @input_file_init(ptr noundef %13)
  store ptr %14, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 10, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = mul i64 %16, 1
  %18 = call noalias ptr @malloc(i64 noundef %17) #8
  store ptr %18, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %19 = call ptr @offset_index_init(i32 noundef 100, ptr noundef @.str.1)
  store ptr %19, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.offset_index, ptr %20, i32 0, i32 4
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %23 = zext i32 %22 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %23, ptr noundef null, i64 noundef 152, i32 noundef 148)
  br label %24

24:                                               ; preds = %31, %0
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.input_file, ptr %25, i32 0, i32 8
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call i32 %27(ptr noundef %28, ptr noundef %5, ptr noundef %4, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9)
  %30 = icmp sge i32 %29, 0
  br i1 %30, label %31, label %36

31:                                               ; preds = %24
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = load i64, ptr %8, align 8, !tbaa !16
  %34 = call i64 @offset_index_add(ptr noundef %32, i64 noundef %33, ptr noundef %9, i32 noundef 1)
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %11, align 4, !tbaa !9
  br label %24, !llvm.loop !17

36:                                               ; preds = %24
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.2) #7
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.offset_index, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !19
  %42 = getelementptr inbounds %struct.file_id_offset_pairs, ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !20
  call void @UnityAssertEqualNumber(i64 noundef 1000, i64 noundef %43, ptr noundef null, i64 noundef 169, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %75, %36
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = icmp ult i32 %45, 1000
  br i1 %46, label %47, label %78

47:                                               ; preds = %44
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds [1000 x i32], ptr %1, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.offset_index, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  %56 = getelementptr inbounds %struct.file_id_offset_pairs, ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.offset_index, ptr %58, i32 0, i32 4
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = icmp eq i32 %60, 0
  %62 = zext i1 %61 to i64
  %63 = select i1 %61, i64 0, i64 12
  %64 = getelementptr inbounds i8, ptr %57, i64 %63
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.offset_index, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %68, align 8, !tbaa !23
  %70 = zext i32 %69 to i64
  %71 = mul i64 %66, %70
  %72 = getelementptr inbounds i8, ptr %64, i64 %71
  %73 = getelementptr inbounds %struct.file_id_offset_pair, ptr %72, i32 0, i32 1
  %74 = load i64, ptr %73, align 8, !tbaa !24
  call void @UnityAssertEqualNumber(i64 noundef %52, i64 noundef %74, ptr noundef null, i64 noundef 174, i32 noundef 148)
  br label %75

75:                                               ; preds = %47
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = add i32 %76, 1
  store i32 %77, ptr %12, align 4, !tbaa !9
  br label %44, !llvm.loop !26

78:                                               ; preds = %44
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  call void @offset_index_store(ptr noundef %79)
  call void @offset_index_destroy(ptr noundef %10)
  %80 = getelementptr inbounds %struct.__kstring_t, ptr %9, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !27
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %86

83:                                               ; preds = %78
  %84 = getelementptr inbounds %struct.__kstring_t, ptr %9, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !27
  call void @free(ptr noundef %85) #7
  br label %86

86:                                               ; preds = %83, %78
  call void @input_file_destroy(ptr noundef %3)
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %87) #7
  %88 = call ptr @offset_index_load(ptr noundef @.str.1)
  store ptr %88, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.offset_index, ptr %89, i32 0, i32 4
  %91 = load i32, ptr %90, align 8, !tbaa !11
  %92 = zext i32 %91 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %92, ptr noundef null, i64 noundef 187, i32 noundef 148)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %124, %86
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = icmp ult i32 %94, 1000
  br i1 %95, label %96, label %127

96:                                               ; preds = %93
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds [1000 x i32], ptr %1, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.offset_index, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = getelementptr inbounds %struct.file_id_offset_pairs, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !22
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.offset_index, ptr %107, i32 0, i32 4
  %109 = load i32, ptr %108, align 8, !tbaa !11
  %110 = icmp eq i32 %109, 0
  %111 = zext i1 %110 to i64
  %112 = select i1 %110, i64 0, i64 12
  %113 = getelementptr inbounds i8, ptr %106, i64 %112
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.offset_index, ptr %116, i32 0, i32 2
  %118 = load i32, ptr %117, align 8, !tbaa !23
  %119 = zext i32 %118 to i64
  %120 = mul i64 %115, %119
  %121 = getelementptr inbounds i8, ptr %113, i64 %120
  %122 = getelementptr inbounds %struct.file_id_offset_pair, ptr %121, i32 0, i32 1
  %123 = load i64, ptr %122, align 8, !tbaa !24
  call void @UnityAssertEqualNumber(i64 noundef %101, i64 noundef %123, ptr noundef null, i64 noundef 191, i32 noundef 148)
  br label %124

124:                                              ; preds = %96
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = add i32 %125, 1
  store i32 %126, ptr %12, align 4, !tbaa !9
  br label %93, !llvm.loop !29

127:                                              ; preds = %93
  call void @offset_index_destroy(ptr noundef %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr %1) #7
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare ptr @input_file_init(ptr noundef) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare ptr @offset_index_init(i32 noundef, ptr noundef) #3

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

declare i64 @offset_index_add(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #3

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

declare void @offset_index_store(ptr noundef) #3

declare void @offset_index_destroy(ptr noundef) #3

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

declare void @input_file_destroy(ptr noundef) #3

declare ptr @offset_index_load(ptr noundef) #3

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!12, !10, i64 32}
!12 = !{!"offset_index", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!13 = !{!14, !6, i64 64}
!14 = !{!"input_file", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!15 = !{!"long", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !6, i64 0}
!20 = !{!21, !15, i64 0}
!21 = !{!"file_id_offset_pairs", !15, i64 0, !15, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 16}
!23 = !{!12, !10, i64 16}
!24 = !{!25, !15, i64 8}
!25 = !{!"file_id_offset_pair", !10, i64 0, !15, i64 8}
!26 = distinct !{!26, !18}
!27 = !{!28, !6, i64 16}
!28 = !{!"__kstring_t", !15, i64 0, !15, i64 8, !6, i64 16}
!29 = distinct !{!29, !18}


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

@__const.test_offset_index_add_no_data.A_offsets = external hidden unnamed_addr constant [1000 x i32], align 16
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @test_offset_index_add_no_data() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca %struct.__kstring_t, align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %9 = tail call ptr @input_file_init(ptr noundef nonnull @.str) #7
  store ptr %9, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 10, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %10 = tail call noalias dereferenceable_or_null(10) ptr @malloc(i64 noundef 10) #8
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %11 = tail call ptr @offset_index_init(i32 noundef 100, ptr noundef nonnull @.str.1) #7
  store ptr %11, ptr %8, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 32
  %13 = load i32, ptr %12, align 8, !tbaa !11
  %14 = zext i32 %13 to i64
  tail call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %14, ptr noundef null, i64 noundef 152, i32 noundef 148) #7
  %15 = getelementptr inbounds i8, ptr %9, i64 64
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = call i32 %16(ptr noundef %9, ptr noundef nonnull %3, ptr noundef nonnull %2, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7) #7
  %18 = icmp sgt i32 %17, -1
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %19 = load i64, ptr %6, align 8, !tbaa !16
  %20 = call i64 @offset_index_add(ptr noundef %11, i64 noundef %19, ptr noundef nonnull %7, i32 noundef 1) #7
  %21 = load ptr, ptr %15, align 8, !tbaa !13
  %22 = call i32 %21(ptr noundef nonnull %9, ptr noundef nonnull %3, ptr noundef nonnull %2, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7) #7
  %23 = icmp sgt i32 %22, -1
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %0
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.2) #9
  %26 = load ptr, ptr %11, align 8, !tbaa !19
  %27 = load i64, ptr %26, align 8, !tbaa !20
  call void @UnityAssertEqualNumber(i64 noundef 1000, i64 noundef %27, ptr noundef null, i64 noundef 169, i32 noundef 148) #7
  %28 = getelementptr inbounds i8, ptr %11, i64 16
  br label %29

29:                                               ; preds = %._crit_edge, %29
  %indvars.iv = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next, %29 ]
  %30 = getelementptr inbounds [1000 x i32], ptr @__const.test_offset_index_add_no_data.A_offsets, i64 0, i64 %indvars.iv
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = load ptr, ptr %11, align 8, !tbaa !19
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = load i32, ptr %12, align 8, !tbaa !11
  %37 = icmp eq i32 %36, 0
  %38 = select i1 %37, i64 0, i64 12
  %39 = getelementptr inbounds i8, ptr %35, i64 %38
  %40 = load i32, ptr %28, align 8, !tbaa !23
  %41 = zext i32 %40 to i64
  %42 = mul nuw nsw i64 %indvars.iv, %41
  %43 = getelementptr inbounds i8, ptr %39, i64 %42
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load i64, ptr %44, align 8, !tbaa !24
  call void @UnityAssertEqualNumber(i64 noundef %32, i64 noundef %45, ptr noundef null, i64 noundef 174, i32 noundef 148) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond.not, label %46, label %29, !llvm.loop !26

46:                                               ; preds = %29
  call void @offset_index_store(ptr noundef nonnull %11) #7
  call void @offset_index_destroy(ptr noundef nonnull %8) #7
  %47 = getelementptr inbounds i8, ptr %7, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !27
  %.not = icmp eq ptr %48, null
  br i1 %.not, label %50, label %49

49:                                               ; preds = %46
  call void @free(ptr noundef nonnull %48) #7
  br label %50

50:                                               ; preds = %49, %46
  call void @input_file_destroy(ptr noundef nonnull %1) #7
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %51) #7
  %52 = call ptr @offset_index_load(ptr noundef nonnull @.str.1) #7
  store ptr %52, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 32
  %54 = load i32, ptr %53, align 8, !tbaa !11
  %55 = zext i32 %54 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %55, ptr noundef null, i64 noundef 187, i32 noundef 148) #7
  br label %56

56:                                               ; preds = %50, %56
  %indvars.iv12 = phi i64 [ 0, %50 ], [ %indvars.iv.next13, %56 ]
  %57 = getelementptr inbounds [1000 x i32], ptr @__const.test_offset_index_add_no_data.A_offsets, i64 0, i64 %indvars.iv12
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !22
  %64 = getelementptr inbounds i8, ptr %60, i64 32
  %65 = load i32, ptr %64, align 8, !tbaa !11
  %66 = icmp eq i32 %65, 0
  %67 = select i1 %66, i64 0, i64 12
  %68 = getelementptr inbounds i8, ptr %63, i64 %67
  %69 = getelementptr inbounds i8, ptr %60, i64 16
  %70 = load i32, ptr %69, align 8, !tbaa !23
  %71 = zext i32 %70 to i64
  %72 = mul nuw nsw i64 %indvars.iv12, %71
  %73 = getelementptr inbounds i8, ptr %68, i64 %72
  %74 = getelementptr inbounds i8, ptr %73, i64 8
  %75 = load i64, ptr %74, align 8, !tbaa !24
  call void @UnityAssertEqualNumber(i64 noundef %59, i64 noundef %75, ptr noundef null, i64 noundef 191, i32 noundef 148) #7
  %indvars.iv.next13 = add nuw nsw i64 %indvars.iv12, 1
  %exitcond15.not = icmp eq i64 %indvars.iv.next13, 1000
  br i1 %exitcond15.not, label %76, label %56, !llvm.loop !29

76:                                               ; preds = %56
  call void @offset_index_destroy(ptr noundef nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret void
}

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

declare ptr @input_file_init(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare ptr @offset_index_init(i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare i64 @offset_index_add(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare void @offset_index_store(ptr noundef) local_unnamed_addr #2

declare void @offset_index_destroy(ptr noundef) local_unnamed_addr #2

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

declare void @input_file_destroy(ptr noundef) local_unnamed_addr #2

declare ptr @offset_index_load(ptr noundef) local_unnamed_addr #2

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { cold 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"offset_index", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32}
!13 = !{!14, !6, i64 64}
!14 = !{!"input_file", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!15 = !{!"long", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !6, i64 0}
!20 = !{!21, !15, i64 0}
!21 = !{!"file_id_offset_pairs", !15, i64 0, !15, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 16}
!23 = !{!12, !10, i64 16}
!24 = !{!25, !15, i64 8}
!25 = !{!"file_id_offset_pair", !10, i64 0, !15, i64 8}
!26 = distinct !{!26, !18}
!27 = !{!28, !6, i64 16}
!28 = !{!"__kstring_t", !15, i64 0, !15, i64 8, !6, i64 16}
!29 = distinct !{!29, !18}


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