; LLVM IR from tangjz/acm-icpc :: lydsy/2910.ll (Z5checkv)

; 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"

@s = external dso_local global [9 x [9 x i32]], align 16
@perm = external dso_local global [11 x [9 x i32]], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef) #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checkv() #0 {
  %1 = alloca i1, align 1
  %2 = alloca [9 x [9 x i32]], align 16
  %3 = alloca [3 x i32], align 4
  %4 = alloca [3 x i32], align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 324, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %4) #5
  %9 = getelementptr inbounds [9 x [9 x i32]], ptr %2, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @s, i64 324, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %22, %0
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 3
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %25

14:                                               ; preds = %10
  %15 = load i32, ptr %5, align 4, !tbaa !5
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [3 x i32], ptr %4, i64 0, i64 %17
  store i32 %15, ptr %18, align 4, !tbaa !5
  %19 = load i32, ptr %5, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [3 x i32], ptr %3, i64 0, i64 %20
  store i32 %15, ptr %21, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %14
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %5, align 4, !tbaa !5
  br label %10, !llvm.loop !9

25:                                               ; preds = %13
  call void @llvm.memset.p0.i64(ptr align 16 @perm, i8 -1, i64 36, i1 false)
  br label %26

26:                                               ; preds = %84, %25
  br label %27

27:                                               ; preds = %78, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %71, %27
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 9
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  store i32 9, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %74

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %67, %32
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = icmp slt i32 %34, 9
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 12, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %70

37:                                               ; preds = %33
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = sdiv i32 %38, 3
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [3 x i32], ptr %3, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = mul nsw i32 3, %42
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = srem i32 %44, 3
  %46 = add nsw i32 %43, %45
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [9 x [9 x i32]], ptr %2, i64 0, i64 %47
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = sdiv i32 %49, 3
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [3 x i32], ptr %4, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = mul nsw i32 3, %53
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = srem i32 %55, 3
  %57 = add nsw i32 %54, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [9 x i32], ptr %48, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [9 x [9 x i32]], ptr @s, i64 0, i64 %62
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [9 x i32], ptr %63, i64 0, i64 %65
  store i32 %60, ptr %66, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %37
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %8, align 4, !tbaa !5
  br label %33, !llvm.loop !11

70:                                               ; preds = %36
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %6, align 4, !tbaa !5
  br label %28, !llvm.loop !12

74:                                               ; preds = %31
  %75 = call noundef zeroext i1 @_Z3dfsi(i32 noundef 0)
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  store i1 true, ptr %1, align 1
  store i32 1, ptr %7, align 4
  br label %90

77:                                               ; preds = %74
  br label %78

78:                                               ; preds = %77
  %79 = getelementptr inbounds [3 x i32], ptr %4, i64 0, i64 0
  %80 = getelementptr inbounds [3 x i32], ptr %4, i64 0, i64 0
  %81 = getelementptr inbounds i32, ptr %80, i64 3
  %82 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef %79, ptr noundef %81)
  br i1 %82, label %27, label %83, !llvm.loop !13

83:                                               ; preds = %78
  br label %84

84:                                               ; preds = %83
  %85 = getelementptr inbounds [3 x i32], ptr %3, i64 0, i64 0
  %86 = getelementptr inbounds [3 x i32], ptr %3, i64 0, i64 0
  %87 = getelementptr inbounds i32, ptr %86, i64 3
  %88 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef %85, ptr noundef %87)
  br i1 %88, label %26, label %89, !llvm.loop !14

89:                                               ; preds = %84
  store i1 false, ptr %1, align 1
  store i32 1, ptr %7, align 4
  br label %90

90:                                               ; preds = %89, %76
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 324, ptr %2) #5
  %91 = load i1, ptr %1, align 1
  ret i1 %91
}

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

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

@s = external dso_local local_unnamed_addr global [9 x [9 x i32]], align 16
@perm = external dso_local local_unnamed_addr global [11 x [9 x i32]], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef) local_unnamed_addr #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checkv() local_unnamed_addr #0 {
  %1 = alloca [9 x [9 x i32]], align 16
  %2 = alloca [3 x i32], align 4
  %3 = alloca [3 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 324, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(324) %1, ptr noundef nonnull align 16 dereferenceable(324) @s, i64 324, i1 false)
  store i32 0, ptr %3, align 4, !tbaa !5
  store i32 0, ptr %2, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 1, ptr %4, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 1, ptr %5, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 2, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 2, ptr %7, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) @perm, i8 -1, i64 36, i1 false)
  %8 = getelementptr inbounds i8, ptr %3, i64 12
  %9 = getelementptr inbounds i8, ptr %2, i64 12
  %10 = getelementptr inbounds i8, ptr %2, i64 4
  %11 = getelementptr inbounds i8, ptr %2, i64 4
  %12 = getelementptr inbounds i8, ptr %2, i64 4
  %13 = getelementptr inbounds i8, ptr %2, i64 8
  %14 = getelementptr inbounds i8, ptr %2, i64 8
  %15 = getelementptr inbounds i8, ptr %2, i64 8
  br label %.preheader

.preheader:                                       ; preds = %.backedge, %0
  %.pre31 = load i32, ptr %6, align 4, !tbaa !5
  %16 = mul nsw i32 %.pre31, 3
  %17 = add nsw i32 %16, 2
  %18 = sext i32 %17 to i64
  %19 = add nsw i32 %16, 1
  %20 = sext i32 %19 to i64
  %21 = sext i32 %16 to i64
  %.pre30 = load i32, ptr %4, align 4, !tbaa !5
  %22 = mul nsw i32 %.pre30, 3
  %23 = add nsw i32 %22, 2
  %24 = sext i32 %23 to i64
  %25 = add nsw i32 %22, 1
  %26 = sext i32 %25 to i64
  %27 = sext i32 %22 to i64
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  %28 = mul nsw i32 %.pre, 3
  %29 = add nsw i32 %28, 2
  %30 = sext i32 %29 to i64
  %31 = sext i32 %28 to i64
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = mul nsw i32 %32, 3
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %31
  %36 = load <2 x i32>, ptr %35, align 4, !tbaa !5
  store <2 x i32> %36, ptr @s, align 16, !tbaa !5
  %37 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %30
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr getelementptr inbounds (i8, ptr @s, i64 8), align 8, !tbaa !5
  %39 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %27
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr getelementptr inbounds (i8, ptr @s, i64 12), align 4, !tbaa !5
  %41 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %26
  %42 = load i32, ptr %41, align 4, !tbaa !5
  store i32 %42, ptr getelementptr inbounds (i8, ptr @s, i64 16), align 16, !tbaa !5
  %43 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %24
  %44 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %44, ptr getelementptr inbounds (i8, ptr @s, i64 20), align 4, !tbaa !5
  %45 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %21
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr getelementptr inbounds (i8, ptr @s, i64 24), align 8, !tbaa !5
  %47 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %20
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr getelementptr inbounds (i8, ptr @s, i64 28), align 4, !tbaa !5
  %49 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %34, i64 %18
  %50 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %50, ptr getelementptr inbounds (i8, ptr @s, i64 32), align 16, !tbaa !5
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = mul nsw i32 %51, 3
  %53 = add nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %31
  %56 = load <2 x i32>, ptr %55, align 4, !tbaa !5
  store <2 x i32> %56, ptr getelementptr inbounds (i8, ptr @s, i64 36), align 4, !tbaa !5
  %57 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %30
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr getelementptr inbounds (i8, ptr @s, i64 44), align 4, !tbaa !5
  %59 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %27
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr getelementptr inbounds (i8, ptr @s, i64 48), align 16, !tbaa !5
  %61 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %26
  %62 = load i32, ptr %61, align 4, !tbaa !5
  store i32 %62, ptr getelementptr inbounds (i8, ptr @s, i64 52), align 4, !tbaa !5
  %63 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %24
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr getelementptr inbounds (i8, ptr @s, i64 56), align 8, !tbaa !5
  %65 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %21
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr getelementptr inbounds (i8, ptr @s, i64 60), align 4, !tbaa !5
  %67 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %20
  %68 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %68, ptr getelementptr inbounds (i8, ptr @s, i64 64), align 16, !tbaa !5
  %69 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %54, i64 %18
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr getelementptr inbounds (i8, ptr @s, i64 68), align 4, !tbaa !5
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = mul nsw i32 %71, 3
  %73 = add nsw i32 %72, 2
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %31
  %76 = load <2 x i32>, ptr %75, align 4, !tbaa !5
  store <2 x i32> %76, ptr getelementptr inbounds (i8, ptr @s, i64 72), align 8, !tbaa !5
  %77 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %30
  %78 = load i32, ptr %77, align 4, !tbaa !5
  store i32 %78, ptr getelementptr inbounds (i8, ptr @s, i64 80), align 16, !tbaa !5
  %79 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %27
  %80 = load i32, ptr %79, align 4, !tbaa !5
  store i32 %80, ptr getelementptr inbounds (i8, ptr @s, i64 84), align 4, !tbaa !5
  %81 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %26
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr getelementptr inbounds (i8, ptr @s, i64 88), align 8, !tbaa !5
  %83 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %24
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr getelementptr inbounds (i8, ptr @s, i64 92), align 4, !tbaa !5
  %85 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %21
  %86 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %86, ptr getelementptr inbounds (i8, ptr @s, i64 96), align 16, !tbaa !5
  %87 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %20
  %88 = load i32, ptr %87, align 4, !tbaa !5
  store i32 %88, ptr getelementptr inbounds (i8, ptr @s, i64 100), align 4, !tbaa !5
  %89 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %74, i64 %18
  %90 = load i32, ptr %89, align 4, !tbaa !5
  store i32 %90, ptr getelementptr inbounds (i8, ptr @s, i64 104), align 8, !tbaa !5
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = mul nsw i32 %91, 3
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %31
  %95 = load <2 x i32>, ptr %94, align 4, !tbaa !5
  store <2 x i32> %95, ptr getelementptr inbounds (i8, ptr @s, i64 108), align 4, !tbaa !5
  %96 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %30
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr getelementptr inbounds (i8, ptr @s, i64 116), align 4, !tbaa !5
  %98 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %27
  %99 = load i32, ptr %98, align 4, !tbaa !5
  store i32 %99, ptr getelementptr inbounds (i8, ptr @s, i64 120), align 8, !tbaa !5
  %100 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %26
  %101 = load i32, ptr %100, align 4, !tbaa !5
  store i32 %101, ptr getelementptr inbounds (i8, ptr @s, i64 124), align 4, !tbaa !5
  %102 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %24
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr getelementptr inbounds (i8, ptr @s, i64 128), align 16, !tbaa !5
  %104 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %21
  %105 = load i32, ptr %104, align 4, !tbaa !5
  store i32 %105, ptr getelementptr inbounds (i8, ptr @s, i64 132), align 4, !tbaa !5
  %106 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %20
  %107 = load i32, ptr %106, align 4, !tbaa !5
  store i32 %107, ptr getelementptr inbounds (i8, ptr @s, i64 136), align 8, !tbaa !5
  %108 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %93, i64 %18
  %109 = load i32, ptr %108, align 4, !tbaa !5
  store i32 %109, ptr getelementptr inbounds (i8, ptr @s, i64 140), align 4, !tbaa !5
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = mul nsw i32 %110, 3
  %112 = add nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %31
  %115 = load <2 x i32>, ptr %114, align 4, !tbaa !5
  store <2 x i32> %115, ptr getelementptr inbounds (i8, ptr @s, i64 144), align 16, !tbaa !5
  %116 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %30
  %117 = load i32, ptr %116, align 4, !tbaa !5
  store i32 %117, ptr getelementptr inbounds (i8, ptr @s, i64 152), align 8, !tbaa !5
  %118 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %27
  %119 = load i32, ptr %118, align 4, !tbaa !5
  store i32 %119, ptr getelementptr inbounds (i8, ptr @s, i64 156), align 4, !tbaa !5
  %120 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %26
  %121 = load i32, ptr %120, align 4, !tbaa !5
  store i32 %121, ptr getelementptr inbounds (i8, ptr @s, i64 160), align 16, !tbaa !5
  %122 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %24
  %123 = load i32, ptr %122, align 4, !tbaa !5
  store i32 %123, ptr getelementptr inbounds (i8, ptr @s, i64 164), align 4, !tbaa !5
  %124 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %21
  %125 = load i32, ptr %124, align 4, !tbaa !5
  store i32 %125, ptr getelementptr inbounds (i8, ptr @s, i64 168), align 8, !tbaa !5
  %126 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %20
  %127 = load i32, ptr %126, align 4, !tbaa !5
  store i32 %127, ptr getelementptr inbounds (i8, ptr @s, i64 172), align 4, !tbaa !5
  %128 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %113, i64 %18
  %129 = load i32, ptr %128, align 4, !tbaa !5
  store i32 %129, ptr getelementptr inbounds (i8, ptr @s, i64 176), align 16, !tbaa !5
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = mul nsw i32 %130, 3
  %132 = add nsw i32 %131, 2
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %31
  %135 = load <2 x i32>, ptr %134, align 4, !tbaa !5
  store <2 x i32> %135, ptr getelementptr inbounds (i8, ptr @s, i64 180), align 4, !tbaa !5
  %136 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %30
  %137 = load i32, ptr %136, align 4, !tbaa !5
  store i32 %137, ptr getelementptr inbounds (i8, ptr @s, i64 188), align 4, !tbaa !5
  %138 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %27
  %139 = load i32, ptr %138, align 4, !tbaa !5
  store i32 %139, ptr getelementptr inbounds (i8, ptr @s, i64 192), align 16, !tbaa !5
  %140 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %26
  %141 = load i32, ptr %140, align 4, !tbaa !5
  store i32 %141, ptr getelementptr inbounds (i8, ptr @s, i64 196), align 4, !tbaa !5
  %142 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %24
  %143 = load i32, ptr %142, align 4, !tbaa !5
  store i32 %143, ptr getelementptr inbounds (i8, ptr @s, i64 200), align 8, !tbaa !5
  %144 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %21
  %145 = load i32, ptr %144, align 4, !tbaa !5
  store i32 %145, ptr getelementptr inbounds (i8, ptr @s, i64 204), align 4, !tbaa !5
  %146 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %20
  %147 = load i32, ptr %146, align 4, !tbaa !5
  store i32 %147, ptr getelementptr inbounds (i8, ptr @s, i64 208), align 16, !tbaa !5
  %148 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %133, i64 %18
  %149 = load i32, ptr %148, align 4, !tbaa !5
  store i32 %149, ptr getelementptr inbounds (i8, ptr @s, i64 212), align 4, !tbaa !5
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = mul nsw i32 %150, 3
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %31
  %154 = load <2 x i32>, ptr %153, align 4, !tbaa !5
  store <2 x i32> %154, ptr getelementptr inbounds (i8, ptr @s, i64 216), align 8, !tbaa !5
  %155 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %30
  %156 = load i32, ptr %155, align 4, !tbaa !5
  store i32 %156, ptr getelementptr inbounds (i8, ptr @s, i64 224), align 16, !tbaa !5
  %157 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %27
  %158 = load i32, ptr %157, align 4, !tbaa !5
  store i32 %158, ptr getelementptr inbounds (i8, ptr @s, i64 228), align 4, !tbaa !5
  %159 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %26
  %160 = load i32, ptr %159, align 4, !tbaa !5
  store i32 %160, ptr getelementptr inbounds (i8, ptr @s, i64 232), align 8, !tbaa !5
  %161 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %24
  %162 = load i32, ptr %161, align 4, !tbaa !5
  store i32 %162, ptr getelementptr inbounds (i8, ptr @s, i64 236), align 4, !tbaa !5
  %163 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %21
  %164 = load i32, ptr %163, align 4, !tbaa !5
  store i32 %164, ptr getelementptr inbounds (i8, ptr @s, i64 240), align 16, !tbaa !5
  %165 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %20
  %166 = load i32, ptr %165, align 4, !tbaa !5
  store i32 %166, ptr getelementptr inbounds (i8, ptr @s, i64 244), align 4, !tbaa !5
  %167 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %152, i64 %18
  %168 = load i32, ptr %167, align 4, !tbaa !5
  store i32 %168, ptr getelementptr inbounds (i8, ptr @s, i64 248), align 8, !tbaa !5
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = mul nsw i32 %169, 3
  %171 = add nsw i32 %170, 1
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %31
  %174 = load <2 x i32>, ptr %173, align 4, !tbaa !5
  store <2 x i32> %174, ptr getelementptr inbounds (i8, ptr @s, i64 252), align 4, !tbaa !5
  %175 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %30
  %176 = load i32, ptr %175, align 4, !tbaa !5
  store i32 %176, ptr getelementptr inbounds (i8, ptr @s, i64 260), align 4, !tbaa !5
  %177 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %27
  %178 = load i32, ptr %177, align 4, !tbaa !5
  store i32 %178, ptr getelementptr inbounds (i8, ptr @s, i64 264), align 8, !tbaa !5
  %179 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %26
  %180 = load i32, ptr %179, align 4, !tbaa !5
  store i32 %180, ptr getelementptr inbounds (i8, ptr @s, i64 268), align 4, !tbaa !5
  %181 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %24
  %182 = load i32, ptr %181, align 4, !tbaa !5
  store i32 %182, ptr getelementptr inbounds (i8, ptr @s, i64 272), align 16, !tbaa !5
  %183 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %21
  %184 = load i32, ptr %183, align 4, !tbaa !5
  store i32 %184, ptr getelementptr inbounds (i8, ptr @s, i64 276), align 4, !tbaa !5
  %185 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %20
  %186 = load i32, ptr %185, align 4, !tbaa !5
  store i32 %186, ptr getelementptr inbounds (i8, ptr @s, i64 280), align 8, !tbaa !5
  %187 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %172, i64 %18
  %188 = load i32, ptr %187, align 4, !tbaa !5
  store i32 %188, ptr getelementptr inbounds (i8, ptr @s, i64 284), align 4, !tbaa !5
  %189 = load i32, ptr %15, align 4, !tbaa !5
  %190 = mul nsw i32 %189, 3
  %191 = add nsw i32 %190, 2
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %31
  %194 = load <2 x i32>, ptr %193, align 4, !tbaa !5
  store <2 x i32> %194, ptr getelementptr inbounds (i8, ptr @s, i64 288), align 16, !tbaa !5
  %195 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %30
  %196 = load i32, ptr %195, align 4, !tbaa !5
  store i32 %196, ptr getelementptr inbounds (i8, ptr @s, i64 296), align 8, !tbaa !5
  %197 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %27
  %198 = load i32, ptr %197, align 4, !tbaa !5
  store i32 %198, ptr getelementptr inbounds (i8, ptr @s, i64 300), align 4, !tbaa !5
  %199 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %26
  %200 = load i32, ptr %199, align 4, !tbaa !5
  store i32 %200, ptr getelementptr inbounds (i8, ptr @s, i64 304), align 16, !tbaa !5
  %201 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %24
  %202 = load i32, ptr %201, align 4, !tbaa !5
  store i32 %202, ptr getelementptr inbounds (i8, ptr @s, i64 308), align 4, !tbaa !5
  %203 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %21
  %204 = load i32, ptr %203, align 4, !tbaa !5
  store i32 %204, ptr getelementptr inbounds (i8, ptr @s, i64 312), align 8, !tbaa !5
  %205 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %20
  %206 = load i32, ptr %205, align 4, !tbaa !5
  store i32 %206, ptr getelementptr inbounds (i8, ptr @s, i64 316), align 4, !tbaa !5
  %207 = getelementptr inbounds [9 x [9 x i32]], ptr %1, i64 0, i64 %192, i64 %18
  %208 = load i32, ptr %207, align 4, !tbaa !5
  store i32 %208, ptr getelementptr inbounds (i8, ptr @s, i64 320), align 16, !tbaa !5
  %209 = call noundef zeroext i1 @_Z3dfsi(i32 noundef 0)
  br i1 %209, label %.loopexit, label %210

210:                                              ; preds = %.preheader
  %211 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef nonnull %3, ptr noundef nonnull %8)
  br i1 %211, label %.backedge, label %212

.backedge:                                        ; preds = %210, %212
  br label %.preheader, !llvm.loop !9

212:                                              ; preds = %210
  %213 = call noundef zeroext i1 @_ZSt16next_permutationIPiEbT_S1_(ptr noundef nonnull %2, ptr noundef nonnull %9)
  br i1 %213, label %.backedge, label %.loopexit

.loopexit:                                        ; preds = %212, %.preheader
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 324, ptr nonnull %1) #5
  ret i1 %209
}

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

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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