; LLVM IR from tangjz/acm-icpc :: codeforces/complete (907B)

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

@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@z = external dso_local global i32, align 4
@buf = external dso_local global [9 x [11 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 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
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

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

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

15:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %29, %15
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 9
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %32

20:                                               ; preds = %16
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %22
  %24 = getelementptr inbounds [11 x i8], ptr %23, i64 0, i64 0
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i8, ptr %24, i64 %26
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %27)
  br label %29

29:                                               ; preds = %20
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = add nsw i32 %30, 3
  store i32 %31, ptr %4, align 4, !tbaa !5
  br label %16, !llvm.loop !9

32:                                               ; preds = %19
  br label %33

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

36:                                               ; preds = %14
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @x, ptr noundef @y)
  %38 = load i32, ptr @x, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = srem i32 %39, 3
  store i32 %40, ptr @x, align 4, !tbaa !5
  %41 = load i32, ptr @y, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  %43 = srem i32 %42, 3
  store i32 %43, ptr @y, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %87, %36
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 3
  br i1 %46, label %48, label %47

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

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

49:                                               ; preds = %83, %48
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = icmp slt i32 %50, 3
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %49
  %54 = load i32, ptr @x, align 4, !tbaa !5
  %55 = mul nsw i32 %54, 3
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = add nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %58
  %60 = load i32, ptr @y, align 4, !tbaa !5
  %61 = mul nsw i32 %60, 3
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = add nsw i32 %61, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [11 x i8], ptr %59, i64 0, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !12
  %67 = sext i8 %66 to i32
  %68 = icmp eq i32 %67, 46
  br i1 %68, label %69, label %82

69:                                               ; preds = %53
  %70 = load i32, ptr @x, align 4, !tbaa !5
  %71 = mul nsw i32 %70, 3
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = add nsw i32 %71, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %74
  %76 = load i32, ptr @y, align 4, !tbaa !5
  %77 = mul nsw i32 %76, 3
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = add nsw i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [11 x i8], ptr %75, i64 0, i64 %80
  store i8 33, ptr %81, align 1, !tbaa !12
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %69, %53
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %6, align 4, !tbaa !5
  br label %49, !llvm.loop !13

86:                                               ; preds = %52
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %44, !llvm.loop !14

90:                                               ; preds = %47
  %91 = load i32, ptr @z, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %129, label %93

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %125, %93
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = icmp slt i32 %95, 9
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %128

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %121, %98
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = icmp slt i32 %100, 9
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %124

103:                                              ; preds = %99
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %105
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [11 x i8], ptr %106, i64 0, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !12
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %111, 46
  br i1 %112, label %113, label %120

113:                                              ; preds = %103
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %115
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [11 x i8], ptr %116, i64 0, i64 %118
  store i8 33, ptr %119, align 1, !tbaa !12
  br label %120

120:                                              ; preds = %113, %103
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %8, align 4, !tbaa !5
  br label %99, !llvm.loop !15

124:                                              ; preds = %102
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %7, align 4, !tbaa !5
  br label %94, !llvm.loop !16

128:                                              ; preds = %97
  br label %129

129:                                              ; preds = %128, %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %164, %129
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = icmp slt i32 %131, 9
  br i1 %132, label %134, label %133

133:                                              ; preds = %130
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %167

134:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %154, %134
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = icmp slt i32 %136, 9
  br i1 %137, label %139, label %138

138:                                              ; preds = %135
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %157

139:                                              ; preds = %135
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %141
  %143 = getelementptr inbounds [11 x i8], ptr %142, i64 0, i64 0
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %143, i64 %145
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = icmp eq i32 %147, 6
  %149 = zext i1 %148 to i64
  %150 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !12
  %152 = sext i8 %151 to i32
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %146, i32 noundef %152)
  br label %154

154:                                              ; preds = %139
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = add nsw i32 %155, 3
  store i32 %156, ptr %10, align 4, !tbaa !5
  br label %135, !llvm.loop !17

157:                                              ; preds = %138
  %158 = load i32, ptr %9, align 4, !tbaa !5
  %159 = srem i32 %158, 3
  %160 = icmp eq i32 %159, 2
  br i1 %160, label %161, label %163

161:                                              ; preds = %157
  %162 = call i32 @puts(ptr noundef @.str.4)
  br label %163

163:                                              ; preds = %161, %157
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %9, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %9, align 4, !tbaa !5
  br label %130, !llvm.loop !18

167:                                              ; preds = %133
  ret i32 0
}

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

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

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

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

declare i32 @puts(ptr noundef) #2

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 }

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


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

@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@z = external dso_local local_unnamed_addr global i32, align 4
@buf = external dso_local global [9 x [11 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader40:
  %0 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 3))
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 6))
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 11))
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 14))
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 17))
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 22))
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 25))
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 28))
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 33))
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 36))
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 39))
  %12 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 44))
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 47))
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 50))
  %15 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 55))
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 58))
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 61))
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 66))
  %19 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 69))
  %20 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 72))
  %21 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 77))
  %22 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 80))
  %23 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 83))
  %24 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 88))
  %25 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 91))
  %26 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 94))
  %27 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @x, ptr noundef nonnull @y)
  %28 = load i32, ptr @x, align 4, !tbaa !5
  %29 = add nsw i32 %28, -1
  %30 = srem i32 %29, 3
  store i32 %30, ptr @x, align 4, !tbaa !5
  %31 = load i32, ptr @y, align 4, !tbaa !5
  %32 = add nsw i32 %31, -1
  %33 = srem i32 %32, 3
  store i32 %33, ptr @y, align 4, !tbaa !5
  %34 = mul nsw i32 %30, 3
  %35 = mul nsw i32 %33, 3
  %36 = sext i32 %35 to i64
  %37 = sext i32 %34 to i64
  %38 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %37, i64 %36
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = icmp eq i8 %39, 46
  br i1 %40, label %41, label %42

41:                                               ; preds = %.preheader40
  store i8 33, ptr %38, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %.preheader40, %41
  %43 = add nsw i64 %36, 1
  %44 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %37, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = icmp eq i8 %45, 46
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  store i8 33, ptr %44, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %47, %42
  %49 = add nsw i64 %36, 2
  %50 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %37, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = icmp eq i8 %51, 46
  br i1 %52, label %53, label %.preheader39.1

53:                                               ; preds = %48
  store i8 33, ptr %50, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %.preheader39.1

.preheader39.1:                                   ; preds = %53, %48
  %54 = add nsw i64 %37, 1
  %55 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %54, i64 %36
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = icmp eq i8 %56, 46
  br i1 %57, label %58, label %59

58:                                               ; preds = %.preheader39.1
  store i8 33, ptr %55, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %58, %.preheader39.1
  %60 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %54, i64 %43
  %61 = load i8, ptr %60, align 1, !tbaa !9
  %62 = icmp eq i8 %61, 46
  br i1 %62, label %63, label %64

63:                                               ; preds = %59
  store i8 33, ptr %60, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %63, %59
  %65 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %54, i64 %49
  %66 = load i8, ptr %65, align 1, !tbaa !9
  %67 = icmp eq i8 %66, 46
  br i1 %67, label %68, label %.preheader39.2

68:                                               ; preds = %64
  store i8 33, ptr %65, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %.preheader39.2

.preheader39.2:                                   ; preds = %68, %64
  %69 = add nsw i64 %37, 2
  %70 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %69, i64 %36
  %71 = load i8, ptr %70, align 1, !tbaa !9
  %72 = icmp eq i8 %71, 46
  br i1 %72, label %73, label %74

73:                                               ; preds = %.preheader39.2
  store i8 33, ptr %70, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %73, %.preheader39.2
  %75 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %69, i64 %43
  %76 = load i8, ptr %75, align 1, !tbaa !9
  %77 = icmp eq i8 %76, 46
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  store i8 33, ptr %75, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %78, %74
  %80 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %69, i64 %49
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = icmp eq i8 %81, 46
  br i1 %82, label %.thread, label %83

.thread:                                          ; preds = %79
  store i8 33, ptr %80, align 1, !tbaa !9
  store i32 1, ptr @z, align 4, !tbaa !5
  br label %.loopexit

83:                                               ; preds = %79
  %.pre = load i32, ptr @z, align 4, !tbaa !5
  %.not = icmp eq i32 %.pre, 0
  br i1 %.not, label %.preheader37, label %.loopexit

.preheader37:                                     ; preds = %83, %128
  %indvars.iv = phi i64 [ %indvars.iv.next, %128 ], [ 0, %83 ]
  %84 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 0
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = icmp eq i8 %85, 46
  br i1 %86, label %87, label %88

87:                                               ; preds = %.preheader37
  store i8 33, ptr %84, align 1, !tbaa !9
  br label %88

88:                                               ; preds = %.preheader37, %87
  %89 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 1
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %91 = icmp eq i8 %90, 46
  br i1 %91, label %92, label %93

92:                                               ; preds = %88
  store i8 33, ptr %89, align 1, !tbaa !9
  br label %93

93:                                               ; preds = %92, %88
  %94 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 2
  %95 = load i8, ptr %94, align 1, !tbaa !9
  %96 = icmp eq i8 %95, 46
  br i1 %96, label %97, label %98

97:                                               ; preds = %93
  store i8 33, ptr %94, align 1, !tbaa !9
  br label %98

98:                                               ; preds = %97, %93
  %99 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 3
  %100 = load i8, ptr %99, align 1, !tbaa !9
  %101 = icmp eq i8 %100, 46
  br i1 %101, label %102, label %103

102:                                              ; preds = %98
  store i8 33, ptr %99, align 1, !tbaa !9
  br label %103

103:                                              ; preds = %102, %98
  %104 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 4
  %105 = load i8, ptr %104, align 1, !tbaa !9
  %106 = icmp eq i8 %105, 46
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  store i8 33, ptr %104, align 1, !tbaa !9
  br label %108

108:                                              ; preds = %107, %103
  %109 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 5
  %110 = load i8, ptr %109, align 1, !tbaa !9
  %111 = icmp eq i8 %110, 46
  br i1 %111, label %112, label %113

112:                                              ; preds = %108
  store i8 33, ptr %109, align 1, !tbaa !9
  br label %113

113:                                              ; preds = %112, %108
  %114 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 6
  %115 = load i8, ptr %114, align 1, !tbaa !9
  %116 = icmp eq i8 %115, 46
  br i1 %116, label %117, label %118

117:                                              ; preds = %113
  store i8 33, ptr %114, align 1, !tbaa !9
  br label %118

118:                                              ; preds = %117, %113
  %119 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 7
  %120 = load i8, ptr %119, align 1, !tbaa !9
  %121 = icmp eq i8 %120, 46
  br i1 %121, label %122, label %123

122:                                              ; preds = %118
  store i8 33, ptr %119, align 1, !tbaa !9
  br label %123

123:                                              ; preds = %122, %118
  %124 = getelementptr inbounds [9 x [11 x i8]], ptr @buf, i64 0, i64 %indvars.iv, i64 8
  %125 = load i8, ptr %124, align 1, !tbaa !9
  %126 = icmp eq i8 %125, 46
  br i1 %126, label %127, label %128

127:                                              ; preds = %123
  store i8 33, ptr %124, align 1, !tbaa !9
  br label %128

128:                                              ; preds = %127, %123
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 9
  br i1 %exitcond.not, label %.loopexit, label %.preheader37, !llvm.loop !10

.loopexit:                                        ; preds = %128, %.thread, %83
  %129 = load i8, ptr @.str.3, align 1, !tbaa !9
  %130 = sext i8 %129 to i32
  %131 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull @buf, i32 noundef %130)
  %132 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 3), i32 noundef %130)
  %133 = load i8, ptr getelementptr inbounds (i8, ptr @.str.3, i64 1), align 1, !tbaa !9
  %134 = sext i8 %133 to i32
  %135 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 6), i32 noundef %134)
  %136 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 11), i32 noundef %130)
  %137 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 14), i32 noundef %130)
  %138 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 17), i32 noundef %134)
  %139 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 22), i32 noundef %130)
  %140 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 25), i32 noundef %130)
  %141 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 28), i32 noundef %134)
  %142 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  %143 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 33), i32 noundef %130)
  %144 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 36), i32 noundef %130)
  %145 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 39), i32 noundef %134)
  %146 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 44), i32 noundef %130)
  %147 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 47), i32 noundef %130)
  %148 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 50), i32 noundef %134)
  %149 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 55), i32 noundef %130)
  %150 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 58), i32 noundef %130)
  %151 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 61), i32 noundef %134)
  %152 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  %153 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 66), i32 noundef %130)
  %154 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 69), i32 noundef %130)
  %155 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 72), i32 noundef %134)
  %156 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 77), i32 noundef %130)
  %157 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 80), i32 noundef %130)
  %158 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 83), i32 noundef %134)
  %159 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 88), i32 noundef %130)
  %160 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 91), i32 noundef %130)
  %161 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @buf, i64 94), i32 noundef %134)
  %162 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  ret i32 0
}

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

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

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

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

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


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