; LLVM IR from chirag-singhal/Coding-Interview-101 :: Miscellaneous/Codechef/declong (4)

; 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 [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca [100001 x i8], align 16
  %9 = alloca [100001 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %129, %0
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %132

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !9
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 100001, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 100001, ptr %9) #4
  %27 = getelementptr inbounds [100001 x i8], ptr %8, i64 0, i64 0
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %27)
  %29 = getelementptr inbounds [100001 x i8], ptr %9, i64 0, i64 0
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %31 = getelementptr inbounds [100001 x i8], ptr %8, i64 0, i64 0
  %32 = call i64 @strlen(ptr noundef %31) #5
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %34 = getelementptr inbounds [100001 x i8], ptr %9, i64 0, i64 0
  %35 = call i64 @strlen(ptr noundef %34) #5
  %36 = trunc i64 %35 to i32
  store i32 %36, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  %37 = getelementptr inbounds [100001 x i8], ptr %8, i64 0, i64 0
  %38 = load i8, ptr %37, align 16, !tbaa !13
  store i8 %38, ptr %12, align 1, !tbaa !13
  br label %39

39:                                               ; preds = %70, %26
  %40 = load i8, ptr %12, align 1, !tbaa !13
  %41 = sext i8 %40 to i32
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %73

43:                                               ; preds = %39
  %44 = load i32, ptr %7, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100001 x i8], ptr %8, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !13
  store i8 %47, ptr %12, align 1, !tbaa !13
  %48 = load i8, ptr %12, align 1, !tbaa !13
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 49
  br i1 %50, label %51, label %70

51:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 1, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %52

52:                                               ; preds = %63, %51
  %53 = load i32, ptr %14, align 4, !tbaa !11
  %54 = load i32, ptr %10, align 4, !tbaa !11
  %55 = load i32, ptr %7, align 4, !tbaa !11
  %56 = sub nsw i32 %54, %55
  %57 = sub nsw i32 %56, 1
  %58 = icmp slt i32 %53, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %52
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %66

60:                                               ; preds = %52
  %61 = load i64, ptr %13, align 8, !tbaa !9
  %62 = mul i64 %61, 2
  store i64 %62, ptr %13, align 8, !tbaa !9
  br label %63

63:                                               ; preds = %60
  %64 = load i32, ptr %14, align 4, !tbaa !11
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %14, align 4, !tbaa !11
  br label %52, !llvm.loop !14

66:                                               ; preds = %59
  %67 = load i64, ptr %13, align 8, !tbaa !9
  %68 = load i64, ptr %5, align 8, !tbaa !9
  %69 = add i64 %68, %67
  store i64 %69, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %70

70:                                               ; preds = %66, %43
  %71 = load i32, ptr %7, align 4, !tbaa !11
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !11
  br label %39, !llvm.loop !16

73:                                               ; preds = %39
  store i32 0, ptr %7, align 4, !tbaa !11
  %74 = getelementptr inbounds [100001 x i8], ptr %9, i64 0, i64 0
  %75 = load i8, ptr %74, align 16, !tbaa !13
  store i8 %75, ptr %12, align 1, !tbaa !13
  br label %76

76:                                               ; preds = %107, %73
  %77 = load i8, ptr %12, align 1, !tbaa !13
  %78 = sext i8 %77 to i32
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %110

80:                                               ; preds = %76
  %81 = load i32, ptr %7, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100001 x i8], ptr %9, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !13
  store i8 %84, ptr %12, align 1, !tbaa !13
  %85 = load i8, ptr %12, align 1, !tbaa !13
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 49
  br i1 %87, label %88, label %107

88:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 1, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %89

89:                                               ; preds = %100, %88
  %90 = load i32, ptr %16, align 4, !tbaa !11
  %91 = load i32, ptr %11, align 4, !tbaa !11
  %92 = load i32, ptr %7, align 4, !tbaa !11
  %93 = sub nsw i32 %91, %92
  %94 = sub nsw i32 %93, 1
  %95 = icmp slt i32 %90, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %89
  store i32 12, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %103

97:                                               ; preds = %89
  %98 = load i64, ptr %15, align 8, !tbaa !9
  %99 = mul i64 %98, 2
  store i64 %99, ptr %15, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %97
  %101 = load i32, ptr %16, align 4, !tbaa !11
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %16, align 4, !tbaa !11
  br label %89, !llvm.loop !17

103:                                              ; preds = %96
  %104 = load i64, ptr %15, align 8, !tbaa !9
  %105 = load i64, ptr %6, align 8, !tbaa !9
  %106 = add i64 %105, %104
  store i64 %106, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %107

107:                                              ; preds = %103, %80
  %108 = load i32, ptr %7, align 4, !tbaa !11
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %7, align 4, !tbaa !11
  br label %76, !llvm.loop !18

110:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %114, %110
  %112 = load i64, ptr %6, align 8, !tbaa !9
  %113 = icmp ugt i64 %112, 0
  br i1 %113, label %114, label %126

114:                                              ; preds = %111
  %115 = load i64, ptr %5, align 8, !tbaa !9
  %116 = load i64, ptr %6, align 8, !tbaa !9
  %117 = xor i64 %115, %116
  store i64 %117, ptr %18, align 8, !tbaa !9
  %118 = load i64, ptr %5, align 8, !tbaa !9
  %119 = load i64, ptr %6, align 8, !tbaa !9
  %120 = and i64 %118, %119
  store i64 %120, ptr %19, align 8, !tbaa !9
  %121 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %121, ptr %5, align 8, !tbaa !9
  %122 = load i64, ptr %19, align 8, !tbaa !9
  %123 = mul i64 %122, 2
  store i64 %123, ptr %6, align 8, !tbaa !9
  %124 = load i64, ptr %17, align 8, !tbaa !9
  %125 = add i64 %124, 1
  store i64 %125, ptr %17, align 8, !tbaa !9
  br label %111, !llvm.loop !19

126:                                              ; preds = %111
  %127 = load i64, ptr %17, align 8, !tbaa !9
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %127)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 100001, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 100001, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %129

129:                                              ; preds = %126
  %130 = load i64, ptr %3, align 8, !tbaa !5
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %3, align 8, !tbaa !5
  br label %21, !llvm.loop !20

132:                                              ; preds = %25
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  %133 = load i32, ptr %1, align 4
  ret i32 %133
}

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare i32 @printf(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 = { nounwind }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


; 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 [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca [100001 x i8], align 16
  %3 = alloca [100001 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = icmp sgt i64 %5, 0
  br i1 %6, label %.lr.ph80, label %._crit_edge81

._crit_edge81:                                    ; preds = %._crit_edge76, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret i32 0

.lr.ph80:                                         ; preds = %0, %._crit_edge76
  %.078 = phi i64 [ %54, %._crit_edge76 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 100001, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 100001, ptr nonnull %3) #4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3)
  %9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #5
  %10 = trunc i64 %9 to i32
  %11 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #5
  %12 = trunc i64 %11 to i32
  %13 = load i8, ptr %2, align 16, !tbaa !9
  %.not53 = icmp eq i8 %13, 0
  br i1 %.not53, label %._crit_edge58, label %.lr.ph57.preheader

.lr.ph57.preheader:                               ; preds = %.lr.ph80
  %14 = add i64 %9, 4294967295
  %15 = add i64 %9, 4294967294
  br label %.lr.ph57

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %30
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %30 ], [ 0, %.lr.ph57.preheader ]
  %.04055 = phi i64 [ %.141, %30 ], [ 0, %.lr.ph57.preheader ]
  %16 = sub i64 %14, %indvars.iv84
  %17 = trunc i64 %16 to i32
  %18 = sub i64 %15, %indvars.iv84
  %19 = trunc i64 %18 to i32
  %20 = getelementptr inbounds [100001 x i8], ptr %2, i64 0, i64 %indvars.iv84
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %22 = icmp eq i8 %21, 49
  br i1 %22, label %.preheader49, label %30

.preheader49:                                     ; preds = %.lr.ph57
  %23 = trunc nuw nsw i64 %indvars.iv84 to i32
  %24 = sub i32 %23, %10
  %25 = icmp slt i32 %24, -1
  br i1 %25, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader49
  %xtraiter = and i32 %17, 7
  %26 = icmp ult i32 %19, 7
  br i1 %26, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %17, -8
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph.preheader ], [ %29, %.lr.ph ]
  %.03851.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %29, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.03851.epil = phi i64 [ %27, %.lr.ph.epil ], [ %.03851.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %27 = shl i64 %.03851.epil, 1
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !10

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %.preheader49
  %.038.lcssa = phi i64 [ 1, %.preheader49 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %27, %.lr.ph.epil ]
  %28 = add i64 %.038.lcssa, %.04055
  br label %30

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.03851 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %29, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %29 = shl i64 %.03851, 8
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !12

30:                                               ; preds = %._crit_edge, %.lr.ph57
  %.141 = phi i64 [ %28, %._crit_edge ], [ %.04055, %.lr.ph57 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %.not = icmp eq i8 %21, 0
  br i1 %.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !14

._crit_edge58:                                    ; preds = %30, %.lr.ph80
  %.040.lcssa = phi i64 [ 0, %.lr.ph80 ], [ %.141, %30 ]
  %31 = load i8, ptr %3, align 16, !tbaa !9
  %.not4765 = icmp eq i8 %31, 0
  br i1 %.not4765, label %._crit_edge76, label %.lr.ph69.preheader

.lr.ph69.preheader:                               ; preds = %._crit_edge58
  %32 = add i64 %11, 4294967295
  %33 = add i64 %11, 4294967294
  br label %.lr.ph69

.preheader50:                                     ; preds = %48
  %.not4871 = icmp eq i64 %.145, 0
  br i1 %.not4871, label %._crit_edge76, label %.lr.ph75

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %48
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %48 ], [ 0, %.lr.ph69.preheader ]
  %.04466 = phi i64 [ %.145, %48 ], [ 0, %.lr.ph69.preheader ]
  %34 = sub i64 %32, %indvars.iv90
  %35 = trunc i64 %34 to i32
  %36 = sub i64 %33, %indvars.iv90
  %37 = trunc i64 %36 to i32
  %38 = getelementptr inbounds [100001 x i8], ptr %3, i64 0, i64 %indvars.iv90
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = icmp eq i8 %39, 49
  br i1 %40, label %.preheader, label %48

.preheader:                                       ; preds = %.lr.ph69
  %41 = trunc nuw nsw i64 %indvars.iv90 to i32
  %42 = sub i32 %41, %12
  %43 = icmp slt i32 %42, -1
  br i1 %43, label %.lr.ph62.preheader, label %._crit_edge63

.lr.ph62.preheader:                               ; preds = %.preheader
  %xtraiter102 = and i32 %35, 7
  %44 = icmp ult i32 %37, 7
  br i1 %44, label %._crit_edge63.loopexit.unr-lcssa, label %.lr.ph62.preheader.new

.lr.ph62.preheader.new:                           ; preds = %.lr.ph62.preheader
  %unroll_iter106 = and i32 %35, -8
  br label %.lr.ph62

._crit_edge63.loopexit.unr-lcssa:                 ; preds = %.lr.ph62, %.lr.ph62.preheader
  %.lcssa99.ph = phi i64 [ poison, %.lr.ph62.preheader ], [ %47, %.lr.ph62 ]
  %.03660.unr = phi i64 [ 1, %.lr.ph62.preheader ], [ %47, %.lr.ph62 ]
  %lcmp.mod104.not = icmp eq i32 %xtraiter102, 0
  br i1 %lcmp.mod104.not, label %._crit_edge63, label %.lr.ph62.epil

.lr.ph62.epil:                                    ; preds = %._crit_edge63.loopexit.unr-lcssa, %.lr.ph62.epil
  %.03660.epil = phi i64 [ %45, %.lr.ph62.epil ], [ %.03660.unr, %._crit_edge63.loopexit.unr-lcssa ]
  %epil.iter103 = phi i32 [ %epil.iter103.next, %.lr.ph62.epil ], [ 0, %._crit_edge63.loopexit.unr-lcssa ]
  %45 = shl i64 %.03660.epil, 1
  %epil.iter103.next = add i32 %epil.iter103, 1
  %epil.iter103.cmp.not = icmp eq i32 %epil.iter103.next, %xtraiter102
  br i1 %epil.iter103.cmp.not, label %._crit_edge63, label %.lr.ph62.epil, !llvm.loop !15

._crit_edge63:                                    ; preds = %._crit_edge63.loopexit.unr-lcssa, %.lr.ph62.epil, %.preheader
  %.036.lcssa = phi i64 [ 1, %.preheader ], [ %.lcssa99.ph, %._crit_edge63.loopexit.unr-lcssa ], [ %45, %.lr.ph62.epil ]
  %46 = add i64 %.036.lcssa, %.04466
  br label %48

.lr.ph62:                                         ; preds = %.lr.ph62, %.lr.ph62.preheader.new
  %.03660 = phi i64 [ 1, %.lr.ph62.preheader.new ], [ %47, %.lr.ph62 ]
  %niter107 = phi i32 [ 0, %.lr.ph62.preheader.new ], [ %niter107.next.7, %.lr.ph62 ]
  %47 = shl i64 %.03660, 8
  %niter107.next.7 = add i32 %niter107, 8
  %niter107.ncmp.7 = icmp eq i32 %niter107.next.7, %unroll_iter106
  br i1 %niter107.ncmp.7, label %._crit_edge63.loopexit.unr-lcssa, label %.lr.ph62, !llvm.loop !16

48:                                               ; preds = %._crit_edge63, %.lr.ph69
  %.145 = phi i64 [ %46, %._crit_edge63 ], [ %.04466, %.lr.ph69 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %.not47 = icmp eq i8 %39, 0
  br i1 %.not47, label %.preheader50, label %.lr.ph69, !llvm.loop !17

.lr.ph75:                                         ; preds = %.preheader50, %.lr.ph75
  %.03474 = phi i64 [ %52, %.lr.ph75 ], [ 0, %.preheader50 ]
  %.273 = phi i64 [ %49, %.lr.ph75 ], [ %.040.lcssa, %.preheader50 ]
  %.24672 = phi i64 [ %51, %.lr.ph75 ], [ %.145, %.preheader50 ]
  %49 = xor i64 %.273, %.24672
  %50 = and i64 %.273, %.24672
  %51 = shl i64 %50, 1
  %52 = add i64 %.03474, 1
  %.not48 = icmp eq i64 %51, 0
  br i1 %.not48, label %._crit_edge76, label %.lr.ph75, !llvm.loop !18

._crit_edge76:                                    ; preds = %.lr.ph75, %._crit_edge58, %.preheader50
  %.034.lcssa = phi i64 [ 0, %.preheader50 ], [ 0, %._crit_edge58 ], [ %52, %.lr.ph75 ]
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.034.lcssa)
  call void @llvm.lifetime.end.p0(i64 100001, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 100001, ptr nonnull %2) #4
  %54 = add nuw nsw i64 %.078, 1
  %55 = load i64, ptr %1, align 8, !tbaa !5
  %56 = icmp slt i64 %54, %55
  br i1 %56, label %.lr.ph80, label %._crit_edge81, !llvm.loop !19
}

; 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: 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 #2

attributes #0 = { 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 #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 = { nounwind }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.unroll.disable"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}


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