; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-10-05 (E - Equation - 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"

%struct.Frac = type { i64, i64 }

@x = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@t = external dso_local global [32 x i32], align 16
@s = external dso_local global [32 x i32], align 16
@p = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@l = external dso_local global [32 x i32], align 16
@r = external dso_local global [32 x i32], align 16
@v = external dso_local global [32 x %struct.Frac], align 16
@_ZL3wng = external hidden constant %struct.Frac, align 8
@_ZL3zro = external hidden constant %struct.Frac, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL3mul = external hidden constant %struct.Frac, align 8
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Zeq4FracS_(i64, i64, i64, i64) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5isopti(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsi(i32 noundef) #3

declare i32 @puts(ptr noundef) #4

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

9:                                                ; preds = %94, %15, %0
  %10 = call i32 @getchar()
  store i32 %10, ptr @c, align 4, !tbaa !5
  %11 = icmp ne i32 %10, 10
  br i1 %11, label %12, label %95

12:                                               ; preds = %9
  %13 = load i32, ptr @c, align 4, !tbaa !5
  %14 = icmp eq i32 %13, 32
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  br label %9, !llvm.loop !9

16:                                               ; preds = %12
  %17 = load i32, ptr @c, align 4, !tbaa !5
  %18 = icmp eq i32 %17, 88
  br i1 %18, label %19, label %34

19:                                               ; preds = %16
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr @n, align 4, !tbaa !5
  store i32 %21, ptr @x, align 4, !tbaa !5
  %22 = load i32, ptr @c, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %24
  store i32 %22, ptr %25, align 4, !tbaa !5
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %27
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !11
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = load i32, ptr @p, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr @p, align 4, !tbaa !5
  %32 = sext i32 %30 to i64
  %33 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %32
  store i32 %29, ptr %33, align 4, !tbaa !5
  br label %94

34:                                               ; preds = %16
  %35 = load i32, ptr @c, align 4, !tbaa !5
  %36 = call i32 @isdigit(i32 noundef %35) #8
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %58

38:                                               ; preds = %34
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr @n, align 4, !tbaa !5
  %41 = load i32, ptr @c, align 4, !tbaa !5
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %43
  store i32 %41, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #9
  %45 = getelementptr inbounds %struct.Frac, ptr %2, i32 0, i32 0
  %46 = load i32, ptr @c, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 48
  %48 = sext i32 %47 to i64
  store i64 %48, ptr %45, align 8, !tbaa !14
  %49 = getelementptr inbounds %struct.Frac, ptr %2, i32 0, i32 1
  store i64 1, ptr %49, align 8, !tbaa !16
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %51
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 8 %2, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #9
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = load i32, ptr @p, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr @p, align 4, !tbaa !5
  %56 = sext i32 %54 to i64
  %57 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %56
  store i32 %53, ptr %57, align 4, !tbaa !5
  br label %93

58:                                               ; preds = %34
  %59 = load i32, ptr @c, align 4, !tbaa !5
  %60 = call noundef zeroext i1 @_Z5isopti(i32 noundef %59)
  br i1 %60, label %61, label %92

61:                                               ; preds = %58
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr @n, align 4, !tbaa !5
  %64 = load i32, ptr @c, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !5
  %68 = load i32, ptr @n, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %69
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %70, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !11
  %71 = load i32, ptr @p, align 4, !tbaa !5
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr @p, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %77
  store i32 %75, ptr %78, align 4, !tbaa !5
  %79 = load i32, ptr @p, align 4, !tbaa !5
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr @p, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %85
  store i32 %83, ptr %86, align 4, !tbaa !5
  %87 = load i32, ptr @n, align 4, !tbaa !5
  %88 = load i32, ptr @p, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr @p, align 4, !tbaa !5
  %90 = sext i32 %88 to i64
  %91 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %90
  store i32 %87, ptr %91, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %61, %58
  br label %93

93:                                               ; preds = %92, %38
  br label %94

94:                                               ; preds = %93, %19
  br label %9, !llvm.loop !9

95:                                               ; preds = %9
  %96 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z3dfsi(i32 noundef %96)
  %97 = load i32, ptr @x, align 4, !tbaa !5
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %117

99:                                               ; preds = %95
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %101
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 16 %102, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 @_ZL3zro, i64 16, i1 false), !tbaa.struct !11
  %103 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 0
  %104 = load i64, ptr %103, align 8
  %105 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 1
  %106 = load i64, ptr %105, align 8
  %107 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 0
  %108 = load i64, ptr %107, align 8
  %109 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 1
  %110 = load i64, ptr %109, align 8
  %111 = call noundef zeroext i1 @_Zeq4FracS_(i64 %104, i64 %106, i64 %108, i64 %110)
  br i1 %111, label %112, label %114

112:                                              ; preds = %99
  %113 = call i32 @puts(ptr noundef @.str.1)
  br label %116

114:                                              ; preds = %99
  %115 = call i32 @puts(ptr noundef @.str)
  br label %116

116:                                              ; preds = %114, %112
  store i32 0, ptr %1, align 4
  br label %165

117:                                              ; preds = %95
  %118 = load i32, ptr @n, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %119
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %120, ptr align 8 @_ZL3zro, i64 16, i1 false), !tbaa.struct !11
  %121 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z3bfsi(i32 noundef %121)
  %122 = load i32, ptr @x, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %123
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 16 %124, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !11
  %125 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %126 = load i64, ptr %125, align 8
  %127 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %128 = load i64, ptr %127, align 8
  %129 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %130 = load i64, ptr %129, align 8
  %131 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %132 = load i64, ptr %131, align 8
  %133 = call noundef zeroext i1 @_Zeq4FracS_(i64 %126, i64 %128, i64 %130, i64 %132)
  br i1 %133, label %134, label %136

134:                                              ; preds = %117
  %135 = call i32 @puts(ptr noundef @.str)
  br label %164

136:                                              ; preds = %117
  %137 = load i32, ptr @x, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %138
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 16 %139, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 @_ZL3mul, i64 16, i1 false), !tbaa.struct !11
  %140 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %141 = load i64, ptr %140, align 8
  %142 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %143 = load i64, ptr %142, align 8
  %144 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %145 = load i64, ptr %144, align 8
  %146 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %147 = load i64, ptr %146, align 8
  %148 = call noundef zeroext i1 @_Zeq4FracS_(i64 %141, i64 %143, i64 %145, i64 %147)
  br i1 %148, label %149, label %151

149:                                              ; preds = %136
  %150 = call i32 @puts(ptr noundef @.str.1)
  br label %163

151:                                              ; preds = %136
  %152 = load i32, ptr @x, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %153
  %155 = getelementptr inbounds %struct.Frac, ptr %154, i32 0, i32 0
  %156 = load i64, ptr %155, align 16, !tbaa !14
  %157 = load i32, ptr @x, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.Frac, ptr %159, i32 0, i32 1
  %161 = load i64, ptr %160, align 8, !tbaa !16
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %156, i64 noundef %161)
  br label %163

163:                                              ; preds = %151, %149
  br label %164

164:                                              ; preds = %163, %134
  store i32 0, ptr %1, align 4
  br label %165

165:                                              ; preds = %164, %116
  %166 = load i32, ptr %1, align 4
  ret i32 %166
}

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @getchar() #6

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isdigit(i32 noundef) #7

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { "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 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{i64 0, i64 8, !12, i64 8, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_ZTS4Frac", !13, i64 0, !13, i64 8}
!16 = !{!15, !13, i64 8}


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

%struct.Frac = type { i64, i64 }

@x = external dso_local local_unnamed_addr global i32, align 4
@c = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local local_unnamed_addr global [32 x i32], align 16
@s = external dso_local local_unnamed_addr global [32 x i32], align 16
@p = external dso_local local_unnamed_addr global i32, align 4
@n = external dso_local local_unnamed_addr global i32, align 4
@l = external dso_local local_unnamed_addr global [32 x i32], align 16
@r = external dso_local local_unnamed_addr global [32 x i32], align 16
@v = external dso_local local_unnamed_addr global [32 x %struct.Frac], align 16
@_ZL3wng = external hidden local_unnamed_addr constant %struct.Frac, align 8
@_ZL3zro = external hidden local_unnamed_addr constant %struct.Frac, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL3mul = external hidden local_unnamed_addr constant %struct.Frac, align 8
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Zeq4FracS_(i64, i64, i64, i64) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5isopti(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsi(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %0
  %1 = tail call i32 @getchar()
  store i32 %1, ptr @c, align 4, !tbaa !5
  switch i32 %1, label %12 [
    i32 10, label %44
    i32 32, label %.backedge.backedge
    i32 88, label %2
  ]

2:                                                ; preds = %.backedge
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %4 = add nsw i32 %3, 1
  store i32 %4, ptr @n, align 4, !tbaa !5
  store i32 %4, ptr @x, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %5
  store i32 88, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) @_ZL3wng, i64 16, i1 false), !tbaa.struct !9
  %8 = load i32, ptr @p, align 4, !tbaa !5
  %9 = add nsw i32 %8, 1
  store i32 %9, ptr @p, align 4, !tbaa !5
  %10 = sext i32 %8 to i64
  %11 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %10
  store i32 %4, ptr %11, align 4, !tbaa !5
  br label %.backedge.backedge

