; LLVM IR from tangjz/acm-icpc :: poj (3158)

; 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"

@slen = external dso_local global i32, align 4
@tlen = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@s = external dso_local global [101 x i8], align 16
@t = external dso_local global [101 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  br label %9

9:                                                ; preds = %157, %0
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @s, ptr noundef @t)
  %11 = icmp eq i32 %10, 2
  br i1 %11, label %12, label %160

12:                                               ; preds = %9
  %13 = call i64 @strlen(ptr noundef @s) #4
  %14 = trunc i64 %13 to i32
  store i32 %14, ptr @slen, align 4, !tbaa !5
  %15 = call i64 @strlen(ptr noundef @t) #4
  %16 = trunc i64 %15 to i32
  store i32 %16, ptr @tlen, align 4, !tbaa !5
  %17 = load i32, ptr @slen, align 4, !tbaa !5
  %18 = load i32, ptr @tlen, align 4, !tbaa !5
  %19 = add nsw i32 %17, %18
  store i32 %19, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %79, %12
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr @slen, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %82

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %61, %25
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = add nsw i32 %27, %28
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = icmp ne i8 %32, 0
  br i1 %33, label %34, label %40

34:                                               ; preds = %26
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = icmp ne i8 %38, 0
  br label %40

40:                                               ; preds = %34, %26
  %41 = phi i1 [ false, %26 ], [ %39, %34 ]
  br i1 %41, label %43, label %42

42:                                               ; preds = %40
  store i32 7, ptr %3, align 4
  br label %64

43:                                               ; preds = %40
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = add nsw i32 %44, %45
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = sext i8 %49 to i32
  %51 = icmp eq i32 %50, 50
  br i1 %51, label %52, label %60

52:                                               ; preds = %43
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 50
  br i1 %58, label %59, label %60

59:                                               ; preds = %52
  store i8 1, ptr %4, align 1, !tbaa !9
  store i32 7, ptr %3, align 4
  br label %64

60:                                               ; preds = %52, %43
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %5, align 4, !tbaa !5
  br label %26, !llvm.loop !12

64:                                               ; preds = %59, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %65

65:                                               ; preds = %64
  %66 = load i8, ptr %4, align 1, !tbaa !9, !range !14, !noundef !15
  %67 = trunc i8 %66 to i1
  br i1 %67, label %78, label %68

68:                                               ; preds = %65
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = load i32, ptr @tlen, align 4, !tbaa !5
  %71 = add nsw i32 %69, %70
  %72 = load i32, ptr @ans, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %78

74:                                               ; preds = %68
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = load i32, ptr @tlen, align 4, !tbaa !5
  %77 = add nsw i32 %75, %76
  store i32 %77, ptr @ans, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %74, %68, %65
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !16

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

83:                                               ; preds = %142, %82
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = load i32, ptr @tlen, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %145

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

89:                                               ; preds = %124, %88
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = add nsw i32 %90, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !11
  %96 = icmp ne i8 %95, 0
  br i1 %96, label %97, label %103

97:                                               ; preds = %89
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !11
  %102 = icmp ne i8 %101, 0
  br label %103

103:                                              ; preds = %97, %89
  %104 = phi i1 [ false, %89 ], [ %102, %97 ]
  br i1 %104, label %106, label %105

105:                                              ; preds = %103
  store i32 13, ptr %3, align 4
  br label %127

106:                                              ; preds = %103
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = add nsw i32 %107, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %110
  %112 = load i8, ptr %111, align 1, !tbaa !11
  %113 = sext i8 %112 to i32
  %114 = icmp eq i32 %113, 50
  br i1 %114, label %115, label %123

115:                                              ; preds = %106
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %120 = sext i8 %119 to i32
  %121 = icmp eq i32 %120, 50
  br i1 %121, label %122, label %123

122:                                              ; preds = %115
  store i8 1, ptr %7, align 1, !tbaa !9
  store i32 13, ptr %3, align 4
  br label %127

123:                                              ; preds = %115, %106
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %8, align 4, !tbaa !5
  br label %89, !llvm.loop !17

127:                                              ; preds = %122, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %128

