; LLVM IR from bqi343/cp-notebook :: Contests/USACO Training/Ch 6/6.4 wissqu.ll (Z3dfsiiii)

; 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] }

@lef = external dso_local global [5 x i32], align 16
@cur = external dso_local global [4 x [4 x i32]], align 16
@tot = external dso_local global i32, align 4
@done = external dso_local global [4 x [4 x i8]], align 16
@fil = external dso_local global [16 x i8], align 16
@_Z3ansB5cxx11 = external dso_local global [16 x %"class.std::__cxx11::basic_string"], align 16
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4posiiii(i32 noundef, i32 noundef, 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z3dfsiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %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 i8, align 1
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  store i8 0, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [4 x [4 x i32]], ptr @cur, i64 0, i64 %17
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [4 x i32], ptr %18, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %22, ptr %10, align 4, !tbaa !5
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [4 x [4 x i32]], ptr @cur, i64 0, i64 %25
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [4 x i32], ptr %26, i64 0, i64 %28
  store i32 %23, ptr %29, align 4, !tbaa !5
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [4 x [4 x i8]], ptr @done, i64 0, i64 %31
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [4 x i8], ptr %32, i64 0, i64 %34
  store i8 1, ptr %35, align 1, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [5 x i32], ptr @lef, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %38, align 4, !tbaa !5
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = icmp eq i32 %41, 15
  br i1 %42, label %43, label %85

43:                                               ; preds = %4
  %44 = load i32, ptr @tot, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr @tot, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [16 x i8], ptr @fil, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !9, !range !11, !noundef !12
  %50 = trunc i8 %49 to i1
  br i1 %50, label %84, label %51

51:                                               ; preds = %43
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = add nsw i32 65, %52
  %54 = trunc i32 %53 to i8
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %56
  %58 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %57, i8 noundef signext %54)
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %60
  %62 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %61, ptr noundef @.str)
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = add nsw i32 49, %63
  %65 = trunc i32 %64 to i8
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %67
  %69 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %68, i8 noundef signext %65)
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %71
  %73 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef @.str)
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = add nsw i32 49, %74
  %76 = trunc i32 %75 to i8
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %78
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %79, i8 noundef signext %76)
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [16 x i8], ptr @fil, i64 0, i64 %82
  store i8 1, ptr %83, align 1, !tbaa !9
  br label %84

84:                                               ; preds = %51, %43
  store i8 1, ptr %9, align 1, !tbaa !9
  br label %85

85:                                               ; preds = %84, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %86

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

89:                                               ; preds = %86
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %174

90:                                               ; preds = %86
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [5 x i32], ptr @lef, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %170

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

97:                                               ; preds = %166, %96
  %98 = load i32, ptr %13, align 4, !tbaa !5
  %99 = icmp slt i32 %98, 4
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %169

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %162, %101
  %103 = load i32, ptr %14, align 4, !tbaa !5
  %104 = icmp slt i32 %103, 4
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %165

106:                                              ; preds = %102
  %107 = load i32, ptr %13, align 4, !tbaa !5
  %108 = load i32, ptr %14, align 4, !tbaa !5
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = call noundef zeroext i1 @_Z4posiiii(i32 noundef %107, i32 noundef %108, i32 noundef %109)
  br i1 %110, label %111, label %161

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = load i32, ptr %14, align 4, !tbaa !5
  %117 = call noundef zeroext i1 @_Z3dfsiiii(i32 noundef %113, i32 noundef %114, i32 noundef %115, i32 noundef %116)
  %118 = zext i1 %117 to i8
  store i8 %118, ptr %15, align 1, !tbaa !9
  %119 = load i8, ptr %15, align 1, !tbaa !9, !range !11, !noundef !12
  %120 = trunc i8 %119 to i1
  br i1 %120, label %121, label %160

121:                                              ; preds = %111
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [16 x i8], ptr @fil, i64 0, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !9, !range !11, !noundef !12
  %126 = trunc i8 %125 to i1
  br i1 %126, label %160, label %127

127:                                              ; preds = %121
  %128 = load i32, ptr %6, align 4, !tbaa !5
  %129 = add nsw i32 65, %128
  %130 = trunc i32 %129 to i8
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %132
  %134 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %133, i8 noundef signext %130)
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %136
  %138 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %137, ptr noundef @.str)
  %139 = load i32, ptr %7, align 4, !tbaa !5
  %140 = add nsw i32 49, %139
  %141 = trunc i32 %140 to i8
  %142 = load i32, ptr %5, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %143
  %145 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %144, i8 noundef signext %141)
  %146 = load i32, ptr %5, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %147
  %149 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %148, ptr noundef @.str)
  %150 = load i32, ptr %8, align 4, !tbaa !5
  %151 = add nsw i32 49, %150
  %152 = trunc i32 %151 to i8
  %153 = load i32, ptr %5, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %154
  %156 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %155, i8 noundef signext %152)
  %157 = load i32, ptr %5, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [16 x i8], ptr @fil, i64 0, i64 %158
  store i8 1, ptr %159, align 1, !tbaa !9
  store i8 1, ptr %9, align 1, !tbaa !9
  br label %160

160:                                              ; preds = %127, %121, %111
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  br label %161

161:                                              ; preds = %160, %106
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %14, align 4, !tbaa !5
  br label %102, !llvm.loop !13

165:                                              ; preds = %105
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %13, align 4, !tbaa !5
  br label %97, !llvm.loop !15

169:                                              ; preds = %100
  br label %170

170:                                              ; preds = %169, %90
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %11, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %11, align 4, !tbaa !5
  br label %86, !llvm.loop !16

174:                                              ; preds = %89
  %175 = load i32, ptr %10, align 4, !tbaa !5
  %176 = load i32, ptr %7, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [4 x [4 x i32]], ptr @cur, i64 0, i64 %177
  %179 = load i32, ptr %8, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [4 x i32], ptr %178, i64 0, i64 %180
  store i32 %175, ptr %181, align 4, !tbaa !5
  %182 = load i32, ptr %7, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [4 x [4 x i8]], ptr @done, i64 0, i64 %183
  %185 = load i32, ptr %8, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [4 x i8], ptr %184, i64 0, i64 %186
  store i8 0, ptr %187, align 1, !tbaa !9
  %188 = load i32, ptr %6, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [5 x i32], ptr @lef, i64 0, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %190, align 4, !tbaa !5
  %193 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %194 = trunc i8 %193 to i1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  ret i1 %194
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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] }

@lef = external dso_local local_unnamed_addr global [5 x i32], align 16
@cur = external dso_local local_unnamed_addr global [4 x [4 x i32]], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@done = external dso_local local_unnamed_addr global [4 x [4 x i8]], align 16
@fil = external dso_local local_unnamed_addr global [16 x i8], align 16
@_Z3ansB5cxx11 = external dso_local global [16 x %"class.std::__cxx11::basic_string"], align 16
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4posiiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z3dfsiiii(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = sext i32 %2 to i64
  %6 = sext i32 %3 to i64
  %7 = getelementptr inbounds [4 x [4 x i32]], ptr @cur, i64 0, i64 %5, i64 %6
  %8 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds [4 x [4 x i8]], ptr @done, i64 0, i64 %5, i64 %6
  store i8 1, ptr %9, align 1, !tbaa !9
  %10 = sext i32 %1 to i64
  %11 = getelementptr inbounds [5 x i32], ptr @lef, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr %11, align 4, !tbaa !5
  %14 = icmp eq i32 %0, 15
  br i1 %14, label %15, label %32

15:                                               ; preds = %4
  %16 = load i32, ptr @tot, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr @tot, align 4, !tbaa !5
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @fil, i64 15), align 1, !tbaa !9, !range !11, !noundef !12
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %32, label %20

20:                                               ; preds = %15
  %21 = trunc i32 %1 to i8
  %22 = add i8 %21, 65
  %23 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_Z3ansB5cxx11, i64 480), i8 noundef signext %22)
  %24 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_Z3ansB5cxx11, i64 480), ptr noundef nonnull @.str)
  %25 = trunc i32 %2 to i8
  %26 = add i8 %25, 49
  %27 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_Z3ansB5cxx11, i64 480), i8 noundef signext %26)
  %28 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_Z3ansB5cxx11, i64 480), ptr noundef nonnull @.str)
  %29 = trunc i32 %3 to i8
  %30 = add i8 %29, 49
  %31 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_Z3ansB5cxx11, i64 480), i8 noundef signext %30)
  store i8 1, ptr getelementptr inbounds (i8, ptr @fil, i64 15), align 1, !tbaa !9
  br label %32

32:                                               ; preds = %15, %20, %4
  %33 = add nsw i32 %0, 1
  %34 = sext i32 %0 to i64
  %35 = getelementptr inbounds [16 x i8], ptr @fil, i64 0, i64 %34
  %36 = trunc i32 %1 to i8
  %37 = add i8 %36, 65
  %38 = getelementptr inbounds [16 x %"class.std::__cxx11::basic_string"], ptr @_Z3ansB5cxx11, i64 0, i64 %34
  %39 = trunc i32 %2 to i8
  %40 = add i8 %39, 49
  %41 = trunc i32 %3 to i8
  %42 = add i8 %41, 49
  br label %46

43:                                               ; preds = %.loopexit
  store i32 %8, ptr %7, align 4, !tbaa !5
  store i8 0, ptr %9, align 1, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %11, align 4, !tbaa !5
  ret i1 %.6

46:                                               ; preds = %32, %.loopexit
  %indvars.iv = phi i64 [ 0, %32 ], [ %indvars.iv.next, %.loopexit ]
  %.161 = phi i1 [ %14, %32 ], [ %.6, %.loopexit ]
  %47 = getelementptr inbounds [5 x i32], ptr @lef, i64 0, i64 %indvars.iv
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not = icmp eq i32 %48, 0
  br i1 %.not, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %46
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %101
  %.259 = phi i1 [ %.5.3, %101 ], [ %.161, %.preheader.preheader ]
  %.05258 = phi i32 [ %102, %101 ], [ 0, %.preheader.preheader ]
  %50 = tail call noundef zeroext i1 @_Z4posiiii(i32 noundef %.05258, i32 noundef 0, i32 noundef %49)
  br i1 %50, label %51, label %62

51:                                               ; preds = %.preheader
  %52 = tail call noundef zeroext i1 @_Z3dfsiiii(i32 noundef %33, i32 noundef %49, i32 noundef %.05258, i32 noundef 0)
  br i1 %52, label %53, label %62

53:                                               ; preds = %51
  %54 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %62, label %56

56:                                               ; preds = %53
  %57 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %37)
  %58 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %59 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %40)
  %60 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %61 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %42)
  store i8 1, ptr %35, align 1, !tbaa !9
  br label %62

62:                                               ; preds = %51, %53, %56, %.preheader
  %.5 = phi i1 [ %.259, %.preheader ], [ %.259, %53 ], [ true, %56 ], [ %.259, %51 ]
  %63 = tail call noundef zeroext i1 @_Z4posiiii(i32 noundef %.05258, i32 noundef 1, i32 noundef %49)
  br i1 %63, label %64, label %75

64:                                               ; preds = %62
  %65 = tail call noundef zeroext i1 @_Z3dfsiiii(i32 noundef %33, i32 noundef %49, i32 noundef %.05258, i32 noundef 1)
  br i1 %65, label %66, label %75

66:                                               ; preds = %64
  %67 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %75, label %69

69:                                               ; preds = %66
  %70 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %37)
  %71 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %72 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %40)
  %73 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %74 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %42)
  store i8 1, ptr %35, align 1, !tbaa !9
  br label %75

75:                                               ; preds = %69, %66, %64, %62
  %.5.1 = phi i1 [ %.5, %62 ], [ %.5, %66 ], [ true, %69 ], [ %.5, %64 ]
  %76 = tail call noundef zeroext i1 @_Z4posiiii(i32 noundef %.05258, i32 noundef 2, i32 noundef %49)
  br i1 %76, label %77, label %88

77:                                               ; preds = %75
  %78 = tail call noundef zeroext i1 @_Z3dfsiiii(i32 noundef %33, i32 noundef %49, i32 noundef %.05258, i32 noundef 2)
  br i1 %78, label %79, label %88

79:                                               ; preds = %77
  %80 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %81 = trunc nuw i8 %80 to i1
  br i1 %81, label %88, label %82

82:                                               ; preds = %79
  %83 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %37)
  %84 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %85 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %40)
  %86 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %87 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %42)
  store i8 1, ptr %35, align 1, !tbaa !9
  br label %88

88:                                               ; preds = %82, %79, %77, %75
  %.5.2 = phi i1 [ %.5.1, %75 ], [ %.5.1, %79 ], [ true, %82 ], [ %.5.1, %77 ]
  %89 = tail call noundef zeroext i1 @_Z4posiiii(i32 noundef %.05258, i32 noundef 3, i32 noundef %49)
  br i1 %89, label %90, label %101

90:                                               ; preds = %88
  %91 = tail call noundef zeroext i1 @_Z3dfsiiii(i32 noundef %33, i32 noundef %49, i32 noundef %.05258, i32 noundef 3)
  br i1 %91, label %92, label %101

92:                                               ; preds = %90
  %93 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %94 = trunc nuw i8 %93 to i1
  br i1 %94, label %101, label %95

95:                                               ; preds = %92
  %96 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %37)
  %97 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %98 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %40)
  %99 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str)
  %100 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %38, i8 noundef signext %42)
  store i8 1, ptr %35, align 1, !tbaa !9
  br label %101

101:                                              ; preds = %95, %92, %90, %88
  %.5.3 = phi i1 [ %.5.2, %88 ], [ %.5.2, %92 ], [ true, %95 ], [ %.5.2, %90 ]
  %102 = add nuw nsw i32 %.05258, 1
  %exitcond.not = icmp eq i32 %102, 4
  br i1 %exitcond.not, label %.loopexit, label %.preheader, !llvm.loop !13

.loopexit:                                        ; preds = %101, %46
  %.6 = phi i1 [ %.161, %46 ], [ %.5.3, %101 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond62.not = icmp eq i64 %indvars.iv.next, 5
  br i1 %exitcond62.not, label %43, label %46, !llvm.loop !15
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #1 align 2

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

!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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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