; LLVM IR from tangjz/acm-icpc :: self_training/2015-01-26 (J)

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

@len = external dso_local global i32, align 4
@num = external dso_local global double, align 8
@pow2 = external dso_local global [200 x double], align 16
@str = external dso_local global [20 x i8], align 16
@flag = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 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
  store i32 0, ptr %1, align 4
  store double 1.000000e+00, ptr getelementptr inbounds ([200 x double], ptr @pow2, i64 0, i64 100), align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %7

7:                                                ; preds = %34, %0
  %8 = load i32, ptr %2, align 4, !tbaa !9
  %9 = icmp sle i32 %8, 64
  br i1 %9, label %11, label %10

10:                                               ; preds = %7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %37

11:                                               ; preds = %7
  %12 = load i32, ptr %2, align 4, !tbaa !9
  %13 = add nsw i32 100, %12
  %14 = sub nsw i32 %13, 1
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %15
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = fmul double %17, 2.000000e+00
  %19 = load i32, ptr %2, align 4, !tbaa !9
  %20 = add nsw i32 100, %19
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %21
  store double %18, ptr %22, align 8, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !9
  %24 = sub nsw i32 100, %23
  %25 = add nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %26
  %28 = load double, ptr %27, align 8, !tbaa !5
  %29 = fdiv double %28, 2.000000e+00
  %30 = load i32, ptr %2, align 4, !tbaa !9
  %31 = sub nsw i32 100, %30
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %32
  store double %29, ptr %33, align 8, !tbaa !5
  br label %34

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

37:                                               ; preds = %10
  %38 = call i32 @puts(ptr noundef @.str)
  br label %39

39:                                               ; preds = %182, %37
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @str)
  %41 = icmp ne i32 %40, -1
  br i1 %41, label %42, label %184

42:                                               ; preds = %39
  store i32 0, ptr @len, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %58, %42
  %44 = load i32, ptr %3, align 4, !tbaa !9
  %45 = icmp slt i32 %44, 8
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %61

47:                                               ; preds = %43
  %48 = load i32, ptr @len, align 4, !tbaa !9
  %49 = shl i32 %48, 1
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 49
  %56 = zext i1 %55 to i32
  %57 = add nsw i32 %49, %56
  store i32 %57, ptr @len, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %47
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %3, align 4, !tbaa !9
  br label %43, !llvm.loop !14

61:                                               ; preds = %46
  %62 = load i32, ptr @len, align 4, !tbaa !9
  %63 = sub nsw i32 %62, 63
  store i32 %63, ptr @len, align 4, !tbaa !9
  store double 1.000000e+00, ptr @num, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %85, %61
  %65 = load i32, ptr %4, align 4, !tbaa !9
  %66 = icmp sle i32 %65, 8
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %64
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = add nsw i32 7, %69
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = sext i8 %73 to i32
  %75 = icmp eq i32 %74, 49
  br i1 %75, label %76, label %84

76:                                               ; preds = %68
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = sub nsw i32 100, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = load double, ptr @num, align 8, !tbaa !5
  %83 = fadd double %82, %81
  store double %83, ptr @num, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %76, %68
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %4, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %4, align 4, !tbaa !9
  br label %64, !llvm.loop !15

88:                                               ; preds = %67
  %89 = load i32, ptr @len, align 4, !tbaa !9
  %90 = add nsw i32 100, %89
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !5
  %94 = load double, ptr @num, align 8, !tbaa !5
  %95 = fmul double %94, %93
  store double %95, ptr @num, align 8, !tbaa !5
  store i8 0, ptr @flag, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %114, %88
  %97 = load i32, ptr %5, align 4, !tbaa !9
  %98 = icmp slt i32 %97, 16
  br i1 %98, label %100, label %99

99:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %117

100:                                              ; preds = %96
  %101 = load i32, ptr %5, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %102
  %104 = load i8, ptr %103, align 1, !tbaa !13
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %105, 49
  %107 = zext i1 %106 to i32
  %108 = load i8, ptr @flag, align 1, !tbaa !16, !range !18, !noundef !19
  %109 = trunc i8 %108 to i1
  %110 = zext i1 %109 to i32
  %111 = or i32 %110, %107
  %112 = icmp ne i32 %111, 0
  %113 = zext i1 %112 to i8
  store i8 %113, ptr @flag, align 1, !tbaa !16
  br label %114

