; LLVM IR from tangjz/acm-icpc :: 51nod/1693.ll (Z1Fii)

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

@f = external dso_local global [2 x [1100001 x i32]], align 16
@_ZL2pr = external hidden constant [6 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z1Fii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [2 x [1100001 x i32]], ptr @f, i64 0, i64 %16
  %18 = load i32, ptr %5, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [1100001 x i32], ptr %17, i64 0, i64 %19
  store ptr %20, ptr %6, align 8, !tbaa !9
  %21 = load ptr, ptr %6, align 8, !tbaa !9
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = icmp ne i32 %22, -1
  br i1 %23, label %24, label %27

24:                                               ; preds = %2
  %25 = load ptr, ptr %6, align 8, !tbaa !9
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %94

27:                                               ; preds = %2
  %28 = load ptr, ptr %6, align 8, !tbaa !9
  store i32 1061109567, ptr %28, align 4, !tbaa !5
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %51

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %47, %31
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = icmp sle i32 %33, 4
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %50

36:                                               ; preds = %32
  %37 = load ptr, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = add nsw i32 %38, %39
  %41 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %40)
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = add nsw i32 %41, %42
  store i32 %43, ptr %9, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load ptr, ptr %6, align 8, !tbaa !9
  store i32 %45, ptr %46, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %47

47:                                               ; preds = %36
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %8, align 4, !tbaa !5
  br label %32, !llvm.loop !11

50:                                               ; preds = %35
  br label %91

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

52:                                               ; preds = %87, %51
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 6
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %52
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [6 x i32], ptr @_ZL2pr, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = srem i32 %57, %61
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %56
  br label %87

65:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [6 x i32], ptr @_ZL2pr, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sdiv i32 %66, %70
  store i32 %71, ptr %11, align 4, !tbaa !5
  %72 = load ptr, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %73)
  store i32 %74, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %75)
  store i32 %76, ptr %14, align 4, !tbaa !5
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %10, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [6 x i32], ptr @_ZL2pr, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = add nsw i32 %78, %82
  store i32 %83, ptr %12, align 4, !tbaa !5
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %72, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load ptr, ptr %6, align 8, !tbaa !9
  store i32 %85, ptr %86, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %87

87:                                               ; preds = %65, %64
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %10, align 4, !tbaa !5
  br label %52, !llvm.loop !13

90:                                               ; preds = %55
  br label %91

91:                                               ; preds = %90, %50
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %94

94:                                               ; preds = %91, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %95 = load i32, ptr %3, align 4
  ret i32 %95
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { 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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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

@f = external dso_local global [2 x [1100001 x i32]], align 16
@_ZL2pr = external hidden local_unnamed_addr constant [6 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z1Fii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = sext i32 %0 to i64
  %8 = sext i32 %1 to i64
  %9 = getelementptr inbounds [2 x [1100001 x i32]], ptr @f, i64 0, i64 %7, i64 %8
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %.not = icmp eq i32 %10, -1
  br i1 %.not, label %11, label %.loopexit

11:                                               ; preds = %2
  store i32 1061109567, ptr %9, align 4, !tbaa !5
  %12 = icmp eq i32 %0, 1
  br i1 %12, label %.preheader.preheader, label %.preheader29.preheader

.preheader29.preheader:                           ; preds = %11
  %13 = load i32, ptr @_ZL2pr, align 16, !tbaa !5
  %14 = srem i32 %1, %13
  %15 = sdiv i32 %1, %13
  %.not28 = icmp eq i32 %14, 0
  br i1 %.not28, label %36, label %.preheader29.1

.preheader.preheader:                             ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %16 = add nsw i32 %1, 1
  %17 = tail call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %16)
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %3, align 4, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %20 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %20, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %21 = add nsw i32 %1, 2
  %22 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %21)
  %23 = add nsw i32 %22, 2
  store i32 %23, ptr %3, align 4, !tbaa !5
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %25, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %26 = add nsw i32 %1, 3
  %27 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %26)
  %28 = add nsw i32 %27, 3
  store i32 %28, ptr %3, align 4, !tbaa !5
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %30, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %31 = add nsw i32 %1, 4
  %32 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %31)
  %33 = add nsw i32 %32, 4
  store i32 %33, ptr %3, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  store i32 %35, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %.loopexit

36:                                               ; preds = %.preheader29.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %37 = tail call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %15)
  store i32 %37, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %38 = tail call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %15)
  store i32 %38, ptr %6, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %40, %13
  store i32 %41, ptr %4, align 4, !tbaa !5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %43 = load i32, ptr %42, align 4, !tbaa !5
  store i32 %43, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %.preheader29.1

.preheader29.1:                                   ; preds = %.preheader29.preheader, %36
  %44 = phi i32 [ 1061109567, %.preheader29.preheader ], [ %43, %36 ]
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2pr, i64 4), align 4, !tbaa !5
  %46 = srem i32 %1, %45
  %47 = sdiv i32 %1, %45
  %.not28.1 = icmp eq i32 %46, 0
  br i1 %.not28.1, label %48, label %.preheader29.2

48:                                               ; preds = %.preheader29.1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %49 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %47)
  store i32 %49, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %50 = call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %47)
  store i32 %50, ptr %6, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, %45
  store i32 %53, ptr %4, align 4, !tbaa !5
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %55 = load i32, ptr %54, align 4, !tbaa !5
  store i32 %55, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %.preheader29.2

.preheader29.2:                                   ; preds = %48, %.preheader29.1
  %56 = phi i32 [ %55, %48 ], [ %44, %.preheader29.1 ]
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2pr, i64 8), align 8, !tbaa !5
  %58 = srem i32 %1, %57
  %59 = sdiv i32 %1, %57
  %.not28.2 = icmp eq i32 %58, 0
  br i1 %.not28.2, label %60, label %.preheader29.3

60:                                               ; preds = %.preheader29.2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %61 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %59)
  store i32 %61, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %62 = call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %59)
  store i32 %62, ptr %6, align 4, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i32 %64, %57
  store i32 %65, ptr %4, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  store i32 %67, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %.preheader29.3

.preheader29.3:                                   ; preds = %60, %.preheader29.2
  %68 = phi i32 [ %67, %60 ], [ %56, %.preheader29.2 ]
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2pr, i64 12), align 4, !tbaa !5
  %70 = srem i32 %1, %69
  %71 = sdiv i32 %1, %69
  %.not28.3 = icmp eq i32 %70, 0
  br i1 %.not28.3, label %72, label %.preheader29.4

72:                                               ; preds = %.preheader29.3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %73 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %71)
  store i32 %73, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %74 = call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %71)
  store i32 %74, ptr %6, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, %69
  store i32 %77, ptr %4, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  store i32 %79, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %.preheader29.4

.preheader29.4:                                   ; preds = %72, %.preheader29.3
  %80 = phi i32 [ %79, %72 ], [ %68, %.preheader29.3 ]
  %81 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2pr, i64 16), align 16, !tbaa !5
  %82 = srem i32 %1, %81
  %83 = sdiv i32 %1, %81
  %.not28.4 = icmp eq i32 %82, 0
  br i1 %.not28.4, label %84, label %.preheader29.5

84:                                               ; preds = %.preheader29.4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %85 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %83)
  store i32 %85, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %86 = call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %83)
  store i32 %86, ptr %6, align 4, !tbaa !5
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %88, %81
  store i32 %89, ptr %4, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %.preheader29.5

.preheader29.5:                                   ; preds = %84, %.preheader29.4
  %92 = phi i32 [ %91, %84 ], [ %80, %.preheader29.4 ]
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2pr, i64 20), align 4, !tbaa !5
  %94 = srem i32 %1, %93
  %95 = sdiv i32 %1, %93
  %.not28.5 = icmp eq i32 %94, 0
  br i1 %.not28.5, label %96, label %.loopexit

96:                                               ; preds = %.preheader29.5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %97 = call noundef i32 @_Z1Fii(i32 noundef 0, i32 noundef %95)
  store i32 %97, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %98 = call noundef i32 @_Z1Fii(i32 noundef 1, i32 noundef %95)
  store i32 %98, ptr %6, align 4, !tbaa !5
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = add nsw i32 %100, %93
  store i32 %101, ptr %4, align 4, !tbaa !5
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %96, %.preheader29.5, %2
  %.0 = phi i32 [ %10, %2 ], [ %35, %.preheader.preheader ], [ %103, %96 ], [ %92, %.preheader29.5 ]
  ret i32 %.0
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { 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"}


; Effective O3 passes: DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass