; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-03-13 (C - Cubes - lzy)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@x = external dso_local global [19 x i32], align 16
@a = external dso_local global [19 x i8], align 16
@b = external dso_local global [19 x i8], align 16
@s = external dso_local global [19 x i8], align 16
@p = external dso_local global double, align 8
@q = external dso_local global double, align 8
@flag = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [5 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: 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @a, ptr noundef @b)
  %9 = call i64 @strlen(ptr noundef @a) #5
  %10 = trunc i64 %9 to i32
  store i32 %10, ptr @n, align 4, !tbaa !5
  store double 1.000000e+00, ptr @p, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %151, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %154

16:                                               ; preds = %11
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @s)
  call void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1) getelementptr inbounds ([19 x i8], ptr @s, i64 0, i64 3), ptr noundef nonnull align 1 dereferenceable(1) getelementptr inbounds ([19 x i8], ptr @s, i64 0, i64 4)) #6
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [19 x i8], ptr @a, i64 0, i64 %19
  %21 = load i8, ptr %20, align 1, !tbaa !11
  %22 = sext i8 %21 to i32
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [19 x i8], ptr @b, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !11
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %22, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %16
  br label %151

30:                                               ; preds = %16
  store i32 0, ptr @m, align 4, !tbaa !5
  store double 0.000000e+00, ptr @q, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %31

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

34:                                               ; preds = %31
  store i32 5, ptr %3, align 4
  br label %143

35:                                               ; preds = %31
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [19 x i8], ptr @s, i64 0, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [19 x i8], ptr @a, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 %40, %45
  br i1 %46, label %47, label %139

47:                                               ; preds = %35
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr @m, align 4, !tbaa !5
  store i32 0, ptr @l, align 4, !tbaa !5
  store i8 0, ptr @flag, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %73, %47
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = icmp slt i32 %51, 6
  br i1 %52, label %54, label %53

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

54:                                               ; preds = %50
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [19 x i8], ptr @s, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !11
  %59 = sext i8 %58 to i32
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [19 x i8], ptr @b, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !11
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %59, %64
  br i1 %65, label %66, label %72

66:                                               ; preds = %54
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = load i32, ptr @l, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr @l, align 4, !tbaa !5
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %70
  store i32 %67, ptr %71, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %66, %54
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %5, align 4, !tbaa !5
  br label %50, !llvm.loop !14

76:                                               ; preds = %53
  %77 = load i32, ptr @l, align 4, !tbaa !5
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %76
  br label %140

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

81:                                               ; preds = %126, %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr @l, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 11, ptr %3, align 4
  br label %129

86:                                               ; preds = %81
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = add nsw i32 %90, %91
  %93 = icmp eq i32 %92, 5
  br i1 %93, label %94, label %95

94:                                               ; preds = %86
  store i8 1, ptr @flag, align 1, !tbaa !12
  store i32 14, ptr %3, align 4
  br label %129

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

96:                                               ; preds = %119, %95
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = load i32, ptr @l, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 15, ptr %3, align 4
  br label %122

101:                                              ; preds = %96
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %105, label %118

105:                                              ; preds = %101
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %109, %113
  %115 = icmp ne i32 %114, 5
  br i1 %115, label %116, label %117

116:                                              ; preds = %105
  store i8 1, ptr @flag, align 1, !tbaa !12
  store i32 14, ptr %3, align 4
  br label %122

117:                                              ; preds = %105
  br label %118

118:                                              ; preds = %117, %101
  br label %119

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

122:                                              ; preds = %116, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %123 = load i32, ptr %3, align 4
  switch i32 %123, label %129 [
    i32 15, label %124
  ]

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %6, align 4, !tbaa !5
  br label %81, !llvm.loop !17

129:                                              ; preds = %122, %94, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %130 = load i32, ptr %3, align 4
  switch i32 %130, label %143 [
    i32 11, label %131
    i32 14, label %132
  ]

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131, %129
  %133 = load i8, ptr @flag, align 1, !tbaa !12, !range !18, !noundef !19
  %134 = trunc i8 %133 to i1
  %135 = zext i1 %134 to i64
  %136 = select i1 %134, double 1.000000e+00, double 5.000000e-01
  %137 = load double, ptr @q, align 8, !tbaa !9
  %138 = fadd double %137, %136
  store double %138, ptr @q, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %132, %35
  br label %140

140:                                              ; preds = %139, %79
  %141 = load i32, ptr %4, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %4, align 4, !tbaa !5
  br label %31, !llvm.loop !20

143:                                              ; preds = %129, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %144

144:                                              ; preds = %143
  %145 = load double, ptr @q, align 8, !tbaa !9
  %146 = load i32, ptr @m, align 4, !tbaa !5
  %147 = sitofp i32 %146 to double
  %148 = fdiv double %145, %147
  %149 = load double, ptr @p, align 8, !tbaa !9
  %150 = fmul double %149, %148
  store double %150, ptr @p, align 8, !tbaa !9
  br label %151

151:                                              ; preds = %144, %29
  %152 = load i32, ptr %2, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !21

154:                                              ; preds = %15
  %155 = load double, ptr @p, align 8, !tbaa !9
  %156 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %155)
  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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #4

; 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 = { 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 willreturn memory(read) }
attributes #6 = { 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 = !{!"double", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !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"

@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@l = external dso_local local_unnamed_addr global i32, align 4
@x = external dso_local local_unnamed_addr global [19 x i32], align 16
@a = external dso_local global [19 x i8], align 16
@b = external dso_local global [19 x i8], align 16
@s = external dso_local global [19 x i8], align 16
@p = external dso_local local_unnamed_addr global double, align 8
@q = external dso_local local_unnamed_addr global double, align 8
@flag = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [5 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: mustprogress 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 @a, ptr noundef nonnull @b)
  %2 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @a) #4
  %3 = trunc i64 %2 to i32
  store i32 %3, ptr @n, align 4, !tbaa !5
  store double 1.000000e+00, ptr @p, align 8, !tbaa !9
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %86
  %.pre = load double, ptr @p, align 8, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %5 = phi double [ %.pre, %._crit_edge.loopexit ], [ 1.000000e+00, %0 ]
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %5)
  ret i32 0

.lr.ph:                                           ; preds = %0, %86
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %86 ], [ 0, %0 ]
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @s)
  tail call void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1) getelementptr inbounds (i8, ptr @s, i64 3), ptr noundef nonnull align 1 dereferenceable(1) getelementptr inbounds (i8, ptr @s, i64 4)) #5
  %8 = getelementptr inbounds [19 x i8], ptr @a, i64 0, i64 %indvars.iv56
  %9 = load i8, ptr %8, align 1, !tbaa !11
  %10 = getelementptr inbounds [19 x i8], ptr @b, i64 0, i64 %indvars.iv56
  %11 = load i8, ptr %10, align 1, !tbaa !11
  %12 = icmp eq i8 %9, %11
  br i1 %12, label %86, label %13

13:                                               ; preds = %.lr.ph
  store i32 0, ptr @m, align 4, !tbaa !5
  store double 0.000000e+00, ptr @q, align 8, !tbaa !9
  %14 = load i8, ptr @s, align 16
  %15 = icmp eq i8 %14, %11
  %16 = load i8, ptr getelementptr inbounds (i8, ptr @s, i64 1), align 1
  %17 = icmp eq i8 %16, %11
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @s, i64 2), align 2
  %19 = icmp eq i8 %18, %11
  %20 = load i8, ptr getelementptr inbounds (i8, ptr @s, i64 3), align 1
  %21 = icmp eq i8 %20, %11
  %22 = load i8, ptr getelementptr inbounds (i8, ptr @s, i64 4), align 4
  %23 = icmp eq i8 %22, %11
  %24 = load i8, ptr getelementptr inbounds (i8, ptr @s, i64 5), align 1
  %25 = icmp eq i8 %24, %11
  br label %26

26:                                               ; preds = %13, %78
  %indvars.iv52 = phi i64 [ 0, %13 ], [ %indvars.iv.next53, %78 ]
  %27 = phi i32 [ 0, %13 ], [ %80, %78 ]
  %28 = phi double [ 0.000000e+00, %13 ], [ %79, %78 ]
  %indvars54 = trunc i64 %indvars.iv52 to i32
  %29 = getelementptr inbounds [19 x i8], ptr @s, i64 0, i64 %indvars.iv52
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = icmp eq i8 %30, %9
  br i1 %31, label %32, label %78

32:                                               ; preds = %26
  %33 = add nsw i32 %27, 1
  store i32 %33, ptr @m, align 4, !tbaa !5
  store i32 0, ptr @l, align 4, !tbaa !5
  store i8 0, ptr @flag, align 1, !tbaa !12
  br i1 %15, label %44, label %45

.lr.ph37.preheader:                               ; preds = %.thread, %74
  %34 = phi i32 [ %71, %.thread ], [ %70, %74 ]
  %wide.trip.count50 = zext nneg i32 %34 to i64
  br label %.lr.ph37

.lr.ph37:                                         ; preds = %.lr.ph37.preheader, %..critedge_crit_edge.us
  %indvars.iv47 = phi i64 [ 0, %.lr.ph37.preheader ], [ %indvars.iv.next48, %..critedge_crit_edge.us ]
  %35 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %indvars.iv47
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, %indvars54
  %38 = icmp eq i32 %37, 5
  br i1 %38, label %.loopexit.sink.split, label %.preheader.us