114:                                              ; preds = %100
  %115 = load i32, ptr %5, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %5, align 4, !tbaa !9
  br label %96, !llvm.loop !20

117:                                              ; preds = %99
  %118 = load i8, ptr @str, align 16, !tbaa !13
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 49
  br i1 %120, label %121, label %124

121:                                              ; preds = %117
  %122 = load double, ptr @num, align 8, !tbaa !5
  %123 = fneg double %122
  store double %123, ptr @num, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %121, %117
  %125 = load i8, ptr @flag, align 1, !tbaa !16, !range !18, !noundef !19
  %126 = trunc i8 %125 to i1
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  store double 0.000000e+00, ptr @num, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %127, %124
  %129 = load double, ptr @num, align 8, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef @str, ptr noundef @.str.2, double noundef %129) #5
  %131 = load double, ptr @num, align 8, !tbaa !5
  %132 = fcmp oge double %131, 0.000000e+00
  br i1 %132, label %133, label %135

133:                                              ; preds = %128
  %134 = call i32 @putchar(i32 noundef 32)
  br label %135

135:                                              ; preds = %133, %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %143, %135
  %137 = load i32, ptr %6, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %138
  %140 = load i8, ptr %139, align 1, !tbaa !13
  %141 = sext i8 %140 to i32
  %142 = icmp ne i32 %141, 101
  br i1 %142, label %143, label %151

143:                                              ; preds = %136
  %144 = load i32, ptr %6, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %6, align 4, !tbaa !9
  %146 = sext i32 %144 to i64
  %147 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %146
  %148 = load i8, ptr %147, align 1, !tbaa !13
  %149 = sext i8 %148 to i32
  %150 = call i32 @putchar(i32 noundef %149)
  br label %136, !llvm.loop !21

151:                                              ; preds = %136
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %6, align 4, !tbaa !9
  %154 = sext i32 %152 to i64
  %155 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !13
  %157 = sext i8 %156 to i32
  %158 = call i32 @putchar(i32 noundef %157)
  %159 = load i32, ptr %6, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %6, align 4, !tbaa !9
  %161 = sext i32 %159 to i64
  %162 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !13
  %164 = sext i8 %163 to i32
  %165 = call i32 @putchar(i32 noundef %164)
  %166 = call i32 @putchar(i32 noundef 48)
  br label %167

167:                                              ; preds = %174, %151
  %168 = load i32, ptr %6, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %169
  %171 = load i8, ptr %170, align 1, !tbaa !13
  %172 = sext i8 %171 to i32
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %182

174:                                              ; preds = %167
  %175 = load i32, ptr %6, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %6, align 4, !tbaa !9
  %177 = sext i32 %175 to i64
  %178 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %177
  %179 = load i8, ptr %178, align 1, !tbaa !13
  %180 = sext i8 %179 to i32
  %181 = call i32 @putchar(i32 noundef %180)
  br label %167, !llvm.loop !22

182:                                              ; preds = %167
  %183 = call i32 @putchar(i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %39, !llvm.loop !23

184:                                              ; preds = %39
  %185 = call i32 @puts(ptr noundef @.str.3)
  ret i32 0
}

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

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

declare i32 @puts(ptr noundef) #2

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #4

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

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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

@len = external dso_local local_unnamed_addr global i32, align 4
@num = external dso_local local_unnamed_addr global double, align 8
@pow2 = external dso_local local_unnamed_addr global [200 x double], align 16
@str = external dso_local global [20 x i8], align 16
@flag = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  store double 1.000000e+00, ptr getelementptr inbounds (i8, ptr @pow2, i64 800), align 16, !tbaa !5
  br label %4

1:                                                ; preds = %4
  %2 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %.not43 = icmp eq i32 %3, -1
  br i1 %.not43, label %._crit_edge46, label %.lr.ph45

4:                                                ; preds = %4, %0
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next.1, %4 ]
  %5 = add nuw nsw i64 %indvars.iv, 100
  %6 = add nuw nsw i64 %indvars.iv, 99
  %7 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %6
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = fmul double %8, 2.000000e+00
  %10 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %5
  store double %9, ptr %10, align 8, !tbaa !5
  %11 = sub nuw nsw i64 100, %indvars.iv
  %12 = sub nuw nsw i64 101, %indvars.iv
  %13 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %12
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = fmul double %14, 5.000000e-01
  %16 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %11
  store double %15, ptr %16, align 8, !tbaa !5
  %17 = add nuw nsw i64 %indvars.iv, 101
  %18 = add nuw nsw i64 %indvars.iv, 100
  %19 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %18
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = fmul double %20, 2.000000e+00
  %22 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %17
  store double %21, ptr %22, align 8, !tbaa !5
  %23 = sub nuw nsw i64 99, %indvars.iv
  %24 = sub nuw nsw i64 100, %indvars.iv
  %25 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %24
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = fmul double %26, 5.000000e-01
  %28 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %23
  store double %27, ptr %28, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 65
  br i1 %exitcond.not.1, label %1, label %4, !llvm.loop !9

.lr.ph45:                                         ; preds = %1, %._crit_edge42
  %29 = load <8 x i8>, ptr getelementptr inbounds (i8, ptr @str, i64 1), align 1, !tbaa !11
  %30 = icmp eq <8 x i8> %29, <i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49>
  %31 = extractelement <8 x i1> %30, i64 0
  %32 = select i1 %31, i32 2, i32 0
  %33 = extractelement <8 x i1> %30, i64 1
  %34 = zext i1 %33 to i32
  %35 = or disjoint i32 %32, %34
  %36 = shl nuw nsw i32 %35, 2
  %37 = extractelement <8 x i1> %30, i64 2
  %38 = select i1 %37, i32 2, i32 0
  %39 = or disjoint i32 %36, %38
  %40 = extractelement <8 x i1> %30, i64 3
  %41 = zext i1 %40 to i32
  %42 = or disjoint i32 %39, %41
  %43 = shl nuw nsw i32 %42, 2
  %44 = extractelement <8 x i1> %30, i64 4
  %45 = select i1 %44, i32 2, i32 0
  %46 = or disjoint i32 %43, %45
  %47 = extractelement <8 x i1> %30, i64 5
  %48 = zext i1 %47 to i32
  %49 = or disjoint i32 %46, %48
  %50 = shl nuw nsw i32 %49, 1
  %51 = extractelement <8 x i1> %30, i64 6
  %52 = zext i1 %51 to i32
  %53 = or disjoint i32 %50, %52
  %54 = add nsw i32 %53, -63
  store i32 %54, ptr @len, align 4, !tbaa !12
  %55 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 792), align 8
  %56 = fadd double %55, 1.000000e+00
  %57 = extractelement <8 x i1> %30, i64 7
  %58 = select i1 %57, double %56, double 1.000000e+00
  %59 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 784), align 16
  %60 = fadd double %59, %58
  %61 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 776), align 8
  %62 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 768), align 16
  %63 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @str, i64 9), align 1, !tbaa !11
  %64 = icmp eq <4 x i8> %63, <i8 49, i8 49, i8 49, i8 49>
  %65 = extractelement <4 x i1> %64, i64 0
  %66 = select i1 %65, double %60, double %58
  %67 = fadd double %61, %66
  %68 = extractelement <4 x i1> %64, i64 1
  %69 = select i1 %68, double %67, double %66
  %70 = fadd double %62, %69
  %71 = extractelement <4 x i1> %64, i64 2
  %72 = select i1 %71, double %70, double %69
  %73 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 760), align 8
  %74 = fadd double %73, %72
  %75 = extractelement <4 x i1> %64, i64 3
  %76 = select i1 %75, double %74, double %72
  %77 = load i8, ptr getelementptr inbounds (i8, ptr @str, i64 13), align 1, !tbaa !11
  %78 = icmp eq i8 %77, 49
  %79 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 752), align 16
  %80 = fadd double %79, %76
  %81 = select i1 %78, double %80, double %76
  %82 = load i8, ptr getelementptr inbounds (i8, ptr @str, i64 14), align 2, !tbaa !11
  %83 = icmp eq i8 %82, 49
  %84 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 744), align 8
  %85 = fadd double %84, %81
  %86 = select i1 %83, double %85, double %81
  %87 = load i8, ptr getelementptr inbounds (i8, ptr @str, i64 15), align 1, !tbaa !11
  %88 = icmp eq i8 %87, 49
  %89 = load double, ptr getelementptr inbounds (i8, ptr @pow2, i64 736), align 16
  %90 = fadd double %89, %86
  %91 = select i1 %88, double %90, double %86
  %92 = add nuw nsw i32 %53, 37
  %93 = zext nneg i32 %92 to i64
  %94 = getelementptr inbounds [200 x double], ptr @pow2, i64 0, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !5
  %96 = fmul double %95, %91
  store double %96, ptr @num, align 8, !tbaa !5
  %97 = bitcast <8 x i1> %30 to i8
  %98 = icmp ne i8 %97, 0
  %99 = bitcast <4 x i1> %64 to i4
  %100 = icmp ne i4 %99, 0
  %op.rdx = or i1 %98, %100
  %op.rdx66 = or i1 %83, %88
  %101 = or i1 %op.rdx, %op.rdx66
  %op.rdx67 = or i1 %101, %78
  %102 = zext i1 %op.rdx67 to i8
  store i8 %102, ptr @flag, align 1, !tbaa !14
  %103 = load i8, ptr @str, align 16, !tbaa !11
  %104 = icmp eq i8 %103, 49
  br i1 %104, label %105, label %107

