; 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 }
%struct.offset_data_append_data_test_struct = type { i32 }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@__const.test_offset_index_add_data.A_offsets = external hidden unnamed_addr constant [1000 x i32], align 16
@__const.test_offset_index_add_data.A_data = external hidden unnamed_addr constant [1000 x i32], align 16
@offset_data_size = external dso_local global i32, align 4
@offset_data_append_data = external dso_local global ptr, align 8

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

; 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) #1

declare ptr @input_file_init(ptr noundef) #2

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

; Function Attrs: 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) #2

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

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

declare void @offset_index_destroy(ptr noundef) #2

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

declare void @input_file_destroy(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @offset_data_append_data_test_func(ptr noundef, ptr noundef) #6

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

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

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

38:                                               ; preds = %26
  %39 = load ptr, ptr %11, 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 429, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %105, %38
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = icmp ult i32 %45, 1000
  br i1 %46, label %47, label %108

47:                                               ; preds = %44
  %48 = load i32, ptr %13, 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 %11, 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 %11, 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 %13, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = load ptr, ptr %11, 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 434, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.offset_index, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = getelementptr inbounds %struct.file_id_offset_pairs, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !22
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.offset_index, ptr %80, i32 0, i32 4
  %82 = load i32, ptr %81, align 8, !tbaa !11
  %83 = icmp eq i32 %82, 0
  %84 = zext i1 %83 to i64
  %85 = select i1 %83, i64 0, i64 12
  %86 = getelementptr inbounds i8, ptr %79, i64 %85
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.offset_index, ptr %89, i32 0, i32 2
  %91 = load i32, ptr %90, align 8, !tbaa !23
  %92 = zext i32 %91 to i64
  %93 = mul i64 %88, %92
  %94 = add i64 %93, 16
  %95 = getelementptr inbounds i8, ptr %86, i64 %94
  store ptr %95, ptr %14, align 8, !tbaa !5
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [1000 x i32], ptr %2, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.offset_data_append_data_test_struct, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 4, !tbaa !26
  %104 = zext i32 %103 to i64
  call void @UnityAssertEqualNumber(i64 noundef %100, i64 noundef %104, ptr noundef null, i64 noundef 438, i32 noundef 148)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %105

105:                                              ; preds = %47
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = add i32 %106, 1
  store i32 %107, ptr %13, align 4, !tbaa !9
  br label %44, !llvm.loop !28

108:                                              ; preds = %44
  %109 = getelementptr inbounds %struct.__kstring_t, ptr %10, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !29
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %115

112:                                              ; preds = %108
  %113 = getelementptr inbounds %struct.__kstring_t, ptr %10, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !29
  call void @free(ptr noundef %114) #7
  br label %115

115:                                              ; preds = %112, %108
  call void @input_file_destroy(ptr noundef %4)
  call void @offset_index_destroy(ptr noundef %11)
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %116) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4000, ptr %1) #7
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 = { 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 #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 = !{!27, !10, i64 0}
!27 = !{!"offset_data_append_data_test_struct", !10, i64 0}
!28 = distinct !{!28, !18}
!29 = !{!30, !6, i64 16}
!30 = !{!"__kstring_t", !15, i64 0, !15, i64 8, !6, i64 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.__kstring_t = type { i64, i64, ptr }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@__const.test_offset_index_add_data.A_offsets = external hidden unnamed_addr constant [1000 x i32], align 16
@__const.test_offset_index_add_data.A_data = external hidden unnamed_addr constant [1000 x i32], align 16
@offset_data_size = external dso_local local_unnamed_addr global i32, align 4
@offset_data_append_data = external dso_local local_unnamed_addr global ptr, 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 @input_file_init(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

declare void @offset_index_destroy(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 #4

declare void @input_file_destroy(ptr 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: nounwind uwtable
declare dso_local void @offset_data_append_data_test_func(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local void @test_offset_index_add_data() local_unnamed_addr #5 {
  %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) #6
  %9 = tail call ptr @input_file_init(ptr noundef nonnull @.str) #6
  store ptr %9, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 10, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %10 = tail call noalias dereferenceable_or_null(10) ptr @malloc(i64 noundef 10) #7
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  store i32 4, ptr @offset_data_size, align 4, !tbaa !9
  store ptr @offset_data_append_data_test_func, ptr @offset_data_append_data, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %11 = tail call ptr @offset_index_init(i32 noundef 100, ptr noundef nonnull @.str.1) #6
  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 412, i32 noundef 148) #6
  %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) #6
  %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) #6
  %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) #6
  %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 %11, align 8, !tbaa !19
  %25 = load i64, ptr %24, align 8, !tbaa !20
  call void @UnityAssertEqualNumber(i64 noundef 1000, i64 noundef %25, ptr noundef null, i64 noundef 429, i32 noundef 148) #6
  %26 = getelementptr inbounds i8, ptr %11, i64 16
  br label %27

27:                                               ; preds = %._crit_edge, %27
  %indvars.iv = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next, %27 ]
  %28 = getelementptr inbounds [1000 x i32], ptr @__const.test_offset_index_add_data.A_offsets, i64 0, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = load ptr, ptr %11, align 8, !tbaa !19
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %34 = load i32, ptr %12, align 8, !tbaa !11
  %35 = icmp eq i32 %34, 0
  %36 = select i1 %35, i64 0, i64 12
  %37 = getelementptr inbounds i8, ptr %33, i64 %36
  %38 = load i32, ptr %26, align 8, !tbaa !23
  %39 = zext i32 %38 to i64
  %40 = mul nuw nsw i64 %indvars.iv, %39
  %41 = getelementptr inbounds i8, ptr %37, i64 %40
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  %43 = load i64, ptr %42, align 8, !tbaa !24
  call void @UnityAssertEqualNumber(i64 noundef %30, i64 noundef %43, ptr noundef null, i64 noundef 434, i32 noundef 148) #6
  %44 = load ptr, ptr %11, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  %47 = load i32, ptr %12, align 8, !tbaa !11
  %48 = icmp eq i32 %47, 0
  %49 = select i1 %48, i64 0, i64 12
  %50 = getelementptr inbounds i8, ptr %46, i64 %49
  %51 = load i32, ptr %26, align 8, !tbaa !23
  %52 = zext i32 %51 to i64
  %53 = mul nuw nsw i64 %indvars.iv, %52
  %54 = getelementptr inbounds i8, ptr %50, i64 %53
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = getelementptr inbounds [1000 x i32], ptr @__const.test_offset_index_add_data.A_data, i64 0, i64 %indvars.iv
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = load i32, ptr %55, align 4, !tbaa !26
  %60 = zext i32 %59 to i64
  call void @UnityAssertEqualNumber(i64 noundef %58, i64 noundef %60, ptr noundef null, i64 noundef 438, i32 noundef 148) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond.not, label %61, label %27, !llvm.loop !28

61:                                               ; preds = %27
  %62 = getelementptr inbounds i8, ptr %7, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !29
  %.not = icmp eq ptr %63, null
  br i1 %.not, label %65, label %64

64:                                               ; preds = %61
  call void @free(ptr noundef nonnull %63) #6
  br label %65

65:                                               ; preds = %64, %61
  call void @input_file_destroy(ptr noundef nonnull %1) #6
  call void @offset_index_destroy(ptr noundef nonnull %8) #6
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %66) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!27, !10, i64 0}
!27 = !{!"offset_data_append_data_test_struct", !10, i64 0}
!28 = distinct !{!28, !18}
!29 = !{!30, !6, i64 16}
!30 = !{!"__kstring_t", !15, i64 0, !15, i64 8, !6, i64 16}


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