; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x22-深度优先搜索/166. 数独 (main)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@row = external dso_local global [9 x i32], align 16
@col = external dso_local global [9 x i32], align 16
@cell = external dso_local global [9 x i32], align 16
@h = external dso_local global [512 x i32], align 16
@cnt = external dso_local global [512 x i32], align 16
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z4flipiii(i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %10

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

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

14:                                               ; preds = %10
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = shl i32 1, %16
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [512 x i32], ptr @h, i64 0, i64 %18
  store i32 %15, ptr %19, align 4, !tbaa !5
  br label %20

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

23:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %48, %23
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 512
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %51

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %29 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %29, ptr %5, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %40, %28
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %30
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [512 x i32], ptr @cnt, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %34
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = sub nsw i32 0, %42
  %44 = and i32 %41, %43
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sub nsw i32 %45, %44
  store i32 %46, ptr %5, align 4, !tbaa !5
  br label %30, !llvm.loop !11

47:                                               ; preds = %33
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !5
  br label %24, !llvm.loop !12

51:                                               ; preds = %27
  br label %52

52:                                               ; preds = %123, %51
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  %55 = getelementptr i8, ptr %54, i64 -24
  %56 = load i64, ptr %55, align 8
  %57 = getelementptr inbounds i8, ptr %53, i64 %56
  %58 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %57)
  br i1 %58, label %59, label %61

59:                                               ; preds = %52
  %60 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, ptr noundef @.str)
  br label %61

61:                                               ; preds = %59, %52
  %62 = phi i1 [ false, %52 ], [ %60, %59 ]
  br i1 %62, label %63, label %126

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %78, %63
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = icmp slt i32 %65, 9
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %81

68:                                               ; preds = %64
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [9 x i32], ptr @cell, i64 0, i64 %70
  store i32 511, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [9 x i32], ptr @col, i64 0, i64 %73
  store i32 511, ptr %74, align 4, !tbaa !5
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [9 x i32], ptr @row, i64 0, i64 %76
  store i32 511, ptr %77, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %68
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !5
  br label %64, !llvm.loop !15

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

82:                                               ; preds = %120, %81
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 9
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %123

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %116, %86
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = icmp slt i32 %88, 9
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %119

91:                                               ; preds = %87
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = mul nsw i32 %92, 9
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = add nsw i32 %93, %94
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %96)
  %98 = load i8, ptr %97, align 1, !tbaa !16
  %99 = sext i8 %98 to i32
  %100 = icmp eq i32 %99, 46
  br i1 %100, label %101, label %104

101:                                              ; preds = %91
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %6, align 4, !tbaa !5
  br label %116

104:                                              ; preds = %91
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = mul nsw i32 %107, 9
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = add nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %111)
  %113 = load i8, ptr %112, align 1, !tbaa !16
  %114 = sext i8 %113 to i32
  %115 = sub nsw i32 %114, 49
  call void @_Z4flipiii(i32 noundef %105, i32 noundef %106, i32 noundef %115)
  br label %116

116:                                              ; preds = %104, %101
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %9, align 4, !tbaa !5
  br label %87, !llvm.loop !17

119:                                              ; preds = %90
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %8, align 4, !tbaa !5
  br label %82, !llvm.loop !18

123:                                              ; preds = %85
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = call noundef zeroext i1 @_Z3dfsi(i32 noundef %124)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %52, !llvm.loop !19

126:                                              ; preds = %61
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { inlinehint mustprogress 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 #4 = { mustprogress norecurse 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@row = external dso_local local_unnamed_addr global [9 x i32], align 16
@col = external dso_local local_unnamed_addr global [9 x i32], align 16
@cell = external dso_local local_unnamed_addr global [9 x i32], align 16
@h = external dso_local local_unnamed_addr global [512 x i32], align 16
@cnt = external dso_local local_unnamed_addr global [512 x i32], align 16
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z4flipiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
.preheader39.preheader:
  store i32 0, ptr getelementptr inbounds (i8, ptr @h, i64 4), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @h, i64 8), align 8, !tbaa !5
  store i32 2, ptr getelementptr inbounds (i8, ptr @h, i64 16), align 16, !tbaa !5
  store i32 3, ptr getelementptr inbounds (i8, ptr @h, i64 32), align 16, !tbaa !5
  store i32 4, ptr getelementptr inbounds (i8, ptr @h, i64 64), align 16, !tbaa !5
  store i32 5, ptr getelementptr inbounds (i8, ptr @h, i64 128), align 16, !tbaa !5
  store i32 6, ptr getelementptr inbounds (i8, ptr @h, i64 256), align 16, !tbaa !5
  store i32 7, ptr getelementptr inbounds (i8, ptr @h, i64 512), align 16, !tbaa !5
  store i32 8, ptr getelementptr inbounds (i8, ptr @h, i64 1024), align 16, !tbaa !5
  br label %.preheader39

.preheader39:                                     ; preds = %._crit_edge.1, %.preheader39.preheader
  %indvars.iv = phi i64 [ 0, %.preheader39.preheader ], [ %indvars.iv.next.1, %._crit_edge.1 ]
  %.not42 = icmp eq i64 %indvars.iv, 0
  br i1 %.not42, label %.lr.ph.1, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader39
  %0 = getelementptr inbounds [512 x i32], ptr @cnt, i64 0, i64 %indvars.iv
  %.promoted = load i32, ptr %0, align 8, !tbaa !5
  %1 = trunc nuw nsw i64 %indvars.iv to i32
  br label %14

.preheader38:                                     ; preds = %._crit_edge.1
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %3 = load ptr, ptr %2, align 8, !tbaa !9
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr %2, i64 %5
  %7 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %6)
  br i1 %7, label %.lr.ph50, label %.critedge

._crit_edge:                                      ; preds = %14
  store i32 %16, ptr %0, align 8, !tbaa !5
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.preheader39, %._crit_edge
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %8 = getelementptr inbounds [512 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next
  %.promoted.1 = load i32, ptr %8, align 4, !tbaa !5
  %9 = trunc nuw nsw i64 %indvars.iv.next to i32
  br label %10

10:                                               ; preds = %10, %.lr.ph.1
  %11 = phi i32 [ %.promoted.1, %.lr.ph.1 ], [ %12, %10 ]
  %.03243.1 = phi i32 [ %9, %.lr.ph.1 ], [ %13, %10 ]
  %12 = add nsw i32 %11, 1
  %.not35.1 = add i32 %.03243.1, -1
  %13 = and i32 %.not35.1, %.03243.1
  %.not.1 = icmp eq i32 %13, 0
  br i1 %.not.1, label %._crit_edge.1, label %10, !llvm.loop !11

._crit_edge.1:                                    ; preds = %10
  store i32 %12, ptr %8, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 512
  br i1 %exitcond.not.1, label %.preheader38, label %.preheader39, !llvm.loop !13

14:                                               ; preds = %.lr.ph, %14
  %15 = phi i32 [ %.promoted, %.lr.ph ], [ %16, %14 ]
  %.03243 = phi i32 [ %1, %.lr.ph ], [ %17, %14 ]
  %16 = add nsw i32 %15, 1
  %.not35 = add i32 %.03243, -1
  %17 = and i32 %.not35, %.03243
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %._crit_edge, label %14, !llvm.loop !11

.lr.ph50:                                         ; preds = %.preheader38, %23
  %18 = tail call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, ptr noundef nonnull @.str)
  br i1 %18, label %.preheader37.preheader, label %.critedge

.preheader37.preheader:                           ; preds = %.lr.ph50
  store <4 x i32> <i32 511, i32 511, i32 511, i32 511>, ptr @cell, align 16, !tbaa !5
  store <4 x i32> <i32 511, i32 511, i32 511, i32 511>, ptr @col, align 16, !tbaa !5
  store <4 x i32> <i32 511, i32 511, i32 511, i32 511>, ptr @row, align 16, !tbaa !5
  store <4 x i32> <i32 511, i32 511, i32 511, i32 511>, ptr getelementptr inbounds (i8, ptr @cell, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 511, i32 511, i32 511, i32 511>, ptr getelementptr inbounds (i8, ptr @col, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 511, i32 511, i32 511, i32 511>, ptr getelementptr inbounds (i8, ptr @row, i64 16), align 16, !tbaa !5
  store i32 511, ptr getelementptr inbounds (i8, ptr @cell, i64 32), align 16, !tbaa !5
  store i32 511, ptr getelementptr inbounds (i8, ptr @col, i64 32), align 16, !tbaa !5
  store i32 511, ptr getelementptr inbounds (i8, ptr @row, i64 32), align 16, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader37.preheader, %143
  %indvars.iv61 = phi i64 [ 0, %.preheader37.preheader ], [ %indvars.iv.next62, %143 ]
  %.03148 = phi i32 [ 0, %.preheader37.preheader ], [ %.2.8, %143 ]
  %19 = mul nuw nsw i64 %indvars.iv61, 9
  %20 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %19)
  %21 = load i8, ptr %20, align 1, !tbaa !14
  %22 = icmp eq i8 %21, 46
  br i1 %22, label %31, label %33

23:                                               ; preds = %143
  %24 = tail call noundef zeroext i1 @_Z3dfsi(i32 noundef %.2.8)
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr %25, i64 %28
  %30 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %29)
  br i1 %30, label %.lr.ph50, label %.critedge, !llvm.loop !15

31:                                               ; preds = %.preheader
  %32 = add nsw i32 %.03148, 1
  br label %39

33:                                               ; preds = %.preheader
  %34 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %19)
  %35 = load i8, ptr %34, align 1, !tbaa !14
  %36 = sext i8 %35 to i32
  %37 = add nsw i32 %36, -49
  %38 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %38, i32 noundef 0, i32 noundef %37)
  br label %39

39:                                               ; preds = %33, %31
  %.2 = phi i32 [ %32, %31 ], [ %.03148, %33 ]
  %40 = add nuw nsw i64 %19, 1
  %41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %40)
  %42 = load i8, ptr %41, align 1, !tbaa !14
  %43 = icmp eq i8 %42, 46
  br i1 %43, label %50, label %44

44:                                               ; preds = %39
  %45 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %40)
  %46 = load i8, ptr %45, align 1, !tbaa !14
  %47 = sext i8 %46 to i32
  %48 = add nsw i32 %47, -49
  %49 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %49, i32 noundef 1, i32 noundef %48)
  br label %52

50:                                               ; preds = %39
  %51 = add nsw i32 %.2, 1
  br label %52

52:                                               ; preds = %50, %44
  %.2.1 = phi i32 [ %51, %50 ], [ %.2, %44 ]
  %53 = add nuw nsw i64 %19, 2
  %54 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %53)
  %55 = load i8, ptr %54, align 1, !tbaa !14
  %56 = icmp eq i8 %55, 46
  br i1 %56, label %63, label %57

57:                                               ; preds = %52
  %58 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %53)
  %59 = load i8, ptr %58, align 1, !tbaa !14
  %60 = sext i8 %59 to i32
  %61 = add nsw i32 %60, -49
  %62 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %62, i32 noundef 2, i32 noundef %61)
  br label %65

63:                                               ; preds = %52
  %64 = add nsw i32 %.2.1, 1
  br label %65

65:                                               ; preds = %63, %57
  %.2.2 = phi i32 [ %64, %63 ], [ %.2.1, %57 ]
  %66 = add nuw nsw i64 %19, 3
  %67 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %66)
  %68 = load i8, ptr %67, align 1, !tbaa !14
  %69 = icmp eq i8 %68, 46
  br i1 %69, label %76, label %70

70:                                               ; preds = %65
  %71 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %66)
  %72 = load i8, ptr %71, align 1, !tbaa !14
  %73 = sext i8 %72 to i32
  %74 = add nsw i32 %73, -49
  %75 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %75, i32 noundef 3, i32 noundef %74)
  br label %78

76:                                               ; preds = %65
  %77 = add nsw i32 %.2.2, 1
  br label %78

78:                                               ; preds = %76, %70
  %.2.3 = phi i32 [ %77, %76 ], [ %.2.2, %70 ]
  %79 = add nuw nsw i64 %19, 4
  %80 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %79)
  %81 = load i8, ptr %80, align 1, !tbaa !14
  %82 = icmp eq i8 %81, 46
  br i1 %82, label %89, label %83

83:                                               ; preds = %78
  %84 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %79)
  %85 = load i8, ptr %84, align 1, !tbaa !14
  %86 = sext i8 %85 to i32
  %87 = add nsw i32 %86, -49
  %88 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %88, i32 noundef 4, i32 noundef %87)
  br label %91

89:                                               ; preds = %78
  %90 = add nsw i32 %.2.3, 1
  br label %91

91:                                               ; preds = %89, %83
  %.2.4 = phi i32 [ %90, %89 ], [ %.2.3, %83 ]
  %92 = add nuw nsw i64 %19, 5
  %93 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %92)
  %94 = load i8, ptr %93, align 1, !tbaa !14
  %95 = icmp eq i8 %94, 46
  br i1 %95, label %102, label %96

96:                                               ; preds = %91
  %97 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %92)
  %98 = load i8, ptr %97, align 1, !tbaa !14
  %99 = sext i8 %98 to i32
  %100 = add nsw i32 %99, -49
  %101 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %101, i32 noundef 5, i32 noundef %100)
  br label %104

102:                                              ; preds = %91
  %103 = add nsw i32 %.2.4, 1
  br label %104

104:                                              ; preds = %102, %96
  %.2.5 = phi i32 [ %103, %102 ], [ %.2.4, %96 ]
  %105 = add nuw nsw i64 %19, 6
  %106 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %105)
  %107 = load i8, ptr %106, align 1, !tbaa !14
  %108 = icmp eq i8 %107, 46
  br i1 %108, label %115, label %109

109:                                              ; preds = %104
  %110 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %105)
  %111 = load i8, ptr %110, align 1, !tbaa !14
  %112 = sext i8 %111 to i32
  %113 = add nsw i32 %112, -49
  %114 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %114, i32 noundef 6, i32 noundef %113)
  br label %117

115:                                              ; preds = %104
  %116 = add nsw i32 %.2.5, 1
  br label %117

117:                                              ; preds = %115, %109
  %.2.6 = phi i32 [ %116, %115 ], [ %.2.5, %109 ]
  %118 = add nuw nsw i64 %19, 7
  %119 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %118)
  %120 = load i8, ptr %119, align 1, !tbaa !14
  %121 = icmp eq i8 %120, 46
  br i1 %121, label %128, label %122

122:                                              ; preds = %117
  %123 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %118)
  %124 = load i8, ptr %123, align 1, !tbaa !14
  %125 = sext i8 %124 to i32
  %126 = add nsw i32 %125, -49
  %127 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %127, i32 noundef 7, i32 noundef %126)
  br label %130

128:                                              ; preds = %117
  %129 = add nsw i32 %.2.6, 1
  br label %130

130:                                              ; preds = %128, %122
  %.2.7 = phi i32 [ %129, %128 ], [ %.2.6, %122 ]
  %131 = add nuw nsw i64 %19, 8
  %132 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %131)
  %133 = load i8, ptr %132, align 1, !tbaa !14
  %134 = icmp eq i8 %133, 46
  br i1 %134, label %141, label %135

135:                                              ; preds = %130
  %136 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %131)
  %137 = load i8, ptr %136, align 1, !tbaa !14
  %138 = sext i8 %137 to i32
  %139 = add nsw i32 %138, -49
  %140 = trunc nuw nsw i64 %indvars.iv61 to i32
  tail call void @_Z4flipiii(i32 noundef %140, i32 noundef 8, i32 noundef %139)
  br label %143

141:                                              ; preds = %130
  %142 = add nsw i32 %.2.7, 1
  br label %143

143:                                              ; preds = %141, %135
  %.2.8 = phi i32 [ %142, %141 ], [ %.2.7, %135 ]
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next62, 9
  br i1 %exitcond64.not, label %23, label %.preheader, !llvm.loop !16

.critedge:                                        ; preds = %.lr.ph50, %23, %.preheader38
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 #3 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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" }

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


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