; LLVM IR from smv1999/CompetitiveProgrammingQuestionBank :: CodeVita Problems/Jurassic park (cv_jurasic_park)

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

@__const.main.mat = external hidden unnamed_addr constant [5 x [7 x i8]], align 16
@__const.main.gate_pos = external hidden unnamed_addr constant [3 x %struct.positions], align 16
@__const.main.ani_pos = external hidden unnamed_addr constant %struct.positions, align 4
@.str = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [5 x [7 x i8]], align 16
  %3 = alloca [3 x %struct.positions], align 16
  %4 = alloca %struct.positions, align 4
  %5 = alloca %struct.positions, align 4
  %6 = alloca [5 x [7 x i32]], align 16
  %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
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [3 x i32], align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 35, ptr %2) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const.main.mat, i64 35, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.main.gate_pos, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 @__const.main.ani_pos, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 140, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %34, %0
  %17 = load i32, ptr %8, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 3
  br i1 %18, label %19, label %37

19:                                               ; preds = %16
  %20 = getelementptr inbounds [5 x [7 x i32]], ptr %6, i64 0, i64 0
  call void @visitedFill(ptr noundef %20)
  store i32 0, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  %21 = getelementptr inbounds [5 x [7 x i8]], ptr %2, i64 0, i64 0
  %22 = load i32, ptr %8, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 %23
  %25 = getelementptr inbounds [5 x [7 x i32]], ptr %6, i64 0, i64 0
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = load i32, ptr %9, align 4, !tbaa !5
  %28 = load i64, ptr %4, align 4
  %29 = load i64, ptr %24, align 8
  %30 = call i32 @find_path_ani(ptr noundef %21, i64 %28, i64 %29, ptr noundef %25, i32 noundef %26, i32 noundef %27)
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [3 x i32], ptr %15, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %19
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %8, align 4, !tbaa !5
  br label %16, !llvm.loop !9

37:                                               ; preds = %16
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %168, %37
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 5
  br i1 %40, label %41, label %171

41:                                               ; preds = %38
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %164, %41
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 7
  br i1 %44, label %45, label %167

45:                                               ; preds = %42
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 0
  %48 = getelementptr inbounds %struct.positions, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 16, !tbaa !11
  %50 = icmp eq i32 %46, %49
  br i1 %50, label %51, label %57

51:                                               ; preds = %45
  %52 = load i32, ptr %11, align 4, !tbaa !5
  %53 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 0
  %54 = getelementptr inbounds %struct.positions, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !13
  %56 = icmp eq i32 %52, %55
  br i1 %56, label %81, label %57

57:                                               ; preds = %51, %45
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 1
  %60 = getelementptr inbounds %struct.positions, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !11
  %62 = icmp eq i32 %58, %61
  br i1 %62, label %63, label %69

63:                                               ; preds = %57
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 1
  %66 = getelementptr inbounds %struct.positions, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = icmp eq i32 %64, %67
  br i1 %68, label %81, label %69

69:                                               ; preds = %63, %57
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 2
  %72 = getelementptr inbounds %struct.positions, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 16, !tbaa !11
  %74 = icmp eq i32 %70, %73
  br i1 %74, label %75, label %86

75:                                               ; preds = %69
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 2
  %78 = getelementptr inbounds %struct.positions, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !13
  %80 = icmp eq i32 %76, %79
  br i1 %80, label %81, label %86

81:                                               ; preds = %75, %63, %51
  %82 = load i32, ptr %14, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %14, align 4, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %12, align 4, !tbaa !5
  br label %164

86:                                               ; preds = %75, %69
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = getelementptr inbounds %struct.positions, ptr %4, i32 0, i32 0
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = icmp eq i32 %87, %89
  br i1 %90, label %91, label %99

91:                                               ; preds = %86
  %92 = load i32, ptr %11, align 4, !tbaa !5
  %93 = getelementptr inbounds %struct.positions, ptr %4, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !13
  %95 = icmp eq i32 %92, %94
  br i1 %95, label %96, label %99

96:                                               ; preds = %91
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %12, align 4, !tbaa !5
  br label %164

99:                                               ; preds = %91, %86
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [5 x [7 x i8]], ptr %2, i64 0, i64 %101
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [7 x i8], ptr %102, i64 0, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !14
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 71
  br i1 %108, label %109, label %163

109:                                              ; preds = %99
  %110 = load i32, ptr %12, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !5
  %112 = load i32, ptr %10, align 4, !tbaa !5
  %113 = getelementptr inbounds %struct.positions, ptr %5, i32 0, i32 0
  store i32 %112, ptr %113, align 4, !tbaa !11
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = getelementptr inbounds %struct.positions, ptr %5, i32 0, i32 1
  store i32 %114, ptr %115, align 4, !tbaa !13
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %141, %109
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = icmp slt i32 %117, 3
  br i1 %118, label %119, label %144

119:                                              ; preds = %116
  %120 = getelementptr inbounds [5 x [7 x i32]], ptr %6, i64 0, i64 0
  call void @visitedFill(ptr noundef %120)
  store i32 0, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  %121 = getelementptr inbounds [5 x [7 x i8]], ptr %2, i64 0, i64 0
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [3 x %struct.positions], ptr %3, i64 0, i64 %123
  %125 = getelementptr inbounds [5 x [7 x i32]], ptr %6, i64 0, i64 0
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = load i64, ptr %5, align 4
  %129 = load i64, ptr %124, align 8
  %130 = call i32 @find_path_grass(ptr noundef %121, i64 %128, i64 %129, ptr noundef %125, i32 noundef %126, i32 noundef %127)
  store i32 %130, ptr %13, align 4, !tbaa !5
  %131 = load i32, ptr %13, align 4, !tbaa !5
  %132 = load i32, ptr %8, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [3 x i32], ptr %15, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = icmp slt i32 %131, %135
  br i1 %136, label %137, label %140

137:                                              ; preds = %119
  %138 = load i32, ptr %14, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %14, align 4, !tbaa !5
  br label %144

140:                                              ; preds = %119
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %8, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %8, align 4, !tbaa !5
  br label %116, !llvm.loop !15

144:                                              ; preds = %137, %116
  %145 = load i32, ptr %13, align 4, !tbaa !5
  %146 = icmp eq i32 %145, 2147483647
  br i1 %146, label %147, label %162

147:                                              ; preds = %144
  %148 = getelementptr inbounds [5 x [7 x i32]], ptr %6, i64 0, i64 0
  call void @visitedFill(ptr noundef %148)
  store i32 0, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  %149 = getelementptr inbounds [5 x [7 x i8]], ptr %2, i64 0, i64 0
  %150 = getelementptr inbounds [5 x [7 x i32]], ptr %6, i64 0, i64 0
  %151 = load i32, ptr %7, align 4, !tbaa !5
  %152 = load i32, ptr %9, align 4, !tbaa !5
  %153 = load i64, ptr %4, align 4
  %154 = load i64, ptr %5, align 4
  %155 = call i32 @find_path_ani(ptr noundef %149, i64 %153, i64 %154, ptr noundef %150, i32 noundef %151, i32 noundef %152)
  store i32 %155, ptr %7, align 4, !tbaa !5
  %156 = load i32, ptr %7, align 4, !tbaa !5
  %157 = icmp eq i32 %156, 2147483647
  br i1 %157, label %158, label %161

158:                                              ; preds = %147
  %159 = load i32, ptr %14, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %14, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %158, %147
  br label %162

162:                                              ; preds = %161, %144
  br label %163

163:                                              ; preds = %162, %99
  br label %164

164:                                              ; preds = %163, %96, %81
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %11, align 4, !tbaa !5
  br label %42, !llvm.loop !16

167:                                              ; preds = %42
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %10, align 4, !tbaa !5
  br label %38, !llvm.loop !17

171:                                              ; preds = %38
  %172 = load i32, ptr %14, align 4, !tbaa !5
  %173 = load i32, ptr %12, align 4, !tbaa !5
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = sitofp i32 %174 to double
  %176 = fmul double %175, 1.000000e+02
  %177 = load i32, ptr %12, align 4, !tbaa !5
  %178 = sitofp i32 %177 to double
  %179 = fdiv double %176, %178
  %180 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %172, i32 noundef %173, double noundef %179)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 140, ptr %6) #4
  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 24, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 35, ptr %2) #4
  ret i32 0
}

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

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

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

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

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

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

; 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"positions", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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

@__const.main.mat = external hidden unnamed_addr constant [5 x [7 x i8]], align 16
@__const.main.gate_pos = external hidden unnamed_addr constant [3 x %struct.positions], align 16
@__const.main.ani_pos = external hidden unnamed_addr constant %struct.positions, align 4
@.str = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader84:
  %0 = alloca [5 x [7 x i8]], align 16
  %1 = alloca [5 x [7 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 35, ptr nonnull %0) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(35) %0, ptr noundef nonnull align 16 dereferenceable(35) @__const.main.mat, i64 35, i1 false)
  %.sroa.052.0.copyload = load i32, ptr @__const.main.ani_pos, align 4
  %.sroa.6.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.ani_pos, i64 4), align 4
  call void @llvm.lifetime.start.p0(i64 140, ptr nonnull %1) #4
  %.sroa.6.0.insert.ext = zext i32 %.sroa.6.0.copyload to i64
  %.sroa.6.0.insert.shift = shl nuw i64 %.sroa.6.0.insert.ext, 32
  %.sroa.052.0.insert.ext = zext i32 %.sroa.052.0.copyload to i64
  %.sroa.052.0.insert.insert = or disjoint i64 %.sroa.6.0.insert.shift, %.sroa.052.0.insert.ext
  call void @visitedFill(ptr noundef nonnull %1)
  %2 = load i64, ptr @__const.main.gate_pos, align 16
  %3 = call i32 @find_path_ani(ptr noundef nonnull %0, i64 %.sroa.052.0.insert.insert, i64 %2, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  call void @visitedFill(ptr noundef nonnull %1)
  %4 = load i64, ptr getelementptr inbounds (i8, ptr @__const.main.gate_pos, i64 8), align 8
  %5 = call i32 @find_path_ani(ptr noundef nonnull %0, i64 %.sroa.052.0.insert.insert, i64 %4, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  call void @visitedFill(ptr noundef nonnull %1)
  %6 = load i64, ptr getelementptr inbounds (i8, ptr @__const.main.gate_pos, i64 16), align 16
  %7 = call i32 @find_path_ani(ptr noundef nonnull %0, i64 %.sroa.052.0.insert.insert, i64 %6, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  %8 = lshr i64 %2, 32
  %9 = lshr i64 %4, 32
  %10 = lshr i64 %6, 32
  %11 = and i64 %2, 4294967295
  %12 = and i64 %4, 4294967295
  %13 = and i64 %6, 4294967295
  br label %.preheader

.preheader:                                       ; preds = %.preheader84, %51
  %indvars.iv103 = phi i64 [ 1, %.preheader84 ], [ %indvars.iv.next104, %51 ]
  %.096 = phi i32 [ 0, %.preheader84 ], [ %.3, %51 ]
  %.06794 = phi i32 [ 0, %.preheader84 ], [ %.269, %51 ]
  %14 = icmp eq i64 %indvars.iv103, %11
  %15 = icmp eq i64 %indvars.iv103, %12
  %16 = icmp eq i64 %indvars.iv103, %13
  %17 = icmp eq i64 %indvars.iv103, %.sroa.052.0.insert.ext
  br label %18

18:                                               ; preds = %.preheader, %50
  %indvars.iv = phi i64 [ 1, %.preheader ], [ %indvars.iv.next, %50 ]
  %.192 = phi i32 [ %.096, %.preheader ], [ %.3, %50 ]
  %.16890 = phi i32 [ %.06794, %.preheader ], [ %.269, %50 ]
  %19 = icmp eq i64 %indvars.iv, %8
  %or.cond = and i1 %14, %19
  %20 = icmp eq i64 %indvars.iv, %9
  %or.cond78 = and i1 %15, %20
  %or.cond97 = select i1 %or.cond, i1 true, i1 %or.cond78
  %21 = icmp eq i64 %indvars.iv, %10
  %or.cond80 = and i1 %16, %21
  %or.cond98 = select i1 %or.cond97, i1 true, i1 %or.cond80
  br i1 %or.cond98, label %22, label %25

22:                                               ; preds = %18
  %23 = add nsw i32 %.192, 1
  %24 = add nsw i32 %.16890, 1
  br label %50

25:                                               ; preds = %18
  %26 = icmp eq i64 %indvars.iv, %.sroa.6.0.insert.ext
  %or.cond81 = select i1 %17, i1 %26, i1 false
  br i1 %or.cond81, label %27, label %29

27:                                               ; preds = %25
  %28 = add nsw i32 %.16890, 1
  br label %50

29:                                               ; preds = %25
  %30 = getelementptr inbounds [5 x [7 x i8]], ptr %0, i64 0, i64 %indvars.iv103, i64 %indvars.iv
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %32 = icmp eq i8 %31, 71
  br i1 %32, label %33, label %50

33:                                               ; preds = %29
  %34 = add nsw i32 %.16890, 1
  %.sroa.5.0.insert.shift = shl nuw nsw i64 %indvars.iv, 32
  %.sroa.0.0.insert.insert = or disjoint i64 %.sroa.5.0.insert.shift, %indvars.iv103
  call void @visitedFill(ptr noundef nonnull %1)
  %35 = call i32 @find_path_grass(ptr noundef nonnull %0, i64 %.sroa.0.0.insert.insert, i64 %2, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  %36 = icmp slt i32 %35, %3
  br i1 %36, label %.thread, label %37

37:                                               ; preds = %33
  call void @visitedFill(ptr noundef nonnull %1)
  %38 = call i32 @find_path_grass(ptr noundef nonnull %0, i64 %.sroa.0.0.insert.insert, i64 %4, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  %39 = icmp slt i32 %38, %5
  br i1 %39, label %.thread, label %40

40:                                               ; preds = %37
  call void @visitedFill(ptr noundef nonnull %1)
  %41 = call i32 @find_path_grass(ptr noundef nonnull %0, i64 %.sroa.0.0.insert.insert, i64 %6, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  %42 = icmp slt i32 %41, %7
  br i1 %42, label %.thread, label %43

43:                                               ; preds = %40
  %44 = icmp eq i32 %41, 2147483647
  br i1 %44, label %46, label %50

.thread:                                          ; preds = %40, %37, %33
  %45 = add nsw i32 %.192, 1
  br label %50

46:                                               ; preds = %43
  call void @visitedFill(ptr noundef nonnull %1)
  %47 = call i32 @find_path_ani(ptr noundef nonnull %0, i64 %.sroa.052.0.insert.insert, i64 %.sroa.0.0.insert.insert, ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0)
  %48 = icmp eq i32 %47, 2147483647
  %49 = zext i1 %48 to i32
  %spec.select = add nsw i32 %.192, %49
  br label %50

50:                                               ; preds = %.thread, %46, %29, %43, %27, %22
  %.269 = phi i32 [ %24, %22 ], [ %28, %27 ], [ %34, %43 ], [ %.16890, %29 ], [ %34, %46 ], [ %34, %.thread ]
  %.3 = phi i32 [ %23, %22 ], [ %.192, %27 ], [ %.192, %43 ], [ %.192, %29 ], [ %spec.select, %46 ], [ %45, %.thread ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 7
  br i1 %exitcond.not, label %51, label %18, !llvm.loop !8

51:                                               ; preds = %50
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next104, 5
  br i1 %exitcond106.not, label %52, label %.preheader, !llvm.loop !10

52:                                               ; preds = %51
  %53 = sitofp i32 %.3 to double
  %54 = fmul double %53, 1.000000e+02
  %55 = sitofp i32 %.269 to double
  %56 = fdiv double %54, %55
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.3, i32 noundef %.269, double noundef %56)
  call void @llvm.lifetime.end.p0(i64 140, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 35, ptr nonnull %0) #4
  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: mustprogress 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) #2

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

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

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

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

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass