; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-10-05/E - Equation - lzy.ll (Z3bfsi)

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

@t = external dso_local global [32 x i32], align 16
@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
@.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

; 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 { i64, i64 } @_Z4linvi4FracS_(i32 noundef, i64, i64, i64, i64) #3

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_Z4rinvi4FracS_(i32 noundef, i64, i64, i64, i64) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3bfsi(i32 noundef %0) #3 {
  %2 = alloca i32, align 4
  %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
  %9 = alloca %struct.Frac, align 8
  %10 = alloca %struct.Frac, align 8
  %11 = alloca %struct.Frac, align 8
  %12 = alloca %struct.Frac, align 8
  %13 = alloca %struct.Frac, align 8
  %14 = alloca %struct.Frac, align 8
  %15 = alloca %struct.Frac, align 8
  %16 = alloca %struct.Frac, align 8
  %17 = alloca %struct.Frac, align 8
  %18 = alloca %struct.Frac, align 8
  %19 = alloca %struct.Frac, align 8
  %20 = alloca %struct.Frac, align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = call noundef zeroext i1 @_Z5isopti(i32 noundef %24)
  br i1 %25, label %26, label %205

26:                                               ; preds = %1
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %31
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 16 %32, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !9
  %33 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 0
  %34 = load i64, ptr %33, align 8
  %35 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 1
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 0
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 1
  %40 = load i64, ptr %39, align 8
  %41 = call noundef zeroext i1 @_Zeq4FracS_(i64 %34, i64 %36, i64 %38, i64 %40)
  br i1 %41, label %42, label %115

42:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %48
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 16 %49, i64 16, i1 false), !tbaa.struct !9
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %54
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 16 %55, i64 16, i1 false), !tbaa.struct !9
  %56 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %57 = load i64, ptr %56, align 8
  %58 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %59 = load i64, ptr %58, align 8
  %60 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %61 = load i64, ptr %60, align 8
  %62 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %63 = load i64, ptr %62, align 8
  %64 = call { i64, i64 } @_Z4linvi4FracS_(i32 noundef %46, i64 %57, i64 %59, i64 %61, i64 %63)
  %65 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %66 = extractvalue { i64, i64 } %64, 0
  store i64 %66, ptr %65, align 8
  %67 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %68 = extractvalue { i64, i64 } %64, 1
  store i64 %68, ptr %67, align 8
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %73
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %74, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %79
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 16 %80, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !9
  %81 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %82 = load i64, ptr %81, align 8
  %83 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %84 = load i64, ptr %83, align 8
  %85 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %86 = load i64, ptr %85, align 8
  %87 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %88 = load i64, ptr %87, align 8
  %89 = call noundef zeroext i1 @_Zeq4FracS_(i64 %82, i64 %84, i64 %86, i64 %88)
  br i1 %89, label %90, label %92

90:                                               ; preds = %42
  %91 = call i32 @puts(ptr noundef @.str)
  call void @exit(i32 noundef 0) #7
  unreachable

92:                                               ; preds = %42
  %93 = load i32, ptr %2, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %97
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 16 %98, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 @_ZL3mul, i64 16, i1 false), !tbaa.struct !9
  %99 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %100 = load i64, ptr %99, align 8
  %101 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %102 = load i64, ptr %101, align 8
  %103 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %104 = load i64, ptr %103, align 8
  %105 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %106 = load i64, ptr %105, align 8
  %107 = call noundef zeroext i1 @_Zeq4FracS_(i64 %100, i64 %102, i64 %104, i64 %106)
  br i1 %107, label %108, label %110

108:                                              ; preds = %92
  %109 = call i32 @puts(ptr noundef @.str.1)
  call void @exit(i32 noundef 0) #7
  unreachable

110:                                              ; preds = %92
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  call void @_Z3bfsi(i32 noundef %114)
  br label %115

115:                                              ; preds = %110, %26
  %116 = load i32, ptr %2, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %120
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 16 %121, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !9
  %122 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %123 = load i64, ptr %122, align 8
  %124 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %125 = load i64, ptr %124, align 8
  %126 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %127 = load i64, ptr %126, align 8
  %128 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %129 = load i64, ptr %128, align 8
  %130 = call noundef zeroext i1 @_Zeq4FracS_(i64 %123, i64 %125, i64 %127, i64 %129)
  br i1 %130, label %131, label %204

131:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %2, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %137
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 16 %138, i64 16, i1 false), !tbaa.struct !9
  %139 = load i32, ptr %2, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %143
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 16 %144, i64 16, i1 false), !tbaa.struct !9
  %145 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %146 = load i64, ptr %145, align 8
  %147 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %148 = load i64, ptr %147, align 8
  %149 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %150 = load i64, ptr %149, align 8
  %151 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %152 = load i64, ptr %151, align 8
  %153 = call { i64, i64 } @_Z4rinvi4FracS_(i32 noundef %135, i64 %146, i64 %148, i64 %150, i64 %152)
  %154 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %155 = extractvalue { i64, i64 } %153, 0
  store i64 %155, ptr %154, align 8
  %156 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %157 = extractvalue { i64, i64 } %153, 1
  store i64 %157, ptr %156, align 8
  %158 = load i32, ptr %2, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %163, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %164 = load i32, ptr %2, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %168
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 16 %169, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 @_ZL3wng, i64 16, i1 false), !tbaa.struct !9
  %170 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %171 = load i64, ptr %170, align 8
  %172 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %173 = load i64, ptr %172, align 8
  %174 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %175 = load i64, ptr %174, align 8
  %176 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %177 = load i64, ptr %176, align 8
  %178 = call noundef zeroext i1 @_Zeq4FracS_(i64 %171, i64 %173, i64 %175, i64 %177)
  br i1 %178, label %179, label %181

179:                                              ; preds = %131
  %180 = call i32 @puts(ptr noundef @.str)
  call void @exit(i32 noundef 0) #7
  unreachable

181:                                              ; preds = %131
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %186
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 16 %187, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 @_ZL3mul, i64 16, i1 false), !tbaa.struct !9
  %188 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %189 = load i64, ptr %188, align 8
  %190 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %191 = load i64, ptr %190, align 8
  %192 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %193 = load i64, ptr %192, align 8
  %194 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %195 = load i64, ptr %194, align 8
  %196 = call noundef zeroext i1 @_Zeq4FracS_(i64 %189, i64 %191, i64 %193, i64 %195)
  br i1 %196, label %197, label %199

197:                                              ; preds = %181
  %198 = call i32 @puts(ptr noundef @.str.1)
  call void @exit(i32 noundef 0) #7
  unreachable

199:                                              ; preds = %181
  %200 = load i32, ptr %2, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  call void @_Z3bfsi(i32 noundef %203)
  br label %204

204:                                              ; preds = %199, %115
  br label %205

205:                                              ; preds = %204, %1
  ret void
}

declare i32 @puts(ptr noundef) #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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 = { noreturn 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{i64 0, i64 8, !10, i64 8, i64 8, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !7, i64 0}


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

@t = external dso_local local_unnamed_addr global [32 x i32], align 16
@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
@.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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_Z4linvi4FracS_(i32 noundef, i64, i64, i64, i64) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_Z4rinvi4FracS_(i32 noundef, i64, i64, i64, i64) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3bfsi(i32 noundef %0) local_unnamed_addr #1 {
  %2 = sext i32 %0 to i64
  %3 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %2
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = tail call noundef zeroext i1 @_Z5isopti(i32 noundef %4)
  br i1 %5, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %.sroa.030.0.copyload = load i64, ptr @_ZL3wng, align 8, !tbaa !9
  %.sroa.231.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @_ZL3wng, i64 8), align 8, !tbaa !9
  %.sroa.016.0.copyload = load i64, ptr @_ZL3mul, align 8
  %.sroa.217.0.copyload = load i64, ptr getelementptr inbounds (i8, ptr @_ZL3mul, i64 8), align 8
  br label %6

6:                                                ; preds = %.lr.ph, %tailrecurse
  %7 = phi ptr [ %3, %.lr.ph ], [ %69, %tailrecurse ]
  %8 = phi i64 [ %2, %.lr.ph ], [ %68, %tailrecurse ]
  %9 = getelementptr inbounds [32 x i32], ptr @l, i64 0, i64 %8
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %11
  %.sroa.032.0.copyload = load i64, ptr %12, align 16, !tbaa !9
  %.sroa.233.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  %.sroa.233.0.copyload = load i64, ptr %.sroa.233.0..sroa_idx, align 8, !tbaa !9
  %13 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.032.0.copyload, i64 %.sroa.233.0.copyload, i64 %.sroa.030.0.copyload, i64 %.sroa.231.0.copyload)
  br i1 %13, label %14, label %39

14:                                               ; preds = %6
  %15 = load i32, ptr %7, align 4, !tbaa !5
  %16 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %8
  %.sroa.026.0.copyload = load i64, ptr %16, align 16, !tbaa !9
  %.sroa.227.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  %.sroa.227.0.copyload = load i64, ptr %.sroa.227.0..sroa_idx, align 8, !tbaa !9
  %17 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %8
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %19
  %.sroa.024.0.copyload = load i64, ptr %20, align 16, !tbaa !9
  %.sroa.225.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  %.sroa.225.0.copyload = load i64, ptr %.sroa.225.0..sroa_idx, align 8, !tbaa !9
  %21 = tail call { i64, i64 } @_Z4linvi4FracS_(i32 noundef %15, i64 %.sroa.026.0.copyload, i64 %.sroa.227.0.copyload, i64 %.sroa.024.0.copyload, i64 %.sroa.225.0.copyload)
  %22 = extractvalue { i64, i64 } %21, 0
  %23 = extractvalue { i64, i64 } %21, 1
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %25
  store i64 %22, ptr %26, align 16, !tbaa !9
  %.sroa.429.0..sroa_idx = getelementptr inbounds i8, ptr %26, i64 8
  store i64 %23, ptr %.sroa.429.0..sroa_idx, align 8, !tbaa !9
  %27 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %22, i64 %23, i64 %.sroa.030.0.copyload, i64 %.sroa.231.0.copyload)
  br i1 %27, label %28, label %30

28:                                               ; preds = %14
  %29 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  tail call void @exit(i32 noundef 0) #4
  unreachable

30:                                               ; preds = %14
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %32
  %.sroa.018.0.copyload = load i64, ptr %33, align 16, !tbaa !9
  %.sroa.219.0..sroa_idx = getelementptr inbounds i8, ptr %33, i64 8
  %.sroa.219.0.copyload = load i64, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !9
  %34 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.018.0.copyload, i64 %.sroa.219.0.copyload, i64 %.sroa.016.0.copyload, i64 %.sroa.217.0.copyload)
  br i1 %34, label %35, label %37

35:                                               ; preds = %30
  %36 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  tail call void @exit(i32 noundef 0) #4
  unreachable

37:                                               ; preds = %30
  %38 = load i32, ptr %9, align 4, !tbaa !5
  tail call void @_Z3bfsi(i32 noundef %38)
  br label %39

39:                                               ; preds = %37, %6
  %40 = getelementptr inbounds [32 x i32], ptr @r, i64 0, i64 %8
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %42
  %.sroa.014.0.copyload = load i64, ptr %43, align 16, !tbaa !9
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %43, i64 8
  %.sroa.215.0.copyload = load i64, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !9
  %44 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.014.0.copyload, i64 %.sroa.215.0.copyload, i64 %.sroa.030.0.copyload, i64 %.sroa.231.0.copyload)
  br i1 %44, label %45, label %._crit_edge

45:                                               ; preds = %39
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %8
  %.sroa.09.0.copyload = load i64, ptr %47, align 16, !tbaa !9
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %47, i64 8
  %.sroa.210.0.copyload = load i64, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !9
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %49
  %.sroa.07.0.copyload = load i64, ptr %50, align 16, !tbaa !9
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 8
  %.sroa.28.0.copyload = load i64, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !9
  %51 = tail call { i64, i64 } @_Z4rinvi4FracS_(i32 noundef %46, i64 %.sroa.09.0.copyload, i64 %.sroa.210.0.copyload, i64 %.sroa.07.0.copyload, i64 %.sroa.28.0.copyload)
  %52 = extractvalue { i64, i64 } %51, 0
  %53 = extractvalue { i64, i64 } %51, 1
  %54 = load i32, ptr %40, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %55
  store i64 %52, ptr %56, align 16, !tbaa !9
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %56, i64 8
  store i64 %53, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !9
  %57 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %52, i64 %53, i64 %.sroa.030.0.copyload, i64 %.sroa.231.0.copyload)
  br i1 %57, label %58, label %60

58:                                               ; preds = %45
  %59 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  tail call void @exit(i32 noundef 0) #4
  unreachable

60:                                               ; preds = %45
  %61 = load i32, ptr %40, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [32 x %struct.Frac], ptr @v, i64 0, i64 %62
  %.sroa.01.0.copyload = load i64, ptr %63, align 16, !tbaa !9
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %63, i64 8
  %.sroa.22.0.copyload = load i64, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !9
  %64 = tail call noundef zeroext i1 @_Zeq4FracS_(i64 %.sroa.01.0.copyload, i64 %.sroa.22.0.copyload, i64 %.sroa.016.0.copyload, i64 %.sroa.217.0.copyload)
  br i1 %64, label %65, label %tailrecurse

65:                                               ; preds = %60
  %66 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  tail call void @exit(i32 noundef 0) #4
  unreachable

tailrecurse:                                      ; preds = %60
  %67 = load i32, ptr %40, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [32 x i32], ptr @t, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = tail call noundef zeroext i1 @_Z5isopti(i32 noundef %70)
  br i1 %71, label %6, label %._crit_edge

._crit_edge:                                      ; preds = %tailrecurse, %39, %1
  ret void
}

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn 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 = { noreturn 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 = !{!"long long", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass