; LLVM IR from bqi343/cp-notebook :: Contests/USACO Training/Ch 6/6.3 cryptcow.ll (Z6testokv)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@_Z1fB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1gB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@asc = external dso_local global [130 x i32], align 16

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z6testokv() #1 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  store ptr @_Z1fB5cxx11, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %12 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1fB5cxx11) #3
  %13 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  store ptr %12, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %14 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1fB5cxx11) #3
  %15 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %14, ptr %15, align 8
  br label %16

16:                                               ; preds = %29, %0
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  br i1 %17, label %19, label %18

18:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  br label %31

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %21 = load i8, ptr %20, align 1, !tbaa !9
  store i8 %21, ptr %5, align 1, !tbaa !9
  %22 = load i8, ptr %5, align 1, !tbaa !9
  %23 = sext i8 %22 to i32
  %24 = sub nsw i32 %23, 32
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !10
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %26, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  br label %29

29:                                               ; preds = %19
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  br label %16

31:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store ptr @_Z1gB5cxx11, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %32 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1gB5cxx11) #3
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %34 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1gB5cxx11) #3
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  br label %36

36:                                               ; preds = %49, %31
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %51

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %41 = load i8, ptr %40, align 1, !tbaa !9
  store i8 %41, ptr %9, align 1, !tbaa !9
  %42 = load i8, ptr %9, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = sub nsw i32 %43, 32
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !10
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr %46, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  br label %49

49:                                               ; preds = %39
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  br label %36

51:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !10
  br label %52

52:                                               ; preds = %73, %51
  %53 = load i32, ptr %10, align 4, !tbaa !10
  %54 = icmp slt i32 %53, 130
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  store i32 6, ptr %11, align 4
  br label %76

56:                                               ; preds = %52
  %57 = load i32, ptr %10, align 4, !tbaa !10
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !10
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %72

62:                                               ; preds = %56
  %63 = load i32, ptr %10, align 4, !tbaa !10
  %64 = icmp ne i32 %63, 35
  br i1 %64, label %65, label %72

65:                                               ; preds = %62
  %66 = load i32, ptr %10, align 4, !tbaa !10
  %67 = icmp ne i32 %66, 55
  br i1 %67, label %68, label %72

68:                                               ; preds = %65
  %69 = load i32, ptr %10, align 4, !tbaa !10
  %70 = icmp ne i32 %69, 47
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %11, align 4
  br label %76

72:                                               ; preds = %68, %65, %62, %56
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %10, align 4, !tbaa !10
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %10, align 4, !tbaa !10
  br label %52, !llvm.loop !12

76:                                               ; preds = %71, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %77 = load i32, ptr %11, align 4
  switch i32 %77, label %92 [
    i32 6, label %78
    i32 1, label %90
  ]

78:                                               ; preds = %76
  %79 = load i32, ptr getelementptr inbounds ([130 x i32], ptr @asc, i64 0, i64 35), align 4, !tbaa !10
  %80 = load i32, ptr getelementptr inbounds ([130 x i32], ptr @asc, i64 0, i64 47), align 4, !tbaa !10
  %81 = icmp ne i32 %79, %80
  br i1 %81, label %86, label %82

82:                                               ; preds = %78
  %83 = load i32, ptr getelementptr inbounds ([130 x i32], ptr @asc, i64 0, i64 47), align 4, !tbaa !10
  %84 = load i32, ptr getelementptr inbounds ([130 x i32], ptr @asc, i64 0, i64 55), align 4, !tbaa !10
  %85 = icmp ne i32 %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %82, %78
  store i32 -1, ptr %1, align 4
  br label %90

87:                                               ; preds = %82
  %88 = load i32, ptr getelementptr inbounds ([130 x i32], ptr @asc, i64 0, i64 47), align 4, !tbaa !10
  %89 = sub nsw i32 0, %88
  store i32 %89, ptr %1, align 4
  br label %90

90:                                               ; preds = %87, %86, %76
  %91 = load i32, ptr %1, align 4
  ret i32 %91

92:                                               ; preds = %76
  unreachable
}

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 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@_Z1fB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1gB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@asc = external dso_local local_unnamed_addr global [130 x i32], align 16

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef range(i32 -2147483647, -2147483648) i32 @_Z6testokv() local_unnamed_addr #1 {
  %1 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #3
  %5 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1fB5cxx11) #3
  store ptr %5, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  %6 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1fB5cxx11) #3
  store ptr %6, ptr %2, align 8
  %7 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #3
  br i1 %7, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %8 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1gB5cxx11) #3
  store ptr %8, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %9 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1gB5cxx11) #3
  store ptr %9, ptr %4, align 8
  %10 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  br i1 %10, label %.lr.ph24, label %._crit_edge25

.lr.ph:                                           ; preds = %0, %.lr.ph
  %11 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #3
  %12 = load i8, ptr %11, align 1, !tbaa !5
  %13 = sext i8 %12 to i64
  %14 = add nsw i64 %13, -32
  %15 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !8
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr %15, align 4, !tbaa !8
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #3
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #3
  br i1 %19, label %.lr.ph, label %._crit_edge

._crit_edge25:                                    ; preds = %.lr.ph24, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %42

.lr.ph24:                                         ; preds = %._crit_edge, %.lr.ph24
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %21 = load i8, ptr %20, align 1, !tbaa !5
  %22 = sext i8 %21 to i64
  %23 = add nsw i64 %22, -32
  %24 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !8
  %26 = add nsw i32 %25, -1
  store i32 %26, ptr %24, align 4, !tbaa !8
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  br i1 %28, label %.lr.ph24, label %._crit_edge25

29:                                               ; preds = %switch.early.test, %switch.early.test, %switch.early.test, %42
  %30 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %indvars.iv.next
  %31 = load i32, ptr %30, align 4, !tbaa !8
  %.fr.1 = freeze i32 %31
  %.not27.1 = icmp eq i32 %.fr.1, 0
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  br i1 %.not27.1, label %32, label %switch.early.test.1

switch.early.test.1:                              ; preds = %29
  %trunc.1 = trunc i64 %indvars.iv.next to i8
  switch i8 %trunc.1, label %.loopexit [
    i8 55, label %32
    i8 47, label %32
    i8 35, label %32
  ]

32:                                               ; preds = %switch.early.test.1, %switch.early.test.1, %switch.early.test.1, %29
  %33 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %indvars.iv.next.1
  %34 = load i32, ptr %33, align 4, !tbaa !8
  %.fr.2 = freeze i32 %34
  %.not27.2 = icmp eq i32 %.fr.2, 0
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  br i1 %.not27.2, label %35, label %switch.early.test.2

switch.early.test.2:                              ; preds = %32
  %trunc.2 = trunc i64 %indvars.iv.next.1 to i8
  switch i8 %trunc.2, label %.loopexit [
    i8 55, label %35
    i8 47, label %35
    i8 35, label %35
  ]

35:                                               ; preds = %switch.early.test.2, %switch.early.test.2, %switch.early.test.2, %32
  %36 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %indvars.iv.next.2
  %37 = load i32, ptr %36, align 4, !tbaa !8
  %.fr.3 = freeze i32 %37
  %.not27.3 = icmp eq i32 %.fr.3, 0
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  br i1 %.not27.3, label %38, label %switch.early.test.3

switch.early.test.3:                              ; preds = %35
  %trunc.3 = trunc i64 %indvars.iv.next.2 to i8
  switch i8 %trunc.3, label %.loopexit [
    i8 55, label %38
    i8 47, label %38
    i8 35, label %38
  ]

38:                                               ; preds = %switch.early.test.3, %switch.early.test.3, %switch.early.test.3, %35
  %39 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %indvars.iv.next.3
  %40 = load i32, ptr %39, align 4, !tbaa !8
  %.fr.4 = freeze i32 %40
  %.not27.4 = icmp eq i32 %.fr.4, 0
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
  br i1 %.not27.4, label %41, label %switch.early.test.4

switch.early.test.4:                              ; preds = %38
  %trunc.4 = trunc i64 %indvars.iv.next.3 to i8
  switch i8 %trunc.4, label %.loopexit [
    i8 55, label %41
    i8 47, label %41
    i8 35, label %41
  ]

41:                                               ; preds = %switch.early.test.4, %switch.early.test.4, %switch.early.test.4, %38
  %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 130
  br i1 %exitcond.not.4, label %45, label %42, !llvm.loop !10

42:                                               ; preds = %41, %._crit_edge25
  %indvars.iv = phi i64 [ 0, %._crit_edge25 ], [ %indvars.iv.next.4, %41 ]
  %43 = getelementptr inbounds [130 x i32], ptr @asc, i64 0, i64 %indvars.iv
  %44 = load i32, ptr %43, align 4, !tbaa !8
  %.fr = freeze i32 %44
  %.not27 = icmp eq i32 %.fr, 0
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %.not27, label %29, label %switch.early.test

switch.early.test:                                ; preds = %42
  %trunc = trunc i64 %indvars.iv to i8
  switch i8 %trunc, label %.loopexit [
    i8 55, label %29
    i8 47, label %29
    i8 35, label %29
  ]

45:                                               ; preds = %41
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @asc, i64 140), align 4, !tbaa !8
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @asc, i64 188), align 4, !tbaa !8
  %.not = icmp eq i32 %46, %47
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @asc, i64 220), align 4
  %.not18 = icmp eq i32 %47, %48
  %or.cond19 = select i1 %.not, i1 %.not18, i1 false
  %49 = sub nsw i32 0, %47
  %spec.select = select i1 %or.cond19, i32 %49, i32 -1
  br label %.loopexit

.loopexit:                                        ; preds = %switch.early.test, %switch.early.test.1, %switch.early.test.2, %switch.early.test.3, %switch.early.test.4, %45
  %.1 = phi i32 [ %spec.select, %45 ], [ -1, %switch.early.test.4 ], [ -1, %switch.early.test.3 ], [ -1, %switch.early.test.2 ], [ -1, %switch.early.test.1 ], [ -1, %switch.early.test ]
  ret i32 %.1
}

attributes #0 = { mustprogress 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 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass