; LLVM IR from logicchains/LPATHBench :: c (read_graph_file)

; 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.node_t = type { i32, [0 x %struct.path_t] }
%struct.path_t = type { i32, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 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

; 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
define dso_local ptr @read_graph_file(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, 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 noalias ptr @fopen(ptr noundef %13, ptr noundef @.str)
  store ptr %14, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %19, label %17

17:                                               ; preds = %1
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #8
  unreachable

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %20, ptr noundef @.str.3, ptr noundef %4)
  %22 = icmp ne i32 %21, 1
  br i1 %22, label %26, label %23

23:                                               ; preds = %19
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %23, %19
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @exit(i32 noundef 1) #8
  unreachable

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = mul i32 100, %29
  %31 = zext i32 %30 to i64
  %32 = mul i64 %31, 8
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = mul i64 %34, 4
  %36 = add i64 %32, %35
  %37 = call noalias ptr @malloc(i64 noundef %36) #9
  store ptr %37, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = call noalias ptr @calloc(i64 noundef %39, i64 noundef 8) #10
  store ptr %40, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 -1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  br label %41

41:                                               ; preds = %90, %28
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %42, ptr noundef @.str.5, ptr noundef %10, ptr noundef %11, ptr noundef %12)
  %44 = icmp eq i32 %43, 3
  br i1 %44, label %45, label %115

45:                                               ; preds = %41
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = add i32 %46, 1
  store i32 %47, ptr %7, align 4, !tbaa !9
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = icmp ne i32 %48, %49
  br i1 %50, label %51, label %90

51:                                               ; preds = %45
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp ugt i32 %52, 2
  br i1 %53, label %54, label %83

54:                                               ; preds = %51
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.node_t, ptr %60, i32 0, i32 0
  store i32 %55, ptr %61, align 4, !tbaa !9
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = mul i64 8, %64
  %66 = getelementptr inbounds i8, ptr %62, i64 %65
  %67 = getelementptr inbounds i8, ptr %66, i64 4
  store ptr %67, ptr %5, align 8, !tbaa !5
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = icmp ult i32 %68, %69
  br i1 %70, label %79, label %71

71:                                               ; preds = %54
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %4, align 4, !tbaa !9
  %74 = icmp uge i32 %72, %73
  br i1 %74, label %79, label %75

75:                                               ; preds = %71
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = icmp uge i32 %76, %77
  br i1 %78, label %79, label %82

79:                                               ; preds = %75, %71, %54
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %80)
  call void @exit(i32 noundef 1) #8
  unreachable

82:                                               ; preds = %75
  br label %83

83:                                               ; preds = %82, %51
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i32, ptr %10, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds ptr, ptr %85, i64 %87
  store ptr %84, ptr %88, align 8, !tbaa !5
  %89 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %89, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %83, %45
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i32, ptr %10, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.node_t, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds [0 x %struct.path_t], ptr %97, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.path_t, ptr %100, i32 0, i32 0
  store i32 %91, ptr %101, align 4, !tbaa !11
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.node_t, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds [0 x %struct.path_t], ptr %108, i64 0, i64 %110
  %112 = getelementptr inbounds %struct.path_t, ptr %111, i32 0, i32 1
  store i32 %102, ptr %112, align 4, !tbaa !13
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = add i32 %113, 1
  store i32 %114, ptr %9, align 4, !tbaa !9
  br label %41, !llvm.loop !14

115:                                              ; preds = %41
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = call i32 @feof(ptr noundef %116) #7
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %122, label %119

119:                                              ; preds = %115
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %120)
  call void @exit(i32 noundef 1) #8
  unreachable

122:                                              ; preds = %115
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %124, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.node_t, ptr %128, i32 0, i32 0
  store i32 %123, ptr %129, align 4, !tbaa !9
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = call i32 @fclose(ptr noundef %130)
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  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 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, 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 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
  ret ptr %132
}

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #2

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

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

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #6

declare i32 @fclose(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { noreturn 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 #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 = { 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 #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 = { noreturn nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind allocsize(0,1) }

!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 0}
!12 = !{!"", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 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

; 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
define dso_local noalias noundef ptr @read_graph_file(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %9

7:                                                ; preds = %1
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2)
  tail call void @exit(i32 noundef 1) #7
  unreachable

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %10 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %6, ptr noundef nonnull @.str.3, ptr noundef nonnull %2) #8
  %11 = icmp ne i32 %10, 1
  %12 = load i32, ptr %2, align 4
  %13 = icmp eq i32 %12, 0
  %or.cond = select i1 %11, i1 true, i1 %13
  br i1 %or.cond, label %14, label %16

14:                                               ; preds = %9
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @exit(i32 noundef 1) #7
  unreachable

16:                                               ; preds = %9
  %17 = mul i32 %12, 100
  %18 = zext i32 %17 to i64
  %19 = shl nuw nsw i64 %18, 3
  %20 = zext i32 %12 to i64
  %21 = shl nuw nsw i64 %20, 2
  %22 = add nuw nsw i64 %19, %21
  %23 = call noalias ptr @malloc(i64 noundef %22) #9
  %24 = call noalias ptr @calloc(i64 noundef %20, i64 noundef 8) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %25 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %6, ptr noundef nonnull @.str.5, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5) #8
  %26 = icmp eq i32 %25, 3
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %16, %50
  %.049 = phi i32 [ %64, %50 ], [ 0, %16 ]
  %.02848 = phi i32 [ %52, %50 ], [ -1, %16 ]
  %.03047 = phi i32 [ %27, %50 ], [ 1, %16 ]
  %.03146 = phi ptr [ %.2, %50 ], [ %23, %16 ]
  %27 = add i32 %.03047, 1
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %.not39 = icmp eq i32 %28, %.02848
  br i1 %.not39, label %.lr.ph._crit_edge, label %29

.lr.ph._crit_edge:                                ; preds = %.lr.ph
  %.phi.trans.insert = zext i32 %.02848 to i64
  %.phi.trans.insert54 = getelementptr inbounds ptr, ptr %24, i64 %.phi.trans.insert
  %.pre = load ptr, ptr %.phi.trans.insert54, align 8, !tbaa !9
  br label %50

29:                                               ; preds = %.lr.ph
  %30 = icmp ugt i32 %27, 2
  br i1 %30, label %31, label %46

31:                                               ; preds = %29
  %32 = zext i32 %.02848 to i64
  %33 = getelementptr inbounds ptr, ptr %24, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  store i32 %.049, ptr %34, align 4, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = icmp ult i32 %35, %.02848
  br i1 %36, label %44, label %37

37:                                               ; preds = %31
  %38 = zext i32 %.049 to i64
  %39 = shl nuw nsw i64 %38, 3
  %40 = getelementptr inbounds i8, ptr %.03146, i64 %39
  %41 = getelementptr inbounds i8, ptr %40, i64 4
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %.not40 = icmp ult i32 %35, %42
  %43 = load i32, ptr %4, align 4
  %.not41 = icmp ult i32 %43, %42
  %or.cond42 = select i1 %.not40, i1 %.not41, i1 false
  br i1 %or.cond42, label %46, label %44

44:                                               ; preds = %37, %31
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %27)
  call void @exit(i32 noundef 1) #7
  unreachable

46:                                               ; preds = %37, %29
  %47 = phi i32 [ %28, %29 ], [ %35, %37 ]
  %.132 = phi ptr [ %.03146, %29 ], [ %41, %37 ]
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %24, i64 %48
  store ptr %.132, ptr %49, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %.lr.ph._crit_edge, %46
  %51 = phi ptr [ %.132, %46 ], [ %.pre, %.lr.ph._crit_edge ]
  %52 = phi i32 [ %47, %46 ], [ %.02848, %.lr.ph._crit_edge ]
  %.2 = phi ptr [ %.132, %46 ], [ %.03146, %.lr.ph._crit_edge ]
  %.1 = phi i32 [ 0, %46 ], [ %.049, %.lr.ph._crit_edge ]
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %51, i64 4
  %55 = zext i32 %.1 to i64
  %56 = getelementptr inbounds [0 x %struct.path_t], ptr %54, i64 0, i64 %55
  store i32 %53, ptr %56, align 4, !tbaa !11
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %24, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %61, i64 4
  %63 = getelementptr inbounds [0 x %struct.path_t], ptr %62, i64 0, i64 %55, i32 1
  store i32 %57, ptr %63, align 4, !tbaa !13
  %64 = add i32 %.1, 1
  %65 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %6, ptr noundef nonnull @.str.5, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5) #8
  %66 = icmp eq i32 %65, 3
  br i1 %66, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %50
  %67 = zext i32 %52 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %16
  %.030.lcssa = phi i32 [ 1, %16 ], [ %27, %._crit_edge.loopexit ]
  %.028.lcssa = phi i64 [ 4294967295, %16 ], [ %67, %._crit_edge.loopexit ]
  %.0.lcssa = phi i32 [ 0, %16 ], [ %64, %._crit_edge.loopexit ]
  %68 = call i32 @feof(ptr noundef nonnull %6) #8
  %.not38 = icmp eq i32 %68, 0
  br i1 %.not38, label %69, label %71

69:                                               ; preds = %._crit_edge
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.030.lcssa)
  call void @exit(i32 noundef 1) #7
  unreachable

71:                                               ; preds = %._crit_edge
  %72 = getelementptr inbounds ptr, ptr %24, i64 %.028.lcssa
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  store i32 %.0.lcssa, ptr %73, align 4, !tbaa !5
  %74 = call i32 @fclose(ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  ret ptr %24
}

; 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #4

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

; 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 #6

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { noreturn 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 #4 = { "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 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 #6 = { 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 #7 = { noreturn nounwind }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind allocsize(0,1) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass