; LLVM IR from UtkarshPathrabe/Competitive-Coding :: SPOJ Solutions/1025. Fashion Shows C Code (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 [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %11

11:                                               ; preds = %142, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr %2, align 4, !tbaa !5
  %14 = icmp ne i32 %12, 0
  br i1 %14, label %15, label %146

15:                                               ; preds = %11
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = call ptr @llvm.stacksave.p0()
  store ptr %19, ptr %7, align 8
  %20 = alloca i32, i64 %18, align 16
  store i64 %18, ptr %8, align 8
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = zext i32 %21 to i64
  %23 = alloca i32, i64 %22, align 16
  store i64 %22, ptr %9, align 8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %34, %15
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %37

28:                                               ; preds = %24
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %20, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, i32 noundef %32)
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !9

37:                                               ; preds = %24
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %48, %37
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %51

42:                                               ; preds = %38
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %23, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, i32 noundef %46)
  br label %48

48:                                               ; preds = %42
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %4, align 4, !tbaa !5
  br label %38, !llvm.loop !11

51:                                               ; preds = %38
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %119, %51
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %122

56:                                               ; preds = %52
  %57 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %57, ptr %5, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %115, %56
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %118

62:                                               ; preds = %58
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %20, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %20, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = icmp sgt i32 %66, %70
  br i1 %71, label %72, label %88

72:                                               ; preds = %62
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %20, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr %6, align 4, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %20, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %20, i64 %82
  store i32 %80, ptr %83, align 4, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %20, i64 %86
  store i32 %84, ptr %87, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %72, %62
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %23, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %23, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp sgt i32 %92, %96
  br i1 %97, label %98, label %114

98:                                               ; preds = %88
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i32, ptr %23, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  store i32 %102, ptr %6, align 4, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %23, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %23, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %23, i64 %112
  store i32 %110, ptr %113, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %98, %88
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %5, align 4, !tbaa !5
  br label %58, !llvm.loop !12

118:                                              ; preds = %58
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %4, align 4, !tbaa !5
  br label %52, !llvm.loop !13

122:                                              ; preds = %52
  store i32 0, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %139, %122
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %142

127:                                              ; preds = %123
  %128 = load i32, ptr %4, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i32, ptr %20, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = load i32, ptr %4, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %23, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = mul nsw i32 %131, %135
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = add nsw i32 %137, %136
  store i32 %138, ptr %6, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %127
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %4, align 4, !tbaa !5
  br label %123, !llvm.loop !14

142:                                              ; preds = %123
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %143)
  %145 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %145)
  br label %11, !llvm.loop !15

146:                                              ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

; 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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 = distinct !{!11, !10}
!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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr %1, align 4, !tbaa !5
  %.not49 = icmp eq i32 %4, 0
  br i1 %.not49, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %0, %._crit_edge
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = call ptr @llvm.stacksave.p0()
  %10 = alloca i32, i64 %8, align 16
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = zext i32 %11 to i64
  %13 = alloca i32, i64 %12, align 16
  %14 = icmp sgt i32 %11, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.preheader39:                                     ; preds = %.lr.ph
  %15 = icmp sgt i32 %19, 0
  br i1 %15, label %.lr.ph42, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph51, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph51 ]
  %16 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, i32 noundef %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %indvars.iv.next, %20
  br i1 %21, label %.lr.ph, label %.preheader39, !llvm.loop !9

.preheader38:                                     ; preds = %.lr.ph42
  %22 = icmp sgt i32 %26, 0
  br i1 %22, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %.preheader38
  %wide.trip.count65 = zext nneg i32 %26 to i64
  br label %.preheader

.lr.ph42:                                         ; preds = %.preheader39, %.lr.ph42
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %.lr.ph42 ], [ 0, %.preheader39 ]
  %23 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv56
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, i32 noundef %24)
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next57, %27
  br i1 %28, label %.lr.ph42, label %.preheader38, !llvm.loop !11

.preheader37:                                     ; preds = %54
  br i1 %22, label %.lr.ph47.preheader, label %._crit_edge

.lr.ph47.preheader:                               ; preds = %.preheader37
  %wide.trip.count70 = zext nneg i32 %26 to i64
  %min.iters.check = icmp ult i32 %26, 8
  br i1 %min.iters.check, label %.lr.ph47.preheader84, label %vector.ph

.lr.ph47.preheader84:                             ; preds = %middle.block, %.lr.ph47.preheader
  %indvars.iv67.ph = phi i64 [ 0, %.lr.ph47.preheader ], [ %n.vec, %middle.block ]
  %.03245.ph = phi i32 [ 0, %.lr.ph47.preheader ], [ %38, %middle.block ]
  br label %.lr.ph47

vector.ph:                                        ; preds = %.lr.ph47.preheader
  %n.vec = and i64 %wide.trip.count65, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %35, %vector.body ]
  %vec.phi80 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %36, %vector.body ]
  %29 = getelementptr inbounds i32, ptr %10, i64 %index
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %wide.load = load <4 x i32>, ptr %29, align 16, !tbaa !5
  %wide.load81 = load <4 x i32>, ptr %30, align 16, !tbaa !5
  %31 = getelementptr inbounds i32, ptr %13, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %wide.load82 = load <4 x i32>, ptr %31, align 16, !tbaa !5
  %wide.load83 = load <4 x i32>, ptr %32, align 16, !tbaa !5
  %33 = mul nsw <4 x i32> %wide.load82, %wide.load
  %34 = mul nsw <4 x i32> %wide.load83, %wide.load81
  %35 = add <4 x i32> %33, %vec.phi
  %36 = add <4 x i32> %34, %vec.phi80
  %index.next = add nuw i64 %index, 8
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %36, %35
  %38 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count65
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph47.preheader84

.preheader:                                       ; preds = %.preheader.preheader, %54
  %indvars.iv59 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next60, %54 ]
  %39 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv59
  %40 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv59
  br label %41

41:                                               ; preds = %.preheader, %53
  %indvars.iv61 = phi i64 [ %indvars.iv59, %.preheader ], [ %indvars.iv.next62, %53 ]
  %42 = load i32, ptr %39, align 4, !tbaa !5
  %43 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv61
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = icmp sgt i32 %42, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %41
  store i32 %44, ptr %39, align 4, !tbaa !5
  store i32 %42, ptr %43, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %46, %41
  %48 = load i32, ptr %40, align 4, !tbaa !5
  %49 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv61
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp sgt i32 %48, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %47
  store i32 %50, ptr %40, align 4, !tbaa !5
  store i32 %48, ptr %49, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %47, %52
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count65
  br i1 %exitcond.not, label %54, label %41, !llvm.loop !15

54:                                               ; preds = %53
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count65
  br i1 %exitcond66.not, label %.preheader37, label %.preheader, !llvm.loop !16

.lr.ph47:                                         ; preds = %.lr.ph47.preheader84, %.lr.ph47
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.lr.ph47 ], [ %indvars.iv67.ph, %.lr.ph47.preheader84 ]
  %.03245 = phi i32 [ %60, %.lr.ph47 ], [ %.03245.ph, %.lr.ph47.preheader84 ]
  %55 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv67
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv67
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = mul nsw i32 %58, %56
  %60 = add nsw i32 %59, %.03245
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next68, %wide.trip.count70
  br i1 %exitcond71.not, label %._crit_edge, label %.lr.ph47, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph47, %middle.block, %.preheader38, %.lr.ph51, %.preheader39, %.preheader37
  %.032.lcssa = phi i32 [ 0, %.preheader37 ], [ 0, %.preheader39 ], [ 0, %.lr.ph51 ], [ 0, %.preheader38 ], [ %38, %middle.block ], [ %60, %.lr.ph47 ]
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.032.lcssa)
  call void @llvm.stackrestore.p0(ptr %9)
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %63 = add nsw i32 %62, -1
  store i32 %63, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %62, 0
  br i1 %.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !18

._crit_edge52:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  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 nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

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 nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !14, !13}
!18 = distinct !{!18, !10}


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