128:                                              ; preds = %127
  %129 = load i8, ptr %7, align 1, !tbaa !9, !range !14, !noundef !15
  %130 = trunc i8 %129 to i1
  br i1 %130, label %141, label %131

131:                                              ; preds = %128
  %132 = load i32, ptr %6, align 4, !tbaa !5
  %133 = load i32, ptr @slen, align 4, !tbaa !5
  %134 = add nsw i32 %132, %133
  %135 = load i32, ptr @ans, align 4, !tbaa !5
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %137, label %141

137:                                              ; preds = %131
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = load i32, ptr @slen, align 4, !tbaa !5
  %140 = add nsw i32 %138, %139
  store i32 %140, ptr @ans, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %137, %131, %128
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  br label %142

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

145:                                              ; preds = %87
  %146 = load i32, ptr @ans, align 4, !tbaa !5
  %147 = load i32, ptr @slen, align 4, !tbaa !5
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %149, label %151

149:                                              ; preds = %145
  %150 = load i32, ptr @slen, align 4, !tbaa !5
  store i32 %150, ptr @ans, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %149, %145
  %152 = load i32, ptr @ans, align 4, !tbaa !5
  %153 = load i32, ptr @tlen, align 4, !tbaa !5
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %155, label %157

155:                                              ; preds = %151
  %156 = load i32, ptr @tlen, align 4, !tbaa !5
  store i32 %156, ptr @ans, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %155, %151
  %158 = load i32, ptr @ans, align 4, !tbaa !5
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %158)
  br label %9, !llvm.loop !19

160:                                              ; preds = %9
  ret i32 0
}

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}


; 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"

@slen = external dso_local local_unnamed_addr global i32, align 4
@tlen = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local global [101 x i8], align 16
@t = external dso_local global [101 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @s, ptr noundef nonnull @t)
  %2 = icmp eq i32 %1, 2
  br i1 %2, label %.lr.ph60, label %._crit_edge61

.lr.ph60:                                         ; preds = %0, %55
  %3 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #4
  %4 = trunc i64 %3 to i32
  store i32 %4, ptr @slen, align 4, !tbaa !5
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @t) #4
  %6 = trunc i64 %5 to i32
  store i32 %6, ptr @tlen, align 4, !tbaa !5
  %7 = add nsw i32 %6, %4
  store i32 %7, ptr @ans, align 4, !tbaa !5
  %8 = icmp sgt i32 %4, 0
  br i1 %8, label %.preheader45.preheader, label %.preheader46

.preheader45.preheader:                           ; preds = %.lr.ph60
  %sext = shl i64 %5, 32
  %9 = ashr exact i64 %sext, 32
  %wide.trip.count = and i64 %3, 2147483647
  br label %.preheader45

.preheader46:                                     ; preds = %.critedge, %.lr.ph60
  %ans.promoted56 = phi i32 [ %7, %.lr.ph60 ], [ %30, %.critedge ]
  %10 = icmp sgt i32 %6, 0
  br i1 %10, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %.preheader46
  %sext73 = shl i64 %3, 32
  %11 = ashr exact i64 %sext73, 32
  %wide.trip.count70 = and i64 %5, 2147483647
  br label %.preheader

.preheader45:                                     ; preds = %.preheader45.preheader, %.critedge
  %indvars.iv62 = phi i64 [ 0, %.preheader45.preheader ], [ %indvars.iv.next63, %.critedge ]
  %12 = phi i32 [ %7, %.preheader45.preheader ], [ %30, %.critedge ]
  %13 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %indvars.iv62
  %14 = load i8, ptr %13, align 1, !tbaa !9
  %.not4047 = icmp eq i8 %14, 0
  br i1 %.not4047, label %.critedge42, label %.lr.ph

15:                                               ; preds = %22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = add nuw nsw i64 %indvars.iv.next, %indvars.iv62
  %17 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !9
  %.not40 = icmp eq i8 %18, 0
  br i1 %.not40, label %.critedge42, label %.lr.ph, !llvm.loop !10

.lr.ph:                                           ; preds = %.preheader45, %15
  %indvars.iv = phi i64 [ %indvars.iv.next, %15 ], [ 0, %.preheader45 ]
  %19 = phi i8 [ %18, %15 ], [ %14, %.preheader45 ]
  %20 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %indvars.iv
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %.not41 = icmp eq i8 %21, 0
  br i1 %.not41, label %.critedge42, label %22

22:                                               ; preds = %.lr.ph
  %23 = icmp eq i8 %19, 50
  %24 = icmp eq i8 %21, 50
  %or.cond = and i1 %23, %24
  br i1 %or.cond, label %.critedge, label %15

.critedge42:                                      ; preds = %15, %.lr.ph, %.preheader45
  %25 = add nsw i64 %indvars.iv62, %9
  %26 = sext i32 %12 to i64
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %28, label %.critedge

28:                                               ; preds = %.critedge42
  %29 = trunc nsw i64 %25 to i32
  store i32 %29, ptr @ans, align 4, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %22, %28, %.critedge42
  %30 = phi i32 [ %29, %28 ], [ %12, %.critedge42 ], [ %12, %22 ]
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count
  br i1 %exitcond.not, label %.preheader46, label %.preheader45, !llvm.loop !12

.preheader:                                       ; preds = %.preheader.preheader, %.critedge2
  %indvars.iv67 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next68, %.critedge2 ]
  %31 = phi i32 [ %ans.promoted56, %.preheader.preheader ], [ %53, %.critedge2 ]
  %32 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %indvars.iv67
  %33 = load i8, ptr %32, align 1, !tbaa !9
  %.not52 = icmp eq i8 %33, 0
  br i1 %.not52, label %.critedge44, label %.lr.ph54

._crit_edge:                                      ; preds = %.critedge2, %.preheader46
  %34 = phi i32 [ %ans.promoted56, %.preheader46 ], [ %53, %.critedge2 ]
  %.not75 = icmp slt i32 %34, %4
  %35 = tail call i32 @llvm.smax.i32(i32 %34, i32 %4)
  %.not76 = icmp slt i32 %35, %6
  %36 = tail call i32 @llvm.smax.i32(i32 %35, i32 %6)
  %37 = or i1 %.not75, %.not76
  br i1 %37, label %54, label %55

38:                                               ; preds = %45
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %39 = add nuw nsw i64 %indvars.iv.next66, %indvars.iv67
  %40 = getelementptr inbounds [101 x i8], ptr @t, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %.not = icmp eq i8 %41, 0
  br i1 %.not, label %.critedge44, label %.lr.ph54, !llvm.loop !13

.lr.ph54:                                         ; preds = %.preheader, %38
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %38 ], [ 0, %.preheader ]
  %42 = phi i8 [ %41, %38 ], [ %33, %.preheader ]
  %43 = getelementptr inbounds [101 x i8], ptr @s, i64 0, i64 %indvars.iv65
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %.not39 = icmp eq i8 %44, 0
  br i1 %.not39, label %.critedge44, label %45

45:                                               ; preds = %.lr.ph54
  %46 = icmp eq i8 %42, 50
  %47 = icmp eq i8 %44, 50
  %or.cond43 = and i1 %46, %47
  br i1 %or.cond43, label %.critedge2, label %38

.critedge44:                                      ; preds = %38, %.lr.ph54, %.preheader
  %48 = add nsw i64 %indvars.iv67, %11
  %49 = sext i32 %31 to i64
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %51, label %.critedge2

51:                                               ; preds = %.critedge44
  %52 = trunc nsw i64 %48 to i32
  store i32 %52, ptr @ans, align 4, !tbaa !5
  br label %.critedge2

.critedge2:                                       ; preds = %45, %51, %.critedge44
  %53 = phi i32 [ %52, %51 ], [ %31, %.critedge44 ], [ %31, %45 ]
  %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 %.preheader, !llvm.loop !14

54:                                               ; preds = %._crit_edge
  store i32 %36, ptr @ans, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %._crit_edge, %54
  %56 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %36)
  %57 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @s, ptr noundef nonnull @t)
  %58 = icmp eq i32 %57, 2
  br i1 %58, label %.lr.ph60, label %._crit_edge61, !llvm.loop !15

._crit_edge61:                                    ; preds = %55, %0
  ret i32 0
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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}


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