105:                                              ; preds = %.lr.ph45
  %106 = fneg double %96
  store double %106, ptr @num, align 8, !tbaa !5
  br label %107

107:                                              ; preds = %105, %.lr.ph45
  %108 = phi double [ %106, %105 ], [ %96, %.lr.ph45 ]
  br i1 %op.rdx67, label %110, label %109

109:                                              ; preds = %107
  store double 0.000000e+00, ptr @num, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %109, %107
  %111 = phi double [ 0.000000e+00, %109 ], [ %108, %107 ]
  %112 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) @str, ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %111) #3
  %113 = load double, ptr @num, align 8, !tbaa !5
  %114 = fcmp ult double %113, 0.000000e+00
  br i1 %114, label %117, label %115

115:                                              ; preds = %110
  %116 = tail call i32 @putchar(i32 noundef 32)
  br label %117

117:                                              ; preds = %115, %110
  %118 = load i8, ptr @str, align 16, !tbaa !11
  %.not2936 = icmp eq i8 %118, 101
  br i1 %.not2936, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %117, %.lr.ph
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.lr.ph ], [ 0, %117 ]
  %119 = phi i8 [ %123, %.lr.ph ], [ %118, %117 ]
  %120 = sext i8 %119 to i32
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %121 = tail call i32 @putchar(i32 noundef %120)
  %122 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %indvars.iv.next62
  %123 = load i8, ptr %122, align 1, !tbaa !11
  %.not29 = icmp eq i8 %123, 101
  br i1 %.not29, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %124 = trunc nuw i64 %indvars.iv.next62 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %117
  %.0.lcssa = phi i32 [ 0, %117 ], [ %124, %._crit_edge.loopexit ]
  %125 = add nuw nsw i32 %.0.lcssa, 1
  %126 = tail call i32 @putchar(i32 noundef 101)
  %127 = add i32 %.0.lcssa, 2
  %128 = zext nneg i32 %125 to i64
  %129 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !11
  %131 = sext i8 %130 to i32
  %132 = tail call i32 @putchar(i32 noundef %131)
  %133 = tail call i32 @putchar(i32 noundef 48)
  %134 = zext i32 %127 to i64
  %135 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !11
  %.not3038 = icmp eq i8 %136, 0
  br i1 %.not3038, label %._crit_edge42, label %.lr.ph41

.lr.ph41:                                         ; preds = %._crit_edge, %.lr.ph41
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph41 ], [ %134, %._crit_edge ]
  %137 = phi i8 [ %141, %.lr.ph41 ], [ %136, %._crit_edge ]
  %138 = sext i8 %137 to i32
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %139 = tail call i32 @putchar(i32 noundef %138)
  %140 = getelementptr inbounds [20 x i8], ptr @str, i64 0, i64 %indvars.iv.next64
  %141 = load i8, ptr %140, align 1, !tbaa !11
  %.not30 = icmp eq i8 %141, 0
  br i1 %.not30, label %._crit_edge42, label %.lr.ph41, !llvm.loop !17

._crit_edge42:                                    ; preds = %.lr.ph41, %._crit_edge
  %142 = tail call i32 @putchar(i32 noundef 10)
  %143 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %.not = icmp eq i32 %143, -1
  br i1 %.not, label %._crit_edge46, label %.lr.ph45, !llvm.loop !18

._crit_edge46:                                    ; preds = %._crit_edge42, %1
  %144 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #2

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 = { inlinehint mustprogress 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 #3 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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