.backedge.backedge:                               ; preds = %2, %24, %26, %13, %.backedge
  br label %.backedge, !llvm.loop !12

12:                                               ; preds = %.backedge
  %isdigittmp = add i32 %1, -48
  %isdigit = icmp ult i32 %isdigittmp, 10
  br i1 %isdigit, label %13, label %24

13:                                               ; preds = %12
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %16
  store i32 %1, ptr %17, align 4, !tbaa !5
  %18 = zext nneg i32 %isdigittmp to i64
  %19 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %16
  store i64 %18, ptr %19, align 16, !tbaa !10
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  store i64 1, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !10
  %20 = load i32, ptr @p, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr @p, align 4, !tbaa !5
  %22 = sext i32 %20 to i64
  %23 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %22
  store i32 %15, ptr %23, align 4, !tbaa !5
  br label %.backedge.backedge

24:                                               ; preds = %12
  %25 = tail call noundef zeroext i1 @_Z5isopti(i32 noundef %1)
  br i1 %25, label %26, label %.backedge.backedge

26:                                               ; preds = %24
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr @n, align 4, !tbaa !5
  %29 = load i32, ptr @c, align 4, !tbaa !5
  %30 = sext i32 %28 to i64
  %31 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %30
  store i32 %29, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %30
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) @_ZL3wng, i64 16, i1 false), !tbaa.struct !9
  %33 = load i32, ptr @p, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %30
  store i32 %37, ptr %38, align 4, !tbaa !5
  %39 = add nsw i32 %33, -2
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [32 x i32], ptr @s, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %30
  store i32 %42, ptr %43, align 4, !tbaa !5
  store i32 %34, ptr @p, align 4, !tbaa !5
  store i32 %28, ptr %41, align 4, !tbaa !5
  br label %.backedge.backedge

44:                                               ; preds = %.backedge
  %45 = load i32, ptr @n, align 4, !tbaa !5
  tail call void @_Z3dfsi(i32 noundef %45)
  %46 = load i32, ptr @x, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 0
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %49
  br i1 %47, label %51, label %57

51:                                               ; preds = %44
  %.sroa.09.0.copyload = load i64, ptr %50, align 16, !tbaa !10
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 8
  %.sroa.210.0.copyload = load i64, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !10
  %.sroa.07.0.copyload = load i64, ptr @_ZL3zro, align 8, !tbaa !10
  %.sroa.28.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @_ZL3zro, i64 8), align 8, !tbaa !10
  %52 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.09.0.copyload, i64 %.sroa.210.0.copyload, i64 %.sroa.07.0.copyload, i64 %.sroa.28.0.copyload)
  br i1 %52, label %53, label %55

53:                                               ; preds = %51
  %54 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %79

55:                                               ; preds = %51
  %56 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  br label %79

57:                                               ; preds = %44
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) @_ZL3zro, i64 16, i1 false), !tbaa.struct !9
  tail call void @_Z3bfsi(i32 noundef %48)
  %58 = load i32, ptr @x, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %59
  %.sroa.05.0.copyload = load i64, ptr %60, align 16, !tbaa !10
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %60, i64 8
  %.sroa.26.0.copyload = load i64, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !10
  %.sroa.03.0.copyload = load i64, ptr @_ZL3wng, align 8, !tbaa !10
  %.sroa.24.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @_ZL3wng, i64 8), align 8, !tbaa !10
  %61 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.05.0.copyload, i64 %.sroa.26.0.copyload, i64 %.sroa.03.0.copyload, i64 %.sroa.24.0.copyload)
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  br label %79

64:                                               ; preds = %57
  %65 = load i32, ptr @x, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %66
  %.sroa.01.0.copyload = load i64, ptr %67, align 16, !tbaa !10
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %67, i64 8
  %.sroa.22.0.copyload = load i64, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !10
  %.sroa.0.0.copyload = load i64, ptr @_ZL3mul, align 8, !tbaa !10
  %.sroa.2.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @_ZL3mul, i64 8), align 8, !tbaa !10
  %68 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.01.0.copyload, i64 %.sroa.22.0.copyload, i64 %.sroa.0.0.copyload, i64 %.sroa.2.0.copyload)
  br i1 %68, label %69, label %71

69:                                               ; preds = %64
  %70 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %79

71:                                               ; preds = %64
  %72 = load i32, ptr @x, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %73
  %75 = load i64, ptr %74, align 16, !tbaa !14
  %76 = getelementptr inbounds i8, ptr %74, i64 8
  %77 = load i64, ptr %76, align 8, !tbaa !16
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %75, i64 noundef %77)
  br label %79

79:                                               ; preds = %62, %71, %69, %53, %55
  ret i32 0
}

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

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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" }

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


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass