; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2020-21/Dec/Gold (genomics)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::array" = type { [4 x %"struct.std::array.12"] }
%"struct.std::array.12" = type { [17 x %struct.mi] }
%struct.mi = type { i32 }
%"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::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@dp = external dso_local global %"struct.std::array", align 4
@.str.17 = external hidden unnamed_addr constant [1 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: 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2reINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(32)) #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2adc(i8 noundef signext) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.mi, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.mi, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %15 unwind label %22

15:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %16 unwind label %26

16:                                               ; preds = %15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  invoke void @_Z2reINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %17 unwind label %31

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

18:                                               ; preds = %41, %17
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 4
  br i1 %20, label %35, label %21

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %48

22:                                               ; preds = %0
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %4, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %5, align 4
  br label %30

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %4, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  br label %30

30:                                               ; preds = %26, %22
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  br label %98

31:                                               ; preds = %16
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %4, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %5, align 4
  br label %97

35:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  invoke void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %8, i64 noundef 1)
          to label %36 unwind label %44

36:                                               ; preds = %35
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef %38) #6
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %39, i64 noundef 16) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %41

41:                                               ; preds = %36
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %7, align 4, !tbaa !5
  br label %18, !llvm.loop !10

44:                                               ; preds = %35
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %4, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %97

48:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr %6, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %49 = load ptr, ptr %9, align 8, !tbaa !12
  %50 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %49) #6
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %52 = load ptr, ptr %9, align 8, !tbaa !12
  %53 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %52) #6
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  br label %55

55:                                               ; preds = %63, %48
  %56 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %56, label %58, label %57

57:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %69

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  store ptr %59, ptr %12, align 8, !tbaa !12
  %60 = load ptr, ptr %12, align 8, !tbaa !12
  %61 = load i8, ptr %60, align 1, !tbaa !14
  invoke void @_Z2adc(i8 noundef signext %61)
          to label %62 unwind label %65

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %63

63:                                               ; preds = %62
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %55

65:                                               ; preds = %58
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %4, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %97

69:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  invoke void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %13, i64 noundef 0)
          to label %70 unwind label %75

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %86, %70
  %72 = load i32, ptr %14, align 4, !tbaa !5
  %73 = icmp slt i32 %72, 4
  br i1 %73, label %79, label %74

74:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %93

75:                                               ; preds = %93, %69
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %4, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %5, align 4
  br label %96

79:                                               ; preds = %71
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef %81) #6
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %82, i64 noundef 16) #6
  %84 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN2mipLERKS_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %83)
          to label %85 unwind label %89

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %14, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %14, align 4, !tbaa !5
  br label %71, !llvm.loop !15

89:                                               ; preds = %79
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %4, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %96

93:                                               ; preds = %74
  invoke void @_Z2psI2miJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %94 unwind label %75

94:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  %95 = load i32, ptr %1, align 4
  ret i32 %95

96:                                               ; preds = %89, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %97

97:                                               ; preds = %96, %65, %44, %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  br label %98

98:                                               ; preds = %97, %30
  %99 = load ptr, ptr %4, align 8
  %100 = load i32, ptr %5, align 4
  %101 = insertvalue { ptr, i32 } poison, ptr %99, 0
  %102 = insertvalue { ptr, i32 } %101, i32 %100, 1
  resume { ptr, i32 } %102
}

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

; 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 uwtable
declare dso_local void @_Z2psI2miJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::array" = type { [4 x %"struct.std::array.12"] }
%"struct.std::array.12" = type { [17 x %struct.mi] }
%struct.mi = type { i32 }
%"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::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@dp = external dso_local global %"struct.std::array", align 4
@.str.17 = external hidden unnamed_addr constant [1 x i8], align 1

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2reINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2adc(i8 noundef signext) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %struct.mi, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %struct.mi, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %8 unwind label %25

8:                                                ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %9 unwind label %27

9:                                                ; preds = %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  invoke void @_Z2reINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %.preheader.preheader unwind label %30

.preheader.preheader:                             ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %4, i64 noundef 1)
  %10 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 0) #5
  %11 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %10, i64 noundef 16) #5
  %12 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %12, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %4, i64 noundef 1)
  %13 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 1) #5
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %13, i64 noundef 16) #5
  %15 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %15, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %4, i64 noundef 1)
  %16 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 2) #5
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %16, i64 noundef 16) #5
  %18 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %18, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %4, i64 noundef 1)
  %19 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 3) #5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %19, i64 noundef 16) #5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %21, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %22 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  store ptr %22, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %23 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  store ptr %23, ptr %6, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %24, label %.lr.ph, label %._crit_edge

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %8
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  br label %55

30:                                               ; preds = %9
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %54

._crit_edge:                                      ; preds = %46, %.preheader.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %7, i64 noundef 0)
  %32 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 0) #5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %32, i64 noundef 16) #5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2mipLERKS_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %35 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 1) #5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %35, i64 noundef 16) #5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2mipLERKS_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %38 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 2) #5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %38, i64 noundef 16) #5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2mipLERKS_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = call noundef nonnull align 4 dereferenceable(68) ptr @_ZNSt5arrayIS_I2miLm17EELm4EEixEm(ptr noundef nonnull align 4 dereferenceable(272) @dp, i64 noundef 3) #5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm17EEixEm(ptr noundef nonnull align 4 dereferenceable(68) %41, i64 noundef 16) #5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN2mipLERKS_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %42)
  invoke void @_Z2psI2miJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %53 unwind label %51

.lr.ph:                                           ; preds = %.preheader.preheader, %46
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %45 = load i8, ptr %44, align 1, !tbaa !9
  invoke void @_Z2adc(i8 noundef signext %45)
          to label %46 unwind label %49

46:                                               ; preds = %.lr.ph
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %48 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %48, label %.lr.ph, label %._crit_edge

49:                                               ; preds = %.lr.ph
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %54

51:                                               ; preds = %._crit_edge
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %54

53:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  ret i32 0

54:                                               ; preds = %51, %49, %30
  %.pn17 = phi { ptr, i32 } [ %50, %49 ], [ %52, %51 ], [ %31, %30 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %55

55:                                               ; preds = %54, %29
  %.pn17.pn = phi { ptr, i32 } [ %.pn17, %54 ], [ %.pn, %29 ]
  resume { ptr, i32 } %.pn17.pn
}

; 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 #4

; 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 uwtable
declare dso_local void @_Z2psI2miJEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass