; LLVM IR from fcimeson/cbTSP :: cbLKH/SRC (WriteCandidates)

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

@CandidateFiles = external dso_local global i32, align 4
@CandidateFileName = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@TraceLevel = external dso_local global i32, align 4
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@Dimension = external dso_local global i32, align 4
@NodeSet = external dso_local global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @WriteCandidates() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %7 = load i32, ptr @CandidateFiles, align 4, !tbaa !5
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %15, label %9

9:                                                ; preds = %0
  %10 = load ptr, ptr @CandidateFileName, align 8, !tbaa !9
  %11 = getelementptr inbounds ptr, ptr %10, i64 0
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = call noalias ptr @fopen(ptr noundef %12, ptr noundef @.str)
  store ptr %13, ptr %1, align 8, !tbaa !9
  %14 = icmp ne ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %9, %0
  store i32 1, ptr %6, align 4
  br label %119

16:                                               ; preds = %9
  %17 = load i32, ptr @TraceLevel, align 4, !tbaa !5
  %18 = icmp sge i32 %17, 1
  br i1 %18, label %19, label %23

19:                                               ; preds = %16
  %20 = load ptr, ptr @CandidateFileName, align 8, !tbaa !9
  %21 = getelementptr inbounds ptr, ptr %20, i64 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  call void (ptr, ...) @printff(ptr noundef @.str.1, ptr noundef %22)
  br label %23

23:                                               ; preds = %19, %16
  %24 = load ptr, ptr %1, align 8, !tbaa !9
  %25 = load i32, ptr @Dimension, align 4, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef @.str.2, i32 noundef %25) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %107, %23
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @Dimension, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %31, label %110

31:                                               ; preds = %27
  %32 = load ptr, ptr @NodeSet, align 8, !tbaa !9
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds %struct.Node, ptr %32, i64 %34
  store ptr %35, ptr %5, align 8, !tbaa !9
  %36 = load ptr, ptr %1, align 8, !tbaa !9
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.Node, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !11
  %40 = load ptr, ptr %5, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.Node, ptr %40, i32 0, i32 21
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %50

44:                                               ; preds = %31
  %45 = load ptr, ptr %5, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.Node, ptr %45, i32 0, i32 21
  %47 = load ptr, ptr %46, align 8, !tbaa !14
  %48 = getelementptr inbounds %struct.Node, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !11
  br label %51

50:                                               ; preds = %31
  br label %51

51:                                               ; preds = %50, %44
  %52 = phi i32 [ %49, %44 ], [ 0, %50 ]
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.3, i32 noundef %39, i32 noundef %52) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.Node, ptr %54, i32 0, i32 43
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  store ptr %56, ptr %4, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %70, %51
  %58 = load ptr, ptr %4, align 8, !tbaa !9
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %65

60:                                               ; preds = %57
  %61 = load ptr, ptr %4, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.Candidate, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !16
  %64 = icmp ne ptr %63, null
  br label %65

65:                                               ; preds = %60, %57
  %66 = phi i1 [ false, %57 ], [ %64, %60 ]
  br i1 %66, label %67, label %73

67:                                               ; preds = %65
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %3, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %67
  %71 = load ptr, ptr %4, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.Candidate, ptr %71, i32 1
  store ptr %72, ptr %4, align 8, !tbaa !9
  br label %57, !llvm.loop !18

73:                                               ; preds = %65
  %74 = load ptr, ptr %1, align 8, !tbaa !9
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.4, i32 noundef %75) #4
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.Node, ptr %77, i32 0, i32 43
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  store ptr %79, ptr %4, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %101, %73
  %81 = load ptr, ptr %4, align 8, !tbaa !9
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %88

83:                                               ; preds = %80
  %84 = load ptr, ptr %4, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.Candidate, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = icmp ne ptr %86, null
  br label %88

88:                                               ; preds = %83, %80
  %89 = phi i1 [ false, %80 ], [ %87, %83 ]
  br i1 %89, label %90, label %104

90:                                               ; preds = %88
  %91 = load ptr, ptr %1, align 8, !tbaa !9
  %92 = load ptr, ptr %4, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.Candidate, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !16
  %95 = getelementptr inbounds %struct.Node, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = load ptr, ptr %4, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.Candidate, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !20
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.5, i32 noundef %96, i32 noundef %99) #4
  br label %101

101:                                              ; preds = %90
  %102 = load ptr, ptr %4, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.Candidate, ptr %102, i32 1
  store ptr %103, ptr %4, align 8, !tbaa !9
  br label %80, !llvm.loop !21

104:                                              ; preds = %88
  %105 = load ptr, ptr %1, align 8, !tbaa !9
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.6) #4
  br label %107

107:                                              ; preds = %104
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !22

110:                                              ; preds = %27
  %111 = load ptr, ptr %1, align 8, !tbaa !9
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.7) #4
  %113 = load ptr, ptr %1, align 8, !tbaa !9
  %114 = call i32 @fclose(ptr noundef %113)
  %115 = load i32, ptr @TraceLevel, align 4, !tbaa !5
  %116 = icmp sge i32 %115, 1
  br i1 %116, label %117, label %118

117:                                              ; preds = %110
  call void (ptr, ...) @printff(ptr noundef @.str.8)
  br label %118

118:                                              ; preds = %117, %110
  store i32 0, ptr %6, align 4
  br label %119

119:                                              ; preds = %118, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  %120 = load i32, ptr %6, align 4
  switch i32 %120, label %122 [
    i32 0, label %121
    i32 1, label %121
  ]

