; LLVM IR from abeaumont/competitive-programming :: advent-of-code/2018/day2 (part2)

; 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 [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [300 x [27 x i8]], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8100, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %17, %0
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %12
  %14 = getelementptr inbounds [27 x i8], ptr %13, i64 0, i64 0
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %14)
  %16 = icmp ne i32 %15, -1
  br i1 %16, label %17, label %20

17:                                               ; preds = %10
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %3, align 4, !tbaa !5
  br label %10, !llvm.loop !9

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

21:                                               ; preds = %142, %20
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = sub nsw i32 %23, 1
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  store i32 4, ptr %5, align 4
  br label %145

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %6, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %136, %27
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 7, ptr %5, align 4
  br label %139

35:                                               ; preds = %30
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %37
  %39 = getelementptr inbounds [27 x i8], ptr %38, i64 0, i64 0
  %40 = call i64 @strlen(ptr noundef %39) #7
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %42
  %44 = getelementptr inbounds [27 x i8], ptr %43, i64 0, i64 0
  %45 = call i64 @strlen(ptr noundef %44) #7
  %46 = icmp eq i64 %40, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %35
  br label %49

48:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 11, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

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

50:                                               ; preds = %81, %49
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %54
  %56 = getelementptr inbounds [27 x i8], ptr %55, i64 0, i64 0
  %57 = call i64 @strlen(ptr noundef %56) #7
  %58 = icmp ult i64 %52, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %50
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %84

60:                                               ; preds = %50
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %62
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [27 x i8], ptr %63, i64 0, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !11
  %68 = sext i8 %67 to i32
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %70
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [27 x i8], ptr %71, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = sext i8 %75 to i32
  %77 = icmp ne i32 %68, %76
  %78 = zext i1 %77 to i32
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, %78
  store i32 %80, ptr %7, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %60
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %8, align 4, !tbaa !5
  br label %50, !llvm.loop !12

84:                                               ; preds = %59
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = icmp eq i32 %85, 1
  br i1 %86, label %87, label %132

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

88:                                               ; preds = %127, %87
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %92
  %94 = getelementptr inbounds [27 x i8], ptr %93, i64 0, i64 0
  %95 = call i64 @strlen(ptr noundef %94) #7
  %96 = icmp ult i64 %90, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %88
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %130

98:                                               ; preds = %88
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %100
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [27 x i8], ptr %101, i64 0, i64 %103
  %105 = load i8, ptr %104, align 1, !tbaa !11
  %106 = sext i8 %105 to i32
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %108
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [27 x i8], ptr %109, i64 0, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !11
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %106, %114
  br i1 %115, label %116, label %126

116:                                              ; preds = %98
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [300 x [27 x i8]], ptr %2, i64 0, i64 %118
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [27 x i8], ptr %119, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !11
  %124 = sext i8 %123 to i32
  %125 = call i32 @putchar(i32 noundef %124)
  br label %126

126:                                              ; preds = %116, %98
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %9, align 4, !tbaa !5
  br label %88, !llvm.loop !13

130:                                              ; preds = %97
  %131 = call i32 @puts(ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %133

132:                                              ; preds = %84
  store i32 0, ptr %5, align 4
  br label %133

133:                                              ; preds = %132, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %134 = load i32, ptr %5, align 4
  switch i32 %134, label %139 [
    i32 0, label %135
  ]

135:                                              ; preds = %133
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %6, align 4, !tbaa !5
  br label %30, !llvm.loop !14

139:                                              ; preds = %133, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %140 = load i32, ptr %5, align 4
  switch i32 %140, label %145 [
    i32 7, label %141
  ]

141:                                              ; preds = %139
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !15

145:                                              ; preds = %139, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %146 = load i32, ptr %5, align 4
  switch i32 %146, label %148 [
    i32 4, label %147
  ]

147:                                              ; preds = %145
  store i32 0, ptr %5, align 4
  br label %148

148:                                              ; preds = %147, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8100, ptr %2) #6
  %149 = load i32, ptr %5, align 4
  switch i32 %149, label %152 [
    i32 0, label %150
    i32 1, label %150
  ]

150:                                              ; preds = %148, %148
  %151 = load i32, ptr %1, align 4
  ret i32 %151

152:                                              ; preds = %148
  unreachable
}

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

; Function Attrs: inlinehint nounwind uwtable
declare i32 @putchar(i32 noundef) #5

declare i32 @puts(ptr noundef) #2

attributes #0 = { 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 = { "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 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 #4 = { noreturn 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 #5 = { inlinehint 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 }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { noreturn 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [100 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [300 x [27 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 8100, ptr nonnull %1) #7
  br label %2

2:                                                ; preds = %2, %0
  %indvars.iv85 = phi i32 [ %indvars.iv.next86, %2 ], [ -1, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %2 ], [ 0, %0 ]
  %3 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %.not = icmp eq i32 %4, -1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars.iv.next86 = add nsw i32 %indvars.iv85, 1
  br i1 %.not, label %.critedge50.preheader, label %2, !llvm.loop !5

.critedge50.preheader:                            ; preds = %2
  %5 = icmp ugt i64 %indvars.iv, 1
  br i1 %5, label %.lr.ph63.preheader, label %.loopexit52

.lr.ph63.preheader:                               ; preds = %.critedge50.preheader
  %6 = and i64 %indvars.iv, 4294967295
  %wide.trip.count = zext i32 %indvars.iv85 to i64
  br label %.lr.ph61

.critedge50.loopexit:                             ; preds = %.critedge
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count
  br i1 %exitcond87.not, label %.loopexit52, label %.lr.ph61, !llvm.loop !7

.lr.ph61:                                         ; preds = %.critedge50.loopexit, %.lr.ph63.preheader
  %indvars.iv82 = phi i64 [ 0, %.lr.ph63.preheader ], [ %indvars.iv.next83, %.critedge50.loopexit ]
  %indvars.iv77 = phi i64 [ 1, %.lr.ph63.preheader ], [ %indvars.iv.next78, %.critedge50.loopexit ]
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %7 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv82
  %8 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #8
  %.not64 = icmp eq i64 %8, 0
  %min.iters.check = icmp ult i64 %8, 8
  %n.vec = and i64 %8, -8
  %cmp.n = icmp eq i64 %8, %n.vec
  br label %9

9:                                                ; preds = %.lr.ph61, %.critedge
  %indvars.iv79 = phi i64 [ %indvars.iv77, %.lr.ph61 ], [ %indvars.iv.next80, %.critedge ]
  %10 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv79
  %11 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %10) #8
  %12 = icmp eq i64 %8, %11
  br i1 %12, label %.preheader51, label %25

.preheader51:                                     ; preds = %9
  br i1 %.not64, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader51
  br i1 %min.iters.check, label %.lr.ph.preheader111, label %vector.body

.lr.ph.preheader111:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv74.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.03653.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %24, %middle.block ]
  br label %.lr.ph

vector.body:                                      ; preds = %.lr.ph.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph.preheader ]
  %vec.phi = phi <4 x i32> [ %21, %vector.body ], [ zeroinitializer, %.lr.ph.preheader ]
  %vec.phi107 = phi <4 x i32> [ %22, %vector.body ], [ zeroinitializer, %.lr.ph.preheader ]
  %13 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv82, i64 %index
  %14 = getelementptr inbounds i8, ptr %13, i64 4
  %wide.load = load <4 x i8>, ptr %13, align 1, !tbaa !8
  %wide.load108 = load <4 x i8>, ptr %14, align 1, !tbaa !8
  %15 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv79, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  %wide.load109 = load <4 x i8>, ptr %15, align 1, !tbaa !8
  %wide.load110 = load <4 x i8>, ptr %16, align 1, !tbaa !8
  %17 = icmp ne <4 x i8> %wide.load, %wide.load109
  %18 = icmp ne <4 x i8> %wide.load108, %wide.load110
  %19 = zext <4 x i1> %17 to <4 x i32>
  %20 = zext <4 x i1> %18 to <4 x i32>
  %21 = add <4 x i32> %vec.phi, %19
  %22 = add <4 x i32> %vec.phi107, %20
  %index.next = add nuw i64 %index, 8
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %22, %21
  %24 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader111

25:                                               ; preds = %9
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 11, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  %.lcssa = phi i32 [ %24, %middle.block ], [ %32, %.lr.ph ]
  %.not47 = icmp eq i32 %.lcssa, 1
  br i1 %.not47, label %.preheader, label %.critedge

.preheader:                                       ; preds = %._crit_edge
  %char0 = load i8, ptr %7, align 1
  %.not65 = icmp eq i8 %char0, 0
  br i1 %.not65, label %._crit_edge57, label %.lr.ph56

.lr.ph:                                           ; preds = %.lr.ph.preheader111, %.lr.ph
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph ], [ %indvars.iv74.ph, %.lr.ph.preheader111 ]
  %.03653 = phi i32 [ %32, %.lr.ph ], [ %.03653.ph, %.lr.ph.preheader111 ]
  %26 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv82, i64 %indvars.iv74
  %27 = load i8, ptr %26, align 1, !tbaa !8
  %28 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv79, i64 %indvars.iv74
  %29 = load i8, ptr %28, align 1, !tbaa !8
  %30 = icmp ne i8 %27, %29
  %31 = zext i1 %30 to i32
  %32 = add nuw nsw i32 %.03653, %31
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next75, %8
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge57:                                    ; preds = %42, %.preheader
  %33 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.loopexit52

.lr.ph56:                                         ; preds = %.preheader, %42
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %42 ], [ 0, %.preheader ]
  %34 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv82, i64 %indvars.iv88
  %35 = load i8, ptr %34, align 1, !tbaa !8
  %36 = getelementptr inbounds [300 x [27 x i8]], ptr %1, i64 0, i64 %indvars.iv79, i64 %indvars.iv88
  %37 = load i8, ptr %36, align 1, !tbaa !8
  %38 = icmp eq i8 %35, %37
  br i1 %38, label %39, label %42

39:                                               ; preds = %.lr.ph56
  %40 = sext i8 %35 to i32
  %41 = call i32 @putchar(i32 noundef %40)
  br label %42

42:                                               ; preds = %.lr.ph56, %39
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %43 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #8
  %44 = icmp ugt i64 %43, %indvars.iv.next89
  br i1 %44, label %.lr.ph56, label %._crit_edge57, !llvm.loop !15

.critedge:                                        ; preds = %.preheader51, %._crit_edge
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %.not48 = icmp ult i64 %indvars.iv.next80, %6
  br i1 %.not48, label %9, label %.critedge50.loopexit, !llvm.loop !16

.loopexit52:                                      ; preds = %.critedge50.loopexit, %.critedge50.preheader, %._crit_edge57
  call void @llvm.lifetime.end.p0(i64 8100, 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr 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: inlinehint nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

attributes #0 = { 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 = { 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 #3 = { 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 #4 = { noreturn 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 #5 = { inlinehint nofree 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !6, !13, !12}
!15 = distinct !{!15, !6}
!16 = distinct !{!16, !6}


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