.preheader.us:                                    ; preds = %.lr.ph37, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 0, %.lr.ph37 ]
  %.not.us = icmp eq i64 %indvars.iv, %indvars.iv47
  br i1 %.not.us, label %43, label %39

39:                                               ; preds = %.preheader.us
  %40 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %indvars.iv
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = add nsw i32 %41, %36
  %.not30.us = icmp eq i32 %42, 5
  br i1 %.not30.us, label %43, label %.loopexit.sink.split

43:                                               ; preds = %39, %.preheader.us
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count50
  br i1 %exitcond.not, label %..critedge_crit_edge.us, label %.preheader.us, !llvm.loop !14

..critedge_crit_edge.us:                          ; preds = %43
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count50
  br i1 %exitcond51.not, label %.loopexit, label %.lr.ph37, !llvm.loop !16

44:                                               ; preds = %32
  store i32 1, ptr @l, align 4, !tbaa !5
  store i32 0, ptr @x, align 16, !tbaa !5
  br label %45

45:                                               ; preds = %32, %44
  %46 = phi i32 [ 0, %32 ], [ 1, %44 ]
  br i1 %17, label %47, label %51

47:                                               ; preds = %45
  %48 = add nuw nsw i32 %46, 1
  store i32 %48, ptr @l, align 4, !tbaa !5
  %49 = zext nneg i32 %46 to i64
  %50 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %49
  store i32 1, ptr %50, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %47, %45
  %52 = phi i32 [ %46, %45 ], [ %48, %47 ]
  br i1 %19, label %53, label %57

53:                                               ; preds = %51
  %54 = add nuw nsw i32 %52, 1
  store i32 %54, ptr @l, align 4, !tbaa !5
  %55 = zext nneg i32 %52 to i64
  %56 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %55
  store i32 2, ptr %56, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %53, %51
  %58 = phi i32 [ %52, %51 ], [ %54, %53 ]
  br i1 %21, label %59, label %63

59:                                               ; preds = %57
  %60 = add nuw nsw i32 %58, 1
  store i32 %60, ptr @l, align 4, !tbaa !5
  %61 = zext nneg i32 %58 to i64
  %62 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %61
  store i32 3, ptr %62, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %59, %57
  %64 = phi i32 [ %58, %57 ], [ %60, %59 ]
  br i1 %23, label %65, label %69

65:                                               ; preds = %63
  %66 = add nuw nsw i32 %64, 1
  store i32 %66, ptr @l, align 4, !tbaa !5
  %67 = zext nneg i32 %64 to i64
  %68 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %67
  store i32 4, ptr %68, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %65, %63
  %70 = phi i32 [ %64, %63 ], [ %66, %65 ]
  br i1 %25, label %.thread, label %74

.thread:                                          ; preds = %69
  %71 = add nuw nsw i32 %70, 1
  store i32 %71, ptr @l, align 4, !tbaa !5
  %72 = zext nneg i32 %70 to i64
  %73 = getelementptr inbounds [19 x i32], ptr @x, i64 0, i64 %72
  store i32 5, ptr %73, align 4, !tbaa !5
  br label %.lr.ph37.preheader

74:                                               ; preds = %69
  %75 = icmp eq i32 %70, 0
  br i1 %75, label %78, label %.lr.ph37.preheader

.loopexit.sink.split:                             ; preds = %.lr.ph37, %39
  store i8 1, ptr @flag, align 1, !tbaa !12
  br label %.loopexit

.loopexit:                                        ; preds = %..critedge_crit_edge.us, %.loopexit.sink.split
  %76 = phi double [ 1.000000e+00, %.loopexit.sink.split ], [ 5.000000e-01, %..critedge_crit_edge.us ]
  %77 = fadd double %28, %76
  store double %77, ptr @q, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %26, %.loopexit, %74
  %79 = phi double [ %28, %26 ], [ %77, %.loopexit ], [ %28, %74 ]
  %80 = phi i32 [ %27, %26 ], [ %33, %.loopexit ], [ %33, %74 ]
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next53, 6
  br i1 %exitcond55.not, label %81, label %26, !llvm.loop !17

81:                                               ; preds = %78
  %82 = sitofp i32 %80 to double
  %83 = fdiv double %79, %82
  %84 = load double, ptr @p, align 8, !tbaa !9
  %85 = fmul double %84, %83
  store double %85, ptr @p, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %.lr.ph, %81
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %87 = load i32, ptr @n, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next57, %88
  br i1 %89, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !18
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIcENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

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

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 = { 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 = { 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 #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 = !{!"double", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


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