; LLVM IR from tangjz/acm-icpc :: Summer_Training/2016-07-21 (I - It's All In The Mind - tjz)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [110 x i32], align 16
@c = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@.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

; 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
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %8

8:                                                ; preds = %98, %0
  %9 = load i32, ptr @t, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr @t, align 4, !tbaa !5
  %11 = icmp ne i32 %9, 0
  br i1 %11, label %12, label %109

12:                                               ; preds = %8
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m)
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = mul i64 %15, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @a, i64 1), i8 -1, i64 %16, i1 false)
  br label %17

17:                                               ; preds = %21, %12
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @m, align 4, !tbaa !5
  %20 = icmp ne i32 %18, 0
  br i1 %20, label %21, label %27

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3)
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %25
  store i32 %23, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %17, !llvm.loop !9

27:                                               ; preds = %17
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %30
  store i32 0, ptr %31, align 4, !tbaa !5
  store i32 0, ptr @s, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %32, ptr %4, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %59, %27
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 2
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %62

37:                                               ; preds = %33
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %52

43:                                               ; preds = %37
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %50
  store i32 %48, ptr %51, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %43, %37
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr @s, align 4, !tbaa !5
  %58 = add nsw i32 %57, %56
  store i32 %58, ptr @s, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %52
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %4, align 4, !tbaa !5
  br label %33, !llvm.loop !11

62:                                               ; preds = %36
  store i32 0, ptr @c, align 4, !tbaa !5
  store i32 100, ptr @a, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %95, %62
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = icmp sle i32 %64, 2
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %98

67:                                               ; preds = %63
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %73, label %82

73:                                               ; preds = %67
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %80
  store i32 %78, ptr %81, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %73, %67
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr @c, align 4, !tbaa !5
  %88 = add nsw i32 %87, %86
  store i32 %88, ptr @c, align 4, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr @s, align 4, !tbaa !5
  %94 = add nsw i32 %93, %92
  store i32 %94, ptr @s, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %82
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %5, align 4, !tbaa !5
  br label %63, !llvm.loop !12

98:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %99 = load i32, ptr @c, align 4, !tbaa !5
  %100 = load i32, ptr @s, align 4, !tbaa !5
  %101 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %99, i32 noundef %100)
  store i32 %101, ptr %6, align 4, !tbaa !5
  %102 = load i32, ptr @c, align 4, !tbaa !5
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sdiv i32 %102, %103
  %105 = load i32, ptr @s, align 4, !tbaa !5
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = sdiv i32 %105, %106
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %104, i32 noundef %107)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %8, !llvm.loop !13

109:                                              ; preds = %8
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef, i32 noundef) #4

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 = distinct !{!12, !10}
!13 = distinct !{!13, !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"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local local_unnamed_addr global [110 x i32], align 16
@c = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local local_unnamed_addr global i32, align 4
@.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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not26 = icmp eq i32 %4, 0
  br i1 %.not26, label %._crit_edge29, label %.lr.ph28

.lr.ph28:                                         ; preds = %0, %65
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = shl nsw i64 %8, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @a, i64 4), i8 -1, i64 %9, i1 false)
  %10 = load i32, ptr @m, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  store i32 %11, ptr @m, align 4, !tbaa !5
  %.not1617 = icmp eq i32 %10, 0
  br i1 %.not1617, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph28, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %15
  store i32 %13, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %17 = load i32, ptr @m, align 4, !tbaa !5
  %18 = add nsw i32 %17, -1
  store i32 %18, ptr @m, align 4, !tbaa !5
  %.not16 = icmp eq i32 %17, 0
  br i1 %.not16, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !9

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph28
  %19 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %7, %.lr.ph28 ]
  %20 = add nsw i32 %19, 1
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %21
  store i32 0, ptr %22, align 4, !tbaa !5
  %23 = icmp sgt i32 %19, 2
  br i1 %23, label %.lr.ph20.preheader, label %._crit_edge21

.lr.ph20.preheader:                               ; preds = %._crit_edge
  %24 = zext nneg i32 %19 to i64
  %xtraiter = and i64 %24, 1
  %25 = icmp eq i32 %19, 3
  br i1 %25, label %._crit_edge21.loopexit.unr-lcssa, label %.lr.ph20.preheader.new

.lr.ph20.preheader.new:                           ; preds = %.lr.ph20.preheader
  %26 = and i64 %24, 2147483646
  %27 = add nsw i64 %26, -4
  br label %.lr.ph20

._crit_edge21.loopexit.unr-lcssa:                 ; preds = %55, %.lr.ph20.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph20.preheader ], [ %57, %55 ]
  %indvars.iv.unr = phi i64 [ %24, %.lr.ph20.preheader ], [ %indvars.iv.next.1, %55 ]
  %.unr = phi i32 [ 0, %.lr.ph20.preheader ], [ %57, %55 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge21, label %.lr.ph20.epil

.lr.ph20.epil:                                    ; preds = %._crit_edge21.loopexit.unr-lcssa
  %28 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %indvars.iv.unr
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp eq i32 %29, -1
  br i1 %30, label %31, label %._crit_edge21.loopexit.epilog-lcssa

31:                                               ; preds = %.lr.ph20.epil
  %32 = add nuw nsw i64 %indvars.iv.unr, 1
  %33 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %28, align 4, !tbaa !5
  br label %._crit_edge21.loopexit.epilog-lcssa

._crit_edge21.loopexit.epilog-lcssa:              ; preds = %31, %.lr.ph20.epil
  %35 = phi i32 [ %34, %31 ], [ %29, %.lr.ph20.epil ]
  %36 = add nsw i32 %.unr, %35
  br label %._crit_edge21

._crit_edge21:                                    ; preds = %._crit_edge21.loopexit.epilog-lcssa, %._crit_edge21.loopexit.unr-lcssa, %._crit_edge
  %s.promoted23 = phi i32 [ 0, %._crit_edge ], [ %.lcssa.ph, %._crit_edge21.loopexit.unr-lcssa ], [ %36, %._crit_edge21.loopexit.epilog-lcssa ]
  store i32 100, ptr @a, align 16, !tbaa !5
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4, !tbaa !5
  %38 = icmp eq i32 %37, -1
  br i1 %38, label %58, label %59

.lr.ph20:                                         ; preds = %55, %.lr.ph20.preheader.new
  %indvars.iv = phi i64 [ %24, %.lr.ph20.preheader.new ], [ %indvars.iv.next.1, %55 ]
  %39 = phi i32 [ 0, %.lr.ph20.preheader.new ], [ %57, %55 ]
  %niter = phi i64 [ 0, %.lr.ph20.preheader.new ], [ %niter.next.1, %55 ]
  %40 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %indvars.iv
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %.lr.ph20.1

43:                                               ; preds = %.lr.ph20
  %44 = add nuw nsw i64 %indvars.iv, 1
  %45 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr %40, align 4, !tbaa !5
  br label %.lr.ph20.1

.lr.ph20.1:                                       ; preds = %43, %.lr.ph20
  %47 = phi i32 [ %46, %43 ], [ %41, %.lr.ph20 ]
  %48 = add nsw i32 %39, %47
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %49 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %indvars.iv.next
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp eq i32 %50, -1
  br i1 %51, label %52, label %55

52:                                               ; preds = %.lr.ph20.1
  %53 = getelementptr inbounds [110 x i32], ptr @a, i64 0, i64 %indvars.iv
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr %49, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %52, %.lr.ph20.1
  %56 = phi i32 [ %54, %52 ], [ %50, %.lr.ph20.1 ]
  %57 = add nsw i32 %48, %56
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter, %27
  br i1 %niter.ncmp.1.not, label %._crit_edge21.loopexit.unr-lcssa, label %.lr.ph20, !llvm.loop !11

58:                                               ; preds = %._crit_edge21
  store i32 100, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4, !tbaa !5
  br label %59

59:                                               ; preds = %58, %._crit_edge21
  %60 = phi i32 [ 100, %58 ], [ %37, %._crit_edge21 ]
  %61 = add nsw i32 %s.promoted23, %60
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 8), align 8, !tbaa !5
  %63 = icmp eq i32 %62, -1
  br i1 %63, label %64, label %65

64:                                               ; preds = %59
  store i32 %60, ptr getelementptr inbounds (i8, ptr @a, i64 8), align 8, !tbaa !5
  br label %65

65:                                               ; preds = %64, %59
  %66 = phi i32 [ %60, %64 ], [ %62, %59 ]
  %67 = add nsw i32 %60, %66
  %68 = add nsw i32 %61, %66
  store i32 %67, ptr @c, align 4, !tbaa !5
  store i32 %68, ptr @s, align 4, !tbaa !5
  %69 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %67, i32 noundef %68)
  %70 = load i32, ptr @c, align 4, !tbaa !5
  %71 = sdiv i32 %70, %69
  %72 = load i32, ptr @s, align 4, !tbaa !5
  %73 = sdiv i32 %72, %69
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %71, i32 noundef %73)
  %75 = load i32, ptr @t, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %._crit_edge29, label %.lr.ph28, !llvm.loop !12

._crit_edge29:                                    ; preds = %65, %0
  ret i32 0
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef, i32 noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 = distinct !{!12, !10}


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