121:                                              ; preds = %119, %119
  ret void

122:                                              ; preds = %119
  unreachable
}

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

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

declare void @printff(ptr noundef, ...) #2

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

declare i32 @fclose(ptr noundef) #2

; 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 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 112}
!15 = !{!12, !10, i64 288}
!16 = !{!17, !10, i64 0}
!17 = !{!"Candidate", !10, i64 0, !6, i64 8, !6, i64 12}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!17, !6, i64 12}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


; 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.Node = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8 }

@CandidateFiles = external dso_local local_unnamed_addr global i32, align 4
@CandidateFileName = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@TraceLevel = external dso_local local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@Dimension = external dso_local local_unnamed_addr global i32, align 4
@NodeSet = external dso_local local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @WriteCandidates() local_unnamed_addr #0 {
  %1 = load i32, ptr @CandidateFiles, align 4, !tbaa !5
  %2 = icmp eq i32 %1, 0
  br i1 %2, label %51, label %3

3:                                                ; preds = %0
  %4 = load ptr, ptr @CandidateFileName, align 8, !tbaa !9
  %5 = load ptr, ptr %4, align 8, !tbaa !9
  %6 = tail call noalias ptr @fopen(ptr noundef %5, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %51, label %7

7:                                                ; preds = %3
  %8 = load i32, ptr @TraceLevel, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %10, label %13

10:                                               ; preds = %7
  %11 = load ptr, ptr @CandidateFileName, align 8, !tbaa !9
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str.1, ptr noundef %12) #3
  br label %13

13:                                               ; preds = %10, %7
  %14 = load i32, ptr @Dimension, align 4, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.2, i32 noundef %14) #3
  %16 = load i32, ptr @Dimension, align 4, !tbaa !5
  %.not3146 = icmp slt i32 %16, 1
  br i1 %.not3146, label %._crit_edge, label %.lr.ph48

.lr.ph48:                                         ; preds = %13, %.critedge2
  %indvars.iv = phi i64 [ %indvars.iv.next, %.critedge2 ], [ 1, %13 ]
  %17 = load ptr, ptr @NodeSet, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.Node, ptr %17, i64 %indvars.iv
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds i8, ptr %18, i64 112
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %.not32 = icmp eq ptr %21, null
  br i1 %.not32, label %24, label %22

22:                                               ; preds = %.lr.ph48
  %23 = load i32, ptr %21, align 8, !tbaa !11
  br label %24

24:                                               ; preds = %.lr.ph48, %22
  %25 = phi i32 [ %23, %22 ], [ 0, %.lr.ph48 ]
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.3, i32 noundef %19, i32 noundef %25) #3
  %27 = getelementptr inbounds i8, ptr %18, i64 288
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %.not3337 = icmp eq ptr %28, null
  br i1 %.not3337, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %24
  %29 = load ptr, ptr %28, align 8, !tbaa !16
  %.not3450 = icmp eq ptr %29, null
  br i1 %.not3450, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.0273852 = phi i32 [ %30, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %.0263951 = phi ptr [ %31, %.lr.ph ], [ %28, %.lr.ph.preheader ]
  %30 = add nuw nsw i32 %.0273852, 1
  %31 = getelementptr inbounds i8, ptr %.0263951, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %.not34 = icmp eq ptr %32, null
  br i1 %.not34, label %.critedge, label %.lr.ph, !llvm.loop !18

.critedge:                                        ; preds = %.lr.ph, %.lr.ph.preheader, %24
  %.027.lcssa = phi i32 [ 0, %24 ], [ 0, %.lr.ph.preheader ], [ %30, %.lr.ph ]
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.4, i32 noundef %.027.lcssa) #3
  %34 = load ptr, ptr %27, align 8, !tbaa !15
  %.not3542 = icmp eq ptr %34, null
  br i1 %.not3542, label %.critedge2, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %.critedge
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %.not3654 = icmp eq ptr %35, null
  br i1 %.not3654, label %.critedge2, label %.lr.ph44

.lr.ph44:                                         ; preds = %.lr.ph44.preheader, %.lr.ph44
  %36 = phi ptr [ %42, %.lr.ph44 ], [ %35, %.lr.ph44.preheader ]
  %.14355 = phi ptr [ %41, %.lr.ph44 ], [ %34, %.lr.ph44.preheader ]
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %.14355, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !20
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.5, i32 noundef %37, i32 noundef %39) #3
  %41 = getelementptr inbounds i8, ptr %.14355, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %.not36 = icmp eq ptr %42, null
  br i1 %.not36, label %.critedge2, label %.lr.ph44, !llvm.loop !21

.critedge2:                                       ; preds = %.lr.ph44, %.lr.ph44.preheader, %.critedge
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.6) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = load i32, ptr @Dimension, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %.not31.not = icmp slt i64 %indvars.iv, %45
  br i1 %.not31.not, label %.lr.ph48, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %.critedge2, %13
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.7) #3
  %47 = tail call i32 @fclose(ptr noundef nonnull %6)
  %48 = load i32, ptr @TraceLevel, align 4, !tbaa !5
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %._crit_edge
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str.8) #3
  br label %51

51:                                               ; preds = %._crit_edge, %50, %0, %3
  ret void
}

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

declare void @printff(ptr noundef, ...) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #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 = { 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 #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 }

!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 = !{!"Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 112}
!15 = !{!12, !10, i64 288}
!16 = !{!17, !10, i64 0}
!17 = !{!"Candidate", !10, i64 0, !6, i64 8, !6, i64 12}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!17, !6, i64 12}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


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