; LLVM IR from upupming/algorithm :: AdvancedLevel_C++/1031. Hello World for U (20) (main)

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [81 x i8], align 16
  %3 = alloca [30 x [30 x i8]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 81, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 900, ptr %3) #5
  %14 = getelementptr inbounds [30 x [30 x i8]], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 32, i64 900, i1 false)
  %15 = getelementptr inbounds [81 x i8], ptr %2, i64 0, i64 0
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %17 = getelementptr inbounds [81 x i8], ptr %2, i64 0, i64 0
  %18 = call i64 @strlen(ptr noundef %17) #6
  %19 = add i64 %18, 2
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sdiv i32 %21, 3
  store i32 %22, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = sdiv i32 %23, 3
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = srem i32 %25, 3
  %27 = add nsw i32 %24, %26
  store i32 %27, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %43, %0
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %46

33:                                               ; preds = %28
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %7, align 4, !tbaa !5
  %36 = sext i32 %34 to i64
  %37 = getelementptr inbounds [81 x i8], ptr %2, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [30 x [30 x i8]], ptr %3, i64 0, i64 %40
  %42 = getelementptr inbounds [30 x i8], ptr %41, i64 0, i64 0
  store i8 %38, ptr %42, align 2, !tbaa !9
  br label %43

43:                                               ; preds = %33
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %8, align 4, !tbaa !5
  br label %28, !llvm.loop !10

46:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %66, %46
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 2
  %51 = icmp sle i32 %48, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %69

53:                                               ; preds = %47
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %7, align 4, !tbaa !5
  %56 = sext i32 %54 to i64
  %57 = getelementptr inbounds [81 x i8], ptr %2, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !9
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [30 x [30 x i8]], ptr %3, i64 0, i64 %61
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [30 x i8], ptr %62, i64 0, i64 %64
  store i8 %58, ptr %65, align 1, !tbaa !9
  br label %66

66:                                               ; preds = %53
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %9, align 4, !tbaa !5
  br label %47, !llvm.loop !12

69:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  store i32 %71, ptr %10, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %89, %69
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = icmp sge i32 %73, 0
  br i1 %74, label %76, label %75

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

76:                                               ; preds = %72
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds [81 x i8], ptr %2, i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [30 x [30 x i8]], ptr %3, i64 0, i64 %83
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sub nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [30 x i8], ptr %84, i64 0, i64 %87
  store i8 %81, ptr %88, align 1, !tbaa !9
  br label %89

89:                                               ; preds = %76
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = add nsw i32 %90, -1
  store i32 %91, ptr %10, align 4, !tbaa !5
  br label %72, !llvm.loop !13

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

93:                                               ; preds = %119, %92
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %98, label %97

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

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

99:                                               ; preds = %114, %98
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %117

104:                                              ; preds = %99
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [30 x [30 x i8]], ptr %3, i64 0, i64 %106
  %108 = load i32, ptr %13, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [30 x i8], ptr %107, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !9
  %112 = sext i8 %111 to i32
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %112)
  br label %114

114:                                              ; preds = %104
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %13, align 4, !tbaa !5
  br label %99, !llvm.loop !14

117:                                              ; preds = %103
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %119

119:                                              ; preds = %117
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %11, align 4, !tbaa !5
  br label %93, !llvm.loop !15

122:                                              ; preds = %97
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 900, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 81, ptr %2) #5
  %123 = load i32, ptr %1, align 4
  ret i32 %123
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

declare i32 @printf(ptr noundef, ...) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nounwind willreturn memory(read) "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 }
attributes #6 = { nounwind willreturn memory(read) }

!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}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [81 x i8], align 16
  %2 = alloca [30 x [30 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 81, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 900, ptr nonnull %2) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(900) %2, i8 32, i64 900, i1 false)
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #8
  %5 = trunc i64 %4 to i32
  %6 = add i32 %5, 2
  %7 = sdiv i32 %6, 3
  %8 = srem i32 %6, 3
  %9 = add nsw i32 %7, %8
  %10 = icmp sgt i32 %6, 2
  br i1 %10, label %.lr.ph.preheader, label %.preheader37

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = zext nneg i32 %7 to i64
  %11 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 3
  %12 = icmp ult i64 %11, 3
  br i1 %12, label %.preheader37.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 1073741820
  br label %.lr.ph

.preheader37.loopexit.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader37, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader37.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader37.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader37.loopexit.unr-lcssa ]
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %13 = getelementptr inbounds [81 x i8], ptr %1, i64 0, i64 %indvars.iv.epil
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv.epil
  store i8 %14, ptr %15, align 2, !tbaa !5
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader37, label %.lr.ph.epil, !llvm.loop !8

.preheader37:                                     ; preds = %.preheader37.loopexit.unr-lcssa, %.lr.ph.epil, %0
  %.033.lcssa = phi i32 [ 0, %0 ], [ %7, %.lr.ph.epil ], [ %7, %.preheader37.loopexit.unr-lcssa ]
  %.not40 = icmp slt i32 %9, 3
  br i1 %.not40, label %.preheader36, label %.lr.ph43

.lr.ph43:                                         ; preds = %.preheader37
  %16 = sext i32 %7 to i64
  %17 = mul nsw i64 %16, 30
  %18 = getelementptr i8, ptr %2, i64 %17
  %scevgep = getelementptr i8, ptr %18, i64 -29
  %19 = zext nneg i32 %.033.lcssa to i64
  %scevgep57 = getelementptr i8, ptr %1, i64 %19
  %smax = add nsw i32 %9, -2
  %20 = zext nneg i32 %smax to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %scevgep, ptr align 1 %scevgep57, i64 %20, i1 false), !tbaa !5
  %21 = add nsw i32 %9, -1
  %wide.trip.count66 = zext nneg i32 %21 to i64
  %22 = add nsw i64 %wide.trip.count66, -1
  %min.iters.check = icmp ult i64 %22, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph43
  %indvars.iv60.ph = phi i64 [ %19, %.lr.ph43 ], [ %27, %middle.block ]
  %indvars.iv58.ph = phi i64 [ 1, %.lr.ph43 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph43
  %n.vec = and i64 %22, -4
  %ind.end = or disjoint i64 %n.vec, 1
  %23 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %19, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %23, %vector.ph ], [ %24, %vector.body ]
  %vec.phi88 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ]
  %24 = add <2 x i64> %vec.phi, <i64 1, i64 1>
  %25 = add <2 x i64> %vec.phi88, <i64 1, i64 1>
  %index.next = add nuw i64 %index, 4
  %26 = icmp eq i64 %index.next, %n.vec
  br i1 %26, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %25, %24
  %27 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %22, %n.vec
  br i1 %cmp.n, label %.preheader36.loopexit, label %scalar.ph.preheader

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %28 = getelementptr inbounds [81 x i8], ptr %1, i64 0, i64 %indvars.iv
  %29 = load i8, ptr %28, align 4, !tbaa !5
  %30 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv
  store i8 %29, ptr %30, align 8, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %31 = getelementptr inbounds [81 x i8], ptr %1, i64 0, i64 %indvars.iv.next
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv.next
  store i8 %32, ptr %33, align 2, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %34 = getelementptr inbounds [81 x i8], ptr %1, i64 0, i64 %indvars.iv.next.1
  %35 = load i8, ptr %34, align 2, !tbaa !5
  %36 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv.next.1
  store i8 %35, ptr %36, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %37 = getelementptr inbounds [81 x i8], ptr %1, i64 0, i64 %indvars.iv.next.2
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %39 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv.next.2
  store i8 %38, ptr %39, align 2, !tbaa !5
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader37.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !14

.preheader36.loopexit:                            ; preds = %scalar.ph, %middle.block
  %indvars.iv.next61.lcssa = phi i64 [ %27, %middle.block ], [ %indvars.iv.next61, %scalar.ph ]
  %40 = trunc nuw nsw i64 %indvars.iv.next61.lcssa to i32
  br label %.preheader36

.preheader36:                                     ; preds = %.preheader36.loopexit, %.preheader37
  %.1.lcssa = phi i32 [ %.033.lcssa, %.preheader37 ], [ %40, %.preheader36.loopexit ]
  br i1 %10, label %.lr.ph47, label %._crit_edge51

.lr.ph47:                                         ; preds = %.preheader36
  %41 = add nsw i32 %9, -1
  %42 = sext i32 %41 to i64
  %43 = zext nneg i32 %7 to i64
  %44 = zext nneg i32 %.1.lcssa to i64
  br label %52

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %scalar.ph ], [ %indvars.iv60.ph, %scalar.ph.preheader ]
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %scalar.ph ], [ %indvars.iv58.ph, %scalar.ph.preheader ]
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next59, %wide.trip.count66
  br i1 %exitcond67.not, label %.preheader36.loopexit, label %scalar.ph, !llvm.loop !15

.preheader35:                                     ; preds = %52
  br i1 %10, label %.preheader.lr.ph, label %._crit_edge51

.preheader.lr.ph:                                 ; preds = %.preheader35
  %45 = icmp sgt i32 %9, 0
  br i1 %45, label %.preheader.us.preheader, label %.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count84 = zext nneg i32 %7 to i64
  %wide.trip.count79 = zext nneg i32 %9 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv81 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next82, %._crit_edge.us ]
  br label %46

46:                                               ; preds = %.preheader.us, %46
  %indvars.iv76 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next77, %46 ]
  %47 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv81, i64 %indvars.iv76
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %49 = sext i8 %48 to i32
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %49)
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %._crit_edge.us, label %46, !llvm.loop !16

._crit_edge.us:                                   ; preds = %46
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %._crit_edge51, label %.preheader.us, !llvm.loop !17

52:                                               ; preds = %.lr.ph47, %52
  %indvars.iv70 = phi i64 [ %44, %.lr.ph47 ], [ %indvars.iv.next71, %52 ]
  %indvars.iv68 = phi i64 [ %43, %.lr.ph47 ], [ %indvars.iv.next69, %52 ]
  %indvars.iv.next69 = add nsw i64 %indvars.iv68, -1
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %53 = getelementptr inbounds [81 x i8], ptr %1, i64 0, i64 %indvars.iv70
  %54 = load i8, ptr %53, align 1, !tbaa !5
  %55 = getelementptr inbounds [30 x [30 x i8]], ptr %2, i64 0, i64 %indvars.iv.next69, i64 %42
  store i8 %54, ptr %55, align 1, !tbaa !5
  %56 = icmp ugt i64 %indvars.iv68, 1
  br i1 %56, label %52, label %.preheader35, !llvm.loop !18

.preheader:                                       ; preds = %.preheader.lr.ph, %.preheader
  %.02950 = phi i32 [ %58, %.preheader ], [ 0, %.preheader.lr.ph ]
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %58 = add nuw nsw i32 %.02950, 1
  %exitcond75.not = icmp eq i32 %58, %7
  br i1 %exitcond75.not, label %._crit_edge51, label %.preheader, !llvm.loop !17

._crit_edge51:                                    ; preds = %.preheader, %._crit_edge.us, %.preheader36, %.preheader35
  call void @llvm.lifetime.end.p0(i64 900, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 81, ptr nonnull %1) #7
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #6

attributes #0 = { mustprogress nofree norecurse 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = distinct !{!8, !9}
!9 = !{!"llvm.loop.unroll.disable"}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11, !13, !12}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass