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

; 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.file_data = type { ptr, i32, double }
%struct.input_file = type { ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [3 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 ptr @input_file_init(ptr noundef) #1

declare void @input_file_destroy(ptr noundef) #1

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @test_get_file_stats() #6 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %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 i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #8
  %18 = call ptr @input_file_init(ptr noundef @.str.5)
  store ptr %18, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %19 = call ptr @unordered_list_init(i32 noundef 1)
  store ptr %19, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %20 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 24) #9
  store ptr %20, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call i32 @unordered_list_add(ptr noundef %21, ptr noundef %22)
  store i32 %23, ptr %4, align 4, !tbaa !9
  %24 = call noalias ptr @strdup(ptr noundef @.str.5) #8
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.file_data, ptr %25, i32 0, i32 0
  store ptr %24, ptr %26, align 8, !tbaa !11
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.file_data, ptr %27, i32 0, i32 1
  store i32 0, ptr %28, align 8, !tbaa !14
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.file_data, ptr %29, i32 0, i32 2
  store double 0.000000e+00, ptr %30, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 10, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = mul i64 %32, 1
  %34 = call noalias ptr @malloc(i64 noundef %33) #10
  store ptr %34, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  br label %35

35:                                               ; preds = %42, %0
  %36 = load ptr, ptr %1, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.input_file, ptr %36, i32 0, i32 8
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  %40 = call i32 %38(ptr noundef %39, ptr noundef %6, ptr noundef %5, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10)
  %41 = icmp sge i32 %40, 0
  br i1 %41, label %42, label %55

42:                                               ; preds = %35
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sub i32 %43, %44
  %46 = uitofp i32 %45 to double
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.file_data, ptr %47, i32 0, i32 2
  %49 = load double, ptr %48, align 8, !tbaa !15
  %50 = fadd double %49, %46
  store double %50, ptr %48, align 8, !tbaa !15
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.file_data, ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 8, !tbaa !14
  %54 = add i32 %53, 1
  store i32 %54, ptr %52, align 8, !tbaa !14
  br label %35, !llvm.loop !19

55:                                               ; preds = %35
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.file_data, ptr %56, i32 0, i32 2
  %58 = load double, ptr %57, align 8, !tbaa !15
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.file_data, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !14
  %62 = uitofp i32 %61 to double
  %63 = fdiv double %58, %62
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.file_data, ptr %64, i32 0, i32 2
  store double %63, ptr %65, align 8, !tbaa !15
  call void @input_file_destroy(ptr noundef %1)
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %66) #8
  %67 = getelementptr inbounds %struct.__kstring_t, ptr %10, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !21
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %73

70:                                               ; preds = %55
  %71 = getelementptr inbounds %struct.__kstring_t, ptr %10, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  call void @free(ptr noundef %72) #8
  br label %73

73:                                               ; preds = %70, %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr @.str.15, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = call noalias ptr @fopen(ptr noundef %74, ptr noundef @.str.16)
  store ptr %75, ptr %15, align 8, !tbaa !5
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  call void @unordered_list_store(ptr noundef %76, ptr noundef %77, ptr noundef %78, ptr noundef @file_data_store)
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = call i32 @fclose(ptr noundef %79)
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = call noalias ptr @fopen(ptr noundef %81, ptr noundef @.str.17)
  store ptr %82, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = call ptr @unordered_list_load(ptr noundef %83, ptr noundef %84, ptr noundef @file_data_load)
  store ptr %85, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = load i32, ptr %4, align 4, !tbaa !9
  %88 = call ptr @unordered_list_get(ptr noundef %86, i32 noundef %87)
  store ptr %88, ptr %17, align 8, !tbaa !5
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.file_data, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = load ptr, ptr %17, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.file_data, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = call i32 @strcmp(ptr noundef %91, ptr noundef %94) #11
  %96 = sext i32 %95 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %96, ptr noundef null, i64 noundef 181, i32 noundef 148)
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.file_data, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !14
  %100 = zext i32 %99 to i64
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.file_data, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !14
  %104 = zext i32 %103 to i64
  call void @UnityAssertEqualNumber(i64 noundef %100, i64 noundef %104, ptr noundef null, i64 noundef 182, i32 noundef 148)
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.file_data, ptr %105, i32 0, i32 2
  %107 = load double, ptr %106, align 8, !tbaa !15
  %108 = fptosi double %107 to i64
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.file_data, ptr %109, i32 0, i32 2
  %111 = load double, ptr %110, align 8, !tbaa !15
  %112 = fptosi double %111 to i64
  call void @UnityAssertEqualNumber(i64 noundef %108, i64 noundef %112, ptr noundef null, i64 noundef 183, i32 noundef 148)
  call void @unordered_list_destroy(ptr noundef %2, ptr noundef @file_data_free)
  call void @unordered_list_destroy(ptr noundef %16, ptr noundef @file_data_free)
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = call i32 @remove(ptr noundef %113) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  ret void
}

declare ptr @unordered_list_init(i32 noundef) #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #7

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

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #5

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

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

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

declare i32 @fclose(ptr noundef) #1

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

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

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

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

declare void @file_data_free(ptr noundef) #1

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

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 allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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 allocsize(0,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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"file_data", !6, i64 0, !10, i64 8, !13, i64 16}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !13, i64 16}
!16 = !{!17, !6, i64 64}
!17 = !{!"input_file", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !18, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!18 = !{!"long", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !6, i64 16}
!22 = !{!"__kstring_t", !18, i64 0, !18, 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.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [3 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 ptr @input_file_init(ptr noundef) local_unnamed_addr #1

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: 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 void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
define dso_local void @test_get_file_stats() local_unnamed_addr #6 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca %struct.__kstring_t, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #10
  %10 = tail call ptr @input_file_init(ptr noundef nonnull @.str.5) #10
  store ptr %10, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #10
  %11 = tail call ptr @unordered_list_init(i32 noundef 1) #10
  store ptr %11, ptr %2, align 8, !tbaa !5
  %12 = tail call noalias dereferenceable_or_null(24) ptr @calloc(i64 noundef 1, i64 noundef 24) #11
  %13 = tail call i32 @unordered_list_add(ptr noundef %11, ptr noundef %12) #10
  %14 = tail call noalias ptr @strdup(ptr noundef nonnull @.str.5) #10
  store ptr %14, ptr %12, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 0, ptr %15, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %12, i64 16
  store double 0.000000e+00, ptr %16, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  store i32 10, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %17 = tail call noalias dereferenceable_or_null(10) ptr @malloc(i64 noundef 10) #12
  store ptr %17, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  %18 = getelementptr inbounds i8, ptr %10, i64 64
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = call i32 %19(ptr noundef %10, ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #10
  %21 = icmp sgt i32 %20, -1
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %22 = load i32, ptr %6, align 4, !tbaa !15
  %23 = load i32, ptr %5, align 4, !tbaa !15
  %24 = sub i32 %22, %23
  %25 = uitofp i32 %24 to double
  %26 = load double, ptr %16, align 8, !tbaa !14
  %27 = fadd double %26, %25
  store double %27, ptr %16, align 8, !tbaa !14
  %28 = load i32, ptr %15, align 8, !tbaa !13
  %29 = add i32 %28, 1
  store i32 %29, ptr %15, align 8, !tbaa !13
  %30 = load ptr, ptr %18, align 8, !tbaa !16
  %31 = call i32 %30(ptr noundef nonnull %10, ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #10
  %32 = icmp sgt i32 %31, -1
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph, %0
  %33 = load double, ptr %16, align 8, !tbaa !14
  %34 = load i32, ptr %15, align 8, !tbaa !13
  %35 = uitofp i32 %34 to double
  %36 = fdiv double %33, %35
  store double %36, ptr %16, align 8, !tbaa !14
  call void @input_file_destroy(ptr noundef nonnull %1) #10
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %37) #10
  %38 = getelementptr inbounds i8, ptr %8, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !21
  %.not = icmp eq ptr %39, null
  br i1 %.not, label %41, label %40

40:                                               ; preds = %._crit_edge
  call void @free(ptr noundef nonnull %39) #10
  br label %41

41:                                               ; preds = %40, %._crit_edge
  %42 = call noalias ptr @fopen(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16)
  call void @unordered_list_store(ptr noundef %11, ptr noundef %42, ptr noundef nonnull @.str.15, ptr noundef nonnull @file_data_store) #10
  %43 = call i32 @fclose(ptr noundef %42)
  %44 = call noalias ptr @fopen(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %45 = call ptr @unordered_list_load(ptr noundef %44, ptr noundef nonnull @.str.15, ptr noundef nonnull @file_data_load) #10
  store ptr %45, ptr %9, align 8, !tbaa !5
  %46 = call ptr @unordered_list_get(ptr noundef %45, i32 noundef %13) #10
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = load ptr, ptr %46, align 8, !tbaa !9
  %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) %48) #13
  %50 = sext i32 %49 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %50, ptr noundef null, i64 noundef 181, i32 noundef 148) #10
  %51 = load i32, ptr %15, align 8, !tbaa !13
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %46, i64 8
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = zext i32 %54 to i64
  call void @UnityAssertEqualNumber(i64 noundef %52, i64 noundef %55, ptr noundef null, i64 noundef 182, i32 noundef 148) #10
  %56 = load double, ptr %16, align 8, !tbaa !14
  %57 = fptosi double %56 to i64
  %58 = getelementptr inbounds i8, ptr %46, i64 16
  %59 = load double, ptr %58, align 8, !tbaa !14
  %60 = fptosi double %59 to i64
  call void @UnityAssertEqualNumber(i64 noundef %57, i64 noundef %60, ptr noundef null, i64 noundef 183, i32 noundef 148) #10
  call void @unordered_list_destroy(ptr noundef nonnull %2, ptr noundef nonnull @file_data_free) #10
  call void @unordered_list_destroy(ptr noundef nonnull %9, ptr noundef nonnull @file_data_free) #10
  %61 = call i32 @remove(ptr noundef nonnull @.str.15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #10
  ret void
}

declare ptr @unordered_list_init(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #8

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

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

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

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

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

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

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

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

declare void @file_data_free(ptr noundef) #1

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

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 nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #8 = { mustprogress nofree nounwind willreturn 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { nounwind allocsize(0,1) }
attributes #12 = { nounwind allocsize(0) }
attributes #13 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"file_data", !6, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !12, i64 16}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !6, i64 64}
!17 = !{!"input_file", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !18, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!18 = !{!"long", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !6, i64 16}
!22 = !{!"__kstring_t", !18, i64 0, !18, i64 8, !6, i64 16}


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