; LLVM IR from DevonCrawford/A-Pathfinding-in-C-command-line :: backups (pathfinding_final)

; 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.GridSize = type { i32, i32 }
%struct.Node = type { ptr, i32, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@size = external dso_local global %struct.GridSize, align 4
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.GridSize, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.Node, align 8
  %25 = alloca %struct.Node, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds ptr, ptr %26, i64 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call noalias ptr @fopen(ptr noundef %28, ptr noundef @.str)
  store ptr %29, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !9
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %105

32:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %33 = load ptr, ptr %6, align 8, !tbaa !9
  %34 = call i64 @getGridSize(ptr noundef %33)
  store i64 %34, ptr %8, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @size, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %35 = load i32, ptr getelementptr inbounds (%struct.GridSize, ptr @size, i32 0, i32 1), align 4, !tbaa !12
  %36 = zext i32 %35 to i64
  %37 = load i32, ptr @size, align 4, !tbaa !14
  %38 = zext i32 %37 to i64
  %39 = call ptr @llvm.stacksave.p0()
  store ptr %39, ptr %9, align 8
  %40 = mul nuw i64 %36, %38
  %41 = alloca i8, i64 %40, align 16
  store i64 %36, ptr %10, align 8
  store i64 %38, ptr %11, align 8
  %42 = load i32, ptr getelementptr inbounds (%struct.GridSize, ptr @size, i32 0, i32 1), align 4, !tbaa !12
  %43 = zext i32 %42 to i64
  %44 = load i32, ptr @size, align 4, !tbaa !14
  %45 = zext i32 %44 to i64
  %46 = mul nuw i64 %43, %45
  %47 = alloca i8, i64 %46, align 16
  store i64 %43, ptr %12, align 8
  store i64 %45, ptr %13, align 8
  call void @clearGrid(ptr noundef %41)
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = call i32 @readFile(ptr noundef %48, ptr noundef %41)
  store i32 %49, ptr %7, align 4, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %103

52:                                               ; preds = %32
  call void @copyGrid(ptr noundef %47, ptr noundef %41)
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @printGrid(ptr noundef %41)
  %54 = load i32, ptr getelementptr inbounds (%struct.GridSize, ptr @size, i32 0, i32 1), align 4, !tbaa !12
  %55 = zext i32 %54 to i64
  %56 = load i32, ptr @size, align 4, !tbaa !14
  %57 = zext i32 %56 to i64
  %58 = call ptr @llvm.stacksave.p0()
  store ptr %58, ptr %14, align 8
  %59 = mul nuw i64 %55, %57
  %60 = alloca %struct.Node, i64 %59, align 16
  store i64 %55, ptr %15, align 8
  store i64 %57, ptr %16, align 8
  %61 = load i32, ptr getelementptr inbounds (%struct.GridSize, ptr @size, i32 0, i32 1), align 4, !tbaa !12
  %62 = zext i32 %61 to i64
  %63 = load i32, ptr @size, align 4, !tbaa !14
  %64 = zext i32 %63 to i64
  %65 = mul nuw i64 %62, %64
  %66 = alloca %struct.Node, i64 %65, align 16
  store i64 %62, ptr %17, align 8
  store i64 %64, ptr %18, align 8
  %67 = load i32, ptr getelementptr inbounds (%struct.GridSize, ptr @size, i32 0, i32 1), align 4, !tbaa !12
  %68 = zext i32 %67 to i64
  %69 = load i32, ptr @size, align 4, !tbaa !14
  %70 = zext i32 %69 to i64
  %71 = mul nuw i64 %68, %70
  %72 = alloca %struct.Node, i64 %71, align 16
  store i64 %68, ptr %19, align 8
  store i64 %70, ptr %20, align 8
  call void @initNodes(ptr noundef %60)
  call void @initNodes(ptr noundef %66)
  call void @initNodes(ptr noundef %72)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #5
  call void @getNodeChar(ptr dead_on_unwind writable sret(%struct.Node) align 8 %24, ptr noundef %41, i8 noundef signext 83)
  call void @llvm.lifetime.start.p0(i64 40, ptr %25) #5
  call void @getNodeChar(ptr dead_on_unwind writable sret(%struct.Node) align 8 %25, ptr noundef %41, i8 noundef signext 71)
  %73 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 1
  %74 = load i32, ptr %73, align 8, !tbaa !15
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %52
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %78

78:                                               ; preds = %76, %52
  %79 = getelementptr inbounds %struct.Node, ptr %25, i32 0, i32 1
  %80 = load i32, ptr %79, align 8, !tbaa !15
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %84

82:                                               ; preds = %78
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %84

84:                                               ; preds = %82, %78
  %85 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !15
  %87 = icmp eq i32 %86, 1
  br i1 %87, label %88, label %101

88:                                               ; preds = %84
  %89 = getelementptr inbounds %struct.Node, ptr %25, i32 0, i32 1
  %90 = load i32, ptr %89, align 8, !tbaa !15
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %101

92:                                               ; preds = %88
  call void @addListNode(ptr noundef %66, ptr noundef %22, ptr noundef byval(%struct.Node) align 8 %24)
  call void @findPath(ptr noundef %41, ptr noundef %60, ptr noundef %66, ptr noundef %72, ptr noundef byval(%struct.Node) align 8 %24, ptr noundef byval(%struct.Node) align 8 %25, ptr noundef byval(%struct.Node) align 8 %24, ptr noundef %21, ptr noundef %22, ptr noundef %23)
  %93 = load i32, ptr %23, align 4, !tbaa !5
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %95, label %100

95:                                               ; preds = %92
  call void @insertPath(ptr noundef %47, ptr noundef %72)
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @printGrid(ptr noundef %47)
  %97 = load ptr, ptr %5, align 8, !tbaa !9
  %98 = getelementptr inbounds ptr, ptr %97, i64 1
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  call void @writeFile(ptr noundef %47, ptr noundef %99)
  br label %100

100:                                              ; preds = %95, %92
  br label %101

101:                                              ; preds = %100, %88, %84
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  %102 = load ptr, ptr %14, align 8
  call void @llvm.stackrestore.p0(ptr %102)
  br label %103

103:                                              ; preds = %101, %32
  %104 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %104)
  br label %116

105:                                              ; preds = %2
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %108, label %110

108:                                              ; preds = %105
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %115

110:                                              ; preds = %105
  %111 = load ptr, ptr %5, align 8, !tbaa !9
  %112 = getelementptr inbounds ptr, ptr %111, i64 1
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %113)
  br label %115

115:                                              ; preds = %110, %108
  br label %116

116:                                              ; preds = %115, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  ret i32 0
}

; 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

; Function Attrs: nounwind uwtable
declare dso_local i64 @getGridSize(ptr noundef) #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) #3

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nounwind uwtable
declare dso_local void @clearGrid(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @readFile(ptr noundef, ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @printGrid(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @initNodes(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @getNodeChar(ptr dead_on_unwind noalias writable sret(%struct.Node) align 8, ptr noundef, i8 noundef signext) #0

; Function Attrs: nounwind uwtable
declare dso_local void @addListNode(ptr noundef, ptr noundef, ptr noundef byval(%struct.Node) align 8) #0

; Function Attrs: nounwind uwtable
declare dso_local void @findPath(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef byval(%struct.Node) align 8, ptr noundef byval(%struct.Node) align 8, ptr noundef byval(%struct.Node) align 8, ptr noundef, ptr noundef, ptr noundef) #0

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!12 = !{!13, !6, i64 4}
!13 = !{!"GridSize", !6, i64 0, !6, i64 4}
!14 = !{!13, !6, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"Node", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32}


; 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.GridSize = type { i32, i32 }
%struct.Node = type { ptr, i32, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@size = external dso_local local_unnamed_addr global %struct.GridSize, align 4
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.Node, align 8
  %7 = alloca %struct.Node, align 8
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = tail call noalias ptr @fopen(ptr noundef %9, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %66, label %11

11:                                               ; preds = %2
  %12 = tail call i64 @getGridSize(ptr noundef nonnull %10)
  store i64 %12, ptr @size, align 4
  %13 = lshr i64 %12, 32
  %14 = and i64 %12, 4294967295
  %15 = tail call ptr @llvm.stacksave.p0()
  %16 = mul nuw i64 %14, %13
  %17 = alloca i8, i64 %16, align 16
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @size, i64 4), align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = load i32, ptr @size, align 4, !tbaa !12
  %21 = zext i32 %20 to i64
  %22 = mul nuw i64 %21, %19
  %23 = alloca i8, i64 %22, align 16
  call void @clearGrid(ptr noundef nonnull %17)
  %24 = call i32 @readFile(ptr noundef nonnull %10, ptr noundef nonnull %17)
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %65

26:                                               ; preds = %11
  call void @copyGrid(ptr noundef nonnull %23, ptr noundef nonnull %17)
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @printGrid(ptr noundef nonnull %17)
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @size, i64 4), align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = load i32, ptr @size, align 4, !tbaa !12
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  %33 = mul nuw i64 %31, %29
  %34 = alloca %struct.Node, i64 %33, align 16
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @size, i64 4), align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = load i32, ptr @size, align 4, !tbaa !12
  %38 = zext i32 %37 to i64
  %39 = mul nuw i64 %38, %36
  %40 = alloca %struct.Node, i64 %39, align 16
  %41 = alloca %struct.Node, i64 %39, align 16
  call void @initNodes(ptr noundef nonnull %34)
  call void @initNodes(ptr noundef nonnull %40)
  call void @initNodes(ptr noundef nonnull %41)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 0, ptr %3, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 0, ptr %4, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  call void @getNodeChar(ptr dead_on_unwind nonnull writable sret(%struct.Node) align 8 %6, ptr noundef nonnull %17, i8 noundef signext 83)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  call void @getNodeChar(ptr dead_on_unwind nonnull writable sret(%struct.Node) align 8 %7, ptr noundef nonnull %17, i8 noundef signext 71)
  %42 = getelementptr inbounds i8, ptr %6, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !14
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %26
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %47

47:                                               ; preds = %45, %26
  %48 = getelementptr inbounds i8, ptr %7, i64 8
  %49 = load i32, ptr %48, align 8
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %53

51:                                               ; preds = %47
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %.pre = load i32, ptr %48, align 8
  br label %53

53:                                               ; preds = %51, %47
  %54 = phi i32 [ %.pre, %51 ], [ %49, %47 ]
  %55 = load i32, ptr %42, align 8, !tbaa !14
  %56 = icmp eq i32 %55, 1
  %57 = icmp eq i32 %54, 1
  %or.cond = select i1 %56, i1 %57, i1 false
  br i1 %or.cond, label %58, label %64

58:                                               ; preds = %53
  call void @addListNode(ptr noundef nonnull %40, ptr noundef nonnull %4, ptr noundef nonnull byval(%struct.Node) align 8 %6)
  call void @findPath(ptr noundef nonnull %17, ptr noundef nonnull %34, ptr noundef nonnull %40, ptr noundef nonnull %41, ptr noundef nonnull byval(%struct.Node) align 8 %6, ptr noundef nonnull byval(%struct.Node) align 8 %7, ptr noundef nonnull byval(%struct.Node) align 8 %6, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %59 = load i32, ptr %5, align 4, !tbaa !13
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %61, label %64

61:                                               ; preds = %58
  call void @insertPath(ptr noundef nonnull %23, ptr noundef nonnull %41)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @printGrid(ptr noundef nonnull %23)
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  call void @writeFile(ptr noundef nonnull %23, ptr noundef %63)
  br label %64

64:                                               ; preds = %58, %61, %53
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.stackrestore.p0(ptr %32)
  br label %65

65:                                               ; preds = %64, %11
  call void @llvm.stackrestore.p0(ptr %15)
  br label %73

66:                                               ; preds = %2
  %67 = icmp eq i32 %0, 1
  br i1 %67, label %68, label %70

68:                                               ; preds = %66
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %73

70:                                               ; preds = %66
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %71)
  br label %73

73:                                               ; preds = %68, %70, %65
  ret i32 0
}

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @getGridSize(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nounwind uwtable
declare dso_local void @clearGrid(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @readFile(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @copyGrid(ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @printGrid(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @initNodes(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @getNodeChar(ptr dead_on_unwind noalias writable sret(%struct.Node) align 8, ptr noundef, i8 noundef signext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @addListNode(ptr noundef, ptr noundef, ptr noundef byval(%struct.Node) align 8) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @findPath(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef byval(%struct.Node) align 8, ptr noundef byval(%struct.Node) align 8, ptr noundef byval(%struct.Node) align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @insertPath(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @writeFile(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"GridSize", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 8}
!15 = !{!"Node", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass