; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (1335)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [20 x i8], align 16
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca [20 x i8], align 16
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 20, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  br label %12

12:                                               ; preds = %156, %154, %0
  %13 = getelementptr inbounds [20 x i8], ptr %2, i64 0, i64 0
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %13, ptr noundef %7, ptr noundef %8)
  %15 = icmp ne i32 %14, -1
  br i1 %15, label %16, label %157

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 20, ptr %10) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds [20 x i8], ptr %2, i64 0, i64 0
  %18 = call i64 @strlen(ptr noundef %17) #6
  store i64 %18, ptr %5, align 8, !tbaa !5
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %66, %16
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = load i64, ptr %5, align 8, !tbaa !5
  %22 = icmp sle i64 %20, %21
  br i1 %22, label %23, label %69

23:                                               ; preds = %19
  %24 = load i64, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds [20 x i8], ptr %2, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = icmp sge i32 %27, 48
  br i1 %28, label %29, label %42

29:                                               ; preds = %23
  %30 = load i64, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds [20 x i8], ptr %2, i64 0, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = icmp sle i32 %33, 57
  br i1 %34, label %35, label %42

35:                                               ; preds = %29
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds [20 x i8], ptr %2, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = sext i8 %38 to i32
  %40 = sub nsw i32 %39, 48
  %41 = sext i32 %40 to i64
  store i64 %41, ptr %9, align 8, !tbaa !5
  br label %54

42:                                               ; preds = %29, %23
  %43 = load i64, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds [20 x i8], ptr %2, i64 0, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = sext i8 %45 to i32
  switch i32 %46, label %53 [
    i32 65, label %47
    i32 66, label %48
    i32 67, label %49
    i32 68, label %50
    i32 69, label %51
    i32 70, label %52
  ]

47:                                               ; preds = %42
  store i64 10, ptr %9, align 8, !tbaa !5
  br label %53

48:                                               ; preds = %42
  store i64 11, ptr %9, align 8, !tbaa !5
  br label %53

49:                                               ; preds = %42
  store i64 12, ptr %9, align 8, !tbaa !5
  br label %53

50:                                               ; preds = %42
  store i64 13, ptr %9, align 8, !tbaa !5
  br label %53

51:                                               ; preds = %42
  store i64 14, ptr %9, align 8, !tbaa !5
  br label %53

52:                                               ; preds = %42
  store i64 15, ptr %9, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %52, %51, %50, %49, %48, %47, %42
  br label %54

54:                                               ; preds = %53, %35
  %55 = load i64, ptr %9, align 8, !tbaa !5
  %56 = load i64, ptr %7, align 8, !tbaa !5
  %57 = load i64, ptr %5, align 8, !tbaa !5
  %58 = load i64, ptr %3, align 8, !tbaa !5
  %59 = sub nsw i64 %57, %58
  %60 = sub nsw i64 %59, 1
  %61 = call noundef double @_ZSt3powIllEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef %56, i64 noundef %60)
  %62 = fptosi double %61 to i64
  %63 = mul nsw i64 %55, %62
  %64 = load i64, ptr %6, align 8, !tbaa !5
  %65 = add nsw i64 %64, %63
  store i64 %65, ptr %6, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %54
  %67 = load i64, ptr %3, align 8, !tbaa !5
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %3, align 8, !tbaa !5
  br label %19, !llvm.loop !10

69:                                               ; preds = %19
  %70 = load i64, ptr %6, align 8, !tbaa !5
  %71 = icmp eq i64 %70, 0
  br i1 %71, label %72, label %74

72:                                               ; preds = %69
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 2, ptr %11, align 4
  br label %154, !llvm.loop !12

74:                                               ; preds = %69
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %114, %74
  %76 = load i64, ptr %6, align 8, !tbaa !5
  %77 = icmp ne i64 %76, 0
  br i1 %77, label %78, label %120

78:                                               ; preds = %75
  %79 = load i64, ptr %6, align 8, !tbaa !5
  %80 = load i64, ptr %8, align 8, !tbaa !5
  %81 = srem i64 %79, %80
  store i64 %81, ptr %9, align 8, !tbaa !5
  %82 = load i64, ptr %9, align 8, !tbaa !5
  %83 = icmp sge i64 %82, 0
  br i1 %83, label %84, label %93

84:                                               ; preds = %78
  %85 = load i64, ptr %9, align 8, !tbaa !5
  %86 = icmp sle i64 %85, 9
  br i1 %86, label %87, label %93

87:                                               ; preds = %84
  %88 = load i64, ptr %9, align 8, !tbaa !5
  %89 = add nsw i64 %88, 48
  %90 = trunc i64 %89 to i8
  %91 = load i64, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %91
  store i8 %90, ptr %92, align 1, !tbaa !9
  br label %114

93:                                               ; preds = %84, %78
  %94 = load i64, ptr %9, align 8, !tbaa !5
  switch i64 %94, label %113 [
    i64 10, label %95
    i64 11, label %98
    i64 12, label %101
    i64 13, label %104
    i64 14, label %107
    i64 15, label %110
  ]

95:                                               ; preds = %93
  %96 = load i64, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %96
  store i8 65, ptr %97, align 1, !tbaa !9
  br label %113

98:                                               ; preds = %93
  %99 = load i64, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %99
  store i8 66, ptr %100, align 1, !tbaa !9
  br label %113

101:                                              ; preds = %93
  %102 = load i64, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %102
  store i8 67, ptr %103, align 1, !tbaa !9
  br label %113

104:                                              ; preds = %93
  %105 = load i64, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %105
  store i8 68, ptr %106, align 1, !tbaa !9
  br label %113

107:                                              ; preds = %93
  %108 = load i64, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %108
  store i8 69, ptr %109, align 1, !tbaa !9
  br label %113

110:                                              ; preds = %93
  %111 = load i64, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %111
  store i8 70, ptr %112, align 1, !tbaa !9
  br label %113

113:                                              ; preds = %110, %107, %104, %101, %98, %95, %93
  br label %114

114:                                              ; preds = %113, %87
  %115 = load i64, ptr %6, align 8, !tbaa !5
  %116 = load i64, ptr %8, align 8, !tbaa !5
  %117 = sdiv i64 %115, %116
  store i64 %117, ptr %6, align 8, !tbaa !5
  %118 = load i64, ptr %3, align 8, !tbaa !5
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %3, align 8, !tbaa !5
  br label %75, !llvm.loop !13

120:                                              ; preds = %75
  %121 = load i64, ptr %3, align 8, !tbaa !5
  %122 = icmp sgt i64 %121, 7
  br i1 %122, label %123, label %125

123:                                              ; preds = %120
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %152

125:                                              ; preds = %120
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %133, %125
  %127 = load i64, ptr %4, align 8, !tbaa !5
  %128 = load i64, ptr %3, align 8, !tbaa !5
  %129 = sub nsw i64 7, %128
  %130 = icmp slt i64 %127, %129
  br i1 %130, label %131, label %136

131:                                              ; preds = %126
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %133

133:                                              ; preds = %131
  %134 = load i64, ptr %4, align 8, !tbaa !5
  %135 = add nsw i64 %134, 1
  store i64 %135, ptr %4, align 8, !tbaa !5
  br label %126, !llvm.loop !14

136:                                              ; preds = %126
  %137 = load i64, ptr %3, align 8, !tbaa !5
  %138 = sub nsw i64 %137, 1
  store i64 %138, ptr %3, align 8, !tbaa !5
  br label %139

139:                                              ; preds = %148, %136
  %140 = load i64, ptr %3, align 8, !tbaa !5
  %141 = icmp sge i64 %140, 0
  br i1 %141, label %142, label %151

142:                                              ; preds = %139
  %143 = load i64, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds [20 x i8], ptr %10, i64 0, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !9
  %146 = sext i8 %145 to i32
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %146)
  br label %148

148:                                              ; preds = %142
  %149 = load i64, ptr %3, align 8, !tbaa !5
  %150 = add nsw i64 %149, -1
  store i64 %150, ptr %3, align 8, !tbaa !5
  br label %139, !llvm.loop !15

151:                                              ; preds = %139
  br label %152

152:                                              ; preds = %151, %123
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i32 0, ptr %11, align 4
  br label %154

154:                                              ; preds = %152, %72
  call void @llvm.lifetime.end.p0(i64 20, ptr %10) #5
  %155 = load i32, ptr %11, align 4
  switch i32 %155, label %159 [
    i32 0, label %156
    i32 2, label %12
  ]

156:                                              ; preds = %154
  br label %12, !llvm.loop !12

157:                                              ; preds = %12
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 20, ptr %2) #5
  %158 = load i32, ptr %1, align 4
  ret i32 %158

159:                                              ; preds = %154
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIllEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef, i64 noundef) #4

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 = { inlinehint mustprogress 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

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

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


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

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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [20 x i8], align 16
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca [20 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %.not61 = icmp eq i32 %5, -1
  br i1 %.not61, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %0, %._crit_edge.thread
  %.062 = phi i64 [ %.4, %._crit_edge.thread ], [ undef, %0 ]
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #6
  %6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %.not4651 = icmp slt i64 %6, 0
  br i1 %.not4651, label %._crit_edge.thread, label %.lr.ph, !llvm.loop !5

.lr.ph:                                           ; preds = %.lr.ph64, %14
  %.154 = phi i64 [ %.2, %14 ], [ %.062, %.lr.ph64 ]
  %.03753 = phi i64 [ %21, %14 ], [ 0, %.lr.ph64 ]
  %.04052 = phi i64 [ %22, %14 ], [ 0, %.lr.ph64 ]
  %7 = getelementptr inbounds [20 x i8], ptr %1, i64 0, i64 %.04052
  %8 = load i8, ptr %7, align 1, !tbaa !7
  %9 = add i8 %8, -48
  %or.cond48 = icmp ult i8 %9, 10
  br i1 %or.cond48, label %10, label %12

10:                                               ; preds = %.lr.ph
  %11 = zext nneg i8 %9 to i64
  br label %14

12:                                               ; preds = %.lr.ph
  %switch.tableidx = add i8 %8, -65
  %13 = icmp ult i8 %switch.tableidx, 6
  br i1 %13, label %switch.lookup, label %14

switch.lookup:                                    ; preds = %12
  %narrow = add nsw i8 %8, -55
  %switch.offset = zext nneg i8 %narrow to i64
  br label %14

14:                                               ; preds = %switch.lookup, %12, %10
  %.2 = phi i64 [ %11, %10 ], [ %.154, %12 ], [ %switch.offset, %switch.lookup ]
  %15 = load i64, ptr %2, align 8, !tbaa !10
  %16 = xor i64 %.04052, -1
  %17 = add nsw i64 %6, %16
  %18 = call noundef double @_ZSt3powIllEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef %15, i64 noundef %17)
  %19 = fptosi double %18 to i64
  %20 = mul nsw i64 %.2, %19
  %21 = add nsw i64 %20, %.03753
  %22 = add nuw i64 %.04052, 1
  %exitcond.not = icmp eq i64 %.04052, %6
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %14
  %23 = icmp eq i64 %21, 0
  br i1 %23, label %._crit_edge.thread, label %.preheader50, !llvm.loop !5

.preheader50:                                     ; preds = %._crit_edge
  %24 = load i64, ptr %3, align 8, !tbaa !10
  br label %25

25:                                               ; preds = %.preheader50, %34
  %indvars.iv = phi i64 [ 6, %.preheader50 ], [ %indvars.iv.next, %34 ]
  %.13857 = phi i64 [ %21, %.preheader50 ], [ %27, %34 ]
  %.14156 = phi i64 [ 0, %.preheader50 ], [ %35, %34 ]
  %26 = srem i64 %.13857, %24
  %27 = sdiv i64 %.13857, %24
  %or.cond = icmp ult i64 %26, 10
  br i1 %or.cond, label %28, label %31

28:                                               ; preds = %25
  %29 = trunc nuw i64 %26 to i8
  %30 = or disjoint i8 %29, 48
  br label %.sink.split

31:                                               ; preds = %25
  %switch.tableidx79 = add i64 %26, -10
  %32 = icmp ult i64 %switch.tableidx79, 6
  br i1 %32, label %switch.lookup78, label %34

switch.lookup78:                                  ; preds = %31
  %switch.idx.cast80 = trunc nuw i64 %switch.tableidx79 to i8
  %switch.offset81 = add nuw nsw i8 %switch.idx.cast80, 65
  br label %.sink.split

.sink.split:                                      ; preds = %switch.lookup78, %28
  %.sink = phi i8 [ %30, %28 ], [ %switch.offset81, %switch.lookup78 ]
  %33 = getelementptr inbounds [20 x i8], ptr %4, i64 0, i64 %.14156
  store i8 %.sink, ptr %33, align 1, !tbaa !7
  br label %34

34:                                               ; preds = %31, %.sink.split
  %35 = add nuw nsw i64 %.14156, 1
  %.not47 = icmp eq i64 %27, 0
  %indvars.iv.next = add i64 %indvars.iv, -1
  br i1 %.not47, label %36, label %25, !llvm.loop !13

36:                                               ; preds = %34
  %37 = icmp ugt i64 %.14156, 6
  br i1 %37, label %38, label %.preheader49

.preheader49:                                     ; preds = %36
  %.not66 = icmp eq i64 %.14156, 6
  br i1 %.not66, label %.preheader.preheader, label %.lr.ph59.preheader

.lr.ph59.preheader:                               ; preds = %.preheader49
  %umax = call i64 @llvm.umax.i64(i64 %indvars.iv, i64 1)
  br label %.lr.ph59

38:                                               ; preds = %36
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %._crit_edge.thread

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %.lr.ph59
  %.03958 = phi i64 [ %41, %.lr.ph59 ], [ 0, %.lr.ph59.preheader ]
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %41 = add nuw i64 %.03958, 1
  %exitcond69.not = icmp eq i64 %41, %umax
  br i1 %exitcond69.not, label %.preheader.preheader, label %.lr.ph59, !llvm.loop !14

.preheader.preheader:                             ; preds = %.lr.ph59, %.preheader49
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.242.in60 = phi i64 [ %.242, %.preheader ], [ %35, %.preheader.preheader ]
  %.242 = add nsw i64 %.242.in60, -1
  %42 = getelementptr inbounds [20 x i8], ptr %4, i64 0, i64 %.242
  %43 = load i8, ptr %42, align 1, !tbaa !7
  %44 = sext i8 %43 to i32
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %44)
  %46 = icmp sgt i64 %.242.in60, 1
  br i1 %46, label %.preheader, label %._crit_edge.thread, !llvm.loop !15

._crit_edge.thread:                               ; preds = %.preheader, %38, %._crit_edge, %.lr.ph64
  %.str.5.sink = phi ptr [ @.str.1, %.lr.ph64 ], [ @.str.1, %._crit_edge ], [ @.str.5, %38 ], [ @.str.5, %.preheader ]
  %.4 = phi i64 [ %.062, %.lr.ph64 ], [ %.2, %._crit_edge ], [ %26, %38 ], [ %26, %.preheader ]
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink)
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #6
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %.not = icmp eq i32 %48, -1
  br i1 %.not, label %._crit_edge65, label %.lr.ph64

._crit_edge65:                                    ; preds = %._crit_edge.thread, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %1) #6
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIllEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef, i64 noundef) local_unnamed_addr #4

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

; 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 i64 @llvm.umax.i64(i64, i64) #5

attributes #0 = { mustprogress norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { inlinehint mustprogress 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}


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